@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
package/README.md CHANGED
@@ -130,3 +130,10 @@ Historical sessions without Runtime state do not count as idle. Opening the menu
130
130
  does not acknowledge unread sessions, stop agents, or create a second registry.
131
131
  `onSelect` uses the application's existing session navigation path.
132
132
  The component is engine-neutral and does not require a Codex client or provider.
133
+
134
+ Standard ACP child sessions appear in the shared `SessionActions` shelf, including
135
+ nested transcripts, advertised cancellation, and permissions or forms from every
136
+ descendant. Expanding a child reads its existing stream; it never opens another
137
+ agent session. `ConversationView` includes this shelf automatically; custom hosts
138
+ should mount one `SessionActions` for the root conversation. Requires
139
+ `@nyssance/codex-acp-v2` 0.7.47 or later.
@@ -1 +1 @@
1
- import{lr,a,v}from"./chunk-y6r6tzfh.js";export{lr as ActivityHostProvider,v as ActivityMarkdown,a as useActivityHost};
1
+ import{cr,a,x}from"./chunk-qxabrz98.js";export{cr as ActivityHostProvider,x as ActivityMarkdown,a as useActivityHost};
@@ -1 +1 @@
1
- import{qe}from"../chunk-xa20eex9.js";import{e}from"../chunk-6kn920c5.js";import{ue}from"../chunk-1drkvxzk.js";import{l}from"../chunk-1hy64ewz.js";import{f}from"../chunk-ek06eyp4.js";import{j,P}from"../chunk-ana59z25.js";import{k}from"../chunk-ncekagm6.js";import{gn,Ct,ae,Ge}from"../chunk-63zq5nr8.js";import{autoUpdate as G}from"@floating-ui/dom";import{cn as H}from"cn";import{useCallback as R,useEffect as M,useLayoutEffect as O,useMemo as _,useRef as V,useState as F}from"react";import{createPortal as W}from"react-dom";import{jsx as i,jsxs as m}from"react/jsx-runtime";var c="__other__";function le({current:r,total:A,anchorRef:N,t:p,onAccept:I,onDecline:L}){let x=_(()=>r?gn(r.requestedSchema):[],[r]),[S,b]=F({}),T=V(null);M(()=>{if(r?.elicitationId===void 0)return;let t={};for(let{key:a,property:o}of x)if(!ae(o)){let u=Ge(o)[0];if(u)t[a]={selected:u.value}}b(t)},[r?.elicitationId,x]),M(()=>{if(r?.elicitationId!==void 0&&T.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")T.current.focus()},[r?.elicitationId]);let[y,q]=F(null),[C,z]=F(null),E=R(()=>{let t=N.current;if(!t)return;let a=t.getBoundingClientRect();if(a.width===0){let o=Math.min(640,window.innerWidth*0.9);q({left:(window.innerWidth-o)/2,width:o,bottom:24});return}q({left:a.left,width:a.width,bottom:window.innerHeight-a.bottom+20})},[N]);O(()=>{if(!r)return;let t=0,a=()=>{if(N.current){E();return}t=requestAnimationFrame(a)};return a(),()=>cancelAnimationFrame(t)},[r,E,N]),O(()=>{let t=N.current;if(!r||!t||!C)return;return G(t,C,E,{animationFrame:!0})},[r,C,N,E]);let U=_(()=>{if(!r)return!1;for(let{key:t,property:a}of x){let o=S[t];if(!o)return!1;if(ae(a)){if(!o.selectedSet||o.selectedSet.size===0)return!1;if(o.selectedSet.has(c)&&!o.otherText?.trim())return!1}else{if(!o.selected)return!1;if(o.selected===c&&!o.otherText?.trim())return!1}}return!0},[r,x,S]),D=R(async()=>{if(!r)return;if(!U)return;let t={},a={};for(let{key:o,property:u}of x){let d=S[o];if(!d)continue;let g;if(ae(u))t[o]=[...d.selectedSet??[]].map((v)=>v===c?(d.otherText??"").trim():v).filter(Boolean);else{let v=d.selected??"";if(t[o]=v===c?(d.otherText??"").trim():v,v!==c)g=Ge(u).find((s)=>s.value===v)?.preview}let h=d.notes?.trim();if(g||h)a[o]={...g&&{preview:g},...h&&{notes:h}}}await I(r.elicitationId,t,a)},[r,x,S,U,I]),B=R(async()=>{if(r)await L(r.elicitationId)},[r,L]);if(!r||!y)return null;return W(m("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(t)=>{if(t.key==="Escape")t.preventDefault(),B()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:y.left,width:y.width,bottom:y.bottom,maxHeight:"70vh"},ref:(t)=>{T.current=t,z(t)},children:[m("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[i("div",{className:"text-foreground text-sm font-medium",children:p("askUserQuestion.title")}),A>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${A}`})]}),i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"space-y-4 px-3 py-3",children:x.map(({key:t,property:a},o)=>{let u=S[t],d=u?.selected,g=u?.selectedSet??new Set,h=Ge(a),v=ae(a);return m("div",{className:"space-y-2",children:[m("div",{className:"flex items-center gap-2",children:[i(qe,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:Ct(a).title??t}),i("div",{className:"text-foreground text-sm font-medium",children:Ct(a).description})]}),v?m("div",{className:"space-y-1.5 ps-1",children:[h.map((s)=>m("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[i(ue,{checked:g.has(s.value),onCheckedChange:(n)=>{b((w)=>{let Q=new Set(w[t]?.selectedSet??new Set);if(n)Q.add(s.value);else Q.delete(s.value);return{...w,[t]:{...w[t],selectedSet:Q}}})}}),m("div",{className:"min-w-0 flex-1",children:[i("div",{className:"text-foreground text-sm",children:s.label}),s.description&&i("div",{className:"text-muted-foreground text-xs",children:s.description})]})]},s.value)),m("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[i(ue,{checked:g.has(c),onCheckedChange:(s)=>{b((n)=>{let w=new Set(n[t]?.selectedSet??new Set);if(s)w.add(c);else w.delete(c);return{...n,[t]:{...n[t],selectedSet:w}}})}}),i("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:p("askUserQuestion.other")})]}),g.has(c)&&i("div",{className:"ps-7",children:i(l,{placeholder:p("askUserQuestion.otherPlaceholder"),value:u?.otherText??"",onChange:(s)=>b((n)=>({...n,[t]:{...n[t],otherText:s.target.value}}))})})]}):m(j,{value:d??"",onValueChange:(s)=>b((n)=>({...n,[t]:{...n[t],selected:s}})),className:"space-y-1.5 ps-1",children:[h.map((s)=>{let n=`${o}:${s.value}`;return m("div",{className:H("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",d===s.value&&"bg-muted/60"),children:[i(P,{value:s.value,id:n}),m(f,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer",children:[i("div",{className:"text-foreground text-sm font-normal",children:s.label}),s.description&&i("div",{className:"text-muted-foreground text-xs font-normal",children:s.description})]})]},s.value)}),m("div",{className:H("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",d===c&&"bg-muted/60"),children:[i(P,{value:c,id:`${o}:other`,className:"mt-0.5"}),i(f,{htmlFor:`${o}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:p("askUserQuestion.other")})]}),d===c&&i("div",{className:"ps-7",children:i(l,{placeholder:p("askUserQuestion.otherPlaceholder"),value:u?.otherText??"",onChange:(s)=>b((n)=>({...n,[t]:{...n[t],otherText:s.target.value}}))})})]}),!v&&d&&d!==c&&(()=>{let s=h.find((n)=>n.value===d)?.preview;if(!s)return null;return i("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:s})})(),h.some((s)=>s.preview)&&i(k,{placeholder:p("askUserQuestion.notesPlaceholder"),value:u?.notes??"",onChange:(s)=>b((n)=>({...n,[t]:{...n[t],notes:s.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},t)})})}),m("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[i(e,{variant:"ghost",size:"sm",onClick:()=>void B(),children:p("askUserQuestion.cancel")}),i(e,{size:"sm",disabled:!U,onClick:()=>void D(),children:p("askUserQuestion.submit")})]})]}),document.body)}export{le as ChoiceElicitationForm};
1
+ import{We}from"../chunk-9gv1zffv.js";import{e}from"../chunk-wpdn3rx8.js";import{fe}from"../chunk-2a3tezgr.js";import{s}from"../chunk-96x0d2vd.js";import{v}from"../chunk-kjtd3wc3.js";import{Y,A}from"../chunk-0nkvfecf.js";import{k}from"../chunk-da6d6wze.js";import{fn,St,ae,Ke}from"../chunk-egqxz6f8.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as H}from"cn";import{useCallback as Q,useEffect as M,useLayoutEffect as O,useMemo as _,useRef as G,useState as R}from"react";import{createPortal as V}from"react-dom";import{jsx as o,jsxs as m}from"react/jsx-runtime";var c="__other__";function le({current:a,total:F,anchorRef:N,t:p,onAccept:I,onDecline:L}){let x=_(()=>a?fn(a.requestedSchema):[],[a]),[S,b]=R({}),T=G(null);M(()=>{if(a?.elicitationId===void 0)return;let t={};for(let{key:l,property:n}of x)if(!ae(n)){let u=Ke(n)[0];if(u)t[l]={selected:u.value}}b(t)},[a?.elicitationId,x]),M(()=>{if(a?.elicitationId!==void 0&&T.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")T.current.focus()},[a?.elicitationId]);let[y,q]=R(null),[C,z]=R(null),E=Q(()=>{let t=N.current;if(!t)return;let l=t.getBoundingClientRect();if(l.width===0){let n=Math.min(640,window.innerWidth*0.9);q({left:(window.innerWidth-n)/2,width:n,bottom:24});return}q({left:l.left,width:l.width,bottom:window.innerHeight-l.bottom+20})},[N]);O(()=>{if(!a)return;let t=0,l=()=>{if(N.current){E();return}t=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(t)},[a,E,N]),O(()=>{let t=N.current;if(!a||!t||!C)return;return j(t,C,E,{animationFrame:!0})},[a,C,N,E]);let U=_(()=>{if(!a)return!1;for(let{key:t,property:l}of x){let n=S[t];if(!n)return!1;if(ae(l)){if(!n.selectedSet||n.selectedSet.size===0)return!1;if(n.selectedSet.has(c)&&!n.otherText?.trim())return!1}else{if(!n.selected)return!1;if(n.selected===c&&!n.otherText?.trim())return!1}}return!0},[a,x,S]),D=Q(async()=>{if(!a)return;if(!U)return;let t={},l={};for(let{key:n,property:u}of x){let d=S[n];if(!d)continue;let g;if(ae(u))t[n]=[...d.selectedSet??[]].map((f)=>f===c?(d.otherText??"").trim():f).filter(Boolean);else{let f=d.selected??"";if(t[n]=f===c?(d.otherText??"").trim():f,f!==c)g=Ke(u).find((i)=>i.value===f)?.preview}let h=d.notes?.trim();if(g||h)l[n]={...g&&{preview:g},...h&&{notes:h}}}await I(a.elicitationId,t,l)},[a,x,S,U,I]),B=Q(async()=>{if(a)await L(a.elicitationId)},[a,L]);if(!a||!y)return null;return V(m("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(t)=>{if(t.key==="Escape")t.preventDefault(),B()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:y.left,width:y.width,bottom:y.bottom,maxHeight:"70vh"},ref:(t)=>{T.current=t,z(t)},children:[m("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[o("div",{className:"text-foreground text-sm font-medium",children:p("askUserQuestion.title")}),F>1&&o("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${F}`})]}),o("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o("div",{className:"space-y-4 px-3 py-3",children:x.map(({key:t,property:l},n)=>{let u=S[t],d=u?.selected,g=u?.selectedSet??new Set,h=Ke(l),f=ae(l);return m("div",{className:"space-y-2",children:[m("div",{className:"flex items-center gap-2",children:[o(We,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:St(l).title??t}),o("div",{className:"text-foreground text-sm font-medium",children:St(l).description})]}),f?m("div",{className:"space-y-1.5 ps-1",children:[h.map((i)=>m("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[o(fe,{checked:g.has(i.value),onCheckedChange:(r)=>{b((w)=>{let P=new Set(w[t]?.selectedSet??new Set);if(r)P.add(i.value);else P.delete(i.value);return{...w,[t]:{...w[t],selectedSet:P}}})}}),m("div",{className:"min-w-0 flex-1",children:[o("div",{className:"text-foreground text-sm",children:i.label}),i.description&&o("div",{className:"text-muted-foreground text-xs",children:i.description})]})]},i.value)),m("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[o(fe,{checked:g.has(c),onCheckedChange:(i)=>{b((r)=>{let w=new Set(r[t]?.selectedSet??new Set);if(i)w.add(c);else w.delete(c);return{...r,[t]:{...r[t],selectedSet:w}}})}}),o("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:p("askUserQuestion.other")})]}),g.has(c)&&o("div",{className:"ps-7",children:o(s,{placeholder:p("askUserQuestion.otherPlaceholder"),value:u?.otherText??"",onChange:(i)=>b((r)=>({...r,[t]:{...r[t],otherText:i.target.value}}))})})]}):m(Y,{value:d??"",onValueChange:(i)=>b((r)=>({...r,[t]:{...r[t],selected:i}})),className:"space-y-1.5 ps-1",children:[h.map((i)=>{let r=`${n}:${i.value}`;return m("div",{className:H("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",d===i.value&&"bg-muted/60"),children:[o(A,{value:i.value,id:r}),m(v,{htmlFor:r,className:"min-w-0 flex-1 cursor-pointer",children:[o("div",{className:"text-foreground text-sm font-normal",children:i.label}),i.description&&o("div",{className:"text-muted-foreground text-xs font-normal",children:i.description})]})]},i.value)}),m("div",{className:H("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",d===c&&"bg-muted/60"),children:[o(A,{value:c,id:`${n}:other`,className:"mt-0.5"}),o(v,{htmlFor:`${n}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:p("askUserQuestion.other")})]}),d===c&&o("div",{className:"ps-7",children:o(s,{placeholder:p("askUserQuestion.otherPlaceholder"),value:u?.otherText??"",onChange:(i)=>b((r)=>({...r,[t]:{...r[t],otherText:i.target.value}}))})})]}),!f&&d&&d!==c&&(()=>{let i=h.find((r)=>r.value===d)?.preview;if(!i)return null;return o("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:i})})(),h.some((i)=>i.preview)&&o(k,{placeholder:p("askUserQuestion.notesPlaceholder"),value:u?.notes??"",onChange:(i)=>b((r)=>({...r,[t]:{...r[t],notes:i.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},t)})})}),m("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[o(e,{variant:"ghost",size:"sm",onClick:()=>void B(),children:p("askUserQuestion.cancel")}),o(e,{size:"sm",disabled:!U,onClick:()=>void D(),children:p("askUserQuestion.submit")})]})]}),document.body)}export{le as ChoiceElicitationForm};
@@ -1 +1 @@
1
- import{gn,Ct,ae,Ge}from"../chunk-63zq5nr8.js";export{gn as elicitationFields,Ct as elicitationLabels,Ge as elicitationOptions,ae as isMultiSelect};
1
+ import{fn,St,ae,Ke}from"../chunk-egqxz6f8.js";export{fn as elicitationFields,St as elicitationLabels,Ke as elicitationOptions,ae as isMultiSelect};
@@ -1 +1 @@
1
- import{vr,Tn,Zr,Jr}from"../chunk-jr591zg2.js";export{vr as PERMISSION_KIND_GROUP_ORDER,Zr as isAllowKind,Jr as isAlwaysKind,Tn as sortPermissionOptions};
1
+ import{br,no,mi,pi}from"../chunk-e1gwprwe.js";export{br as PERMISSION_KIND_GROUP_ORDER,mi as isAllowKind,pi as isAlwaysKind,no as sortPermissionOptions};
@@ -1 +1 @@
1
- import{wn}from"../chunk-mkw0twsb.js";import"../chunk-jr591zg2.js";export{wn as PermissionView};
1
+ import{Jn}from"../chunk-a6b2vhmb.js";import"../chunk-e1gwprwe.js";export{Jn as PermissionView};
@@ -1 +1 @@
1
- import{Nr,hr,Mr,kn}from"../chunk-bna24ggr.js";import"../chunk-1drkvxzk.js";import"../chunk-8jpm8fnf.js";import"../chunk-1hy64ewz.js";import"../chunk-ana59z25.js";import"../chunk-ek06eyp4.js";import"../chunk-ksv9pjc2.js";import"../chunk-a2hygrpr.js";import"../chunk-ak0k5vg6.js";import"../chunk-ncekagm6.js";import"../chunk-6kn920c5.js";export{kn as SchemaElicitationForm,Nr as elicitationFields,hr as initialValues,Mr as isAnswered};
1
+ import{Ar,yr,Lr,eo}from"../chunk-x7jtngzd.js";import"../chunk-2a3tezgr.js";import"../chunk-c493d8ay.js";import"../chunk-1fm5vx1n.js";import"../chunk-n5xqjct2.js";import"../chunk-4s1rhts0.js";import"../chunk-96x0d2vd.js";import"../chunk-0nkvfecf.js";import"../chunk-kjtd3wc3.js";import"../chunk-da6d6wze.js";import"../chunk-wpdn3rx8.js";export{eo as SchemaElicitationForm,Ar as elicitationFields,yr as initialValues,Lr as isAnswered};
@@ -1 +1 @@
1
- import{Cn}from"../chunk-4wkpatzz.js";import"../chunk-8712sy9s.js";import"../chunk-6kn920c5.js";export{Cn as UrlElicitationCard};
1
+ import{to}from"../chunk-m2xmz1ag.js";import"../chunk-mr1azhef.js";import"../chunk-wpdn3rx8.js";export{to as UrlElicitationCard};
@@ -1,2 +1,2 @@
1
- import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function ro(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
2
- export{ro};
1
+ import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function Oo(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
2
+ export{Oo};
@@ -0,0 +1 @@
1
+ import{Radio as e}from"@base-ui/react/radio";import{RadioGroup as t}from"@base-ui/react/radio-group";import{cn as o}from"cn";import{jsx as r}from"react/jsx-runtime";function Y({className:i,...a}){return r(t,{"data-slot":"radio-group",className:o("grid w-full gap-3",i),...a})}function A({className:i,...a}){return r(e.Root,{"data-slot":"radio-group-item",className:o("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",i),...a,children:r(e.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:r("span",{className:"absolute top-1/2 start-1/2 size-2 -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}export{Y,A};
@@ -1,2 +1,2 @@
1
- import{Me}from"./chunk-hh498geh.js";import{Io}from"./chunk-zg2342s2.js";import{t}from"./chunk-f3e3ged2.js";import{_}from"./chunk-kfs19vc5.js";import{Vt}from"./chunk-753s76b6.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as k,useMemo as v}from"react";import{jsx as l,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((o)=>y(o.content)||g(o.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((o,s)=>l(_,{block:o.content},`${n.id}:${s}`))]})}var zt=k(function({sessionId:r,items:o,terminals:s,streamingThoughtId:d}){let p=t(),i=o.every(Vt),c=p.toolBlock,a=v(()=>o.map((e)=>{let m={...Io(e,s,e.kind==="thought"&&e.id===d),id:JSON.stringify([r,i?"history":"live",e.id])};return m.type==="tool_use"&&e.kind==="tool"&&c!==void 0?c(m,e):m}),[r,i,o,s,d,c]);return u(T,{children:[l(Me,{blocks:a,defaultExpanded:!i}),o.map((e)=>e.kind==="tool"&&l(R,{item:e},e.id))]})});
2
- export{zt};
1
+ import{$e}from"./chunk-h2gng003.js";import{or}from"./chunk-kq8kz0jn.js";import{t}from"./chunk-q6km9nha.js";import{B}from"./chunk-y6afvrnv.js";import{on}from"./chunk-g5gz25jy.js";import{isContentEntry as f,isEmbeddedResource as y,isResourceLink as g}from"@nyssance/codex-acp-v2/client";import{memo as k,useMemo as v}from"react";import{jsx as l,jsxs as u,Fragment as T}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(f).filter((o)=>y(o.content)||g(o.content));if(r.length===0)return null;return u("fieldset",{className:"mt-1 min-w-0",children:[l("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((o,s)=>l(B,{block:o.content},`${n.id}:${s}`))]})}var Jt=k(function({sessionId:r,items:o,terminals:s,streamingThoughtId:d}){let p=t(),i=o.every(on),c=p.toolBlock,a=v(()=>o.map((e)=>{let m={...or(e,s,e.kind==="thought"&&e.id===d),id:JSON.stringify([r,i?"history":"live",e.id])};return m.type==="tool_use"&&e.kind==="tool"&&c!==void 0?c(m,e):m}),[r,i,o,s,d,c]);return u(T,{children:[l($e,{blocks:a,defaultExpanded:!i}),o.map((e)=>e.kind==="tool"&&l(R,{item:e},e.id))]})});
2
+ export{Jt};
@@ -1,2 +1,2 @@
1
- import{tn,Ho}from"./chunk-c7km8xgd.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function en(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=tn(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function vi(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return Ho(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
2
- export{en,vi};
1
+ import{Ht,Mn}from"./chunk-4andq00q.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function _t(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=Ht(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function Jr(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return Mn(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
2
+ export{_t,Jr};
@@ -0,0 +1,2 @@
1
+ import{l,r}from"./chunk-da4m33bg.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function pr(e,o){let s=l(),a=r((t)=>t.connection),i=r((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),c=r((t)=>v(t.sessions[e]?.items)),u=r((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(a!=="ready"||u||i)return;let t=!1,f,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(o==="running"||n>0&&n<3))f=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(f)}},[s,e,a,u,i,o]),i?c:p??c}
2
+ export{pr};
@@ -0,0 +1,2 @@
1
+ import{Dn}from"./chunk-nt224frq.js";import{o,C}from"./chunk-6acs2hzs.js";import{N,c}from"./chunk-n1tjf64a.js";import{createLucideIcon as w,HandIcon as y,ShieldAlertIcon as S,ShieldCheckIcon as r}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var O=w("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),u={"read-only":y,"workspace-write":r,agent:O,"agent-full-access":S},b={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function ut({sessionId:g,options:m,disabled:f,onConfigChange:l}){let{host:p,client:h}=o(),{t:a}=p,s=c(m,"mode");if(!s)return null;let n=s.currentValue,d=N(s).map((e)=>{let i=b[e.value];return i?{...e,name:a(`permissionModes.${i}.name`),description:a(`permissionModes.${i}.description`)}:e}),I=d.find((e)=>e.value===n),M=u[n]??r,v=(e)=>{if(e===n)return;C(p,l?l(s.configId,e):h.setConfig(g,s.configId,e))};return t(Dn,{value:n,warning:n==="agent-full-access",currentName:I?.name??n,icon:t(M,{className:"size-3.5 shrink-0"}),header:a("permissionModes.heading"),disabled:f,label:a("composer.switchPermissionMode"),onValueChange:v,options:d.map((e)=>{let i=u[e.value]??r,k=e.value==="agent-full-access";return{value:e.value,label:t("span",{"data-permission-warning":k?"":void 0,children:e.name}),description:e.description?t("span",{className:"whitespace-normal",children:e.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}
2
+ export{ut};
@@ -1 +1 @@
1
- import{Separator as o}from"@base-ui/react/separator";import{cn as i}from"cn";import{jsx as e}from"react/jsx-runtime";function Q({className:a,orientation:r="horizontal",...t}){return e(o,{"data-slot":"separator",orientation:r,className:i("bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...t})}export{Q};
1
+ import{Separator as o}from"@base-ui/react/separator";import{cn as i}from"cn";import{jsx as e}from"react/jsx-runtime";function j({className:a,orientation:r="horizontal",...t}){return e(o,{"data-slot":"separator",orientation:r,className:i("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...t})}export{j};
@@ -0,0 +1,2 @@
1
+ function Mr(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function In(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(Mr(n,i))}return{imageFiles:e,sawNonImageFile:o}}function Pn(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function Rr(t){return[...t].filter((e)=>!s(e)).join("")}function vr(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function lt(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=Rr(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-vr(e,o)),r=Math.max(0,i-vr(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
2
+ export{Mr,In,Pn,Rr,vr,lt};
@@ -1,2 +1,2 @@
1
- function Wn(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function Gn(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
2
- export{Wn,Gn};
1
+ function To(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function So(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
2
+ export{To,So};
@@ -1,2 +1,2 @@
1
- import{o}from"./chunk-f3e3ged2.js";import{n}from"./chunk-9hvbm4be.js";import{codexExtensionCapabilities as T,codexTurnId as w,composerPrediction as j,isBooleanOption as B,isSelectOption as F}from"@nyssance/codex-acp-v2/client";import{useEffect as b,useRef as C,useState as P}from"react";function pt(t,g,c,y){let{client:S}=n(),R=o((e)=>T(e.agent).composerPredictions),k=t.items.findLast((e)=>e.kind==="user"),i=w(k?._meta),O=t.configOptions.flatMap((e)=>F(e)||B(e)?[[e.configId,e.currentValue]]:[]).sort(([e],[u])=>String(e).localeCompare(String(u))),r=JSON.stringify([t.id,i,O]),s=j(t._meta),d=t._meta?.codex,m=typeof d==="object"&&d!==null&&"prediction"in d?d.prediction:null,l=C(null),f=C(!1);b(()=>(f.current=!0,()=>{f.current=!1}),[]);let[a,_]=P(null),[v,x]=P(null),p=y&&R&&g&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===r||l.current?.key===r||i===null)return;let e={key:r,previousResult:m};l.current=e,x(null),S.requestPrediction(t.id,i).catch((u)=>{if(f.current&&l.current===e)x({key:r,message:u instanceof Error?u.message:String(u)})})},[S,p,c,a,r,m,t.id,i]);let I=p&&!c&&a!==r&&l.current?.key===r&&l.current.previousResult!==m&&s?.sourceTurnId===i,q=I&&s.result.type==="completed"?s.result.text:null,E=y&&g&&t.state==="idle"&&!c&&a!==r?v?.key===r?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:q,error:E,invalidate:()=>{if(p)_(r)}}}
2
- export{pt};
1
+ import{n}from"./chunk-q6km9nha.js";import{o}from"./chunk-6acs2hzs.js";import{codexExtensionCapabilities as T,codexTurnId as w,composerPrediction as j,isBooleanOption as B,isSelectOption as F}from"@nyssance/codex-acp-v2/client";import{useEffect as b,useRef as C,useState as P}from"react";function mt(t,g,c,y){let{client:S}=o(),R=n((e)=>T(e.agent).composerPredictions),k=t.items.findLast((e)=>e.kind==="user"),i=w(k?._meta),O=t.configOptions.flatMap((e)=>F(e)||B(e)?[[e.configId,e.currentValue]]:[]).sort(([e],[u])=>String(e).localeCompare(String(u))),r=JSON.stringify([t.id,i,O]),s=j(t._meta),d=t._meta?.codex,m=typeof d==="object"&&d!==null&&"prediction"in d?d.prediction:null,l=C(null),f=C(!1);b(()=>(f.current=!0,()=>{f.current=!1}),[]);let[a,_]=P(null),[v,x]=P(null),p=y&&R&&g&&t.state==="idle"&&t.lastStopReason==="end_turn"&&!k?.replayed&&i!==null;b(()=>{if(!p||c||a===r||l.current?.key===r||i===null)return;let e={key:r,previousResult:m};l.current=e,x(null),S.requestPrediction(t.id,i).catch((u)=>{if(f.current&&l.current===e)x({key:r,message:u instanceof Error?u.message:String(u)})})},[S,p,c,a,r,m,t.id,i]);let I=p&&!c&&a!==r&&l.current?.key===r&&l.current.previousResult!==m&&s?.sourceTurnId===i,q=I&&s.result.type==="completed"?s.result.text:null,E=y&&g&&t.state==="idle"&&!c&&a!==r?v?.key===r?v.message:I&&s.result.type==="failed"?"Prediction failed":null:null;return{text:q,error:E,invalidate:()=>{if(p)_(r)}}}
2
+ export{mt};
@@ -0,0 +1 @@
1
+ import{Menu as n}from"@base-ui/react/menu";import{cn as i}from"cn";import{ChevronRightIcon as p,CheckIcon as c}from"lucide-react";import{jsx as t,jsxs as u}from"react/jsx-runtime";function H({...e}){return t(n.Root,{"data-slot":"dropdown-menu",...e})}function ei({...e}){return t(n.Portal,{"data-slot":"dropdown-menu-portal",...e})}function O({...e}){return t(n.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function S({align:e="start",alignOffset:o=0,side:a="bottom",sideOffset:r=4,className:d,...s}){return t(n.Portal,{children:t(n.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:a,sideOffset:r,children:t(n.Popup,{"data-slot":"dropdown-menu-content",className:i("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",d),...s})})})}function F({...e}){return t(n.Group,{"data-slot":"dropdown-menu-group",...e})}function te({className:e,inset:o,...a}){return t(n.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:i("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:ps-8",e),...a})}function I({className:e,inset:o,variant:a="default",...r}){return t(n.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:i("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function Re({...e}){return t(n.SubmenuRoot,{"data-slot":"dropdown-menu-sub",...e})}function Ee({className:e,inset:o,children:a,...r}){return u(n.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:i("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:ps-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[a,t(p,{className:"rtl:rotate-180 ms-auto"})]})}function Ae({align:e="start",alignOffset:o=-3,side:a="inline-end",sideOffset:r=0,className:d,...s}){return t(S,{"data-slot":"dropdown-menu-sub-content",className:i("w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",d),align:e,alignOffset:o,side:a,sideOffset:r,...s})}function Bt({className:e,children:o,checked:a,inset:r,...d}){return u(n.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:i("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pe-8 ps-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...d,children:[t("span",{className:"pointer-events-none absolute end-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:t(n.CheckboxItemIndicator,{children:t(c,{})})}),o]})}function Hn({...e}){return t(n.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function On({className:e,children:o,inset:a,...r}){return u(n.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:i("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pe-8 ps-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:ps-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t("span",{className:"pointer-events-none absolute end-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:t(n.RadioItemIndicator,{children:t(c,{})})}),o]})}function P({className:e,...o}){return t(n.Separator,{"data-slot":"dropdown-menu-separator",className:i("-mx-1 my-1 h-px bg-border",e),...o})}function ti({className:e,...o}){return t("span",{"data-slot":"dropdown-menu-shortcut",className:i("ms-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...o})}export{H,ei,O,S,F,te,I,Re,Ee,Ae,Bt,Hn,On,P,ti};
@@ -0,0 +1 @@
1
+ import{Checkbox as e}from"@base-ui/react/checkbox";import{cn as o}from"cn";import{CheckIcon as t}from"lucide-react";import{jsx as i}from"react/jsx-runtime";function fe({className:r,...a}){return i(e.Root,{"data-slot":"checkbox",className:o("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",r),...a,children:i(e.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:i(t,{})})})}export{fe};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-6kn920c5.js";import{H,O,N,F,te,M}from"./chunk-zw3h5xgf.js";import{z}from"./chunk-fteek5h4.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";var u=["requires_action","running","done","idle"];function cr({sessions:l,onSelect:p,t:o}){return t("div",{className:"flex shrink-0 items-center gap-0.5",role:"group","aria-label":o("sessionList.states.title"),children:u.map((s)=>{let a=l.filter((n)=>n.state===s),i=o(`sessionList.states.${s}`);return r(H,{children:[r(O,{render:t(e,{variant:"ghost",size:"xs"}),"aria-label":`${i}: ${a.length}`,children:[t(z,{state:s,pulse:!1}),t("span",{className:"tabular-nums",children:a.length})]}),t(N,{"aria-label":i,className:"w-72 max-w-[calc(100vw-1rem)]",children:r(F,{children:[t(te,{children:i}),a.length===0?t(M,{disabled:!0,children:o("sessionList.states.empty")}):a.map((n)=>r(M,{onClick:()=>p(n),children:[t(z,{state:n.state,pulse:!1}),t("span",{className:"min-w-0 flex-1 truncate",children:n.title||o("sessionList.untitled")})]},n.sessionId))]})})]},s)})})}
2
- export{cr};
1
+ import{e}from"./chunk-wpdn3rx8.js";import{H,O,S,F,te,I}from"./chunk-25bzk1wv.js";import{q}from"./chunk-djmnmbm2.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";var u=["requires_action","running","done","idle"];function mr({sessions:l,onSelect:p,t:o}){return t("div",{className:"flex shrink-0 items-center gap-0.5",role:"group","aria-label":o("sessionList.states.title"),children:u.map((s)=>{let a=l.filter((n)=>n.state===s),i=o(`sessionList.states.${s}`);return r(H,{children:[r(O,{render:t(e,{variant:"ghost",size:"xs"}),"aria-label":`${i}: ${a.length}`,children:[t(q,{state:s,pulse:!1}),t("span",{className:"tabular-nums",children:a.length})]}),t(S,{"aria-label":i,className:"w-72 max-w-[calc(100vw-1rem)]",children:r(F,{children:[t(te,{children:i}),a.length===0?t(I,{disabled:!0,children:o("sessionList.states.empty")}):a.map((n)=>r(I,{onClick:()=>p(n),children:[t(q,{state:n.state,pulse:!1}),t("span",{className:"min-w-0 flex-1 truncate",children:n.title||o("sessionList.untitled")})]},n.sessionId))]})})]},s)})})}
2
+ export{mr};
@@ -1,2 +1,2 @@
1
- import{y}from"./chunk-vcbv30ph.js";import{e}from"./chunk-6kn920c5.js";import{n}from"./chunk-9hvbm4be.js";import{Fe}from"./chunk-gpz9f9zq.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Bo({data:s,sessionId:m}){let{host:a}=n(),{t:o}=a,p=y(),{text:c,status:r}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(e,{type:"button",variant:"ghost",disabled:r!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:r==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(r==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),r==="error"&&a.writeTextAttachment&&t(e,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>Fe(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(e,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
- export{Bo};
1
+ import{y}from"./chunk-7zrnt6zw.js";import{e}from"./chunk-wpdn3rx8.js";import{o}from"./chunk-6acs2hzs.js";import{Le}from"./chunk-61944cv6.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Ln({data:s,sessionId:m}){let{host:a}=o(),{t:n}=a,p=y(),{text:c,status:r}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(e,{type:"button",variant:"ghost",disabled:r!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:r==="ready"?n("composer.pastedTextCharacters",{count:c.length}):n(r==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),r==="error"&&a.writeTextAttachment&&t(e,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("composer.pastedTextRetry"),onClick:()=>Le(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(e,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
+ export{Ln};
@@ -0,0 +1,2 @@
1
+ import{n}from"./chunk-q6km9nha.js";import{o}from"./chunk-6acs2hzs.js";import{ge,Fe,ft}from"./chunk-9zmkj0dp.js";import{Oe}from"./chunk-vzy4vwqr.js";import{inSessionTree as d}from"@nyssance/codex-acp-v2/client";import{jsx as t,jsxs as c,Fragment as p}from"react/jsx-runtime";var u=[];function at({sessionId:e}){let l=n((s)=>s.sessions),{host:f}=o(),a=n((s)=>s.actions),r=a.some((s)=>d(l,e,s.sessionId))?a.filter((s)=>d(l,e,s.sessionId)):u,i=r.filter(ge),m=r.filter((s)=>!ge(s));return c(p,{children:[t("div",{className:"mx-auto max-h-[50vh] w-full max-w-3xl shrink-0 overflow-y-auto px-3","data-subagent-shelf":!0,children:t(Oe,{sessionId:e})}),m.length>0&&t("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:m.map((s)=>c("div",{children:[s.sessionId!==e&&t("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:s.sessionId===null?"":l[s.sessionId]?.title??f.t("subagents.untitled")}),t(ft,{action:s})]},s.id))}),i[0]!==void 0&&t(Fe,{action:i[0],total:i.length},i[0].id)]})}
2
+ export{at};
@@ -1,2 +1,2 @@
1
- import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function L({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=E(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>d)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/M}s linear`},children:p})})}
2
- export{L};
1
+ import{cn as a}from"cn";import{useRef as u,useState as E}from"react";import{jsx as l}from"react/jsx-runtime";var M=45,d=8;function _({className:i,children:p,onMouseEnter:c,onMouseLeave:f,...m}){let s=u(null),[t,r]=E(0);return l("span",{className:a("min-w-0 overflow-hidden",i),onMouseEnter:(e)=>{let n=s.current;if(!n)return;let o=n.scrollWidth-n.clientWidth;if(o>d)r(getComputedStyle(n).direction==="rtl"?o:-o);c?.(e)},onMouseLeave:(e)=>{r(0),f?.(e)},...m,children:l("span",{ref:s,className:a("block whitespace-nowrap",t===0?"truncate":"overflow-visible"),style:{transform:`translateX(${t}px)`,transition:`transform ${Math.abs(t)/M}s linear`},children:p})})}
2
+ export{_};
@@ -1,2 +1,2 @@
1
- import{codexMessageError as u,codexTurnError as a}from"@nyssance/codex-acp-v2/client";var c=[10,30,120,300];function Un(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||a(l).category!=="overloaded")break;if(n++,o.user!==null)break}return c[n-1]??null}
2
- export{Un};
1
+ import{codexMessageError as u,codexTurnError as a}from"@nyssance/codex-acp-v2/client";var c=[10,30,120,300];function bo(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||a(l).category!=="overloaded")break;if(n++,o.user!==null)break}return c[n-1]??null}
2
+ export{bo};
@@ -1,2 +1,2 @@
1
- import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var Ie="group/trailing";function se({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function Se({content:n,actions:e,className:r}){if(n==null&&e==null)return null;return s("span",{className:i("group/swap relative flex min-h-5 min-w-5 shrink-0 items-center justify-end",r),children:[n!=null&&t("span",{className:i("flex items-center justify-end",e!=null&&"group-focus-within/trailing:hidden group-hover/trailing:hidden group-has-[[data-popup-open]]/swap:hidden"),children:n}),e!=null&&t("span",{className:"absolute inset-y-0 end-0 hidden w-max items-center justify-end gap-0.5 group-focus-within/trailing:flex group-hover/trailing:flex has-[[data-popup-open]]:flex",onClick:(a)=>a.stopPropagation(),onKeyDown:(a)=>a.stopPropagation(),children:e})]})}
2
- export{Ie,se,Se};
1
+ import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var Se="group/trailing";function ce({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function Ie({content:n,actions:e,className:r}){if(n==null&&e==null)return null;return s("span",{className:i("group/swap relative flex min-h-5 min-w-5 shrink-0 items-center justify-end",r),children:[n!=null&&t("span",{className:i("flex items-center justify-end",e!=null&&"group-focus-within/trailing:hidden group-hover/trailing:hidden group-has-[[data-popup-open]]/swap:hidden"),children:n}),e!=null&&t("span",{className:"absolute inset-y-0 end-0 hidden w-max items-center justify-end gap-0.5 group-focus-within/trailing:flex group-hover/trailing:flex has-[[data-popup-open]]:flex",onClick:(a)=>a.stopPropagation(),onKeyDown:(a)=>a.stopPropagation(),children:e})]})}
2
+ export{Se,ce,Ie};
@@ -1,2 +1,2 @@
1
- import{uo}from"./chunk-sn80gr8g.js";function co(t,o){if(uo(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
2
- export{co};
1
+ import{qo}from"./chunk-54941m0z.js";function $o(t,o){if(qo(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
2
+ export{$o};
@@ -0,0 +1,2 @@
1
+ import{createContext as o,useContext as n,useEffect as r}from"react";var bn=o(null);function ee(t){let e=n(bn);r(()=>{if(t&&e!==null)return e()},[t,e])}
2
+ export{bn,ee};
@@ -1,2 +1,2 @@
1
- import{v}from"./chunk-y6r6tzfh.js";import{t}from"./chunk-f3e3ged2.js";import{_}from"./chunk-kfs19vc5.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(v,{text:e.text,streaming:o})})}if(i.isImage(e))return n(_,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(_,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function ee({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
2
- export{ee};
1
+ import{x}from"./chunk-qxabrz98.js";import{t}from"./chunk-q6km9nha.js";import{B}from"./chunk-y6afvrnv.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(x,{text:e.text,streaming:o})})}if(i.isImage(e))return n(B,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(B,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function oe({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
2
+ export{oe};
@@ -1,3 +1,3 @@
1
- import{q,V}from"./chunk-kbwjcnf6.js";import{e}from"./chunk-6kn920c5.js";import{d,u,b,X,m,w}from"./chunk-a2hygrpr.js";import{l}from"./chunk-1hy64ewz.js";import{Nt,Mt,Rt,xn,Z}from"./chunk-xd5rqbwp.js";import{ce}from"./chunk-xxkdv1zf.js";import{p,s,r}from"./chunk-b3nt7axf.js";import{le,U,D}from"./chunk-f7n8erng.js";import{sessionGroup as F}from"@nyssance/codex-acp-v2/client";import{cn as fe}from"cn";import{ArchiveIcon as ve,FolderIcon as Y,ListFilterIcon as ge,SearchIcon as xe,Trash2Icon as ee}from"lucide-react";import{useEffect as Se,useRef as ye,useState as f}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function te({className:v,...n}){return i(xn,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...n,className:fe("max-w-(--available-width) min-w-0 p-1",v)})}function H(v){return v instanceof Error?v.message:String(v)}function Le({children:v}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:v})})}function mr({Scroll:v=Le}){let{t:n,i18n:B}=p(),g=s(),N=r((t)=>t.archivedSessions),A=r((t)=>t.connection),[O,se]=f(""),[C,ie]=f("all"),[x,ne]=f("all"),[ae,re]=f(0),[G,K]=f(!0),[z,Q]=f(null),[_,R]=f(null),[I,j]=f(!1),S=ye(!1),[P,y]=f(null),[W,T]=f(null),[oe,J]=f(!1);Se(()=>{if(A!=="ready")return;let t=!1;K(!0),Q(null);async function h(){try{await g.listArchived({reset:!0});let o=new Set;while(!t&&g.state.archivedCursor!==null){let L=g.state.archivedCursor;if(o.has(L))throw Error("Archive pagination returned a repeated cursor");o.add(L),await g.listArchived()}}catch(o){if(!t)Q(H(o))}finally{if(!t)K(!1)}}return h(),()=>{t=!0}},[g,A,ae]);let c=r((t)=>t.projectContext),E=!(c!==null&&A==="ready"&&!G&&z===null)||I,k=(t)=>t.title??n("sessionList.untitled"),de=[...new Set(N.filter((t)=>c&&F(c,t).id!==D).map((t)=>c?F(c,t).id:t.cwd))].toSorted(),ue=O.trim().toLocaleLowerCase(B.language),M=N.filter((t)=>{let h=c?F(c,t).id:null,o=h===D;return k(t).toLocaleLowerCase(B.language).includes(ue)&&(C==="all"||(C==="quick"?o:!o))&&(x==="all"||(x==="quick"?o:h===x))}),me=new Intl.DateTimeFormat(B.language,{dateStyle:"medium",timeStyle:"short"});async function pe(t){if(S.current)return;S.current=!0,j(!0),R(null);try{await g.unarchive(t.sessionId)}catch(h){R(H(h))}finally{S.current=!1,j(!1)}}async function he(){if(S.current||!P)return;S.current=!0,j(!0),T(null);let t=[],h=[];try{for(let o of P){if(!g.state.archivedSessions.some((L)=>L.sessionId===o.sessionId))continue;try{await g.delete(o.sessionId)}catch(L){t.push(o),h.push(`${k(o)}: ${H(L)}`)}}if(t.length)y(t),T(h.join(`
2
- `));else y(null)}finally{S.current=!1,j(!1)}}return a("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":n("sessionList.archives.title"),children:[a("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[a("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[i("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:n("sessionList.archives.title")}),a(e,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:E||N.length===0,onClick:()=>{T(null),J(!0),y([...N])},children:[i(ee,{className:"size-4","aria-hidden":"true"}),n("sessionList.archives.deleteAll")]})]}),a("div",{className:"flex shrink-0 flex-wrap gap-3",children:[a("div",{className:"relative min-w-48 flex-1",children:[i(xe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(l,{"aria-label":n("sessionList.archives.search"),placeholder:n("sessionList.archives.search"),value:O,onChange:(t)=>se(t.target.value),className:"rounded-md ps-9"})]}),a(Nt,{value:C,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");ie(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(ge,{"aria-hidden":"true"}),i(Mt,{children:n(`sessionList.archives.${C==="all"?"allChats":C==="quick"?"quickChats":"projectChats"}`)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allChats")}),i(Z,{value:"quick",children:n("sessionList.archives.quickChats")}),i(Z,{value:"project",children:n("sessionList.archives.projectChats")})]})]}),a(Nt,{value:x,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");ne(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(Y,{"aria-hidden":"true"}),i(Mt,{className:"truncate",children:x==="all"?n("sessionList.archives.allProjects"):x==="quick"?n("sessionList.archives.noProject"):U(x,c??void 0)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allProjects")}),i(Z,{value:"quick",children:n("sessionList.archives.noProject")}),de.map((t)=>i(Z,{value:t,title:t,children:U(t,c??void 0)},t))]})]})]}),a(v,{children:[A!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:n("sessionList.archives.connecting")}):G?a("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(ce,{}),n("sessionList.archives.loading")]}):z?i(q,{variant:"destructive",children:a(V,{className:"flex items-center justify-between gap-4",children:[i("span",{children:z}),i(e,{variant:"outline",onClick:()=>re((t)=>t+1),children:n("sessionList.archives.retry")})]})}):N.length===0?a("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(ve,{"aria-hidden":"true",className:"size-8"}),i("p",{children:n("sessionList.archives.empty")})]}):M.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:n("sessionList.archives.noResults")}):(c?le(M,c):[]).filter(([,t])=>t.length>0).map(([t,h])=>a("section",{className:"flex flex-col gap-3",children:[a("div",{className:"flex items-center justify-between gap-3",children:[a("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===D?void 0:t,children:[i(Y,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===D?n("sessionList.archives.noProject"):U(t,c??void 0)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:n("sessionList.archives.count",{count:h.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:h.map((o)=>a("article",{"aria-label":k(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[a("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:k(o),children:k(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:n("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:me.format(new Date(o.updatedAt))})]}),a("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":n("sessionList.delete"),title:n("sessionList.delete"),disabled:E,className:"text-muted-foreground hover:text-destructive",onClick:()=>{T(null),J(!1),y([o])},children:i(ee,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:E,onClick:()=>void pe(o),children:n("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),_&&i(q,{variant:"destructive",children:i(V,{children:_})})]})]}),i(d,{open:P!==null,onOpenChange:(t)=>{if(!t&&!S.current)y(null)},children:a(u,{showCloseButton:!I,children:[a(b,{children:[i(m,{children:n("sessionList.archives.deleteTitle")}),i(w,{children:n(oe?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:P?.length??0})})]}),W&&i(q,{variant:"destructive",children:i(V,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:W})}),a(X,{children:[i(e,{variant:"outline",disabled:I,onClick:()=>y(null),children:n("sessionList.cancel")}),a(e,{variant:"destructive",className:"text-sm font-normal",disabled:E,onClick:()=>void he(),children:[I&&i(ce,{}),n("sessionList.archives.confirmDelete")]})]})]})})]})}
3
- export{mr};
1
+ import{V,W}from"./chunk-5cnw6yc7.js";import{e}from"./chunk-wpdn3rx8.js";import{u,m,b,K,p,w}from"./chunk-n5xqjct2.js";import{s}from"./chunk-96x0d2vd.js";import{Nt,Mt,Rt,hn,Z}from"./chunk-aarvddmn.js";import{le}from"./chunk-pv35kspb.js";import{g,l,r}from"./chunk-da4m33bg.js";import{se,z,D}from"./chunk-x8kxqtva.js";import{sessionGroup as F}from"@nyssance/codex-acp-v2/client";import{cn as fe}from"cn";import{ArchiveIcon as ve,FolderIcon as Y,ListFilterIcon as ge,SearchIcon as xe,Trash2Icon as ee}from"lucide-react";import{useEffect as Se,useRef as ye,useState as h}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function te({className:f,...n}){return i(hn,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...n,className:fe("max-w-(--available-width) min-w-0 p-1",f)})}function H(f){return f instanceof Error?f.message:String(f)}function Le({children:f}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:f})})}function dr({Scroll:f=Le}){let{t:n,i18n:B}=g(),v=l(),N=r((t)=>t.archivedSessions),A=r((t)=>t.connection),[O,ie]=h(""),[C,ne]=h("all"),[x,ae]=h("all"),[re,oe]=h(0),[G,Q]=h(!0),[q,U]=h(null),[_,R]=h(null),[I,j]=h(!1),S=ye(!1),[P,y]=h(null),[J,T]=h(null),[ce,M]=h(!1);Se(()=>{if(A!=="ready")return;let t=!1;Q(!0),U(null);async function d(){try{await v.listArchived({reset:!0});let o=new Set;while(!t&&v.state.archivedCursor!==null){let L=v.state.archivedCursor;if(o.has(L))throw Error("Archive pagination returned a repeated cursor");o.add(L),await v.listArchived()}}catch(o){if(!t)U(H(o))}finally{if(!t)Q(!1)}}return d(),()=>{t=!0}},[v,A,re]);let c=r((t)=>t.projectContext),E=!(c!==null&&A==="ready"&&!G&&q===null)||I,k=(t)=>t.title??n("sessionList.untitled"),de=[...new Set(N.filter((t)=>c&&F(c,t).id!==D).map((t)=>c?F(c,t).id:t.cwd))].toSorted(),ue=O.trim().toLocaleLowerCase(B.language),X=N.filter((t)=>{let d=c?F(c,t).id:null,o=d===D;return k(t).toLocaleLowerCase(B.language).includes(ue)&&(C==="all"||(C==="quick"?o:!o))&&(x==="all"||(x==="quick"?o:d===x))}),me=new Intl.DateTimeFormat(B.language,{dateStyle:"medium",timeStyle:"short"});async function pe(t){if(S.current)return;S.current=!0,j(!0),R(null);try{await v.unarchive(t.sessionId)}catch(d){R(H(d))}finally{S.current=!1,j(!1)}}async function he(){if(S.current||!P)return;S.current=!0,j(!0),T(null);let t=[],d=[];try{for(let o of P){if(!v.state.archivedSessions.some((L)=>L.sessionId===o.sessionId))continue;try{await v.delete(o.sessionId)}catch(L){t.push(o),d.push(`${k(o)}: ${H(L)}`)}}if(t.length)y(t),T(d.join(`
2
+ `));else y(null)}finally{S.current=!1,j(!1)}}return a("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":n("sessionList.archives.title"),children:[a("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[a("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[i("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:n("sessionList.archives.title")}),a(e,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:E||N.length===0,onClick:()=>{T(null),M(!0),y([...N])},children:[i(ee,{className:"size-4","aria-hidden":"true"}),n("sessionList.archives.deleteAll")]})]}),a("div",{className:"flex shrink-0 flex-wrap gap-3",children:[a("div",{className:"relative min-w-48 flex-1",children:[i(xe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(s,{"aria-label":n("sessionList.archives.search"),placeholder:n("sessionList.archives.search"),value:O,onChange:(t)=>ie(t.target.value),className:"rounded-md ps-9"})]}),a(Nt,{value:C,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");ne(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(ge,{"aria-hidden":"true"}),i(Mt,{children:n(`sessionList.archives.${C==="all"?"allChats":C==="quick"?"quickChats":"projectChats"}`)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allChats")}),i(Z,{value:"quick",children:n("sessionList.archives.quickChats")}),i(Z,{value:"project",children:n("sessionList.archives.projectChats")})]})]}),a(Nt,{value:x,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");ae(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(Y,{"aria-hidden":"true"}),i(Mt,{className:"truncate",children:x==="all"?n("sessionList.archives.allProjects"):x==="quick"?n("sessionList.archives.noProject"):z(x,c??void 0)})]}),a(te,{children:[i(Z,{value:"all",children:n("sessionList.archives.allProjects")}),i(Z,{value:"quick",children:n("sessionList.archives.noProject")}),de.map((t)=>i(Z,{value:t,title:t,children:z(t,c??void 0)},t))]})]})]}),a(f,{children:[A!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:n("sessionList.archives.connecting")}):G?a("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(le,{}),n("sessionList.archives.loading")]}):q?i(V,{variant:"destructive",children:a(W,{className:"flex items-center justify-between gap-4",children:[i("span",{children:q}),i(e,{variant:"outline",onClick:()=>oe((t)=>t+1),children:n("sessionList.archives.retry")})]})}):N.length===0?a("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(ve,{"aria-hidden":"true",className:"size-8"}),i("p",{children:n("sessionList.archives.empty")})]}):X.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:n("sessionList.archives.noResults")}):(c?se(X,c):[]).filter(([,t])=>t.length>0).map(([t,d])=>a("section",{className:"flex flex-col gap-3",children:[a("div",{className:"flex items-center justify-between gap-3",children:[a("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===D?void 0:t,children:[i(Y,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===D?n("sessionList.archives.noProject"):z(t,c??void 0)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:n("sessionList.archives.count",{count:d.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:d.map((o)=>a("article",{"aria-label":k(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[a("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:k(o),children:k(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:n("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:me.format(new Date(o.updatedAt))})]}),a("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":n("sessionList.delete"),title:n("sessionList.delete"),disabled:E,className:"text-muted-foreground hover:text-destructive",onClick:()=>{T(null),M(!1),y([o])},children:i(ee,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:E,onClick:()=>void pe(o),children:n("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),_&&i(V,{variant:"destructive",children:i(W,{children:_})})]})]}),i(u,{open:P!==null,onOpenChange:(t)=>{if(!t&&!S.current)y(null)},children:a(m,{showCloseButton:!I,children:[a(b,{children:[i(p,{children:n("sessionList.archives.deleteTitle")}),i(w,{children:n(ce?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:P?.length??0})})]}),J&&i(V,{variant:"destructive",children:i(W,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:J})}),a(K,{children:[i(e,{variant:"outline",disabled:I,onClick:()=>y(null),children:n("sessionList.cancel")}),a(e,{variant:"destructive",className:"text-sm font-normal",disabled:E,onClick:()=>void he(),children:[I&&i(le,{}),n("sessionList.archives.confirmDelete")]})]})]})})]})}
3
+ export{dr};
@@ -1,2 +1,2 @@
1
- var i=new Map,a=new Map,f=new Map;function ar(t,r){if(a.has(t))throw Error("An attachment writer is already registered for this session");return a.set(t,r),()=>{if(a.get(t)===r)a.delete(t)}}function A(t,r){let n=i.get(t);if(!n)return;let e=r(n.attachments);i.set(t,{...n,attachments:e}),a.get(t)?.(e)}function vt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function Cr(t){for(;;){let e=i.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=i.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function Tr(t,r){if(r===null)i.delete(t);else i.set(t,r)}var s=new Map;function xt(t,r){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,r),()=>{if(s.get(t)===r)s.delete(t)}}function Ir(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=s.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=i.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),i.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
2
- export{i,ar,A,vt,Cr,Tr,xt,Ir};
1
+ var i=new Map,a=new Map,f=new Map;function sr(t,r){if(a.has(t))throw Error("An attachment writer is already registered for this session");return a.set(t,r),()=>{if(a.get(t)===r)a.delete(t)}}function L(t,r){let n=i.get(t);if(!n)return;let e=r(n.attachments);i.set(t,{...n,attachments:e}),a.get(t)?.(e)}function yt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function Tr(t){for(;;){let e=i.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=i.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function Sr(t,r){if(r===null)i.delete(t);else i.set(t,r)}var s=new Map;function bt(t,r){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,r),()=>{if(s.get(t)===r)s.delete(t)}}function Ir(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=s.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=i.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),i.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
2
+ export{i,sr,L,yt,Tr,Sr,bt,Ir};
@@ -1,2 +1,2 @@
1
- var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function tn(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function Ho(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=tn(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
2
- export{tn,Ho};
1
+ var z=/[\\/._\- ]/;function h(r,n){if(n===0)return!0;let s=r[n-1];if(z.test(s))return!0;let c=r[n];if(s===s.toLowerCase()&&c!==c.toLowerCase())return!0;return!1}function Ht(r,n){if(!n)return{score:0,indices:[]};let s=r.toLowerCase(),c=n.toLowerCase(),i=[],t=0,e=0,u=-2;for(let l of c.split("")){let o=-1;while(t<s.length){if(s[t]===l){o=t;break}t++}if(o<0)return null;if(e+=1,o===u+1)e+=4;if(h(r,o))e+=5;let f=r.lastIndexOf("/");if(f!==-1&&o>f)e+=2;i.push(o),u=o,t=o+1}if(e-=Math.floor(r.length/50),r.includes(n))e+=3;return{score:e,indices:i}}function Mn(r,n,s,c=100){if(!n)return r.slice(0,c).map((t)=>({item:t,score:0,indices:[]}));let i=[];for(let t of r){let e=Ht(s(t),n);if(!e)continue;i.push({item:t,score:e.score,indices:e.indices})}return i.sort((t,e)=>e.score-t.score),i.slice(0,c)}
2
+ export{Ht,Mn};
@@ -1,2 +1,2 @@
1
- import{kt}from"./chunk-tt40vzdd.js";async function mn(i,c){let s=new WeakSet;while(!c.aborted){let r=Array.from(i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')).filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function We(i,c){if(!c)return[];let s=[],r="",e=[],o=()=>{let t=0,n=0;for(let{start:a,end:l}of kt(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<l)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,l-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let l=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+l.length}),r+=l;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){o();return}if(t.tagName==="BR"){o();return}let n=m.has(t.tagName);if(n)o();for(let a of t.childNodes)u(a);if(n)o()};return u(i),o(),s}
2
- export{mn,We};
1
+ import{Tt}from"./chunk-b9hjn4a5.js";async function pn(i,c){let s=new WeakSet;while(!c.aborted){let r=Array.from(i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')).filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function je(i,c){if(!c)return[];let s=[],r="",e=[],o=()=>{let t=0,n=0;for(let{start:a,end:l}of Tt(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<l)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,l-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let l=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+l.length}),r+=l;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){o();return}if(t.tagName==="BR"){o();return}let n=m.has(t.tagName);if(n)o();for(let a of t.childNodes)u(a);if(n)o()};return u(i),o(),s}
2
+ export{pn,je};
@@ -0,0 +1,2 @@
1
+ function wt(n){return`file://${encodeURI(n.absPath).replaceAll(/[?#]/g,encodeURIComponent)}`}function kt(n){return n.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)??n}function Ct(n){return kt(n.absPath)}
2
+ export{wt,kt,Ct};
@@ -0,0 +1 @@
1
+ import{Switch as a}from"@base-ui/react/switch";import{cn as d}from"cn";import{jsx as t}from"react/jsx-runtime";function ze({className:e,size:i="default",...r}){return t(a.Root,{"data-slot":"switch","data-size":i,className:d("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...r,children:t(a.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] rtl:group-data-[size=default]/switch:data-checked:-translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] rtl:group-data-[size=sm]/switch:data-checked:-translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=default]/switch:data-unchecked:-translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 rtl:group-data-[size=sm]/switch:data-unchecked:-translate-x-0 dark:data-unchecked:bg-foreground"})})}export{ze};
@@ -0,0 +1,2 @@
1
+ import{G}from"./chunk-r9p03chx.js";import{t}from"./chunk-q6km9nha.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function En({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(G,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
2
+ export{En};
@@ -1,3 +1,3 @@
1
- var pi=["full","compact","codexUI"];function uo(t){return t==="compact"||t==="codexUI"}var Dr=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function S(t){let o=Dr.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
2
- `)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function gi(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
3
- export{pi,uo,Dr,S,gi};
1
+ var Ri=["full","compact","codexUI"];function qo(t){return t==="compact"||t==="codexUI"}var zr=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function E(t){let o=zr.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
2
+ `)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function Ei(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
3
+ export{Ri,qo,zr,E,Ei};
@@ -1,4 +1,4 @@
1
- import{e}from"./chunk-6kn920c5.js";import{Q}from"./chunk-ksv9pjc2.js";import{en}from"./chunk-mwd0ed0c.js";import{Ao}from"./chunk-chwg3na0.js";import{ze}from"./chunk-vcbv30ph.js";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as X}from"cn";import{BookOpenTextIcon as st,FileIcon as it,StoreIcon as lt}from"lucide-react";import{useCallback as ut,useEffect as v,useLayoutEffect as Y,useMemo as Z,useRef as _,useState as g}from"react";import{createPortal as at}from"react-dom";import{jsx as p,jsxs as E,Fragment as ct}from"react/jsx-runtime";function Eo({handleRef:a,anchorRef:c,commands:C,searchFiles:u,onMention:R,onSearchError:H,fileSearchDebounceMs:M=0,bashMode:A=!1,forcedOpen:i=!1,onForcedOpenChange:f,emptyLabel:F,fileStatusLabels:h,morePlugins:D}){let j=ze(),l=j.textInput.value,[z,K]=g(0),[y,P]=g(null),[b,L]=g(0),U=_(null);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>K(t.selectionStart??0),o=()=>{if(document.activeElement===t)n()};return t.addEventListener("keyup",n),t.addEventListener("click",n),t.addEventListener("input",n),t.addEventListener("select",n),t.addEventListener("focus",n),document.addEventListener("selectionchange",o),()=>{t.removeEventListener("keyup",n),t.removeEventListener("click",n),t.removeEventListener("input",n),t.removeEventListener("select",n),t.removeEventListener("focus",n),document.removeEventListener("selectionchange",o)}});let V=Z(()=>A&&l.startsWith("!")?null:Ao(l,z),[l,z,A]),r=V?.kind==="at"&&!u?null:V,q=`${r?.kind??"forced"}:${r?.query??""}:${i}`,[O,tt]=g(q);if(O!==q)tt(q),L(0);let I=_(null);v(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=l;else if(l!==I.current)f?.(!1)},[i,l,f]);let x=r?.kind==="at"?r.query:null;v(()=>{if(x===null||!u){P(null);return}let t=!0,n=()=>{u(x).then((s)=>{if(t)P({query:x,search:u,items:s})},(s)=>{if(t)P({query:x,search:u,items:[]}),H(s)})},o=M>0?window.setTimeout(n,M):null;if(o===null)n();return()=>{if(t=!1,o!==null)window.clearTimeout(o)}},[x,u,M,H]);let d=Z(()=>{if(r?.kind==="at")return y?.query===r.query&&y.search===u?y.items:[];if(r)return en(C,r.query);if(i)return en(C,"");return[]},[r,i,C,y,u]),[et,N]=g(!1);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>N(!0),o=()=>{if(N(!1),i)f?.(!1)};return N(document.activeElement===t),t.addEventListener("focus",n),t.addEventListener("blur",o),()=>{t.removeEventListener("focus",n),t.removeEventListener("blur",o)}},[a,i,f]),v(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let m=et&&(r!==null?r.kind==="slash"||d.length>0||!!h:i);v(()=>{if(!m)return;U.current?.querySelector(`[data-idx="${b}"]`)?.scrollIntoView({block:"nearest"})},[b,m]);function W(t){let n=a.current?.getTextarea();if(!n)return;let o,s;if(r){let B=r.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(o=l.slice(0,r.start)+B+l.slice(r.end),r.kind==="at")R?.(t.payload);s=r.start+B.length}else if(i)o=`${l.length===0||l.endsWith(`
1
+ import{e}from"./chunk-wpdn3rx8.js";import{j}from"./chunk-1fm5vx1n.js";import{_t}from"./chunk-10j68dch.js";import{Sn}from"./chunk-w38vbf7h.js";import{_e}from"./chunk-7zrnt6zw.js";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as X}from"cn";import{BookOpenTextIcon as st,FileIcon as it,StoreIcon as lt}from"lucide-react";import{useCallback as ut,useEffect as v,useLayoutEffect as Y,useMemo as Z,useRef as _,useState as g}from"react";import{createPortal as at}from"react-dom";import{jsx as p,jsxs as E,Fragment as ct}from"react/jsx-runtime";function Tn({handleRef:a,anchorRef:c,commands:C,searchFiles:u,onMention:R,onSearchError:H,fileSearchDebounceMs:M=0,bashMode:A=!1,forcedOpen:i=!1,onForcedOpenChange:f,emptyLabel:F,fileStatusLabels:h,morePlugins:D}){let z=_e(),l=z.textInput.value,[K,U]=g(0),[y,P]=g(null),[b,L]=g(0),V=_(null);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>U(t.selectionStart??0),o=()=>{if(document.activeElement===t)n()};return t.addEventListener("keyup",n),t.addEventListener("click",n),t.addEventListener("input",n),t.addEventListener("select",n),t.addEventListener("focus",n),document.addEventListener("selectionchange",o),()=>{t.removeEventListener("keyup",n),t.removeEventListener("click",n),t.removeEventListener("input",n),t.removeEventListener("select",n),t.removeEventListener("focus",n),document.removeEventListener("selectionchange",o)}});let W=Z(()=>A&&l.startsWith("!")?null:Sn(l,K),[l,K,A]),r=W?.kind==="at"&&!u?null:W,q=`${r?.kind??"forced"}:${r?.query??""}:${i}`,[O,tt]=g(q);if(O!==q)tt(q),L(0);let I=_(null);v(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=l;else if(l!==I.current)f?.(!1)},[i,l,f]);let x=r?.kind==="at"?r.query:null;v(()=>{if(x===null||!u){P(null);return}let t=!0,n=()=>{u(x).then((s)=>{if(t)P({query:x,search:u,items:s})},(s)=>{if(t)P({query:x,search:u,items:[]}),H(s)})},o=M>0?window.setTimeout(n,M):null;if(o===null)n();return()=>{if(t=!1,o!==null)window.clearTimeout(o)}},[x,u,M,H]);let d=Z(()=>{if(r?.kind==="at")return y?.query===r.query&&y.search===u?y.items:[];if(r)return _t(C,r.query);if(i)return _t(C,"");return[]},[r,i,C,y,u]),[et,N]=g(!1);v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=()=>N(!0),o=()=>{if(N(!1),i)f?.(!1)};return N(document.activeElement===t),t.addEventListener("focus",n),t.addEventListener("blur",o),()=>{t.removeEventListener("focus",n),t.removeEventListener("blur",o)}},[a,i,f]),v(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let m=et&&(r!==null?r.kind==="slash"||d.length>0||!!h:i);v(()=>{if(!m)return;V.current?.querySelector(`[data-idx="${b}"]`)?.scrollIntoView({block:"nearest"})},[b,m]);function Q(t){let n=a.current?.getTextarea();if(!n)return;let o,s;if(r){let B=r.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(o=l.slice(0,r.start)+B+l.slice(r.end),r.kind==="at")R?.(t.payload);s=r.start+B.length}else if(i)o=`${l.length===0||l.endsWith(`
2
2
  `)?l:`${l}
3
- `}/${t.payload} `,s=o.length,f?.(!1);else return;j.textInput.setInput(o),requestAnimationFrame(()=>{n.focus(),n.setSelectionRange(s,s)})}v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=(o)=>{if(!m)return;if(a.current?.isComposing()||o.isComposing||o.keyCode===229)return;if(o.key==="ArrowDown")o.preventDefault(),o.stopPropagation(),L((s)=>d.length===0?0:Math.min(d.length-1,s+1));else if(o.key==="ArrowUp")o.preventDefault(),o.stopPropagation(),L((s)=>Math.max(0,s-1));else if(o.key==="Enter"||o.key==="Tab"){o.preventDefault(),o.stopPropagation();let s=d[b];if(s)W(s)}else if(o.key==="Escape")if(o.preventDefault(),o.stopPropagation(),r)K(Math.max(0,r.start-1)),t.setSelectionRange(r.start,r.start);else f?.(!1)};return t.addEventListener("keydown",n,!0),()=>t.removeEventListener("keydown",n,!0)});let[k,G]=g(null),[S,nt]=g(null),T=ut(()=>{let t=c?.current;if(!t)return;let n=t.getBoundingClientRect();G({left:n.left,width:n.width,bottom:window.innerHeight-n.top+8})},[c]);if(Y(()=>{if(!m){G(null);return}T()},[m,T]),Y(()=>{let t=c?.current;if(!m||!t||!S)return;return rt(t,S,T,{animationFrame:!0})},[m,S,c,T]),!m||c&&!k)return null;let w=r?r.kind==="slash":i,ot=w?st:it,J=p("div",{ref:nt,className:c?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:c&&k?{left:k.left,width:k.width,bottom:k.bottom}:void 0,children:E("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[E("div",{className:"max-h-72 overflow-y-auto",children:[d.length===0&&w&&p("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:F}),d.length===0&&!w&&h&&p("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:y?.query===x&&y.search===u?h.empty:h.loading}),d.map((t,n)=>E(e,{type:"button",variant:"ghost",role:"option","aria-selected":n===b,"data-idx":n,onMouseDown:(o)=>{o.preventDefault(),W(t)},onMouseEnter:()=>L(n),className:X("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",n===b&&"bg-muted"),children:[p(ot,{className:X("size-4 shrink-0",w?"text-blue-500":"text-muted-foreground")}),p("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&p("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),w&&D&&E(ct,{children:[p(Q,{}),E(e,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),f?.(!1),D.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[p(lt,{"data-icon":"inline-start"}),D.label]})]})]})});return c?at(J,document.body):J}
4
- export{Eo};
3
+ `}/${t.payload} `,s=o.length,f?.(!1);else return;z.textInput.setInput(o),requestAnimationFrame(()=>{n.focus(),n.setSelectionRange(s,s)})}v(()=>{let t=a.current?.getTextarea();if(!t)return;let n=(o)=>{if(!m)return;if(a.current?.isComposing()||o.isComposing||o.keyCode===229)return;if(o.key==="ArrowDown")o.preventDefault(),o.stopPropagation(),L((s)=>d.length===0?0:Math.min(d.length-1,s+1));else if(o.key==="ArrowUp")o.preventDefault(),o.stopPropagation(),L((s)=>Math.max(0,s-1));else if(o.key==="Enter"||o.key==="Tab"){o.preventDefault(),o.stopPropagation();let s=d[b];if(s)Q(s)}else if(o.key==="Escape")if(o.preventDefault(),o.stopPropagation(),r)U(Math.max(0,r.start-1)),t.setSelectionRange(r.start,r.start);else f?.(!1)};return t.addEventListener("keydown",n,!0),()=>t.removeEventListener("keydown",n,!0)});let[k,G]=g(null),[S,nt]=g(null),T=ut(()=>{let t=c?.current;if(!t)return;let n=t.getBoundingClientRect();G({left:n.left,width:n.width,bottom:window.innerHeight-n.top+8})},[c]);if(Y(()=>{if(!m){G(null);return}T()},[m,T]),Y(()=>{let t=c?.current;if(!m||!t||!S)return;return rt(t,S,T,{animationFrame:!0})},[m,S,c,T]),!m||c&&!k)return null;let w=r?r.kind==="slash":i,ot=w?st:it,J=p("div",{ref:nt,className:c?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:c&&k?{left:k.left,width:k.width,bottom:k.bottom}:void 0,children:E("div",{ref:V,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[E("div",{className:"max-h-72 overflow-y-auto",children:[d.length===0&&w&&p("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:F}),d.length===0&&!w&&h&&p("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:y?.query===x&&y.search===u?h.empty:h.loading}),d.map((t,n)=>E(e,{type:"button",variant:"ghost",role:"option","aria-selected":n===b,"data-idx":n,onMouseDown:(o)=>{o.preventDefault(),Q(t)},onMouseEnter:()=>L(n),className:X("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",n===b&&"bg-muted"),children:[p(ot,{className:X("size-4 shrink-0",w?"text-blue-500":"text-muted-foreground")}),p("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&p("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),w&&D&&E(ct,{children:[p(j,{}),E(e,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),f?.(!1),D.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[p(lt,{"data-icon":"inline-start"}),D.label]})]})]})});return c?at(J,document.body):J}
4
+ export{Tn};
@@ -0,0 +1,2 @@
1
+ import{l,r}from"./chunk-da4m33bg.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function gr(i){let t=l(),e=r((s)=>s.projectContext),c=i===null?m:e?a(e,{cwd:t.projectPath(i)}).id:null,u=r((s)=>s.sessionList),d=r((s)=>s.connection),n=r((s)=>s.sessionListLoaded),o=r((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!n&&o===null)t.listSessions().catch(()=>{return})},[t,d,n,o]),{result:L(()=>{if(n&&e)return{status:"ready",sessionRows:u.filter((s)=>a(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(o!==null)return{status:"failed",error:o};return{status:"loading"}},[t,u,n,o,c,e]),retry:f}}
2
+ export{gr};
@@ -1 +1 @@
1
- import{cva as s}from"class-variance-authority";import{cn as a}from"cn";import{jsx as r}from"react/jsx-runtime";var n=s("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function q({className:t,variant:e,...o}){return r("div",{"data-slot":"alert",role:"alert",className:a(n({variant:e}),t),...o})}function Et({className:t,...e}){return r("div",{"data-slot":"alert-title",className:a("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",t),...e})}function V({className:t,...e}){return r("div",{"data-slot":"alert-description",className:a("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),...e})}function Yr({className:t,...e}){return r("div",{"data-slot":"alert-action",className:a("absolute top-2.5 end-3",t),...e})}export{q,Et,V,Yr};
1
+ import{cva as s}from"class-variance-authority";import{cn as a}from"cn";import{jsx as r}from"react/jsx-runtime";var n=s("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function V({className:t,variant:e,...o}){return r("div",{"data-slot":"alert",role:"alert",className:a(n({variant:e}),t),...o})}function Lt({className:t,...e}){return r("div",{"data-slot":"alert-title",className:a("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",t),...e})}function W({className:t,...e}){return r("div",{"data-slot":"alert-description",className:a("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),...e})}function Zr({className:t,...e}){return r("div",{"data-slot":"alert-action",className:a("absolute top-2.5 end-3",t),...e})}export{V,Lt,W,Zr};
@@ -1,2 +1,2 @@
1
- import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function Yn({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
2
- export{Yn};
1
+ import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function Ro({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
2
+ export{Ro};
@@ -0,0 +1,2 @@
1
+ import{i,L,yt}from"./chunk-40d5the9.js";var Fn=5000;function de(t){return"pastedText"in t}function Er(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Le(t,e,o){let n=(r,s)=>{for(let[a,x]of i){if(!x.attachments.some((p)=>p.id===e.id))continue;L(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Er(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!i.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),yt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function gt(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Fn)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};L(e,(a)=>[...a,s]),Le(e,s,n)}
2
+ export{Fn,de,Er,Le,gt};
@@ -0,0 +1,2 @@
1
+ import{re}from"./chunk-q6km9nha.js";import{createContext as v,useContext as a,useMemo as l}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function xt({host:n,client:e,children:t}){let s=l(()=>({host:n,client:e}),[n,e]);return r(re,{host:n,client:e,children:r(i,{value:s,children:t})})}function o(){let n=a(i);if(n===null)throw Error("Conversation host is missing");return n}function C(n,e){e.catch((t)=>{if(n.reportError)n.reportError(t);else console.error(t)})}
2
+ export{xt,o,C};
@@ -0,0 +1,4 @@
1
+ import{Go}from"./chunk-vk36fprb.js";import{t}from"./chunk-q6km9nha.js";import{To,So}from"./chunk-1wpdb17m.js";import{B}from"./chunk-y6afvrnv.js";import{Q}from"./chunk-g5gz25jy.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var Co=p(function({item:s,messageTime:c}){let l=t(),o=So(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
2
+ ${e.text}`).join(`
3
+ `):Q(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=To(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(B,{block:e},`${s.id}:${n}`))}),r(Go,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
4
+ export{Co};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-6kn920c5.js";import{l}from"./chunk-1hy64ewz.js";import{cn as h}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as n,jsxs as k}from"react/jsx-runtime";function pn({ref:p,value:o,onChange:d,onFind:i,onClose:s,placeholder:m,autoFocusOpen:a=!0,prevTitle:c,nextTitle:u,className:v}){let r=E(null);N(p,()=>{if(r.current===null)throw Error("FindBar input is not mounted");return r.current},[]),B(()=>{if(!a)return;let t=r.current;if(t===null)throw Error("FindBar input is not mounted");t.focus({preventScroll:!0}),t.select()},[a]);let f=!o;return k("div",{className:h("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",v),children:[n(l,{ref:r,value:o,onChange:(t)=>d(t.target.value),placeholder:m,className:"h-7 text-xs",onKeyDown:(t)=>{if(t.key==="Escape"){t.preventDefault(),s();return}if(t.key==="Enter"){if(t.preventDefault(),o)i(t.shiftKey)}}}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!0),title:c?`${c} (⇧↵)`:"⇧↵",children:n(b,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!1),title:u?`${u} (↵)`:"↵",children:n(g,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:n(z,{className:"size-3.5"})})]})}
2
- export{pn};
1
+ import{e}from"./chunk-wpdn3rx8.js";import{s}from"./chunk-96x0d2vd.js";import{cn as h}from"cn";import{ChevronDownIcon as g,ChevronUpIcon as b,XIcon as z}from"lucide-react";import{useEffect as B,useImperativeHandle as N,useRef as E}from"react";import{jsx as n,jsxs as k}from"react/jsx-runtime";function gn({ref:p,value:o,onChange:d,onFind:i,onClose:a,placeholder:m,autoFocusOpen:l=!0,prevTitle:c,nextTitle:u,className:v}){let r=E(null);N(p,()=>{if(r.current===null)throw Error("FindBar input is not mounted");return r.current},[]),B(()=>{if(!l)return;let t=r.current;if(t===null)throw Error("FindBar input is not mounted");t.focus({preventScroll:!0}),t.select()},[l]);let f=!o;return k("div",{className:h("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",v),children:[n(s,{ref:r,value:o,onChange:(t)=>d(t.target.value),placeholder:m,className:"h-7 text-xs",onKeyDown:(t)=>{if(t.key==="Escape"){t.preventDefault(),a();return}if(t.key==="Enter"){if(t.preventDefault(),o)i(t.shiftKey)}}}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!0),title:c?`${c} (⇧↵)`:"⇧↵",children:n(b,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",disabled:f,onClick:()=>i(!1),title:u?`${u} (↵)`:"↵",children:n(g,{className:"size-3.5"})}),n(e,{size:"icon",variant:"ghost",className:"size-6",onClick:a,title:"Esc",children:n(z,{className:"size-3.5"})})]})}
2
+ export{gn};
@@ -1,2 +1,2 @@
1
- var c={ar:{untitled:"دردشة جديدة",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة"},de:{untitled:"Neuer Chat",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"}},es:{untitled:"Nuevo chat",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados"},fr:{untitled:"Nouveau chat",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées"},hi:{untitled:"नई चैट",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत"},id:{untitled:"Obrolan baru",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan"},it:{untitled:"Nuova chat",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate"},ja:{untitled:"新しいチャット",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み"},ko:{untitled:"새 채팅",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨"},"pt-BR":{untitled:"Novo chat",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas"},ru:{untitled:"Новый чат",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"}}};
2
- export{c};
1
+ var d={ar:{untitled:"دردشة جديدة",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة"},de:{untitled:"Neuer Chat",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"}},es:{untitled:"Nuevo chat",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados"},fr:{untitled:"Nouveau chat",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées"},hi:{untitled:"नई चैट",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत"},id:{untitled:"Obrolan baru",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan"},it:{untitled:"Nuova chat",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate"},ja:{untitled:"新しいチャット",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み"},ko:{untitled:"새 채팅",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨"},"pt-BR":{untitled:"Novo chat",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas"},ru:{untitled:"Новый чат",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"}}};
2
+ export{d};
@@ -0,0 +1 @@
1
+ import{PreviewCard as i}from"@base-ui/react/preview-card";import{cn as s}from"cn";import{jsx as r}from"react/jsx-runtime";function Pe({...e}){return r(i.Root,{"data-slot":"hover-card",...e})}function Ne({...e}){return r(i.Trigger,{"data-slot":"hover-card-trigger",...e})}function Me({className:e,side:o="bottom",sideOffset:t=4,align:a="center",alignOffset:d=4,...n}){return r(i.Portal,{"data-slot":"hover-card-portal",children:r(i.Positioner,{align:a,alignOffset:d,side:o,sideOffset:t,className:"isolate z-50",children:r(i.Popup,{"data-slot":"hover-card-content",className:s("z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})})})}export{Pe,Ne,Me};