@alwith/module-chat 0.5.11 → 0.5.12

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 (262) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/approval/choice-elicitation-form.js +1 -1
  3. package/dist/approval/choice-schema.js +1 -1
  4. package/dist/approval/permission-options.js +1 -1
  5. package/dist/approval/permission-view.js +1 -1
  6. package/dist/approval/schema-elicitation-form.js +1 -1
  7. package/dist/approval/url-elicitation-card.js +1 -1
  8. package/dist/{chunk-0gwe31zs.js → chunk-023yzyq8.js} +2 -2
  9. package/dist/{chunk-91x8etvh.js → chunk-0qm0fy2r.js} +2 -2
  10. package/dist/{chunk-ha5jfz6r.js → chunk-1dh0q11h.js} +3 -3
  11. package/dist/{chunk-rnykpmn2.js → chunk-1k03fpcj.js} +1 -1
  12. package/dist/{chunk-96xwaa2t.js → chunk-24b1z856.js} +2 -2
  13. package/dist/{chunk-syffw61b.js → chunk-27vftbhf.js} +4 -4
  14. package/dist/{chunk-m99k3e5h.js → chunk-2w576ygb.js} +2 -2
  15. package/dist/{chunk-5kpcpjrb.js → chunk-36t9x2qc.js} +3 -3
  16. package/dist/{chunk-r79zqx0t.js → chunk-3ah1ez70.js} +5 -5
  17. package/dist/{chunk-5w92bzgs.js → chunk-3dvx2q8w.js} +2 -2
  18. package/dist/{chunk-qj63fv6w.js → chunk-3g66qg03.js} +2 -2
  19. package/dist/{chunk-bhze2sjv.js → chunk-3q6ssrs3.js} +2 -2
  20. package/dist/{chunk-krmz8t4p.js → chunk-4wkpatzz.js} +2 -2
  21. package/dist/{chunk-460phps1.js → chunk-58bs5f2z.js} +2 -2
  22. package/dist/{chunk-rszktjdw.js → chunk-62m11b37.js} +3 -3
  23. package/dist/{chunk-t6t6hgzx.js → chunk-63zq5nr8.js} +2 -2
  24. package/dist/chunk-6nyba0m4.js +2 -0
  25. package/dist/{chunk-m6rrt94g.js → chunk-753s76b6.js} +2 -2
  26. package/dist/chunk-76w1a72z.js +2 -0
  27. package/dist/{chunk-30wqrz8v.js → chunk-7avpdkmf.js} +2 -2
  28. package/dist/{chunk-vv1ghqq3.js → chunk-8712sy9s.js} +1 -1
  29. package/dist/{chunk-sr5rcdza.js → chunk-8a1j96d1.js} +2 -2
  30. package/dist/{chunk-7k0wvvy0.js → chunk-8jpm8fnf.js} +1 -1
  31. package/dist/{chunk-ysc51tpb.js → chunk-9hvbm4be.js} +1 -1
  32. package/dist/{chunk-kahn24np.js → chunk-9t8ptjct.js} +2 -2
  33. package/dist/{chunk-5ev4qvsp.js → chunk-9v94xnhp.js} +2 -2
  34. package/dist/{chunk-50qyant6.js → chunk-a1kmc6t8.js} +3 -3
  35. package/dist/{chunk-17zegmxa.js → chunk-a2hygrpr.js} +1 -1
  36. package/dist/{chunk-5m4605a3.js → chunk-ana59z25.js} +1 -1
  37. package/dist/{chunk-magaaqab.js → chunk-anfrrs5x.js} +1 -1
  38. package/dist/chunk-b1vw42he.js +2 -0
  39. package/dist/{chunk-5fgakrmr.js → chunk-b3nt7axf.js} +2 -2
  40. package/dist/{chunk-p1ydsj54.js → chunk-b5z75meq.js} +2 -2
  41. package/dist/{chunk-mgtkmbmd.js → chunk-bbwb4555.js} +2 -2
  42. package/dist/{chunk-znx2e9e7.js → chunk-bcrq96dw.js} +2 -2
  43. package/dist/{chunk-ynw0f8h2.js → chunk-bftrddmr.js} +2 -2
  44. package/dist/{chunk-443z7mve.js → chunk-bna24ggr.js} +2 -2
  45. package/dist/chunk-bzk6wn2s.js +3 -0
  46. package/dist/{chunk-gzff19t3.js → chunk-c7km8xgd.js} +2 -2
  47. package/dist/{chunk-tjgq4882.js → chunk-c9k66x5g.js} +2 -2
  48. package/dist/{chunk-294gms5s.js → chunk-chwg3na0.js} +2 -2
  49. package/dist/chunk-ckft9abb.js +2 -0
  50. package/dist/{chunk-7a6t282a.js → chunk-cy6grsx0.js} +1 -1
  51. package/dist/{chunk-p8nx34zm.js → chunk-d6840cvf.js} +2 -2
  52. package/dist/{chunk-6amcjhqh.js → chunk-ddtb692j.js} +2 -2
  53. package/dist/{chunk-t3ew92b3.js → chunk-dgnk7h62.js} +2 -2
  54. package/dist/{chunk-sex6d2c2.js → chunk-ds6avzj3.js} +2 -2
  55. package/dist/{chunk-k5c82xk9.js → chunk-dxt9j0da.js} +2 -2
  56. package/dist/chunk-e15f3anm.js +3 -0
  57. package/dist/{chunk-j2wty8a3.js → chunk-ee9pzqnq.js} +2 -2
  58. package/dist/{chunk-q905xt4v.js → chunk-evx9d147.js} +2 -2
  59. package/dist/{chunk-dp8pjv6r.js → chunk-f3e3ged2.js} +1 -1
  60. package/dist/chunk-f7n8erng.js +2 -0
  61. package/dist/{chunk-b4dsjhkq.js → chunk-fa0kzj3j.js} +1 -1
  62. package/dist/{chunk-20svvgj3.js → chunk-fnbs3dq1.js} +2 -2
  63. package/dist/{chunk-88xay4pa.js → chunk-fpx4ng0t.js} +2 -2
  64. package/dist/{chunk-hjnf5kvc.js → chunk-fteek5h4.js} +2 -2
  65. package/dist/{chunk-133f0wed.js → chunk-gbbpdhg6.js} +2 -2
  66. package/dist/{chunk-m28hdj8j.js → chunk-gpz9f9zq.js} +2 -2
  67. package/dist/{chunk-0n240acr.js → chunk-gszy4mhj.js} +2 -2
  68. package/dist/{chunk-zbtas7pt.js → chunk-gtqwgjjg.js} +2 -2
  69. package/dist/{chunk-4nh3xzrm.js → chunk-hgj33wbd.js} +2 -2
  70. package/dist/chunk-hh498geh.js +7 -0
  71. package/dist/chunk-hpyaxv6h.js +2 -0
  72. package/dist/{chunk-m8djwdd5.js → chunk-ht28382s.js} +2 -2
  73. package/dist/{chunk-wb3zpzk3.js → chunk-hw99hhjf.js} +1 -1
  74. package/dist/{chunk-jn0q0b7k.js → chunk-hwfwd04r.js} +2 -2
  75. package/dist/{chunk-6edz9f7j.js → chunk-hz1pgnqp.js} +2 -2
  76. package/dist/chunk-jr591zg2.js +2 -0
  77. package/dist/{chunk-y3qgsj79.js → chunk-jtv179nm.js} +1 -1
  78. package/dist/{chunk-cke0v0a7.js → chunk-kbwjcnf6.js} +1 -1
  79. package/dist/{chunk-g7p46jq1.js → chunk-kfs19vc5.js} +2 -2
  80. package/dist/{chunk-7h8pv9eg.js → chunk-ks05sstp.js} +1 -1
  81. package/dist/{chunk-0yvbqccv.js → chunk-kw487283.js} +2 -2
  82. package/dist/{chunk-6d7ppje3.js → chunk-m6h92nq4.js} +2 -2
  83. package/dist/{chunk-fe3c678p.js → chunk-mk379yt7.js} +2 -2
  84. package/dist/{chunk-cgqhz23q.js → chunk-mkw0twsb.js} +2 -2
  85. package/dist/{chunk-4svcj9c6.js → chunk-mvv5xmap.js} +2 -2
  86. package/dist/{chunk-knsf6jm1.js → chunk-mwd0ed0c.js} +2 -2
  87. package/dist/chunk-nad1erxy.js +3 -0
  88. package/dist/{chunk-f1zvbkak.js → chunk-nwrbpw97.js} +1 -1
  89. package/dist/{chunk-5hsmhj1g.js → chunk-phy911dk.js} +2 -2
  90. package/dist/{chunk-7jdazbzv.js → chunk-q256c3hn.js} +2 -2
  91. package/dist/{chunk-a3krtv66.js → chunk-qg1b5k6m.js} +2 -2
  92. package/dist/chunk-qv4x469a.js +2 -0
  93. package/dist/{chunk-qw0jp3wm.js → chunk-qwyvq7bk.js} +2 -2
  94. package/dist/{chunk-tv89wh8b.js → chunk-r0t8zj4g.js} +2 -2
  95. package/dist/{chunk-xh8wth6z.js → chunk-rag9xsg5.js} +2 -2
  96. package/dist/{chunk-abwjd5yv.js → chunk-reaxcamj.js} +1 -1
  97. package/dist/{chunk-e55zxnda.js → chunk-rrrpp44m.js} +2 -2
  98. package/dist/{chunk-64whvkk0.js → chunk-rtg6xfgr.js} +1 -1
  99. package/dist/chunk-s2k5xynq.js +2 -0
  100. package/dist/{chunk-qpc4ca5y.js → chunk-sbyn62qx.js} +2 -2
  101. package/dist/chunk-shsyer15.js +2 -0
  102. package/dist/{chunk-w43dvzqk.js → chunk-sn80gr8g.js} +3 -3
  103. package/dist/{chunk-hxhptw6e.js → chunk-tjpr0adf.js} +2 -2
  104. package/dist/{chunk-zz734bzf.js → chunk-tjykfxrd.js} +2 -2
  105. package/dist/{chunk-rnzphmk6.js → chunk-tm4ee7m3.js} +2 -2
  106. package/dist/{chunk-7drq0g9b.js → chunk-tt40vzdd.js} +2 -2
  107. package/dist/{chunk-f4h7yb7d.js → chunk-vc9ts6wp.js} +2 -2
  108. package/dist/{chunk-cpk3y6ad.js → chunk-vcbv30ph.js} +2 -2
  109. package/dist/{chunk-cjztkcsm.js → chunk-vyccmpdn.js} +2 -2
  110. package/dist/{chunk-w8qmh6he.js → chunk-w45d5th9.js} +2 -2
  111. package/dist/{chunk-0d4xsx23.js → chunk-wmk2dwpf.js} +2 -2
  112. package/dist/{chunk-gj3j9zh5.js → chunk-x2tsybks.js} +3 -3
  113. package/dist/{chunk-nkypxxjk.js → chunk-xa20eex9.js} +1 -1
  114. package/dist/{chunk-hrsz92yq.js → chunk-xd5rqbwp.js} +1 -1
  115. package/dist/{chunk-728v2as1.js → chunk-xj0y094j.js} +2 -2
  116. package/dist/{chunk-377s443r.js → chunk-y0psrvcc.js} +2 -2
  117. package/dist/{chunk-j2wtwb37.js → chunk-y1kkt0m2.js} +2 -2
  118. package/dist/{chunk-ryz4c13z.js → chunk-y6r6tzfh.js} +2 -2
  119. package/dist/chunk-zg2342s2.js +2 -0
  120. package/dist/{chunk-jhk2chpp.js → chunk-zmpbfbnn.js} +1 -1
  121. package/dist/{chunk-mt965yn0.js → chunk-znyyzs85.js} +2 -2
  122. package/dist/{chunk-6pmc9283.js → chunk-zp5ntx27.js} +1 -1
  123. package/dist/{chunk-qah4fs3d.js → chunk-zw3h5xgf.js} +1 -1
  124. package/dist/codex/activity-group.js +1 -1
  125. package/dist/codex/assistant-message.d.ts +2 -1
  126. package/dist/codex/assistant-message.js +1 -1
  127. package/dist/codex/async-question-card.js +1 -1
  128. package/dist/codex/disclosure-state.js +1 -1
  129. package/dist/codex/edited-files-card.js +1 -1
  130. package/dist/codex/image-view-activity.js +1 -1
  131. package/dist/codex/markdown-renderer.js +1 -1
  132. package/dist/codex/navigation-audio.js +1 -1
  133. package/dist/codex/navigation-preview.js +1 -1
  134. package/dist/codex/navigation-rail.js +1 -1
  135. package/dist/codex/patch-view.js +1 -1
  136. package/dist/codex/plan.js +1 -1
  137. package/dist/codex/timeline-virtualizer.js +1 -1
  138. package/dist/codex/turn-activity.d.ts +1 -1
  139. package/dist/codex/turn-activity.js +1 -1
  140. package/dist/codex/user-message.js +1 -1
  141. package/dist/codex/virtualized-turn-list.js +1 -1
  142. package/dist/composer/completion-filter.js +1 -1
  143. package/dist/composer/completion-menu.js +1 -1
  144. package/dist/composer/completion-trigger.js +1 -1
  145. package/dist/composer/effort-slider.js +1 -1
  146. package/dist/composer/menu-radio.js +1 -1
  147. package/dist/composer/model-select.js +1 -1
  148. package/dist/composer/permission-mode-select.js +1 -1
  149. package/dist/composer/prompt-input-attachments.js +1 -1
  150. package/dist/composer/prompt-input-clipboard.js +1 -1
  151. package/dist/composer/prompt-input-context.js +1 -1
  152. package/dist/composer/prompt-input-textarea.js +1 -1
  153. package/dist/composer/prompt-input.js +1 -1
  154. package/dist/conversation/action-card.js +1 -1
  155. package/dist/conversation/composer/composer.d.ts +2 -1
  156. package/dist/conversation/composer/composer.js +1 -1
  157. package/dist/conversation/composer/config-options.js +1 -1
  158. package/dist/conversation/composer/context.d.ts +1 -0
  159. package/dist/conversation/composer/context.js +1 -1
  160. package/dist/conversation/composer/drafts.js +1 -1
  161. package/dist/conversation/composer/long-text.js +1 -1
  162. package/dist/conversation/composer/mention-chips.js +1 -1
  163. package/dist/conversation/composer/model-menu.d.ts +1 -1
  164. package/dist/conversation/composer/model-menu.js +1 -1
  165. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  166. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  167. package/dist/conversation/composer/prediction.js +1 -1
  168. package/dist/conversation/composer/slash-command-button.js +1 -1
  169. package/dist/conversation/composer/submit-button.js +1 -1
  170. package/dist/conversation/composer/usage-meter.js +1 -1
  171. package/dist/conversation/context.js +1 -1
  172. package/dist/conversation/conversation-body.js +1 -1
  173. package/dist/conversation/conversation-view.js +1 -1
  174. package/dist/conversation/conversation.js +1 -1
  175. package/dist/conversation/diff-modal.js +1 -1
  176. package/dist/conversation/session-actions.js +1 -1
  177. package/dist/image-lightbox.js +1 -1
  178. package/dist/image-preview-dialog.js +1 -1
  179. package/dist/lib/code-highlighter.js +1 -1
  180. package/dist/lib/fuzzy.js +1 -1
  181. package/dist/lib/group-blocks.js +1 -1
  182. package/dist/lib/image-encode.js +1 -1
  183. package/dist/lib/limits.js +1 -1
  184. package/dist/lib/markdown-parser.js +1 -1
  185. package/dist/lib/markdown-rules.js +1 -1
  186. package/dist/lib/model-name.js +1 -1
  187. package/dist/lib/pointer-centered-zoom.js +1 -1
  188. package/dist/lib/prepare-prompt-files.js +1 -1
  189. package/dist/lib/stream-style.js +1 -1
  190. package/dist/lib/streaming-markdown.js +1 -1
  191. package/dist/locales.d.ts +13 -0
  192. package/dist/locales.js +1 -1
  193. package/dist/search/chat-search.js +1 -1
  194. package/dist/search/dom-matches.js +1 -1
  195. package/dist/search/find-bar.js +1 -1
  196. package/dist/search/literal-matches.js +1 -1
  197. package/dist/session-list/archived-sessions.js +1 -1
  198. package/dist/session-list/host.js +1 -1
  199. package/dist/session-list/navigation.js +1 -1
  200. package/dist/session-list/overflow-marquee.js +1 -1
  201. package/dist/session-list/session-groups.js +1 -1
  202. package/dist/session-list/session-info-card.js +1 -1
  203. package/dist/session-list/session-list.js +1 -1
  204. package/dist/session-list/session-row.js +1 -1
  205. package/dist/session-list/session-state-dot.js +1 -1
  206. package/dist/session-list/session-state-menu.js +1 -1
  207. package/dist/session-list/sidebar-overlay.js +1 -1
  208. package/dist/session-list/trailing-swap.js +1 -1
  209. package/dist/session-list/use-activity-preview.js +1 -1
  210. package/dist/session-list/use-project-sessions.js +1 -1
  211. package/dist/session-list/virtual-session-rows.js +1 -1
  212. package/dist/session-timeline/activity-group.js +1 -1
  213. package/dist/session-timeline/activity-projection.d.ts +2 -1
  214. package/dist/session-timeline/activity-projection.js +1 -1
  215. package/dist/session-timeline/assistant-content.js +1 -1
  216. package/dist/session-timeline/assistant-turn.js +1 -1
  217. package/dist/session-timeline/async-questions.js +1 -1
  218. package/dist/session-timeline/edited-files-card.js +1 -1
  219. package/dist/session-timeline/history-timeline.js +1 -1
  220. package/dist/session-timeline/host.js +1 -1
  221. package/dist/session-timeline/navigation-rail.js +1 -1
  222. package/dist/session-timeline/plan.js +1 -1
  223. package/dist/session-timeline/question-reply.js +1 -1
  224. package/dist/session-timeline/resource-content.js +1 -1
  225. package/dist/session-timeline/session-timeline.js +1 -1
  226. package/dist/session-timeline/timeline-registry.js +1 -1
  227. package/dist/session-timeline/turn-activity.js +1 -1
  228. package/dist/session-timeline/turn-error.js +1 -1
  229. package/dist/session-timeline/turn-retry.js +1 -1
  230. package/dist/session-timeline/turns.js +1 -1
  231. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  232. package/dist/session-timeline/user-message.js +1 -1
  233. package/dist/types.d.ts +1 -0
  234. package/dist/ui/alert.js +1 -1
  235. package/dist/ui/badge.js +1 -1
  236. package/dist/ui/card.js +1 -1
  237. package/dist/ui/dialog.js +1 -1
  238. package/dist/ui/dropdown-menu.js +1 -1
  239. package/dist/ui/empty.js +1 -1
  240. package/dist/ui/field.js +1 -1
  241. package/dist/ui/input-group-textarea.js +1 -1
  242. package/dist/ui/input-group.js +1 -1
  243. package/dist/ui/kbd.js +1 -1
  244. package/dist/ui/radio-group.js +1 -1
  245. package/dist/ui/select.js +1 -1
  246. package/dist/ui/tooltip.js +1 -1
  247. package/package.json +1 -1
  248. package/dist/chunk-0kwfy29d.js +0 -2
  249. package/dist/chunk-3e0mfcj6.js +0 -2
  250. package/dist/chunk-3vrtepy0.js +0 -3
  251. package/dist/chunk-4b3s7gyc.js +0 -3
  252. package/dist/chunk-51sbmqdk.js +0 -2
  253. package/dist/chunk-7dzq2t68.js +0 -2
  254. package/dist/chunk-93x6b2qa.js +0 -3
  255. package/dist/chunk-9a4kjze3.js +0 -7
  256. package/dist/chunk-9tdzg6e6.js +0 -2
  257. package/dist/chunk-d84cxw1v.js +0 -2
  258. package/dist/chunk-e11qjnb4.js +0 -2
  259. package/dist/chunk-k3375qqd.js +0 -2
  260. package/dist/chunk-p8qgqtkc.js +0 -2
  261. package/dist/chunk-w6hhyjcn.js +0 -2
  262. package/dist/chunk-zt8qaqbz.js +0 -2
@@ -1 +1 @@
1
- import{So}from"../chunk-b4dsjhkq.js";import"../chunk-w8qmh6he.js";import"../chunk-ryz4c13z.js";export{So as TurnPlan};
1
+ import{So}from"../chunk-fa0kzj3j.js";import"../chunk-w45d5th9.js";import"../chunk-y6r6tzfh.js";export{So as TurnPlan};
@@ -1 +1 @@
1
- import{qn,Vn}from"../chunk-460phps1.js";export{qn as questionReply,Vn as questionReplyParts};
1
+ import{Wn,Gn}from"../chunk-58bs5f2z.js";export{Wn as questionReply,Gn as questionReplyParts};
@@ -1 +1 @@
1
- import{yr,_}from"../chunk-g7p46jq1.js";import"../chunk-6kn920c5.js";import"../chunk-dp8pjv6r.js";import"../chunk-ryz4c13z.js";export{_ as ResourceContent,yr as chatFileName};
1
+ import{br,_}from"../chunk-kfs19vc5.js";import"../chunk-6kn920c5.js";import"../chunk-f3e3ged2.js";import"../chunk-y6r6tzfh.js";export{_ as ResourceContent,br as chatFileName};
@@ -1 +1 @@
1
- import{Ln}from"../chunk-p1ydsj54.js";import"../chunk-7dzq2t68.js";import"../chunk-0gwe31zs.js";import"../chunk-hxhptw6e.js";import"../chunk-6d7ppje3.js";import"../chunk-ha5jfz6r.js";import"../chunk-460phps1.js";import{Mr}from"../chunk-a3krtv66.js";import"../chunk-syffw61b.js";import"../chunk-4svcj9c6.js";import"../chunk-znx2e9e7.js";import"../chunk-k5c82xk9.js";import"../chunk-jn0q0b7k.js";import"../chunk-30wqrz8v.js";import"../chunk-88xay4pa.js";import"../chunk-rnzphmk6.js";import"../chunk-0yvbqccv.js";import"../chunk-4b3s7gyc.js";import"../chunk-93x6b2qa.js";import"../chunk-0d4xsx23.js";import"../chunk-9a4kjze3.js";import"../chunk-p8nx34zm.js";import"../chunk-51sbmqdk.js";import"../chunk-ynw0f8h2.js";import"../chunk-w43dvzqk.js";import"../chunk-6edz9f7j.js";import"../chunk-r79zqx0t.js";import"../chunk-50qyant6.js";import"../chunk-sr5rcdza.js";import"../chunk-0n240acr.js";import"../chunk-c0ac9k7h.js";import"../chunk-m6rrt94g.js";import"../chunk-91x8etvh.js";import"../chunk-q905xt4v.js";import"../chunk-jhk2chpp.js";import"../chunk-g7p46jq1.js";import"../chunk-5kpcpjrb.js";import"../chunk-k3375qqd.js";import"../chunk-b4dsjhkq.js";import"../chunk-w8qmh6he.js";import"../chunk-m99k3e5h.js";import"../chunk-tjgq4882.js";import"../chunk-5m4605a3.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";import{re}from"../chunk-dp8pjv6r.js";import"../chunk-ryz4c13z.js";export{Ln as SessionTimeline,re as TimelineProvider,Mr as navigationAudio};
1
+ import{_n}from"../chunk-b5z75meq.js";import"../chunk-s2k5xynq.js";import"../chunk-023yzyq8.js";import"../chunk-tjpr0adf.js";import"../chunk-m6h92nq4.js";import"../chunk-1dh0q11h.js";import"../chunk-58bs5f2z.js";import{Rr}from"../chunk-qg1b5k6m.js";import"../chunk-27vftbhf.js";import"../chunk-mvv5xmap.js";import"../chunk-bcrq96dw.js";import"../chunk-dxt9j0da.js";import"../chunk-hwfwd04r.js";import"../chunk-7avpdkmf.js";import"../chunk-fpx4ng0t.js";import"../chunk-tm4ee7m3.js";import"../chunk-kw487283.js";import"../chunk-nad1erxy.js";import"../chunk-bzk6wn2s.js";import"../chunk-wmk2dwpf.js";import"../chunk-hh498geh.js";import"../chunk-d6840cvf.js";import"../chunk-ckft9abb.js";import"../chunk-bftrddmr.js";import"../chunk-sn80gr8g.js";import"../chunk-hz1pgnqp.js";import"../chunk-3ah1ez70.js";import"../chunk-a1kmc6t8.js";import"../chunk-8a1j96d1.js";import"../chunk-gszy4mhj.js";import"../chunk-c0ac9k7h.js";import"../chunk-753s76b6.js";import"../chunk-0qm0fy2r.js";import"../chunk-evx9d147.js";import"../chunk-zmpbfbnn.js";import"../chunk-kfs19vc5.js";import"../chunk-36t9x2qc.js";import"../chunk-zg2342s2.js";import"../chunk-fa0kzj3j.js";import"../chunk-w45d5th9.js";import"../chunk-2w576ygb.js";import"../chunk-c9k66x5g.js";import"../chunk-ana59z25.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";import{re}from"../chunk-f3e3ged2.js";import"../chunk-y6r6tzfh.js";export{_n as SessionTimeline,re as TimelineProvider,Rr as navigationAudio};
@@ -1 +1 @@
1
- import{_t,zn,Un,ii}from"../chunk-6d7ppje3.js";export{Un as clearTimeline,zn as publishTimeline,ii as revealTimelineTurn,_t as timelineRegistry};
1
+ import{_t,$n,qn,ai}from"../chunk-m6h92nq4.js";export{qn as clearTimeline,$n as publishTimeline,ai as revealTimelineTurn,_t as timelineRegistry};
@@ -1 +1 @@
1
- import{Io}from"../chunk-m99k3e5h.js";import"../chunk-tjgq4882.js";export{Io as projectTurnActivity};
1
+ import{Po}from"../chunk-2w576ygb.js";import"../chunk-c9k66x5g.js";export{Po as projectTurnActivity};
@@ -1 +1 @@
1
- import{Gt,Wt}from"../chunk-91x8etvh.js";import"../chunk-6kn920c5.js";import"../chunk-dp8pjv6r.js";import"../chunk-ryz4c13z.js";export{Gt as ErrorCard,Wt as TurnErrorView};
1
+ import{Gt,jt}from"../chunk-0qm0fy2r.js";import"../chunk-6kn920c5.js";import"../chunk-f3e3ged2.js";import"../chunk-y6r6tzfh.js";export{Gt as ErrorCard,jt as TurnErrorView};
@@ -1 +1 @@
1
- import{Bn}from"../chunk-hxhptw6e.js";export{Bn as capacityRetryDelay};
1
+ import{Un}from"../chunk-tjpr0adf.js";export{Un as capacityRetryDelay};
@@ -1 +1 @@
1
- import{Fr,fo,ho,qt,G,Ee,Vt,vo,xo,yo,bo}from"../chunk-m6rrt94g.js";import"../chunk-5kpcpjrb.js";import"../chunk-5m4605a3.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";export{yo as activeTurnKey,xo as continuesTurn,ho as groupTurns,Ee as isHistoryInterrupted,qt as isHistoryItem,Fr as isMcpStartup,fo as isSessionStatus,Vt as isTurnInterrupted,G as messageText,bo as turnPresentation,vo as turnTiming};
1
+ import{Br,ho,vo,Vt,W,Ee,Wt,xo,yo,bo,wo}from"../chunk-753s76b6.js";import"../chunk-36t9x2qc.js";import"../chunk-ana59z25.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";export{bo as activeTurnKey,yo as continuesTurn,vo as groupTurns,Ee as isHistoryInterrupted,Vt as isHistoryItem,Br as isMcpStartup,ho as isSessionStatus,Wt as isTurnInterrupted,W as messageText,wo as turnPresentation,xo as turnTiming};
@@ -1 +1 @@
1
- import{oo}from"../chunk-0yvbqccv.js";export{oo as useTimelineScroll};
1
+ import{io}from"../chunk-kw487283.js";export{io as useTimelineScroll};
@@ -1 +1 @@
1
- import{$n}from"../chunk-ha5jfz6r.js";import"../chunk-460phps1.js";import"../chunk-sr5rcdza.js";import"../chunk-0n240acr.js";import"../chunk-m6rrt94g.js";import"../chunk-g7p46jq1.js";import"../chunk-5kpcpjrb.js";import"../chunk-5m4605a3.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";import"../chunk-dp8pjv6r.js";import"../chunk-ryz4c13z.js";export{$n as UserMessage};
1
+ import{Vn}from"../chunk-1dh0q11h.js";import"../chunk-58bs5f2z.js";import"../chunk-8a1j96d1.js";import"../chunk-gszy4mhj.js";import"../chunk-753s76b6.js";import"../chunk-kfs19vc5.js";import"../chunk-36t9x2qc.js";import"../chunk-ana59z25.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";import"../chunk-f3e3ged2.js";import"../chunk-y6r6tzfh.js";export{Vn as UserMessage};
package/dist/types.d.ts CHANGED
@@ -62,6 +62,7 @@ export type ContentBlock = {
62
62
  parentToolUseId?: string | null;
63
63
  isBackground?: boolean;
64
64
  exitCode?: number;
65
+ userShell?: boolean;
65
66
  terminalDisplay?: TerminalDisplayMeta;
66
67
  artifact?: ArtifactMeta;
67
68
  } | {
package/dist/ui/alert.js CHANGED
@@ -1 +1 @@
1
- import{q,Et,V,Xr}from"../chunk-cke0v0a7.js";export{q as Alert,Xr as AlertAction,V as AlertDescription,Et as AlertTitle};
1
+ import{q,Et,V,Yr}from"../chunk-kbwjcnf6.js";export{q as Alert,Yr as AlertAction,V as AlertDescription,Et as AlertTitle};
package/dist/ui/badge.js CHANGED
@@ -1 +1 @@
1
- import{Vr,qe}from"../chunk-nkypxxjk.js";export{qe as Badge,Vr as badgeVariants};
1
+ import{Wr,qe}from"../chunk-xa20eex9.js";export{qe as Badge,Wr as badgeVariants};
package/dist/ui/card.js CHANGED
@@ -1 +1 @@
1
- import{Cn,Tn,Sn,In,Jr,Pn,Nn}from"../chunk-vv1ghqq3.js";export{Cn as Card,Jr as CardAction,Pn as CardContent,In as CardDescription,Nn as CardFooter,Tn as CardHeader,Sn as CardTitle};
1
+ import{In,Sn,Pn,Nn,ei,Mn,Rn}from"../chunk-8712sy9s.js";export{In as Card,ei as CardAction,Mn as CardContent,Nn as CardDescription,Rn as CardFooter,Sn as CardHeader,Pn as CardTitle};
package/dist/ui/dialog.js CHANGED
@@ -1 +1 @@
1
- import{d,Ni,$r,rr,qr,u,b,X,m,w}from"../chunk-17zegmxa.js";import"../chunk-6kn920c5.js";export{d as Dialog,rr as DialogClose,u as DialogContent,w as DialogDescription,X as DialogFooter,b as DialogHeader,qr as DialogOverlay,$r as DialogPortal,m as DialogTitle,Ni as DialogTrigger};
1
+ import{d,Mi,qr,ir,Vr,u,b,X,m,w}from"../chunk-a2hygrpr.js";import"../chunk-6kn920c5.js";export{d as Dialog,ir as DialogClose,u as DialogContent,w as DialogDescription,X as DialogFooter,b as DialogHeader,Vr as DialogOverlay,qr as DialogPortal,m as DialogTitle,Mi as DialogTrigger};
@@ -1 +1 @@
1
- import{H,vi,O,P,F,te,N,_e,He,Oe,nn,Uo,$o,M,xi}from"../chunk-qah4fs3d.js";export{H as DropdownMenu,nn as DropdownMenuCheckboxItem,P as DropdownMenuContent,F as DropdownMenuGroup,N as DropdownMenuItem,te as DropdownMenuLabel,vi as DropdownMenuPortal,Uo as DropdownMenuRadioGroup,$o as DropdownMenuRadioItem,M as DropdownMenuSeparator,xi as DropdownMenuShortcut,_e as DropdownMenuSub,Oe as DropdownMenuSubContent,He as DropdownMenuSubTrigger,O as DropdownMenuTrigger};
1
+ import{H,xi,O,N,F,te,M,_e,He,Oe,rn,$o,qo,R,yi}from"../chunk-zw3h5xgf.js";export{H as DropdownMenu,rn as DropdownMenuCheckboxItem,N as DropdownMenuContent,F as DropdownMenuGroup,M as DropdownMenuItem,te as DropdownMenuLabel,xi as DropdownMenuPortal,$o as DropdownMenuRadioGroup,qo as DropdownMenuRadioItem,R as DropdownMenuSeparator,yi as DropdownMenuShortcut,_e as DropdownMenuSub,Oe as DropdownMenuSubContent,He as DropdownMenuSubTrigger,O as DropdownMenuTrigger};
package/dist/ui/empty.js CHANGED
@@ -1 +1 @@
1
- import{ge,fe,gi,he,ve,fi}from"../chunk-magaaqab.js";export{ge as Empty,fi as EmptyContent,ve as EmptyDescription,fe as EmptyHeader,gi as EmptyMedia,he as EmptyTitle};
1
+ import{ge,fe,fi,he,ve,hi}from"../chunk-anfrrs5x.js";export{ge as Empty,hi as EmptyContent,ve as EmptyDescription,fe as EmptyHeader,fi as EmptyMedia,he as EmptyTitle};
package/dist/ui/field.js CHANGED
@@ -1 +1 @@
1
- import{At,Lt,Mn,Rn,ei,En,ti,at,ni,oi}from"../chunk-7k0wvvy0.js";import"../chunk-ek06eyp4.js";import"../chunk-ksv9pjc2.js";export{Rn as Field,ei as FieldContent,at as FieldDescription,oi as FieldError,Mn as FieldGroup,En as FieldLabel,Lt as FieldLegend,ni as FieldSeparator,At as FieldSet,ti as FieldTitle};
1
+ import{At,Lt,En,An,ti,Ln,ni,at,oi,ri}from"../chunk-8jpm8fnf.js";import"../chunk-ek06eyp4.js";import"../chunk-ksv9pjc2.js";export{An as Field,ti as FieldContent,at as FieldDescription,ri as FieldError,En as FieldGroup,Ln as FieldLabel,Lt as FieldLegend,oi as FieldSeparator,At as FieldSet,ni as FieldTitle};
@@ -1 +1 @@
1
- import{an}from"../chunk-qpc4ca5y.js";import"../chunk-ncekagm6.js";export{an as InputGroupTextarea};
1
+ import{ln}from"../chunk-sbyn62qx.js";import"../chunk-ncekagm6.js";export{ln as InputGroupTextarea};
@@ -1 +1 @@
1
- import{nr,on,rn,Ti}from"../chunk-7h8pv9eg.js";import{an}from"../chunk-qpc4ca5y.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";export{nr as InputGroup,on as InputGroupAddon,rn as InputGroupButton,Ti as InputGroupText,an as InputGroupTextarea};
1
+ import{or,an,sn,Ii}from"../chunk-ks05sstp.js";import{ln}from"../chunk-sbyn62qx.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";export{or as InputGroup,an as InputGroupAddon,sn as InputGroupButton,Ii as InputGroupText,ln as InputGroupTextarea};
package/dist/ui/kbd.js CHANGED
@@ -1 +1 @@
1
- import{Go,yi}from"../chunk-7a6t282a.js";export{Go as Kbd,yi as KbdGroup};
1
+ import{Go,bi}from"../chunk-cy6grsx0.js";export{Go as Kbd,bi as KbdGroup};
@@ -1 +1 @@
1
- import{j,I}from"../chunk-5m4605a3.js";export{j as RadioGroup,I as RadioGroupItem};
1
+ import{j,P}from"../chunk-ana59z25.js";export{j as RadioGroup,P as RadioGroupItem};
package/dist/ui/select.js CHANGED
@@ -1 +1 @@
1
- import{Nt,jr,Mt,Rt,hn,Kr,Z,Qr,Sr,Ir}from"../chunk-hrsz92yq.js";export{Nt as Select,hn as SelectContent,jr as SelectGroup,Z as SelectItem,Kr as SelectLabel,Ir as SelectScrollDownButton,Sr as SelectScrollUpButton,Qr as SelectSeparator,Rt as SelectTrigger,Mt as SelectValue};
1
+ import{Nt,Kr,Mt,Rt,xn,Qr,Z,Xr,Sr,Pr}from"../chunk-xd5rqbwp.js";export{Nt as Select,xn as SelectContent,Kr as SelectGroup,Z as SelectItem,Qr as SelectLabel,Pr as SelectScrollDownButton,Sr as SelectScrollUpButton,Xr as SelectSeparator,Rt as SelectTrigger,Mt as SelectValue};
@@ -1 +1 @@
1
- import{bi,ye,be,we}from"../chunk-wb3zpzk3.js";export{ye as Tooltip,we as TooltipContent,bi as TooltipProvider,be as TooltipTrigger};
1
+ import{wi,ye,be,we}from"../chunk-hw99hhjf.js";export{ye as Tooltip,we as TooltipContent,wi as TooltipProvider,be as TooltipTrigger};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwith/module-chat",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,2 +0,0 @@
1
- var wi=1e6,ki=5000000;function Jo(_,e){return _+e>5000000}function Ci(_){return(_/1e6).toFixed(1)}var oe=5;
2
- export{wi,ki,Jo,Ci,oe};
@@ -1,2 +0,0 @@
1
- import{createContext as t,useContext as o}from"react";var en=t(null);function wr(){let e=o(en);if(e===null)throw Error("Composer is missing");return e}
2
- export{en,wr};
@@ -1,3 +0,0 @@
1
- import{q,V}from"./chunk-cke0v0a7.js";import{e}from"./chunk-6kn920c5.js";import{d,u,b,X,m,w}from"./chunk-17zegmxa.js";import{l}from"./chunk-1hy64ewz.js";import{Nt,Mt,Rt,hn,Z}from"./chunk-hrsz92yq.js";import{ce}from"./chunk-xxkdv1zf.js";import{p,s,r}from"./chunk-5fgakrmr.js";import{le,U,L}from"./chunk-d84cxw1v.js";import{sessionGroup as _}from"@nyssance/codex-acp-v2/client";import{cn as fe}from"cn";import{ArchiveIcon as ve,FolderIcon as Y,ListFilterIcon as ge,SearchIcon as xe,Trash2Icon as ee}from"lucide-react";import{useEffect as Se,useRef as ye,useState as f}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function te({className:v,...n}){return i(hn,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...n,className:fe("max-w-(--available-width) min-w-0 p-1",v)})}function z(v){return v instanceof Error?v.message:String(v)}function Le({children:v}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:v})})}function ur({Scroll:v=Le}){let{t:n,i18n:B}=p(),g=s(),C=r((t)=>t.archivedSessions),A=r((t)=>t.connection),[H,se]=f(""),[k,ie]=f("all"),[x,re]=f("all"),[ne,ae]=f(0),[O,G]=f(!0),[F,K]=f(null),[Q,R]=f(null),[I,j]=f(!1),S=ye(!1),[P,y]=f(null),[W,T]=f(null),[oe,J]=f(!1);Se(()=>{if(A!=="ready")return;let t=!1;G(!0),K(null);async function h(){try{await g.listArchived({reset:!0});let o=new Set;while(!t&&g.state.archivedCursor!==null){let N=g.state.archivedCursor;if(o.has(N))throw Error("Archive pagination returned a repeated cursor");o.add(N),await g.listArchived()}}catch(o){if(!t)K(z(o))}finally{if(!t)G(!1)}}return h(),()=>{t=!0}},[g,A,ne]);let c=r((t)=>t.projectContext),E=!(c!==null&&A==="ready"&&!O&&F===null)||I,D=(t)=>t.title??n("sessionList.untitled"),de=[...new Set(C.filter((t)=>c&&_(c,t).id!==L).map((t)=>c?_(c,t).id:t.cwd))].toSorted(),ue=H.trim().toLocaleLowerCase(B.language),M=C.filter((t)=>{let h=c?_(c,t).id:null,o=h===L;return D(t).toLocaleLowerCase(B.language).includes(ue)&&(k==="all"||(k==="quick"?o:!o))&&(x==="all"||(x==="quick"?o:h===x))}),me=new Intl.DateTimeFormat(B.language,{dateStyle:"medium",timeStyle:"short"});async function pe(t){if(S.current)return;S.current=!0,j(!0),R(null);try{await g.unarchive(t.sessionId)}catch(h){R(z(h))}finally{S.current=!1,j(!1)}}async function he(){if(S.current||!P)return;S.current=!0,j(!0),T(null);let t=[],h=[];try{for(let o of P){if(!g.state.archivedSessions.some((N)=>N.sessionId===o.sessionId))continue;try{await g.delete(o.sessionId)}catch(N){t.push(o),h.push(`${D(o)}: ${z(N)}`)}}if(t.length)y(t),T(h.join(`
2
- `));else y(null)}finally{S.current=!1,j(!1)}}return a("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":n("sessionList.archives.title"),children:[a("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[a("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[i("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:n("sessionList.archives.title")}),a(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:E||C.length===0,onClick:()=>{T(null),J(!0),y([...C])},children:[i(ee,{"aria-hidden":"true"}),n("sessionList.archives.deleteAll")]})]}),a("div",{className:"flex shrink-0 flex-wrap gap-3",children:[a("div",{className:"relative min-w-48 flex-1",children:[i(xe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(l,{"aria-label":n("sessionList.archives.search"),placeholder:n("sessionList.archives.search"),value:H,onChange:(t)=>se(t.target.value),className:"rounded-md ps-9"})]}),a(Nt,{value:k,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");ie(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(ge,{"aria-hidden":"true"}),i(Mt,{children:n(`sessionList.archives.${k==="all"?"allChats":k==="quick"?"quickChats":"projectChats"}`)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allChats")}),i(Z,{value:"quick",children:n("sessionList.archives.quickChats")}),i(Z,{value:"project",children:n("sessionList.archives.projectChats")})]})]}),a(Nt,{value:x,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");re(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(Y,{"aria-hidden":"true"}),i(Mt,{className:"truncate",children:x==="all"?n("sessionList.archives.allProjects"):x==="quick"?n("sessionList.archives.noProject"):U(x,c??void 0)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allProjects")}),i(Z,{value:"quick",children:n("sessionList.archives.noProject")}),de.map((t)=>i(Z,{value:t,title:t,children:U(t,c??void 0)},t))]})]})]}),a(v,{children:[A!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:n("sessionList.archives.connecting")}):O?a("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(ce,{}),n("sessionList.archives.loading")]}):F?i(q,{variant:"destructive",children:a(V,{className:"flex items-center justify-between gap-4",children:[i("span",{children:F}),i(e,{variant:"outline",onClick:()=>ae((t)=>t+1),children:n("sessionList.archives.retry")})]})}):C.length===0?a("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(ve,{"aria-hidden":"true",className:"size-8"}),i("p",{children:n("sessionList.archives.empty")})]}):M.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:n("sessionList.archives.noResults")}):(c?le(M,c):[]).filter(([,t])=>t.length>0).map(([t,h])=>a("section",{className:"flex flex-col gap-3",children:[a("div",{className:"flex items-center justify-between gap-3",children:[a("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===L?void 0:t,children:[i(Y,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===L?n("sessionList.archives.noProject"):U(t,c??void 0)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:n("sessionList.archives.count",{count:h.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:h.map((o)=>a("article",{"aria-label":D(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[a("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:D(o),children:D(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:n("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:me.format(new Date(o.updatedAt))})]}),a("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":n("sessionList.delete"),title:n("sessionList.delete"),disabled:E,className:"text-muted-foreground hover:text-destructive",onClick:()=>{T(null),J(!1),y([o])},children:i(ee,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:E,onClick:()=>void pe(o),children:n("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),Q&&i(q,{variant:"destructive",children:i(V,{children:Q})})]})]}),i(d,{open:P!==null,onOpenChange:(t)=>{if(!t&&!S.current)y(null)},children:a(u,{showCloseButton:!I,children:[a(b,{children:[i(m,{children:n("sessionList.archives.deleteTitle")}),i(w,{children:n(oe?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:P?.length??0})})]}),W&&i(q,{variant:"destructive",children:i(V,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:W})}),a(X,{children:[i(e,{variant:"outline",disabled:I,onClick:()=>y(null),children:n("sessionList.cancel")}),a(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:E,onClick:()=>void he(),children:[I&&i(ce,{}),n("sessionList.archives.confirmDelete")]})]})]})})]})}
3
- export{ur};
@@ -1,3 +0,0 @@
1
- import{Ft,Bt}from"./chunk-93x6b2qa.js";import{g}from"./chunk-5kpcpjrb.js";import{t}from"./chunk-dp8pjv6r.js";import{fo,G,Ee,vo}from"./chunk-m6rrt94g.js";import{io}from"./chunk-0d4xsx23.js";import{ee}from"./chunk-jhk2chpp.js";import{jt}from"./chunk-q905xt4v.js";import{uo}from"./chunk-r79zqx0t.js";import{So}from"./chunk-b4dsjhkq.js";import{Io}from"./chunk-m99k3e5h.js";import{Gt,Wt}from"./chunk-91x8etvh.js";import{Re}from"./chunk-c0ac9k7h.js";import{codexMessageError as J,codexTurnError as q,isContentEntry as oe,isEmbeddedResource as U,isImage as X,isResourceLink as ae,isText as me,nativeTurnId as le}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as de,SparklesIcon as ce}from"lucide-react";import{Fragment as ge,memo as pe}from"react";import{jsx as s,jsxs as m,Fragment as R}from"react/jsx-runtime";function D(r){if(X(r))return`${r.mimeType.toLowerCase()}:${r.data}`;if(U(r)&&"blob"in r.resource&&r.resource.mimeType?.toLowerCase().startsWith("image/"))return`${r.resource.mimeType.toLowerCase()}:${r.resource.blob}`;return null}function T({sessionId:r,entry:n,terminals:l,streaming:o,streamingThoughtId:w}){let{t:a}=t();switch(n.kind){case"activity":return s(io,{sessionId:r,items:n.items,terminals:l,streamingThoughtId:w});case"text":return g(n.item._meta).length>0?s(jt,{sessionId:r,item:n.item}):s(ee,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(So,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(Gt,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return m("div",{className:"codex-context-compaction",children:[s(ce,{"aria-hidden":"true"}),s("span",{children:n.item.status==="completed"?a("stream.codex.contextCompacted"):n.item.status==="cancelled"?a("timeline.interrupted"):a("timeline.compacting")})]})}}function ue({sessionId:r,turn:n,terminals:l,active:o,blocked:w=!1,continued:a=!1,edits:S=n.edits,activityItems:_=n.items,workStartedAt:Y=n.startedAt,isLast:F,error:u,interrupted:M,retry:L,retrying:p,answerActions:W,footer:Z}){let{t:d}=t(),I=n.errors.map((e)=>{let i=J(e);if(i===null)throw Error("Turn error item is missing its diagnostics");let k=L?.turnId===le(e)?L:void 0;return s(Wt,{error:i,retry:k},`${e.id}:${k?.delaySeconds??"manual"}`)});if(F&&u!==null&&!n.errors.some((e)=>{let i=J(e);return i!==null&&i.stopReason===u.stopReason&&q(i).message===q(u).message}))I.push(s(Wt,{error:u},"current-run-error"));let v=I.length>0?s("div",{className:"codex-turn-errors",children:I}):null,f=n.work,y=f.length>0&&f.every((e)=>e.kind==="compaction");if(fo(n)||y&&n.final.length===0)return m(R,{children:[s("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),v]});let K=Ee(n),O=n.final.filter((e)=>g(e._meta).length===0).map(G).join(`
2
- `),h=o?null:Re(n,"assistant"),P=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),B=new Set(n.final.flatMap((e)=>e.content.map(D).filter((i)=>i!==null))),N=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(oe).flatMap((i,k)=>{let c=i.content,ie=e.name==="image_generation"&&X(c),re=e.toolKind!=="read"&&e.toolKind!=="search"&&(ae(c)||U(c)&&("blob"in c.resource));if(!ie&&!re)return[];let b=D(c);if(b!==null){if(B.has(b))return[];B.add(b)}return[{key:`${e.id}:${k}`,block:c}]})}),A=n.final.some((e)=>g(e._meta).length===0&&e.content.some((i)=>!me(i)||i.text.trim().length>0)),te=P.length>0||N.length>0||y||A||n.final.some((e)=>g(e._meta).length>0),x=n.items.findIndex((e)=>n.final.includes(e)),C=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),H=f.filter((e)=>x===-1||C(e)<x),ne=f.filter((e)=>x!==-1&&C(e)>x),se=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...ne.map((e)=>({kind:"work",entry:e,index:C(e)}))].toSorted((e,i)=>e.index-i.index),Q=!o&&!a&&(O.trim().length>0?s(Ft,{text:O,isMostRecentTurn:F,time:h,afterCopy:W}):m("div",{className:"flex items-center gap-0.5",children:[W,h&&s("span",{className:"codex-user-time ms-1",title:h.full,children:h.short})]})),E=Io({...n,items:_},{running:o,blocked:w,retrying:p!==void 0}),V=E.kind==="reasoning"?E.ownerKey??null:null,j=E.kind==="thinking",z=vo({...n,items:_});return m(R,{children:[s(Bt,{stateKey:JSON.stringify([r,n.replayed?"history":"live",n.key]),active:o&&!A,defaultExpanded:o&&!A||!n.replayed&&(M||K),...z,startedAt:z.startedAt??Y,loading:j&&n.work.length===0,work:a||y?[]:H.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:o,streamingThoughtId:V},e.key)),answer:te||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||y)&&H.map((e)=>s(T,{sessionId:r,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),se.map((e)=>{if(e.kind==="work")return s(T,{sessionId:r,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:V},e.entry.key);let i=e.item;return m(ge,{children:[g(i._meta).length>0?s(jt,{sessionId:r,item:i}):s(ee,{content:i.content,messageId:i.id,streaming:o}),i===n.final.at(-1)&&Q]},i.id)}),P.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":d(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&s(de,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),N.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:N.map((e)=>s(ee,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&Q]}):null,footer:m(R,{children:[j&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:d("message.thinking")})}),Z,S.length>0&&!o&&!a&&s(uo,{items:S}),M&&!K&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&v]})}),o&&p!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:p.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(p.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():p.message}),o&&v]})}var ro=pe(ue);
3
- export{ro};
@@ -1,2 +0,0 @@
1
- import{useCallback as r,useState as x}from"react";var t=new Map;function S(o,e,k=!1){let[p,d]=x(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||k&&!t.has(o)&&n!==e)n=t.get(o)??e,d({key:o,expanded:n});let b=r((c)=>{d((s)=>{let f=s.key===o?s.expanded:t.get(o)??e,a=typeof c==="function"?c(f):c;return t.set(o,a),s.key===o?{key:o,expanded:a}:s})},[o,e]);return[n,b]}
2
- export{S};
@@ -1,2 +0,0 @@
1
- import{_n,me,Dt,Hn,On,Fn}from"./chunk-0gwe31zs.js";import{forwardRef as ve,useCallback as K,useEffect as ge,useImperativeHandle as pe,useLayoutEffect as w,useMemo as ne,useRef as s,useState as F}from"react";import{jsx as R,jsxs as re}from"react/jsx-runtime";var Re=12,X=2,V=800,he=new Map;function He({turnKey:q,heightPx:x,placeholder:W=!1,deferUntilReady:n=!1,observe:H,onReady:L,children:z}){let h=s(null),[T,_]=F(!1),U=K((m)=>{h.current=m,H(q,m)},[H,q]);return w(()=>{let m=h.current;if(m===null)throw Error("Codex turn element is missing");let b=()=>{L(m),_(!0)};if(m.querySelector("[data-markdown-pending]")===null){b();return}let d=new MutationObserver(()=>{if(m.querySelector("[data-markdown-pending]")!==null)return;d.disconnect(),b()});return d.observe(m,{childList:!0,subtree:!0}),()=>d.disconnect()},[L]),re("div",{style:T?void 0:{position:"relative",height:x,overflow:"hidden"},children:[R("div",{ref:U,className:"[&_[data-virtualized-turn-content]]:[content-visibility:visible]","data-turn-key":q,"aria-busy":!T||void 0,style:!T&&!W&&n?{visibility:"hidden"}:void 0,"data-turn-ready":T?"":void 0,children:z}),!T&&!W&&n&&R("div",{"aria-hidden":"true",className:"codex-turn-loading",children:re("div",{className:"codex-turn-loading-lines",children:[R("span",{}),R("span",{}),R("span",{})]})})]})}var Dn=ve(function({entries:x,renderTurn:W,scrollElement:n,sessionKey:H,leadingContent:L,leadingInsetPx:z=0,preserveViewport:h=!1},T){let _=s(null),[U,m]=F(z),b=L!==void 0&&L!==null;w(()=>{let e=_.current;if(e===null)return;let t=()=>m(e.getBoundingClientRect().height);t();let o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[b]);let d=ne(()=>he.get(H),[H]),[j,J]=F(()=>d?.turnHeightsByKey??{}),i=ne(()=>_n({entries:x,gapPx:Re,measuredHeightsByKey:j,leadingInsetPx:b?U:z}),[x,j,b,U,z]),fe=ne(()=>{let e=me({distanceFromBottomPx:d?.distanceFromBottomPx??0,layout:i,overscanCount:X,viewportHeightPx:V}),t=d?.renderedWindow;if(t===void 0||t===null)return e;return Dt({anchorKey:t.anchorKey,layout:i,previousRange:{startIndex:0,endIndex:Math.min(t.count,e.endIndex-e.startIndex)}})??e},[d,i]),[M,ie]=F(fe),[y,oe]=F(V),[c,ue]=F(null),N=s(d?.distanceFromBottomPx??0),k=s(M),ae=s(i.turnKeys),l=s(j),S=s(i),se=s(i),P=s(new Map),v=s(null),C=s(null),E=s(null),D=s(new Map),Q=s(!1),ce=s(()=>{}),O=s(null),de=K(()=>{if(!h||n===null||v.current!==null||O.current!==null)return;let e=n.getBoundingClientRect();if(e.height<=0)return;let t=[...P.current].filter(([,r])=>r.hasAttribute("data-turn-ready")).map(([r,u])=>{let a=u.getBoundingClientRect(),g=S.current.turnIndexByKey.get(r),B=g===void 0?a.height:S.current.heightsPx[g];return{key:r,element:u,rect:a,bottom:a.top+B}}).filter(({rect:r,bottom:u})=>u>e.top&&r.top<e.bottom).toSorted((r,u)=>r.rect.top-u.rect.top),o=t.flatMap((r)=>[...r.element.querySelectorAll("[data-user-message-bubble], .codex-markdown-root > *")].filter((u)=>!u.closest('[aria-hidden="true"], [inert]')).map((u)=>({key:r.key,element:u,rect:u.getBoundingClientRect()})).filter(({rect:u})=>u.height>0&&u.top>=e.top&&u.top<e.bottom)).toSorted((r,u)=>r.rect.top-u.rect.top)[0]??t[0];if(o)O.current={key:o.key,element:o.element,top:o.rect.top-e.top,scrollTop:n.scrollTop}},[h,n]),Y=s(de);Y.current=de;let p=K((e,t)=>{let o=Math.min(e,i.totalHeightPx),r=me({distanceFromBottomPx:o,layout:i,overscanCount:X,viewportHeightPx:t}),u=k.current,a=u.startIndex<=r.startIndex&&u.endIndex>=r.endIndex?u:r;if(N.current=o,k.current=a,ae.current=i.turnKeys,oe(t),a!==u)ie(a)},[i]),A=K((e)=>{let t=Math.max(0,e.scrollHeight-i.totalHeightPx);return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop-t)},[i.totalHeightPx]),xe=K((e)=>{let t=e.dataset.turnKey;if(t===void 0)throw Error("Codex measured turn is missing its key");let o=Math.max(1,e.getBoundingClientRect().height);if(l.current[t]===o)return;Y.current();let r={...l.current,[t]:o};l.current=r,J(r)},[]),Z=K(()=>{if(C.current!==null)return C.current;return C.current=new ResizeObserver((e)=>{for(let t of e){let o=t.target;if(!("turnReady"in o.dataset)&&o.querySelector("[data-markdown-pending]")!==null)continue;let r=o.dataset.turnKey;if(r===void 0)throw Error("Codex measured turn is missing its key");let u=Math.max(1,t.borderBoxSize[0]?.blockSize??t.contentRect.height);D.current.set(r,u)}if(E.current!==null||D.current.size===0)return;E.current=requestAnimationFrame(()=>{E.current=null;let t=[...D.current].filter(([r,u])=>l.current[r]!==u);if(D.current.clear(),t.length===0)return;Y.current();let o={...l.current,...Object.fromEntries(t)};l.current=o,J(o)})}),C.current},[]),ye=K((e,t)=>{let o=P.current.get(e);if(o!==void 0)Z().unobserve(o),P.current.delete(e);if(t===null)return;if(t.dataset.turnKey!==e)throw Error(`Codex turn key does not match its element: ${e}`);P.current.set(e,t),Z().observe(t)},[Z]);ge(()=>()=>{if(C.current?.disconnect(),E.current!==null)cancelAnimationFrame(E.current);D.current.clear(),C.current=null,P.current.clear()},[]),w(()=>{ce.current=()=>{if(n===null)return;let e=A(n);if(v.current!==null){N.current=e,oe(n.clientHeight||V);return}p(e,n.clientHeight||V)}},[A,n,p]),w(()=>{if(n===null)return;if(!Q.current){Q.current=!0;let o=d?.distanceFromBottomPx??0;n.scrollTo({behavior:"instant",top:Math.max(0,o>0?S.current.totalHeightPx-n.clientHeight-o:n.scrollHeight-n.clientHeight)})}let e=()=>ce.current();e(),n.addEventListener("scroll",e,{passive:!0});let t=new ResizeObserver(e);return t.observe(n),()=>{n.removeEventListener("scroll",e),t.disconnect()}},[d,n]),w(()=>{if(n===null||c===null)return;let e=P.current.get(c.turnKey);if(e?.querySelector("[data-markdown-pending]")!==null)return;let t=e.offsetHeight;if(t<=0)return;if(l.current[c.turnKey]!==t){let g={...l.current,[c.turnKey]:t};l.current=g,J(g);return}let o=c.getTargetElement(e)??e,r=e.getBoundingClientRect(),u=o.getBoundingClientRect(),a=Fn({align:c.align,layout:i,targetHeightPx:u.height,targetOffsetPx:u.top-r.top,turnKey:c.turnKey,viewportHeightPx:n.clientHeight});if(a===null)throw Error(`Codex virtual turn is missing: ${c.turnKey}`);n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-a)}),p(a,n.clientHeight||V),queueMicrotask(()=>{if(v.current!==c)return;c.complete(),v.current=null,ue(null)})},[i,c,n,p]),w(()=>{let e=se.current;if(se.current=i,S.current=i,n===null||c!==null){O.current=null;return}let t=O.current;O.current=null;let o=t===null?void 0:n.contains(t.element)?t.element:P.current.get(t.key);if(h&&e!==i&&t!==null&&o!==void 0){let u=o.getBoundingClientRect().top-n.getBoundingClientRect().top,a=n.scrollTop-t.scrollTop;n.scrollTop+=u-t.top+a,p(A(n),n.clientHeight);return}let r=N.current;if(h&&e!==i&&Q.current)r=Math.max(0,e.totalHeightPx-n.clientHeight-n.scrollTop);if((r>24||h)&&e!==i){let u=A(n);if(u<=96&&!h){p(u,y);return}let a=me({distanceFromBottomPx:r,layout:e,overscanCount:0,viewportHeightPx:y}),g=e.turnKeys.slice(a.startIndex,a.endIndex).filter((f)=>i.turnIndexByKey.has(f)),B=g.find((f)=>l.current[f]!==void 0)??g[0];if(B!==void 0){let f=Hn({anchorKey:B,distanceFromBottomPx:r,nextLayout:i,previousLayout:e});if(f===null)throw Error(`Codex viewport anchor is missing: ${B}`);r=f,n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-r)})}}p(r,y)},[i,c,A,n,p,y,h]),w(()=>{k.current=M},[M]),ge(()=>()=>{v.current?.complete(),v.current=null;let e=k.current,o=S.current.turnKeys[e.startIndex];he.set(H,{distanceFromBottomPx:N.current,renderedWindow:o===void 0?null:{anchorKey:o,count:e.endIndex-e.startIndex},turnHeightsByKey:l.current})},[H]),pe(T,()=>({scrollToKey(e,t=(r)=>r,o={align:"center"}){v.current?.complete();let r=i.turnIndexByKey.get(e);if(r===void 0)throw Error(`Codex virtual turn is missing: ${e}`);let u=i.turnKeys[r],a=On({layout:i,turnKey:e,viewportHeightPx:y});if(a===null)throw Error(`Codex virtual turn is missing: ${e}`);let g=me({distanceFromBottomPx:a,layout:i,overscanCount:X,viewportHeightPx:y});return k.current=g,ie(g),new Promise((B)=>{let f={align:o.align,complete:B,getTargetElement:t,turnKey:u};v.current=f,ue(f)})}}),[i,y]);let I=M,G=ae.current;if(!(G===i.turnKeys||G.length===i.turnKeys.length&&G.every((e,t)=>e===i.turnKeys[t]))){let e=G[M.startIndex];I=(e===void 0?null:Dt({anchorKey:e,layout:i,previousRange:M}))??me({distanceFromBottomPx:N.current,layout:i,overscanCount:X,viewportHeightPx:y})}let ee=x.length-1,le=x[ee],te=x.slice(I.startIndex,Math.min(I.endIndex,ee)).map((e,t)=>({entry:e,index:I.startIndex+t}));if(le!==void 0)te.push({entry:le,index:ee});return re("div",{"data-codex-timeline":!0,"data-codex-virtualized-pending-key":c?.turnKey,"data-codex-virtualized-range":`${I.startIndex}:${I.endIndex}`,"data-codex-virtualized-total-count":x.length,"data-codex-virtualized-turn-count":te.length,className:"relative shrink-0",style:{height:i.totalHeightPx},children:[b&&R("div",{ref:_,"data-codex-timeline-leading":!0,className:"absolute inset-x-0 top-0",children:L}),te.map(({entry:e,index:t})=>R("div",{className:"absolute inset-x-0",style:{top:i.topOffsetsPx[t]??0},children:R(He,{turnKey:e.turnKey,heightPx:i.heightsPx[t],placeholder:e.placeholder,deferUntilReady:e.deferUntilReady,observe:ye,onReady:xe,children:W(e,t)})},e.turnKey))]})});
2
- export{Dn};
@@ -1,3 +0,0 @@
1
- import{a,v}from"./chunk-ryz4c13z.js";import{D}from"./chunk-w43dvzqk.js";import{lo}from"./chunk-ynw0f8h2.js";import{W}from"./chunk-w8qmh6he.js";import{ao,Me}from"./chunk-9a4kjze3.js";import{mo}from"./chunk-50qyant6.js";import{$t}from"./chunk-sr5rcdza.js";import{cn as b}from"cn";import{jsx as o,jsxs as g}from"react/jsx-runtime";var R=new WeakMap,w=1;function N(t){if(t.type==="tool_use"||t.type==="subagent"||t.type==="collab")return`${t.type}:${t.id}`;let n=R.get(t);if(n!==void 0)return`${t.type}:${n}`;let s=w++;return R.set(t,s),`${t.type}:${s}`}function P({block:t,streaming:n,actions:s}){if(t.isApiError)return o("div",{className:"codex-stream-error",children:t.text});return g("div",{className:"codex-assistant-message",children:[o(v,{text:t.text,streaming:n}),s]})}function I({block:t,streaming:n,actions:s,renderText:i}){switch(t.type){case"text":return i===void 0?o(P,{block:t,streaming:n,actions:s}):i({block:t,streaming:n,actions:s});case"thinking":return t.thinking.length>0?o(v,{text:t.thinking,streaming:!t.isComplete}):null;case"plan":return o(W,{entries:t.entries});case"image":return o("img",{src:`data:${t.source.media_type};base64,${t.source.data}`,className:"max-h-64 rounded",alt:""});case"tool_use":case"subagent":case"collab":return null}}var E=new Set;function ui({message:t,isMostRecentTurn:n,hiddenTools:s=E,time:i,beforeCopy:r,afterCopy:l,providerIcon:u,renderText:T,renderEditedFiles:y}){if(t.streaming===!0&&t.content.every((e)=>e.type==="text"?e.text.length===0:e.type==="thinking"?e.thinking.length===0:!1))return o(A,{});let C=t.content.filter((e)=>e.type==="text").map((e)=>e.text).join(`
2
- `),B=!t.streaming&&C.trim().length>0?o(Ft,{text:C,isMostRecentTurn:n,beforeCopy:r,afterCopy:l,time:i}):null,d=lo(t.content,"compact"),x=d.reduce((e,c,p)=>c.kind==="codexActivityGroup"?p:e,-1),h=d.findIndex((e,c)=>c>x&&e.kind==="block"&&e.block.type==="text"),M=[...t.content].toReversed().find((e)=>e.type==="text"),f=t.content.filter((e)=>e.type==="tool_use"&&D(e).category==="edit"),k=(e)=>{if(e.kind==="codexActivityGroup"){let c=e.blocks.filter((p)=>p.type!=="tool_use"||!s.has(p.name));return c.length===0?null:o(Me,{blocks:c},`activity:${N(c[0])}`)}if(e.kind!=="block")throw Error(`Codex received an incompatible grouped entry: ${e.kind}`);return o(I,{block:e.block,streaming:Boolean(t.streaming),actions:e.block===M?B:void 0,renderText:T},N(e.block))},m=x===-1?0:h===-1?d.length:h;return o(Bt,{stateKey:t.id,active:Boolean(t.streaming),startedAt:t.startedAt,durationMs:t.durationMs,providerId:t.providerId,providerIcon:u,work:d.slice(0,m).map(k),answer:d.length>m?d.slice(m).map(k):null,footer:x!==-1&&f.length>0&&(y===void 0?o(mo,{blocks:f}):y(f))})}function Ft({text:t,isMostRecentTurn:n=!1,beforeCopy:s,afterCopy:i,time:r}){let l=a(),{t:u}=l;return g("div",{className:b("mt-1.5 flex h-5 w-fit -translate-x-1 items-center justify-start gap-0.5 [&_*]:transition-none",n?"opacity-100":"opacity-0 group-focus-within/am:opacity-100 group-hover/am:opacity-100"),children:[s,o($t,{text:t,label:u("actions.copy"),host:l}),i,r&&o("span",{className:"codex-user-time ms-1",title:r.full,children:r.short})]})}function A(){let{t}=a();return o("div",{className:"codex-pending-message py-2",role:"status",children:o("span",{className:"codex-activity-running",children:t("message.thinking")})})}function Bt({work:t,answer:n,footer:s,loading:i=!1,...r}){if(i)return o(A,{});return g("div",{className:"group/am codex-assistant-turn",children:[t.length>0&&o(ao,{...r,children:t}),n!==null&&(t.length===0?n:o("div",{"data-local-conversation-final-assistant":!0,"data-testid":"codex-final-answer",className:"codex-final-answer",children:n})),s]})}
3
- export{ui,Ft,Bt};
@@ -1,7 +0,0 @@
1
- import{a,v}from"./chunk-ryz4c13z.js";import{zt}from"./chunk-6edz9f7j.js";import{D}from"./chunk-w43dvzqk.js";import{S}from"./chunk-51sbmqdk.js";import{pe,so}from"./chunk-p8nx34zm.js";import{W}from"./chunk-w8qmh6he.js";import{cn as y}from"cn";import{BotIcon as ue,CheckIcon as me,CopyIcon as ge}from"lucide-react";import{Fragment as fe,useEffect as U,useRef as V,useState as R}from"react";import{jsx as n,jsxs as p,Fragment as P}from"react/jsx-runtime";function j(e,t){let[o,i]=R(()=>({key:e,mounted:t})),r=t||o.key===e&&o.mounted;if(o.key!==e||o.mounted!==r)i({key:e,mounted:r});return r}var z=new WeakMap,K=1;function b(e){if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return`${e.type}:${e.id}`;if(e.type==="thinking"&&e.id!==void 0)return`thinking:${e.id}`;let t=z.get(e);if(t!==void 0)return`${e.type}:${t}`;let o=K;return K+=1,z.set(e,o),`${e.type}:${o}`}function L(e){switch(e){case"pending":case"in_progress":return!0;case"completed":case"failed":case"cancelled":case"interrupted":return!1;default:throw Error(`Unknown ACP tool status: ${e}`)}}function Z(e,t){let o=Math.max(0,Math.round(e/1000)),i=Math.floor(o/3600),r=Math.floor(o%3600/60),s=o%60;if(s>=60)r+=Math.floor(s/60),s%=60;if(r>=60)i+=Math.floor(r/60),r%=60;let l=Intl.DurationFormat;if(l)try{return new l(t,{style:"narrow"}).format({hours:i,minutes:r,seconds:i>0?0:s})}catch{}if(i>0)return r>0?`${i}h ${r}m`:`${i}h`;if(r>0)return s>0?`${r}m ${s}s`:`${r}m`;return`${s}s`}var xe="M7.52925 3.7793C7.75652 3.55203 8.10803 3.52383 8.36616 3.69434L8.47065 3.7793L14.2207 9.5293C14.4804 9.789 14.4804 10.211 14.2207 10.4707L8.47065 16.2207C8.21095 16.4804 7.78895 16.4804 7.52925 16.2207C7.26955 15.961 7.26955 15.539 7.52925 15.2793L12.8085 10L7.52925 4.7207L7.44429 4.61621C7.27378 4.35808 7.30198 4.00657 7.52925 3.7793Z";function B({expanded:e,className:t}){return n("svg",{className:y("codex-activity-disclosure",e&&"codex-activity-disclosure-expanded",t),viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:xe})})}function Ce(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.3965 5.01128C16.3963 4.93399 16.3489 4.87691 16.293 4.85406L16.2354 4.84332C13.9306 4.91764 12.5622 5.32101 10.665 6.34722V16.3716C11.3851 15.9994 12.0688 15.7115 12.7861 15.5015C13.8286 15.1965 14.9113 15.0633 16.2402 15.0435L16.2979 15.0308C16.353 15.0063 16.3965 14.9483 16.3965 14.8755V5.01128ZM3.54492 14.8765C3.54492 14.9725 3.62159 15.0422 3.70117 15.0435L4.19629 15.0562C5.94062 15.1247 7.26036 15.4201 8.65918 16.0484C8.05544 15.1706 7.14706 14.436 6.17871 14.1109V14.1099C5.56757 13.9045 5.16816 13.3314 5.16797 12.6988V4.98882C4.86679 4.93786 4.60268 4.8999 4.28223 4.87457L3.72754 4.84429C3.62093 4.84079 3.54505 4.92417 3.54492 5.01226V14.8765ZM17.7266 14.8755C17.7266 15.6314 17.1607 16.2751 16.4121 16.3628L16.2598 16.3736C15.0122 16.3922 14.0555 16.5159 13.1602 16.7779C12.2629 17.0404 11.3966 17.4508 10.3369 18.0738C10.129 18.1959 9.87099 18.1958 9.66309 18.0738C7.71455 16.9283 6.31974 16.4689 4.12988 16.3853L3.68164 16.3736C2.85966 16.3614 2.21484 15.6838 2.21484 14.8765V5.01226C2.21497 4.15391 2.93263 3.4871 3.77246 3.51519L4.39844 3.54937C4.67996 3.57191 4.92258 3.60421 5.16797 3.64214V2.51031C5.16797 1.44939 6.29018 0.645615 7.31055 1.15679L7.31152 1.15582C8.78675 1.89511 10.0656 3.33006 10.5352 4.91461C12.3595 3.98907 13.8688 3.58817 16.1924 3.51324L16.3506 3.51714C17.1285 3.5741 17.7264 4.23496 17.7266 5.01128V14.8755ZM6.49805 12.6988C6.49824 12.7723 6.5442 12.8296 6.60254 12.8492L6.96289 12.9859C7.85245 13.3586 8.68125 13.9846 9.33496 14.7496V5.5816C9.08794 4.37762 8.13648 3.1566 6.95801 2.47613L6.71582 2.34527C6.67779 2.32617 6.6337 2.32502 6.58301 2.35796C6.52946 2.39279 6.49805 2.44863 6.49805 2.51031V12.6988Z"})})}function ye(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M7.33057 1.98535C10.2484 1.98535 12.6136 4.3508 12.6138 7.26855C12.6138 8.58031 12.1346 9.77942 11.3433 10.7031L13.9897 13.3496C14.1655 13.5253 14.1655 13.8106 13.9897 13.9863C13.814 14.1621 13.5288 14.1621 13.353 13.9863L10.7017 11.335C9.78678 12.0942 8.61243 12.5518 7.33057 12.5518C4.41281 12.5516 2.04736 10.1864 2.04736 7.26855C2.04754 4.35091 4.41292 1.98553 7.33057 1.98535ZM7.33057 2.88574C4.90998 2.88592 2.94793 4.84796 2.94775 7.26855C2.94775 9.68929 4.90987 11.6522 7.33057 11.6523C9.75141 11.6523 11.7144 9.6894 11.7144 7.26855C11.7142 4.84786 9.75131 2.88574 7.33057 2.88574Z"})})}function ve(){return p("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:[n("path",{d:"M6.19629 7.86231C6.42357 7.63534 6.7752 7.60692 7.0332 7.77734L7.1377 7.86231L8.80371 9.5293C9.06329 9.78889 9.06307 10.21 8.80371 10.4697L7.1377 12.1367C6.878 12.3964 6.45599 12.3964 6.19629 12.1367C5.93686 11.8771 5.93697 11.456 6.19629 11.1963L7.39258 9.99902L6.19629 8.80371L6.11133 8.69922C5.94087 8.4411 5.96904 8.08955 6.19629 7.86231Z"}),n("path",{d:"M13.4668 11.0156C13.7699 11.0776 13.998 11.3456 13.998 11.667C13.9979 11.9883 13.7698 12.2564 13.4668 12.3184L13.333 12.332H10.833C10.466 12.3319 10.1682 12.034 10.168 11.667C10.168 11.2998 10.4659 11.0021 10.833 11.002H13.333L13.4668 11.0156Z"}),n("path",{d:"M12.6602 2.66504C13.3492 2.66504 13.9062 2.66439 14.3564 2.70117C14.8142 2.73859 15.2201 2.81796 15.5967 3.00977C16.1922 3.31321 16.677 3.79805 16.9805 4.39356C17.1722 4.77014 17.2517 5.17604 17.2891 5.63379C17.3258 6.08402 17.3252 6.64102 17.3252 7.33008V12.6602C17.3252 13.3492 17.3258 13.9062 17.2891 14.3564C17.2516 14.8142 17.1723 15.2201 16.9805 15.5967C16.677 16.1922 16.1922 16.677 15.5967 16.9805C15.2201 17.1723 14.8142 17.2516 14.3564 17.2891C13.9062 17.3258 13.3492 17.3252 12.6602 17.3252H7.33008C6.64102 17.3252 6.08402 17.3258 5.63379 17.2891C5.17604 17.2517 4.77014 17.1722 4.39356 16.9805C3.79805 16.677 3.31321 16.1922 3.00977 15.5967C2.81796 15.2201 2.73859 14.8142 2.70117 14.3564C2.66439 13.9062 2.66504 13.3492 2.66504 12.6602V7.33008C2.66504 6.64101 2.66439 6.08402 2.70117 5.63379C2.73858 5.17601 2.81797 4.77016 3.00977 4.39356C3.31321 3.79802 3.79802 3.31321 4.39356 3.00977C4.77016 2.81797 5.17601 2.73858 5.63379 2.70117C6.08402 2.66439 6.64101 2.66504 7.33008 2.66504H12.6602ZM7.33008 3.99512C6.61907 3.99512 6.1257 3.99601 5.74219 4.02734C5.3665 4.05804 5.15508 4.11481 4.99707 4.19531C4.65183 4.37124 4.37124 4.65183 4.19531 4.99707C4.11481 5.15508 4.05805 5.3665 4.02734 5.74219C3.99601 6.1257 3.99512 6.61908 3.99512 7.33008V12.6602C3.99512 13.3711 3.99601 13.8646 4.02734 14.248C4.05805 14.6237 4.11481 14.8352 4.19531 14.9932C4.37124 15.3384 4.65186 15.619 4.99707 15.7949C5.15507 15.8754 5.36654 15.9322 5.74219 15.9629C6.1257 15.9942 6.61908 15.9951 7.33008 15.9951H12.6602C13.3711 15.9951 13.8646 15.9942 14.248 15.9629C14.6237 15.9322 14.8352 15.8754 14.9932 15.7949C15.3384 15.619 15.619 15.3384 15.7949 14.9932C15.8754 14.8352 15.9322 14.6237 15.9629 14.248C15.9942 13.8646 15.9951 13.3711 15.9951 12.6602V7.33008C15.9951 6.61908 15.9942 6.1257 15.9629 5.74219C15.9322 5.36654 15.8754 5.15507 15.7949 4.99707C15.619 4.65186 15.3384 4.37124 14.9932 4.19531C14.8352 4.11481 14.6237 4.05805 14.248 4.02734C13.8646 3.99601 13.3711 3.99512 12.6602 3.99512H7.33008Z"})]})}function he(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M11.3312 4.20472C12.7488 2.92391 14.9377 2.96644 16.3039 4.33265L16.4318 4.46742C17.6713 5.8393 17.6713 7.93343 16.4318 9.30531L16.3039 9.44007L10.0119 15.7311C9.68839 16.0546 9.45384 16.2917 9.22185 16.4821L8.98748 16.6588C8.78233 16.799 8.56429 16.9196 8.33709 17.0192L8.10759 17.1119C7.92582 17.1785 7.73843 17.2266 7.52166 17.2711L6.75701 17.4069L4.36345 17.8053C4.22059 17.8291 4.06914 17.8552 3.9406 17.8649C3.84183 17.8723 3.70833 17.875 3.56267 17.8395L3.41423 17.7907C3.19121 17.695 3.00747 17.5271 2.89177 17.316L2.84588 17.2223C2.75958 17.0209 2.76174 16.8276 2.77166 16.6959C2.78136 16.5674 2.80742 16.4159 2.83123 16.2731L3.22966 13.8795L3.36443 13.1149C3.40899 12.898 3.45795 12.7108 3.52459 12.5289L3.61736 12.2985C3.71691 12.0715 3.83772 11.854 3.97771 11.6491L4.15349 11.4147C4.34392 11.1825 4.58171 10.9484 4.90545 10.6246L11.1965 4.33265L11.3312 4.20472ZM5.84588 11.5651C5.49671 11.9142 5.31258 12.0998 5.1867 12.2526L5.07537 12.3991C4.98194 12.5358 4.90157 12.6812 4.83513 12.8327L4.77361 12.9869C4.73328 13.0971 4.70248 13.2125 4.66814 13.3815L4.54119 14.0983L4.14275 16.4918L4.14177 16.4938H4.1447L6.53826 16.0944L7.25505 15.9684C7.42406 15.9341 7.53946 15.9033 7.64959 15.8629L7.80291 15.8014C7.95461 15.7349 8.09953 15.6538 8.2365 15.5602L8.38396 15.4498C8.53674 15.3239 8.72231 15.1398 9.07146 14.7907L14.0588 9.80238L10.8332 6.57679L5.84588 11.5651ZM15.3635 5.27308C14.5281 4.43776 13.2058 4.38573 12.3097 5.11683L12.1369 5.27308L11.7736 5.63636L15.0002 8.86195L15.3635 8.49964L15.5197 8.32581C16.2015 7.48961 16.2015 6.28311 15.5197 5.44691L15.3635 5.27308Z"})})}function J(){return n("svg",{className:"codex-activity-icon",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:n("path",{d:"M16.8347 7.91699C16.8347 7.76279 16.8266 7.61021 16.8123 7.45996L15.4705 8.80371C14.2903 9.98388 12.3762 9.98388 11.1961 8.80371C10.016 7.62352 10.0159 5.70942 11.1961 4.5293L12.5378 3.18652C12.3885 3.17238 12.237 3.16505 12.0837 3.16504C9.45947 3.16504 7.33179 5.29272 7.33179 7.91699C7.33184 8.56608 7.46162 9.18329 7.69605 9.74512C7.79981 9.9939 7.74311 10.2811 7.5525 10.4717L3.59547 14.4287C3.0498 14.9744 3.04991 15.8586 3.59547 16.4043L3.70191 16.501C4.25076 16.9483 5.05957 16.9158 5.57105 16.4043L9.52906 12.4473L9.60426 12.3828C9.79018 12.2455 10.0369 12.2131 10.2546 12.3037C10.8166 12.5382 11.4345 12.668 12.0837 12.668C14.7078 12.6678 16.8345 10.541 16.8347 7.91699ZM18.1648 7.91699C18.1646 11.2755 15.4423 13.9979 12.0837 13.998C11.4151 13.998 10.7708 13.8886 10.1677 13.6885L6.51246 17.3457C5.51389 18.3443 3.93332 18.406 2.86207 17.5322L2.65504 17.3457C1.58992 16.2806 1.58992 14.5534 2.65504 13.4883L6.31031 9.83203C6.1104 9.22921 6.00175 8.58526 6.00172 7.91699C6.00172 4.55818 8.72494 1.83496 12.0837 1.83496C12.7838 1.835 13.458 1.95316 14.0857 2.17188L14.1638 2.20508C14.3404 2.29325 14.4697 2.45713 14.5144 2.65234C14.5653 2.87533 14.4984 3.10876 14.3367 3.27051L12.1375 5.4707C11.4767 6.13148 11.4767 7.20251 12.1375 7.86328C12.7983 8.52373 13.8694 8.52395 14.53 7.86328L16.7293 5.66309L16.7937 5.60742C16.9499 5.48687 17.1532 5.44067 17.3484 5.48535C17.5714 5.53648 17.7526 5.69898 17.8279 5.91504C18.0466 6.54272 18.1648 7.21689 18.1648 7.91699Z"})})}function ee({block:e}){if(e.type!=="tool_use")return null;if(O(e))return n(J,{});let t=D(e).category;if(t==="read")return n(Ce,{});if(t==="search"||t==="fetch")return n(ye,{});if(t==="execute")return n(ve,{});if(t==="edit")return n(he,{});return n(J,{})}function A(e,t){let o=e.rawInput[t];return typeof o==="string"&&o.length>0?o:void 0}function we(e){return D(e).target}function G(e){return e.name==="mcp"||e.name.startsWith("mcp__")||e.name.startsWith("mcp_")}function O(e){return G(e)||e.name==="dynamic_tool"}function te(e,t){let{category:o}=D(e),i=we(e),r=L(e.status);if(O(e))return{leading:e.title};if(o==="execute"){let s=A(e,"command")?.split(`
2
- `)[0]??i;return s?{leading:t(r?"stream.codex.running":"stream.codex.ran"),trailing:s}:{leading:t(r?"stream.codex.runningCommand":"stream.codex.ranCommandGeneric")}}if(o==="search"){let s=A(e,"pattern")??A(e,"query")??i;return s?{leading:t(r?"stream.codex.searching":"stream.codex.searched"),trailing:t("stream.codex.forDetail",{detail:s})}:{leading:t(r?"stream.codex.searchingFiles":"stream.codex.searchedFiles")}}if(o==="fetch"){let s=A(e,"query")??A(e,"url")??i;return s?{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb"),trailing:t("stream.codex.forDetail",{detail:s})}:{leading:t(r?"stream.codex.searchingWeb":"stream.codex.searchedWeb")}}if(o==="read")return i?{leading:t("stream.codex.readLabel"),trailing:i}:{leading:t("stream.codex.readFiles")};if(o==="edit")return i?{leading:t(r?"stream.codex.editingLabel":"stream.codex.editedLabel"),trailing:i}:{leading:t(r?"stream.codex.editingFiles":"stream.codex.editedFiles")};if(o==="delete")return i?{leading:t(r?"stream.codex.deletingLabel":"stream.codex.deletedLabel"),trailing:i}:{leading:t(r?"stream.codex.deletingFiles":"stream.codex.deletedFiles")};if(o==="move")return i?{leading:t(r?"stream.codex.movingLabel":"stream.codex.movedLabel"),trailing:i}:{leading:t(r?"stream.codex.movingFiles":"stream.codex.movedFiles")};return{leading:e.title}}function be(e,t){let o=te(e,t);return o.trailing===void 0?o.leading:`${o.leading} ${o.trailing}`}function Le(e){return e.map((t)=>{if(t.type!=="content")return"";let o=t.content;return o.type==="text"?o.text:""}).filter(Boolean).join(`
3
- `).trim()}function Ne(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let o=t.content;return o.type==="image"?[{data:o.data,mimeType:o.mimeType}]:[]})}function Te(e){return e.flatMap((t)=>{if(t.type!=="content")return[];let o=t.content;return o.type==="audio"?[{data:o.data,mimeType:o.mimeType}]:[]})}function $e(e){if(typeof e==="string"&&e.length>0)return e;return}function ke(e){return e.type==="diff"}function Ae(e){let t=e.content.find(ke);if(t===void 0)return;return t.changes.map((o)=>`${o.operation} ${o.path}`).join(`
4
- `)}function ne(e){let t=$e(e.rawOutput);if(t!==void 0)return t;let o=Le(e.content);if(o.length>0)return o;return Ae(e)}function Be({block:e,command:t}){let{t:o,Output:i,commandStatus:r}=a(),[s,l]=R(!1),[c,u]=R(!1),m=ne(e),d=r===void 0?e.exitCode===void 0?void 0:o("stream.codex.exitCode",{code:e.exitCode}):r(e),g=()=>{navigator.clipboard.writeText([`$ ${t}`,m].filter((f)=>f!==void 0).join(`
5
- `)),l(!0),setTimeout(()=>l(!1),1500)};return n("div",{className:"codex-command-details",children:p("div",{className:"codex-command-card",children:[p("div",{className:"codex-command-line-row",children:[n("span",{className:"codex-command-prompt","aria-hidden":"true",children:"$"}),n("button",{type:"button",className:y("codex-command-line",!c&&"codex-command-line-clamped"),"data-codex-disclosure":"","aria-expanded":c,onClick:()=>u((f)=>!f),children:t}),n("button",{type:"button",className:"codex-command-copy","aria-label":o("actions.copy"),onClick:g,children:s?n(me,{}):n(ge,{})})]}),m!==void 0&&(i===void 0?n("pre",{className:"codex-command-output",children:m}):n(i,{text:m})),d!==void 0&&n("div",{className:"codex-command-footer",children:n("span",{className:"codex-command-status",children:d})})]})})}function ae({block:e}){let{t,openLink:o,Patch:i,openImage:r,commandStatus:s,expandToolOutput:l=!1}=a(),c=ne(e),u=i===void 0?void 0:e.content.flatMap((x)=>{if(x.type!=="diff")return[];let k=x;return k.patch?.text?[k.patch.text]:[]}).join(`
6
- `),m=Ne(e.content),d=Te(e.content),[g,f]=S(`tool:${e.id}`,!1),T=j(`tool:${e.id}`,g),h=D(e),w=h.category,C=te(e,t),I=w==="execute"?A(e,"command"):void 0,N=I!==void 0||O(e)||m.length>0||d.length>0||Boolean(u)||l&&c!==void 0,M=!N&&!L(e.status)?h.filePath:void 0;if(w==="execute"&&!L(e.status)&&e.status!=="completed"){let x=s?.(e);if(x)C={...C,leading:x}}if(w==="read"&&L(e.status))return null;let E=p("span",{className:"codex-activity-label",children:[n(ee,{block:e}),n("span",{className:"min-w-0 flex-1 truncate",children:L(e.status)?n("span",{className:"codex-activity-running",children:C.trailing===void 0?C.leading:`${C.leading} ${C.trailing}`}):p(P,{children:[n("span",{className:"codex-activity-leading",children:C.leading}),C.trailing!==void 0&&(M!==void 0?p(P,{children:[" ",n("button",{type:"button",className:"codex-activity-trailing codex-activity-file-link",title:M,onClick:()=>o(M),children:C.trailing})]}):p("span",{className:"codex-activity-trailing",children:[" ",C.trailing]}))]})})]});return p("div",{className:"codex-activity-item",children:[N?p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-label":C.trailing===void 0?C.leading:`${C.leading} ${C.trailing}`,"aria-expanded":g,onClick:()=>f((x)=>!x),children:[E,n(B,{expanded:g})]}):n("div",{className:"codex-activity-header codex-activity-header-static",children:E}),n("div",{className:y("codex-activity-details-grid",g&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:T&&p(P,{children:[I!==void 0?n(Be,{block:e,command:I}):i!==void 0&&u?n(i,{patch:u}):c!==void 0&&n("pre",{className:"codex-activity-details",children:c}),m.length>0&&n("div",{className:"codex-activity-media",children:m.map((x)=>{let k=`data:${x.mimeType};base64,${x.data}`,q=n("img",{src:k,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},`${x.mimeType}:${x.data.slice(0,32)}`);return r===void 0?q:n("button",{type:"button",className:"cursor-pointer",onClick:()=>r(k),children:q},k)})}),d.map((x)=>n("audio",{className:"mt-1 w-full","aria-label":t("stream.codex.audioOutput"),controls:!0,src:`data:${x.mimeType};base64,${x.data}`},`${x.mimeType}:${x.data.slice(0,32)}`))]})})})]})}function oe({block:e}){if(e.type==="tool_use")return n(ae,{block:e});if(e.type==="thinking")return n(le,{block:e});if(e.type==="collab")return n(ce,{block:e});return n(ie,{block:e})}function ie({block:e}){let{t,openSession:o}=a(),i=L(e.status),[r,s]=S(`subagent:${e.id}`,i),l=V(i);U(()=>{if(i)s(!0);if(l.current&&!i)s(!1);l.current=i},[i,s]);let c=`${Re(e.activity,i,e.name,t)}${re(e.model,e.reasoningEffort,t)}`,u=e.threadId??"",m=e.blocks.length>0;return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:y("codex-activity-header",!m&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":m?r:void 0,disabled:!m,onClick:()=>s((d)=>!d),children:[p("span",{className:"codex-activity-label",children:[n(Se,{seed:e.threadId??e.id}),n("span",{className:"min-w-0 flex-1 truncate",children:o===void 0||e.threadId===null?i?n("span",{className:"codex-activity-running",children:c}):c:n("span",{role:"link",tabIndex:0,className:y("codex-agent-link",i&&"codex-activity-running"),"aria-label":t("stream.codex.subagentOpen",{name:e.name}),onClick:(d)=>{d.stopPropagation(),o(u,e.name)},onKeyDown:(d)=>{if(d.key!=="Enter"&&d.key!==" ")return;d.preventDefault(),d.stopPropagation(),o(u,e.name)},children:c})})]}),m&&n(B,{expanded:r})]}),n("div",{className:y("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:e.blocks.map((d)=>{if(d.type==="tool_use")return n(ae,{block:d},d.id);if(d.type==="thinking")return n(le,{block:d},b(d));if(d.type==="subagent")return n(ie,{block:d},d.id);if(d.type==="collab")return n(ce,{block:d},d.id);if(d.type==="text")return n("div",{className:"codex-reasoning-details",children:n(v,{text:d.text,streaming:!1})},b(d));if(d.type==="plan")return n(W,{entries:d.entries},b(d));if(d.type==="image")return n("img",{src:`data:${d.source.media_type};base64,${d.source.data}`,className:"max-h-48 max-w-full rounded-lg object-contain",alt:""},b(d));return null})})})})]})}var Ie=8;function Ee(e){let t=0;for(let o=0;o<e.length;o+=1)t=(t*31+e.charCodeAt(o))%2147483647;return t%Ie}function Se({seed:e}){return n("span",{className:"codex-agent-avatar","data-hue":Ee(e),"aria-hidden":"true"})}function Re(e,t,o,i){switch(e){case"started":return i(t?"stream.codex.subagentWorking":"stream.codex.subagentFinished",{name:o});case"interacted":return i("stream.codex.subagentMessaged",{name:o});case"interrupted":return i("stream.codex.subagentInterrupted",{name:o});case"completed":return i("stream.codex.subagentFinished",{name:o})}}var _e=new Set(["none","minimal","low","medium","high","xhigh","max","ultra","persistent"]);function re(e,t,o){if(e===null)return"";if(t===null)return` · ${zt(e)}`;let i=_e.has(t)?o(`stream.codex.reasoningEffort.${t}`):t;return` · ${zt(e)} · ${i}`}var Fe={spawnAgent:"spawn",sendInput:"message",sendMessage:"message",followupTask:"message",interruptAgent:"interrupt",listAgents:"list",resumeAgent:"resume",closeAgent:"close"};function se(e){switch(e){case"pending":case"in_progress":return"inProgress";case"completed":return"completed";case"failed":return"failed";case"cancelled":case"interrupted":return"interrupted";default:throw Error(`Unknown ACP tool status: ${e}`)}}function H(e,t,o){if(e.tool==="wait")throw Error("Codex does not present wait calls");let i=se(e.status);if(i==="interrupted")return o("stream.codex.collab.interrupted");return o(`stream.codex.collab.${t}.${Fe[e.tool]}.${i}`)}function De(e){return e.agents.filter((t)=>t.nickname!==null)}function de(e,t){let o=e.agents.length>0?e.agents.length:1;return`${H(e,"header",t)}${t("stream.codex.collab.agentCount",{count:o})}`}var _="\x01";function F(e,t,o,i){let r=Object.fromEntries(Object.keys(i).map((s)=>[s,`${_}${s}${_}`]));return e(t,{...o,...r}).split(new RegExp(`${_}(\\w+)${_}`,"u")).map((s,l)=>n(fe,{children:l%2===1?i[s]:s},`${l}:${s}`))}function Pe({agent:e,showModel:t}){let{t:o,openSession:i}=a(),r=e.nickname??"",s=i===void 0?n("span",{className:"font-medium",children:r}):n("button",{type:"button",className:"codex-agent-link font-medium","aria-label":o("stream.codex.subagentOpen",{name:r}),onClick:()=>i(e.threadId,r),children:r});return p("span",{children:[s,e.role!==null&&` (${e.role})`,t&&re(e.model,e.reasoningEffort,o)]})}function Q({prompt:e}){return n("span",{className:"codex-collab-prompt",title:e,children:e})}function Ue(e,t){let o=e.prompt?.trim()?e.prompt:null,i=se(e.status),r=e.tool==="spawnAgent"&&i==="completed"&&o!==null,s=(e.tool==="sendInput"||e.tool==="sendMessage"||e.tool==="followupTask")&&o!==null,l=De(e),c=[];if(l.length===0)c.push({key:"generic",node:H(e,"row",t)});for(let u of l){let m=n(Pe,{agent:u,showModel:e.tool==="spawnAgent"});if(r)c.push({key:u.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.createdWithInstructions",{},{agent:m,instructions:n(Q,{prompt:o})})})});else if(s)c.push({key:u.threadId,node:n("span",{className:"codex-collab-line",children:F(t,"stream.codex.collab.messagedWithPrompt",{action:i==="interrupted"?t("stream.codex.collab.interrupted"):t(`stream.codex.collab.messaged.${i}`)},{agent:m,prompt:n(Q,{prompt:o})})})});else{let g=e.tool!=="closeAgent"&&e.tool!=="resumeAgent"&&u.state!==null&&u.state!==null?u.state.message?.trim()?t("stream.codex.collab.stateWithMessage",{state:t(`stream.codex.collab.state.${u.state.status}`),message:u.state.message}):t("stream.codex.collab.stateOnly",{state:t(`stream.codex.collab.state.${u.state.status}`)}):"";c.push({key:u.threadId,node:F(t,"stream.codex.collab.agentRow",{action:H(e,"row",t),state:g},{agent:m})})}}if(!r&&!s&&o!==null)c.push({key:"input",node:F(t,"stream.codex.collab.input",{},{prompt:n("span",{className:"codex-collab-input",children:o})})});return c}function ce({block:e}){let{t}=a(),[o,i]=S(`collab:${e.id}`,!1);if(e.tool==="wait")return null;let r=L(e.status),s=de(e,t);return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":o,onClick:()=>i((l)=>!l),children:[p("span",{className:"codex-activity-label",children:[n(ue,{className:"size-4 shrink-0","aria-hidden":"true"}),n("span",{className:"min-w-0 flex-1 truncate",children:r?n("span",{className:"codex-activity-running",children:s}):s})]}),n(B,{expanded:o})]}),n("div",{className:y("codex-activity-details-grid",o&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-subagent-details",children:Ue(e,t).map((l)=>n("div",{className:"codex-collab-row",children:l.node},l.key))})})})]})}function le({block:e}){let{t,i18n:o}=a(),i=Boolean(e.isComplete),[r,s]=S(`thinking:${b(e)}`,!1),l=V(null),c=e.thinking.trim().length>0;U(()=>{if(i||!c)return;let d=l.current;if(d===null)throw Error("Thinking details are not mounted");let g=new ResizeObserver(()=>{d.scrollTop=d.scrollHeight}),f=null,T=()=>{let w=d.firstElementChild;if(w===f)return;if(f!==null)g.unobserve(f);if(f=w,f!==null)g.observe(f)},h=new MutationObserver(T);return h.observe(d,{childList:!0}),T(),()=>{h.disconnect(),g.disconnect()}},[c,i]);let u=i?e.durationMs!==void 0?t("stream.codex.thoughtFor",{duration:Z(e.durationMs,o.language)}):t("stream.codex.thought"):t("message.thinking"),m=e.thinking.trimStart().replace(/^\*\*[^\n]*?\*\*\s*/,"");return p("div",{className:"codex-activity-item",children:[p("button",{type:"button",className:y("codex-activity-header",!c&&"codex-activity-header-static"),"data-codex-disclosure":"","aria-expanded":c?r:void 0,disabled:!c,onClick:()=>s((d)=>!d),children:[n("span",{className:"codex-activity-label",children:n("span",{className:"codex-reasoning-label min-w-0 flex-1 truncate",children:i?u:n("span",{className:"codex-activity-running",children:u})})}),c&&n(B,{expanded:r})]}),n("div",{className:y("codex-activity-details-grid",r&&"codex-activity-details-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:c&&n("div",{ref:l,className:"codex-reasoning-details",role:"region","aria-label":u,"aria-hidden":!r,tabIndex:0,inert:!r,children:n(v,{text:m,streaming:!i})})})})]})}function Ve(e){if(G(e))return"mcp";let t=D(e).category;return t==="think"||t==="switch_mode"?"other":t}function Oe(e,t,o,i){return i(`stream.codex.summary.${e}.${o?"leading":"following"}`,{count:t})}function Ze(e,t,o){let i=new Map,r=[],s=new Set;for(let c of e){if(G(c)&&typeof c.rawInput.server==="string"){if(s.size===0)r.push({kind:"integrations"});s.add(c.rawInput.server);continue}if(O(c)){if(!r.some((m)=>m.kind==="named"&&m.title===c.title))r.push({kind:"named",title:c.title});continue}let u=Ve(c);if(!i.has(u))r.push({kind:"category",category:u});i.set(u,(i.get(u)??0)+1)}let l=r.map((c,u)=>{if(c.kind==="named")return c.title;if(c.kind==="integrations")return t(`stream.codex.summary.integrations.${u===0?"leading":"following"}`,{count:s.size,sources:new Intl.ListFormat(o,{style:"long",type:"conjunction"}).format([...s])});return Oe(c.category,i.get(c.category),u===0,t)});if(o.startsWith("zh"))return l.join("");return new Intl.ListFormat(o,{style:"long",type:"conjunction"}).format(l)}function ao({stateKey:e,durationMs:t,durationKind:o="work",active:i,defaultExpanded:r=i,startedAt:s,providerId:l,providerIcon:c,children:u}){let{t:m,i18n:d}=a(),[g,f]=S(`work:${e}`,r,!0),T=j(`work:${e}`,g||i),h=V(null),[w,C]=R(0);U(()=>{if(!i||t!==void 0){h.current=null;return}h.current=s??Date.now();let N=()=>{let E=h.current;if(E===null)throw Error("Codex work section is ticking without a start time");C(Date.now()-E)};N();let M=window.setInterval(N,1000);return()=>window.clearInterval(M)},[i,s,t]);let I=t!==void 0?m(o==="total"?"stream.codex.totalDuration":"stream.codex.workedFor",{duration:Z(t,d.language)}):i&&w>=1000?m("stream.codex.workingFor",{duration:Z(w,d.language)}):m(i?"stream.codex.working":"stream.codex.worked");return p("section",{className:"codex-work-section",children:[p("button",{type:"button",className:"codex-work-trigger","data-codex-disclosure":"","aria-expanded":g,onClick:()=>f((N)=>!N),children:[l!==void 0&&n("span",{className:"codex-work-provider-icon","data-testid":"codex-work-provider-icon","data-provider-id":l,"aria-hidden":"true",children:c}),n("span",{children:I}),n(B,{expanded:g,className:"codex-work-chevron"})]}),n("div",{className:"codex-work-separator","aria-hidden":"true"}),n("div",{className:y("codex-work-grid",g&&"codex-work-grid-open"),"aria-hidden":!g,inert:!g,children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-work-body",children:T&&u})})})]})}function He(e,t){if(e.type==="tool_use")return be(e,t);if(e.type==="thinking")return t("message.thinking");if(e.type==="collab")return de(e,t);return t("stream.codex.subagentWorking",{name:e.name})}function X(e){if(e.type==="thinking")return!e.isComplete;if(e.type==="tool_use"||e.type==="subagent"||e.type==="collab")return L(e.status);return!1}function We(e,t,o=1000){let[i,r]=R({text:e,live:t}),s=V(Date.now());return U(()=>{if(e===i.text&&t===i.live)return;let l=Date.now(),c=Math.max(0,s.current+o-l);if(c===0||t!==i.live){s.current=l,r({text:e,live:t});return}let u=window.setTimeout(()=>{s.current=Date.now(),r({text:e,live:t})},c);return()=>window.clearTimeout(u)},[i,t,o,e]),t===i.live?i.text:e}function je({blocks:e,defaultExpanded:t=!0}){let{t:o,i18n:i}=a(),r=e.some(X),s=b(e[0]),[l,c]=S(`group:${s}`,t),u=j(`group:${s}`,l||r),m=e.findLast(X)??e.at(-1);if(m===void 0)throw Error("CodexActivityGroup requires at least one activity block");let d=e.filter((f)=>f.type==="tool_use"),g=We(r?He(m,o):Ze(d,o,i.language),r);return p("div",{className:"codex-activity-group",children:[p("button",{type:"button",className:"codex-activity-group-trigger","data-codex-disclosure":"","aria-expanded":l,onClick:()=>c((f)=>!f),children:[p("span",{className:"codex-activity-label",children:[n(ee,{block:e[0]}),n("span",{className:"truncate",children:r?n("span",{className:"codex-activity-running",children:g}):g})]}),n(B,{expanded:l})]}),n("div",{className:y("codex-activity-group-grid",l&&"codex-activity-group-grid-open"),children:n("div",{className:"min-h-0 overflow-hidden",children:n("div",{className:"codex-activity-group-body",children:u&&e.map((f)=>n(oe,{block:f},b(f)))})})})]})}function Y({blocks:e,defaultExpanded:t}){if(e.length===0)throw Error("CodexActivityGroup requires at least one activity block");if(e.length===1)return n(oe,{block:e[0]});return n(je,{blocks:e,defaultExpanded:t})}function Me({blocks:e,defaultExpanded:t}){if(!e.some(pe))return n(Y,{blocks:e,defaultExpanded:t});let o=[];for(let i of e){let r=o.at(-1);if(r&&pe(r[0])===pe(i))r.push(i);else o.push([i])}return n(P,{children:o.map((i)=>pe(i[0])?n(so,{blocks:i.filter(pe)},b(i[0])):n(Y,{blocks:i,defaultExpanded:t},b(i[0])))})}
7
- export{ao,Me};
@@ -1,2 +0,0 @@
1
- import{or,y}from"./chunk-cpk3y6ad.js";import{Ro}from"./chunk-5hsmhj1g.js";import{oe}from"./chunk-0kwfy29d.js";import{jo,Ko,Qo,Xo,Yo,K}from"./chunk-zbtas7pt.js";import{No,Mo}from"./chunk-mt965yn0.js";import{Yt}from"./chunk-rszktjdw.js";import{t,o}from"./chunk-dp8pjv6r.js";import{n}from"./chunk-ysc51tpb.js";import{en}from"./chunk-3e0mfcj6.js";import{i,ir,E,xt}from"./chunk-20svvgj3.js";import{ut}from"./chunk-svt0t387.js";import{xe,ft}from"./chunk-m28hdj8j.js";import{yt,wt}from"./chunk-31x6chk8.js";import{ar}from"./chunk-e55zxnda.js";import{gt}from"./chunk-w6hhyjcn.js";import{Fo}from"./chunk-5w92bzgs.js";import{mt}from"./chunk-6pmc9283.js";import{pt}from"./chunk-abwjd5yv.js";import{Wo}from"./chunk-4nh3xzrm.js";import{Vo}from"./chunk-133f0wed.js";import{dt}from"./chunk-5ev4qvsp.js";import{hasFuzzyFileSearch as Ft}from"@nyssance/codex-acp-v2/client";import{PlusIcon as kt}from"lucide-react";import{useCallback as S,useEffect as Dt,useLayoutEffect as X,useMemo as q,useRef as H,useState as N}from"react";import{jsx as c,jsxs as v}from"react/jsx-runtime";var Bt=["image/png","image/jpeg","image/webp","image/gif"],J=[];async function _t(e){let d=await(await fetch(e.url)).blob();return new Promise((b,G)=>{let I=new FileReader;I.onerror=()=>G(I.error),I.onload=()=>{let O=I.result;b(O.slice(O.indexOf(",")+1))},I.readAsDataURL(d)})}function Lt(e){let{t:d}=t(),b=y();return c(K,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>b.openFileDialog(),...e,children:c(kt,{className:"size-4"})})}function lt({session:e,onSubmit:d,onHandOff:b,modelSelector:G,modelMenu:I,inputHeader:O,actions:Pt,children:bt,attachmentPolicy:vt,predictions:It=!0,disabled:Ct=!1,preparing:Q=!1,allowPendingInput:Tt=!1}){let{host:F,client:T}=n(),{t:s}=F,k=S((r)=>{if(F.reportError)F.reportError(r);else console.error(r)},[F]),[Z,D]=N(()=>({text:i.get(e.id)?.text??"",revision:0})),{text:A}=Z,[w,At]=N(()=>i.get(e.id)?.attachments??J),[g,_]=N(()=>i.get(e.id)?.mentions??[]),W=w.some((r)=>xe(r)&&r.pastedText.status!=="ready"),[C,tt]=N(!1),[L,Mt]=N(!1),[Y,et]=N(!1),u=H(null),rt=H(null),a=H(Z),z=S((r)=>{rt.current?.(),a.current={text:r,revision:a.current.revision+1},D(a.current)},[]),ot=q(()=>({read:()=>{let p=u.current?.getTextarea(),h=p===null||p===void 0?[a.current.text.length,a.current.text.length]:[p.selectionStart,p.selectionEnd];return{target:e.id,...a.current,selection:h}},compareAndSet(p,h,x){if(p.target!==e.id||p.revision!==a.current.revision)return null;a.current={text:h,revision:a.current.revision+1},D(a.current);let l=u.current?.getTextarea();if(l!==null&&l!==void 0)l.value=h,l.setSelectionRange(x[0],x[1]);return{target:e.id,...a.current,selection:x}}}),[e.id]),B=H(null),nt=S((r)=>(B.current=r,()=>{if(B.current===r)B.current=null}),[]),at=e.state!=="idle",f=!Ct&&!Q&&e.attached&&!e.restoring&&!e.readOnly,M=!e.readOnly&&(Tt||f),R=pt(e,f&&!C&&!L&&!W&&!Y,A.length>0||w.length>0||g.length>0,It),it=R.invalidate;X(()=>{i.set(e.id,{text:A,attachments:w,mentions:g,modelId:i.get(e.id)?.modelId??null})},[e.id,A,w,g]),X(()=>ir(e.id,At),[e.id]),X(()=>xt(e.id,(r)=>{if(!M||C)throw Error("The composer cannot take text now; try again later");if(A.length||w.length||g.length)throw Error("The composer already has a draft; send or clear it first");z(r)}),[e.id,M,C,A,w,g,z]);let ct=o((r)=>Ft(r.agent)),Rt=q(()=>ct&&f?async(r)=>ut((await T.fuzzyFileSearch({query:r,roots:[e.cwd]})).files):void 0,[T,ct,f,e.cwd]),V=S((r)=>{_((p)=>p.includes(r)?p:[...p,r])},[]);Dt(()=>{u.current?.focus()},[]);let st=S(async({text:r,files:p})=>{let h=r.trim();if(h.length===0&&p.length===0&&g.length===0)return;let x=B.current;tt(!0);let l=i.get(e.id),Ot=a.current.revision,U=null;try{let P=[];for(let m of g){let j={kind:"file",absPath:m};P.push({type:"resource_link",uri:yt(j),name:wt(j)})}if(h.length>0)P.push({type:"text",text:h});for(let m of p)if(xe(m)){if(m.pastedText.status!=="ready")throw Error("Text attachment is not ready");P.push({type:"resource_link",uri:m.url,name:m.filename??"pasted-text.txt"})}else P.push({type:"image",data:await _t(m),mimeType:m.mediaType});if(a.current.revision===Ot&&i.get(e.id)===l)a.current={text:"",revision:a.current.revision+1},U=a.current.revision,D(a.current),_([]),E(e.id,()=>J),i.set(e.id,{text:"",attachments:J,mentions:[],modelId:l?.modelId??null}),u.current?.resetHeight();if(d)if(x===null)await d(P);else await d(P,(m)=>{if(x.signal.aborted||B.current!==x)return;x.accept(m),b?.(e.id,m)});else if(x===null)await T.prompt(e.id,P);else{let m=await T.prompt(e.id,P);x.accept(m)}it();for(let m of l?.attachments??[])if(m.url.startsWith("blob:")&&!i.get(e.id)?.attachments.some((j)=>j.id===m.id))URL.revokeObjectURL(m.url)}catch(P){if(l&&U!==null&&a.current.revision===U&&i.get(e.id)?.attachments.length===0&&i.get(e.id)?.mentions.length===0)a.current={text:l.text,revision:U+1},D(a.current),_(l.mentions),i.set(e.id,l),E(e.id,()=>l.attachments);throw P}finally{tt(!1),u.current?.focus()}},[T,e.id,g,d,b,it]),Et=()=>{T.cancel(e.id).catch(k)},St=S((r)=>{let p=r.code==="max_total_size"?Object.assign(Error(s("composer.imageTooLargeTitle")),{description:s("composer.imageTooLargeDescription",{mb:oe})}):Object.assign(Error(s("composer.unsupportedAttachmentTitle")),{description:s("composer.unsupportedAttachmentDescription")});k(p)},[k,s]),Nt=q(()=>({session:e,ready:f,inputReady:M,sending:C,textareaRef:u,draft:ot,interruptRef:rt,observeReceipts:nt,addMention:V,setAdding:Mt,handsFree:d===void 0||b!==void 0}),[e,f,M,C,ot,nt,V,d,b]),ht=F.writeTextAttachment;return c(en,{value:Nt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:v("div",{className:"relative",children:[O&&c("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:O}),v(or,{attachmentPolicy:vt,value:A,revision:a.current.revision,onValueChange:z,onSubmittedClear:()=>{a.current={text:"",revision:a.current.revision+1},D(a.current)},attachments:w,onAttachmentsChange:(r)=>E(e.id,()=>r),children:[c(Ro,{handleRef:u,commands:e.commands,searchFiles:Rt,onMention:V,onSearchError:k,forcedOpen:Y,onForcedOpenChange:et,emptyLabel:s("composer.noCommands"),fileStatusLabels:{loading:s("composer.searchingFiles"),empty:s("composer.noMatchingFiles")}}),v(jo,{globalDrop:!0,multiple:!0,accept:Bt.join(","),onError:St,onSubmit:st,onSubmitAsync:st,onSubmitError:k,canSubmit:()=>f&&!C&&!L&&!W?!0:"chat_not_ready",className:"relative z-10",children:[bt,v(Qo,{className:"px-3 pt-3 pb-0 empty:hidden",children:[L&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:s("composer.addingFiles")}),c(ar,{mentions:g,onRemove:(r)=>_((p)=>p.filter((h)=>h!==r))}),c(Mo,{children:(r)=>xe(r)?c(Fo,{data:r,sessionId:e.id}):c(No,{data:r,t:s})})]}),v(Ko,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(r)=>{if(!R.text||u.current?.isComposing()||r.nativeEvent.isComposing||r.nativeEvent.keyCode===229||r.shiftKey||r.ctrlKey||r.altKey||r.metaKey||r.target!==u.current?.getTextarea())return;if(r.key==="Tab")r.preventDefault(),r.stopPropagation(),z(R.text)},children:[c(Yt,{className:"min-h-10 bg-transparent text-sm font-normal",ref:u,rows:2,bashMode:!1,disabled:!M,onPasteCapture:ht?(r)=>ft(r,e.id,s("composer.pastedTextFilename"),ht):void 0,placeholder:R.text||(at?s("composer.steerPlaceholder"):s("composer.placeholder")),"aria-label":s("composer.placeholder")}),R.error&&c("span",{className:"text-muted-foreground text-xs",role:"status",title:R.error,children:s("composer.predictionUnavailable")})]}),c(Xo,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:v("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[v("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(Lt,{className:"text-foreground",disabled:!M}),c(Wo,{textareaRef:u,menuOpen:Y,onOpenChange:et,disabled:!f||e.commands.length===0}),c(mt,{sessionId:e.id,options:e.configOptions,disabled:!f})]}),v(Yo,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(dt,{session:e}),G??c(gt,{...I,sessionId:e.id,options:e.configOptions,disabled:!f}),Pt,c(Vo,{active:at,sending:C||Q||L,ready:f&&!W,hasMentions:g.length>0,onStop:Et})]})]})})]})]})]})})})}
2
- export{lt};
@@ -1,2 +0,0 @@
1
- import{groupSessions as le,projectName as U,isQuickChatDirectory as mr,QUICK_CHATS_GROUP as L}from"@nyssance/codex-acp-v2/client";
2
- export{le,U,mr,L};
@@ -1,2 +0,0 @@
1
- import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function tn({name:p,value:P,levels:h,disabled:c,onChange:v}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===P)),[M,d]=k(null),l=y(null),[I,b]=k(null),x=y(0),s=M??I??g,w=(t)=>{let n=++x.current;b(t);let e=()=>{if(x.current===n)b(null)};try{Promise.resolve(v(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=76,r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
2
- export{tn};
@@ -1,2 +0,0 @@
1
- import{terminalOf as u,textOf as g}from"@nyssance/codex-acp-v2/client";function To(n,o,r){if(n.kind!=="tool"){let t=g(n.content),c=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(t);return{type:"thinking",id:n.id,thinking:c?c[1]:t,isComplete:!r}}if(n.name==="subagent"){let t=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:p(t.agentPath,n.id),threadId:f(t.agentThreadId,"agentThreadId",n.id),activity:y(t.activity,n.id),model:l(t.model,"model",n.id),reasoningEffort:l(t.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let t=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof t.tool!=="string"||!Array.isArray(t.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:t.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:t.agents}}let i=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},e=u(n,o);if(Array.isArray(i.command))i.command=i.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof i.command!=="string"){let t=e?.command??n.title;if(t!==null)i.command=t}let a=n.rawOutput;if(typeof a==="object"&&a!==null&&"output"in a&&typeof a.output==="string")a=a.output;if(e!==null&&e.output.length>0)a=e.output;let d=e?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:i,rawOutput:a,...typeof d==="number"?{exitCode:d}:{}}}function s(n,o){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${o} is missing an object codex-acp-v2 always sends`);return n}function l(n,o,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${o}`)}function p(n,o){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${o} has no agent path`);return r}function f(n,o,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${o}`)}function y(n,o){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${o} has an unknown activity ${String(n)}`)}
2
- export{To};
@@ -1,2 +0,0 @@
1
- var hr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function kn(e){return[...e].toSorted((o,n)=>(hr[o.kind]??99)-(hr[n.kind]??99))}function Yr(e){return e==="allow_once"||e==="allow_always"}function Zr(e){return e==="allow_always"||e==="reject_always"}
2
- export{hr,kn,Yr,Zr};
@@ -1,2 +0,0 @@
1
- import{zo}from"./chunk-zt8qaqbz.js";import{o}from"./chunk-dp8pjv6r.js";import{n,C}from"./chunk-ysc51tpb.js";import{R,x,ne}from"./chunk-bhze2sjv.js";import{isBooleanOption as E,isGroupedSelect as U,isSelectOption as q}from"@nyssance/codex-acp-v2/client";import{Zap as A}from"lucide-react";import{jsx as y}from"react/jsx-runtime";function gt({sessionId:p,options:f,disabled:w,onModelChange:g,onConfigChange:M,defaultGroup:I={id:"models",name:"Models"},catalog:B=(s)=>s,headerAction:G}){let{host:s,client:L}=n(),{t:r}=s,h=o((e)=>Boolean(e.configPending[p])),N=o((e)=>{let a=e.sessions[p];return a?.state==="running"||a?.state==="requires_action"}),t=x(f,"model"),l=x(f,"thought_level"),b=f.filter((e)=>e.configId!=="collaboration_mode"&&(e.category==="model_config"||e.category!=="mode"&&e!==t&&e!==l)),O=b.filter(q),d=b.filter(E);if(!t&&!l&&O.length===0&&d.length===0)return null;let c=(e,a)=>{if(a===e.currentValue)return;C(s,M?M(e.configId,a):L.setConfig(p,e.configId,a))},m=l?R(l):[],k=m.reduce((e,a)=>a.name.length>=e.length?a.name:e,""),z=t?ne(t):r("composer.model"),_=(e)=>({api_id:e.value,label:e.name}),v=B(t&&U(t.options)?t.options.map((e)=>({id:e.groupId,name:e.name,models:e.options.map(_)})):[{...I,models:t?R(t).map(_):[]}]),S=v.flatMap((e)=>e.models),u=S.find((e)=>e.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:z},i=d.find((e)=>e.configId==="fast-mode");return y(zo,{disabled:w||h||N,switching:h,value:{...u,label:u.shortLabel??u.label},compactCatalog:!0,models:S,showModelList:Boolean(t),onChange:(e)=>{if(e.api_id===t?.currentValue)return;if(g)g(e.api_id);else if(t)c(t,e.api_id)},header:{name:t?.name??r("composer.model"),action:G},modelGroups:v,t:r,effortConfig:l&&m.length>0?{name:"Effort",value:l.currentValue,levels:m,sizer:k,onChange:(e)=>c(l,e)}:void 0,selectOptions:O.map((e)=>({id:e.configId,name:e.name,value:e.currentValue,options:R(e).map((a)=>({value:a.value,label:a.name})),onChange:(a)=>c(e,a)})),booleanOptions:[{id:"fast_mode",name:r("composer.fastMode"),currentValue:i?.currentValue??!1,disabled:!i,title:!i?r("composer.fastModeUnsupported"):void 0,icon:y(A,{className:"size-4","aria-hidden":"true"})},...d.filter((e)=>e!==i).map((e)=>({id:e.configId,name:e.name,currentValue:e.currentValue}))],onBooleanChange:(e,a)=>{let V=e==="fast_mode"?i:d.find((P)=>P.configId===e);if(!V)throw Error(`Unknown boolean config: ${e}`);c(V,a)}})}
2
- export{gt};
@@ -1,2 +0,0 @@
1
- import{e}from"./chunk-6kn920c5.js";import{H,O,P,F,te,N,_e,He,Oe,nn,M}from"./chunk-qah4fs3d.js";import{$e}from"./chunk-ak0k5vg6.js";import{ye,be,we}from"./chunk-wb3zpzk3.js";import{tn}from"./chunk-e11qjnb4.js";import{h}from"./chunk-rnykpmn2.js";import{cn as m}from"cn";import{ArrowUpRight as se,ChevronUp as G,Loader2Icon as U,Zap as W}from"lucide-react";import{Fragment as ie,useState as Z}from"react";import{jsx as n,jsxs as s,Fragment as p}from"react/jsx-runtime";function zo({value:c,onChange:q,models:v,modelGroups:C,compactCatalog:l,effortPresentation:R="slider",unavailableEffort:D,providerMenu:w,header:g,className:I,condensed:T,stripLabelPrefix:V,showDescription:J,showModelList:K=!0,loading:Q,switching:A,isLoading:X,effortConfig:i,booleanOptions:f,onBooleanChange:z,selectOptions:Y=[],t:u,...r}){let[E,ee]=Z(!1),[ne,ae]=Z(!1),d=f?.find((a)=>a.id==="fast_mode"),_=l?f?.filter((a)=>a!==d):f,L=(a)=>V&&a.startsWith(V)?a.slice(V.length):a;if(Q)return n("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:s(e,{variant:"ghost",disabled:!0,className:m("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",I),children:[n(U,{className:"size-3 animate-spin"}),n("span",{className:"text-muted-foreground truncate",children:u("model.loadingModels")})]})});return s("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[w&&s(H,{open:E,onOpenChange:ee,children:[s(ye,{children:[n(be,{render:n(O,{render:s(e,{"data-testid":"provider-trigger",variant:"ghost",disabled:r.disabled,className:m("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[w.icon,n(G,{className:"size-2.5 shrink-0 opacity-60"})]})})}),n(we,{children:u("model.switchProvider")})]}),s(P,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[w.groups.map((a,t)=>s(ie,{children:[t>0&&a.length>0&&n(M,{}),n(h,{value:w.value,onValueChange:w.onChange,options:a})]},t)),w.moreAction&&s(p,{children:[n(M,{}),s(N,{onClick:w.moreAction,className:"whitespace-nowrap",children:[n("span",{className:"min-w-0 flex-1 truncate",children:u("model.moreModels")}),n(se,{className:"size-4"})]})]})]})]}),s(H,{open:ne,onOpenChange:ae,children:[s(ye,{children:[n(be,{render:n(O,{render:s(e,{"data-testid":"model-trigger","aria-busy":A,variant:"ghost",className:m("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",T&&"h-7 gap-1 px-1.5 text-[11px]",I),...r,children:[c.icon,f?.some((a)=>a.id==="fast_mode"&&a.currentValue&&!a.disabled)&&n(W,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),n("span",{className:m("min-w-0 flex-1 truncate text-start",T&&"text-[11px]"),children:L(c.label)||u("model.selectModel")}),i&&s("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[n("span",{className:"invisible col-start-1 row-start-1",children:i.sizer??i.levels.reduce((a,t)=>t.name.length>a.length?t.name:a,"")}),n("span",{className:"col-start-1 row-start-1",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),A?n(U,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):n(G,{className:m("size-3 shrink-0",T&&"size-2.5")})]})})}),n(we,{children:u("model.switchModel")})]}),s(P,{side:"top",align:"end",sideOffset:4,className:m("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",l&&"flex h-[350px] w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5"),children:[l&&s(p,{children:[s(F,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-1 py-1",children:[i?R==="slider"?n("div",{role:"menuitem","aria-label":i.name,className:"min-w-0 [&>div]:justify-start [&>div]:gap-3 [&>div]:px-2 [&>div]:py-1.5",children:n(tn,{...i,disabled:r.disabled})}):s(_e,{children:[s(He,{disabled:r.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[n("span",{children:i.name}),n("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(Oe,{children:n(h,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):D?s(N,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[n("span",{children:D.name}),n("span",{className:"text-muted-foreground truncate text-xs",children:D.label})]}):n(te,{className:"min-w-0 flex-1 truncate",children:g?.name}),d&&n(nn,{"aria-label":d.name,title:d.title??d.name,disabled:r.disabled||d.disabled,checked:d.currentValue,closeOnClick:!1,onCheckedChange:(a)=>z?.(d.id,a),className:m("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ml-auto size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",d.currentValue&&!d.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:d.icon??n(W,{className:"size-4","aria-hidden":"true"})})]}),n(M,{className:"shrink-0"})]}),g&&!l&&s(p,{children:[s("div",{className:"flex items-center gap-2 px-2 py-2",children:[g.icon,n("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:g.name}),g.action]}),n(M,{})]}),s(F,{"data-model-menu-list":l?"":void 0,className:l?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[K&&(X?n(N,{disabled:!0,className:"text-muted-foreground",children:u("model.loadingModels")}):v.length===0?n(N,{disabled:!0,className:"text-muted-foreground",children:u("model.noModelsAvailable")}):(()=>{let a=v.filter((o)=>!o.more),t=v.filter((o)=>o.more),j=a.length>0&&t.length>0,y=(o,b)=>({disabled:r.disabled,icon:o.icon,value:o.api_id,label:L(o.label),description:b?.noDescription?void 0:J?o.description:void 0}),k=(o)=>{let b=v.find((S)=>S.api_id===o);if(b)q(b)};if(l)return n(h,{value:c.api_id,onValueChange:k,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:v.map((o)=>y(o))});return s(p,{children:[C?C.map((o)=>{let b=o.models.filter((x)=>!x.more),S=o.models.filter((x)=>x.more),B=b.length>0&&S.length>0;return s(F,{children:[n(te,{className:"text-muted-foreground text-xs font-normal",children:o.name}),n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:(B?b:o.models).map((x)=>y(x))}),B&&s(_e,{children:[n(He,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(Oe,{children:n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:S.map((x)=>y(x,{noDescription:!0}))})})]})]},o.id)}):n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:(j?a:v).map((o)=>y(o))}),!C&&j&&s(_e,{children:[n(He,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(Oe,{children:n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:t.map((o)=>y(o,{noDescription:!0}))})})]})]})})()),!l&&i&&s(p,{children:[n(M,{}),R==="menu"?s(_e,{children:[s(He,{disabled:r.disabled,children:[n("span",{className:"flex-1",children:i.name}),n("span",{className:"text-muted-foreground",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(Oe,{children:n(h,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):n(tn,{...i,disabled:r.disabled})]}),!l&&!i&&D&&s(p,{children:[n(M,{}),s(N,{disabled:!0,children:[n("span",{className:"flex-1",children:D.name}),n("span",{children:D.label})]})]}),Y.map((a)=>s(F,{children:[n(M,{}),n(te,{children:a.name}),n(h,{value:a.value,onValueChange:a.onChange,options:a.options,itemClassName:"whitespace-nowrap"})]},a.id)),_&&_.length>0&&s(p,{children:[!i&&n(M,{}),_.map((a)=>l?s(nn,{"aria-label":a.name,title:a.title,disabled:r.disabled||a.disabled,checked:a.currentValue,closeOnClick:!1,onCheckedChange:(t)=>z?.(a.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[s("span",{className:"flex items-center gap-2",children:[a.icon,a.name]}),n("span",{"aria-hidden":"true",className:m("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",a.currentValue?"bg-primary":"bg-input"),children:n("span",{className:m("bg-background size-3.5 rounded-full shadow-xs transition-transform",a.currentValue&&"translate-x-3.5")})})]},a.id):s("div",{title:a.title,className:m("flex items-center justify-between gap-3 px-2 py-2.5",a.disabled&&"opacity-50"),children:[s("span",{className:"flex items-center gap-2 text-sm font-medium",children:[a.icon,a.name]}),n($e,{"aria-label":a.name,disabled:r.disabled||a.disabled,checked:a.currentValue,onCheckedChange:(t)=>z?.(a.id,t)})]},a.id))]})]}),l&&g?.action&&s(p,{children:[n(M,{className:"shrink-0"}),n(F,{"data-model-menu-footer":!0,className:"shrink-0",children:g.action})]})]})]})]})}
2
- export{zo};