@alwith/module-chat 0.5.12 → 0.5.14

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 (340) hide show
  1. package/README.md +7 -0
  2. package/dist/activity-host.js +1 -1
  3. package/dist/approval/choice-elicitation-form.js +1 -1
  4. package/dist/approval/choice-schema.js +1 -1
  5. package/dist/approval/permission-options.js +1 -1
  6. package/dist/approval/permission-view.js +1 -1
  7. package/dist/approval/schema-elicitation-form.js +1 -1
  8. package/dist/approval/url-elicitation-card.js +1 -1
  9. package/dist/{chunk-tm4ee7m3.js → chunk-0keppemg.js} +2 -2
  10. package/dist/chunk-0nkvfecf.js +1 -0
  11. package/dist/{chunk-wmk2dwpf.js → chunk-0pv9mq6d.js} +2 -2
  12. package/dist/{chunk-mwd0ed0c.js → chunk-10j68dch.js} +2 -2
  13. package/dist/chunk-12fcr66z.js +2 -0
  14. package/dist/chunk-1aeswxaf.js +2 -0
  15. package/dist/{chunk-ksv9pjc2.js → chunk-1fm5vx1n.js} +1 -1
  16. package/dist/chunk-1hzdqep7.js +2 -0
  17. package/dist/{chunk-58bs5f2z.js → chunk-1wpdb17m.js} +2 -2
  18. package/dist/{chunk-reaxcamj.js → chunk-20mzyay7.js} +2 -2
  19. package/dist/chunk-25bzk1wv.js +1 -0
  20. package/dist/chunk-2a3tezgr.js +1 -0
  21. package/dist/{chunk-qwyvq7bk.js → chunk-2aqv0chk.js} +2 -2
  22. package/dist/{chunk-3dvx2q8w.js → chunk-2ecx1xed.js} +2 -2
  23. package/dist/chunk-2mkqpzzx.js +2 -0
  24. package/dist/{chunk-tjykfxrd.js → chunk-2pj3pcc7.js} +2 -2
  25. package/dist/{chunk-tjpr0adf.js → chunk-2qhbm5y9.js} +2 -2
  26. package/dist/{chunk-q256c3hn.js → chunk-2r3sfmyf.js} +2 -2
  27. package/dist/{chunk-bftrddmr.js → chunk-2rv3cq7q.js} +2 -2
  28. package/dist/chunk-3919sqde.js +2 -0
  29. package/dist/{chunk-zmpbfbnn.js → chunk-39sbgvd3.js} +2 -2
  30. package/dist/{chunk-e15f3anm.js → chunk-3w0wbv9c.js} +3 -3
  31. package/dist/{chunk-fnbs3dq1.js → chunk-40d5the9.js} +2 -2
  32. package/dist/{chunk-c7km8xgd.js → chunk-4andq00q.js} +2 -2
  33. package/dist/{chunk-vyccmpdn.js → chunk-4ed8as5d.js} +2 -2
  34. package/dist/chunk-4r3ch7fk.js +2 -0
  35. package/dist/chunk-4s1rhts0.js +1 -0
  36. package/dist/chunk-4tff1nyj.js +2 -0
  37. package/dist/{chunk-sn80gr8g.js → chunk-54941m0z.js} +3 -3
  38. package/dist/{chunk-phy911dk.js → chunk-56e8naj1.js} +3 -3
  39. package/dist/chunk-59g9h4v1.js +2 -0
  40. package/dist/{chunk-kbwjcnf6.js → chunk-5cnw6yc7.js} +1 -1
  41. package/dist/{chunk-bcrq96dw.js → chunk-5x4an3fb.js} +2 -2
  42. package/dist/chunk-61944cv6.js +2 -0
  43. package/dist/chunk-6acs2hzs.js +2 -0
  44. package/dist/chunk-6k4mbmg1.js +4 -0
  45. package/dist/{chunk-xj0y094j.js → chunk-6s7z09b0.js} +2 -2
  46. package/dist/{chunk-4hv66fey.js → chunk-6t3tgzps.js} +2 -2
  47. package/dist/chunk-6wqbetcx.js +1 -0
  48. package/dist/chunk-7eje3z81.js +2 -0
  49. package/dist/chunk-7f89k828.js +2 -0
  50. package/dist/{chunk-m6h92nq4.js → chunk-7jyekmy9.js} +2 -2
  51. package/dist/{chunk-0qm0fy2r.js → chunk-7qrz8zq8.js} +2 -2
  52. package/dist/{chunk-vcbv30ph.js → chunk-7zrnt6zw.js} +2 -2
  53. package/dist/{chunk-62m11b37.js → chunk-8e3wcvkd.js} +3 -3
  54. package/dist/chunk-96x0d2vd.js +1 -0
  55. package/dist/{chunk-xa20eex9.js → chunk-9gv1zffv.js} +1 -1
  56. package/dist/{chunk-cy6grsx0.js → chunk-9j609g4n.js} +1 -1
  57. package/dist/chunk-9zmkj0dp.js +3 -0
  58. package/dist/{chunk-gszy4mhj.js → chunk-a3x74cr0.js} +2 -2
  59. package/dist/{chunk-mkw0twsb.js → chunk-a6b2vhmb.js} +2 -2
  60. package/dist/chunk-aarvddmn.js +1 -0
  61. package/dist/chunk-afd3bq7v.js +2 -0
  62. package/dist/chunk-aj5fk4ez.js +2 -0
  63. package/dist/chunk-b9hjn4a5.js +2 -0
  64. package/dist/chunk-bj5ma2sv.js +2 -0
  65. package/dist/chunk-c493d8ay.js +1 -0
  66. package/dist/chunk-cf5mxxyp.js +3 -0
  67. package/dist/chunk-cjmjv7pv.js +2 -0
  68. package/dist/{chunk-anfrrs5x.js → chunk-d5ga13n0.js} +1 -1
  69. package/dist/{chunk-ddtb692j.js → chunk-d5w1nvrz.js} +2 -2
  70. package/dist/chunk-da4m33bg.js +2 -0
  71. package/dist/chunk-da6d6wze.js +1 -0
  72. package/dist/{chunk-fteek5h4.js → chunk-djmnmbm2.js} +2 -2
  73. package/dist/{chunk-hwfwd04r.js → chunk-dnsmr5nf.js} +2 -2
  74. package/dist/{chunk-1k03fpcj.js → chunk-dxnttcwd.js} +2 -2
  75. package/dist/{chunk-27vftbhf.js → chunk-dyp6kjqz.js} +4 -4
  76. package/dist/chunk-e1gwprwe.js +2 -0
  77. package/dist/chunk-ea3582qy.js +1 -0
  78. package/dist/{chunk-c0ac9k7h.js → chunk-efcpawhs.js} +2 -2
  79. package/dist/{chunk-63zq5nr8.js → chunk-egqxz6f8.js} +2 -2
  80. package/dist/{chunk-36t9x2qc.js → chunk-en8s7tet.js} +3 -3
  81. package/dist/{chunk-dxt9j0da.js → chunk-f4a1my6v.js} +2 -2
  82. package/dist/{chunk-mvv5xmap.js → chunk-fexvhys2.js} +2 -2
  83. package/dist/{chunk-qnk5jk1b.js → chunk-frbeen15.js} +2 -2
  84. package/dist/{chunk-s2k5xynq.js → chunk-frqg34kq.js} +2 -2
  85. package/dist/{chunk-753s76b6.js → chunk-g5gz25jy.js} +2 -2
  86. package/dist/{chunk-2w576ygb.js → chunk-gkv8w3v0.js} +2 -2
  87. package/dist/{chunk-a1kmc6t8.js → chunk-gtahrx8j.js} +3 -3
  88. package/dist/{chunk-hh498geh.js → chunk-h2gng003.js} +6 -6
  89. package/dist/{chunk-dgnk7h62.js → chunk-j3tka93v.js} +2 -2
  90. package/dist/{chunk-kw487283.js → chunk-jkwf97cs.js} +2 -2
  91. package/dist/{chunk-qg1b5k6m.js → chunk-jzkmsbpe.js} +2 -2
  92. package/dist/{chunk-ek06eyp4.js → chunk-kjtd3wc3.js} +1 -1
  93. package/dist/{chunk-zg2342s2.js → chunk-kq8kz0jn.js} +2 -2
  94. package/dist/chunk-m2jsfvs2.js +1 -0
  95. package/dist/{chunk-4wkpatzz.js → chunk-m2xmz1ag.js} +2 -2
  96. package/dist/chunk-mr1azhef.js +1 -0
  97. package/dist/{chunk-svt0t387.js → chunk-mzh48e09.js} +2 -2
  98. package/dist/chunk-n1tjf64a.js +2 -0
  99. package/dist/chunk-n5xqjct2.js +1 -0
  100. package/dist/chunk-n8kfbg68.js +2 -0
  101. package/dist/{chunk-znyyzs85.js → chunk-nact4a4b.js} +2 -2
  102. package/dist/chunk-nbkkfyss.js +2 -0
  103. package/dist/{chunk-9t8ptjct.js → chunk-nt224frq.js} +2 -2
  104. package/dist/{chunk-mk379yt7.js → chunk-p1wnt0e5.js} +2 -2
  105. package/dist/{chunk-fpx4ng0t.js → chunk-pafshe3v.js} +2 -2
  106. package/dist/{chunk-xxkdv1zf.js → chunk-pv35kspb.js} +1 -1
  107. package/dist/{chunk-c9k66x5g.js → chunk-pvj43sjx.js} +2 -2
  108. package/dist/chunk-pzth3knm.js +2 -0
  109. package/dist/chunk-q4btsq6a.js +3 -0
  110. package/dist/chunk-q6km9nha.js +2 -0
  111. package/dist/chunk-qpmjezsw.js +1 -0
  112. package/dist/{chunk-d6840cvf.js → chunk-qsg1c5cc.js} +2 -2
  113. package/dist/chunk-qvknvzqn.js +2 -0
  114. package/dist/{chunk-y6r6tzfh.js → chunk-qxabrz98.js} +2 -2
  115. package/dist/chunk-r4r5ythb.js +2 -0
  116. package/dist/{chunk-gtqwgjjg.js → chunk-r9p03chx.js} +2 -2
  117. package/dist/{chunk-r0t8zj4g.js → chunk-rvr6zj7p.js} +2 -2
  118. package/dist/{chunk-023yzyq8.js → chunk-rxc15vtr.js} +2 -2
  119. package/dist/{chunk-w45d5th9.js → chunk-s0ef3h7b.js} +2 -2
  120. package/dist/{chunk-ckft9abb.js → chunk-s55n9cby.js} +2 -2
  121. package/dist/{chunk-6nyba0m4.js → chunk-t1j88bvm.js} +2 -2
  122. package/dist/{chunk-ds6avzj3.js → chunk-tp1gaw68.js} +2 -2
  123. package/dist/chunk-tq6ekz3s.js +2 -0
  124. package/dist/{chunk-8a1j96d1.js → chunk-vk36fprb.js} +2 -2
  125. package/dist/chunk-vzy4vwqr.js +2 -0
  126. package/dist/{chunk-chwg3na0.js → chunk-w38vbf7h.js} +2 -2
  127. package/dist/chunk-wpdn3rx8.js +1 -0
  128. package/dist/chunk-x7jtngzd.js +2 -0
  129. package/dist/chunk-x8kxqtva.js +2 -0
  130. package/dist/{chunk-3ah1ez70.js → chunk-xe52kj6h.js} +5 -5
  131. package/dist/chunk-xfx689xm.js +3 -0
  132. package/dist/{chunk-bbwb4555.js → chunk-y2z94rrh.js} +2 -2
  133. package/dist/{chunk-7avpdkmf.js → chunk-y3567zfn.js} +2 -2
  134. package/dist/{chunk-kfs19vc5.js → chunk-y6afvrnv.js} +2 -2
  135. package/dist/{chunk-y0psrvcc.js → chunk-yh9qdb2k.js} +3 -3
  136. package/dist/{chunk-6ss1981q.js → chunk-ykp85wc1.js} +2 -2
  137. package/dist/chunk-z3mp9z01.js +2 -0
  138. package/dist/{chunk-hz1pgnqp.js → chunk-z4zm74ge.js} +2 -2
  139. package/dist/chunk-zjmqne2f.js +2 -0
  140. package/dist/chunk-zynyx32t.js +2 -0
  141. package/dist/chunk-zzhwfrzb.js +2 -0
  142. package/dist/codex/activity-group.js +1 -1
  143. package/dist/codex/assistant-message.js +1 -1
  144. package/dist/codex/async-question-card.js +1 -1
  145. package/dist/codex/disclosure-state.js +1 -1
  146. package/dist/codex/edited-files-card.js +1 -1
  147. package/dist/codex/image-view-activity.js +1 -1
  148. package/dist/codex/markdown-renderer.js +1 -1
  149. package/dist/codex/navigation-audio.js +1 -1
  150. package/dist/codex/navigation-preview.js +1 -1
  151. package/dist/codex/navigation-rail.js +1 -1
  152. package/dist/codex/patch-view.js +1 -1
  153. package/dist/codex/plan.js +1 -1
  154. package/dist/codex/timeline-virtualizer.js +1 -1
  155. package/dist/codex/turn-activity.js +1 -1
  156. package/dist/codex/user-message.js +1 -1
  157. package/dist/codex/virtualized-turn-list.js +1 -1
  158. package/dist/composer/completion-filter.js +1 -1
  159. package/dist/composer/completion-menu.js +1 -1
  160. package/dist/composer/completion-trigger.js +1 -1
  161. package/dist/composer/effort-slider.js +1 -1
  162. package/dist/composer/menu-radio.js +1 -1
  163. package/dist/composer/model-select.js +1 -1
  164. package/dist/composer/permission-mode-select.js +1 -1
  165. package/dist/composer/prompt-input-attachments.js +1 -1
  166. package/dist/composer/prompt-input-clipboard.js +1 -1
  167. package/dist/composer/prompt-input-context.js +1 -1
  168. package/dist/composer/prompt-input-textarea.d.ts +1 -1
  169. package/dist/composer/prompt-input-textarea.js +1 -1
  170. package/dist/composer/prompt-input.js +1 -1
  171. package/dist/conversation/action-card.js +1 -1
  172. package/dist/conversation/composer/composer.js +1 -1
  173. package/dist/conversation/composer/config-options.js +1 -1
  174. package/dist/conversation/composer/context.js +1 -1
  175. package/dist/conversation/composer/drafts.js +1 -1
  176. package/dist/conversation/composer/file-items.js +1 -1
  177. package/dist/conversation/composer/long-text.js +1 -1
  178. package/dist/conversation/composer/mention-chips.js +1 -1
  179. package/dist/conversation/composer/mention-uri.js +1 -1
  180. package/dist/conversation/composer/model-menu.js +1 -1
  181. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  182. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  183. package/dist/conversation/composer/prediction.js +1 -1
  184. package/dist/conversation/composer/slash-command-button.js +1 -1
  185. package/dist/conversation/composer/submit-button.js +1 -1
  186. package/dist/conversation/composer/usage-meter.js +1 -1
  187. package/dist/conversation/context.js +1 -1
  188. package/dist/conversation/conversation-body.js +1 -1
  189. package/dist/conversation/conversation-view.js +1 -1
  190. package/dist/conversation/conversation.d.ts +1 -0
  191. package/dist/conversation/conversation.js +1 -1
  192. package/dist/conversation/diff-modal.js +1 -1
  193. package/dist/conversation/session-actions.js +1 -1
  194. package/dist/conversation/subagent-sessions.d.ts +3 -0
  195. package/dist/conversation/subagent-sessions.js +1 -0
  196. package/dist/image-lightbox.js +1 -1
  197. package/dist/image-preview-dialog.js +1 -1
  198. package/dist/lib/code-highlighter.js +1 -1
  199. package/dist/lib/fuzzy.js +1 -1
  200. package/dist/lib/group-blocks.js +1 -1
  201. package/dist/lib/image-encode.js +1 -1
  202. package/dist/lib/limits.js +1 -1
  203. package/dist/lib/markdown-parser.js +1 -1
  204. package/dist/lib/markdown-rules.js +1 -1
  205. package/dist/lib/model-name.js +1 -1
  206. package/dist/lib/pointer-centered-zoom.js +1 -1
  207. package/dist/lib/prepare-prompt-files.js +1 -1
  208. package/dist/lib/stream-style.js +1 -1
  209. package/dist/lib/streaming-markdown.js +1 -1
  210. package/dist/locales.d.ts +143 -0
  211. package/dist/locales.js +1 -1
  212. package/dist/search/chat-search.js +1 -1
  213. package/dist/search/dom-matches.js +1 -1
  214. package/dist/search/find-bar.js +1 -1
  215. package/dist/search/literal-matches.js +1 -1
  216. package/dist/session-list/archived-sessions.js +1 -1
  217. package/dist/session-list/highlight.js +1 -1
  218. package/dist/session-list/host.js +1 -1
  219. package/dist/session-list/hover-info-card.js +1 -1
  220. package/dist/session-list/locales.js +1 -1
  221. package/dist/session-list/navigation.js +1 -1
  222. package/dist/session-list/overflow-marquee.js +1 -1
  223. package/dist/session-list/row-stop-button.js +1 -1
  224. package/dist/session-list/session-groups.js +1 -1
  225. package/dist/session-list/session-info-card.js +1 -1
  226. package/dist/session-list/session-list.js +1 -1
  227. package/dist/session-list/session-row.js +1 -1
  228. package/dist/session-list/session-state-dot.js +1 -1
  229. package/dist/session-list/session-state-menu.js +1 -1
  230. package/dist/session-list/sidebar-overlay.js +1 -1
  231. package/dist/session-list/trailing-swap.js +1 -1
  232. package/dist/session-list/use-activity-preview.js +1 -1
  233. package/dist/session-list/use-project-sessions.js +1 -1
  234. package/dist/session-list/virtual-session-rows.js +1 -1
  235. package/dist/session-timeline/activity-group.js +1 -1
  236. package/dist/session-timeline/activity-projection.js +1 -1
  237. package/dist/session-timeline/assistant-content.js +1 -1
  238. package/dist/session-timeline/assistant-turn.js +1 -1
  239. package/dist/session-timeline/async-questions.js +1 -1
  240. package/dist/session-timeline/edited-files-card.js +1 -1
  241. package/dist/session-timeline/history-timeline.js +1 -1
  242. package/dist/session-timeline/host.js +1 -1
  243. package/dist/session-timeline/navigation-rail.js +1 -1
  244. package/dist/session-timeline/plan.js +1 -1
  245. package/dist/session-timeline/question-reply.js +1 -1
  246. package/dist/session-timeline/resource-content.js +1 -1
  247. package/dist/session-timeline/session-timeline.js +1 -1
  248. package/dist/session-timeline/timeline-registry.js +1 -1
  249. package/dist/session-timeline/turn-activity.js +1 -1
  250. package/dist/session-timeline/turn-error.js +1 -1
  251. package/dist/session-timeline/turn-retry.js +1 -1
  252. package/dist/session-timeline/turn-time.js +1 -1
  253. package/dist/session-timeline/turns.js +1 -1
  254. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  255. package/dist/session-timeline/user-message.js +1 -1
  256. package/dist/ui/alert.js +1 -1
  257. package/dist/ui/badge.js +1 -1
  258. package/dist/ui/button.js +1 -1
  259. package/dist/ui/card.d.ts +1 -1
  260. package/dist/ui/card.js +1 -1
  261. package/dist/ui/checkbox.js +1 -1
  262. package/dist/ui/dialog.d.ts +2 -2
  263. package/dist/ui/dialog.js +1 -1
  264. package/dist/ui/dropdown-menu.d.ts +2 -2
  265. package/dist/ui/dropdown-menu.js +1 -1
  266. package/dist/ui/empty.js +1 -1
  267. package/dist/ui/field.d.ts +1 -1
  268. package/dist/ui/field.js +1 -1
  269. package/dist/ui/hover-card.js +1 -1
  270. package/dist/ui/input-group.d.ts +4 -3
  271. package/dist/ui/input-group.js +1 -1
  272. package/dist/ui/input.js +1 -1
  273. package/dist/ui/kbd.js +1 -1
  274. package/dist/ui/label.js +1 -1
  275. package/dist/ui/radio-group.js +1 -1
  276. package/dist/ui/select.d.ts +2 -2
  277. package/dist/ui/select.js +1 -1
  278. package/dist/ui/separator.js +1 -1
  279. package/dist/ui/skeleton.js +1 -1
  280. package/dist/ui/spinner.js +1 -1
  281. package/dist/ui/switch.js +1 -1
  282. package/dist/ui/textarea.js +1 -1
  283. package/dist/ui/tooltip.js +1 -1
  284. package/package.json +3 -3
  285. package/dist/chunk-1dh0q11h.js +0 -4
  286. package/dist/chunk-1drkvxzk.js +0 -1
  287. package/dist/chunk-1hy64ewz.js +0 -1
  288. package/dist/chunk-24b1z856.js +0 -2
  289. package/dist/chunk-2pha46d9.js +0 -1
  290. package/dist/chunk-31x6chk8.js +0 -2
  291. package/dist/chunk-3g66qg03.js +0 -2
  292. package/dist/chunk-3q6ssrs3.js +0 -2
  293. package/dist/chunk-6kn920c5.js +0 -1
  294. package/dist/chunk-76w1a72z.js +0 -2
  295. package/dist/chunk-8712sy9s.js +0 -1
  296. package/dist/chunk-8jpm8fnf.js +0 -1
  297. package/dist/chunk-9hvbm4be.js +0 -2
  298. package/dist/chunk-9v94xnhp.js +0 -2
  299. package/dist/chunk-a2hygrpr.js +0 -1
  300. package/dist/chunk-ak0k5vg6.js +0 -1
  301. package/dist/chunk-ana59z25.js +0 -1
  302. package/dist/chunk-aprxk7c2.js +0 -2
  303. package/dist/chunk-b1vw42he.js +0 -2
  304. package/dist/chunk-b3nt7axf.js +0 -2
  305. package/dist/chunk-b5z75meq.js +0 -2
  306. package/dist/chunk-b65vdzz3.js +0 -1
  307. package/dist/chunk-bna24ggr.js +0 -2
  308. package/dist/chunk-bzk6wn2s.js +0 -3
  309. package/dist/chunk-ee9pzqnq.js +0 -2
  310. package/dist/chunk-evx9d147.js +0 -2
  311. package/dist/chunk-f3e3ged2.js +0 -2
  312. package/dist/chunk-f7n8erng.js +0 -2
  313. package/dist/chunk-fa0kzj3j.js +0 -2
  314. package/dist/chunk-gbbpdhg6.js +0 -2
  315. package/dist/chunk-gpz9f9zq.js +0 -2
  316. package/dist/chunk-hgj33wbd.js +0 -2
  317. package/dist/chunk-hpyaxv6h.js +0 -2
  318. package/dist/chunk-ht28382s.js +0 -2
  319. package/dist/chunk-hw99hhjf.js +0 -1
  320. package/dist/chunk-jr591zg2.js +0 -2
  321. package/dist/chunk-jtv179nm.js +0 -2
  322. package/dist/chunk-ks05sstp.js +0 -1
  323. package/dist/chunk-nad1erxy.js +0 -3
  324. package/dist/chunk-ncekagm6.js +0 -1
  325. package/dist/chunk-nwrbpw97.js +0 -2
  326. package/dist/chunk-qv4x469a.js +0 -2
  327. package/dist/chunk-rag9xsg5.js +0 -2
  328. package/dist/chunk-rrrpp44m.js +0 -2
  329. package/dist/chunk-rtg6xfgr.js +0 -2
  330. package/dist/chunk-sbyn62qx.js +0 -2
  331. package/dist/chunk-shsyer15.js +0 -2
  332. package/dist/chunk-tt40vzdd.js +0 -2
  333. package/dist/chunk-vc9ts6wp.js +0 -2
  334. package/dist/chunk-x2tsybks.js +0 -3
  335. package/dist/chunk-xd5rqbwp.js +0 -1
  336. package/dist/chunk-y1kkt0m2.js +0 -3
  337. package/dist/chunk-zp5ntx27.js +0 -2
  338. package/dist/chunk-zw3h5xgf.js +0 -1
  339. package/dist/ui/input-group-textarea.d.ts +0 -2
  340. package/dist/ui/input-group-textarea.js +0 -1
@@ -0,0 +1 @@
1
+ import{e}from"./chunk-wpdn3rx8.js";import{s}from"./chunk-96x0d2vd.js";import{k}from"./chunk-da6d6wze.js";import{cva as u}from"class-variance-authority";import{cn as n}from"cn";import{jsx as r}from"react/jsx-runtime";function Xn({className:a,...t}){return r("div",{"data-slot":"input-group",role:"group",className:n("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5",a),...t})}var d=u("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first ps-2 has-[>button]:-ms-1 has-[>kbd]:ms-[-0.15rem]","inline-end":"order-last pe-2 has-[>button]:-me-1 has-[>kbd]:me-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function zt({className:a,align:t="inline-start",...i}){return r("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:n(d({align:t}),a),onClick:(o)=>{if(o.target.closest("button"))return;o.currentTarget.parentElement?.querySelector("input")?.focus()},...i})}var l=u("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function Ut({className:a,type:t="button",variant:i="ghost",size:o="xs",...p}){return r(e,{type:t,"data-size":o,variant:i,className:n(l({size:o}),a),...p})}function ai({className:a,...t}){return r("span",{className:n("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...t})}function si({className:a,...t}){return r(s,{"data-slot":"input-group-control",className:n("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",a),...t})}function Yn({className:a,...t}){return r(k,{"data-slot":"input-group-control",className:n("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",a),...t})}export{Xn,zt,Ut,ai,si,Yn};
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-y6r6tzfh.js";import{I}from"./chunk-ckft9abb.js";import{isContentEntry as b,isImage as N,isResourceLink as w}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as C,ImageIcon as S,LoaderCircleIcon as A,RefreshCwIcon as R}from"lucide-react";import{useEffect as B,useState as h}from"react";import{jsx as n,jsxs as y}from"react/jsx-runtime";function pe(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function T(e){let r=[];for(let[c,l]of e.content.entries()){if(!b(l))continue;let o=l.content;if(N(o))r.push({key:`${e.id}:${c}`,src:`data:${o.mimeType};base64,${o.data}`,alt:e.title??""});if(w(o))r.push({key:`${e.id}:${c}`,path:o.uri,alt:o.name})}if(r.length)return r;let i=e.rawInput;if(i!==null&&typeof i==="object"&&"path"in i&&typeof i.path==="string")return[{key:e.id,path:i.path,alt:i.path.split(/[\\/]/).at(-1)??i.path}];throw Error(`Image view ${e.id} has no image source`)}function E({images:e}){let{loadImage:r,openImageGallery:i,openImage:c,t:l}=a(),[o,g]=h({}),[v,x]=h(0),f=JSON.stringify(e);B(()=>{let t=!0,u=JSON.parse(f);g({});for(let s of u)(s.src!==void 0?Promise.resolve(s.src):s.path!==void 0&&r?r(s.path):Promise.reject(Error("Image loading is unavailable"))).then((d)=>{if(t)g((p)=>({...p,[s.key]:{src:d}}))},()=>{if(t)g((d)=>({...d,[s.key]:{error:!0}}))});return()=>{t=!1}},[f,r,v]);let k=e.flatMap((t)=>{let u=o[t.key];return u&&"src"in u?[{src:u.src,alt:t.alt}]:[]});return n("div",{className:"codex-image-thumbnails",children:e.map((t,u)=>{let s=o[t.key];if(!s)return n("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:n(A,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in s)return n("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>x((m)=>m+1),children:n(R,{"aria-hidden":"true"})},t.key);return n("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let m=e.slice(0,u).filter((d)=>{let p=o[d.key];return p&&"src"in p}).length;if(i)i(k,m);else c?.(s.src)},children:n("img",{src:s.src,alt:t.alt,draggable:!1})},t.key)})})}function lo({blocks:e}){let{t:r}=a(),i=e.flatMap(T),[c,l]=I(`image-view:${e[0].id}`,!1);return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":c,onClick:()=>l((o)=>!o),children:[y("span",{className:"codex-activity-label",children:[n(S,{className:"codex-activity-icon","aria-hidden":"true"}),n("span",{className:"codex-activity-leading",children:r("stream.codex.viewedImages",{count:i.length})})]}),n(C,{className:c?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),c&&n(E,{images:i})]})}
2
- export{pe,lo};
1
+ import{a}from"./chunk-qxabrz98.js";import{R}from"./chunk-s55n9cby.js";import{isContentEntry as k,isImage as b,isResourceLink as N}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as w,ImageIcon as C,LoaderCircleIcon as S,RefreshCwIcon as A}from"lucide-react";import{useEffect as B,useState as h}from"react";import{jsx as n,jsxs as y}from"react/jsx-runtime";function we(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function T(e){let r=[];for(let[c,l]of e.content.entries()){if(!k(l))continue;let o=l.content;if(b(o))r.push({key:`${e.id}:${c}`,src:`data:${o.mimeType};base64,${o.data}`,alt:e.title??""});if(N(o))r.push({key:`${e.id}:${c}`,path:o.uri,alt:o.name})}if(r.length)return r;let i=e.rawInput;if(i!==null&&typeof i==="object"&&"path"in i&&typeof i.path==="string")return[{key:e.id,path:i.path,alt:i.path.split(/[\\/]/).at(-1)??i.path}];throw Error(`Image view ${e.id} has no image source`)}function E({images:e}){let{loadImage:r,openImageGallery:i,openImage:c,t:l}=a(),[o,g]=h({}),[v,x]=h(0),f=JSON.stringify(e);B(()=>{let t=!0,u=JSON.parse(f);g({});for(let s of u)(s.src!==void 0?Promise.resolve(s.src):s.path!==void 0&&r?r(s.path):Promise.reject(Error("Image loading is unavailable"))).then((d)=>{if(t)g((p)=>({...p,[s.key]:{src:d}}))},()=>{if(t)g((d)=>({...d,[s.key]:{error:!0}}))});return()=>{t=!1}},[f,r,v]);let I=e.flatMap((t)=>{let u=o[t.key];return u&&"src"in u?[{src:u.src,alt:t.alt}]:[]});return n("div",{className:"codex-image-thumbnails",children:e.map((t,u)=>{let s=o[t.key];if(!s)return n("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:n(S,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in s)return n("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>x((m)=>m+1),children:n(A,{"aria-hidden":"true"})},t.key);return n("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let m=e.slice(0,u).filter((d)=>{let p=o[d.key];return p&&"src"in p}).length;if(i)i(I,m);else c?.(s.src)},children:n("img",{src:s.src,alt:t.alt,draggable:!1})},t.key)})})}function Uo({blocks:e}){let{t:r}=a(),i=e.flatMap(T),[c,l]=R(`image-view:${e[0].id}`,!1);return y("div",{className:"codex-activity-item",children:[y("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":c,onClick:()=>l((o)=>!o),children:[y("span",{className:"codex-activity-label",children:[n(C,{className:"codex-activity-icon","aria-hidden":"true"}),n("span",{className:"codex-activity-leading",children:r("stream.codex.viewedImages",{count:i.length})})]}),n(w,{className:c?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),c&&n(E,{images:i})]})}
2
+ export{we,Uo};
@@ -0,0 +1,2 @@
1
+ import{h,cn,er,dn,tr,un,nr}from"./chunk-en8s7tet.js";import{t,ie,ke,n}from"./chunk-q6km9nha.js";import{oe}from"./chunk-39sbgvd3.js";import{createStore as E}from"@alwith/api/client";import{isText as w,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var b=E({entries:{}});function p(r,e){b.setState((s)=>({entries:{...s.entries,[r]:e}}))}function v(r,e){let s=Q(e),a=r.items.findLast((i)=>Q(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&Q(a)===s}function M(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...un(s._meta),...s.content.filter(w).flatMap((i)=>un(i._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:r,item:e,question:s,index:a}){let i=ie(),{t:l}=t(),m=cn(e.id,a),c=JSON.stringify([r,m]),u=ke(b,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),k=n((o)=>o.connection==="ready"),f=u?.draft??er(s),x=d===void 0?u?.accepted:M(d,m)??u?.accepted,A=d!==void 0&&v(d,e),D=!d?.subagent&&k&&d?.attached&&!d.restoring&&!d.readOnly,g=x!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!A?"closed":!D?"unavailable":"pending",C=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!v(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=dn(s,f);if(!S.trim())return;let q={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:tr(q),_meta:{codex:{questionReply:q}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(nr,{question:s,draft:f,status:g,answer:x,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function ln({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=h(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!v(s,e))return y(oe,{content:e.content.some((i)=>!w(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(O,{sessionId:r,item:e,question:i,index:l},cn(e.id,l)))})}
2
+ export{ln};
@@ -1,2 +1,2 @@
1
- import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function lr({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function a(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function v(t){let{Markdown:o}=a();return e(o,{...t})}
2
- export{lr,a,v};
1
+ import{createContext as i,useContext as r}from"react";import{jsx as e}from"react/jsx-runtime";var n=i(null);function cr({host:t,children:o}){return e(n.Provider,{value:t,children:o})}function a(){let t=r(n);if(t===null)throw Error("Activity host is missing");return t}function x(t){let{Markdown:o}=a();return e(o,{...t})}
2
+ export{cr,a,x};
@@ -0,0 +1,2 @@
1
+ import{nt,J}from"./chunk-tq6ekz3s.js";import{_}from"./chunk-2pj3pcc7.js";import{q}from"./chunk-djmnmbm2.js";import{ee}from"./chunk-3919sqde.js";import{Se,ce,Ie}from"./chunk-2r3sfmyf.js";import{PreviewCard as x}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as I}from"lucide-react";import{createContext as S,useContext as k,useLayoutEffect as T,useState as R}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as G}from"react/jsx-runtime";function vn(o){if(o.as==="ul"){let{as:i,className:r,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",r),...a})}let{as:t,className:n,...s}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...s})}function Te({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function Ze({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[30px] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function At({open:o,onOpenChange:t,tooltip:n,leading:s,label:i,count:r,countLabel:a,active:l=!1,actions:N,headerChildren:f,wrapHeader:u,onHeaderClick:w,children:C}){let b=()=>{w?.(),t(!o)},m=p(Se,"relative flex h-[30px] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),h=d(G,{children:[s!=null&&e(Te,{children:s}),f??e(_,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Ie,{content:r!==void 0?e(ce,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??r})}):void 0,actions:N})})]}),P=f==null?d("div",{"data-active":l?"":void 0,title:n,className:p(m,J),onClick:b,onKeyDown:(c)=>{if(c.target!==c.currentTarget)return;if(c.key!=="Enter"&&c.key!==" ")return;c.preventDefault(),b()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),h]}):e("div",{"data-active":l?"":void 0,className:m,children:h});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[u===void 0?P:u(P),o&&e(vn,{className:"mt-0.5",children:C})]})}var H=S(()=>{}),O=S(()=>{});function Je(){return k(O)}function et(){return k(H)}function tt({active:o=!1,state:t,interruption:n=null,leased:s=!1,media:i,title:r,hoverCard:a,onHoverCardOpenChange:l,subtitle:N,preview:f,listeningPorts:u,onOpenPort:w,accessory:C,meta:b,hint:m,actions:h,className:P,...c}){let y=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(Se,nt,"group/navigation-row focus-visible:outline-ring flex h-[30px] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(f||u!=null&&u.length>0)&&"h-auto min-h-[30px] py-2.5",P),...c,children:[e(Te,{children:t!=null?e(q,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(_,{className:p("leading-none",t==="done"&&"font-semibold"),children:r}),N!=null&&e(_,{className:"text-muted-foreground text-xs",children:N}),f&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:f}),u!=null&&u.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:u.map((v)=>w?d("button",{type:"button",className:"underline",onPointerDown:(g)=>g.stopPropagation(),onKeyDown:(g)=>g.stopPropagation(),onClick:(g)=>{g.stopPropagation(),w(v)},children:[":",v]},v):d("span",{children:[":",v]},v))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[s&&e(I,{className:"text-muted-foreground size-3"}),e(Ie,{content:C!=null?e(ce,{children:C}):b??e(ce,{}),actions:h}),m!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:m})]})]});if(a==null)return y;return e(L,{row:y,onOpenChange:l,children:a})}function L({row:o,children:t,onOpenChange:n}){let[s,i]=R(!1),[r,a]=R(!1),l=s||r;return T(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(H.Provider,{value:a,children:e(O.Provider,{value:()=>{i(!1),a(!1)},children:e(E,{open:l,onOpenChange:i,trigger:o,children:t})})})}function E({open:o,onOpenChange:t,trigger:n,children:s,side:i="inline-end",sideOffset:r=2,align:a="start",alignOffset:l}){return ee(o),d(x.Root,{open:o,onOpenChange:t,children:[e(x.Trigger,{render:n,delay:700,closeDelay:100}),e(x.Portal,{children:e(x.Positioner,{side:i,sideOffset:r,align:a,alignOffset:l,className:"isolate z-50",children:e(x.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:s})})})})]})}
2
+ export{vn,Te,Ze,At,Je,et,tt};
@@ -1,2 +1,2 @@
1
- import{er,oe}from"./chunk-qv4x469a.js";import{tr}from"./chunk-ddtb692j.js";import{or,an,sn}from"./chunk-ks05sstp.js";import{cn,dn,Be,Ue,un}from"./chunk-vcbv30ph.js";import{cn as P}from"cn";import{ArrowUpIcon as fe,Loader2Icon as ge,SquareIcon as be,XIcon as ve}from"lucide-react";import{Children as Y,useCallback as h,useEffect as F,useMemo as he,useRef as M,useState as Pe}from"react";import{flushSync as Ie}from"react-dom";import{jsx as a,jsxs as ye}from"react/jsx-runtime";function Z(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var Ko=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:ee,globalDrop:C,syncHiddenInput:R,maxFiles:z,maxFileSize:H,onError:b,onSubmit:te,children:re,...ne})=>{let s=Ue(),l=!!s,se=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),k=M(!1),[ie,D]=Pe([]),c=l?s.attachments.files:ie,U=M(c);U.current=c;let ae=h(()=>{x.current?.click()},[]),B=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),O=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),ue=h((e)=>{let r=[...e],t=r.filter((i)=>B(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>H?i.size<=H:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof z==="number"?Math.max(0,z-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let Q=[];for(let T of _){let V=I?.sourcePath(T);Q.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:O(T),filename:T.name,size:T.size,lastModified:T.lastModified,...V===void 0?{}:{sourcePath:V}})}return[...i,...Q]})},[I,O,B,z,H,b]),le=h((e)=>D((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),pe=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),W=l?s.attachments.add:ue,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(er(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${oe}MB.`});return}}W(r)},[c,W,b]),G=l?s.attachments.remove:le,N=l?s.attachments.clear:pe,j=l?s.attachments.openFileDialog:ae;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(R&&x.current&&c.length===0)x.current.value=""},[c,R]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of U.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let me=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},q=he(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:G,clear:N,openFileDialog:j,fileInputRef:x}),[c,L,G,N,j]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let X=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Z(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Z(t)===n)t.reset();N()};k.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await tr(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await te({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{k.current=!1}},ce=(e)=>{e.preventDefault(),X(e).catch(y)},de=h((e)=>{if(!e.trim())return;if(l&&s)Ie(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),J=a(dn.Provider,{value:()=>X(null),children:ye(cn.Provider,{value:de,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:ee,onChange:me,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:ce,ref:A,"data-tour":"chat-input",...ne,children:a(or,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",se&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:re})})]})});return l?a(Be.Provider,{value:q,children:J}):a(un.Provider,{value:q,children:J})};function Qo({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function Xo({className:u,...o}){return a(an,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function Yo({className:u,...o}){return a(an,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function Zo({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var K=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||Y.count(y.children)<=1?"icon-xs":"xs";return a(sn,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||Y.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},Jo=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(fe,{className:"size-4"});if(d==="submitted")g=a(ge,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(be,{className:"size-3 fill-current"});else if(d==="error")g=a(ve,{className:"size-4"});return a(sn,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
2
- export{Ko,Qo,Xo,Yo,Zo,K,Jo};
1
+ import{jn,ne}from"./chunk-bj5ma2sv.js";import{Kn}from"./chunk-d5w1nvrz.js";import{Xn,zt,Ut}from"./chunk-qpmjezsw.js";import{$t,qt,De,He,Vt}from"./chunk-7zrnt6zw.js";import{cn as P}from"cn";import{ArrowUpIcon as fe,Loader2Icon as ge,SquareIcon as be,XIcon as ve}from"lucide-react";import{Children as Y,useCallback as h,useEffect as F,useMemo as he,useRef as M,useState as Pe}from"react";import{flushSync as Ie}from"react-dom";import{jsx as a,jsxs as ye}from"react/jsx-runtime";function Z(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var Un=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:ee,globalDrop:C,syncHiddenInput:R,maxFiles:z,maxFileSize:H,onError:b,onSubmit:te,children:re,...oe})=>{let s=He(),l=!!s,se=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),k=M(!1),[ie,D]=Pe([]),c=l?s.attachments.files:ie,U=M(c);U.current=c;let ae=h(()=>{x.current?.click()},[]),B=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),O=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),ue=h((e)=>{let r=[...e],t=r.filter((i)=>B(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>H?i.size<=H:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof z==="number"?Math.max(0,z-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let Q=[];for(let T of _){let V=I?.sourcePath(T);Q.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:O(T),filename:T.name,size:T.size,lastModified:T.lastModified,...V===void 0?{}:{sourcePath:V}})}return[...i,...Q]})},[I,O,B,z,H,b]),le=h((e)=>D((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),pe=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),W=l?s.attachments.add:ue,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(jn(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${ne}MB.`});return}}W(r)},[c,W,b]),j=l?s.attachments.remove:le,N=l?s.attachments.clear:pe,q=l?s.attachments.openFileDialog:ae;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(R&&x.current&&c.length===0)x.current.value=""},[c,R]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of U.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let me=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},X=he(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:j,clear:N,openFileDialog:q,fileInputRef:x}),[c,L,j,N,q]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let J=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Z(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Z(t)===n)t.reset();N()};k.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await Kn(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await te({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{k.current=!1}},ce=(e)=>{e.preventDefault(),J(e).catch(y)},de=h((e)=>{if(!e.trim())return;if(l&&s)Ie(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),K=a(qt.Provider,{value:()=>J(null),children:ye($t.Provider,{value:de,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:ee,onChange:me,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:ce,ref:A,"data-tour":"chat-input",...oe,children:a(Xn,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",se&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:re})})]})});return l?a(De.Provider,{value:X,children:K}):a(Vt.Provider,{value:X,children:K})};function $n({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function qn({className:u,...o}){return a(zt,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function Vn({className:u,...o}){return a(zt,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function Wn({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var G=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||Y.count(y.children)<=1?"icon-xs":"xs";return a(Ut,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||Y.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},Gn=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(fe,{className:"size-4"});if(d==="submitted")g=a(ge,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(be,{className:"size-3 fill-current"});else if(d==="error")g=a(ve,{className:"size-4"});return a(Ut,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
2
+ export{Un,$n,qn,Vn,Wn,G,Gn};
@@ -1,2 +1,2 @@
1
- async function nr(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
2
- export{nr};
1
+ async function Qn(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
2
+ export{Qn};
@@ -1,2 +1,2 @@
1
- var ii=280;function On({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function me({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function Dt({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function Fn({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function Bn({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function zn({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
2
- export{ii,On,me,Dt,Fn,Bn,zn};
1
+ var ki=280;function ho({entries:i,gapPx:t,measuredHeightsByKey:o,leadingInsetPx:e=0}){let n=[],r=[],d=new Map,s=[],u=e;for(let[x,a]of i.entries()){d.set(a.turnKey,x);for(let h of a.aliases??[])d.set(h,x);s.push(a.turnKey),r.push(u);let f=a.aliases?.map((h)=>o[h]).find((h)=>h!==void 0),m=o[a.turnKey]??f??a.estimatedHeightPx??280;if(n.push(m),u+=m,x<i.length-1)u+=t}return{bottomOffsetsPx:r.map((x,a)=>{let f=n[a];if(f===void 0)throw Error(`Codex turn height is missing at index ${a}`);return u-x-f}),heightsPx:n,topOffsetsPx:r,totalHeightPx:u,turnIndexByKey:d,turnKeys:s}}function be({distanceFromBottomPx:i,layout:t,overscanCount:o,viewportHeightPx:e}){if(t.turnKeys.length===0)return{startIndex:0,endIndex:0};let n=Math.min(Math.max(0,i),t.totalHeightPx),r=Math.min(n+Math.max(0,e),t.totalHeightPx),d=g(t.bottomOffsetsPx,r),s=l(t.bottomOffsetsPx,t.heightsPx,n);return{startIndex:Math.max(0,d-o),endIndex:Math.min(t.turnKeys.length,Math.max(s,d+1)+o)}}function jt({anchorKey:i,layout:t,previousRange:o}){let e=t.turnIndexByKey.get(i);if(e===void 0)return null;return{startIndex:e,endIndex:Math.min(t.turnKeys.length,e+o.endIndex-o.startIndex)}}function vo({anchorKey:i,distanceFromBottomPx:t,nextLayout:o,previousLayout:e}){let n=e.turnIndexByKey.get(i),r=o.turnIndexByKey.get(i);if(n===void 0||r===void 0)return null;let d=e.bottomOffsetsPx[n],s=e.heightsPx[n],u=o.bottomOffsetsPx[r],x=o.heightsPx[r];if(d===void 0||s===void 0||u===void 0||x===void 0)throw Error(`Codex turn geometry is missing: ${i}`);return Math.max(0,t+u+x-d-s)}function xo({layout:i,turnKey:t,viewportHeightPx:o}){let e=i.turnIndexByKey.get(t);if(e===void 0)return null;let n=i.bottomOffsetsPx[e],r=i.heightsPx[e];if(n===void 0||r===void 0)throw Error(`Codex turn geometry is missing: ${t}`);return Math.max(0,n-o/2+r/2)}function yo({align:i,layout:t,targetHeightPx:o,targetOffsetPx:e,turnKey:n,viewportHeightPx:r}){let d=t.turnIndexByKey.get(n);if(d===void 0)return null;let s=t.bottomOffsetsPx[d],u=t.heightsPx[d];if(s===void 0||u===void 0)throw Error(`Codex turn geometry is missing: ${n}`);let x=s+u-e;return i==="top"?Math.max(0,x-r+10):Math.max(0,x-o/2-r/2)}function g(i,t){let o=0,e=i.length;while(o<e){let n=Math.floor((o+e)/2),r=i[n];if(r===void 0)throw Error(`Codex bottom offset is missing at index ${n}`);if(r<t)e=n;else o=n+1}return o}function l(i,t,o){let e=0,n=i.length;while(e<n){let r=Math.floor((e+n)/2),d=i[r],s=t[r];if(d===void 0||s===void 0)throw Error(`Codex turn geometry is missing at index ${r}`);if(d+s<=o)n=r;else e=r+1}return e}
2
+ export{ki,ho,be,jt,vo,xo,yo};
@@ -1,2 +1,2 @@
1
- import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function G({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
2
- export{G};
1
+ import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function X({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
2
+ export{X};
@@ -1,2 +1,2 @@
1
- import{useCallback as f,useState as r}from"react";var t=new Map;function I(o,e,a=!1){let[p,S]=r(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let k=f((c)=>{S((s)=>{let b=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(b):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,k]}
2
- export{I};
1
+ import{useCallback as f,useState as r}from"react";var t=new Map;function R(o,e,a=!1){let[p,S]=r(()=>({key:o,expanded:t.get(o)??e})),n=p.expanded;if(p.key!==o||a&&!t.has(o)&&n!==e)n=t.get(o)??e,S({key:o,expanded:n});let k=f((c)=>{S((s)=>{let b=s.key===o?s.expanded:t.get(o)??e,d=typeof c==="function"?c(b):c;return t.set(o,d),s.key===o?{key:o,expanded:d}:s})},[o,e]);return[n,k]}
2
+ export{R};
@@ -1,2 +1,2 @@
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 on({name:p,value:M,levels:h,disabled:c,onChange:P}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===M)),[v,d]=k(null),l=y(null),[I,x]=k(null),b=y(0),s=v??I??g,w=(t)=>{let n=++b.current;x(t);let e=()=>{if(b.current===n)x(null)};try{Promise.resolve(P(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=100,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)/Math.max(1,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)/Math.max(1,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{on};
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 Ft({name:p,value:M,levels:h,disabled:c,onChange:P}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===M)),[v,d]=k(null),l=y(null),[I,x]=k(null),b=y(0),s=v??I??g,w=(t)=>{let n=++b.current;x(t);let e=()=>{if(b.current===n)x(null)};try{Promise.resolve(P(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=100,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)/Math.max(1,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)/Math.max(1,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{Ft};
@@ -1,2 +1,2 @@
1
- import{Oo}from"./chunk-dgnk7h62.js";import{d,ir,u,m}from"./chunk-a2hygrpr.js";import{cn as M}from"cn";import{XIcon as L}from"lucide-react";import{useCallback as O,useEffect as z,useMemo as j,useRef as H,useState as S}from"react";import{jsx as i,jsxs as A}from"react/jsx-runtime";function _o({open:l,onOpenChange:P,url:h,filename:x,scale:v,onScaleChange:p,containerRef:T,containerClassName:I,dialogContentClassName:R,imageClassName:W}){let g=O((e)=>Math.min(4,Math.max(0.25,e)),[]),[Z,C]=S(1),o=g(v??Z),k=H(null),s=T??k,D=H(null),[f,N]=S({width:0,height:0}),[y,E]=S({width:0,height:0}),b=O((e)=>{let n=g(e);if(typeof p==="function"){p(n);return}C(n)},[p,g]);z(()=>{if(!l)return;if(!h)return;if(typeof v==="number")return;C(1)},[l,h,v]),z(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{N({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let X=O(()=>{b(1)},[b]),r=j(()=>{let{width:e,height:n}=y,{width:t,height:a}=f;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),w=e*c,_=n*c;return{width:w*o,height:_*o}},[o,y,f]);if(!h)return null;return i(d,{open:l,onOpenChange:P,children:A(u,{className:M("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",R),showCloseButton:!1,children:[i(m,{className:"sr-only",children:x||"Image preview"}),i(ir,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(L,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=D.current,w=a&&c?Oo({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(b(t),a&&w)requestAnimationFrame(()=>{a.scrollTo(w)})},className:M("h-full w-full scrollbar-thin overflow-auto",I),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(f.width,r.width),height:Math.max(f.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:x||"image preview",className:M("block object-contain select-none",W),decoding:"async",draggable:!1,ref:D,onDoubleClick:X,onLoad:(e)=>{let n=e.currentTarget;E({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))N({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
2
- export{_o};
1
+ import{Rn}from"./chunk-j3tka93v.js";import{u,go,m,p}from"./chunk-n5xqjct2.js";import{cn as M}from"cn";import{XIcon as L}from"lucide-react";import{useCallback as O,useEffect as z,useMemo as j,useRef as H,useState as S}from"react";import{jsx as i,jsxs as A}from"react/jsx-runtime";function Nn({open:l,onOpenChange:P,url:h,filename:x,scale:w,onScaleChange:v,containerRef:T,containerClassName:I,dialogContentClassName:R,imageClassName:W}){let g=O((e)=>Math.min(4,Math.max(0.25,e)),[]),[Z,C]=S(1),o=g(w??Z),k=H(null),s=T??k,D=H(null),[d,N]=S({width:0,height:0}),[y,E]=S({width:0,height:0}),b=O((e)=>{let n=g(e);if(typeof v==="function"){v(n);return}C(n)},[v,g]);z(()=>{if(!l)return;if(!h)return;if(typeof w==="number")return;C(1)},[l,h,w]),z(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{N({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let X=O(()=>{b(1)},[b]),r=j(()=>{let{width:e,height:n}=y,{width:t,height:a}=d;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),f=e*c,_=n*c;return{width:f*o,height:_*o}},[o,y,d]);if(!h)return null;return i(u,{open:l,onOpenChange:P,children:A(m,{className:M("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",R),showCloseButton:!1,children:[i(p,{className:"sr-only",children:x||"Image preview"}),i(go,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(L,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=D.current,f=a&&c?Rn({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(b(t),a&&f)requestAnimationFrame(()=>{a.scrollTo(f)})},className:M("h-full w-full scrollbar-thin overflow-auto",I),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(d.width,r.width),height:Math.max(d.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:x||"image preview",className:M("block object-contain select-none",W),decoding:"async",draggable:!1,ref:D,onDoubleClick:X,onLoad:(e)=>{let n=e.currentTarget;E({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))N({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
2
+ export{Nn};
@@ -0,0 +1,2 @@
1
+ var nt="chrome-hover hover:bg-foreground/8 data-[active=true]:bg-foreground/5",J="chrome-hover hover:bg-foreground/8 data-active:bg-foreground/5";
2
+ export{nt,J};
@@ -1,2 +1,2 @@
1
- import{fo}from"./chunk-gszy4mhj.js";import{CheckIcon as N,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function y(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function M({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[l,u]=f(!1),[d,x]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=()=>{if(r.scrollHeight===0){u(!1);return}let b=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(b))throw Error("Codex user message line height is invalid");u(r.scrollHeight>A*b+1)};t();let m=new ResizeObserver(t);return m.observe(r),()=>m.disconnect()},[]),k(()=>{if(!l||d)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=new Map,m=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let v=g.target;if(!t.has(v))continue;y(v,g.isIntersecting&&g.intersectionRatio>=1,t.get(v))}},{root:r,rootMargin:"0px",threshold:1}),b=()=>{for(let i of t.keys()){if(r.contains(i))continue;m?.unobserve(i),t.delete(i)}for(let i of r.querySelectorAll(L)){if(t.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");t.set(i,g),y(i,m===null&&R(i,r),g),m?.observe(i)}};b();let C=new MutationObserver(b);return C.observe(r,{childList:!0,subtree:!0}),()=>{m?.disconnect(),C.disconnect();for(let[i,g]of t)y(i,!0,g)}},[l,d]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:l&&!d?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),l&&!d&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),l&&p("button",{type:"button","aria-expanded":d,className:"codex-user-message-collapse-trigger",onClick:()=>{x((r)=>!r)},children:[e("span",{children:d?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:d?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function qt({text:n,label:o,host:s}){let[a,c]=f(!1),[l,u]=f(null),d=async()=>{c(!1),u(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(x){u(String(x)),s?.onCopyError?.(x)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:l??o,onClick:()=>void d(),children:a?e(N,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(fo,{src:c,alt:"",onClose:()=>a(!1)})]})}function go({message:n,text:o,textParts:s,mentions:a,images:c,messageTime:l,host:u,bubbleStyle:d}){let{t:x,openImage:r}=u;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[a.length>0&&e("div",{className:"codex-user-mentions",children:a.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),c.length>0&&e("div",{className:"codex-user-images",children:c.map((t)=>e(S,{image:t,openImage:r},`${t.mimeType}:${t.data}`))}),o.length>0&&e(h,{children:e("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:d,children:s?s.map((t,m)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(M,{text:t.text,host:u}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},m)):e(M,{text:o,host:u})})}),p("div",{className:"codex-user-actions",children:[e(qt,{text:o,label:x("actions.copy"),host:u}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
2
- export{qt,go};
1
+ import{jo}from"./chunk-a3x74cr0.js";import{CheckIcon as N,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function y(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function M({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[l,u]=f(!1),[d,x]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=()=>{if(r.scrollHeight===0){u(!1);return}let b=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(b))throw Error("Codex user message line height is invalid");u(r.scrollHeight>A*b+1)};t();let m=new ResizeObserver(t);return m.observe(r),()=>m.disconnect()},[]),k(()=>{if(!l||d)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=new Map,m=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let v=g.target;if(!t.has(v))continue;y(v,g.isIntersecting&&g.intersectionRatio>=1,t.get(v))}},{root:r,rootMargin:"0px",threshold:1}),b=()=>{for(let i of t.keys()){if(r.contains(i))continue;m?.unobserve(i),t.delete(i)}for(let i of r.querySelectorAll(L)){if(t.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");t.set(i,g),y(i,m===null&&R(i,r),g),m?.observe(i)}};b();let C=new MutationObserver(b);return C.observe(r,{childList:!0,subtree:!0}),()=>{m?.disconnect(),C.disconnect();for(let[i,g]of t)y(i,!0,g)}},[l,d]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:l&&!d?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),l&&!d&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),l&&p("button",{type:"button","aria-expanded":d,className:"codex-user-message-collapse-trigger",onClick:()=>{x((r)=>!r)},children:[e("span",{children:d?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:d?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function nn({text:n,label:o,host:s}){let[a,c]=f(!1),[l,u]=f(null),d=async()=>{c(!1),u(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(x){u(String(x)),s?.onCopyError?.(x)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:l??o,onClick:()=>void d(),children:a?e(N,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(jo,{src:c,alt:"",onClose:()=>a(!1)})]})}function Go({message:n,text:o,textParts:s,mentions:a,images:c,messageTime:l,host:u,bubbleStyle:d}){let{t:x,openImage:r}=u;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[a.length>0&&e("div",{className:"codex-user-mentions",children:a.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),c.length>0&&e("div",{className:"codex-user-images",children:c.map((t)=>e(S,{image:t,openImage:r},`${t.mimeType}:${t.data}`))}),o.length>0&&e(h,{children:e("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:d,children:s?s.map((t,m)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(M,{text:t.text,host:u}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},m)):e(M,{text:o,host:u})})}),p("div",{className:"codex-user-actions",children:[e(nn,{text:o,label:x("actions.copy"),host:u}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
2
+ export{nn,Go};
@@ -0,0 +1,2 @@
1
+ import{n}from"./chunk-q6km9nha.js";import{e}from"./chunk-wpdn3rx8.js";import{Ue}from"./chunk-z3mp9z01.js";import{c,M}from"./chunk-n1tjf64a.js";import{o}from"./chunk-6acs2hzs.js";import{inSessionTree as z}from"@nyssance/codex-acp-v2/client";import{ChevronDownIcon as B,ChevronRightIcon as q,GitBranchIcon as E,Loader2Icon as O,SquareIcon as R}from"lucide-react";import{useId as T,useState as g}from"react";import{jsx as s,jsxs as r}from"react/jsx-runtime";function Oe({sessionId:t}){let d=n((a)=>a.sessions),l=Object.values(d).filter((a)=>a.subagent?.parentId===t);if(l.length===0)return null;return s("div",{"data-subagent-sessions":!0,className:"min-w-0",children:l.map((a)=>s(j,{session:a},a.id))})}function j({session:t}){let{client:d,host:l}=o(),{t:a}=l,v=n((i)=>i.actions),w=n((i)=>i.sessions),I=n((i)=>i.connection==="ready"),u=v.filter((i)=>z(w,t.id,i.sessionId)).length,[m,S]=g(!1),[f,x]=g(!1),[h,b]=g(null),N=T(),p=c(t.configOptions,"model"),k=!t.attached?"detached":u>0?"requires_action":t.state==="unknown"?"unknown":t.error?"failed":t.state,y=I&&t.attached&&t.subagent?.capabilities?.cancel!=null&&t.state!=="idle",C=async()=>{x(!0),b(null);try{await d.cancel(t.id)}catch(i){b(i instanceof Error?i.message:String(i))}finally{x(!1)}};return r("section",{"aria-label":t.title??a("subagents.untitled"),className:"min-w-0",children:[r("div",{className:"flex min-w-0 items-center gap-1",children:[r(e,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-expanded":m,"aria-controls":N,onClick:()=>S(!m),children:[m?s(B,{className:"size-3.5 shrink-0"}):s(q,{className:"size-3.5 shrink-0"}),s(E,{className:"text-muted-foreground size-3.5 shrink-0"}),s("span",{className:"truncate",children:t.title??a("subagents.untitled")}),r("span",{className:"text-foreground ms-auto shrink-0 text-xs",role:"status",children:[a(`subagents.${k}`),u>0?` · ${u}`:""]})]}),y&&s(e,{variant:"ghost",size:"icon-sm",disabled:f,"aria-label":a("subagents.cancel",{name:t.title??a("subagents.untitled")}),onClick:()=>{C()},children:f?s(O,{className:"size-3.5 animate-spin"}):s(R,{className:"size-3.5"})})]}),h&&s("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:h}),m&&r("div",{id:N,className:"min-w-0 ps-4",children:[(t.subagent?.description||p)&&r("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:t.subagent?.description??void 0,children:t.subagent?.description}),p&&s("span",{className:"shrink-0",children:M(p)})]}),t.items.length>0?s("div",{className:"flex max-h-72 min-h-0 flex-col",children:s(Ue,{session:t,client:d,host:l})}):s("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:a("subagents.noMessages")}),s(Oe,{sessionId:t.id})]})]})}
2
+ export{Oe};
@@ -1,4 +1,4 @@
1
- function Ao(t,e){if(e===0)return null;let r=e-1;while(r>=0){let n=t[r];if(n===" "||n==="\t"||n===`
1
+ function Sn(t,e){if(e===0)return null;let r=e-1;while(r>=0){let n=t[r];if(n===" "||n==="\t"||n===`
2
2
  `)return null;if(n==="@"||n==="/"){let i=r===0?"":t[r-1],s=r===0||i===`
3
3
  `;if(n==="/"?s&&!/[/\\]/.test(t.slice(r+1,e)):s||i===" "||i==="\t")return{kind:n==="/"?"slash":"at",start:r,end:e,query:t.slice(r+1,e)}}r-=1}return null}
4
- export{Ao};
4
+ export{Sn};
@@ -0,0 +1 @@
1
+ import{Button as n}from"@base-ui/react/button";import{cva as d}from"class-variance-authority";import{cn as o}from"cn";import{jsx as s}from"react/jsx-runtime";var jr=d("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function e({className:r,variant:t="default",size:i="default",...a}){return s(n,{"data-slot":"button",className:o(jr({variant:t,size:i,className:r})),...a})}export{jr,e};
@@ -0,0 +1,2 @@
1
+ import{e}from"./chunk-wpdn3rx8.js";import{fe}from"./chunk-2a3tezgr.js";import{u,m,b,K,p,w}from"./chunk-n5xqjct2.js";import{v}from"./chunk-kjtd3wc3.js";import{Wt,Gt,co,uo,mo,ht}from"./chunk-c493d8ay.js";import{s}from"./chunk-96x0d2vd.js";import{Y,A}from"./chunk-0nkvfecf.js";import{ze}from"./chunk-4s1rhts0.js";import{k}from"./chunk-da6d6wze.js";import{isArrayProperty as S,isBooleanProperty as C,isNumberProperty as E,isStringProperty as N}from"@nyssance/codex-acp-v2/client";import{useEffect as V,useMemo as R,useState as q}from"react";import{jsx as o,jsxs as d}from"react/jsx-runtime";function P(r){if(!N(r))return null;if(r.oneOf&&r.oneOf.length>0)return r.oneOf.map((t)=>({value:t.const,label:t.title??t.const,...t.description?{description:t.description}:{}}));if(r.enum&&r.enum.length>0)return r.enum.map((t)=>({value:t,label:t}));return null}function L(r){let t=r,n=t._meta?.alwith?.options;if(Array.isArray(n)&&Array.isArray(t.enum))return n.map((i)=>({value:i.const,label:i.title,...i.description?{description:i.description}:{}}));if(Array.isArray(t.enum))return t.enum.map((i)=>({value:String(i),label:String(i)}));if(Array.isArray(t.oneOf))return t.oneOf.map((i)=>({value:i.const,label:i.title,...i.description?{description:i.description}:{}}));return null}function Ar(r){let t=new Set(r.required??[]);return Object.entries(r.properties??{}).map(([n,i])=>({key:n,property:i,title:i.title??n,description:i.description??null,required:t.has(n),options:P(i),multiOptions:S(i)?L(i.items):null}))}function yr(r){let t={};for(let n of r){let i=n.property.default;if(i!==void 0&&i!==null)t[n.key]=i;else if(n.options)t[n.key]=n.options[0].value;else if(C(n.property))t[n.key]=!1;else if(S(n.property))t[n.key]=[]}return t}function Lr(r,t){if(r.multiOptions)return Array.isArray(t)&&t.length>0;if(!r.required)return!0;return t!==void 0&&t!==""&&!(Array.isArray(t)&&t.length===0)}function D({id:r,label:t,description:n,control:i}){return d("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[i,d(v,{htmlFor:r,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[o("div",{className:"text-foreground text-sm",children:t}),n&&o("div",{className:"text-muted-foreground text-xs",children:n})]})]})}function G({id:r,field:t,value:n,onChange:i}){if(t.multiOptions){let a=new Set(Array.isArray(n)?n:[]);return d(Wt,{children:[o(Gt,{variant:"label",children:t.title}),t.description&&o(ht,{children:t.description}),o("div",{className:"flex flex-col gap-1",children:t.multiOptions.map((c)=>{let f=`${r}:${c.value}`;return o(D,{id:f,...c,control:o(fe,{id:f,checked:a.has(c.value),onCheckedChange:(y)=>{let g=new Set(a);if(y)g.add(c.value);else g.delete(c.value);i([...g])}})},c.value)})})]})}if(t.options)return d(Wt,{children:[o(Gt,{variant:"label",children:t.title}),t.description&&o(ht,{children:t.description}),o(Y,{value:typeof n==="string"?n:"",onValueChange:(a)=>i(String(a)),className:"flex flex-col gap-1",children:t.options.map((a)=>{let c=`${r}:${a.value}`;return o(D,{id:c,...a,control:o(A,{value:a.value,id:c})},a.value)})})]});return d(uo,{children:[o(mo,{htmlFor:r,children:t.title}),C(t.property)?o(ze,{id:r,checked:n===!0,onCheckedChange:(a)=>i(a)}):E(t.property)?o(s,{id:r,type:"number",required:t.required,value:typeof n==="number"?n:"",onChange:(a)=>i(a.target.value===""?void 0:Number(a.target.value))}):o(k,{id:r,rows:2,required:t.required,value:typeof n==="string"?n:"",onChange:(a)=>i(a.target.value)}),t.description&&o(ht,{children:t.description})]})}function eo({requestId:r,schema:t,message:n,total:i,t:a,onRespond:c}){let f=R(()=>Ar(t),[t]),[y,g]=q(()=>yr(f));V(()=>g(yr(f)),[r,f]);let x=f.every((l)=>Lr(l,y[l.key])),O=()=>{if(!x)return;let l={};for(let[h,F]of Object.entries(y))if(F!==void 0)l[h]=F;c({action:"accept",content:l})};return o(u,{open:!0,onOpenChange:(l)=>!l&&c({action:"cancel"}),children:d(m,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(l)=>{if(l.key==="Enter"&&(l.metaKey||l.ctrlKey))l.preventDefault(),O()},children:[d(b,{children:[d("div",{className:"flex items-center justify-between gap-2 pe-8",children:[o(p,{children:t.title??a("approval.needed")}),i>1&&o("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${i}`})]}),o(w,{children:n})]}),o("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o(co,{children:f.map((l)=>o(G,{id:`${r}:${l.key}`,field:l,value:y[l.key],onChange:(h)=>g((F)=>({...F,[l.key]:h}))},l.key))})}),d(K,{children:[o(e,{variant:"ghost",onClick:()=>c({action:"decline"}),children:a("actions.decline")}),o(e,{disabled:!x,onClick:O,children:a("actions.submit")})]})]})})}
2
+ export{Ar,yr,Lr,eo};
@@ -0,0 +1,2 @@
1
+ import{groupSessions as se,projectName as z,isQuickChatDirectory as ur,QUICK_CHATS_GROUP as D}from"@nyssance/codex-acp-v2/client";
2
+ export{se,z,ur,D};
@@ -1,5 +1,5 @@
1
- import{$t}from"./chunk-a1kmc6t8.js";import{t}from"./chunk-f3e3ged2.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as f,jsxs as g,Fragment as h}from"react/jsx-runtime";function _r(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
- `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function Hr(o){let s=new Map,e=null;for(let n of o.split(`
3
- `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Or(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?Hr(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let c=u(i,r),d=n.patch?_r(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=c.additions,l.deletions+=c.deletions,l.patch=l.patch?`${l.patch}
4
- ${d}`:d;else s.set(r,{path:r,patch:d,...c})}}return[...s.values()]}function mo({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return f($t,{files:Or(o),onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[f(n,{path:i.path,className:"codex-edited-file-icon"}),f("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
- export{_r,Hr,Or,mo};
1
+ import{tn}from"./chunk-gtahrx8j.js";import{t}from"./chunk-q6km9nha.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as f,jsxs as g,Fragment as h}from"react/jsx-runtime";function Ur(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
+ `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function $r(o){let s=new Map,e=null;for(let n of o.split(`
3
+ `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function qr(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?$r(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let c=u(i,r),d=n.patch?Ur(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=c.additions,l.deletions+=c.deletions,l.patch=l.patch?`${l.patch}
4
+ ${d}`:d;else s.set(r,{path:r,patch:d,...c})}}return[...s.values()]}function Vo({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return f(tn,{files:qr(o),onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[f(n,{path:i.path,className:"codex-edited-file-icon"}),f("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
+ export{Ur,$r,qr,Vo};
@@ -0,0 +1,3 @@
1
+ import{po,Be}from"./chunk-yh9qdb2k.js";import{t,ke}from"./chunk-q6km9nha.js";import{u,m,b,p,w}from"./chunk-n5xqjct2.js";import{createStore as d}from"@alwith/api/client";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function rt(e){c.setState({request:{path:e.path,patch:wn(e.patch,e.path)}})}function wn(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
2
+ `,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function it(){let{t:e,theme:a}=t(),n=ke(c,(o)=>o.request),s=n===null?null:po(n.patch);return i(u,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(m,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(b,{children:[i(p,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(w,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(Be,{patch:n.patch,theme:a})})]})})}
3
+ export{rt,wn,it};
@@ -1,2 +1,2 @@
1
- import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function It({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
2
- export{It};
1
+ import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function Pt({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
2
+ export{Pt};
@@ -1,2 +1,2 @@
1
- import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function no(){let n=new p({gfm:!0}),t=k(),r=t.extensions[0],i=r.tokenizer;r.tokenizer=function(o,a){let e=i.call(this,o,a);if(e===void 0)return;if(e.raw.startsWith("<"))return e;let l=/^(?:[a-z][a-z\d+.-]*:\/\/|www\.)[^/?#]+[/?#]/i.exec(e.raw);if(l===null)return e;let c=l[0].length-1,u=e.raw.slice(c).search(/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u);if(u===-1)return e;let s=e.raw.slice(0,c+u),f=e.href.slice(0,e.href.length-(e.raw.length-s.length));return{...e,raw:s,href:f,text:s,tokens:[{type:"text",raw:s,text:s}]}},n.use(x,t);for(let o of["block","inline"])n.use({extensions:[{name:"internalMessage",level:o,...o==="inline"?{start(a){return h.exec(a)?.index}}:{},tokenizer(a){let e=m.exec(a);if(e===null)return;return{type:"internalMessage",raw:e[0]}},renderer(){return""}}]});return n}function Ht(n){let t=n.replaceAll(/[\p{Cc}\s]/gu,"");return!/^(?:data|javascript|vbscript):/i.test(t)}
2
- export{no,Ht};
1
+ import{Marked as p}from"marked";import k from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,m=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,d=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,x={extensions:[{name:"math",level:"block",tokenizer(n){let t=d.exec(n);if(t===null)return;return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let t=d.exec(n);if(t!==null)return{type:"math",raw:t[0],text:(t[1]??t[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let i=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(i===null||/^\s|\s$/.test(i[1]))return;return{type:"math",raw:i[0],text:i[1],display:!1}}}]};function _o(){let n=new p({gfm:!0}),t=k(),r=t.extensions[0],i=r.tokenizer;r.tokenizer=function(o,a){let e=i.call(this,o,a);if(e===void 0)return;if(e.raw.startsWith("<"))return e;let l=/^(?:[a-z][a-z\d+.-]*:\/\/|www\.)[^/?#]+[/?#]/i.exec(e.raw);if(l===null)return e;let c=l[0].length-1,u=e.raw.slice(c).search(/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u);if(u===-1)return e;let s=e.raw.slice(0,c+u),f=e.href.slice(0,e.href.length-(e.raw.length-s.length));return{...e,raw:s,href:f,text:s,tokens:[{type:"text",raw:s,text:s}]}},n.use(x,t);for(let o of["block","inline"])n.use({extensions:[{name:"internalMessage",level:o,...o==="inline"?{start(a){return h.exec(a)?.index}}:{},tokenizer(a){let e=m.exec(a);if(e===null)return;return{type:"internalMessage",raw:e[0]}},renderer(){return""}}]});return n}function Qt(n){let t=n.replaceAll(/[\p{Cc}\s]/gu,"");return!/^(?:data|javascript|vbscript):/i.test(t)}
2
+ export{_o,Qt};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-6kn920c5.js";import{t,Ve}from"./chunk-f3e3ged2.js";import{isEmbeddedResource as B,isImage as h,isResourceLink as E}from"@nyssance/codex-acp-v2/client";import{DownloadIcon as T,FileIcon as N,ImageOffIcon as L,LoaderCircleIcon as F}from"lucide-react";import{useState as y}from"react";import{jsx as i,jsxs as r}from"react/jsx-runtime";function br(a){let o=a.split(/[\\/]/).at(-1)??a;if(a.startsWith("file:")||/^https?:/.test(a))o=new URL(a).pathname.split("/").at(-1)??"";try{return decodeURIComponent(o)||"attachment"}catch(n){if(n instanceof URIError)return o||"attachment";throw n}}function U(a,o){let n=document.createElement("a");n.href=o,n.download=a,n.click()}function _({block:a,generated:o=!1}){let n=t(),[p,d]=y(!1),[I,C]=y(null);if(E(a)){if(a.uri==="codex-image:unavailable")return r("span",{className:"text-muted-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[i(L,{className:"size-4"}),n.t("timeline.imageUnavailable")]});let u=br(a.uri);return r(e,{variant:"outline",className:"h-auto max-w-full min-w-0 justify-start gap-3 overflow-hidden p-3","aria-label":a.title??a.name,title:a.uri,onClick:()=>n.openLink(a.uri),children:[i(N,{}),r("span",{className:"min-w-0 flex-1 text-start",children:[i("span",{className:"block truncate",children:a.title??a.name}),r("span",{className:"text-muted-foreground block truncate text-xs",children:[(a.title??a.name)!==u&&`${u} · `,a.mimeType??u.split(".").at(-1)?.toUpperCase()]})]})]})}if(!B(a)&&!h(a))return null;let s=h(a)?{uri:a.uri??`image.${a.mimeType.split("/")[1]??"png"}`,mimeType:a.mimeType,blob:a.data}:a.resource,l=br(s.uri);if("text"in s)return r("div",{className:"min-w-0",children:[i("pre",{className:"overflow-x-auto whitespace-pre-wrap",children:s.text}),r(e,{variant:"link",size:"sm",className:"max-w-full min-w-0",title:s.uri,onClick:()=>n.openLink(s.uri),children:[i(N,{}),i("span",{className:"truncate",children:l})]})]});let m=`data:${s.mimeType??"application/octet-stream"};base64,${s.blob}`,f=s.mimeType?.toLowerCase().startsWith("image/")&&I!==m,{openImage:g,openImageGallery:w}=n,x=w?()=>w([{src:m,alt:l,uri:s.uri}],0):g&&(()=>g(m)),c=o&&f,R=async()=>{d(!0);try{if(n.saveFile)await n.saveFile(l,s.blob);else U(l,m)}catch(u){Ve(n,u)}finally{d(!1)}},v=i("img",{src:m,alt:"",className:o?"max-h-[40rem] max-w-full object-contain":"max-h-96 max-w-full rounded object-contain",onError:()=>C(m)});return r("div",{className:c?"codex-generated-image":"flex max-w-full min-w-0 flex-col items-start gap-1",children:[f&&(x===void 0?v:i(e,{variant:"ghost",className:o?"codex-generated-image-preview h-auto max-w-full p-0":"h-auto max-w-full p-0","aria-label":n.t("timeline.viewImage"),onClick:x,children:v})),r(e,{variant:c?"secondary":"link",size:c?"icon":"sm",className:c?"codex-generated-image-download":"max-w-full min-w-0",disabled:p,title:n.t("timeline.download",{name:l}),"aria-label":n.t("timeline.download",{name:l}),onClick:()=>{R()},children:[p?i(F,{className:"motion-safe:animate-spin"}):i(T,{}),!c&&i("span",{className:"truncate",children:l})]})]})}
2
- export{br,_};
1
+ import{e}from"./chunk-wpdn3rx8.js";import{t,Ge}from"./chunk-q6km9nha.js";import{isEmbeddedResource as E,isImage as h,isResourceLink as T}from"@nyssance/codex-acp-v2/client";import{DownloadIcon as L,FileIcon as N,ImageOffIcon as F,LoaderCircleIcon as U}from"lucide-react";import{useState as y}from"react";import{jsx as i,jsxs as r}from"react/jsx-runtime";function Cr(a){let o=a.split(/[\\/]/).at(-1)??a;if(a.startsWith("file:")||/^https?:/.test(a))o=new URL(a).pathname.split("/").at(-1)??"";try{return decodeURIComponent(o)||"attachment"}catch(n){if(n instanceof URIError)return o||"attachment";throw n}}function b(a,o){let n=document.createElement("a");n.href=o,n.download=a,n.click()}function B({block:a,generated:o=!1}){let n=t(),[p,d]=y(!1),[I,C]=y(null);if(T(a)){if(a.uri==="codex-image:unavailable")return r("span",{className:"text-muted-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[i(F,{className:"size-4"}),n.t("timeline.imageUnavailable")]});let u=Cr(a.uri);return r(e,{variant:"outline",className:"h-auto max-w-full min-w-0 justify-start gap-3 overflow-hidden p-3","aria-label":a.title??a.name,title:a.uri,onClick:()=>n.openLink(a.uri),children:[i(N,{}),r("span",{className:"min-w-0 flex-1 text-start",children:[i("span",{className:"block truncate",children:a.title??a.name}),r("span",{className:"text-muted-foreground block truncate text-xs",children:[(a.title??a.name)!==u&&`${u} · `,a.mimeType??u.split(".").at(-1)?.toUpperCase()]})]})]})}if(!E(a)&&!h(a))return null;let s=h(a)?{uri:a.uri??`image.${a.mimeType.split("/")[1]??"png"}`,mimeType:a.mimeType,blob:a.data}:a.resource,l=Cr(s.uri);if("text"in s)return r("div",{className:"min-w-0",children:[i("pre",{className:"overflow-x-auto whitespace-pre-wrap",children:s.text}),r(e,{variant:"link",size:"sm",className:"max-w-full min-w-0",title:s.uri,onClick:()=>n.openLink(s.uri),children:[i(N,{}),i("span",{className:"truncate",children:l})]})]});let m=`data:${s.mimeType??"application/octet-stream"};base64,${s.blob}`,f=s.mimeType?.toLowerCase().startsWith("image/")&&I!==m,{openImage:g,openImageGallery:w}=n,x=w?()=>w([{src:m,alt:l,uri:s.uri}],0):g&&(()=>g(m)),c=o&&f,R=async()=>{d(!0);try{if(n.saveFile)await n.saveFile(l,s.blob);else b(l,m)}catch(u){Ge(n,u)}finally{d(!1)}},v=i("img",{src:m,alt:"",className:o?"max-h-[40rem] max-w-full object-contain":"max-h-96 max-w-full rounded object-contain",onError:()=>C(m)});return r("div",{className:c?"codex-generated-image":"flex max-w-full min-w-0 flex-col items-start gap-1",children:[f&&(x===void 0?v:i(e,{variant:"ghost",className:o?"codex-generated-image-preview h-auto max-w-full p-0":"h-auto max-w-full p-0","aria-label":n.t("timeline.viewImage"),onClick:x,children:v})),r(e,{variant:c?"secondary":"link",size:c?"icon":"sm",className:c?"codex-generated-image-download":"max-w-full min-w-0",disabled:p,title:n.t("timeline.download",{name:l}),"aria-label":n.t("timeline.download",{name:l}),onClick:()=>{R()},children:[p?i(U,{className:"motion-safe:animate-spin"}):i(L,{}),!c&&i("span",{className:"truncate",children:l})]})]})}
2
+ export{Cr,B};
@@ -1,3 +1,3 @@
1
- import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function Dn(e){let t=0,i=0;for(let o of e.split(`
2
- `)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function Ne({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
3
- export{Dn,Ne};
1
+ import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function po(e){let t=0,i=0;for(let o of e.split(`
2
+ `)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function Be({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
3
+ export{po,Be};
@@ -1,2 +1,2 @@
1
- import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function Ke({title:r,titleIcon:t,body:o,rows:d,details:n,actions:s}){return a("div",{"data-slot":"hover-info-card",className:"flex flex-col gap-1.5",children:[a("div",{"data-slot":"hover-info-card-summary",className:"flex min-w-0 flex-col gap-1",children:[a("div",{"data-slot":"hover-info-card-title-row",className:"flex min-w-0 items-center gap-1.5",children:[t!=null&&e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t}),e("div",{"data-slot":"hover-info-card-title",className:"text-foreground line-clamp-2 min-w-0 flex-1 text-sm break-words",children:r})]}),o!=null&&e("div",{"data-slot":"hover-info-card-body",className:"text-muted-foreground line-clamp-2 text-xs break-words",children:o}),e(i,{rows:d})]}),n!=null&&n.length>0&&e("div",{"data-slot":"hover-info-card-details",className:"flex min-w-0 flex-col gap-1.5",children:e(i,{rows:n})}),s!=null&&a(v,{children:[e("div",{"data-slot":"hover-info-card-separator",className:"bg-border -mx-3 mt-1.5 h-px"}),e("div",{"data-slot":"hover-info-card-actions",className:"-mx-1 flex flex-col",children:s})]})]})}function i({rows:r}){return r?.map((t,o)=>a("div",{"data-slot":"hover-info-card-row",className:"text-muted-foreground flex items-start gap-1.5 text-xs",children:[e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t.icon}),e("span",{className:"min-w-0 break-all",children:t.text})]},o))}function B({icon:r,label:t,trailing:o,disabled:d,onClick:n,variant:s="default",className:l,...c}){return a("button",{...c,"data-slot":"hover-info-card-action","data-variant":s,type:"button",disabled:d,onClick:n,className:f("text-foreground hover:bg-foreground/5 active:bg-foreground/10 flex h-8 w-full items-center gap-2 rounded-sm px-2 text-start text-sm font-normal disabled:pointer-events-none disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0",s==="destructive"?"text-destructive [&_svg]:text-destructive":"[&_svg]:text-muted-foreground",l),children:[r,e("span",{className:"min-w-0 flex-1 truncate",children:t}),o]})}
2
- export{Ke,B};
1
+ import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function Xe({title:r,titleIcon:t,body:o,rows:d,details:n,actions:s}){return a("div",{"data-slot":"hover-info-card",className:"flex flex-col gap-1.5",children:[a("div",{"data-slot":"hover-info-card-summary",className:"flex min-w-0 flex-col gap-1",children:[a("div",{"data-slot":"hover-info-card-title-row",className:"flex min-w-0 items-center gap-1.5",children:[t!=null&&e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t}),e("div",{"data-slot":"hover-info-card-title",className:"text-foreground line-clamp-2 min-w-0 flex-1 text-sm break-words",children:r})]}),o!=null&&e("div",{"data-slot":"hover-info-card-body",className:"text-muted-foreground line-clamp-2 text-xs break-words",children:o}),e(i,{rows:d})]}),n!=null&&n.length>0&&e("div",{"data-slot":"hover-info-card-details",className:"flex min-w-0 flex-col gap-1.5",children:e(i,{rows:n})}),s!=null&&a(v,{children:[e("div",{"data-slot":"hover-info-card-separator",className:"bg-border -mx-3 mt-1.5 h-px"}),e("div",{"data-slot":"hover-info-card-actions",className:"-mx-1 flex flex-col",children:s})]})]})}function i({rows:r}){return r?.map((t,o)=>a("div",{"data-slot":"hover-info-card-row",className:"text-muted-foreground flex items-start gap-1.5 text-xs",children:[e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t.icon}),e("span",{className:"min-w-0 break-all",children:t.text})]},o))}function U({icon:r,label:t,trailing:o,disabled:d,onClick:n,variant:s="default",className:l,...c}){return a("button",{...c,"data-slot":"hover-info-card-action","data-variant":s,type:"button",disabled:d,onClick:n,className:f("text-foreground hover:bg-foreground/5 active:bg-foreground/10 flex h-8 w-full items-center gap-2 rounded-sm px-2 text-start text-sm font-normal disabled:pointer-events-none disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0",s==="destructive"?"text-destructive [&_svg]:text-destructive":"[&_svg]:text-muted-foreground",l),children:[r,e("span",{className:"min-w-0 flex-1 truncate",children:t}),o]})}
2
+ export{Xe,U};
@@ -0,0 +1,2 @@
1
+ import{fo}from"./chunk-frqg34kq.js";import{e}from"./chunk-wpdn3rx8.js";import{re,t,ie,n,Ge}from"./chunk-q6km9nha.js";import{Qo,Ve,rn,Zo,Jo}from"./chunk-g5gz25jy.js";import{qe}from"./chunk-efcpawhs.js";import{Bo}from"./chunk-cf5mxxyp.js";import{Oo}from"./chunk-0keppemg.js";import{Io,Po}from"./chunk-jzkmsbpe.js";import{wo,ko}from"./chunk-7jyekmy9.js";import{bo}from"./chunk-2qhbm5y9.js";import{Fo}from"./chunk-jkwf97cs.js";import{Co}from"./chunk-6k4mbmg1.js";import{codexExtensionCapabilities as Ce,codexMessageError as Me,codexRetryNotice as ze,codexTurnError as Be,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Oe}from"lucide-react";import{useCallback as V,useEffect as A,useLayoutEffect as ve,useMemo as Q,useRef as b,useState as _}from"react";import{flushSync as Te}from"react-dom";import{jsx as a,jsxs as L}from"react/jsx-runtime";var ye=24;function Fe(r){let m=Math.max(0,r.turnTopPx-ye),v=Math.max(0,r.scrollHeightPx-r.viewportHeightPx),c=m-v;return{scrollTopPx:m,spacerPx:c>0?r.spacerPx+c:r.spacerPx}}function Ke({viewportRef:r,viewportProps:m,children:v}){return a("div",{ref:r,...m,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:v})}function _e({sessionId:r,turnId:m,root:v,error:c,connected:S}){let C=b(null),w=ie(),{t:N}=t(),R=V(()=>{w.loadHistoryTurn(r,m).catch(()=>{})},[w,r,m]);return A(()=>{if(!v||!C.current||!S||c)return;let B=new IntersectionObserver((T)=>{if(T.some((P)=>P.isIntersecting))B.disconnect(),R()},{root:v,rootMargin:"800px 0px"});return B.observe(C.current),()=>B.disconnect()},[v,S,c,R]),a("div",{ref:C,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":m,"data-markdown-pending":!0,children:c?L("div",{className:"flex flex-col items-center gap-2",children:[a("p",{role:"alert",className:"text-destructive text-xs",children:c}),a(e,{variant:"outline",size:"sm",onClick:R,disabled:!S,children:N("timeline.navigationRetry")})]}):L("div",{role:"status","aria-label":N("timeline.navigationLoading"),className:"space-y-3",children:[a("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),a("div",{className:"bg-muted h-3 w-4/5 rounded"}),a("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function $e(r,m){let v=b([]),c=b(null);if(c.current?.items!==r.items||c.current.state!==r.state||c.current.ended!==r.turnEndedAt||c.current.usage!==r.turnUsage||c.current.historyOrder!==m)c.current={state:r.state,items:r.items,ended:r.turnEndedAt,usage:r.turnUsage,historyOrder:m,turns:Qo(r,v.current,m)};let S=c.current.turns;return v.current=S,S}function Ue(r){return a(re,{host:r.host,client:r.client,children:a(De,{...r})})}function De({session:r,leading:m,afterTurn:v,answerActions:c,turnFooter:S,renderUserMessage:C,insert:w,navigation:N,anchorNewTurn:R=!1,Viewport:B=Ke}){let T=ie(),P=t(),y=n((i)=>i.historyNavigation[r.id]),d=$e(r,y?.turns),M=d.at(-1)?.key,xe=Zo(r,d),x=r.state==="running"||r.state==="requires_action",D=Q(()=>Oo(d,y),[d,y]),Y=Q(()=>D.flatMap((i)=>i.turn===void 0?[]:[{...i.turn,key:i.turnKey}]),[D]),he=Q(()=>N===void 0?[]:Io(d,r.turnUsage,y),[N,d,r.turnUsage,y]),Z=w&&w.afterItemId!==null?d.findIndex((i)=>i.items.some((u)=>u.id===w.afterItemId)):-1,j=b(d);j.current=d;let[l,be]=_(null),h=n((i)=>i.historyPages[r.id]),I=n((i)=>i.connection==="ready"),we=n((i)=>Ce(i.agent).sessionRetry),ee=h!==void 0;A(()=>{if(I&&ee&&!r.restoring)T.loadHistoryNavigation(r.id).catch(()=>{})},[T,I,ee,r.id,r.restoring]);let[Re,Se]=_(!1),F=b(null),[Pe,te]=_(!1),ne=b(0),W=b({key:M,running:x});W.current={key:M,running:x};let[oe,K]=_(0),k=b(0),E=b(null);k.current=oe;let Ie=V(()=>{if(E.current!==null)E.current.keepTop=!1},[]),{isFollowing:z,scrollToBottom:X,stopFollowing:q,schedulePin:ae,contentResized:le,beginLocate:ue,cancelLocation:se}=Fo(l,x,Ie),ce=V(()=>{if(l===null||!x)return;let i=d.at(-1)?.key;if(i===void 0)return;let u=ue(!0),s=()=>u.isCurrent()&&W.current.running&&W.current.key===i,o=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!s())return;let g=l.querySelector(`[data-codex-turn="${CSS.escape(i)}"]`);if(g===null)return;let f=l.scrollTop+g.getBoundingClientRect().top-l.getBoundingClientRect().top,H=Fe({turnTopPx:f,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:k.current});E.current=H.spacerPx>0?{element:g,heightPx:g.getBoundingClientRect().height+H.spacerPx,keepTop:!0}:null,Te(()=>K(H.spacerPx)),requestAnimationFrame(()=>{if(s())u.finish(H.scrollTopPx)})})),p=F.current;if(p===null)return;p.scrollToKey(i,void 0,{align:"top"}).then(()=>{if(s())o()})},[ue,x,l,d]);ve(()=>{if(!R||x)return;se(),E.current=null,k.current=0,K(0)},[R,se,x]);let G=V(()=>{q(),T.loadOlderHistory(r.id).catch(()=>{})},[T,r.id,q]);A(()=>{if(l===null)return;let i=()=>{let u=l.scrollTop<600;if(Se(u),u&&!y?.complete&&I&&!r.restoring&&!z&&h?.cursor&&!h.loading&&!h.error)G()};return i(),l.addEventListener("scroll",i,{passive:!0}),()=>l.removeEventListener("scroll",i)},[I,h,z,G,l,r.restoring,y?.complete]),A(()=>{wo({sessionId:r.id,turns:Y,api:F.current,beforeReveal:q,terminals:r.terminals})},[r.id,r.terminals,Y,q]),A(()=>()=>ko(r.id),[r.id]);let He=V(async(i,u)=>{let s=++ne.current;te(!0);try{if(i.isLoaded===!1&&i.nativeTurnId!==void 0)await T.loadHistoryTurn(r.id,i.nativeTurnId),await new Promise((f)=>requestAnimationFrame(()=>f()));if(!u())return null;let o=j.current.find((f)=>f.user?.id===(i.messageId??i.id))??j.current.find((f)=>f.user!==null&&i.nativeTurnId!==void 0&&f.items.some((H)=>ge(H)===i.nativeTurnId));if(!o?.user)return null;let p=o.user.id,g=F.current;if(g===null)throw Error("Virtual timeline is not mounted");return await g.scrollToKey(o.key,(f)=>f.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(ne.current===s)te(!1)}},[T,r.id]),Ne=V(async(i)=>{if(i.nativeTurnId!==void 0)await T.previewHistoryTurn(r.id,i.nativeTurnId)},[T,r.id]);A(()=>{if(l===null)return;let i=l.querySelector("[data-codex-timeline]");if(i===null)throw Error("Timeline content element is missing");let u=new ResizeObserver(()=>{let s=E.current,o=null;if(s!==null){let p=Math.max(0,s.heightPx-s.element.getBoundingClientRect().height);if(p!==k.current&&(p<k.current||s.keepTop)){if(k.current=p,Te(()=>K(p)),p===0)E.current=null}if(p>0&&s.keepTop)o=l.scrollTop+s.element.getBoundingClientRect().top-l.getBoundingClientRect().top-ye}le(o)});if(u.observe(i),u.observe(l),M!==void 0){let s=l.querySelector(`[data-codex-turn="${CSS.escape(M)}"]`);if(s===null)throw Error("Latest turn is not mounted");u.observe(s)}return()=>u.disconnect()},[le,M,l]),A(()=>{if(r.items.length===0)return;ae()},[ae,r.items]);let de=b(null);ve(()=>{if(l===null)return;let i=d.at(-1),u=de.current;if(de.current=i===void 0?null:{key:i.key,running:x},i===void 0||u===null||i.user===null||i.replayed)return;if(R){if(x&&r.turnEndedAt[i.user.id]===void 0&&(i.key!==u.key||!u.running))E.current=null,k.current=0,K(0),ce()}else if(i.key!==u.key)X()},[ce,R,x,X,l,r.turnEndedAt,d]);let ke=(i,u)=>{let s=i,o=s.turn;if(o===void 0){if(s.nativeTurnId===void 0)throw Error(`Turn is missing at index ${u}`);return a(_e,{sessionId:r.id,turnId:s.nativeTurnId,root:l,error:y?.turnErrors[s.nativeTurnId],connected:I&&!z&&!Pe})}let p=d.indexOf(o),g=o.key===xe,f=Jo(r,d,p),H=!g&&f.continued,U=o.key===M,O=o.errors.at(-1),me=O===void 0?null:Me(O),J=O===void 0?null:ge(O),Ee=!r.subagent&&U&&!g&&I&&we&&r.attached&&!r.readOnly&&!r.restoring&&O===r.items.at(-1)&&me!==null&&Be(me).category==="overloaded"&&J!==null&&r.lastStopReason!=="end_turn"&&r.lastStopReason!=="cancelled",fe=S?.(o)??null,Ae=o.work.length>0||o.final.length>0||o.errors.length>0||g||fe!==null||Ve(o)||rn(o)||U&&(r.error!==null||r.lastStopReason==="cancelled"),pe=o.user===null?null:qe(o);return L("div",{"data-virtualized-turn-content":!0,"data-codex-turn":o.key,className:"flex flex-col gap-1.5",children:[o.user!==null&&(C===void 0?a(Co,{item:o.user,messageTime:pe}):C(o.user,pe)),Ae&&a(Bo,{sessionId:r.id,turn:o,terminals:r.terminals,active:g,blocked:r.state==="requires_action",continued:H,edits:f.edits,activityItems:f.items,workStartedAt:f.startedAt,isLast:U,error:r.error,retrying:g?ze(r._meta)??void 0:void 0,retry:Ee?{turnId:J,delaySeconds:bo(d),run:(Le)=>T.retrySession(r.id,J,Le)}:void 0,interrupted:rn(o)||!g&&U&&r.lastStopReason==="cancelled",answerActions:c?.(o),footer:fe}),u===Z&&w?.node,v?.(o)]})};return L("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[a(B,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":P.t("timeline.label")},children:a("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:L("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[w&&Z===-1&&w.node,a(fo,{ref:F,entries:D,renderTurn:ke,scrollElement:l,sessionKey:r.id,preserveViewport:!z,leadingInsetPx:12,leadingContent:m===void 0?void 0:a("div",{className:"pt-3",children:m})}),R&&a("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:oe}}),a("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),a("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),y?.error&&a("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:a(e,{variant:"outline",size:"sm",disabled:!I,title:y.error,onClick:()=>{T.loadHistoryNavigation(r.id).catch(()=>{})},children:P.t("timeline.navigationRetry")})}),Re&&h?.cursor&&!y?.complete&&L("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[a(e,{variant:"outline",size:"sm",disabled:!I||r.restoring||h.loading,onClick:G,children:h.loading?P.t("timeline.loadingEarlier"):P.t("timeline.loadEarlier")}),h.error&&a("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:h.error})]}),N!==void 0&&a(Po,{items:he,audio:N.audio,scrollRoot:l,beforeReveal:q,ensureItemMounted:He,onPreviewItem:Ne,onRevealError:(i)=>Ge(P,i),targetTopMarginPx:16},r.id),a("button",{type:"button",className:z?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:z?-1:void 0,onClick:X,"aria-label":P.t("timeline.scrollToBottom"),children:x?L("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[a("span",{className:"codex-wave-dot"}),a("span",{className:"codex-wave-dot"}),a("span",{className:"codex-wave-dot"})]}):a(Oe,{})})]})}
2
+ export{Ue};
@@ -1,2 +1,2 @@
1
- function Ut(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
2
- export{Ut};
1
+ function en(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
2
+ export{en};
@@ -0,0 +1,2 @@
1
+ import{_e}from"./chunk-7zrnt6zw.js";import{G,Gn}from"./chunk-r9p03chx.js";import{t}from"./chunk-q6km9nha.js";import{zn}from"./chunk-9j609g4n.js";import{ue,me,pe}from"./chunk-ea3582qy.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{jsx as o,jsxs as n,Fragment as h}from"react/jsx-runtime";var f=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Bn({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=_e(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(h,{children:[a&&o(G,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(ue,{children:[o(me,{render:o(Gn,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(pe,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(zn,{className:"shrink-0",children:f?"↩":"Enter"})]})]})})]})}
2
+ export{Bn};
@@ -0,0 +1,2 @@
1
+ import{x}from"./chunk-qxabrz98.js";import{X}from"./chunk-s0ef3h7b.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function rr({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(x,{text:t.content,streaming:!1})});if(!n(t))return null;return e(X,{entries:t.entries})}
2
+ export{rr};
@@ -0,0 +1,2 @@
1
+ import{n}from"./chunk-q6km9nha.js";import{e}from"./chunk-wpdn3rx8.js";import{Ue}from"./chunk-z3mp9z01.js";import{he,ve,xe,ye}from"./chunk-d5ga13n0.js";import{o,C}from"./chunk-6acs2hzs.js";import{Loader2Icon as f}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";function vt({session:t,timeline:c}){let{host:s,client:a}=o(),{t:r}=s,l=n((y)=>y.historyPages[t.id]?.cursor!=null),d=()=>C(s,a.open(t.id,t.cwd)),p=i(Ue,{...c,session:t,client:a,host:s});if(t.restoring)return t.items.length===0?m("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[i(f,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return m(he,{className:"flex-1",children:[m(ve,{children:[i(xe,{children:r("conversation.reopen")}),i(ye,{children:r("conversation.detached")})]}),i(e,{onClick:d,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!l)return i(he,{className:"flex-1",children:m(ve,{children:[i(xe,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),i(ye,{className:"truncate font-mono",children:t.cwd})]})});return p}
2
+ export{vt};
@@ -1 +1 @@
1
- import{so,Me}from"../chunk-hh498geh.js";import"../chunk-d6840cvf.js";import"../chunk-ckft9abb.js";import"../chunk-sn80gr8g.js";import"../chunk-hz1pgnqp.js";import"../chunk-w45d5th9.js";import"../chunk-y6r6tzfh.js";export{Me as CodexActivityGroup,so as CodexWorkSection};
1
+ import{zo,$e}from"../chunk-h2gng003.js";import"../chunk-qsg1c5cc.js";import"../chunk-s55n9cby.js";import"../chunk-54941m0z.js";import"../chunk-z4zm74ge.js";import"../chunk-s0ef3h7b.js";import"../chunk-qxabrz98.js";export{$e as CodexActivityGroup,zo as CodexWorkSection};
@@ -1 +1 @@
1
- import{mi,Ft,Bt}from"../chunk-bzk6wn2s.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-a1kmc6t8.js";import"../chunk-8a1j96d1.js";import"../chunk-gszy4mhj.js";import"../chunk-w45d5th9.js";import"../chunk-y6r6tzfh.js";export{mi as CodexAssistantMessage,Bt as CodexAssistantTurn,Ft as CodexMessageActions};
1
+ import{Mi,Yt,Zt}from"../chunk-q4btsq6a.js";import"../chunk-h2gng003.js";import"../chunk-qsg1c5cc.js";import"../chunk-s55n9cby.js";import"../chunk-2rv3cq7q.js";import"../chunk-54941m0z.js";import"../chunk-z4zm74ge.js";import"../chunk-gtahrx8j.js";import"../chunk-vk36fprb.js";import"../chunk-a3x74cr0.js";import"../chunk-s0ef3h7b.js";import"../chunk-qxabrz98.js";export{Mi as CodexAssistantMessage,Zt as CodexAssistantTurn,Yt as CodexMessageActions};
@@ -1 +1 @@
1
- import{g,Qt,ko,Xt,Co,Yt,To}from"../chunk-36t9x2qc.js";import"../chunk-ana59z25.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";export{To as AsyncQuestionCard,Qt as asyncQuestionId,g as asyncQuestions,ko as initialQuestionDraft,Xt as questionAnswer,Yt as questionReplies,Co as questionReplyEnvelope};
1
+ import{h,cn,er,dn,tr,un,nr}from"../chunk-en8s7tet.js";import"../chunk-0nkvfecf.js";import"../chunk-kjtd3wc3.js";import"../chunk-da6d6wze.js";import"../chunk-wpdn3rx8.js";export{nr as AsyncQuestionCard,cn as asyncQuestionId,h as asyncQuestions,er as initialQuestionDraft,dn as questionAnswer,un as questionReplies,tr as questionReplyEnvelope};
@@ -1 +1 @@
1
- import{I}from"../chunk-ckft9abb.js";export{I as useCodexDisclosureState};
1
+ import{R}from"../chunk-s55n9cby.js";export{R as useCodexDisclosureState};
@@ -1 +1 @@
1
- import{Fr,po,$t}from"../chunk-a1kmc6t8.js";import"../chunk-y6r6tzfh.js";export{po as CodexEditedFilesCard,$t as EditedFilesCard,Fr as fileChanges};
1
+ import{Vr,Wo,tn}from"../chunk-gtahrx8j.js";import"../chunk-qxabrz98.js";export{Wo as CodexEditedFilesCard,tn as EditedFilesCard,Vr as fileChanges};
@@ -1 +1 @@
1
- import{pe,lo}from"../chunk-d6840cvf.js";import"../chunk-ckft9abb.js";import"../chunk-y6r6tzfh.js";export{lo as ImageViewActivity,pe as isImageView};
1
+ import{we,Uo}from"../chunk-qsg1c5cc.js";import"../chunk-s55n9cby.js";import"../chunk-qxabrz98.js";export{Uo as ImageViewActivity,we as isImageView};
@@ -1 +1 @@
1
- import{Qn}from"../chunk-27vftbhf.js";import"../chunk-hwfwd04r.js";import"../chunk-7avpdkmf.js";import"../chunk-fpx4ng0t.js";export{Qn as CodexMarkdownRenderer};
1
+ import{No}from"../chunk-dyp6kjqz.js";import"../chunk-dnsmr5nf.js";import"../chunk-y3567zfn.js";import"../chunk-pafshe3v.js";export{No as CodexMarkdownRenderer};
@@ -1 +1 @@
1
- import{Zn,si,Jn,eo,li,xr,Er,yr,ci,Ar,Lr,di,ui}from"../chunk-dxt9j0da.js";export{si as armTimelineUserMessageNavigationAudio,Er as automaticNavigationMidiNote,di as getNavigationAudioContextState,ui as getNavigationInstrumentReady,Jn as installTimelineUserMessageNavigationAudioUnlock,Ar as itemPianoKeyIndex,xr as navigationMidiNote,Lr as navigationPianoKeyIndexes,ci as pianoKeyFrequency,yr as pianoKeyMidiNote,li as playTimelineUserMessageNavigationNote,eo as playTimelineUserMessageNavigationSequence,Zn as preloadTimelineUserMessageNavigationInstrument};
1
+ import{Eo,Ti,Ao,Lo,Si,wr,Or,kr,Ii,Fr,Br,Pi,Ni}from"../chunk-f4a1my6v.js";export{Ti as armTimelineUserMessageNavigationAudio,Or as automaticNavigationMidiNote,Pi as getNavigationAudioContextState,Ni as getNavigationInstrumentReady,Ao as installTimelineUserMessageNavigationAudioUnlock,Fr as itemPianoKeyIndex,wr as navigationMidiNote,Br as navigationPianoKeyIndexes,Ii as pianoKeyFrequency,kr as pianoKeyMidiNote,Si as playTimelineUserMessageNavigationNote,Lo as playTimelineUserMessageNavigationSequence,Eo as preloadTimelineUserMessageNavigationInstrument};
@@ -1 +1 @@
1
- import{Yn}from"../chunk-bcrq96dw.js";export{Yn as NavigationPreview};
1
+ import{Ro}from"../chunk-5x4an3fb.js";export{Ro as NavigationPreview};
@@ -1 +1 @@
1
- import{Xn}from"../chunk-mvv5xmap.js";import"../chunk-bcrq96dw.js";export{Xn as TimelineUserMessageNavigationRail};
1
+ import{Mo}from"../chunk-fexvhys2.js";import"../chunk-5x4an3fb.js";export{Mo as TimelineUserMessageNavigationRail};
@@ -1 +1 @@
1
- import{Dn,Ne}from"../chunk-y0psrvcc.js";export{Ne as PatchView,Dn as patchStats};
1
+ import{po,Be}from"../chunk-yh9qdb2k.js";export{Be as PatchView,po as patchStats};
@@ -1 +1 @@
1
- import{G}from"../chunk-w45d5th9.js";export{G as CodexPlan};
1
+ import{X}from"../chunk-s0ef3h7b.js";export{X as CodexPlan};
@@ -1 +1 @@
1
- import{ii,On,me,Dt,Fn,Bn,zn}from"../chunk-023yzyq8.js";export{ii as CODEX_UNKNOWN_TURN_HEIGHT,me as calculateCodexThreadVirtualRange,Bn as calculateCodexTurnCenterDistanceFromBottom,zn as calculateCodexTurnTargetDistanceFromBottom,On as createCodexThreadVirtualLayout,Fn as preserveCodexThreadDistanceFromBottom,Dt as preserveCodexThreadRenderedWindow};
1
+ import{ki,ho,be,jt,vo,xo,yo}from"../chunk-rxc15vtr.js";export{ki as CODEX_UNKNOWN_TURN_HEIGHT,be as calculateCodexThreadVirtualRange,xo as calculateCodexTurnCenterDistanceFromBottom,yo as calculateCodexTurnTargetDistanceFromBottom,ho as createCodexThreadVirtualLayout,vo as preserveCodexThreadDistanceFromBottom,jt as preserveCodexThreadRenderedWindow};
@@ -1 +1 @@
1
- import{No}from"../chunk-c9k66x5g.js";export{No as selectTurnActivity};
1
+ import{ar}from"../chunk-pvj43sjx.js";export{ar as selectTurnActivity};
@@ -1 +1 @@
1
- import{qt,go}from"../chunk-8a1j96d1.js";import"../chunk-gszy4mhj.js";export{go as CodexUserMessage,qt as CopyAction};
1
+ import{nn,Go}from"../chunk-vk36fprb.js";import"../chunk-a3x74cr0.js";export{Go as CodexUserMessage,nn as CopyAction};
@@ -1 +1 @@
1
- import{Hn}from"../chunk-s2k5xynq.js";import"../chunk-023yzyq8.js";export{Hn as VirtualizedTurnList};
1
+ import{fo}from"../chunk-frqg34kq.js";import"../chunk-rxc15vtr.js";export{fo as VirtualizedTurnList};
@@ -1 +1 @@
1
- import{en,vi}from"../chunk-mwd0ed0c.js";import"../chunk-c7km8xgd.js";export{vi as filterFiles,en as filterSlashCommands};
1
+ import{_t,Jr}from"../chunk-10j68dch.js";import"../chunk-4andq00q.js";export{Jr as filterFiles,_t as filterSlashCommands};
@@ -1 +1 @@
1
- import{Eo}from"../chunk-phy911dk.js";import"../chunk-mwd0ed0c.js";import"../chunk-chwg3na0.js";import"../chunk-c7km8xgd.js";import"../chunk-vcbv30ph.js";import"../chunk-ksv9pjc2.js";import"../chunk-6kn920c5.js";export{Eo as CompletionMenu};
1
+ import{Tn}from"../chunk-56e8naj1.js";import"../chunk-10j68dch.js";import"../chunk-w38vbf7h.js";import"../chunk-4andq00q.js";import"../chunk-7zrnt6zw.js";import"../chunk-1fm5vx1n.js";import"../chunk-wpdn3rx8.js";export{Tn as CompletionMenu};
@@ -1 +1 @@
1
- import{Ao}from"../chunk-chwg3na0.js";export{Ao as detectTrigger};
1
+ import{Sn}from"../chunk-w38vbf7h.js";export{Sn as detectTrigger};