@alwith/module-chat 0.6.22 → 0.6.25

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 (502) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-host.js +1 -1
  3. package/dist/agent/client.d.ts +25 -9
  4. package/dist/agent/client.js +1 -1
  5. package/dist/agent/custom-model-effort.js +1 -1
  6. package/dist/agent/fork-title.js +1 -1
  7. package/dist/agent/image-request.js +1 -1
  8. package/dist/agent/image-tools.js +1 -1
  9. package/dist/agent/input-config.js +1 -1
  10. package/dist/agent/input-modes/chat.js +1 -1
  11. package/dist/agent/input-modes/execution-meta.js +1 -1
  12. package/dist/agent/input-modes/image-context.js +1 -1
  13. package/dist/agent/input-modes/image.js +1 -1
  14. package/dist/agent/input-modes/index.js +1 -1
  15. package/dist/agent/project-path.js +1 -1
  16. package/dist/agent/request-error.js +1 -1
  17. package/dist/agent/session-list-refresh.js +1 -1
  18. package/dist/app-reference.js +1 -1
  19. package/dist/application-tools.d.ts +4 -1
  20. package/dist/application-tools.js +1 -1
  21. package/dist/approval/choice-elicitation-form.js +1 -1
  22. package/dist/approval/choice-schema.js +1 -1
  23. package/dist/approval/permission-options.js +1 -1
  24. package/dist/approval/permission-view.js +1 -1
  25. package/dist/approval/schema-elicitation-form.js +1 -1
  26. package/dist/approval/url-elicitation-card.js +1 -1
  27. package/dist/chunk-0a7vp0ph.js +2 -0
  28. package/dist/{chunk-09w80wgb.js → chunk-0bv3tw1m.js} +2 -2
  29. package/dist/chunk-0j5z842s.js +4 -0
  30. package/dist/{chunk-x6cfmt4y.js → chunk-0jj029k8.js} +2 -2
  31. package/dist/{chunk-xvmmndhs.js → chunk-0s2zcz5f.js} +2 -2
  32. package/dist/{chunk-xdmjwqgf.js → chunk-113maskf.js} +2 -2
  33. package/dist/{chunk-shk5mmmw.js → chunk-18xfysvb.js} +2 -2
  34. package/dist/{chunk-dgh0750h.js → chunk-1d29gnb2.js} +2 -2
  35. package/dist/{chunk-pkkw0fxs.js → chunk-1gr60c40.js} +2 -2
  36. package/dist/{chunk-t3enrsnt.js → chunk-26w51q10.js} +2 -2
  37. package/dist/{chunk-ywwfzgm6.js → chunk-27gr882d.js} +2 -2
  38. package/dist/{chunk-jv117dry.js → chunk-2kbp0pbe.js} +2 -2
  39. package/dist/{chunk-2wdvcx76.js → chunk-2rbaebnr.js} +3 -3
  40. package/dist/chunk-2w4kyd2a.js +4 -0
  41. package/dist/chunk-2wfgbxet.js +3 -0
  42. package/dist/{chunk-2q20937h.js → chunk-2x5m7g33.js} +2 -2
  43. package/dist/chunk-3q2zdv9e.js +2 -0
  44. package/dist/{chunk-kawq8f1z.js → chunk-3q8vw3wb.js} +2 -2
  45. package/dist/{chunk-7ekex790.js → chunk-3qy743j9.js} +3 -3
  46. package/dist/{chunk-jg4c3zg4.js → chunk-3tvq6xr2.js} +2 -2
  47. package/dist/chunk-3zsqg6wr.js +3 -0
  48. package/dist/{chunk-p521krn5.js → chunk-44r55va6.js} +2 -2
  49. package/dist/chunk-4cr144a7.js +2 -0
  50. package/dist/{chunk-8zrmp6dw.js → chunk-4e622bdk.js} +3 -3
  51. package/dist/{chunk-6cxa2jrx.js → chunk-4gftpery.js} +2 -2
  52. package/dist/{chunk-76r5v06g.js → chunk-4t0f01ec.js} +2 -2
  53. package/dist/{chunk-05eftctr.js → chunk-4vayk46h.js} +2 -2
  54. package/dist/{chunk-m9s9etss.js → chunk-51x80v4h.js} +2 -2
  55. package/dist/{chunk-x785yg93.js → chunk-52wrk1mh.js} +2 -2
  56. package/dist/{chunk-69eysg08.js → chunk-5c42mfat.js} +2 -2
  57. package/dist/{chunk-6j2q7qvk.js → chunk-5m2ydb9j.js} +2 -2
  58. package/dist/chunk-621eg04b.js +2 -0
  59. package/dist/{chunk-7n1v87h0.js → chunk-64apxzn7.js} +2 -2
  60. package/dist/chunk-6bbtfd0j.js +2 -0
  61. package/dist/{chunk-vtw1zmyd.js → chunk-6f06hbsk.js} +2 -2
  62. package/dist/{chunk-ckdkm4n7.js → chunk-6p4gk1zy.js} +2 -2
  63. package/dist/chunk-6qxd4jg9.js +2 -0
  64. package/dist/{chunk-nm8245ze.js → chunk-6z3fgkkp.js} +2 -2
  65. package/dist/{chunk-127rz9fe.js → chunk-7jk8s061.js} +2 -2
  66. package/dist/{chunk-egw95b1p.js → chunk-7m83dwzq.js} +2 -2
  67. package/dist/{chunk-bm1x011j.js → chunk-7tw7rn0m.js} +2 -2
  68. package/dist/{chunk-qbt8ahwr.js → chunk-809b75k1.js} +2 -2
  69. package/dist/{chunk-xmr3vcp8.js → chunk-84p483n0.js} +2 -2
  70. package/dist/{chunk-nefts0rn.js → chunk-84zzf0ys.js} +2 -2
  71. package/dist/{chunk-mptke00a.js → chunk-88ysxbdh.js} +2 -2
  72. package/dist/{chunk-9ys14ex1.js → chunk-89j37t04.js} +3 -3
  73. package/dist/{chunk-gzf6kzm0.js → chunk-8f5w2tnp.js} +2 -2
  74. package/dist/{chunk-mfs0b15q.js → chunk-8hygfx41.js} +2 -2
  75. package/dist/chunk-8qszap2n.js +2 -0
  76. package/dist/{chunk-9q5a0kwf.js → chunk-91kpcajz.js} +2 -2
  77. package/dist/chunk-952vsa4r.js +4 -0
  78. package/dist/chunk-9w1vcmbd.js +2 -0
  79. package/dist/chunk-a6ns5agq.js +2 -0
  80. package/dist/{chunk-dps8nnde.js → chunk-ad53zbdb.js} +2 -2
  81. package/dist/chunk-an3nh155.js +2 -0
  82. package/dist/chunk-ar1bwfn3.js +2 -0
  83. package/dist/{chunk-2w0grrzz.js → chunk-arm9x6kc.js} +2 -2
  84. package/dist/chunk-ax7c2kam.js +2 -0
  85. package/dist/{chunk-ygjcmhng.js → chunk-b6sfe0k7.js} +2 -2
  86. package/dist/{chunk-m0rznqwx.js → chunk-bcdmjgab.js} +2 -2
  87. package/dist/{chunk-mvebg1n7.js → chunk-beccgzp9.js} +2 -2
  88. package/dist/{chunk-7e9s642q.js → chunk-bf7sgpzq.js} +2 -2
  89. package/dist/{chunk-6cks2gn2.js → chunk-bgnxw313.js} +2 -2
  90. package/dist/{chunk-w308wr7v.js → chunk-brv52tgj.js} +2 -2
  91. package/dist/chunk-bve6cykn.js +2 -0
  92. package/dist/chunk-bw1m6407.js +2 -0
  93. package/dist/{chunk-fdmtynmq.js → chunk-bw3bpr6m.js} +2 -2
  94. package/dist/chunk-byvw0vam.js +2 -0
  95. package/dist/chunk-c06k7g9n.js +2 -0
  96. package/dist/{chunk-10ar0368.js → chunk-c13rnm7b.js} +2 -2
  97. package/dist/chunk-c2ez86jz.js +2 -0
  98. package/dist/{chunk-1dkd8jt0.js → chunk-c2r7xpjf.js} +2 -2
  99. package/dist/{chunk-6hgcxkwd.js → chunk-cf85zhvf.js} +2 -2
  100. package/dist/{chunk-2gp33sx4.js → chunk-cq3j51m2.js} +2 -2
  101. package/dist/chunk-d06382wz.js +2 -0
  102. package/dist/chunk-d0nrbf80.js +2 -0
  103. package/dist/{chunk-acprqt2h.js → chunk-d0s10qy5.js} +2 -2
  104. package/dist/{chunk-nrk4aa7a.js → chunk-dba0ttve.js} +2 -2
  105. package/dist/{chunk-g98m1se7.js → chunk-dheg4bs2.js} +2 -2
  106. package/dist/{chunk-rv3gpjgk.js → chunk-dnrcx75n.js} +2 -2
  107. package/dist/{chunk-bbwxqt7p.js → chunk-dr5swvaa.js} +2 -2
  108. package/dist/{chunk-rr2cjfcz.js → chunk-dxwbgg69.js} +2 -2
  109. package/dist/{chunk-zr6xrady.js → chunk-e00dz09f.js} +2 -2
  110. package/dist/{chunk-zsbsypka.js → chunk-e13mpwt8.js} +2 -2
  111. package/dist/chunk-e1fzfaqj.js +2 -0
  112. package/dist/{chunk-ky2p8zyg.js → chunk-e3bpr3yx.js} +2 -2
  113. package/dist/chunk-e8p4wkbg.js +2 -0
  114. package/dist/{chunk-v77kjbkb.js → chunk-ee7a5gft.js} +2 -2
  115. package/dist/{chunk-4cnm37fs.js → chunk-er7ewrf2.js} +3 -3
  116. package/dist/{chunk-zq7p8m7g.js → chunk-ert67qk1.js} +2 -2
  117. package/dist/{chunk-q6f0e289.js → chunk-etvdqkvb.js} +2 -2
  118. package/dist/{chunk-b17rwepe.js → chunk-f54k9xxv.js} +2 -2
  119. package/dist/chunk-f7d0hs1y.js +2 -0
  120. package/dist/{chunk-jzqvhnq5.js → chunk-ftsnryz8.js} +2 -2
  121. package/dist/{chunk-5r5dc363.js → chunk-fwghjmd1.js} +2 -2
  122. package/dist/{chunk-nvh0e8y1.js → chunk-fyxetwxv.js} +2 -2
  123. package/dist/{chunk-3rew4bcf.js → chunk-g4qwh2sx.js} +2 -2
  124. package/dist/chunk-gdtpwbqn.js +1 -0
  125. package/dist/{chunk-29jan02g.js → chunk-gpv1dc5y.js} +2 -2
  126. package/dist/{chunk-z0z3xfn3.js → chunk-gttw4rmx.js} +3 -3
  127. package/dist/{chunk-dq7zxw47.js → chunk-gxb9n7g7.js} +4 -4
  128. package/dist/{chunk-yqjmqa0t.js → chunk-gxx5yh45.js} +2 -2
  129. package/dist/{chunk-fgec4g5x.js → chunk-h5mdgrq6.js} +2 -2
  130. package/dist/{chunk-cbx30sf1.js → chunk-h82jte5p.js} +2 -2
  131. package/dist/{chunk-yk72yvcd.js → chunk-ha9n1k24.js} +2 -2
  132. package/dist/{chunk-xtn9bw6a.js → chunk-hmy4snze.js} +2 -2
  133. package/dist/{chunk-8ysh4mx1.js → chunk-hyhp5ytm.js} +2 -2
  134. package/dist/{chunk-71fhan3p.js → chunk-j1frpcqd.js} +2 -2
  135. package/dist/{chunk-37p8zdb1.js → chunk-j2k2mc13.js} +2 -2
  136. package/dist/chunk-j5dqww4h.js +2 -0
  137. package/dist/{chunk-6qh7fvgs.js → chunk-ja7x2gvb.js} +3 -3
  138. package/dist/{chunk-7narmchf.js → chunk-jgqt7k0h.js} +2 -2
  139. package/dist/{chunk-pphkxw72.js → chunk-jn8b4qrh.js} +2 -2
  140. package/dist/{chunk-z90zckkv.js → chunk-jp4xjks0.js} +2 -2
  141. package/dist/chunk-jv327stj.js +2 -0
  142. package/dist/{chunk-2y13vckf.js → chunk-jy0jrht0.js} +2 -2
  143. package/dist/{chunk-00vd1yaz.js → chunk-jzbg0cx9.js} +2 -2
  144. package/dist/chunk-k2nbrerw.js +2 -0
  145. package/dist/{chunk-k86843av.js → chunk-k5nd3vyq.js} +2 -2
  146. package/dist/chunk-k7z0pgrt.js +2 -0
  147. package/dist/chunk-kbax1frf.js +2 -0
  148. package/dist/{chunk-gjdeaqy2.js → chunk-khs8cfkd.js} +2 -2
  149. package/dist/chunk-knxes674.js +2 -0
  150. package/dist/{chunk-96wvztgv.js → chunk-kvc3ghat.js} +2 -2
  151. package/dist/{chunk-mch9hd8q.js → chunk-m0r0v983.js} +5 -5
  152. package/dist/{chunk-yey8qz6h.js → chunk-m799f2x5.js} +2 -2
  153. package/dist/{chunk-eraepgrh.js → chunk-ma7thf1j.js} +2 -2
  154. package/dist/{chunk-m08yer2f.js → chunk-masqfje4.js} +2 -2
  155. package/dist/{chunk-kj3re492.js → chunk-mc21sg7m.js} +2 -2
  156. package/dist/{chunk-f7bn0nd2.js → chunk-mvnze5ts.js} +2 -2
  157. package/dist/{chunk-dav36sjv.js → chunk-myjsfbp6.js} +2 -2
  158. package/dist/chunk-n32wra9r.js +2 -0
  159. package/dist/{chunk-0k6zg9s1.js → chunk-n6erf29r.js} +2 -2
  160. package/dist/chunk-n7y094nf.js +2 -0
  161. package/dist/chunk-na6b1fpn.js +2 -0
  162. package/dist/{chunk-b1yfr8gv.js → chunk-ncgwbdmj.js} +2 -2
  163. package/dist/{chunk-vkfz61d6.js → chunk-ne4b53kn.js} +2 -2
  164. package/dist/chunk-nfwa8qkt.js +2 -0
  165. package/dist/{chunk-pae53dz2.js → chunk-npkk2gzs.js} +2 -2
  166. package/dist/{chunk-ws4qt1sc.js → chunk-nqt9gyz9.js} +2 -2
  167. package/dist/{chunk-d7kcgxa2.js → chunk-nrpgmawz.js} +2 -2
  168. package/dist/chunk-nwyem2d7.js +3 -0
  169. package/dist/{chunk-e8dzp9xe.js → chunk-p3gawvqr.js} +2 -2
  170. package/dist/{chunk-nase48et.js → chunk-pqz2471h.js} +2 -2
  171. package/dist/{chunk-rcfjwyt4.js → chunk-pw22g3k1.js} +2 -2
  172. package/dist/{chunk-k025mmnv.js → chunk-pxr5snwm.js} +2 -2
  173. package/dist/chunk-pxv38ttf.js +2 -0
  174. package/dist/chunk-q1kb5z75.js +2 -0
  175. package/dist/chunk-q7jm6srr.js +2 -0
  176. package/dist/chunk-q9b2wsdg.js +2 -0
  177. package/dist/{chunk-d4edqxgc.js → chunk-qk1yqepm.js} +2 -2
  178. package/dist/chunk-r940xwxq.js +2 -0
  179. package/dist/chunk-rd9cgt8p.js +2 -0
  180. package/dist/chunk-rragk2vb.js +2 -0
  181. package/dist/chunk-rv3k0kfr.js +2 -0
  182. package/dist/{chunk-2b7fjev1.js → chunk-ry7bxdb6.js} +2 -2
  183. package/dist/chunk-s1nfyggb.js +2 -0
  184. package/dist/chunk-sjb5stzq.js +2 -0
  185. package/dist/{chunk-xde2hdrb.js → chunk-sjm9p42x.js} +2 -2
  186. package/dist/chunk-sn3sk1j0.js +2 -0
  187. package/dist/{chunk-j8jn2p7q.js → chunk-snrbgnwn.js} +1 -1
  188. package/dist/chunk-sqkdenb0.js +3 -0
  189. package/dist/chunk-stse5bdv.js +2 -0
  190. package/dist/chunk-stv8pr4v.js +2 -0
  191. package/dist/{chunk-vxkkzs4m.js → chunk-swqbbw8q.js} +2 -2
  192. package/dist/{chunk-atdygnc5.js → chunk-sxz82jq3.js} +2 -2
  193. package/dist/chunk-tc80kegm.js +2 -0
  194. package/dist/chunk-tcg99k9e.js +2 -0
  195. package/dist/{chunk-xnj05nc3.js → chunk-tcp7c2s0.js} +3 -3
  196. package/dist/{chunk-9bk8tg2w.js → chunk-vev9q4t4.js} +3 -3
  197. package/dist/{chunk-cxd1bwe7.js → chunk-vfszr27e.js} +2 -2
  198. package/dist/{chunk-ehp3p3t5.js → chunk-vhxavb92.js} +2 -2
  199. package/dist/{chunk-y3e10q18.js → chunk-vnwt4f99.js} +2 -2
  200. package/dist/{chunk-322m8vk4.js → chunk-vyzq2pbd.js} +2 -2
  201. package/dist/chunk-w5q2ygsa.js +2 -0
  202. package/dist/{chunk-484wg46e.js → chunk-w63mha8c.js} +2 -2
  203. package/dist/{chunk-r9vjpafx.js → chunk-wk26bzjj.js} +3 -3
  204. package/dist/{chunk-q16yvbsg.js → chunk-wm6zdp7w.js} +2 -2
  205. package/dist/{chunk-2a6bv4xm.js → chunk-wpacvdsv.js} +2 -2
  206. package/dist/chunk-x1aw1r1v.js +2 -0
  207. package/dist/{chunk-8jqaahna.js → chunk-x2wcwpw3.js} +2 -2
  208. package/dist/{chunk-0y8pnj16.js → chunk-x49qjrbk.js} +2 -2
  209. package/dist/{chunk-wsz4dh6m.js → chunk-x8rfc6wc.js} +3 -3
  210. package/dist/{chunk-s5fk9ywy.js → chunk-xpfy5g6z.js} +2 -2
  211. package/dist/{chunk-vvpagkya.js → chunk-xqb4thy8.js} +2 -2
  212. package/dist/chunk-xvg3d2z6.js +7 -0
  213. package/dist/{chunk-xj2qfepx.js → chunk-xx7t8r87.js} +2 -2
  214. package/dist/{chunk-tp7329ny.js → chunk-y3mx5sf0.js} +2 -2
  215. package/dist/{chunk-pvdm1v6g.js → chunk-yj42tq3z.js} +2 -2
  216. package/dist/chunk-yn6a84c7.js +2 -0
  217. package/dist/{chunk-r67qt2tt.js → chunk-yq4wz4n8.js} +2 -2
  218. package/dist/{chunk-hhnxwgz5.js → chunk-yryg27yy.js} +2 -2
  219. package/dist/chunk-ytdhstqx.js +2 -0
  220. package/dist/{chunk-nbch7nw2.js → chunk-z107z7dt.js} +2 -2
  221. package/dist/{chunk-wjazfhrm.js → chunk-z6x70w62.js} +2 -2
  222. package/dist/{chunk-jwsgt0d9.js → chunk-z76as4dt.js} +2 -2
  223. package/dist/chunk-zft4afb8.js +2 -0
  224. package/dist/{chunk-8x33007g.js → chunk-zgqrv879.js} +3 -3
  225. package/dist/chunk-zj7kjjdj.js +2 -0
  226. package/dist/chunk-zq26pxze.js +2 -0
  227. package/dist/{chunk-ggad6492.js → chunk-zv3bm3np.js} +2 -2
  228. package/dist/{chunk-hb22jn2e.js → chunk-zxfx7psd.js} +2 -2
  229. package/dist/chunk-zxkpemh4.js +2 -0
  230. package/dist/{chunk-v3dp0ay9.js → chunk-zyn0ys4m.js} +2 -2
  231. package/dist/client.d.ts +1 -2
  232. package/dist/client.js +1 -1
  233. package/dist/codex/activity-group.js +1 -1
  234. package/dist/codex/artifact-links.js +1 -1
  235. package/dist/codex/assistant-message.js +1 -1
  236. package/dist/codex/async-question-card.js +1 -1
  237. package/dist/codex/disclosure-state.js +1 -1
  238. package/dist/codex/edited-files-card.js +1 -1
  239. package/dist/codex/image-view-activity.js +1 -1
  240. package/dist/codex/markdown-renderer.js +1 -1
  241. package/dist/codex/navigation-audio.js +1 -1
  242. package/dist/codex/navigation-preview.js +1 -1
  243. package/dist/codex/navigation-rail.js +1 -1
  244. package/dist/codex/patch-view.js +1 -1
  245. package/dist/codex/plan.js +1 -1
  246. package/dist/codex/timeline-virtualizer.js +1 -1
  247. package/dist/codex/turn-activity.js +1 -1
  248. package/dist/codex/user-message.js +1 -1
  249. package/dist/codex/virtualized-turn-list.js +1 -1
  250. package/dist/collections/collection-emoji.js +1 -1
  251. package/dist/collections/collection-menu.js +1 -1
  252. package/dist/collections/collection-panel.js +1 -1
  253. package/dist/collections/collections.js +1 -1
  254. package/dist/collections/host.js +1 -1
  255. package/dist/collections/locales.js +1 -1
  256. package/dist/collections/model.js +1 -1
  257. package/dist/collections/store.js +1 -1
  258. package/dist/composer/completion-filter.js +1 -1
  259. package/dist/composer/completion-menu.js +1 -1
  260. package/dist/composer/completion-trigger.js +1 -1
  261. package/dist/composer/effort-slider.js +1 -1
  262. package/dist/composer/inline-document.js +1 -1
  263. package/dist/composer/inline-dom.js +1 -1
  264. package/dist/composer/menu-radio.js +1 -1
  265. package/dist/composer/model-select.js +1 -1
  266. package/dist/composer/permission-mode-select.js +1 -1
  267. package/dist/composer/prompt-input-attachments.js +1 -1
  268. package/dist/composer/prompt-input-clipboard.js +1 -1
  269. package/dist/composer/prompt-input-context.js +1 -1
  270. package/dist/composer/prompt-input-inline.js +1 -1
  271. package/dist/composer/prompt-input-textarea.js +1 -1
  272. package/dist/composer/prompt-input.js +1 -1
  273. package/dist/conversation/action-card.js +1 -1
  274. package/dist/conversation/composer/app-mentions.js +1 -1
  275. package/dist/conversation/composer/apps-menu.js +1 -1
  276. package/dist/conversation/composer/composer-menu.js +1 -1
  277. package/dist/conversation/composer/composer.js +1 -1
  278. package/dist/conversation/composer/config-options.js +1 -1
  279. package/dist/conversation/composer/context.js +1 -1
  280. package/dist/conversation/composer/drafts.js +1 -1
  281. package/dist/conversation/composer/file-items.js +1 -1
  282. package/dist/conversation/composer/long-text.js +1 -1
  283. package/dist/conversation/composer/mention-chips.js +1 -1
  284. package/dist/conversation/composer/mention-uri.js +1 -1
  285. package/dist/conversation/composer/model-menu.js +1 -1
  286. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  287. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  288. package/dist/conversation/composer/prediction.js +1 -1
  289. package/dist/conversation/composer/prompt-history.js +1 -1
  290. package/dist/conversation/composer/slash-command-button.js +1 -1
  291. package/dist/conversation/composer/submit-button.js +1 -1
  292. package/dist/conversation/composer/usage-meter.js +1 -1
  293. package/dist/conversation/connection-notice.js +1 -1
  294. package/dist/conversation/context.js +1 -1
  295. package/dist/conversation/conversation-body.js +1 -1
  296. package/dist/conversation/conversation-search.js +1 -1
  297. package/dist/conversation/conversation-view.js +1 -1
  298. package/dist/conversation/conversation.js +1 -1
  299. package/dist/conversation/diff-modal.js +1 -1
  300. package/dist/conversation/draft-project-picker.js +1 -1
  301. package/dist/conversation/session-actions.js +1 -1
  302. package/dist/conversation/subagent-sessions.js +1 -1
  303. package/dist/conversation/subagent-tasks.js +1 -1
  304. package/dist/desktop/desktop-composer.js +1 -1
  305. package/dist/desktop/desktop.js +1 -1
  306. package/dist/desktop/draft-model-select.js +1 -1
  307. package/dist/desktop/load-image.js +1 -1
  308. package/dist/desktop/model-catalog.js +1 -1
  309. package/dist/desktop/model-recovery.js +1 -1
  310. package/dist/desktop/model-settings-action.js +1 -1
  311. package/dist/desktop/native-file-drop.js +1 -1
  312. package/dist/generated/commands.js +1 -1
  313. package/dist/image-lightbox.js +1 -1
  314. package/dist/image-preview-dialog.js +1 -1
  315. package/dist/image.js +1 -1
  316. package/dist/lib/app-reference.js +1 -1
  317. package/dist/lib/application-metadata.js +1 -1
  318. package/dist/lib/chat-path.js +1 -1
  319. package/dist/lib/code-highlighter.js +1 -1
  320. package/dist/lib/file-url.js +1 -1
  321. package/dist/lib/fuzzy.js +1 -1
  322. package/dist/lib/group-blocks.js +1 -1
  323. package/dist/lib/image-encode.js +1 -1
  324. package/dist/lib/limits.js +1 -1
  325. package/dist/lib/markdown-parser.js +1 -1
  326. package/dist/lib/markdown-rules.js +1 -1
  327. package/dist/lib/model-name.js +1 -1
  328. package/dist/lib/pointer-centered-zoom.js +1 -1
  329. package/dist/lib/prepare-prompt-files.js +1 -1
  330. package/dist/lib/reference-presentation.js +1 -1
  331. package/dist/lib/stream-style.js +1 -1
  332. package/dist/lib/streaming-markdown.js +1 -1
  333. package/dist/lib/tool-artifacts.js +1 -1
  334. package/dist/locales.js +1 -1
  335. package/dist/mermaid/diagram.js +1 -1
  336. package/dist/mermaid/export.js +1 -1
  337. package/dist/mermaid/index.js +1 -1
  338. package/dist/mermaid/preview.js +1 -1
  339. package/dist/oauth/claude-login.js +1 -1
  340. package/dist/oauth.js +1 -1
  341. package/dist/plugins/catalog-header.js +1 -1
  342. package/dist/plugins/catalog-skeleton.js +1 -1
  343. package/dist/plugins/host.d.ts +1 -1
  344. package/dist/plugins/host.js +1 -1
  345. package/dist/plugins/new-chat-directory.js +1 -1
  346. package/dist/plugins/pane.js +1 -1
  347. package/dist/plugins/panel-item.js +1 -1
  348. package/dist/plugins/plugin-detail-page.js +1 -1
  349. package/dist/plugins/plugin-icon.js +1 -1
  350. package/dist/plugins/plugin-icons.js +1 -1
  351. package/dist/plugins/plugins-page.js +1 -1
  352. package/dist/plugins/plugins.js +1 -1
  353. package/dist/plugins/read-skill-document.js +1 -1
  354. package/dist/plugins/skill-document.js +1 -1
  355. package/dist/plugins/skills-tab.js +1 -1
  356. package/dist/plugins/store.d.ts +1 -1
  357. package/dist/plugins/store.js +1 -1
  358. package/dist/plugins/toolbox-layout.js +1 -1
  359. package/dist/reference-projection.js +1 -1
  360. package/dist/search/chat-search.js +1 -1
  361. package/dist/search/codex-source-matches.js +1 -1
  362. package/dist/search/dom-matches.js +1 -1
  363. package/dist/search/find-bar.js +1 -1
  364. package/dist/search/literal-matches.js +1 -1
  365. package/dist/session-list/account-menu.js +1 -1
  366. package/dist/session-list/activity-list.js +1 -1
  367. package/dist/session-list/archived-sessions.js +1 -1
  368. package/dist/session-list/help-menu.js +1 -1
  369. package/dist/session-list/highlight.js +1 -1
  370. package/dist/session-list/host.js +1 -1
  371. package/dist/session-list/hover-info-card.js +1 -1
  372. package/dist/session-list/locales.js +1 -1
  373. package/dist/session-list/navigation-controls.js +1 -1
  374. package/dist/session-list/navigation-header.js +1 -1
  375. package/dist/session-list/navigation-store.js +1 -1
  376. package/dist/session-list/navigation-tabs.js +1 -1
  377. package/dist/session-list/navigation.js +1 -1
  378. package/dist/session-list/overflow-marquee.js +1 -1
  379. package/dist/session-list/platform.js +1 -1
  380. package/dist/session-list/row-stop-button.js +1 -1
  381. package/dist/session-list/session-groups.js +1 -1
  382. package/dist/session-list/session-info-card.js +1 -1
  383. package/dist/session-list/session-list.js +1 -1
  384. package/dist/session-list/session-row.js +1 -1
  385. package/dist/session-list/session-state-dot.js +1 -1
  386. package/dist/session-list/session-state-menu.js +1 -1
  387. package/dist/session-list/shortcut-hint.js +1 -1
  388. package/dist/session-list/shortcut.js +1 -1
  389. package/dist/session-list/sidebar-overlay.js +1 -1
  390. package/dist/session-list/trailing-swap.js +1 -1
  391. package/dist/session-list/use-activity-notification.js +1 -1
  392. package/dist/session-list/use-activity-preview.js +1 -1
  393. package/dist/session-list/use-cmd-held.js +1 -1
  394. package/dist/session-list/use-project-sessions.js +1 -1
  395. package/dist/session-list/virtual-session-rows.js +1 -1
  396. package/dist/session-timeline/activity-group.js +1 -1
  397. package/dist/session-timeline/activity-projection.js +1 -1
  398. package/dist/session-timeline/assistant-content.js +1 -1
  399. package/dist/session-timeline/assistant-image-references.js +1 -1
  400. package/dist/session-timeline/assistant-turn.js +1 -1
  401. package/dist/session-timeline/async-questions.js +1 -1
  402. package/dist/session-timeline/edited-files-card.js +1 -1
  403. package/dist/session-timeline/history-timeline.js +1 -1
  404. package/dist/session-timeline/host.js +1 -1
  405. package/dist/session-timeline/image-generation-progress.js +1 -1
  406. package/dist/session-timeline/navigation-rail.js +1 -1
  407. package/dist/session-timeline/plan.js +1 -1
  408. package/dist/session-timeline/question-reply.js +1 -1
  409. package/dist/session-timeline/resource-content.js +1 -1
  410. package/dist/session-timeline/session-timeline.js +1 -1
  411. package/dist/session-timeline/timeline-registry.js +1 -1
  412. package/dist/session-timeline/turn-activity.js +1 -1
  413. package/dist/session-timeline/turn-error.js +1 -1
  414. package/dist/session-timeline/turn-retry.js +1 -1
  415. package/dist/session-timeline/turn-time.js +1 -1
  416. package/dist/session-timeline/turns.js +1 -1
  417. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  418. package/dist/session-timeline/user-message.js +1 -1
  419. package/dist/settings/codex-account-card.js +1 -1
  420. package/dist/settings/login-card.js +1 -1
  421. package/dist/settings/model-alias-settings.js +1 -1
  422. package/dist/settings/model-aliases.js +1 -1
  423. package/dist/settings/provider-logos.js +1 -1
  424. package/dist/settings/provider-section.js +1 -1
  425. package/dist/settings/providers-port.js +1 -1
  426. package/dist/settings/providers.js +1 -1
  427. package/dist/settings/settings-bridge.js +1 -1
  428. package/dist/settings/settings.js +1 -1
  429. package/native/darwin-arm64/artifact.json +1 -1
  430. package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
  431. package/native/win32-x64/alwith_native_chat.dll +0 -0
  432. package/native/win32-x64/artifact.json +1 -1
  433. package/package.json +2 -7
  434. package/dist/agent/application-client.d.ts +0 -30
  435. package/dist/agent/application-client.js +0 -1
  436. package/dist/chunk-03mdvw7w.js +0 -2
  437. package/dist/chunk-04778wzq.js +0 -2
  438. package/dist/chunk-0ppwk6y9.js +0 -2
  439. package/dist/chunk-0yngh0w6.js +0 -2
  440. package/dist/chunk-1fnfd1yv.js +0 -2
  441. package/dist/chunk-1jd0p7b8.js +0 -2
  442. package/dist/chunk-2jkv90n6.js +0 -2
  443. package/dist/chunk-3c9se1ha.js +0 -2
  444. package/dist/chunk-3zr6f9nd.js +0 -4
  445. package/dist/chunk-43s8pmw9.js +0 -2
  446. package/dist/chunk-4r8pqg1h.js +0 -2
  447. package/dist/chunk-52y91amb.js +0 -2
  448. package/dist/chunk-5s0k93vr.js +0 -3
  449. package/dist/chunk-6aj4cgfs.js +0 -2
  450. package/dist/chunk-723kazw5.js +0 -2
  451. package/dist/chunk-79qh74jn.js +0 -2
  452. package/dist/chunk-7kxa1krk.js +0 -2
  453. package/dist/chunk-7xszqjre.js +0 -2
  454. package/dist/chunk-8at6403h.js +0 -2
  455. package/dist/chunk-90mq5g5a.js +0 -1
  456. package/dist/chunk-aazp5pw2.js +0 -2
  457. package/dist/chunk-adnpp676.js +0 -3
  458. package/dist/chunk-b5afm26d.js +0 -2
  459. package/dist/chunk-bbpjhe4e.js +0 -2
  460. package/dist/chunk-br1vyrce.js +0 -2
  461. package/dist/chunk-cc8cg69z.js +0 -4
  462. package/dist/chunk-csw1rzrc.js +0 -2
  463. package/dist/chunk-fdqfbhwd.js +0 -2
  464. package/dist/chunk-fjr7n326.js +0 -2
  465. package/dist/chunk-fwk2ayca.js +0 -2
  466. package/dist/chunk-g9vjpmrq.js +0 -2
  467. package/dist/chunk-gh1jdr70.js +0 -2
  468. package/dist/chunk-j420zak2.js +0 -2
  469. package/dist/chunk-mz8tjgre.js +0 -2
  470. package/dist/chunk-n2gm013f.js +0 -2
  471. package/dist/chunk-na5pcj57.js +0 -2
  472. package/dist/chunk-nvv8aheh.js +0 -2
  473. package/dist/chunk-nxnzrbrc.js +0 -2
  474. package/dist/chunk-pwsqw3mx.js +0 -2
  475. package/dist/chunk-q2v4hre7.js +0 -2
  476. package/dist/chunk-qhes5k0g.js +0 -2
  477. package/dist/chunk-qhj8374f.js +0 -2
  478. package/dist/chunk-rnxbtzg9.js +0 -2
  479. package/dist/chunk-rpzv6g89.js +0 -2
  480. package/dist/chunk-rqck9w0f.js +0 -2
  481. package/dist/chunk-sm16wn9x.js +0 -2
  482. package/dist/chunk-swq34ay7.js +0 -2
  483. package/dist/chunk-t12xpbtp.js +0 -3
  484. package/dist/chunk-t4vfpx6a.js +0 -2
  485. package/dist/chunk-t6z3khr5.js +0 -2
  486. package/dist/chunk-tac30kkh.js +0 -2
  487. package/dist/chunk-tdw5wrey.js +0 -2
  488. package/dist/chunk-thxz5zm6.js +0 -2
  489. package/dist/chunk-tvfmbabv.js +0 -2
  490. package/dist/chunk-twrdy8cb.js +0 -2
  491. package/dist/chunk-tz1redf7.js +0 -3
  492. package/dist/chunk-tzr6phth.js +0 -2
  493. package/dist/chunk-v066qn38.js +0 -2
  494. package/dist/chunk-v2m44e5f.js +0 -2
  495. package/dist/chunk-x5cv0bfc.js +0 -4
  496. package/dist/chunk-xdrwsxqy.js +0 -2
  497. package/dist/chunk-xx0hs7b3.js +0 -2
  498. package/dist/chunk-yaxe4yd4.js +0 -2
  499. package/dist/chunk-yfnnrm9g.js +0 -7
  500. package/dist/chunk-zfsbhwe1.js +0 -2
  501. package/dist/import.d.ts +0 -1
  502. package/dist/import.js +0 -1
@@ -1,2 +1,2 @@
1
- var t=new Map;var a=0;function Oo(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Oo(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function Er(e,n){return d??=new l,d.connect(e,n)}
2
- export{Oo,Er};
1
+ var t=new Map;var a=0;function Oo(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Oo(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function Kr(e,n){return d??=new l,d.connect(e,n)}
2
+ export{Oo,Kr};
@@ -1,2 +1,2 @@
1
- import{We,Kt}from"./chunk-zr6xrady.js";import{createStore as S}from"@alwith/api/client";import{createContext as y,useContext as h,useSyncExternalStore as x}from"react";import{jsx as w}from"react/jsx-runtime";function u(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function ni(o){if(o===null||o===void 0)return We();if(!u(o)||!u(o.collections)||!Array.isArray(o.order))throw Error("Saved collections are not in the expected format");let{collections:t,order:e}=o;for(let r of e)if(typeof r!=="string"||!u(t[r]))throw Error(`Saved collection missing: ${String(r)}`);return{collections:t,order:e,sessionMeta:{}}}function Ns(o,{reportError:t=console.error}={}){let e=S(We()),r=async()=>{e.setState(ni(await o.load()),!0)},i=r(),l=i.catch(t),C=()=>{let n=l.then(r);return i=n,l=n.catch(()=>{}),n},s=!1,a,c=o.subscribe?.(()=>{if(!s)C().catch(t)});if(typeof c==="function")a=c;else if(c!==void 0)c.then((n)=>{if(s)n();else a=n},t);return{store:e,getState:()=>e.getState(),ready:i,dispatch:(n)=>{let p=l.then(async()=>{await i;let d=(Array.isArray(n)?n:[n]).reduce(Kt,e.getState());await o.save({collections:d.collections,order:d.order}),e.setState(d,!0)});return l=p.catch(()=>{}),p},reload:C,dispose:()=>{s=!0,a?.()}}}var f=y(null);function As({store:o,children:t}){return w(f,{value:o,children:t})}function Yn(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function we(o){let{store:t}=Yn(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function ce(){return Yn().dispatch}
2
- export{ni,Ns,As,Yn,we,ce};
1
+ import{Xe,nn}from"./chunk-e00dz09f.js";import{createStore as S}from"@alwith/api/client";import{createContext as y,useContext as h,useSyncExternalStore as x}from"react";import{jsx as w}from"react/jsx-runtime";function u(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function fi(o){if(o===null||o===void 0)return Xe();if(!u(o)||!u(o.collections)||!Array.isArray(o.order))throw Error("Saved collections are not in the expected format");let{collections:t,order:e}=o;for(let r of e)if(typeof r!=="string"||!u(t[r]))throw Error(`Saved collection missing: ${String(r)}`);return{collections:t,order:e,sessionMeta:{}}}function Xs(o,{reportError:t=console.error}={}){let e=S(Xe()),r=async()=>{e.setState(fi(await o.load()),!0)},i=r(),l=i.catch(t),C=()=>{let n=l.then(r);return i=n,l=n.catch(()=>{}),n},s=!1,a,c=o.subscribe?.(()=>{if(!s)C().catch(t)});if(typeof c==="function")a=c;else if(c!==void 0)c.then((n)=>{if(s)n();else a=n},t);return{store:e,getState:()=>e.getState(),ready:i,dispatch:(n)=>{let p=l.then(async()=>{await i;let d=(Array.isArray(n)?n:[n]).reduce(nn,e.getState());await o.save({collections:d.collections,order:d.order}),e.setState(d,!0)});return l=p.catch(()=>{}),p},reload:C,dispose:()=>{s=!0,a?.()}}}var f=y(null);function Ys({store:o,children:t}){return w(f,{value:o,children:t})}function eo(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function De(o){let{store:t}=eo(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function pe(){return eo().dispatch}
2
+ export{fi,Xs,Ys,eo,De,pe};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-tac30kkh.js";import{ExternalLink as n}from"lucide-react";import{DropdownMenuItem as m}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as i,jsxs as l}from"react/jsx-runtime";function Te(){let{host:o}=e(),r=o.openSettings;if(!r)return null;return l(m,{className:"h-9 gap-2 rounded-md px-2 text-sm font-normal",onClick:()=>{Promise.resolve(r("provider")).catch((t)=>o.reportError?o.reportError(t):console.error(t))},children:[o.t("model.moreModels"),i(n,{className:"ml-auto size-4","aria-hidden":"true"})]})}
2
- export{Te};
1
+ import{e}from"./chunk-n32wra9r.js";import{ExternalLink as n}from"lucide-react";import{DropdownMenuItem as m}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as i,jsxs as l}from"react/jsx-runtime";function ze(){let{host:o}=e(),r=o.openSettings;if(!r)return null;return l(m,{className:"h-9 gap-2 rounded-md px-2 text-sm font-normal",onClick:()=>{Promise.resolve(r("provider")).catch((t)=>o.reportError?o.reportError(t):console.error(t))},children:[o.t("model.moreModels"),i(n,{className:"ml-auto size-4","aria-hidden":"true"})]})}
2
+ export{ze};
@@ -0,0 +1,2 @@
1
+ import{qt}from"./chunk-k7z0pgrt.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function Ke(e){let t=r.get(e);if(!t)t=qt(e),r.set(e,t);return t}function Is({host:e,client:t,children:n}){let s=Ke(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function d(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function We(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function lt(e){let t=We();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Ke(We());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Ze(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
2
+ export{Ke,Is,d,We,lt,i,Ze};
@@ -1,4 +1,4 @@
1
- import{et}from"./chunk-jwsgt0d9.js";import{Pr}from"./chunk-0y8pnj16.js";import{l}from"./chunk-6283nzqs.js";import{fe}from"./chunk-atdygnc5.js";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as st}from"cn";import{BookOpenIcon as it,FileIcon as at,SquareSlashIcon as lt,StoreIcon as ut}from"lucide-react";import{useCallback as ct,useEffect as y,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as g}from"react";import{createPortal as mt}from"react-dom";import{Button as _}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as d,jsxs as T,Fragment as pt}from"react/jsx-runtime";function gr({handleRef:a,anchorRef:f,commands:q,renderSlashMenu:k,searchFiles:u,onMention:R,onSearchError:Q,fileSearchDebounceMs:M=0,bashMode:z=!1,forcedOpen:i=!1,onForcedOpenChange:c,emptyLabel:F,fileStatusLabels:L,morePlugins:N}){let D=fe(),s=D.textInput.value,[K,P]=g(0),[O,S]=g(!1),[x,B]=g(null),[E,h]=g(0),U=Z(null);y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>P(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[a]);let V=Y(()=>z&&s.startsWith("!")?null:Pr(s,K),[s,K,z]),o=V?.kind==="at"&&!u?null:V,H=`${o?.kind??"forced"}:${o?.query??""}:${i}`,[tt,nt]=g(H);if(tt!==H)nt(H),h(0);let I=Z(null);y(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=s;else if(s!==I.current)c?.(!1)},[i,s,c]);let b=o?.kind==="at"?o.query:null;y(()=>{if(b===null||!u){B(null);return}let t=!0,e=()=>{u(b).then((r)=>{if(t)B({query:b,search:u,items:r})},(r)=>{if(t)B({query:b,search:u,items:[]}),Q(r)})},n=M>0?window.setTimeout(e,M):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[b,u,M,Q]);let v=Y(()=>{if(o?.kind==="at")return x?.query===o.query&&x.search===u?x.items:[];if(k&&(o?.kind==="slash"||i))return[];if(o)return et(q,o.query);if(i)return et(q,"");return[]},[o,i,q,x,u,k]),m=o?o.kind==="slash":i;y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>S(!0),n=()=>{if(S(!1),i)c?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[a,i,c]),y(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let p=O&&(o!==null?o.kind==="slash"||v.length>0||!!L:i);y(()=>{if(!p)return;U.current?.querySelector(`[data-idx="${E}"]`)?.scrollIntoView({block:"nearest"})},[E,p]);function A(t){let e=a.current?.getTextarea();if(!e)return;let n,r;if(o){let j=o.kind==="slash"?`${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `:`@${t.label} `;if(n=s.slice(0,o.start)+j+s.slice(o.end),o.kind==="at")R?.(t.payload);r=o.start+j.length}else if(i)n=`${s.length===0||s.endsWith(`
1
+ import{it}from"./chunk-z76as4dt.js";import{Yi}from"./chunk-x49qjrbk.js";import{l}from"./chunk-6283nzqs.js";import{ve}from"./chunk-sxz82jq3.js";import{autoUpdate as ot}from"@floating-ui/dom";import{cn as rt}from"cn";import{BookOpenIcon as st,FileIcon as at,SquareSlashIcon as lt,StoreIcon as ut}from"lucide-react";import{useCallback as ct,useEffect as y,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as g}from"react";import{createPortal as mt}from"react-dom";import{Button as _}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as d,jsxs as T,Fragment as pt}from"react/jsx-runtime";function Xi({handleRef:a,anchorRef:f,commands:q,renderSlashMenu:k,searchFiles:u,onMention:R,onSearchError:Q,fileSearchDebounceMs:M=0,bashMode:z=!1,forcedOpen:i=!1,onForcedOpenChange:c,emptyLabel:F,fileStatusLabels:L,morePlugins:N}){let D=ve(),s=D.textInput.value,[K,P]=g(0),[O,S]=g(!1),[x,B]=g(null),[E,h]=g(0),U=Z(null);y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>P(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[a]);let V=Y(()=>z&&s.startsWith("!")?null:Yi(s,K),[s,K,z]),o=V?.kind==="at"&&!u?null:V,H=`${o?.kind??"forced"}:${o?.query??""}:${i}`,[tt,et]=g(H);if(tt!==H)et(H),h(0);let I=Z(null);y(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=s;else if(s!==I.current)c?.(!1)},[i,s,c]);let b=o?.kind==="at"?o.query:null;y(()=>{if(b===null||!u){B(null);return}let t=!0,e=()=>{u(b).then((r)=>{if(t)B({query:b,search:u,items:r})},(r)=>{if(t)B({query:b,search:u,items:[]}),Q(r)})},n=M>0?window.setTimeout(e,M):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[b,u,M,Q]);let v=Y(()=>{if(o?.kind==="at")return x?.query===o.query&&x.search===u?x.items:[];if(k&&(o?.kind==="slash"||i))return[];if(o)return it(q,o.query);if(i)return it(q,"");return[]},[o,i,q,x,u,k]),m=o?o.kind==="slash":i;y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>S(!0),n=()=>{if(S(!1),i)c?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[a,i,c]),y(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let p=O&&(o!==null?o.kind==="slash"||v.length>0||!!L:i);y(()=>{if(!p)return;U.current?.querySelector(`[data-idx="${E}"]`)?.scrollIntoView({block:"nearest"})},[E,p]);function A(t){let e=a.current?.getTextarea();if(!e)return;let n,r;if(o){let j=o.kind==="slash"?`${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `:`@${t.label} `;if(n=s.slice(0,o.start)+j+s.slice(o.end),o.kind==="at")R?.(t.payload);r=o.start+j.length}else if(i)n=`${s.length===0||s.endsWith(`
2
2
  `)?s:`${s}
3
- `}${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `,r=n.length,c?.(!1);else return;D.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=(n)=>{if(!p||m&&k)return;if(a.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>v.length===0?0:Math.min(v.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=v[E];if(r)A(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)P(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else c?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,G]=g(null),[W,ot]=g(null),C=ct(()=>{let t=f?.current;if(!t)return;let e=t.getBoundingClientRect();G({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[f]);if(X(()=>{if(!p){G(null);return}C()},[p,C]),X(()=>{let t=f?.current;if(!p||!t||!W)return;return rt(t,W,C,{animationFrame:!0})},[p,W,f,C]),p&&m&&k)return k({query:o?.query??"",close:()=>{if(o)P(o.start),a.current?.getTextarea()?.setSelectionRange(o.start,o.start);else c?.(!1)},selectCommand:(t)=>A({key:t,label:t,payload:t}),replaceQuery:(t)=>{let e=a.current?.getTextarea();if(!e)return;let n=o?.start??e.selectionStart,r=o?.end??e.selectionEnd;D.textInput.setInput(s.slice(0,n)+s.slice(r)),c?.(!1),requestAnimationFrame(()=>{if(a.current?.getTextarea()!==e)return;e.focus(),e.setSelectionRange(n,n),t()})}});if(!p||f&&!w)return null;let J=d("div",{ref:ot,className:f?"fixed z-50":l.position,style:f&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:T("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:[T("div",{className:l.list,children:[v.length===0&&m&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:F}),v.length===0&&!m&&L&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===b&&x.search===u?L.empty:L.loading}),v.map((t,e)=>{let n=m?t.payload.startsWith("$")?it:lt:at;return T(_,{type:"button",variant:"ghost",role:"option","aria-selected":e===E,"data-idx":e,onMouseDown:(r)=>{r.preventDefault(),A(t)},onMouseEnter:()=>h(e),className:st(m?l.row:"flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===E&&l.selected),children:[d(n,{className:m?l.icon:"text-muted-foreground size-4 shrink-0"}),d("span",{className:m?l.label:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&d("span",{"data-slot":"description",className:l.description,children:t.description})]},t.key)})]}),m&&N&&d(pt,{children:T(_,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),c?.(!1),N.open()},className:l.row,children:[d(ut,{className:l.icon}),d("span",{className:l.label,children:N.label})]})})]})});return f?mt(J,document.body):J}
4
- export{gr};
3
+ `}${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `,r=n.length,c?.(!1);else return;D.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=(n)=>{if(!p||m&&k)return;if(a.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>v.length===0?0:Math.min(v.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=v[E];if(r)A(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)P(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else c?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,G]=g(null),[W,nt]=g(null),C=ct(()=>{let t=f?.current;if(!t)return;let e=t.getBoundingClientRect();G({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[f]);if(X(()=>{if(!p){G(null);return}C()},[p,C]),X(()=>{let t=f?.current;if(!p||!t||!W)return;return ot(t,W,C,{animationFrame:!0})},[p,W,f,C]),p&&m&&k)return k({query:o?.query??"",close:()=>{if(o)P(o.start),a.current?.getTextarea()?.setSelectionRange(o.start,o.start);else c?.(!1)},selectCommand:(t)=>A({key:t,label:t,payload:t}),replaceQuery:(t)=>{let e=a.current?.getTextarea();if(!e)return;let n=o?.start??e.selectionStart,r=o?.end??e.selectionEnd;D.textInput.setInput(s.slice(0,n)+s.slice(r)),c?.(!1),requestAnimationFrame(()=>{if(a.current?.getTextarea()!==e)return;e.focus(),e.setSelectionRange(n,n),t()})}});if(!p||f&&!w)return null;let J=d("div",{ref:nt,className:f?"fixed z-50":l.position,style:f&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:T("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:[T("div",{className:l.list,children:[v.length===0&&m&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:F}),v.length===0&&!m&&L&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===b&&x.search===u?L.empty:L.loading}),v.map((t,e)=>{let n=m?t.payload.startsWith("$")?st:lt:at;return T(_,{type:"button",variant:"ghost",role:"option","aria-selected":e===E,"data-idx":e,onMouseDown:(r)=>{r.preventDefault(),A(t)},onMouseEnter:()=>h(e),className:rt(m?l.row:"flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===E&&l.selected),children:[d(n,{className:m?l.icon:"text-muted-foreground size-4 shrink-0"}),d("span",{className:m?l.label:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&d("span",{"data-slot":"description",className:l.description,children:t.description})]},t.key)})]}),m&&N&&d(pt,{children:T(_,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),c?.(!1),N.open()},className:l.row,children:[d(ut,{className:l.icon}),d("span",{className:l.label,children:N.label})]})})]})});return f?mt(J,document.body):J}
4
+ export{Xi};
@@ -1,2 +1,2 @@
1
- import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var Ut="group/trailing";function at({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function Bt({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{Ut,at,Bt};
1
+ import{cn as i}from"cn";import{jsx as t,jsxs as s}from"react/jsx-runtime";var gt="group/trailing";function Je({children:n,className:e}){return t("span",{className:i("flex w-5 shrink-0 items-center justify-center whitespace-nowrap",e),children:n})}function ft({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{gt,Je,ft};
@@ -1,2 +1,2 @@
1
- function i(n,o=0){if(o>32)throw Error("Session input config is too deeply nested");if(n===null||typeof n==="string"||typeof n==="boolean")return n;if(typeof n==="number"&&Number.isFinite(n))return n;if(Array.isArray(n))return n.map((t)=>i(t,o+1));if(n&&typeof n==="object"&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null))return Object.fromEntries(Object.keys(n).toSorted().map((t)=>[t,i(n[t],o+1)]));throw Error("Session input config must contain only JSON values")}function qi(n){if(!n||typeof n!=="object"||!("mode"in n)||typeof n.mode!=="string"||!n.mode.trim()||n.mode.length>128||/\p{Cc}/u.test(n.mode)||!("config"in n)||!n.config||typeof n.config!=="object"||Array.isArray(n.config))throw Error("Expected session input configuration with mode and config");let o=i(n.config),t={mode:n.mode,config:o};if(new TextEncoder().encode(JSON.stringify(t)).byteLength>65536)throw Error("Session input config exceeds 64 KiB");return t}function dn(n,o){if(!n||typeof n!=="object"||!("sessionId"in n)||n.sessionId!==o||!("revision"in n)||typeof n.revision!=="number"||!Number.isSafeInteger(n.revision)||n.revision<0||!("inputConfig"in n))throw Error("Invalid Codex session input snapshot");return{sessionId:o,revision:n.revision,inputConfig:n.inputConfig===null?null:qi(n.inputConfig)}}
2
- export{qi,dn};
1
+ function i(n,o=0){if(o>32)throw Error("Session input config is too deeply nested");if(n===null||typeof n==="string"||typeof n==="boolean")return n;if(typeof n==="number"&&Number.isFinite(n))return n;if(Array.isArray(n))return n.map((t)=>i(t,o+1));if(n&&typeof n==="object"&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null))return Object.fromEntries(Object.keys(n).toSorted().map((t)=>[t,i(n[t],o+1)]));throw Error("Session input config must contain only JSON values")}function ji(n){if(!n||typeof n!=="object"||!("mode"in n)||typeof n.mode!=="string"||!n.mode.trim()||n.mode.length>128||/\p{Cc}/u.test(n.mode)||!("config"in n)||!n.config||typeof n.config!=="object"||Array.isArray(n.config))throw Error("Expected session input configuration with mode and config");let o=i(n.config),t={mode:n.mode,config:o};if(new TextEncoder().encode(JSON.stringify(t)).byteLength>65536)throw Error("Session input config exceeds 64 KiB");return t}function Nn(n,o){if(!n||typeof n!=="object"||!("sessionId"in n)||n.sessionId!==o||!("revision"in n)||typeof n.revision!=="number"||!Number.isSafeInteger(n.revision)||n.revision<0||!("inputConfig"in n))throw Error("Invalid Codex session input snapshot");return{sessionId:o,revision:n.revision,inputConfig:n.inputConfig===null?null:ji(n.inputConfig)}}
2
+ export{ji,Nn};
@@ -1,2 +1,2 @@
1
- import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function Wn({title:r,titleIcon:t,body:o,rows:d,details:n,actions:s}){return a("div",{"data-slot":"hover-info-card",className:"flex flex-col gap-1.5",children:[a("div",{"data-slot":"hover-info-card-summary",className:"flex min-w-0 flex-col gap-1",children:[a("div",{"data-slot":"hover-info-card-title-row",className:"flex min-w-0 items-center gap-1.5",children:[t!=null&&e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t}),e("div",{"data-slot":"hover-info-card-title",className:"text-foreground line-clamp-2 min-w-0 flex-1 text-sm break-words",children:r})]}),o!=null&&e("div",{"data-slot":"hover-info-card-body",className:"text-muted-foreground line-clamp-2 text-xs break-words",children:o}),e(i,{rows:d})]}),n!=null&&n.length>0&&e("div",{"data-slot":"hover-info-card-details",className:"flex min-w-0 flex-col gap-1.5",children:e(i,{rows:n})}),s!=null&&a(v,{children:[e("div",{"data-slot":"hover-info-card-separator",className:"bg-border -mx-3 mt-1.5 h-px"}),e("div",{"data-slot":"hover-info-card-actions",className:"-mx-1 flex flex-col",children:s})]})]})}function i({rows:r}){return r?.map((t,o)=>a("div",{"data-slot":"hover-info-card-row",className:"text-muted-foreground flex items-start gap-1.5 text-xs",children:[e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t.icon}),e("span",{className:"min-w-0 break-all",children:t.text})]},o))}function j({icon:r,label:t,trailing:o,disabled:d,onClick:n,variant:s="default",className:l,...c}){return a("button",{...c,"data-slot":"hover-info-card-action","data-variant":s,type:"button",disabled:d,onClick:n,className:f("text-foreground hover:bg-foreground/5 active:bg-foreground/10 flex h-8 w-full items-center gap-2 rounded-sm px-2 text-start text-sm font-normal disabled:pointer-events-none disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0",s==="destructive"?"text-destructive [&_svg]:text-destructive":"[&_svg]:text-muted-foreground",l),children:[r,e("span",{className:"min-w-0 flex-1 truncate",children:t}),o]})}
2
- export{Wn,j};
1
+ import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function en({title:r,titleIcon:t,body:o,rows:d,details:n,actions:s}){return a("div",{"data-slot":"hover-info-card",className:"flex flex-col gap-1.5",children:[a("div",{"data-slot":"hover-info-card-summary",className:"flex min-w-0 flex-col gap-1",children:[a("div",{"data-slot":"hover-info-card-title-row",className:"flex min-w-0 items-center gap-1.5",children:[t!=null&&e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t}),e("div",{"data-slot":"hover-info-card-title",className:"text-foreground line-clamp-2 min-w-0 flex-1 text-sm break-words",children:r})]}),o!=null&&e("div",{"data-slot":"hover-info-card-body",className:"text-muted-foreground line-clamp-2 text-xs break-words",children:o}),e(i,{rows:d})]}),n!=null&&n.length>0&&e("div",{"data-slot":"hover-info-card-details",className:"flex min-w-0 flex-col gap-1.5",children:e(i,{rows:n})}),s!=null&&a(v,{children:[e("div",{"data-slot":"hover-info-card-separator",className:"bg-border -mx-3 mt-1.5 h-px"}),e("div",{"data-slot":"hover-info-card-actions",className:"-mx-1 flex flex-col",children:s})]})]})}function i({rows:r}){return r?.map((t,o)=>a("div",{"data-slot":"hover-info-card-row",className:"text-muted-foreground flex items-start gap-1.5 text-xs",children:[e("span",{"data-slot":"hover-info-card-icon",className:"flex h-5 w-4 shrink-0 items-center justify-center",children:t.icon}),e("span",{className:"min-w-0 break-all",children:t.text})]},o))}function G({icon:r,label:t,trailing:o,disabled:d,onClick:n,variant:s="default",className:l,...c}){return a("button",{...c,"data-slot":"hover-info-card-action","data-variant":s,type:"button",disabled:d,onClick:n,className:f("text-foreground hover:bg-foreground/5 active:bg-foreground/10 flex h-8 w-full items-center gap-2 rounded-sm px-2 text-start text-sm font-normal disabled:pointer-events-none disabled:opacity-50","[&_svg]:size-4 [&_svg]:shrink-0",s==="destructive"?"text-destructive [&_svg]:text-destructive":"[&_svg]:text-muted-foreground",l),children:[r,e("span",{className:"min-w-0 flex-1 truncate",children:t}),o]})}
2
+ export{en,G};
@@ -0,0 +1,2 @@
1
+ import{createContext as t,useContext as o}from"react";var ro=t(null);function hn(){let e=o(ro);if(e===null)throw Error("Composer is missing");return e}
2
+ export{ro,hn};
@@ -1,2 +1,2 @@
1
- var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function zo(t,o){let e=/^[^/\\:]+:\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?$/.test(t);if(/^[a-z][a-z\d+.-]*:/i.test(t)&&!e||s(t))return t;if(t.startsWith("www."))return`https://${t}`;if(o===null)throw Error("The conversation's directory is unavailable");return`${encodeURI(o.replace(/[\\/]$/,"")).replaceAll(/[?#]/g,encodeURIComponent)}/${t}`}function St(t,o){let e=zo(t,o),n;if(/^file:/i.test(e)){let r=new URL(e);if(n=decodeURIComponent(r.pathname),/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(r.hostname&&r.hostname!=="localhost")n=`//${r.hostname}${n}`}else if(s(e))try{n=decodeURI(e)}catch(r){if(!(r instanceof URIError))throw r;n=e}else return null;return n.replace(l,"")}function Ur(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function Br(t,o){if(/^file:/i.test(t)){let e=new URL(t),n=decodeURIComponent(e.pathname);if(/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(e.hostname&&e.hostname!=="localhost")n=`//${e.hostname}${n}`;return n}if(s(t))return t;if(o===null)throw Error("The conversation's directory is unavailable");return`${o.replace(/[\\/]$/,"")}/${t}`}
2
- export{zo,St,Ur,Br};
1
+ var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function Bo(t,o){let e=/^[^/\\:]+:\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?$/.test(t);if(/^[a-z][a-z\d+.-]*:/i.test(t)&&!e||s(t))return t;if(t.startsWith("www."))return`https://${t}`;if(o===null)throw Error("The conversation's directory is unavailable");return`${encodeURI(o.replace(/[\\/]$/,"")).replaceAll(/[?#]/g,encodeURIComponent)}/${t}`}function Ot(t,o){let e=Bo(t,o),n;if(/^file:/i.test(e)){let r=new URL(e);if(n=decodeURIComponent(r.pathname),/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(r.hostname&&r.hostname!=="localhost")n=`//${r.hostname}${n}`}else if(s(e))try{n=decodeURI(e)}catch(r){if(!(r instanceof URIError))throw r;n=e}else return null;return n.replace(l,"")}function Xr(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function Yr(t,o){if(/^file:/i.test(t)){let e=new URL(t),n=decodeURIComponent(e.pathname);if(/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(e.hostname&&e.hostname!=="localhost")n=`//${e.hostname}${n}`;return n}if(s(t))return t;if(o===null)throw Error("The conversation's directory is unavailable");return`${o.replace(/[\\/]$/,"")}/${t}`}
2
+ export{Bo,Ot,Xr,Yr};
@@ -1,2 +1,2 @@
1
- import{useId as a}from"react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function cs(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Claude"}),l("path",{fill:"#D97757",fillRule:"nonzero",d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})]})}function Gn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"DeepSeek"}),l("path",{fill:"#4D6BFE",d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})]})}function zn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Grok"}),l("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})]})}function Vn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"OpenRouter"}),l("path",{d:"M2 7h3.5c1.6 0 2.6.5 3.6 1.7l3 3.6c1 1.2 2 1.7 3.6 1.7H20"}),l("path",{d:"M2 17h3.5c1.6 0 2.6-.5 3.6-1.7l3-3.6c1-1.2 2-1.7 3.6-1.7H20"}),l("path",{d:"M17.5 4.5L21 7l-3.5 2.5M17.5 14.5L21 17l-3.5 2.5"})]})}var r="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z";function jn(e){let o=a().replaceAll(":","");return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Qwen"}),l("path",{d:r,fill:`url(#${o})`,fillRule:"nonzero"}),l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[l("stop",{offset:"0%",stopColor:"#6336E7",stopOpacity:".84"}),l("stop",{offset:"100%",stopColor:"#6F69F7",stopOpacity:".84"})]})})]})}function ds(e){return l("svg",{viewBox:"-3 -3 30 30",fill:"currentColor",...e,children:l("path",{d:"M1.5 1.5h21v21h-7v-7h-7v-7h-7zM1.5 15.5h7v7h-7z"})})}function us(e){return l("svg",{fill:"currentColor",fillRule:"evenodd",height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:l("path",{d:"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"})})}function ps(e){let o=a();return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100.182%",y1:"50.057%",y2:"50.057%",children:[l("stop",{offset:"0%",stopColor:"#E2167E"}),l("stop",{offset:"100%",stopColor:"#FE603C"})]})}),l("path",{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z",fill:`url(#${o})`,fillRule:"nonzero"})]})}function ms(e){return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("path",{d:"M19.44 10.153l-2.936 11.586a.215.215 0 00.214.261h5.87a.215.215 0 00.214-.261l-2.95-11.586a.214.214 0 00-.412 0zM3.28 12.778l-2.275 8.96A.214.214 0 001.22 22h4.532a.212.212 0 00.214-.165.214.214 0 000-.097l-2.276-8.96a.214.214 0 00-.41 0z",fill:"#00E5E5"}),l("path",{d:"M7.29 5.359L3.148 21.738a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.358a.214.214 0 00-.41 0z",fill:"#006EFF"}),l("path",{d:"M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.216.216 0 00.171-.078.214.214 0 00.044-.183L14.439.15z",fill:"#006EFF"}),l("path",{d:"M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.215.215 0 00.214-.264L10.688 7.741a.214.214 0 00-.41 0z",fill:"#00E5E5"})]})}
2
- export{cs,Gn,zn,Vn,jn,ds,us,ps,ms};
1
+ import{useId as a}from"react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function Ki(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Claude"}),l("path",{fill:"#D97757",fillRule:"nonzero",d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})]})}function Un(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"DeepSeek"}),l("path",{fill:"#4D6BFE",d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})]})}function Bn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Grok"}),l("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})]})}function Gn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"OpenRouter"}),l("path",{d:"M2 7h3.5c1.6 0 2.6.5 3.6 1.7l3 3.6c1 1.2 2 1.7 3.6 1.7H20"}),l("path",{d:"M2 17h3.5c1.6 0 2.6-.5 3.6-1.7l3-3.6c1-1.2 2-1.7 3.6-1.7H20"}),l("path",{d:"M17.5 4.5L21 7l-3.5 2.5M17.5 14.5L21 17l-3.5 2.5"})]})}var r="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z";function zn(e){let o=a().replaceAll(":","");return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Qwen"}),l("path",{d:r,fill:`url(#${o})`,fillRule:"nonzero"}),l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[l("stop",{offset:"0%",stopColor:"#6336E7",stopOpacity:".84"}),l("stop",{offset:"100%",stopColor:"#6F69F7",stopOpacity:".84"})]})})]})}function Wi(e){return l("svg",{viewBox:"-3 -3 30 30",fill:"currentColor",...e,children:l("path",{d:"M1.5 1.5h21v21h-7v-7h-7v-7h-7zM1.5 15.5h7v7h-7z"})})}function Zi(e){return l("svg",{fill:"currentColor",fillRule:"evenodd",height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:l("path",{d:"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"})})}function Qi(e){let o=a();return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100.182%",y1:"50.057%",y2:"50.057%",children:[l("stop",{offset:"0%",stopColor:"#E2167E"}),l("stop",{offset:"100%",stopColor:"#FE603C"})]})}),l("path",{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z",fill:`url(#${o})`,fillRule:"nonzero"})]})}function Ji(e){return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("path",{d:"M19.44 10.153l-2.936 11.586a.215.215 0 00.214.261h5.87a.215.215 0 00.214-.261l-2.95-11.586a.214.214 0 00-.412 0zM3.28 12.778l-2.275 8.96A.214.214 0 001.22 22h4.532a.212.212 0 00.214-.165.214.214 0 000-.097l-2.276-8.96a.214.214 0 00-.41 0z",fill:"#00E5E5"}),l("path",{d:"M7.29 5.359L3.148 21.738a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.358a.214.214 0 00-.41 0z",fill:"#006EFF"}),l("path",{d:"M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.216.216 0 00.171-.078.214.214 0 00.044-.183L14.439.15z",fill:"#006EFF"}),l("path",{d:"M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.215.215 0 00.214-.264L10.688 7.741a.214.214 0 00-.41 0z",fill:"#00E5E5"})]})}
2
+ export{Ki,Un,Bn,Gn,zn,Wi,Zi,Qi,Ji};
@@ -0,0 +1,2 @@
1
+ import{O}from"./chunk-c13rnm7b.js";import{ye}from"./chunk-swqbbw8q.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function os({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(O,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ye,{entries:t.entries})}
2
+ export{os};
@@ -1,2 +1,2 @@
1
- var S={ar:{},de:{},en:{defaultFavorites:"Favorites",addTo:"Favorite",addToNamedCollection:"Save to {{name}}",collectionName:"Collection name",clearCollection:"Clear collection",deleteCollection:"Delete collection",confirmCollectionChange:"Remove the records in “{{name}}”? Conversation content and records in other collections will be kept.",favorite:"Add to default collection",removeFromAll:"Remove from all collections",newCollection:"Create Collection",defaultName:"New collection",closeChat:"Close chat",remove:"Remove",addToCollection:"Favorite",moveTo:"Move to",removeFromGroup:"Remove from group",openSideBySide:"Open side by side",newChat:"New chat",defaultChatTitle:"New chat",title:"Collections",confirm:"Confirm",cancel:"Cancel",emoji:"Emoji",more:"More actions for {{name}}",unavailable:"Chat unavailable",retry:"Retry",rename:"Rename"},es:{},fr:{},hi:{},id:{},it:{},ja:{},ko:{},"pt-BR":{},ru:{},"zh-CN":{defaultFavorites:"收藏夹",addTo:"收藏",addToNamedCollection:"收藏到{{name}}",collectionName:"集合名称",clearCollection:"清空集合",deleteCollection:"删除集合",confirmCollectionChange:"移除“{{name}}”中的记录?对话内容和其他集合中的记录将保留。",favorite:"添加到默认集合",removeFromAll:"从所有集合移除",newCollection:"创建集合",defaultName:"新集合",closeChat:"关闭对话",remove:"移除",addToCollection:"收藏",moveTo:"移动到",removeFromGroup:"移出分组",openSideBySide:"并排打开",newChat:"新对话",defaultChatTitle:"新对话",title:"收藏",confirm:"确认",cancel:"取消",emoji:"表情",more:"{{name}}的更多操作",unavailable:"会话不可用",retry:"重试",rename:"重命名"}};
2
- export{S};
1
+ var T={ar:{},de:{},en:{defaultFavorites:"Favorites",addTo:"Favorite",addToNamedCollection:"Save to {{name}}",collectionName:"Collection name",clearCollection:"Clear collection",deleteCollection:"Delete collection",confirmCollectionChange:"Remove the records in “{{name}}”? Conversation content and records in other collections will be kept.",favorite:"Add to default collection",removeFromAll:"Remove from all collections",newCollection:"Create Collection",defaultName:"New collection",closeChat:"Close chat",remove:"Remove",addToCollection:"Favorite",moveTo:"Move to",removeFromGroup:"Remove from group",openSideBySide:"Open side by side",newChat:"New chat",defaultChatTitle:"New chat",title:"Collections",confirm:"Confirm",cancel:"Cancel",emoji:"Emoji",more:"More actions for {{name}}",unavailable:"Chat unavailable",retry:"Retry",rename:"Rename"},es:{},fr:{},hi:{},id:{},it:{},ja:{},ko:{},"pt-BR":{},ru:{},"zh-CN":{defaultFavorites:"收藏夹",addTo:"收藏",addToNamedCollection:"收藏到{{name}}",collectionName:"集合名称",clearCollection:"清空集合",deleteCollection:"删除集合",confirmCollectionChange:"移除“{{name}}”中的记录?对话内容和其他集合中的记录将保留。",favorite:"添加到默认集合",removeFromAll:"从所有集合移除",newCollection:"创建集合",defaultName:"新集合",closeChat:"关闭对话",remove:"移除",addToCollection:"收藏",moveTo:"移动到",removeFromGroup:"移出分组",openSideBySide:"并排打开",newChat:"新对话",defaultChatTitle:"新对话",title:"收藏",confirm:"确认",cancel:"取消",emoji:"表情",more:"{{name}}的更多操作",unavailable:"会话不可用",retry:"重试",rename:"重命名"}};
2
+ export{T};
@@ -0,0 +1,2 @@
1
+ import{createStore as I}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function w(a){return a.interface?.displayName??a.name}function v(a){let g={},i=new Map,r=new Map;for(let c of a.data){for(let o of c.skills)if(i.set(o.path,o),o.scope==="repo"){let p=g[c.cwd]??[];if(!p.includes(o.path))p.push(o.path);g[c.cwd]=p}for(let o of c.errors)r.set(o.path,o)}return{skills:[...i.values()],errors:[...r.values()],projects:g}}function A(a){let g=[];for(let i of a.marketplaces)for(let r of i.plugins)if(r.installed)g.push({plugin:r,marketplace:i});return g.toSorted((i,r)=>(r.plugin.installedAt??0)-(i.plugin.installedAt??0))}function ei(a){let{plugin:g,marketplace:i}=a;return{installAttemptId:crypto.randomUUID(),pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function N(a){let{plugin:g,marketplace:i}=a;return{pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function qt(a,g){let i=g??{t:(e)=>e},r=(e,l)=>i.t(e,l),c=(e)=>i.notify?.(e),o=(e)=>{if(i.reportError)i.reportError(Error(e));else console.error(e)},p=null,b=null,d=(e)=>S.setState(e),m=()=>S.getState(),y=async(e=!1)=>{if(await m().refresh(void 0,{forceRefetch:e,background:!0}),m().error)throw Error(r("plugins.toast.syncError",{message:m().error}))},f=(e,l)=>d((n)=>{let s={...n.busyIds};if(l===null)delete s[e];else s[e]=l;return{busyIds:s}}),h=(e,l)=>d((n)=>{let s={...n.busyMarketplaces};if(l)s[e]=!0;else delete s[e];return{busyMarketplaces:s}}),R=I({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=m().cwds,l={})=>{let n=l.forceRefetch===!0||p?.forceRefetch===!0,s=l.catalog!==!1||n||p?.catalog===!0;if(p={cwds:e,forceRefetch:n,catalog:s},d({cwds:e,...!l.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(p){let t=p;p=null,d({error:null});try{let[u,P,M]=await Promise.all([a.listSkills(t.cwds,t.forceRefetch),t.catalog?a.listPlugins({...t.cwds.length>0?{cwds:t.cwds}:{},...t.forceRefetch?{forceRefetch:!0}:{}}):null,a.installedPlugins(t.cwds)]);if(p)continue;let E=v(u);d({loadedScope:JSON.stringify(t.cwds),skills:E.skills,skillProjects:E.projects,skillErrors:E.errors,...P?{marketplaces:P.marketplaces,marketplaceLoadErrors:P.marketplaceLoadErrors,featuredPluginIds:P.featuredPluginIds}:{},installed:A(M)})}catch(u){if(!p)d({error:k(u)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in m().busyIds)throw Error("Plugin operation already in progress");let l=w(e.plugin);f(e.plugin.id,"installing");try{let n=await a.installPlugin(ei(e));return await y(),f(e.plugin.id,null),c(r("plugins.toast.installed",{pluginName:l})),n}catch(n){throw o(`${r("plugins.toast.installError")}: ${k(n)}`),n}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,l)=>{if(e.id in m().busyIds)return;f(e.id,"toggling");let n=(t)=>d((u)=>({installed:u.installed.map((P)=>P.plugin.id===e.id?{...P,plugin:{...P.plugin,enabled:t}}:P)}));n(l);let s=e.enabled;try{let t=await a.setPluginEnabled(e.id,l);s=t.enabled,n(t.enabled),await y();let u=m().installed.find((P)=>P.plugin.id===e.id);if(u)s=u.plugin.enabled;if(!u||s!==l)throw Error(r("plugins.toast.toggleNotApplied"));f(e.id,null),c(r(l?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:w(e)}))}catch(t){n(s),o(`${r("plugins.toast.toggleError")}: ${k(t)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in m().busyIds)return;let l=w(e);f(e.id,"uninstalling");try{let n=e.source.type==="remote"?e.remotePluginId:e.id;if(!n)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(n),await y(),m().installed.some((s)=>s.plugin.id===e.id))throw Error(r("plugins.toast.uninstallNotApplied"));f(e.id,null),c(r("plugins.toast.uninstalled",{pluginName:l}))}catch(n){o(`${r("plugins.toast.uninstallError")}: ${k(n)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(N(e))).plugin,setSkillEnabled:async(e,l)=>{if(e.path in m().busySkills)return;d((s)=>({busySkills:{...s.busySkills,[e.path]:!0}})),d((s)=>({skills:s.skills.map((t)=>t.path===e.path?{...t,enabled:l}:t)}));let n=e.interface?.displayName??e.name;try{let s=await a.setSkillEnabled({path:e.path,enabled:l});if(d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:s.effectiveEnabled}:u)})),s.effectiveEnabled!==l){o(r("plugins.catalog.toggleNotApplied"));return}c(r(l?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:n}))}catch(s){d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:e.enabled}:u)})),o(`${r("plugins.skills.toggleError")}: ${k(s)}`)}finally{d((s)=>{let t={...s.busySkills};return delete t[e.path],{busySkills:t}})}},addMarketplace:async(e)=>{let l=await a.addMarketplace(e);return await y(!0),c(l.alreadyAdded?r("plugins.marketplace.alreadyAdded",{marketplaceName:l.marketplaceName}):r("plugins.marketplace.added",{marketplaceName:l.marketplaceName})),l},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),c(r("plugins.marketplace.removed",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.removeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let l=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),l.errors.length>0)o(`${r("plugins.marketplace.upgradeError")}: ${l.errors.map((n)=>n.message).join("; ")}`);else c(r("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.upgradeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(m().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(r("plugins.marketplace.upgradeAllError"));else c(r("plugins.marketplace.upgradedAll"))}catch(e){o(`${r("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(R,{bindHost:(e)=>{i=e}});return S}
2
+ export{ei,qt};
@@ -0,0 +1,2 @@
1
+ import{Ln,po}from"./chunk-6z3fgkkp.js";import{$i,te}from"./chunk-n6erf29r.js";import{ao}from"./chunk-e13mpwt8.js";import{En}from"./chunk-nrpgmawz.js";import{zi,lo}from"./chunk-x8rfc6wc.js";import{Gi}from"./chunk-q7jm6srr.js";import{Nn}from"./chunk-jn8b4qrh.js";import{fe}from"./chunk-rd9cgt8p.js";import{ot,Ge}from"./chunk-621eg04b.js";import{co}from"./chunk-bw3bpr6m.js";import{Bi}from"./chunk-ad53zbdb.js";import{ge,An}from"./chunk-7tw7rn0m.js";import{CodexClient as M,configRevisionOf as O,isBooleanOption as S,isGroupedSelect as v,isImage as R,isSelectOption as g,mergeMeta as f,runStateSource as C}from"@nyssance/codex-acp-v2/client";var b={id:"chatgpt",name:"ChatGPT"};function y(e){return e===null?void 0:{alwith:{model:e}}}function h(e){let t=e.find((s)=>s.category==="model"&&s.type==="select");return t?.type==="select"&&typeof t.currentValue==="string"?t.currentValue:null}class Ui extends M{applicationRegistry=new po((e)=>this.holds(e)?this.session(e):void 0);toolSelection;async executeShell(e,t){let s=this.session(e);if(!s.attached||s.restoring||s.readOnly||s.state!=="idle")throw Error("The session is not ready for a shell command");await this.codexCapabilities.executeShell(e,t),this.materializeDraft(e)}modelListeners=new Set;confirmedModelListeners=new Set;savedModels={main:null,chat:null};slotModels={main:null,chat:null};slotTargets={main:null,chat:null};slotVersions={main:0,chat:0};draftDirectoryIntents=new Map;draftOperations=new Map;gatewayModels=new Map;configOwners=new Map;openingOwners=new Map;schedulingConfig=new Set;replayRepairs=new Map;accountRevocations=new Map;accountRecoveries=new Map;resolveModelOption;constructor(e,t){let{applicationTools:s=[],resolveModel:i,imageService:n,...o}=t;super(e,o,{sessionWindows:{},draftSessions:{},modelRecovery:{},nativeModels:[]});this.toolSelection=s,this.resolveModelOption=i,this.imageService=n,this.imageTool=n?Gi(n,(a)=>this.imageRequests.get(a)):void 0}imageTool;imageService;inputModes=new Map;inputSelections=new Map;async readInputConfig(e){let t=this.live(),s=await t.request("_codex/session_input_config_get",{sessionId:e});if(t!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,s)}async writeInputConfig(e,t){let s=this.live(),i=await s.request("_codex/session_input_config_set",{sessionId:e,inputConfig:t});if(s!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,i)}acceptInputConfig(e,t){let s=Nn(t,e);this.inputModes.delete(e),this.inputSelections.delete(e);let i=s.inputConfig;if(i&&ot(i.mode)){if(Ge(i.mode).parseConfig(i.config),this.inputModes.set(e,i.mode),i.mode==="image")this.inputSelections.set(e,fe.parseConfig(i.config))}return s}imageRequests=new Map;prompt(e,t,s={}){if(!this.imageService)return super.prompt(e,t,s);if(!this.inputModes.has(e))return this.imageService.inputMode(e).then((i)=>(this.inputModes.set(e,i),this.prompt(e,t,s)));return Ge(this.inputModes.get(e)).routePrompt({native:()=>super.prompt(e,t,{...s,meta:f(s.meta,{alwith:{imageIntent:null,applicationContext:Ge("chat").applicationContext(null)}})}),image:()=>this.promptImage(e,t,s)})}promptImage(e,t,s){if(!this.imageService)throw Error("Image service is not connected");lo(s.meta?.alwith?.imageAspectRatio);let i=s.meta?.alwith?.imageSelection;if(i!==void 0)te(i);let n=i??this.inputSelections.get(e)??this.imageService.selection(),o={...this.session(e).state!=="idle"?this.imageRequests.get(e)?.selection??n:n};te(o);let a=crypto.randomUUID();return this.promptImages.set(a,new Map(t.flatMap((r,c)=>R(r)?[[`attachment:${c}`,`data:${r.mimeType};base64,${r.data}`]]:[]))),super.prompt(e,t,{...s,meta:f(s.meta,{alwith:{imageSelection:o,imageRequestId:a,applicationContext:fe.applicationContext(s.meta?.alwith?.imageIntent??"generate",zi),imageIntent:s.meta?.alwith?.imageIntent??"generate"}})}).finally(()=>this.promptImages.delete(a))}promptMeta(e,t){let s=t.meta?.alwith?.imageSelection;if(this.inputModes.get(e)==="image"&&s&&this.imageService&&(this.session(e).state==="idle"||!this.imageRequests.has(e))){let i=new Map($i(this.session(e)).map((o)=>[o.id,o.src]));for(let[o,a]of this.promptImages.get((t.meta?.alwith).imageRequestId)??[])i.set(o,a);let n=lo((t.meta?.alwith).imageAspectRatio);this.imageRequests.set(e,{selection:s,references:i,...n?{aspect:n}:{}})}return co(super.promptMeta(e,t))}promptImages=new Map;promptWithImages(e,t,s={}){return this.prompt(e,t,{...s,meta:f({alwith:{imageIntent:"generate"}},s.meta)})}async applicationToolsFor(e){let t=typeof this.toolSelection==="function"?await this.toolSelection(e):this.toolSelection,s=e.options.meta?.alwith;return[...t,...e.options.applicationTools??[],...s?.nativeTools?.imageGeneration===!1&&this.imageTool?[this.imageTool]:[]]}releaseImages(e){this.imageRequests.delete(e)}onDisconnected(){for(let e of this.imageRequests.keys())this.releaseImages(e);this.promptImages.clear(),this.applicationRegistry.clear(),super.onDisconnected(),this.setApp({nativeModels:[]})}async cancel(e){this.releaseImages(e),this.applicationRegistry.cancel(e),await super.cancel(e)}async close(e){this.releaseImages(e),this.applicationRegistry.drop(e),await super.close(e)}async stopSession(e){this.releaseImages(e),this.applicationRegistry.drop(e);let t=this.state.draftSessions[e];if(t===void 0)return super.stopSession(e);await this.changeDraft([t],()=>this.state.draftSessions[e]?super.close(e):super.stopSession(e))}setApp(e){this.store.setState(e)}applyRunStates(e,t="event"){let s=this.state.runStates,i=e.map((n)=>{let o=s[n.sessionId];return o&&JSON.stringify(o)===JSON.stringify(n)?o:n});if(C(s)===t&&i.length===Object.keys(s).length&&i.every((n)=>n===s[n.sessionId]))return;super.applyRunStates(i,t)}enqueueSession(e,t,s=!0){let i=!s&&!this.schedulingConfig.has(e);return super.enqueueSession(e,()=>{let n=()=>{let r=this.holds(e)?h(this.session(e).configOptions):null;return t().then(async(c)=>{if(this.holds(e)&&h(this.session(e).configOptions)!==r)await this.normalizeCustomEffort(e,!0);return c})},o=()=>{let r=i?this.normalizeCustomEffort(e,!1):void 0;return r?r.then(n):n()},a=s?void 0:this.replayRepairs.get(e)?.promise;return a?a.then(o):o()},s)}customEffortChange(e,t,s=!1,i){if(!this.holds(e))return;let n=this.session(e);if(!n.attached||n.readOnly)return;let o=h(n.configOptions),a=ao(o);if(!a)return;let r=n.configOptions.find((p)=>p.category==="thought_level"&&g(p)),c,d;if(r&&g(r)){let p=v(r.options)?r.options.flatMap((l)=>l.options):r.options;if(r.currentValue===a.value||!t&&p.some((l)=>l.value===r.currentValue))return;if(!p.some((l)=>l.value===a.value))throw Error(`The model does not advertise its default effort: ${o}`);c=r.configId,d=!t&&i!==void 0&&p.some((l)=>l.value===i)?i:a.value}else{if(!a.hidden||!s||o===null)return;let p=n.configOptions.find((l)=>l.category==="model");if(!p)throw Error("The custom model has no model option");c=p.configId,d=o}return{configId:c,value:d}}normalizeCustomEffort(e,t,s=!1,i){let n=this.customEffortChange(e,t,s,i);return n?this.writeCustomEffort(e,n.configId,n.value):void 0}async writeCustomEffort(e,t,s){let i=this.live(),n=this.lifecycle.capture(e),o=await i.request("session/set_config_option",{sessionId:e,configId:t,type:"id",value:s});if(i!==this.agent||!this.lifecycle.isCurrent(n))throw Error("Effort configuration belongs to a retired session");this.publishSession({...this.session(e),configOptions:o.configOptions,configRevision:O(o)??this.session(e).configRevision})}async afterSessionCreated(e){await super.afterSessionCreated(e);try{await super.enqueueSession(e,async()=>this.normalizeCustomEffort(e,!0,!0),!1)}catch(t){try{await this.delete(e)}catch(s){throw AggregateError([t,s],"Failed to initialize and clean up the custom model session",{cause:s})}throw t}}replay(e,t,s){let i=this.replayRepairs.get(e);if(i?.cwd===t)return i.promise;let n=this.replayWithEffort(e,t,s);this.replayRepairs.set(e,{cwd:t,promise:n});let o=()=>{if(this.replayRepairs.get(e)?.promise===n)this.replayRepairs.delete(e)};return n.then(o,o),n}async replayWithEffort(e,t,s){let i=this.holds(e)?this.session(e).configOptions:[],n=i.find((a)=>a.category==="thought_level")?.currentValue;await super.replay(e,t,s);let o=this.lifecycle.capture(e);try{await this.normalizeCustomEffort(e,!1,!0,h(i)===h(this.session(e).configOptions)&&typeof n==="string"?n:void 0)}catch(a){if(this.holds(e)&&this.lifecycle.isCurrent(o))this.publishSession({...this.session(e),attached:!1,restoring:!1});throw a}}async connect(){if(await super.connect(),this.state.projectContext===null)await this.refreshProjectContext()}async listProjectSessions(e){await this.listSessions();let t=this.projectPath(e),s=this.sessionGroup({cwd:t}).id;return this.state.sessionList.filter((i)=>this.sessionGroup(i).id===s)}async newSession(e,t=null,s="main"){if(t!==null&&typeof t==="object")return super.newSession(e,t);let i=++this.slotVersions[s],n=await this.createNativeSession(e,await this.resolveModel(t),null);return this.activateSlot(s,n,i),n}async createNativeSession(e,t,s,i="chat"){let n=await super.newSession(e,{draft:s!==null,meta:f(y(t),this.imageService||s!==null?{alwith:{...this.imageService?{inputMode:i}:{},...s===null?{}:{draft:!0}}}:void 0)});if(s!==null)this.draftDirectoryIntents.set(n,e),this.setApp((o)=>({draftSessions:{...o.draftSessions,[n]:s}}));return this.noteModel(this.session(n)),n}async open(e,t,s="main"){if(typeof s!=="string")return super.open(e,t,s);if(s==="chat"&&this.imageService&&(this.inputModes.get(e)??await this.imageService.inputMode(e))==="image")throw Error("Image conversations must be opened in the main window");this.bindSlot(s,e),++this.slotVersions[s];let i=this.holds(e)?this.session(e):void 0;if(i?.attached&&(!this.imageService||this.inputModes.has(e))&&!i.restoring&&!i.readOnly&&!this.lifecycle.operations.busy(e)&&!this.replayRepairs.has(e)){this.followModel(s,i);return}await this.replayForOwner(e,t,s)}async replayForOwner(e,t,s){this.openingOwners.set(e,s);try{await this.replay(e,t)}finally{if(this.openingOwners.get(e)===s)this.openingOwners.delete(e)}}async requestContext(e,t,s){if(this.imageService){let i=t.kind==="resume"?t.sessionId:t.kind==="fork"?t.sourceSessionId:null,n=i===null?s.meta?.alwith?.inputMode??"chat":await this.imageService.inputMode(i),o=Ge(n),a=co(s.meta),r={...a?.alwith,nativeTools:o.nativeTools};delete r.tools;let c=await this.requestModelContext(e,t,{...s,meta:{...a,alwith:r}});return{...c,bind:async(d)=>{await c.bind?.(d),this.inputModes.set(d,n)}}}return this.requestModelContext(e,t,s)}async requestModelContext(e,t,s){if(t.kind!=="resume"||s.meta?.alwith?.model!==void 0)return this.requestToolContext(e,t,s);let i=t.sessionId,n=this.holds(i)?this.session(i):void 0,o=(n?h(n.configOptions):null)??this.gatewayModels.get(i)??null,a=await this.resolveModel(o),r=o===null?null:a;return this.requestToolContext(e,t,{...s,meta:f(y(r),s.meta)})}async requestToolContext(e,t,s){let i=(await this.applicationToolsFor({cwd:e,operation:t,options:s})).map((r)=>({...r,inputSchema:structuredClone(r.inputSchema)})),n=await super.requestContext(e,t,s),o=Ln(i),a=n._meta?.alwith;if(i.length&&a?.tools!==void 0)throw Error("Application tools must be registered through the client");return{...n,...i.length?{_meta:{...n._meta,alwith:{...a,tools:o}}}:{},bind:async(r)=>{await n.bind?.(r),this.applicationRegistry.bind(r,i,o.revision)}}}acceptsPendingRequest(e){return e.method!=="_alwith/tool/call"&&super.acceptsPendingRequest(e)}handleNotification(e,t){if(e==="$/cancel_request"&&this.applicationRegistry.withdraw(t?.requestId))return!0;return super.handleNotification(e,t)}handleAgentRequest(e,t){return this.applicationRegistry.handle(e,t)||super.handleAgentRequest(e,t)}async installedApps(e){let t=this.live(),s=await super.installedApps(e),i=await Bi((n,o)=>t.request(n,o),s.apps.map((n)=>n.id),e?.threadId);if(t!==this.live())throw Error("Application metadata belongs to a disconnected agent");return{apps:s.apps.map((n)=>({...n,...i.get(n.id)}))}}async recoverReplay(e,t,s,i){let n=ge(s);if(!n&&!An(s))return super.recoverReplay(e,t,s,i);try{await super.afterResume(e,t,i)}catch(o){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;this.setApp((a)=>({historyPages:{...a.historyPages,[e]:{cursor:null,loading:!1,error:o instanceof Error?o.message:String(o)}}}))}if(n){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!1,error:{stopReason:"error",error:{code:-32000,message:s.reason??s.message,data:s.data},meta:null}}),!0}if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.accountRevocations.set(e,(this.accountRevocations.get(e)??0)+1),this.setApp((o)=>({modelRecovery:{...o.modelRecovery,[e]:!0}})),this.publishSession({...this.session(e),cwd:t,attached:!1,restoring:!1,readOnly:!0}),!0}markAccountModelsUnavailable(e){this.setApp((t)=>({modelRecovery:{...t.modelRecovery,...Object.fromEntries(e.map((s)=>[s,!0]))}}));for(let t of e){if(this.accountRevocations.set(t,(this.accountRevocations.get(t)??0)+1),!this.holds(t))continue;this.publishSession({...this.session(t),attached:!1,readOnly:!0})}}async resumeModel(e,t){let s=this.session(e);if(!this.state.modelRecovery[e]&&(s.attached||!ge(s.error?.error)))throw Error("Model recovery is not required");if(!t)throw Error("Select a model before continuing");let i=this.accountRevocations.get(e)??0,n=await this.resolveModel(t);if(!n)throw Error("The selected provider connection or model is unavailable");if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");this.accountRecoveries.set(e,i);try{await this.replay(e,s.cwd,{meta:{alwith:{model:n,accountModelSelection:!0}}})}catch(a){if(this.holds(e)&&this.state.modelRecovery[e])this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!0});throw a}finally{this.accountRecoveries.delete(e)}if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");let o=this.session(e);if(!o.attached||o.readOnly)throw Error(o.error?.error?.message??"Cannot resume this conversation");this.accountRevocations.delete(e),this.setApp((a)=>{let{[e]:r,...c}=a.modelRecovery;return{modelRecovery:c}}),this.confirmModel(this.state.sessionWindows[e]??"main",o)}setConfig(e,t,s,i="main"){this.configOwners.set(`${e}:${t}`,i),this.schedulingConfig.add(e);try{return super.setConfig(e,t,s)}finally{this.schedulingConfig.delete(e)}}onConfigChanged(e,t,s){super.onConfigChanged(e,t,s),this.noteModel(this.session(e));let i=this.configOwners.get(`${e}:${t}`)??"main";if(this.configOwners.delete(`${e}:${t}`),s.configOptions.some((n)=>n.configId===t&&n.category==="model"))this.confirmModel(i,this.session(e))}changeDraft(e,t){let s=Promise.allSettled(e.map((i)=>this.draftOperations.get(i)).filter((i)=>i!==void 0)).then(t);for(let i of e)this.draftOperations.set(i,s);return s}prepareDraft(e,t,s=null,i=!1,n="chat"){if(e==="chat"&&n!=="chat")throw Error("The floating chat only supports chat input");let o=++this.slotVersions[e];return this.changeDraft([e],async()=>{let a=t??(await this.refreshProjectContext(!0)).chatDirectory,r=Object.keys(this.state.draftSessions).find((l)=>this.state.draftSessions[l]===e);if(r)await this.lifecycle.admission.pending(r);let c=s??(r?h(this.session(r).configOptions):this.savedModels[e]??this.slotModels[e]),d=i?null:await this.resolveModel(c,s===null?"draft":"session");if(r&&(this.inputModes.get(r)??"chat")===n&&this.session(r).cwd===a&&(!this.draftDirectoryIntents.has(r)||this.draftDirectoryIntents.get(r)===t)&&!i&&!this.state.modelRecovery[r]&&(d===null?!h(this.session(r).configOptions)?.startsWith("gateway:"):h(this.session(r).configOptions)===d)){if(this.activateSlot(e,r,o),!this.session(r).attached)await this.replayForOwner(r,a,e);if(s!==null)this.confirmModel(e,this.session(r));return r}let p=await this.createNativeSession(t,d,e,n);try{if(r&&this.session(r).cwd===a)for(let l of this.session(r).configOptions){if(l.category==="model")continue;if(l.category==="thought_level"&&h(this.session(r).configOptions)!==h(this.session(p).configOptions)&&ao(h(this.session(p).configOptions))!==null)continue;let u=this.session(p).configOptions.find((w)=>w.configId===l.configId);if(!u||u.currentValue===l.currentValue)continue;if(S(l)&&S(u))await this.setConfig(p,l.configId,l.currentValue);else if(g(l)&&g(u)){if((v(u.options)?u.options.flatMap((m)=>m.options):u.options).some((m)=>m.value===l.currentValue))await this.setConfig(p,l.configId,l.currentValue)}}if(r)await this.deleteEmptyDraft(r)}catch(l){throw await this.deleteEmptyDraft(p),l}if(this.activateSlot(e,p,o),s!==null||i||c!==null&&c!==d)this.confirmModel(e,this.session(p));return p})}discardDraft(e){if(e!=="main"&&e!=="chat")return super.discardDraft(e);return this.changeDraft([e],async()=>{for(let[t,s]of Object.entries(this.state.draftSessions))if(s===e)await this.deleteEmptyDraft(t)})}transferDraft(e,t){return this.changeDraft(["main","chat"],async()=>{if(t==="chat"&&this.inputModes.get(e)==="image")throw Error("Image conversations must remain in the main window");if(!this.state.draftSessions[e]||this.state.draftSessions[e]===t)return;for(let[s,i]of Object.entries(this.state.draftSessions))if(i===t)await this.deleteEmptyDraft(s);this.setApp((s)=>s.draftSessions[e]?{draftSessions:{...s.draftSessions,[e]:t}}:{})})}deleteEmptyDraft(e){return this.enqueueSession(e,async()=>{if(!this.state.draftSessions[e])return;await this.delete(e),this.gatewayModels.delete(e)})}onDraftMaterialized(e){super.onDraftMaterialized(e),this.draftDirectoryIntents.delete(e),this.setApp((t)=>{let{[e]:s,...i}=t.draftSessions;return{draftSessions:i}}),this.noteModel(this.session(e))}onSessionDropped(e){this.applicationRegistry.drop(e),super.onSessionDropped(e),this.inputModes.delete(e),this.inputSelections.delete(e),this.draftDirectoryIntents.delete(e),this.gatewayModels.delete(e),this.accountRevocations.delete(e),this.accountRecoveries.delete(e),this.setApp((t)=>{let{[e]:s,...i}=t.draftSessions,{[e]:n,...o}=t.sessionWindows,{[e]:a,...r}=t.modelRecovery;return{draftSessions:i,sessionWindows:o,modelRecovery:r}})}fork(e,t,s){let i=typeof s==="object"?s:s===void 0?{}:{lastTurnId:s};return super.fork(e,t,i)}async forkInternal(e,t,s){let n=[...(await Promise.all([this.indexSessions(),this.indexSessions(void 0,!0)])).flat(),...this.state.sessionList,...this.state.archivedSessions],o=(this.holds(e)?this.session(e).title:null)??n.find((c)=>c.sessionId===e)?.title,a=await super.forkInternal(e,t,{...s,meta:f(y(this.gatewayModels.get(e)??null),s.meta)});await super.enqueueSession(a,async()=>this.normalizeCustomEffort(a,!1,!0),!1);let r=o??this.session(a).title;if(r)await this.renameSession(a,En(r,n.flatMap((c)=>c.title?[c.title]:[])));return a}onForked(e,t){super.onForked(e,t),this.noteModel(this.session(e))}onReplayed(e,t){super.onReplayed(e,t);let s=this.accountRevocations.get(e);if(s!==void 0&&this.accountRecoveries.get(e)!==s)this.markAccountModelsUnavailable([e]);this.noteModel(this.session(e))}setModelSelections(e){this.savedModels={...e},this.slotModels={...e}}onConfirmedModel(e){return this.confirmedModelListeners.add(e),()=>this.confirmedModelListeners.delete(e)}onSessionChanged(e){super.onSessionChanged(e);let t=this.accountRevocations.get(e.id);if(t!==void 0&&this.accountRecoveries.get(e.id)!==t&&(e.attached||!e.readOnly)){this.publishSession({...e,attached:!1,readOnly:!0});return}this.followModel("main",e),this.followModel("chat",e)}followModel(e,t){if(this.slotTargets[e]!==t.id||!t.attached||t.restoring)return;let s=h(t.configOptions);if(s!==null)this.slotModels[e]=s}activateSlot(e,t,s){if(this.slotVersions[e]!==s)return;this.bindSlot(e,t),this.followModel(e,this.session(t))}bindSlot(e,t){let s=e==="main"?"chat":"main";if(this.slotTargets[s]===t)this.slotTargets[s]=null,++this.slotVersions[s];this.slotTargets[e]=t,this.setApp((i)=>({sessionWindows:{...i.sessionWindows,[t]:e}}))}confirmModel(e,t){let s=h(t.configOptions);if(s===null)throw Error("Model selection did not return the current model");this.followModel(e,t),this.savedModels[e]=s;for(let i of this.confirmedModelListeners)i(e,s)}resolveModel(e,t="session"){return this.resolveModelOption?this.resolveModelOption(e,t):Promise.resolve(e)}onSessionModel(e){return this.modelListeners.add(e),()=>this.modelListeners.delete(e)}noteModel(e){let t=h(e.configOptions);if(t===null)return;let s=e.configOptions.find((n)=>n.category==="model"&&n.type==="select");if(s&&g(s)){let o=(v(s.options)?s.options.find((a)=>a.groupId===b.id)?.options??[]:s.options.filter((a)=>!a.value.startsWith("gateway:"))).map((a)=>({id:a.value,label:a.name}));if(JSON.stringify(o)!==JSON.stringify(this.state.nativeModels))this.setApp({nativeModels:o})}let i=s!==void 0&&g(s)&&s.options.some((n)=>("groupId"in n)&&n.groupId!==b.id&&n.options.some((o)=>o.value===t));if(i)this.gatewayModels.set(e.id,t);else this.gatewayModels.delete(e.id);if(!this.state.draftSessions[e.id])for(let n of this.modelListeners)n(e.id,t,i)}}
2
+ export{b,Ui};
@@ -1,2 +1,2 @@
1
- import{Zr}from"./chunk-e8dzp9xe.js";import{g}from"./chunk-atdygnc5.js";import{cn as v}from"cn";import{PaperclipIcon as k,XIcon as T}from"lucide-react";import{Fragment as M,useEffect as L,useRef as z,useState as P}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as E,HoverCardContent as R,HoverCardTrigger as D}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(R,{align:"start",...t})}function Ir({data:t,t:n,className:l,...m}){let c=g(),[u,f]=P(!1),[I,d]=P(1),C=z(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",A=a||(o?n("input.image"):n("input.attachment"));return L(()=>{if(!u)return;let p=0.1,h=(i)=>Math.min(10,Math.max(0.1,i)),y=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,x=s==="+"||s==="=",H=s==="-"||s==="_",w=s==="0";if(!x&&!H&&!w)return;i.preventDefault(),d((b)=>{if(w)return 1;if(x)return h(b+p);return h(b-p)})};return window.addEventListener("keydown",y,{passive:!1}),()=>window.removeEventListener("keydown",y)},[u]),r(K,{children:[r(E,{children:[e(D,{render:r("div",{className:v("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",l),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(N,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{d(1),f(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(k,{className:"size-3"})}),r(N,{"aria-label":n("input.removeAttachment"),className:v("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(p)=>{p.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(T,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e(Zr,{containerRef:C,filename:a||n("input.image"),onOpenChange:f,onScaleChange:d,open:u,scale:I,url:t.url})]})}function Tr({children:t,className:n,...l}){let m=g();if(!m.files.length)return null;return e("div",{className:v("flex w-full flex-wrap items-center gap-1",n),...l,children:m.files.map((c)=>e(M,{children:t(c)},c.id))})}
2
- export{Ir,Tr};
1
+ import{pr}from"./chunk-p3gawvqr.js";import{g}from"./chunk-sxz82jq3.js";import{cn as v}from"cn";import{PaperclipIcon as k,XIcon as T}from"lucide-react";import{Fragment as M,useEffect as L,useRef as z,useState as P}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as E,HoverCardContent as R,HoverCardTrigger as D}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(R,{align:"start",...t})}function dr({data:t,t:n,className:l,...m}){let c=g(),[u,f]=P(!1),[I,d]=P(1),C=z(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",A=a||(o?n("input.image"):n("input.attachment"));return L(()=>{if(!u)return;let p=0.1,h=(i)=>Math.min(10,Math.max(0.1,i)),y=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,x=s==="+"||s==="=",H=s==="-"||s==="_",w=s==="0";if(!x&&!H&&!w)return;i.preventDefault(),d((b)=>{if(w)return 1;if(x)return h(b+p);return h(b-p)})};return window.addEventListener("keydown",y,{passive:!1}),()=>window.removeEventListener("keydown",y)},[u]),r(K,{children:[r(E,{children:[e(D,{render:r("div",{className:v("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",l),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(N,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{d(1),f(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(k,{className:"size-3"})}),r(N,{"aria-label":n("input.removeAttachment"),className:v("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(p)=>{p.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(T,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e(pr,{containerRef:C,filename:a||n("input.image"),onOpenChange:f,onScaleChange:d,open:u,scale:I,url:t.url})]})}function ur({children:t,className:n,...l}){let m=g();if(!m.files.length)return null;return e("div",{className:v("flex w-full flex-wrap items-center gap-1",n),...l,children:m.files.map((c)=>e(M,{children:t(c)},c.id))})}
2
+ export{dr,ur};
@@ -0,0 +1,2 @@
1
+ import{G}from"./chunk-jp4xjks0.js";import{Ee}from"./chunk-c2ez86jz.js";import{A,me}from"./chunk-yn6a84c7.js";import{V,re}from"./chunk-e00dz09f.js";import{De,pe}from"./chunk-j1frpcqd.js";import{cn as F}from"cn";import{BoxIcon as S,ChevronRightIcon as U,PlusIcon as E,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as M}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as z,DropdownMenuContent as L,DropdownMenuGroup as N,DropdownMenuItem as y,DropdownMenuRadioGroup as j,DropdownMenuRadioItem as _,DropdownMenuSeparator as K,DropdownMenuTrigger as q}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as J}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function pi({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:k=n?"none":void 0,allowRemove:O=!0,submenu:g=!1,className:R,onOpenChange:x}){let{t}=A(),c=pe(),B=me(),T=Ee(),{collections:s,order:C}=De(),i=C.find((o)=>s[o].sessionIds.includes(l)),[H,P]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(P(o),T(o),x?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),B(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(z,{modal:!1,open:H,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(q,{disabled:r,"data-hover-background":k,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(M,{variant:"ghost",size:"icon-sm",className:R,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:F(i!==void 0&&"fill-current")})})}),a(L,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(N,{children:e(j,{value:i??null,children:C.map((o)=>a(_,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===V?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(S,{}),e("span",{className:"min-w-0 flex-1 truncate",children:re(s[o],t)})]},o))})}),e(K,{}),a(N,{children:[a(y,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(E,{}),t("collection.newCollection")]}),O&&i!==void 0&&a(y,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(J,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(M,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Qs({sessionId:l,allowRemove:f=!0}){let{t:n}=A();return e(pi,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(G,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(U,{className:"rtl:rotate-180"})})})}
2
+ export{pi,Qs};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-xdrwsxqy.js";import{kt}from"./chunk-dq7zxw47.js";import{Li,Di,Fi}from"./chunk-fgec4g5x.js";import{pr}from"./chunk-tp7329ny.js";import{ue}from"./chunk-zq7p8m7g.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function Ia(i,n){return{installUnlock:n==="none"?()=>()=>{}:Di,preload:()=>{if(n!=="none")Li(i)},playSequence:(a,d,l)=>Fi(a,d,l,i,n)}}function ui(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:ue(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(kt,{text:i.response,host:a})})]})}function pi(i){return r(pr,{...i,renderPreview:(n)=>r(T,{item:n})})}
2
- export{Ia,ui,pi};
1
+ import{t}from"./chunk-rragk2vb.js";import{Dt}from"./chunk-gxb9n7g7.js";import{zr,Vr,jr}from"./chunk-h5mdgrq6.js";import{Gr}from"./chunk-y3mx5sf0.js";import{xe}from"./chunk-ert67qk1.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function Ha(i,n){return{installUnlock:n==="none"?()=>()=>{}:Vr,preload:()=>{if(n!=="none")zr(i)},playSequence:(a,d,l)=>jr(a,d,l,i,n)}}function Ur(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:xe(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(Dt,{text:i.response,host:a})})]})}function Br(i){return r(Gr,{...i,renderPreview:(n)=>r(T,{item:n})})}
2
+ export{Ha,Ur,Br};
@@ -1,5 +1,5 @@
1
- import{_o}from"./chunk-9ys14ex1.js";import{t}from"./chunk-xdrwsxqy.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function Na(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
- `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function Aa(o){let s=new Map,e=null;for(let n of o.split(`
3
- `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Ea(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?Aa(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=n.patch?Na(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
4
- ${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function Mi({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return c(_o,{files:Ea(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[c(n,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
- export{Na,Aa,Ea,Mi};
1
+ import{Ao}from"./chunk-89j37t04.js";import{t}from"./chunk-rragk2vb.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function Ra(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
+ `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function La(o){let s=new Map,e=null;for(let n of o.split(`
3
+ `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Da(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?La(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=n.patch?Ra(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
4
+ ${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function Tr({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return c(Ao,{files:Da(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[c(n,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
+ export{Ra,La,Da,Tr};
@@ -1,2 +1,2 @@
1
- import{p,Wo}from"./chunk-pae53dz2.js";import{Un}from"./chunk-1dkd8jt0.js";import{useEffect as P,useRef as u,useState as m}from"react";var as="providers:changed",ls="providers:managed-revoked",i=(e)=>e;function Dn(){return{read:()=>i(p.providersRead()),save:(e,r,t)=>i(p.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(p.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(p.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>p.providersTest({providerId:e}),apply:()=>i(p.providersApply()),onChanged:(e)=>Wo[as].listen((r)=>e(r.payload))}}function ra(){return{bind:(e)=>p.providersAccountBind({account:e}),refresh:(e,r)=>i(p.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await p.providersClearManaged()},onRevoked:(e)=>Wo[ls].listen((r)=>e(r.payload.sessionIds))}}async function Fn(e){try{return await e.apply()}catch(r){if(!Un(r))throw r;return e.read()}}function He(e,r=console.error){let[t,d]=m(null),a=u(r);return a.current=r,P(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
2
- export{as,ls,Dn,ra,Fn,He};
1
+ import{p,so}from"./chunk-npkk2gzs.js";import{On}from"./chunk-c2r7xpjf.js";import{useEffect as P,useRef as u,useState as m}from"react";var Fi="providers:changed",Oi="providers:managed-revoked",i=(e)=>e;function Pn(){return{read:()=>i(p.providersRead()),save:(e,r,t)=>i(p.providersSave({providerId:r,input:t,expectedRevision:e})),saveCustom:(e,r)=>i(p.providersSaveCustom({input:r,expectedRevision:e})),removeCustom:(e,r)=>i(p.providersRemoveCustom({providerId:r,expectedRevision:e})),test:(e)=>p.providersTest({providerId:e}),apply:()=>i(p.providersApply()),onChanged:(e)=>so[Fi].listen((r)=>e(r.payload))}}function fa(){return{bind:(e)=>p.providersAccountBind({account:e}),refresh:(e,r)=>i(p.providersRefreshManaged({generation:e,accessToken:r})),clear:async()=>{await p.providersClearManaged()},onRevoked:(e)=>so[Oi].listen((r)=>e(r.payload.sessionIds))}}async function In(e){try{return await e.apply()}catch(r){if(!On(r))throw r;return e.read()}}function Ue(e,r=console.error){let[t,d]=m(null),a=u(r);return a.current=r,P(()=>{let n=!0,v=e.onChanged((o)=>{if(n)d((s)=>s&&s.revision>o.revision?s:o)});return v.then(()=>e.read()).then((o)=>{if(n)d((s)=>s&&s.revision>=o.revision?s:o)}).catch((o)=>{if(n)a.current(o)}),()=>{n=!1,v.then((o)=>o())}},[e]),t}
2
+ export{Fi,Oi,Pn,fa,In,Ue};
@@ -1,2 +1,2 @@
1
- import{co}from"./chunk-rpzv6g89.js";async function Ci(i,c){let s=new WeakSet;while(!c.aborted){let r=[...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 ut(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of co(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<o)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,o-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 o=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+o.length}),r+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){l();return}if(t.tagName==="BR"){l();return}let n=m.has(t.tagName);if(n)l();for(let a of t.childNodes)u(a);if(n)l()};return u(i),l(),s}
2
- export{Ci,ut};
1
+ import{_o}from"./chunk-sjb5stzq.js";async function vr(i,c){let s=new WeakSet;while(!c.aborted){let r=[...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 Nt(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of _o(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<o)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,o-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 o=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+o.length}),r+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){l();return}if(t.tagName==="BR"){l();return}let n=m.has(t.tagName);if(n)l();for(let a of t.childNodes)u(a);if(n)l()};return u(i),l(),s}
2
+ export{vr,Nt};
@@ -1,2 +1,2 @@
1
- function yi(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 xi(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{yi,xi};
1
+ function bs(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 Cs(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{bs,Cs};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-tac30kkh.js";import{Tn,Mn}from"./chunk-6cks2gn2.js";import{T}from"./chunk-1dkd8jt0.js";import{ChevronDownIcon as h}from"lucide-react";import{useId as x,useState as v}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as A,CollapsibleContent as M,CollapsibleTrigger as I}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Input as N}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Xs({providers:n,store:l}){let{t:m}=e().host,d=Tn(l);if(!n.some((s)=>s.models.length))return null;return i(A,{children:[i(I,{render:t(b,{variant:"ghost",size:"sm"}),children:[m("provider.managed.aliases"),t(h,{className:"size-4"})]}),i(M,{className:"space-y-3 pt-3",children:[t("p",{className:"text-muted-foreground text-xs",children:m("provider.managed.aliasHint")}),n.flatMap((s)=>s.models.map((o)=>{let a=T(s.id,o.api_id);return t(S,{id:a,label:o.label,modelId:o.api_id,alias:d[a]??"",store:l},a)}))]})]})}function S({id:n,label:l,modelId:m,alias:d,store:s}){let{host:o}=e(),a=x(),[C,c]=v(null),[p,f]=v(!1),u=C??d;async function y(){f(!0);try{await Mn(s,n,u),c(null)}catch(r){let g=r instanceof Error?r:Error(String(r));if(o.reportError)o.reportError(g);else console.error(g)}finally{f(!1)}}return i("form",{className:"space-y-1.5",onSubmit:(r)=>{if(r.preventDefault(),!p)y()},children:[t("label",{htmlFor:a,className:"text-sm font-medium",children:l}),t("p",{className:"text-muted-foreground text-xs break-all",children:m}),i("div",{className:"flex items-center gap-2",children:[t(N,{id:a,value:u,placeholder:l,maxLength:100,disabled:p,onChange:(r)=>c(r.target.value)}),t(b,{type:"submit",variant:"outline",size:"sm",disabled:p||u.trim()===d,children:o.t("provider.managed.saveAlias")})]})]})}
2
- export{Xs};
1
+ import{e}from"./chunk-n32wra9r.js";import{Xt,Yt}from"./chunk-bgnxw313.js";import{S}from"./chunk-c2r7xpjf.js";import{ChevronDownIcon as h}from"lucide-react";import{useId as x,useState as v}from"react";import{Button as b}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as A,CollapsibleContent as M,CollapsibleTrigger as I}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Input as N}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Zs({providers:n,store:l}){let{t:m}=e().host,d=Xt(l);if(!n.some((s)=>s.models.length))return null;return i(A,{children:[i(I,{render:t(b,{variant:"ghost",size:"sm"}),children:[m("provider.managed.aliases"),t(h,{className:"size-4"})]}),i(M,{className:"space-y-3 pt-3",children:[t("p",{className:"text-muted-foreground text-xs",children:m("provider.managed.aliasHint")}),n.flatMap((s)=>s.models.map((o)=>{let a=S(s.id,o.api_id);return t(w,{id:a,label:o.label,modelId:o.api_id,alias:d[a]??"",store:l},a)}))]})]})}function w({id:n,label:l,modelId:m,alias:d,store:s}){let{host:o}=e(),a=x(),[C,c]=v(null),[p,f]=v(!1),u=C??d;async function y(){f(!0);try{await Yt(s,n,u),c(null)}catch(r){let g=r instanceof Error?r:Error(String(r));if(o.reportError)o.reportError(g);else console.error(g)}finally{f(!1)}}return i("form",{className:"space-y-1.5",onSubmit:(r)=>{if(r.preventDefault(),!p)y()},children:[t("label",{htmlFor:a,className:"text-sm font-medium",children:l}),t("p",{className:"text-muted-foreground text-xs break-all",children:m}),i("div",{className:"flex items-center gap-2",children:[t(N,{id:a,value:u,placeholder:l,maxLength:100,disabled:p,onChange:(r)=>c(r.target.value)}),t(b,{type:"submit",variant:"outline",size:"sm",disabled:p||u.trim()===d,children:o.t("provider.managed.saveAlias")})]})]})}
2
+ export{Zs};
@@ -1,2 +1,2 @@
1
- import{inSessionTree as v,nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function r(s){return s!==null&&typeof s==="object"&&!Array.isArray(s)?s:null}function o(s){return typeof s==="string"&&s.length>0?s:null}function _(s){switch(s){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function Xn(s,l,m,b,S=m[s]){let f=S?.items??l.items,I=new Set(l.items.map(p).filter((t)=>t!==null)),h=new Set([...I].filter((t)=>{let n=f.find((e)=>e.kind==="user"&&p(e)===t)??f.find((e)=>p(e)===t);return l.items.some((e)=>e.kind===n?.kind&&e.id===n.id)})),A=f.filter((t)=>{let n=p(t);return n===null?l.items.includes(t):h.has(n)}),T=Object.values(m).filter((t)=>t.subagent?.parentId===s),u=new Map,y=(t,n,e)=>{if(!u.has(t))u.set(t,{key:t,threadId:t,title:n,description:e,status:"unknown"})};for(let t of A){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.subagent),i=r(t.rawInput);if(e?.activity==="started"||i?.activity==="started"){let c=o(e?.threadId)??o(i?.agentThreadId),d=o(e?.path)??o(i?.agentPath);if(c)y(c,d?.split("/").findLast(Boolean)??null,null)}let a=r(n?.collaboration);if(a?.tool==="spawnAgent"||t.title==="spawnAgent"){let c=a?.receiverThreadIds??i?.receiverThreadIds,d=Array.isArray(a?.agents)?a.agents.map(r):[];if(Array.isArray(c))for(let g of c){let k=o(g);if(!k)continue;let w=d.find((x)=>x?.threadId===k);y(k,o(w?.nickname)??o(w?.role),o(i?.prompt))}}}for(let t of T){let n=r(t.subagent?._meta?.codex),e=o(n?.threadId),i=o(n?.parentTurnId);if(!(e===null?void 0:u.get(e))&&(i===null||!h.has(i)))continue;let c=e??t.id;u.set(c,{key:c,threadId:e,title:t.title,description:t.subagent?.description??null,session:t,status:"unknown"})}for(let t of f){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.collaboration);if(Array.isArray(e?.agents))for(let c of e.agents){let d=r(c),g=u.get(o(d?.threadId)??"");if(g)g.status=_(r(d?.state)?.status)}let i=r(n?.subagent),a=u.get(o(i?.threadId)??"");if(a&&i?.activity==="completed")a.status="completed";if(a&&i?.activity==="interrupted")a.status="interrupted"}for(let t of u.values()){let n=t.session;if(!n)continue;if(b.some((e)=>v(m,n.id,e.sessionId))||n.state==="requires_action")t.status="requires_action";else if(n.attached&&n.state==="running")t.status="running";else if(n.error||n.lastStopReason==="error")t.status="failed";else if(n.lastStopReason==="cancelled")t.status="interrupted";else if(n.lastStopReason==="end_turn")t.status="completed";else if(t.status==="unknown")t.status=!n.attached?"detached":n.state}return[...u.values()]}
2
- export{Xn};
1
+ import{inSessionTree as v,nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function r(s){return s!==null&&typeof s==="object"&&!Array.isArray(s)?s:null}function o(s){return typeof s==="string"&&s.length>0?s:null}function _(s){switch(s){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function oo(s,l,m,b,S=m[s]){let f=S?.items??l.items,I=new Set(l.items.map(p).filter((t)=>t!==null)),h=new Set([...I].filter((t)=>{let n=f.find((e)=>e.kind==="user"&&p(e)===t)??f.find((e)=>p(e)===t);return l.items.some((e)=>e.kind===n?.kind&&e.id===n.id)})),A=f.filter((t)=>{let n=p(t);return n===null?l.items.includes(t):h.has(n)}),T=Object.values(m).filter((t)=>t.subagent?.parentId===s),u=new Map,y=(t,n,e)=>{if(!u.has(t))u.set(t,{key:t,threadId:t,title:n,description:e,status:"unknown"})};for(let t of A){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.subagent),i=r(t.rawInput);if(e?.activity==="started"||i?.activity==="started"){let c=o(e?.threadId)??o(i?.agentThreadId),d=o(e?.path)??o(i?.agentPath);if(c)y(c,d?.split("/").findLast(Boolean)??null,null)}let a=r(n?.collaboration);if(a?.tool==="spawnAgent"||t.title==="spawnAgent"){let c=a?.receiverThreadIds??i?.receiverThreadIds,d=Array.isArray(a?.agents)?a.agents.map(r):[];if(Array.isArray(c))for(let g of c){let k=o(g);if(!k)continue;let w=d.find((x)=>x?.threadId===k);y(k,o(w?.nickname)??o(w?.role),o(i?.prompt))}}}for(let t of T){let n=r(t.subagent?._meta?.codex),e=o(n?.threadId),i=o(n?.parentTurnId);if(!(e===null?void 0:u.get(e))&&(i===null||!h.has(i)))continue;let c=e??t.id;u.set(c,{key:c,threadId:e,title:t.title,description:t.subagent?.description??null,session:t,status:"unknown"})}for(let t of f){if(t.kind!=="tool")continue;let n=r(t._meta?.codex),e=r(n?.collaboration);if(Array.isArray(e?.agents))for(let c of e.agents){let d=r(c),g=u.get(o(d?.threadId)??"");if(g)g.status=_(r(d?.state)?.status)}let i=r(n?.subagent),a=u.get(o(i?.threadId)??"");if(a&&i?.activity==="completed")a.status="completed";if(a&&i?.activity==="interrupted")a.status="interrupted"}for(let t of u.values()){let n=t.session;if(!n)continue;if(b.some((e)=>v(m,n.id,e.sessionId))||n.state==="requires_action")t.status="requires_action";else if(n.attached&&n.state==="running")t.status="running";else if(n.error||n.lastStopReason==="error")t.status="failed";else if(n.lastStopReason==="cancelled")t.status="interrupted";else if(n.lastStopReason==="end_turn")t.status="completed";else if(t.status==="unknown")t.status=!n.attached?"detached":n.state}return[...u.values()]}
2
+ export{oo};
@@ -1,2 +1,2 @@
1
- import{fe}from"./chunk-atdygnc5.js";import{G,br}from"./chunk-gzf6kzm0.js";import{t}from"./chunk-xdrwsxqy.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Hi({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=fe(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(G,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(br,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
2
- export{Hi};
1
+ import{ve}from"./chunk-sxz82jq3.js";import{j,sr}from"./chunk-8f5w2tnp.js";import{t}from"./chunk-rragk2vb.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Di({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=ve(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(j,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(sr,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
2
+ export{Di};
@@ -0,0 +1,2 @@
1
+ import{$e}from"./chunk-rragk2vb.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 Vn({host:o,client:n,children:t}){let s=l(()=>({host:o,client:n}),[o,n]);return r($e,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=a(i);if(o===null)throw Error("Conversation host is missing");return o}function C(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
2
+ export{Vn,e,C};
@@ -1,2 +1,2 @@
1
- import{Mt}from"./chunk-tvfmbabv.js";import{isContentEntry as m,isImage as d,isText as p}from"@nyssance/codex-acp-v2/client";var Ba="generate_image",Ga=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],ll={model:"wham",size:"auto"},jo={version:1,revision:"images-v1",definitions:[{name:Ba,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1}}]};function Kr(o){return o.items.flatMap((t)=>{if(!Mt(t))return[];let r=t.rawInput,i={};for(let n of t.content.filter(m)){if(!p(n.content)||!n.content.text.startsWith("{"))continue;try{let e=JSON.parse(n.content.text);if(e&&typeof e==="object"&&"kind"in e&&e.kind==="alwith.image")i={..."model"in e&&typeof e.model==="string"?{model:e.model}:{},..."size"in e&&typeof e.size==="string"?{size:e.size}:{}}}catch(e){if(!(e instanceof SyntaxError))throw e}}return t.content.filter(m).flatMap((n,e)=>{if(!d(n.content))return[];let{mimeType:s,data:a}=n.content;return[{id:`${t.id}:${e}`,toolId:t.id,...i,...typeof r?.arguments?.prompt==="string"?{prompt:r.arguments.prompt}:{},mimeType:s,data:a,src:`data:${s};base64,${a}`}]})})}function Y(o){let t=Ga.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function cl(o,t,r){let i=Y(o);if(i.provider!=="seedream")throw Error("Expected a Seedream model");if(r.length>i.maxReferences)throw Error(`This model accepts at most ${i.maxReferences} reference images`);return{model:i.id,prompt:t,size:o.size,response_format:"b64_json",watermark:!1,...r.length?{image:r}:{},...i.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
2
- export{Ba,Ga,ll,jo,Kr,Y,cl};
1
+ import{Et}from"./chunk-rv3k0kfr.js";import{isContentEntry as m,isImage as d,isText as p}from"@nyssance/codex-acp-v2/client";var Ma="generate_image",Na=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],Ka={model:"wham",size:"auto"},uo={version:1,revision:"images-v1",definitions:[{name:Ma,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1}}]};function $i(o){return o.items.flatMap((t)=>{if(!Et(t))return[];let r=t.rawInput,i={};for(let n of t.content.filter(m)){if(!p(n.content)||!n.content.text.startsWith("{"))continue;try{let e=JSON.parse(n.content.text);if(e&&typeof e==="object"&&"kind"in e&&e.kind==="alwith.image")i={..."model"in e&&typeof e.model==="string"?{model:e.model}:{},..."size"in e&&typeof e.size==="string"?{size:e.size}:{}}}catch(e){if(!(e instanceof SyntaxError))throw e}}return t.content.filter(m).flatMap((n,e)=>{if(!d(n.content))return[];let{mimeType:s,data:a}=n.content;return[{id:`${t.id}:${e}`,toolId:t.id,...i,...typeof r?.arguments?.prompt==="string"?{prompt:r.arguments.prompt}:{},mimeType:s,data:a,src:`data:${s};base64,${a}`}]})})}function te(o){let t=Na.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function Wa(o,t,r){let i=te(o);if(i.provider!=="seedream")throw Error("Expected a Seedream model");if(r.length>i.maxReferences)throw Error(`This model accepts at most ${i.maxReferences} reference images`);return{model:i.id,prompt:t,size:o.size,response_format:"b64_json",watermark:!1,...r.length?{image:r}:{},...i.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
2
+ export{Ma,Na,Ka,uo,$i,te,Wa};
@@ -0,0 +1,2 @@
1
+ import{er}from"./chunk-1gr60c40.js";import{e,C}from"./chunk-n32wra9r.js";import{Y,x}from"./chunk-w5q2ygsa.js";import{createLucideIcon as k,HandIcon as w,ShieldAlertIcon as y,ShieldCheckIcon as a}from"lucide-react";import{memo as S}from"react";import{jsx as t}from"react/jsx-runtime";var O=k("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"}]]),d={"read-only":w,"workspace-write":a,agent:O,"agent-full-access":y},b={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function A({sessionId:u,options:m,disabled:g,onConfigChange:c}){let{host:l,client:f}=e(),{t:r}=l,s=x(m,"mode");if(!s)return null;let o=s.currentValue,p=Y(s).map((n)=>{let i=b[n.value];return i?{...n,name:r(`permissionModes.${i}.name`),description:r(`permissionModes.${i}.description`)}:n}),h=p.find((n)=>n.value===o),M=d[o]??a,I=(n)=>{if(n===o)return;C(l,c?c(s.configId,n):f.setConfig(u,s.configId,n))};return t(er,{value:o,warning:o==="agent-full-access",currentName:h?.name??o,icon:t(M,{className:"size-3.5 shrink-0"}),header:r("permissionModes.heading"),disabled:g,label:r("composer.switchPermissionMode"),onValueChange:I,options:p.map((n)=>{let i=d[n.value]??a,v=n.value==="agent-full-access";return{value:n.value,label:t("span",{"data-permission-warning":v?"":void 0,children:n.name}),description:n.description?t("span",{className:"whitespace-normal",children:n.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}var Cn=S(A);
2
+ export{Cn};
@@ -0,0 +1,2 @@
1
+ import{s}from"./chunk-ytdhstqx.js";import{en}from"./chunk-jp4xjks0.js";import{H}from"./chunk-8hygfx41.js";import{tn,Ee}from"./chunk-c2ez86jz.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as L,zhCN as z}from"date-fns/locale";import{ClockIcon as E,MessageSquareIcon as A}from"lucide-react";import{useEffect as g,useState as D}from"react";import{Input as w}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as M}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as O}from"react/jsx-runtime";var S={en:L,"zh-CN":z};function dt(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:r})}function Te({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:C,PathAction:u}=s(),f=Ee(),y=tn();g(()=>{f(n)},[n,f]);let[I,p]=D(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?dt(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(E,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(en,{title:n?o(w,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(H,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(A,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(O,{children:[l,l&&a!==void 0&&o(M,{}),a]}):void 0})}
2
+ export{dt,Te};
@@ -1,2 +1,2 @@
1
- class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function Dr(i,e){return n??=new s,n.connect(i,e)}
2
- export{Dr};
1
+ class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function qr(i,e){return n??=new s,n.connect(i,e)}
2
+ export{qr};
@@ -1,2 +1,2 @@
1
- import{QUICK_CHATS_GROUP as r,sessionGroup as l}from"@nyssance/codex-acp-v2/client";function Tt(n,t){return n!==null&&t&&l(t,{cwd:n}).id===r?null:n}
2
- export{Tt};
1
+ import{QUICK_CHATS_GROUP as r,sessionGroup as l}from"@nyssance/codex-acp-v2/client";function ct(n,t){return n!==null&&t&&l(t,{cwd:n}).id===r?null:n}
2
+ export{ct};
@@ -0,0 +1,2 @@
1
+ import{u}from"./chunk-stv8pr4v.js";import{s}from"./chunk-ytdhstqx.js";import{v,f}from"./chunk-c2ez86jz.js";import{ut}from"./chunk-0bv3tw1m.js";import{cn as r}from"cn";import{ArrowLeftIcon as a,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as c,DropdownMenuContent as m,DropdownMenuItem as d,DropdownMenuTrigger as g}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as w}from"react/jsx-runtime";function Ds({onCollapseAll:i}){let{t:n}=s();return w(c,{children:[o(g,{render:o(ut,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(m,{align:"end",className:"w-52",children:o(d,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function Fs({screen:i,onSwitch:n}){let{t:e}=s(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(f,{className:r(u,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(v,{children:i==="main"?o(a,{}):o(l,{})})})}
2
+ export{Ds,Fs};
@@ -1,2 +1,2 @@
1
- import{invoke as i}from"@tauri-apps/api/core";import{emit as t,emitTo as n,listen as s,once as a}from"@tauri-apps/api/event";var p={providersRead:()=>i("plugin:alwith-chat|providers_read"),providersSave:(e)=>i("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>i("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>i("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>i("plugin:alwith-chat|providers_test",e),providersApply:()=>i("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>i("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>i("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>i("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>i("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>i("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>i("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>i("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>i("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>i("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>i("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>i("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>i("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>i("plugin:alwith-chat|word_cloud",e),readDroppedFile:(e)=>i("plugin:alwith-chat|read_dropped_file",e),clipboardFilePaths:()=>i("plugin:alwith-chat|clipboard_file_paths"),writePastedFile:(e)=>i("plugin:alwith-chat|write_pasted_file",e),readImage:(e)=>i("plugin:alwith-chat|read_image",e),saveFile:(e)=>i("plugin:alwith-chat|save_file",e),writeTextAttachment:(e)=>i("plugin:alwith-chat|write_text_attachment",e),previewFile:(e)=>i("plugin:alwith-chat|preview_file",e)},Wo={"providers:changed":{name:"providers:changed",listen:(e)=>s("providers:changed",e),once:(e)=>a("providers:changed",e),emit:(e)=>t("providers:changed",e),emitTo:(e,r)=>n(e,"providers:changed",r)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>s("providers:managed-revoked",e),once:(e)=>a("providers:managed-revoked",e),emit:(e)=>t("providers:managed-revoked",e),emitTo:(e,r)=>n(e,"providers:managed-revoked",r)}};function ja(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function pl(e){if(ja(e)||e instanceof Error)return e.message;return String(e)}
2
- export{p,Wo,ja,pl};
1
+ import{invoke as i}from"@tauri-apps/api/core";import{emit as t,emitTo as n,listen as s,once as a}from"@tauri-apps/api/event";var p={providersRead:()=>i("plugin:alwith-chat|providers_read"),providersSave:(e)=>i("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>i("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>i("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>i("plugin:alwith-chat|providers_test",e),providersApply:()=>i("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>i("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>i("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>i("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>i("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>i("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>i("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>i("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>i("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>i("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>i("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>i("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>i("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>i("plugin:alwith-chat|word_cloud",e),readDroppedFile:(e)=>i("plugin:alwith-chat|read_dropped_file",e),clipboardFilePaths:()=>i("plugin:alwith-chat|clipboard_file_paths"),writePastedFile:(e)=>i("plugin:alwith-chat|write_pasted_file",e),readImage:(e)=>i("plugin:alwith-chat|read_image",e),saveFile:(e)=>i("plugin:alwith-chat|save_file",e),writeTextAttachment:(e)=>i("plugin:alwith-chat|write_text_attachment",e),previewFile:(e)=>i("plugin:alwith-chat|preview_file",e)},so={"providers:changed":{name:"providers:changed",listen:(e)=>s("providers:changed",e),once:(e)=>a("providers:changed",e),emit:(e)=>t("providers:changed",e),emitTo:(e,r)=>n(e,"providers:changed",r)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>s("providers:managed-revoked",e),once:(e)=>a("providers:managed-revoked",e),emit:(e)=>t("providers:managed-revoked",e),emitTo:(e,r)=>n(e,"providers:managed-revoked",r)}};function Ta(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function qa(e){if(Ta(e)||e instanceof Error)return e.message;return String(e)}
2
+ export{p,so,Ta,qa};
@@ -1,2 +1,2 @@
1
- import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function Ue({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
2
- export{Ue};
1
+ import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function Ie({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
2
+ export{Ie};
@@ -1,2 +1,2 @@
1
- function un(n,r){let i=new Set(r);i.add(n);let t=/^(.*?)\s*\((\d+)\)$/.exec(n),s=t?t[1].trimEnd():n,e=t?BigInt(t[2])+1n:2n;while(i.has(`${s} (${e})`))e++;return`${s} (${e})`}
2
- export{un};
1
+ function En(n,r){let i=new Set(r);i.add(n);let t=/^(.*?)\s*\((\d+)\)$/.exec(n),s=t?t[1].trimEnd():n,e=t?BigInt(t[2])+1n:2n;while(i.has(`${s} (${e})`))e++;return`${s} (${e})`}
2
+ export{En};