@alwith/module-chat 0.6.19 → 0.6.20

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 (458) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/agent/application-client.js +1 -1
  3. package/dist/agent/client.js +1 -1
  4. package/dist/agent/custom-model-effort.js +1 -1
  5. package/dist/agent/fork-title.js +1 -1
  6. package/dist/agent/image-request.js +1 -1
  7. package/dist/agent/image-tools.js +1 -1
  8. package/dist/agent/input-config.js +1 -1
  9. package/dist/agent/input-modes/chat.js +1 -1
  10. package/dist/agent/input-modes/execution-meta.js +1 -1
  11. package/dist/agent/input-modes/image-context.js +1 -1
  12. package/dist/agent/input-modes/image.js +1 -1
  13. package/dist/agent/input-modes/index.js +1 -1
  14. package/dist/agent/project-path.js +1 -1
  15. package/dist/agent/request-error.js +1 -1
  16. package/dist/agent/session-list-refresh.js +1 -1
  17. package/dist/app-reference.js +1 -1
  18. package/dist/application-tools.js +1 -1
  19. package/dist/approval/choice-elicitation-form.js +1 -1
  20. package/dist/approval/choice-schema.js +1 -1
  21. package/dist/approval/permission-options.js +1 -1
  22. package/dist/approval/permission-view.js +1 -1
  23. package/dist/approval/schema-elicitation-form.js +1 -1
  24. package/dist/approval/url-elicitation-card.js +1 -1
  25. package/dist/{chunk-2aw505xv.js → chunk-04c5k3qr.js} +2 -2
  26. package/dist/{chunk-fkkk1fza.js → chunk-04frqm59.js} +2 -2
  27. package/dist/{chunk-r7hwgk2v.js → chunk-0rnh8mhs.js} +2 -2
  28. package/dist/{chunk-84p483n0.js → chunk-16db8fh2.js} +2 -2
  29. package/dist/chunk-1a56svgj.js +2 -0
  30. package/dist/{chunk-zjk12jjm.js → chunk-1gv49jt9.js} +3 -3
  31. package/dist/chunk-1hmt6w4w.js +2 -0
  32. package/dist/{chunk-rz9fnphz.js → chunk-1qjhvkg0.js} +2 -2
  33. package/dist/{chunk-s9mejb9v.js → chunk-1r4y3pfg.js} +2 -2
  34. package/dist/{chunk-thaa1n4f.js → chunk-1vtvcar6.js} +2 -2
  35. package/dist/{chunk-ath5nv2w.js → chunk-1ycyexae.js} +2 -2
  36. package/dist/{chunk-e1zsnc8z.js → chunk-23r426sm.js} +2 -2
  37. package/dist/{chunk-gwskdhaw.js → chunk-29s4mnfw.js} +2 -2
  38. package/dist/{chunk-wew3t005.js → chunk-2a4pq98d.js} +2 -2
  39. package/dist/chunk-2c2a1wvg.js +2 -0
  40. package/dist/{chunk-xspnhgq6.js → chunk-2cfhvb3k.js} +2 -2
  41. package/dist/{chunk-zyn0ys4m.js → chunk-2dm51ksz.js} +2 -2
  42. package/dist/{chunk-dd9k5bbt.js → chunk-2easwd1n.js} +2 -2
  43. package/dist/chunk-2nb1475h.js +2 -0
  44. package/dist/{chunk-kn792h8n.js → chunk-2zy75522.js} +2 -2
  45. package/dist/{chunk-kj2zk46g.js → chunk-38bpmgjd.js} +2 -2
  46. package/dist/{chunk-tdvx2n5m.js → chunk-38hvm5ca.js} +2 -2
  47. package/dist/{chunk-z6x70w62.js → chunk-3a3ecayr.js} +2 -2
  48. package/dist/{chunk-jpr5ewnh.js → chunk-3chhwwwy.js} +2 -2
  49. package/dist/{chunk-vm81n2c0.js → chunk-3g9qb7vq.js} +2 -2
  50. package/dist/chunk-3gnn1v68.js +2 -0
  51. package/dist/{chunk-7d1wnjw5.js → chunk-3hjcpcnv.js} +2 -2
  52. package/dist/{chunk-fdmbfq9g.js → chunk-3tvct295.js} +2 -2
  53. package/dist/chunk-3w6dv0nx.js +2 -0
  54. package/dist/chunk-41yz7txv.js +2 -0
  55. package/dist/{chunk-cydnp9mm.js → chunk-4p0zk3mj.js} +2 -2
  56. package/dist/{chunk-xyffk47k.js → chunk-55ya3102.js} +2 -2
  57. package/dist/{chunk-dr5swvaa.js → chunk-56rx2rmj.js} +2 -2
  58. package/dist/{chunk-90847w64.js → chunk-5aqqqsa3.js} +2 -2
  59. package/dist/{chunk-psndz2rs.js → chunk-5bmxngnx.js} +2 -2
  60. package/dist/{chunk-bg0vkt53.js → chunk-5hk3k14h.js} +2 -2
  61. package/dist/{chunk-gpv1dc5y.js → chunk-5s85tvas.js} +2 -2
  62. package/dist/{chunk-dsf2x63w.js → chunk-61awcdaq.js} +4 -4
  63. package/dist/{chunk-d0s10qy5.js → chunk-62qtrk0p.js} +2 -2
  64. package/dist/{chunk-7p7fxgdb.js → chunk-62wxvxsg.js} +2 -2
  65. package/dist/{chunk-bba9qej8.js → chunk-6c18ag8t.js} +2 -2
  66. package/dist/chunk-6dnb0t84.js +2 -0
  67. package/dist/chunk-6ehhap9k.js +2 -0
  68. package/dist/{chunk-qma11tpm.js → chunk-6my4ybpw.js} +3 -3
  69. package/dist/chunk-6tj5e7fc.js +2 -0
  70. package/dist/{chunk-tftgnw1w.js → chunk-6wkcqhkk.js} +2 -2
  71. package/dist/{chunk-z107z7dt.js → chunk-6xap6hvz.js} +2 -2
  72. package/dist/{chunk-88ysxbdh.js → chunk-78vckhxt.js} +2 -2
  73. package/dist/{chunk-m087n233.js → chunk-7ac4g54f.js} +3 -3
  74. package/dist/{chunk-xwwjj45a.js → chunk-7jk8s061.js} +2 -2
  75. package/dist/chunk-7sp1yqfg.js +2 -0
  76. package/dist/{chunk-7evd34gw.js → chunk-814h2ja2.js} +3 -3
  77. package/dist/chunk-81jejgvs.js +2 -0
  78. package/dist/chunk-85tzkdsj.js +2 -0
  79. package/dist/{chunk-zzjth6f2.js → chunk-86821qec.js} +2 -2
  80. package/dist/{chunk-hj05zh7h.js → chunk-86r89vrt.js} +2 -2
  81. package/dist/{chunk-rg9ckzpr.js → chunk-8kd74ng1.js} +2 -2
  82. package/dist/{chunk-xx29efrs.js → chunk-8ngg5vs4.js} +3 -3
  83. package/dist/{chunk-ma7thf1j.js → chunk-8q9hq3mg.js} +2 -2
  84. package/dist/{chunk-ne4b53kn.js → chunk-8v53bkyr.js} +2 -2
  85. package/dist/{chunk-fvxxzgrc.js → chunk-8y60kexq.js} +2 -2
  86. package/dist/{chunk-hqt5j789.js → chunk-8y706gz3.js} +2 -2
  87. package/dist/{chunk-1gr60c40.js → chunk-933h9gnv.js} +2 -2
  88. package/dist/{chunk-x49qjrbk.js → chunk-9q6hz47j.js} +2 -2
  89. package/dist/{chunk-8rb896tq.js → chunk-a71j2n86.js} +2 -2
  90. package/dist/{chunk-esbgn8q0.js → chunk-abgdqy92.js} +2 -2
  91. package/dist/{chunk-ma6ycen5.js → chunk-ase4ejxz.js} +2 -2
  92. package/dist/{chunk-xqb4thy8.js → chunk-at75m9hq.js} +2 -2
  93. package/dist/chunk-ayademz2.js +2 -0
  94. package/dist/{chunk-51x80v4h.js → chunk-ayhxrzsq.js} +2 -2
  95. package/dist/chunk-b42vv8f2.js +2 -0
  96. package/dist/{chunk-34mq2dbm.js → chunk-b4kh5nns.js} +2 -2
  97. package/dist/{chunk-6e84zbgs.js → chunk-bane0xc8.js} +2 -2
  98. package/dist/chunk-bcdw682e.js +4 -0
  99. package/dist/{chunk-97pn8v17.js → chunk-bej9z041.js} +2 -2
  100. package/dist/chunk-bfwft1b8.js +2 -0
  101. package/dist/{chunk-4sfxcw58.js → chunk-bv14x0e8.js} +3 -3
  102. package/dist/{chunk-c2h4wr7g.js → chunk-bydxp3zj.js} +4 -4
  103. package/dist/chunk-c0mpr4dh.js +2 -0
  104. package/dist/{chunk-2ncdext6.js → chunk-c1pvvk0x.js} +2 -2
  105. package/dist/{chunk-80sbwjrr.js → chunk-c8wdf20g.js} +2 -2
  106. package/dist/{chunk-n811d65m.js → chunk-ckjq6690.js} +3 -3
  107. package/dist/{chunk-vg1y693r.js → chunk-csfqkzmr.js} +3 -3
  108. package/dist/{chunk-evpjxbzm.js → chunk-cvx7r35k.js} +2 -2
  109. package/dist/{chunk-xx7t8r87.js → chunk-d8f6avcz.js} +2 -2
  110. package/dist/{chunk-pxzj3ae7.js → chunk-df9aqj1m.js} +2 -2
  111. package/dist/{chunk-brv52tgj.js → chunk-djd3sjp9.js} +2 -2
  112. package/dist/{chunk-3g9n4bk2.js → chunk-dtgbgwby.js} +2 -2
  113. package/dist/{chunk-k4a3p16c.js → chunk-dxsjz3re.js} +2 -2
  114. package/dist/{chunk-pqz2471h.js → chunk-e04g26qm.js} +2 -2
  115. package/dist/{chunk-bw3bpr6m.js → chunk-e2qjbqq2.js} +2 -2
  116. package/dist/{chunk-0jpzztpz.js → chunk-e7me5e6n.js} +2 -2
  117. package/dist/{chunk-nn30qzhx.js → chunk-e7ndpy02.js} +2 -2
  118. package/dist/{chunk-x2wcwpw3.js → chunk-easm0z49.js} +2 -2
  119. package/dist/{chunk-j6000jts.js → chunk-ecaedwda.js} +2 -2
  120. package/dist/{chunk-nbgw51b6.js → chunk-ecdjjnbb.js} +2 -2
  121. package/dist/chunk-een4e2tr.js +2 -0
  122. package/dist/{chunk-ak196z4y.js → chunk-evygj5ka.js} +2 -2
  123. package/dist/{chunk-44r55va6.js → chunk-f4h84pav.js} +2 -2
  124. package/dist/{chunk-f78jd8xh.js → chunk-f6zpqrg3.js} +2 -2
  125. package/dist/{chunk-d9mj74pb.js → chunk-f73x23f9.js} +1 -1
  126. package/dist/{chunk-mf0k3xd4.js → chunk-f89s462k.js} +3 -3
  127. package/dist/{chunk-dheg4bs2.js → chunk-ffs5nkt0.js} +2 -2
  128. package/dist/{chunk-fwqpwbd8.js → chunk-fhjk81r9.js} +2 -2
  129. package/dist/chunk-fvwrc97h.js +2 -0
  130. package/dist/{chunk-113maskf.js → chunk-g61xf0ma.js} +2 -2
  131. package/dist/{chunk-ex063jn9.js → chunk-g7cc7gdn.js} +2 -2
  132. package/dist/{chunk-k883x8fv.js → chunk-g8w06bdx.js} +2 -2
  133. package/dist/{chunk-xfzmxq3g.js → chunk-gawrkkbf.js} +2 -2
  134. package/dist/{chunk-rhe4w638.js → chunk-gdavg2hq.js} +2 -2
  135. package/dist/{chunk-wpacvdsv.js → chunk-gea1q14z.js} +2 -2
  136. package/dist/{chunk-6g553fkh.js → chunk-ggddhx5x.js} +2 -2
  137. package/dist/{chunk-337hq36y.js → chunk-gnctm097.js} +2 -2
  138. package/dist/{chunk-wbjf9maj.js → chunk-gvqvw7ms.js} +2 -2
  139. package/dist/{chunk-74b70n1g.js → chunk-gy4h86mw.js} +2 -2
  140. package/dist/chunk-gyw21vnb.js +2 -0
  141. package/dist/{chunk-nqt9gyz9.js → chunk-heqa4swe.js} +2 -2
  142. package/dist/{chunk-agdkhyaj.js → chunk-hygvdjq6.js} +3 -3
  143. package/dist/{chunk-8q5zwkry.js → chunk-hzhcajx1.js} +2 -2
  144. package/dist/{chunk-wq47c4ws.js → chunk-jca8s47n.js} +2 -2
  145. package/dist/{chunk-3tvq6xr2.js → chunk-jg4c3zg4.js} +2 -2
  146. package/dist/{chunk-hfghqddp.js → chunk-jm6y0edw.js} +2 -2
  147. package/dist/chunk-jq6qs3s6.js +2 -0
  148. package/dist/{chunk-4jp1d558.js → chunk-k4xsxxy7.js} +2 -2
  149. package/dist/chunk-k99r1r38.js +2 -0
  150. package/dist/{chunk-zw2x5ztr.js → chunk-kh3af9mq.js} +2 -2
  151. package/dist/{chunk-k5nd3vyq.js → chunk-kj3a1k2q.js} +2 -2
  152. package/dist/{chunk-n96z8etk.js → chunk-kj3t4mqf.js} +2 -2
  153. package/dist/{chunk-84zzf0ys.js → chunk-kk9dbwd1.js} +2 -2
  154. package/dist/{chunk-phee3jn9.js → chunk-kv1w4jx4.js} +2 -2
  155. package/dist/{chunk-sp2ny9ak.js → chunk-kztrgv9y.js} +2 -2
  156. package/dist/{chunk-4wm5emgf.js → chunk-m8pkmbtf.js} +2 -2
  157. package/dist/{chunk-er5wxkt2.js → chunk-m944rgn9.js} +2 -2
  158. package/dist/chunk-mqpkm974.js +2 -0
  159. package/dist/{chunk-q4c6f84f.js → chunk-mr2wcd24.js} +2 -2
  160. package/dist/{chunk-t5ff3cn7.js → chunk-ms0h8x63.js} +2 -2
  161. package/dist/{chunk-xnc0175v.js → chunk-n0q8e6sq.js} +2 -2
  162. package/dist/{chunk-7g11pcm4.js → chunk-n3sm0834.js} +3 -3
  163. package/dist/chunk-n6dqwdg5.js +2 -0
  164. package/dist/{chunk-rp7tnbss.js → chunk-n8v6cdq3.js} +2 -2
  165. package/dist/{chunk-etvdqkvb.js → chunk-nh56sb8e.js} +2 -2
  166. package/dist/{chunk-2gwegefd.js → chunk-nmd5x501.js} +2 -2
  167. package/dist/{chunk-h7xjw0p4.js → chunk-npvcy4tw.js} +2 -2
  168. package/dist/{chunk-5gn8xw58.js → chunk-nrzkzvr0.js} +2 -2
  169. package/dist/{chunk-nhkm2gr7.js → chunk-p2tm6tv8.js} +1 -1
  170. package/dist/chunk-p781sb6h.js +2 -0
  171. package/dist/{chunk-73e9vpm9.js → chunk-pdmayjan.js} +2 -2
  172. package/dist/{chunk-5c42mfat.js → chunk-pk931bpm.js} +2 -2
  173. package/dist/{chunk-jgqt7k0h.js → chunk-q01vmp9m.js} +2 -2
  174. package/dist/{chunk-bf7sgpzq.js → chunk-q46z21zs.js} +2 -2
  175. package/dist/{chunk-p3gawvqr.js → chunk-q5qqhqw4.js} +2 -2
  176. package/dist/{chunk-vg9p0hvk.js → chunk-q9mh8x4r.js} +2 -2
  177. package/dist/chunk-q9y0wjwp.js +2 -0
  178. package/dist/{chunk-ch8e8a32.js → chunk-qdcznn2t.js} +2 -2
  179. package/dist/chunk-qejm75d7.js +2 -0
  180. package/dist/chunk-r6c9r5yy.js +2 -0
  181. package/dist/{chunk-eynwjzqp.js → chunk-r6ns1457.js} +2 -2
  182. package/dist/{chunk-x4jm2eh9.js → chunk-r8expjyy.js} +4 -4
  183. package/dist/{chunk-zxfx7psd.js → chunk-r8pm74zf.js} +2 -2
  184. package/dist/{chunk-ftsnryz8.js → chunk-rb4p3h5b.js} +2 -2
  185. package/dist/{chunk-h82jte5p.js → chunk-rh2yx0xq.js} +2 -2
  186. package/dist/{chunk-j3g21ext.js → chunk-rkejggyx.js} +2 -2
  187. package/dist/{chunk-mahb3t97.js → chunk-rr9kc3n8.js} +2 -2
  188. package/dist/{chunk-g1nck6pp.js → chunk-rtbpfasb.js} +2 -2
  189. package/dist/chunk-rx84h0c2.js +2 -0
  190. package/dist/chunk-s2706gae.js +2 -0
  191. package/dist/{chunk-j39bhfsp.js → chunk-s6b28p84.js} +2 -2
  192. package/dist/{chunk-arm9x6kc.js → chunk-s6y31dcb.js} +2 -2
  193. package/dist/{chunk-02qwd1yq.js → chunk-s88eyv24.js} +2 -2
  194. package/dist/{chunk-pc11a2w0.js → chunk-s8djv2dy.js} +3 -3
  195. package/dist/chunk-sgbn37kz.js +2 -0
  196. package/dist/{chunk-7b5ryhwh.js → chunk-sjtfxn55.js} +2 -2
  197. package/dist/{chunk-81n37a11.js → chunk-swt6dntp.js} +2 -2
  198. package/dist/chunk-t9e1sj53.js +3 -0
  199. package/dist/{chunk-yb5yhh8t.js → chunk-t9xkg3pk.js} +2 -2
  200. package/dist/{chunk-ta6rbxh5.js → chunk-tc3t2sgb.js} +3 -3
  201. package/dist/chunk-tcs1a1hk.js +2 -0
  202. package/dist/{chunk-64apxzn7.js → chunk-tec9yhsm.js} +2 -2
  203. package/dist/{chunk-bqhbksy2.js → chunk-tj4b0s68.js} +2 -2
  204. package/dist/{chunk-y3mx5sf0.js → chunk-tzczzqde.js} +2 -2
  205. package/dist/chunk-v4qzxq4v.js +2 -0
  206. package/dist/{chunk-ane53rqa.js → chunk-v8x5atmn.js} +2 -2
  207. package/dist/{chunk-q7rq46qc.js → chunk-vbbndjfd.js} +2 -2
  208. package/dist/{chunk-j78kgyff.js → chunk-vgscp6dr.js} +5 -5
  209. package/dist/{chunk-15m908ph.js → chunk-vhxr0c4c.js} +2 -2
  210. package/dist/{chunk-p5hk14fk.js → chunk-vvkp0jqa.js} +2 -2
  211. package/dist/{chunk-1fadxh2z.js → chunk-wf7kfk3p.js} +2 -2
  212. package/dist/{chunk-6j1x3gny.js → chunk-wjd2hpnd.js} +2 -2
  213. package/dist/{chunk-w1wr14da.js → chunk-wkrnbk0p.js} +2 -2
  214. package/dist/chunk-wnydsth6.js +2 -0
  215. package/dist/{chunk-1d29gnb2.js → chunk-wxh1m3gg.js} +2 -2
  216. package/dist/chunk-x1mzrhtd.js +2 -0
  217. package/dist/{chunk-ynxb5xqz.js → chunk-x20dy83s.js} +3 -3
  218. package/dist/{chunk-q1yz3t9z.js → chunk-xykmskka.js} +2 -2
  219. package/dist/chunk-y6p8xspr.js +2 -0
  220. package/dist/{chunk-gttw4rmx.js → chunk-y8fmawc6.js} +3 -3
  221. package/dist/chunk-yc4cdg65.js +2 -0
  222. package/dist/{chunk-fyxetwxv.js → chunk-ykz0h1r0.js} +2 -2
  223. package/dist/{chunk-9k58vckd.js → chunk-ymgc4317.js} +2 -2
  224. package/dist/{chunk-scdj02m8.js → chunk-z1qcgb6b.js} +3 -3
  225. package/dist/{chunk-6f06hbsk.js → chunk-ztrfygh5.js} +2 -2
  226. package/dist/client.js +1 -1
  227. package/dist/codex/activity-group.js +1 -1
  228. package/dist/codex/artifact-links.js +1 -1
  229. package/dist/codex/assistant-message.js +1 -1
  230. package/dist/codex/async-question-card.js +1 -1
  231. package/dist/codex/edited-files-card.js +1 -1
  232. package/dist/codex/image-view-activity.js +1 -1
  233. package/dist/codex/markdown-renderer.js +1 -1
  234. package/dist/codex/navigation-audio.js +1 -1
  235. package/dist/codex/navigation-preview.js +1 -1
  236. package/dist/codex/navigation-rail.js +1 -1
  237. package/dist/codex/patch-view.js +1 -1
  238. package/dist/codex/plan.js +1 -1
  239. package/dist/codex/timeline-virtualizer.js +1 -1
  240. package/dist/codex/turn-activity.js +1 -1
  241. package/dist/codex/user-message.js +1 -1
  242. package/dist/codex/virtualized-turn-list.js +1 -1
  243. package/dist/collections/collection-emoji.js +1 -1
  244. package/dist/collections/collection-menu.js +1 -1
  245. package/dist/collections/collection-panel.js +1 -1
  246. package/dist/collections/collections.js +1 -1
  247. package/dist/collections/host.js +1 -1
  248. package/dist/collections/locales.js +1 -1
  249. package/dist/collections/model.js +1 -1
  250. package/dist/collections/store.js +1 -1
  251. package/dist/composer/completion-filter.js +1 -1
  252. package/dist/composer/completion-menu.js +1 -1
  253. package/dist/composer/completion-trigger.js +1 -1
  254. package/dist/composer/effort-slider.js +1 -1
  255. package/dist/composer/inline-document.js +1 -1
  256. package/dist/composer/inline-dom.js +1 -1
  257. package/dist/composer/menu-radio.js +1 -1
  258. package/dist/composer/model-select.js +1 -1
  259. package/dist/composer/permission-mode-select.js +1 -1
  260. package/dist/composer/prompt-input-attachments.js +1 -1
  261. package/dist/composer/prompt-input-clipboard.js +1 -1
  262. package/dist/composer/prompt-input-context.js +1 -1
  263. package/dist/composer/prompt-input-inline.js +1 -1
  264. package/dist/composer/prompt-input-textarea.js +1 -1
  265. package/dist/composer/prompt-input.js +1 -1
  266. package/dist/conversation/action-card.js +1 -1
  267. package/dist/conversation/composer/app-mentions.js +1 -1
  268. package/dist/conversation/composer/apps-menu.js +1 -1
  269. package/dist/conversation/composer/composer-menu.js +1 -1
  270. package/dist/conversation/composer/composer.js +1 -1
  271. package/dist/conversation/composer/config-options.js +1 -1
  272. package/dist/conversation/composer/context.js +1 -1
  273. package/dist/conversation/composer/drafts.js +1 -1
  274. package/dist/conversation/composer/file-items.js +1 -1
  275. package/dist/conversation/composer/long-text.js +1 -1
  276. package/dist/conversation/composer/mention-chips.js +1 -1
  277. package/dist/conversation/composer/mention-uri.js +1 -1
  278. package/dist/conversation/composer/model-menu.js +1 -1
  279. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  280. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  281. package/dist/conversation/composer/prediction.js +1 -1
  282. package/dist/conversation/composer/prompt-history.js +1 -1
  283. package/dist/conversation/composer/slash-command-button.js +1 -1
  284. package/dist/conversation/composer/submit-button.js +1 -1
  285. package/dist/conversation/composer/usage-meter.js +1 -1
  286. package/dist/conversation/connection-notice.js +1 -1
  287. package/dist/conversation/context.js +1 -1
  288. package/dist/conversation/conversation-body.js +1 -1
  289. package/dist/conversation/conversation-search.js +1 -1
  290. package/dist/conversation/conversation-view.js +1 -1
  291. package/dist/conversation/conversation.js +1 -1
  292. package/dist/conversation/diff-modal.js +1 -1
  293. package/dist/conversation/draft-project-picker.js +1 -1
  294. package/dist/conversation/session-actions.js +1 -1
  295. package/dist/conversation/subagent-sessions.js +1 -1
  296. package/dist/conversation/subagent-tasks.js +1 -1
  297. package/dist/desktop/desktop-composer.js +1 -1
  298. package/dist/desktop/desktop.js +1 -1
  299. package/dist/desktop/draft-model-select.js +1 -1
  300. package/dist/desktop/load-image.js +1 -1
  301. package/dist/desktop/model-catalog.js +1 -1
  302. package/dist/desktop/model-recovery.js +1 -1
  303. package/dist/desktop/model-settings-action.js +1 -1
  304. package/dist/desktop/native-file-drop.js +1 -1
  305. package/dist/generated/commands.js +1 -1
  306. package/dist/image-lightbox.js +1 -1
  307. package/dist/image-preview-dialog.js +1 -1
  308. package/dist/image.js +1 -1
  309. package/dist/lib/app-reference.js +1 -1
  310. package/dist/lib/application-metadata.js +1 -1
  311. package/dist/lib/chat-path.js +1 -1
  312. package/dist/lib/code-highlighter.js +1 -1
  313. package/dist/lib/file-url.js +1 -1
  314. package/dist/lib/fuzzy.js +1 -1
  315. package/dist/lib/group-blocks.js +1 -1
  316. package/dist/lib/image-encode.js +1 -1
  317. package/dist/lib/limits.js +1 -1
  318. package/dist/lib/markdown-parser.js +1 -1
  319. package/dist/lib/markdown-rules.js +1 -1
  320. package/dist/lib/model-name.js +1 -1
  321. package/dist/lib/prepare-prompt-files.js +1 -1
  322. package/dist/lib/reference-presentation.js +1 -1
  323. package/dist/lib/stream-style.js +1 -1
  324. package/dist/lib/streaming-markdown.js +1 -1
  325. package/dist/lib/tool-artifacts.js +1 -1
  326. package/dist/locales.js +1 -1
  327. package/dist/mermaid/diagram.js +1 -1
  328. package/dist/mermaid/export.js +1 -1
  329. package/dist/mermaid/index.js +1 -1
  330. package/dist/mermaid/preview.js +1 -1
  331. package/dist/oauth/claude-login.js +1 -1
  332. package/dist/oauth.js +1 -1
  333. package/dist/plugins/catalog-header.js +1 -1
  334. package/dist/plugins/catalog-skeleton.js +1 -1
  335. package/dist/plugins/host.js +1 -1
  336. package/dist/plugins/new-chat-directory.js +1 -1
  337. package/dist/plugins/panel-item.js +1 -1
  338. package/dist/plugins/plugin-detail-page.js +1 -1
  339. package/dist/plugins/plugin-icon.js +1 -1
  340. package/dist/plugins/plugin-icons.js +1 -1
  341. package/dist/plugins/plugins-page.js +1 -1
  342. package/dist/plugins/plugins.js +1 -1
  343. package/dist/plugins/read-skill-document.js +1 -1
  344. package/dist/plugins/skill-document.js +1 -1
  345. package/dist/plugins/skills-tab.js +1 -1
  346. package/dist/plugins/store.js +1 -1
  347. package/dist/plugins/toolbox-layout.js +1 -1
  348. package/dist/reference-projection.js +1 -1
  349. package/dist/search/chat-search.js +1 -1
  350. package/dist/search/codex-source-matches.js +1 -1
  351. package/dist/search/dom-matches.js +1 -1
  352. package/dist/search/find-bar.js +1 -1
  353. package/dist/search/literal-matches.js +1 -1
  354. package/dist/session-list/account-menu.js +1 -1
  355. package/dist/session-list/activity-list.js +1 -1
  356. package/dist/session-list/archived-sessions.js +1 -1
  357. package/dist/session-list/help-menu.js +1 -1
  358. package/dist/session-list/highlight.js +1 -1
  359. package/dist/session-list/host.js +1 -1
  360. package/dist/session-list/hover-info-card.js +1 -1
  361. package/dist/session-list/locales.js +1 -1
  362. package/dist/session-list/navigation-controls.js +1 -1
  363. package/dist/session-list/navigation-header.js +1 -1
  364. package/dist/session-list/navigation-store.js +1 -1
  365. package/dist/session-list/navigation-tabs.js +1 -1
  366. package/dist/session-list/navigation.js +1 -1
  367. package/dist/session-list/platform.js +1 -1
  368. package/dist/session-list/row-stop-button.js +1 -1
  369. package/dist/session-list/session-groups.js +1 -1
  370. package/dist/session-list/session-info-card.js +1 -1
  371. package/dist/session-list/session-list.js +1 -1
  372. package/dist/session-list/session-row.js +1 -1
  373. package/dist/session-list/session-state-dot.js +1 -1
  374. package/dist/session-list/session-state-menu.js +1 -1
  375. package/dist/session-list/shortcut-hint.js +1 -1
  376. package/dist/session-list/shortcut.js +1 -1
  377. package/dist/session-list/sidebar-overlay.js +1 -1
  378. package/dist/session-list/trailing-swap.js +1 -1
  379. package/dist/session-list/use-activity-notification.js +1 -1
  380. package/dist/session-list/use-activity-preview.js +1 -1
  381. package/dist/session-list/use-cmd-held.js +1 -1
  382. package/dist/session-list/use-project-sessions.js +1 -1
  383. package/dist/session-list/virtual-session-rows.js +1 -1
  384. package/dist/session-timeline/activity-group.js +1 -1
  385. package/dist/session-timeline/activity-projection.js +1 -1
  386. package/dist/session-timeline/assistant-content.js +1 -1
  387. package/dist/session-timeline/assistant-image-references.js +1 -1
  388. package/dist/session-timeline/assistant-turn.js +1 -1
  389. package/dist/session-timeline/async-questions.js +1 -1
  390. package/dist/session-timeline/edited-files-card.js +1 -1
  391. package/dist/session-timeline/history-timeline.js +1 -1
  392. package/dist/session-timeline/host.js +1 -1
  393. package/dist/session-timeline/image-generation-progress.js +1 -1
  394. package/dist/session-timeline/navigation-rail.js +1 -1
  395. package/dist/session-timeline/plan.js +1 -1
  396. package/dist/session-timeline/question-reply.js +1 -1
  397. package/dist/session-timeline/resource-content.js +1 -1
  398. package/dist/session-timeline/session-timeline.js +1 -1
  399. package/dist/session-timeline/timeline-registry.js +1 -1
  400. package/dist/session-timeline/turn-activity.js +1 -1
  401. package/dist/session-timeline/turn-error.js +1 -1
  402. package/dist/session-timeline/turn-retry.js +1 -1
  403. package/dist/session-timeline/turn-time.js +1 -1
  404. package/dist/session-timeline/turns.js +1 -1
  405. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  406. package/dist/session-timeline/user-message.js +1 -1
  407. package/dist/settings/codex-account-card.js +1 -1
  408. package/dist/settings/login-card.js +1 -1
  409. package/dist/settings/model-alias-settings.js +1 -1
  410. package/dist/settings/model-aliases.js +1 -1
  411. package/dist/settings/provider-logos.js +1 -1
  412. package/dist/settings/provider-section.js +1 -1
  413. package/dist/settings/providers-port.js +1 -1
  414. package/dist/settings/providers.js +1 -1
  415. package/dist/settings/settings-bridge.js +1 -1
  416. package/dist/settings/settings.js +1 -1
  417. package/native/win32-x64/alwith_native_chat.dll +0 -0
  418. package/native/win32-x64/artifact.json +1 -1
  419. package/package.json +1 -1
  420. package/dist/chunk-052wfeys.js +0 -2
  421. package/dist/chunk-06wtwk7b.js +0 -2
  422. package/dist/chunk-0z7gy762.js +0 -2
  423. package/dist/chunk-1npqxk6m.js +0 -2
  424. package/dist/chunk-2hkj5qxh.js +0 -2
  425. package/dist/chunk-30a5fgk9.js +0 -2
  426. package/dist/chunk-3tp8fe70.js +0 -2
  427. package/dist/chunk-3tzh25vq.js +0 -2
  428. package/dist/chunk-4sa0m3w5.js +0 -2
  429. package/dist/chunk-5jq3xg3q.js +0 -2
  430. package/dist/chunk-7pwdjhg8.js +0 -2
  431. package/dist/chunk-816tez3v.js +0 -2
  432. package/dist/chunk-9x08kyf6.js +0 -2
  433. package/dist/chunk-ajp19sh9.js +0 -2
  434. package/dist/chunk-bve6cykn.js +0 -2
  435. package/dist/chunk-d6cfxqzx.js +0 -2
  436. package/dist/chunk-e1fzfaqj.js +0 -2
  437. package/dist/chunk-f9xtcxfb.js +0 -2
  438. package/dist/chunk-gs0b02g2.js +0 -2
  439. package/dist/chunk-hnkde8me.js +0 -2
  440. package/dist/chunk-jpr2y0y3.js +0 -2
  441. package/dist/chunk-kkqrxb9w.js +0 -3
  442. package/dist/chunk-kqvgmkvr.js +0 -2
  443. package/dist/chunk-ph7srp7q.js +0 -2
  444. package/dist/chunk-qmcr5f9k.js +0 -2
  445. package/dist/chunk-rkqptd9w.js +0 -2
  446. package/dist/chunk-rv3k0kfr.js +0 -2
  447. package/dist/chunk-s6medm3z.js +0 -2
  448. package/dist/chunk-sfgegn3p.js +0 -2
  449. package/dist/chunk-sjb5stzq.js +0 -2
  450. package/dist/chunk-stv8pr4v.js +0 -2
  451. package/dist/chunk-swkcmtme.js +0 -2
  452. package/dist/chunk-sz993t5e.js +0 -2
  453. package/dist/chunk-tc6d0v1y.js +0 -2
  454. package/dist/chunk-tyrzaz6c.js +0 -2
  455. package/dist/chunk-vt7dkgtx.js +0 -2
  456. package/dist/chunk-x3v10a71.js +0 -2
  457. package/dist/chunk-xnx8p8c0.js +0 -4
  458. package/dist/chunk-ye7ecnej.js +0 -2
@@ -1,2 +1,2 @@
1
- import{St}from"./chunk-arm9x6kc.js";import{it}from"./chunk-pxzj3ae7.js";import{l}from"./chunk-6283nzqs.js";import{g}from"./chunk-zzjth6f2.js";import{j}from"./chunk-hqt5j789.js";import{e}from"./chunk-esbgn8q0.js";import{BlocksIcon as Q,BookOpenIcon as Y,PaperclipIcon as Z,PlusIcon as q,SquareSlashIcon as ee}from"lucide-react";import{useEffect as z,useLayoutEffect as te,useRef as S,useState as M}from"react";import{createPortal as ne}from"react-dom";import{Button as se}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as I,Fragment as oe}from"react/jsx-runtime";function oo({anchorRef:r,commands:k,disabled:i,agentDisabled:c,open:a,onCommand:E,onApp:h,focusInput:L,includeAttachment:f,query:y="",onClose:p,triggerRef:B}){let{client:v,host:N}=e(),{t:d}=N,G=g(),P=S(null),[D,C]=M(null),x=`${a}:${f}:${y}`,[X,U]=M(x);if(X!==x)U(x),C(null);let[F,H]=M([]),[O,T]=M("loading");z(()=>{if(!a||c||!v.installedApps)return;let t=!0;return T("loading"),H([]),v.installedApps().then(({apps:s})=>{if(!t)return;H(s.filter((u)=>u.enabled&&u.callable)),T("ready")},(s)=>{if(!t)return;T("error"),N.reportError?.(s)}),()=>{t=!1}},[a,c,v,N]);let K=(t)=>{if(t.disabled)return;p(),t.run(),L()},W=it(k,y,Number.MAX_SAFE_INTEGER),_=(t)=>({key:`command:${t.key}`,label:t.payload.startsWith("$")?t.label.slice(1):t.label,description:t.description,skillName:t.payload.startsWith("$")?t.payload.slice(1):void 0,disabled:i||c,run:()=>E(t.payload)}),V=St(F,y,(t)=>t.runtimeName||t.id,Number.MAX_SAFE_INTEGER).map(({item:t})=>t),R=[{id:"commands",label:d(f?"composer.attachmentsAndCommands":"composer.commands"),entries:[...f?[{key:"attachment",label:d("composer.addAttachment"),disabled:i,run:()=>G.openFileDialog()}]:[],...W.filter((t)=>!t.payload.startsWith("$")).map(_)],status:void 0},{id:"skills",label:d("composer.skills"),entries:W.filter((t)=>t.payload.startsWith("$")).map(_),status:void 0},{id:"apps",label:d("composer.apps"),entries:V.map((t)=>({key:`app:${t.id}`,label:t.runtimeName||t.id,disabled:i||c,run:()=>h({id:t.id,name:t.runtimeName||t.id})})),status:O==="loading"?d("composer.appsLoading"):O==="error"?d("composer.appsFailed"):F.length===0&&!y.trim()?d("composer.appsEmpty"):void 0}].filter((t)=>(t.id!=="apps"||!c&&Boolean(v.installedApps))&&(!y.trim()||t.entries.length>0||t.status)),m=R.flatMap((t)=>t.entries).filter((t)=>!t.disabled),b=m.some((t)=>t.key===D)?D:m[0]?.key;if(z(()=>{if(!a)return;let t=L();if(!t)throw Error("The composer input is missing");let s=(n)=>{if(n.target instanceof Node&&!P.current?.contains(n.target)&&!B?.current?.contains(n.target)&&!t.contains(n.target))p()},u=(n)=>{if(n.isComposing||n.keyCode===229)return;if(n.key==="Escape")n.preventDefault(),n.stopPropagation(),p();else if(n.key==="ArrowDown"||n.key==="ArrowUp"){n.preventDefault(),n.stopPropagation();let w=m.findIndex((J)=>J.key===b),A=Math.max(0,Math.min(m.length-1,w+(n.key==="ArrowDown"?1:-1)));if(m[A])C(m[A].key)}else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let w=m.find((A)=>A.key===b);if(w)K(w)}};if(t.addEventListener("keydown",u,!0),f)t.addEventListener("input",p);return t.addEventListener("blur",p),document.addEventListener("pointerdown",s,!0),()=>{t.removeEventListener("keydown",u,!0),t.removeEventListener("input",p),t.removeEventListener("blur",p),document.removeEventListener("pointerdown",s,!0)}},[a,b,m,L,p,f,B]),te(()=>{if(a)P.current?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})},[a,b]),!a)return null;if(!r.current)throw Error("The composer menu anchor is missing");return ne(o("div",{className:l.position,children:o("div",{ref:P,role:"listbox","aria-label":d(f?"composer.add":"composer.commands"),onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:I("div",{className:l.list,children:[R.length===0&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:d("composer.addEmpty")}),R.map((t)=>I("div",{role:"group","aria-label":t.label,children:[o("div",{className:l.group,children:t.label}),t.entries.map((s)=>{let u=s.key==="attachment"?Z:t.id==="skills"?Y:t.id==="apps"?Q:ee,n=s.skillName===void 0?void 0:N.skillIcon?.(s.skillName);return I(se,{type:"button",variant:"ghost",role:"option",disabled:s.disabled,"aria-selected":s.key===b,onMouseEnter:()=>{if(!s.disabled)C(s.key)},onClick:()=>K(s),className:`${l.row}${s.key===b?` ${l.selected}`:""}`,children:[n?o("img",{src:n,alt:"","aria-hidden":"true",className:`${l.icon} object-contain`}):o(u,{className:l.icon}),o("span",{className:l.label,children:s.label}),s.description&&o("span",{"data-slot":"description",className:l.description,children:s.description})]},s.key)}),t.status&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:t.status})]},t.id))]})})}),r.current)}function Li({agentControls:r,onOpenChange:k,...i}){let{host:c}=e(),a=g(),E=S(null),h=S(!1);return I(oe,{children:[o(j,{ref:E,disabled:i.disabled,"aria-label":c.t(r?"composer.add":"composer.attachImage"),title:c.t(r?"composer.add":"composer.attachImage"),"aria-haspopup":r?"listbox":void 0,"aria-expanded":r?i.open:void 0,className:"text-foreground",onPointerDown:()=>{h.current=i.open},onClick:()=>{if(r)k(!h.current),i.focusInput();else a.openFileDialog()},children:o(q,{className:"size-4"})}),r&&i.open&&o(oo,{...i,includeAttachment:!0,onClose:()=>k(!1),triggerRef:E})]})}
2
- export{oo,Li};
1
+ import{It}from"./chunk-s6y31dcb.js";import{ot}from"./chunk-df9aqj1m.js";import{l}from"./chunk-6283nzqs.js";import{g}from"./chunk-86821qec.js";import{z}from"./chunk-8y706gz3.js";import{e}from"./chunk-abgdqy92.js";import{BlocksIcon as Q,BookOpenIcon as Y,PaperclipIcon as Z,PlusIcon as q,SquareSlashIcon as ee}from"lucide-react";import{useEffect as j,useLayoutEffect as te,useRef as S,useState as M}from"react";import{createPortal as ne}from"react-dom";import{Button as se}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as I,Fragment as oe}from"react/jsx-runtime";function uo({anchorRef:r,commands:k,disabled:i,agentDisabled:c,open:a,onCommand:E,onApp:h,focusInput:L,includeAttachment:f,query:y="",onClose:p,triggerRef:B}){let{client:v,host:N}=e(),{t:d}=N,G=g(),P=S(null),[D,C]=M(null),x=`${a}:${f}:${y}`,[X,U]=M(x);if(X!==x)U(x),C(null);let[F,H]=M([]),[O,T]=M("loading");j(()=>{if(!a||c||!v.installedApps)return;let t=!0;return T("loading"),H([]),v.installedApps().then(({apps:s})=>{if(!t)return;H(s.filter((u)=>u.enabled&&u.callable)),T("ready")},(s)=>{if(!t)return;T("error"),N.reportError?.(s)}),()=>{t=!1}},[a,c,v,N]);let K=(t)=>{if(t.disabled)return;p(),t.run(),L()},W=ot(k,y,Number.MAX_SAFE_INTEGER),_=(t)=>({key:`command:${t.key}`,label:t.payload.startsWith("$")?t.label.slice(1):t.label,description:t.description,skillName:t.payload.startsWith("$")?t.payload.slice(1):void 0,disabled:i||c,run:()=>E(t.payload)}),V=It(F,y,(t)=>t.runtimeName||t.id,Number.MAX_SAFE_INTEGER).map(({item:t})=>t),R=[{id:"commands",label:d(f?"composer.attachmentsAndCommands":"composer.commands"),entries:[...f?[{key:"attachment",label:d("composer.addAttachment"),disabled:i,run:()=>G.openFileDialog()}]:[],...W.filter((t)=>!t.payload.startsWith("$")).map(_)],status:void 0},{id:"skills",label:d("composer.skills"),entries:W.filter((t)=>t.payload.startsWith("$")).map(_),status:void 0},{id:"apps",label:d("composer.apps"),entries:V.map((t)=>({key:`app:${t.id}`,label:t.runtimeName||t.id,disabled:i||c,run:()=>h({id:t.id,name:t.runtimeName||t.id})})),status:O==="loading"?d("composer.appsLoading"):O==="error"?d("composer.appsFailed"):F.length===0&&!y.trim()?d("composer.appsEmpty"):void 0}].filter((t)=>(t.id!=="apps"||!c&&Boolean(v.installedApps))&&(!y.trim()||t.entries.length>0||t.status)),m=R.flatMap((t)=>t.entries).filter((t)=>!t.disabled),b=m.some((t)=>t.key===D)?D:m[0]?.key;if(j(()=>{if(!a)return;let t=L();if(!t)throw Error("The composer input is missing");let s=(n)=>{if(n.target instanceof Node&&!P.current?.contains(n.target)&&!B?.current?.contains(n.target)&&!t.contains(n.target))p()},u=(n)=>{if(n.isComposing||n.keyCode===229)return;if(n.key==="Escape")n.preventDefault(),n.stopPropagation(),p();else if(n.key==="ArrowDown"||n.key==="ArrowUp"){n.preventDefault(),n.stopPropagation();let w=m.findIndex((J)=>J.key===b),A=Math.max(0,Math.min(m.length-1,w+(n.key==="ArrowDown"?1:-1)));if(m[A])C(m[A].key)}else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let w=m.find((A)=>A.key===b);if(w)K(w)}};if(t.addEventListener("keydown",u,!0),f)t.addEventListener("input",p);return t.addEventListener("blur",p),document.addEventListener("pointerdown",s,!0),()=>{t.removeEventListener("keydown",u,!0),t.removeEventListener("input",p),t.removeEventListener("blur",p),document.removeEventListener("pointerdown",s,!0)}},[a,b,m,L,p,f,B]),te(()=>{if(a)P.current?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})},[a,b]),!a)return null;if(!r.current)throw Error("The composer menu anchor is missing");return ne(o("div",{className:l.position,children:o("div",{ref:P,role:"listbox","aria-label":d(f?"composer.add":"composer.commands"),onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:I("div",{className:l.list,children:[R.length===0&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:d("composer.addEmpty")}),R.map((t)=>I("div",{role:"group","aria-label":t.label,children:[o("div",{className:l.group,children:t.label}),t.entries.map((s)=>{let u=s.key==="attachment"?Z:t.id==="skills"?Y:t.id==="apps"?Q:ee,n=s.skillName===void 0?void 0:N.skillIcon?.(s.skillName);return I(se,{type:"button",variant:"ghost",role:"option",disabled:s.disabled,"aria-selected":s.key===b,onMouseEnter:()=>{if(!s.disabled)C(s.key)},onClick:()=>K(s),className:`${l.row}${s.key===b?` ${l.selected}`:""}`,children:[n?o("img",{src:n,alt:"","aria-hidden":"true",className:`${l.icon} object-contain`}):o(u,{className:l.icon}),o("span",{className:l.label,children:s.label}),s.description&&o("span",{"data-slot":"description",className:l.description,children:s.description})]},s.key)}),t.status&&o("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:l.notice,children:t.status})]},t.id))]})})}),r.current)}function Vi({agentControls:r,onOpenChange:k,...i}){let{host:c}=e(),a=g(),E=S(null),h=S(!1);return I(oe,{children:[o(z,{ref:E,disabled:i.disabled,"aria-label":c.t(r?"composer.add":"composer.attachImage"),title:c.t(r?"composer.add":"composer.attachImage"),"aria-haspopup":r?"listbox":void 0,"aria-expanded":r?i.open:void 0,className:"text-foreground",onPointerDown:()=>{h.current=i.open},onClick:()=>{if(r)k(!h.current),i.focusInput();else a.openFileDialog()},children:o(q,{className:"size-4"})}),r&&i.open&&o(uo,{...i,includeAttachment:!0,onClose:()=>k(!1),triggerRef:E})]})}
2
+ export{uo,Vi};
@@ -1,2 +1,2 @@
1
- import{ExternalLinkIcon as d}from"lucide-react";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as c,CardContent as s,CardDescription as p,CardFooter as C,CardHeader as m,CardTitle as v}from"@nyssance/shadcn/vega/components/ui/card";import{jsx as a,jsxs as e}from"react/jsx-runtime";function Si({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(c,{size:"sm",children:[e(m,{children:[a(p,{children:i("approval.needed")}),a(v,{children:r})]}),a(s,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(d,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(C,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
2
- export{Si};
1
+ import{ExternalLinkIcon as d}from"lucide-react";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as c,CardContent as s,CardDescription as p,CardFooter as C,CardHeader as m,CardTitle as v}from"@nyssance/shadcn/vega/components/ui/card";import{jsx as a,jsxs as e}from"react/jsx-runtime";function Wi({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(c,{size:"sm",children:[e(m,{children:[a(p,{children:i("approval.needed")}),a(v,{children:r})]}),a(s,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(d,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(C,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
2
+ export{Wi};
@@ -1,2 +1,2 @@
1
- import{Rn,po}from"./chunk-evpjxbzm.js";import{Vi}from"./chunk-jpr5ewnh.js";import{CodexClient as p}from"@nyssance/codex-acp-v2/client";class lo extends p{applicationRegistry=new po((t)=>this.holds(t)?this.session(t):void 0);toolSelection;constructor(t,e,n={}){let{applicationTools:i=[],...o}=e;super(t,o,n);this.toolSelection=i}applicationToolsFor(t){return typeof this.toolSelection==="function"?this.toolSelection(t):this.toolSelection}async requestContext(t,e,n){let i=(await this.applicationToolsFor({cwd:t,operation:e,options:n})).map((s)=>({...s,inputSchema:structuredClone(s.inputSchema)})),o=await super.requestContext(t,e,n),a=Rn(i),r=o._meta?.alwith;if(i.length&&r?.tools!==void 0)throw Error("Application tools must be registered through the client");return{...o,...i.length?{_meta:{...o._meta,alwith:{...r,tools:a}}}:{},bind:async(s)=>{await o.bind?.(s),this.applicationRegistry.bind(s,i,a.revision)}}}acceptsPendingRequest(t){return t.method!=="_alwith/tool/call"&&super.acceptsPendingRequest(t)}handleNotification(t,e){if(t==="$/cancel_request"&&this.applicationRegistry.withdraw(e?.requestId))return!0;return super.handleNotification(t,e)}handleAgentRequest(t,e){return this.applicationRegistry.handle(t,e)||super.handleAgentRequest(t,e)}onDisconnected(){this.applicationRegistry.clear(),super.onDisconnected()}onSessionDropped(t){this.applicationRegistry.drop(t),super.onSessionDropped(t)}async cancel(t){this.applicationRegistry.cancel(t),await super.cancel(t)}async close(t){this.applicationRegistry.drop(t),await super.close(t)}async stopSession(t){this.applicationRegistry.drop(t),await super.stopSession(t)}async installedApps(t){let e=this.live(),n=await super.installedApps(t),i=await Vi((o,a)=>e.request(o,a),n.apps.map((o)=>o.id),t?.threadId);if(e!==this.live())throw Error("Application metadata belongs to a disconnected agent");return{apps:n.apps.map((o)=>({...o,...i.get(o.id)}))}}}
2
- export{lo};
1
+ import{Bn,_o}from"./chunk-cvx7r35k.js";import{hr}from"./chunk-3chhwwwy.js";import{CodexClient as p}from"@nyssance/codex-acp-v2/client";class Co extends p{applicationRegistry=new _o((t)=>this.holds(t)?this.session(t):void 0);toolSelection;constructor(t,e,n={}){let{applicationTools:i=[],...o}=e;super(t,o,n);this.toolSelection=i}applicationToolsFor(t){return typeof this.toolSelection==="function"?this.toolSelection(t):this.toolSelection}async requestContext(t,e,n){let i=(await this.applicationToolsFor({cwd:t,operation:e,options:n})).map((s)=>({...s,inputSchema:structuredClone(s.inputSchema)})),o=await super.requestContext(t,e,n),a=Bn(i),r=o._meta?.alwith;if(i.length&&r?.tools!==void 0)throw Error("Application tools must be registered through the client");return{...o,...i.length?{_meta:{...o._meta,alwith:{...r,tools:a}}}:{},bind:async(s)=>{await o.bind?.(s),this.applicationRegistry.bind(s,i,a.revision)}}}acceptsPendingRequest(t){return t.method!=="_alwith/tool/call"&&super.acceptsPendingRequest(t)}handleNotification(t,e){if(t==="$/cancel_request"&&this.applicationRegistry.withdraw(e?.requestId))return!0;return super.handleNotification(t,e)}handleAgentRequest(t,e){return this.applicationRegistry.handle(t,e)||super.handleAgentRequest(t,e)}onDisconnected(){this.applicationRegistry.clear(),super.onDisconnected()}onSessionDropped(t){this.applicationRegistry.drop(t),super.onSessionDropped(t)}async cancel(t){this.applicationRegistry.cancel(t),await super.cancel(t)}async close(t){this.applicationRegistry.drop(t),await super.close(t)}async stopSession(t){this.applicationRegistry.drop(t),await super.stopSession(t)}async installedApps(t){let e=this.live(),n=await super.installedApps(t),i=await hr((o,a)=>e.request(o,a),n.apps.map((o)=>o.id),t?.threadId);if(e!==this.live())throw Error("Application metadata belongs to a disconnected agent");return{apps:n.apps.map((o)=>({...o,...i.get(o.id)}))}}}
2
+ export{Co};
@@ -1,2 +1,2 @@
1
- import{E}from"./chunk-44r55va6.js";import{s}from"./chunk-bba9qej8.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function $s({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return E(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
2
- export{$s};
1
+ import{L}from"./chunk-f4h84pav.js";import{s}from"./chunk-6c18ag8t.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function ga({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return L(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
2
+ export{ga};
@@ -0,0 +1,2 @@
1
+ import{Br}from"./chunk-6c18ag8t.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function Ks({host:o,children:t}){return s(n,{value:o,children:t})}function N(){let o=i(n),e={...Br(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function qi(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function ue(){let o=N();return(t)=>qi(o,t)}function Ki(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
2
+ export{Ks,N,qi,ue,Ki};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-73e9vpm9.js";import{Rt}from"./chunk-dsf2x63w.js";import{Dr}from"./chunk-d0s10qy5.js";import{D}from"./chunk-j39bhfsp.js";import{zo}from"./chunk-7d1wnjw5.js";import{isContentEntry as T,isEmbeddedResource as h,isResourceLink as x,terminalOf as A}from"@nyssance/codex-acp-v2/client";import{memo as I,useMemo as y}from"react";import{jsx as s,jsxs as g,Fragment as C}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(T).filter((e)=>h(e.content)||x(e.content));if(r.length===0)return null;return g("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(D,{block:e.content},`${n.id}:${l}`))]})}var Eo=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(zo),c=b.toolBlock,m=y(()=>new WeakMap,[r,i,c]),v=y(()=>e.map((o)=>{let f=o.kind==="tool"?A(o,l):null,u=o.kind==="thought"&&o.id===a,d=m.get(o);if(d?.terminal===f&&d.thinking===u)return d.block;let p={...Dr(o,l,u),id:JSON.stringify([r,i?"history":"live",o.id])},k=p.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(p,o):p;return m.set(o,{terminal:f,thinking:u,block:k}),k}),[r,i,e,l,a,c,m]);return g(C,{children:[s(Rt,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
2
- export{Eo};
1
+ import{t}from"./chunk-pdmayjan.js";import{Ut}from"./chunk-61awcdaq.js";import{xi}from"./chunk-62qtrk0p.js";import{F}from"./chunk-s6b28p84.js";import{ro}from"./chunk-3hjcpcnv.js";import{isContentEntry as T,isEmbeddedResource as h,isResourceLink as x,terminalOf as A}from"@nyssance/codex-acp-v2/client";import{memo as I,useMemo as y}from"react";import{jsx as s,jsxs as g,Fragment as C}from"react/jsx-runtime";function R({item:n}){if(n.name==="view_image"&&n.status==="completed")return null;let r=n.content.filter(T).filter((e)=>h(e.content)||x(e.content));if(r.length===0)return null;return g("fieldset",{className:"mt-1 min-w-0",children:[s("legend",{className:"text-muted-foreground text-xs",children:n.title??n.name}),r.map((e,l)=>s(F,{block:e.content},`${n.id}:${l}`))]})}var eo=I(function({sessionId:r,items:e,terminals:l,streamingThoughtId:a}){let b=t(),i=e.every(ro),c=b.toolBlock,m=y(()=>new WeakMap,[r,i,c]),v=y(()=>e.map((o)=>{let f=o.kind==="tool"?A(o,l):null,u=o.kind==="thought"&&o.id===a,d=m.get(o);if(d?.terminal===f&&d.thinking===u)return d.block;let p={...xi(o,l,u),id:JSON.stringify([r,i?"history":"live",o.id])},k=p.type==="tool_use"&&o.kind==="tool"&&c!==void 0?c(p,o):p;return m.set(o,{terminal:f,thinking:u,block:k}),k}),[r,i,e,l,a,c,m]);return g(C,{children:[s(Ut,{blocks:v,defaultExpanded:!i}),e.map((o)=>o.kind==="tool"&&s(R,{item:o},o.id))]})});
2
+ export{eo};
@@ -1,2 +1,2 @@
1
- import{createContext as o,useContext as n,useEffect as r}from"react";var xi=o(null);function E(t){let e=n(xi);r(()=>{if(t&&e!==null)return e()},[t,e])}
2
- export{xi,E};
1
+ import{createContext as o,useContext as n,useEffect as r}from"react";var Gr=o(null);function L(t){let e=n(Gr);r(()=>{if(t&&e!==null)return e()},[t,e])}
2
+ export{Gr,L};
@@ -1,2 +1,2 @@
1
- import{Xe,tn}from"./chunk-rp7tnbss.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 Ys(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(tn,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 ea({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 De(o){let{store:t}=Yn(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function ue(){return Yn().dispatch}
2
- export{fi,Ys,ea,Yn,De,ue};
1
+ import{Xe,nn}from"./chunk-n8v6cdq3.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 Di(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 Us(o,{reportError:t=console.error}={}){let e=S(Xe()),r=async()=>{e.setState(Di(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 Bs({store:o,children:t}){return w(f,{value:o,children:t})}function lo(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function Te(o){let{store:t}=lo(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function de(){return lo().dispatch}
2
+ export{Di,Us,Bs,lo,Te,de};
@@ -1,2 +1,2 @@
1
- import{Qo}from"./chunk-ath5nv2w.js";import{XIcon as i}from"lucide-react";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as o}from"react/jsx-runtime";function xe({app:a,remove:e}){return o("span",{"data-app-reference":a.id,title:a.name,className:"inline-flex max-w-full items-baseline gap-1 align-baseline",children:[n(Qo,{kind:"app",name:a.name}),e&&n(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4 shrink-0","aria-label":e.label,disabled:e.disabled,onClick:e.onClick,children:n(i,{className:"size-3","aria-hidden":"true"})})]})}
1
+ import{Go}from"./chunk-1ycyexae.js";import{XIcon as i}from"lucide-react";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as o}from"react/jsx-runtime";function xe({app:a,remove:e}){return o("span",{"data-app-reference":a.id,title:a.name,className:"inline-flex max-w-full items-baseline gap-1 align-baseline",children:[n(Go,{kind:"app",name:a.name}),e&&n(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4 shrink-0","aria-label":e.label,disabled:e.disabled,onClick:e.onClick,children:n(i,{className:"size-3","aria-hidden":"true"})})]})}
2
2
  export{xe};
@@ -1,3 +1,3 @@
1
- import{s,a,n}from"./chunk-bba9qej8.js";import{Qe,de,oe}from"./chunk-9x08kyf6.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as ce}from"cn";import{ArchiveIcon as ue,FolderIcon as Q,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as U}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as r}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:ce("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function Bs({Scroll:u=we}){let{t:i,i18n:A}=s(),m=a(),S=n((e)=>e.archivedSessions),N=n((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,Z]=d("all"),[ee,te]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[se,G]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let l=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(l.has(v))throw Error("Archive pagination returned a repeated cursor");l.add(v),await m.listArchived()}}catch(l){if(!e)F(E(l))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,ee]);let o=n((e)=>e.projectContext),k=!(o!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ie=[...new Set(S.filter((e)=>o&&j(o,e).id!==oe).map((e)=>o?j(o,e).id:e.cwd))].toSorted(),ne=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=o?j(o,e).id:null,l=c===oe;return L(e).toLocaleLowerCase(A.language).includes(ne)&&(y==="all"||(y==="quick"?l:!l))&&(p==="all"||(p==="quick"?l:c===p))}),ae=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function re(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function le(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let l of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===l.sessionId))continue;try{await m.delete(l.sessionId)}catch(v){e.push(l),c.push(`${L(l)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
2
- `));else f(null)}finally{h.current=!1,w(!1)}}return r("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[r("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[r("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),r(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),r("div",{className:"flex shrink-0 flex-wrap gap-3",children:[r("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),r(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Y(e)},children:[r(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),r(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");Z(e)},children:[r(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):de(p,o??void 0)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ie.map((e)=>t(x,{value:e,title:e,children:de(e,o??void 0)},e))]})]})]}),r(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?r("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:r(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>te((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?r("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(ue,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(o?Qe(K,o):[]).filter(([,e])=>e.length>0).map(([e,c])=>r("section",{className:"flex flex-col gap-3",children:[r("div",{className:"flex items-center justify-between gap-3",children:[r("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===oe?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===oe?i("sessionList.archives.noProject"):de(e,o??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((l)=>r("article",{"aria-label":L(l),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[r("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(l),children:L(l)}),l.updatedAt!==null&&t("time",{dateTime:l.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:ae.format(new Date(l.updatedAt))})]}),r("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([l])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void re(l),children:i("sessionList.archives.unarchive")})]})]},l.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:r(ge,{showCloseButton:!C,children:[r(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(se?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),r(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),r(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void le(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
3
- export{Bs};
1
+ import{s,a,n}from"./chunk-6c18ag8t.js";import{it,he,re}from"./chunk-mqpkm974.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as ce}from"cn";import{ArchiveIcon as de,FolderIcon as Q,ListFilterIcon as ue,SearchIcon as me,Trash2Icon as U}from"lucide-react";import{useEffect as pe,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as r}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:ce("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function fa({Scroll:u=we}){let{t:i,i18n:A}=s(),m=a(),S=n((e)=>e.archivedSessions),N=n((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,Z]=d("all"),[ee,te]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[O,b]=d(null),[se,G]=d(!1);pe(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let l=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(l.has(v))throw Error("Archive pagination returned a repeated cursor");l.add(v),await m.listArchived()}}catch(l){if(!e)F(E(l))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,ee]);let o=n((e)=>e.projectContext),k=!(o!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ie=[...new Set(S.filter((e)=>o&&j(o,e).id!==re).map((e)=>o?j(o,e).id:e.cwd))].toSorted(),ne=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=o?j(o,e).id:null,l=c===re;return L(e).toLocaleLowerCase(A.language).includes(ne)&&(y==="all"||(y==="quick"?l:!l))&&(p==="all"||(p==="quick"?l:c===p))}),ae=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function le(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function oe(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let l of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===l.sessionId))continue;try{await m.delete(l.sessionId)}catch(v){e.push(l),c.push(`${L(l)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
2
+ `));else f(null)}finally{h.current=!1,w(!1)}}return r("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[r("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[r("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),r(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(U,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),r("div",{className:"flex shrink-0 flex-wrap gap-3",children:[r("div",{className:"relative min-w-48 flex-1",children:[t(me,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),r(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Y(e)},children:[r(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(ue,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),r(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");Z(e)},children:[r(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):he(p,o??void 0)})]}),r(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ie.map((e)=>t(x,{value:e,title:e,children:he(e,o??void 0)},e))]})]})]}),r(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?r("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:r(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>te((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?r("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(de,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(o?it(K,o):[]).filter(([,e])=>e.length>0).map(([e,c])=>r("section",{className:"flex flex-col gap-3",children:[r("div",{className:"flex items-center justify-between gap-3",children:[r("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===re?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===re?i("sessionList.archives.noProject"):he(e,o??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((l)=>r("article",{"aria-label":L(l),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[r("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(l),children:L(l)}),l.updatedAt!==null&&t("time",{dateTime:l.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:ae.format(new Date(l.updatedAt))})]}),r("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([l])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void le(l),children:i("sessionList.archives.unarchive")})]})]},l.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:r(ge,{showCloseButton:!C,children:[r(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(se?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),r(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),r(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void oe(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
3
+ export{fa};
@@ -1,2 +1,2 @@
1
- function He(e){if(e.startsWith("\\\\?\\UNC\\"))e="\\\\"+e.slice(8);else if(e.startsWith("\\\\?\\"))e=e.slice(4);if(/^[a-z]:[\\/]/i.test(e))e="/"+e.replaceAll("\\","/");else if(e.startsWith("\\\\"))e=e.replaceAll("\\","/");if(!e.startsWith("/"))throw Error("File URLs require an absolute path");let i=encodeURI(e).replaceAll(/[?#]/g,encodeURIComponent);return e.startsWith("//")?`file:${i}`:`file://${i}`}
2
- export{He};
1
+ function Ae(e){if(e.startsWith("\\\\?\\UNC\\"))e="\\\\"+e.slice(8);else if(e.startsWith("\\\\?\\"))e=e.slice(4);if(/^[a-z]:[\\/]/i.test(e))e="/"+e.replaceAll("\\","/");else if(e.startsWith("\\\\"))e=e.replaceAll("\\","/");if(!e.startsWith("/"))throw Error("File URLs require an absolute path");let i=encodeURI(e).replaceAll(/[?#]/g,encodeURIComponent);return e.startsWith("//")?`file:${i}`:`file://${i}`}
2
+ export{Ae};
@@ -1,2 +1,2 @@
1
- import{Et}from"./chunk-rv3k0kfr.js";import{isContentEntry as m,isImage as d,isText as p}from"@nyssance/codex-acp-v2/client";var Na="generate_image",Aa=[{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}],Wa={model:"wham",size:"auto"},uo={version:1,revision:"images-v1",definitions:[{name:Na,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=Aa.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function Za(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{Na,Aa,Wa,uo,$i,te,Za};
1
+ import{Pt}from"./chunk-b42vv8f2.js";import{isContentEntry as m,isImage as d,isText as p}from"@nyssance/codex-acp-v2/client";var Oa="generate_image",Ha=[{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}],Za={model:"wham",size:"auto"},Po={version:1,revision:"images-v1",definitions:[{name:Oa,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 vr(o){return o.items.flatMap((t)=>{if(!Pt(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 ee(o){let t=Ha.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function Qa(o,t,r){let i=ee(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{Oa,Ha,Za,Po,vr,ee,Qa};
@@ -0,0 +1,2 @@
1
+ import{o}from"./chunk-pdmayjan.js";import{wn,e,x}from"./chunk-abgdqy92.js";import{Ne}from"./chunk-bcdw682e.js";import{Bt}from"./chunk-bej9z041.js";import{Gt}from"./chunk-04frqm59.js";import{zt,Vt}from"./chunk-7ac4g54f.js";import{jt}from"./chunk-04c5k3qr.js";import{LockIcon as H,UnplugIcon as k}from"lucide-react";import{useMemo as O,useRef as S}from"react";import{Alert as C,AlertDescription as N,AlertTitle as h}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as M,EmptyDescription as P,EmptyHeader as z,EmptyTitle as B}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as r,jsxs as i}from"react/jsx-runtime";function _s({host:t,client:c,...s}){let m=O(()=>t.openDiff?t:{...t,openDiff:zt},[t]);return i(wn,{host:m,client:c,children:[r(I,{...s}),!t.openDiff&&r(Vt,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:D,readOnlyActions:g,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=S(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:n}=d,f=o((a)=>a.connection==="ready"),v=o((a)=>a.historyPages[t.id]?.error),y=()=>x(d,R.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return i("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,i("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!u&&r(Gt,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&r("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:i(C,{children:[r(k,{}),r(h,{children:n("conversation.stopped")}),r(N,{children:r(w,{size:"sm",variant:"outline",onClick:y,children:n("conversation.reconnect")})})]})}),u?E??r(M,{className:"flex-1",children:i(z,{children:[r(B,{className:"text-[28px] font-normal",children:n("conversation.welcomeTitle")}),r(P,{children:n("conversation.welcomeDescription")})]})}):r(Bt,{session:t,timeline:m}),r(jt,{sessionId:t.id}),t.readOnly?r("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:i(C,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[i("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[r(H,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("div",{className:"min-w-0 space-y-1",children:[r(h,{children:n("conversation.readOnlyTitle")}),r(N,{children:n("conversation.readOnlyDescription")}),v&&r("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),i("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[r(w,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:n(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),g]})]})}):D??r(Ne,{session:t})]}),T]})}
2
+ export{_s};
@@ -1,2 +1,2 @@
1
- import{Ce}from"./chunk-dr5swvaa.js";import{isContentEntry as u,isImage as c,isText as s}from"@nyssance/codex-acp-v2/client";var d=Ce();function Do(f,m){let i=new Set;for(let e of m){if(e.kind!=="tool"||e.status!=="completed")continue;let o=e.content.filter(u);if(!o.some((n)=>c(n.content)))continue;o.forEach((n,a)=>{if(c(n.content))i.add(`${e.id}:${a}`);if(!s(n.content))return;let r;try{r=JSON.parse(n.content.text)}catch(t){if(t instanceof SyntaxError)return;throw t}if(r===null||typeof r!=="object"||!("kind"in r)||r.kind!=="alwith.image"||!("images"in r)||!Array.isArray(r.images))return;for(let t of r.images)if(t!==null&&typeof t==="object"&&typeof t.reference==="string")i.add(t.reference)})}if(i.size===0)return f;return f.map((e)=>{if(!s(e)||!e.text.includes("!["))return e;let o=d.lexer(e.text).map((n)=>{if(n.type!=="paragraph"||!n.tokens)return n.raw;let a=0;return n.tokens.map((t)=>(a+=t.raw.length,t.type==="image"&&i.has(t.href)?"":t.raw)).join("")+n.raw.slice(a)}).join("");return o===e.text?e:{...e,text:o}}).filter((e)=>!s(e)||e.text.trim().length>0)}
2
- export{Do};
1
+ import{ye}from"./chunk-56rx2rmj.js";import{isContentEntry as u,isImage as c,isText as s}from"@nyssance/codex-acp-v2/client";var d=ye();function to(f,m){let i=new Set;for(let e of m){if(e.kind!=="tool"||e.status!=="completed")continue;let o=e.content.filter(u);if(!o.some((n)=>c(n.content)))continue;o.forEach((n,a)=>{if(c(n.content))i.add(`${e.id}:${a}`);if(!s(n.content))return;let r;try{r=JSON.parse(n.content.text)}catch(t){if(t instanceof SyntaxError)return;throw t}if(r===null||typeof r!=="object"||!("kind"in r)||r.kind!=="alwith.image"||!("images"in r)||!Array.isArray(r.images))return;for(let t of r.images)if(t!==null&&typeof t==="object"&&typeof t.reference==="string")i.add(t.reference)})}if(i.size===0)return f;return f.map((e)=>{if(!s(e)||!e.text.includes("!["))return e;let o=d.lexer(e.text).map((n)=>{if(n.type!=="paragraph"||!n.tokens)return n.raw;let a=0;return n.tokens.map((t)=>(a+=t.raw.length,t.type==="image"&&i.has(t.href)?"":t.raw)).join("")+n.raw.slice(a)}).join("");return o===e.text?e:{...e,text:o}}).filter((e)=>!s(e)||e.text.trim().length>0)}
2
+ export{to};
@@ -1,2 +1,2 @@
1
- import{pr}from"./chunk-p3gawvqr.js";import{g}from"./chunk-zzjth6f2.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};
1
+ import{yr}from"./chunk-q5qqhqw4.js";import{g}from"./chunk-86821qec.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(yr,{containerRef:C,filename:a||n("input.image"),onOpenChange:f,onScaleChange:d,open:u,scale:I,url:t.url})]})}function rr({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,rr};
@@ -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 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 Xr(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 Yr(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function es(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,Xr,Yr,es};
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 Ko(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 fs(t,o){let e=Ko(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 hs(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function vs(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{Ko,fs,hs,vs};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-73e9vpm9.js";import{Dt}from"./chunk-c2h4wr7g.js";import{zr,Vr,jr}from"./chunk-kn792h8n.js";import{Gr}from"./chunk-y3mx5sf0.js";import{ye}from"./chunk-7d1wnjw5.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 Ua(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:ye(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{Ua,Ur,Br};
1
+ import{t}from"./chunk-pdmayjan.js";import{Dt}from"./chunk-bydxp3zj.js";import{zr,Vr,jr}from"./chunk-2zy75522.js";import{ss}from"./chunk-tzczzqde.js";import{ce}from"./chunk-3hjcpcnv.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 Aa(i,n){return{installUnlock:n==="none"?()=>()=>{}:Vr,preload:()=>{if(n!=="none")zr(i)},playSequence:(a,d,l)=>jr(a,d,l,i,n)}}function Pi(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:ce(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 Ii(i){return r(ss,{...i,renderPreview:(n)=>r(T,{item:n})})}
2
+ export{Aa,Pi,Ii};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-73e9vpm9.js";import{yn}from"./chunk-f9xtcxfb.js";import{FileIcon as i,XIcon as m}from"lucide-react";import{Badge as r}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Ni({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(r,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(i,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:yn(e)}),o(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:yn(e)}),onClick:()=>n(e),children:o(m,{className:"size-3"})})]},e))})}
2
- export{Ni};
1
+ import{t}from"./chunk-pdmayjan.js";import{rn}from"./chunk-jq6qs3s6.js";import{FileIcon as i,XIcon as m}from"lucide-react";import{Badge as r}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Oi({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(r,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(i,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:rn(e)}),o(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:rn(e)}),onClick:()=>n(e),children:o(m,{className:"size-3"})})]},e))})}
2
+ export{Oi};
@@ -1,2 +1,2 @@
1
- import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function yr({ref:f,value:r,onChange:p,onFind:o,onClose:s,placeholder:d,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:m}){let n=N(null);B(f,()=>{if(n.current===null)throw Error("FindBar input is not mounted");return n.current},[]),z(()=>{if(!a)return;let e=n.current;if(e===null)throw Error("FindBar input is not mounted");e.focus({preventScroll:!0}),e.select()},[a]);let u=!r;return k("div",{className:v("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",m),children:[t(E,{ref:n,value:r,onChange:(e)=>p(e.target.value),placeholder:d,className:"h-7 text-xs",onKeyDown:(e)=>{if(e.key==="Escape"){e.preventDefault(),s();return}if(e.key==="Enter"){if(e.preventDefault(),r)o(e.shiftKey)}}}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!0),title:l?`${l} (⇧↵)`:"⇧↵",children:t(g,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:t(h,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:t(b,{className:"size-3.5"})})]})}
2
- export{yr};
1
+ import{cn as v}from"cn";import{ChevronDownIcon as h,ChevronUpIcon as g,XIcon as b}from"lucide-react";import{useEffect as z,useImperativeHandle as B,useRef as N}from"react";import{Button as i}from"@nyssance/shadcn/vega/components/ui/button";import{Input as E}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as t,jsxs as k}from"react/jsx-runtime";function Yo({ref:f,value:r,onChange:p,onFind:o,onClose:s,placeholder:d,autoFocusOpen:a=!0,prevTitle:l,nextTitle:c,className:m}){let n=N(null);B(f,()=>{if(n.current===null)throw Error("FindBar input is not mounted");return n.current},[]),z(()=>{if(!a)return;let e=n.current;if(e===null)throw Error("FindBar input is not mounted");e.focus({preventScroll:!0}),e.select()},[a]);let u=!r;return k("div",{className:v("border-border flex h-9 shrink-0 items-center gap-1 border-b px-2",m),children:[t(E,{ref:n,value:r,onChange:(e)=>p(e.target.value),placeholder:d,className:"h-7 text-xs",onKeyDown:(e)=>{if(e.key==="Escape"){e.preventDefault(),s();return}if(e.key==="Enter"){if(e.preventDefault(),r)o(e.shiftKey)}}}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!0),title:l?`${l} (⇧↵)`:"⇧↵",children:t(g,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",disabled:u,onClick:()=>o(!1),title:c?`${c} (↵)`:"↵",children:t(h,{className:"size-3.5"})}),t(i,{size:"icon",variant:"ghost",className:"size-6",onClick:s,title:"Esc",children:t(b,{className:"size-3.5"})})]})}
2
+ export{Yo};
@@ -1,2 +1,2 @@
1
- import{G}from"./chunk-wbjf9maj.js";import{Ee}from"./chunk-s6medm3z.js";import{A,pe}from"./chunk-2hkj5qxh.js";import{V,re}from"./chunk-rp7tnbss.js";import{De,ue}from"./chunk-f78jd8xh.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=ue(),B=pe(),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 Js({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,Js};
1
+ import{j}from"./chunk-gvqvw7ms.js";import{Be}from"./chunk-6tj5e7fc.js";import{N,ue}from"./chunk-een4e2tr.js";import{G,oe}from"./chunk-n8v6cdq3.js";import{Te,de}from"./chunk-f6zpqrg3.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 y,DropdownMenuItem as k,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as K,DropdownMenuSeparator as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Q}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Li({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:O=n?"none":void 0,allowRemove:R=!0,submenu:g=!1,className:x,onOpenChange:B}){let{t}=N(),c=de(),A=ue(),T=Be(),{collections:s,order:C}=Te(),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),B?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),A(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(J,{disabled:r,"data-hover-background":O,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:x,"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(y,{children:e(_,{value:i??null,children:C.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===G?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:oe(s[o],t)})]},o))})}),e(q,{}),a(y,{children:[a(k,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(E,{}),t("collection.newCollection")]}),R&&i!==void 0&&a(k,{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(Q,{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 Hs({sessionId:l,allowRemove:f=!0}){let{t:n}=N();return e(Li,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(j,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(U,{className:"rtl:rotate-180"})})})}
2
+ export{Li,Hs};
@@ -1,2 +1,2 @@
1
- import{g}from"./chunk-zzjth6f2.js";import{e}from"./chunk-esbgn8q0.js";import{p}from"./chunk-n96z8etk.js";import{isTauri as B}from"@tauri-apps/api/core";import{getCurrentWebview as L}from"@tauri-apps/api/webview";import{useEffect as T,useLayoutEffect as M,useRef as q}from"react";import{flushSync as w}from"react-dom";var z=33554432,F=new WeakMap;function R(i){return i.split(/[/\\]/).findLast((f)=>f!=="")??i}var wn={sourcePath:(i)=>F.get(i),uniqueFiles(i,f){let h=new Set(f.map((m)=>m.sourcePath));return i.filter((m)=>{let d=F.get(m);if(d===void 0)return!0;if(h.has(d))return!1;return h.add(d),!0})}};function kn({sessionId:i,enabled:f,onMention:h,onBusyChange:m}){let d=g(),{host:A}=e(),a=q({sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A});return M(()=>{a.current={sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A}}),T(()=>{if(!B())return;let u=!1,x,C=Promise.resolve(),b=0,y=()=>!u&&a.current.sessionId===i&&a.current.enabled,P=(n)=>{let{host:o}=a.current;if(o.reportError)o.reportError(n);else console.error(n)},D=()=>P(Error(a.current.host.t("composer.dropUnavailable")));a.current.onBusyChange(!1);let k=(n)=>{b++,w(()=>a.current.onBusyChange(!0)),C=C.then(async()=>{try{let o=new Set(a.current.attachments.files.map((t)=>t.sourcePath));for(let t of new Set(await n())){let s=typeof t==="string"?t:t.name;if(!y())return;try{if(typeof t!=="string"&&t.type.startsWith("image/")){w(()=>a.current.attachments.add([t]));continue}if(typeof t!=="string"&&t.size>z)throw Error("Pasted file exceeds the 32 MiB limit");let l=typeof t==="string"?t:await p.writePastedFile({name:t.name,data:[...new Uint8Array(await t.arrayBuffer())]});if(!y())return;let c=await p.readDroppedFile({path:l});if(!y())return;if(c.image===null)w(()=>a.current.onMention(c.path));else if(!o.has(c.path)){let E=Uint8Array.from(atob(c.image.data),(v)=>v.charCodeAt(0)),r=new File([E],c.name,{type:c.image.mimeType});F.set(r,c.path),o.add(c.path),w(()=>a.current.attachments.add([r]))}}catch(l){if(!u)P(Object.assign(Error(a.current.host.t("composer.dropFailed",{name:R(s)})),{description:l instanceof Error?l.message:String(l)}))}}}finally{if(b--,!u)w(()=>a.current.onBusyChange(b>0))}}).catch((o)=>{if(!u)P(o)})},W=L().onDragDropEvent((n)=>{if(u||n.payload.type!=="drop")return;let{paths:o,position:t}=n.payload,s=document.elementFromPoint(t.x/window.devicePixelRatio,t.y/window.devicePixelRatio);if(!s?.closest("[data-chat-drop-zone]")||s.closest('[role="dialog"]'))return;if(!y()){D();return}k(()=>Promise.resolve(o))}),S=(n)=>{let o=n.target;if(!(o instanceof Element)||!o.matches("[data-chat-input]"))return;if(!o.closest("[data-chat-drop-zone]")||o.closest('[role="dialog"]'))return;let t=n.clipboardData;if(!t)return;let s=[...t.files??[]],l=[...t.items??[]];if(!(t.types.includes("Files")&&!s.length&&!l.some((r)=>r.type.startsWith("image/")))&&!s.some((r)=>!r.type.startsWith("image/"))&&!l.some((r)=>r.kind==="file"&&!r.type.startsWith("image/"))&&!["text/uri-list","x-special/gnome-copied-files"].some((r)=>t.types.includes(r)&&/^file:\/\//m.test(t.getData(r))))return;if(n.preventDefault(),n.stopPropagation(),!y()){D();return}let E=p.clipboardFilePaths().then((r)=>({value:r}),(r)=>({error:r}));k(async()=>{let r=await E;if("error"in r)throw r.error;let v=r.value;if(v.length)return v;if(s.length)return s;throw Error("The clipboard contains no readable local files")})};return document.addEventListener("paste",S,!0),W.then((n)=>{if(u)n();else x=n}).catch((n)=>{if(!u)P(n)}),()=>{u=!0,document.removeEventListener("paste",S,!0),x?.()}},[i]),null}
2
- export{wn,kn};
1
+ import{g}from"./chunk-86821qec.js";import{e}from"./chunk-abgdqy92.js";import{u}from"./chunk-kj3t4mqf.js";import{isTauri as B}from"@tauri-apps/api/core";import{getCurrentWebview as L}from"@tauri-apps/api/webview";import{useEffect as T,useLayoutEffect as M,useRef as q}from"react";import{flushSync as w}from"react-dom";var z=33554432,F=new WeakMap;function R(i){return i.split(/[/\\]/).findLast((f)=>f!=="")??i}var hn={sourcePath:(i)=>F.get(i),uniqueFiles(i,f){let h=new Set(f.map((m)=>m.sourcePath));return i.filter((m)=>{let d=F.get(m);if(d===void 0)return!0;if(h.has(d))return!1;return h.add(d),!0})}};function vn({sessionId:i,enabled:f,onMention:h,onBusyChange:m}){let d=g(),{host:A}=e(),a=q({sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A});return M(()=>{a.current={sessionId:i,attachments:d,enabled:f,onMention:h,onBusyChange:m,host:A}}),T(()=>{if(!B())return;let l=!1,x,C=Promise.resolve(),b=0,y=()=>!l&&a.current.sessionId===i&&a.current.enabled,P=(n)=>{let{host:o}=a.current;if(o.reportError)o.reportError(n);else console.error(n)},D=()=>P(Error(a.current.host.t("composer.dropUnavailable")));a.current.onBusyChange(!1);let k=(n)=>{b++,w(()=>a.current.onBusyChange(!0)),C=C.then(async()=>{try{let o=new Set(a.current.attachments.files.map((t)=>t.sourcePath));for(let t of new Set(await n())){let s=typeof t==="string"?t:t.name;if(!y())return;try{if(typeof t!=="string"&&t.type.startsWith("image/")){w(()=>a.current.attachments.add([t]));continue}if(typeof t!=="string"&&t.size>z)throw Error("Pasted file exceeds the 32 MiB limit");let p=typeof t==="string"?t:await u.writePastedFile({name:t.name,data:[...new Uint8Array(await t.arrayBuffer())]});if(!y())return;let c=await u.readDroppedFile({path:p});if(!y())return;if(c.image===null)w(()=>a.current.onMention(c.path));else if(!o.has(c.path)){let E=Uint8Array.from(atob(c.image.data),(v)=>v.charCodeAt(0)),r=new File([E],c.name,{type:c.image.mimeType});F.set(r,c.path),o.add(c.path),w(()=>a.current.attachments.add([r]))}}catch(p){if(!l)P(Object.assign(Error(a.current.host.t("composer.dropFailed",{name:R(s)})),{description:p instanceof Error?p.message:String(p)}))}}}finally{if(b--,!l)w(()=>a.current.onBusyChange(b>0))}}).catch((o)=>{if(!l)P(o)})},W=L().onDragDropEvent((n)=>{if(l||n.payload.type!=="drop")return;let{paths:o,position:t}=n.payload,s=document.elementFromPoint(t.x/window.devicePixelRatio,t.y/window.devicePixelRatio);if(!s?.closest("[data-chat-drop-zone]")||s.closest('[role="dialog"]'))return;if(!y()){D();return}k(()=>Promise.resolve(o))}),S=(n)=>{let o=n.target;if(!(o instanceof Element)||!o.matches("[data-chat-input]"))return;if(!o.closest("[data-chat-drop-zone]")||o.closest('[role="dialog"]'))return;let t=n.clipboardData;if(!t)return;let s=[...t.files??[]],p=[...t.items??[]];if(!(t.types.includes("Files")&&!s.length&&!p.some((r)=>r.type.startsWith("image/")))&&!s.some((r)=>!r.type.startsWith("image/"))&&!p.some((r)=>r.kind==="file"&&!r.type.startsWith("image/"))&&!["text/uri-list","x-special/gnome-copied-files"].some((r)=>t.types.includes(r)&&/^file:\/\//m.test(t.getData(r))))return;if(n.preventDefault(),n.stopPropagation(),!y()){D();return}let E=u.clipboardFilePaths().then((r)=>({value:r}),(r)=>({error:r}));k(async()=>{let r=await E;if("error"in r)throw r.error;let v=r.value;if(v.length)return v;if(s.length)return s;throw Error("The clipboard contains no readable local files")})};return document.addEventListener("paste",S,!0),W.then((n)=>{if(l)n();else x=n}).catch((n)=>{if(!l)P(n)}),()=>{l=!0,document.removeEventListener("paste",S,!0),x?.()}},[i]),null}
2
+ export{hn,vn};
@@ -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 Yt({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{Yt,G};
1
+ import{cn as f}from"cn";import{jsx as e,jsxs as a,Fragment as v}from"react/jsx-runtime";function Vn({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{Vn,j};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-esbgn8q0.js";import{Fe}from"./chunk-ta6rbxh5.js";import{nt}from"./chunk-x3v10a71.js";import{Qt}from"./chunk-rg9ckzpr.js";import{format as f}from"date-fns";import{useState as y}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Skeleton as m}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as t,jsxs as u,Fragment as h}from"react/jsx-runtime";function Wt({label:o,window:a,t:l}){let n=a?100-Math.round(Math.min(100,Math.max(0,a.usedPercent))):0,i=a&&a.resetsAt!==null?l("usage.resetsAt",{time:f(new Date(a.resetsAt*1000),"yyyy/MM/dd HH:mm")}):null;return u("div",{className:"space-y-1.5","aria-busy":!a,children:[u("div",{className:"grid min-h-5 grid-cols-[3.5rem_minmax(0,1fr)_5rem] items-center gap-3",children:[a?t("span",{className:"text-sm",children:o}):t(m,{className:"h-4 w-10 motion-reduce:animate-none"}),a?t("div",{className:"bg-muted h-2 overflow-hidden rounded-full",role:"progressbar","aria-label":o,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:t("div",{className:"bg-primary h-full rounded-full",style:{width:`${n}%`}})}):t(m,{className:"h-2 rounded-full motion-reduce:animate-none"}),a?t("span",{className:"text-muted-foreground text-end text-xs tabular-nums",children:l("usage.remaining",{percent:n})}):t(m,{className:"h-4 w-14 justify-self-end motion-reduce:animate-none"})]}),t("div",{className:"text-muted-foreground flex min-h-4 items-center justify-end text-xs",children:a?i:t(m,{className:"h-3 w-32 motion-reduce:animate-none"})})]})}function ui({account:o,disabled:a,onSignOut:l}){let{t:n}=e().host,i=o===void 0,r=o?.account.account??null,c=o===null?n("usage.accountUnavailable"):r===null?n("usage.notSignedIn"):r.type==="chatgpt"?[r.email,r.planType!=="unknown"?n(`usage.plan.${r.planType}`):null].filter(Boolean).join(" · "):r.type==="apiKey"?n("usage.apiKey"):n("usage.bedrock"),s=o?.rateLimits??null;return u("section",{"aria-busy":i,"aria-label":"Codex",className:"space-y-4",children:[u("div",{className:"flex min-h-8 items-center justify-between gap-4",children:[i?t(m,{className:"h-4 w-40 max-w-[65%] motion-reduce:animate-none"}):t("span",{className:"min-w-0 text-sm break-words",children:c}),i?t(m,{className:"h-8 w-16 shrink-0 motion-reduce:animate-none"}):r!==null&&t(x,{variant:"outline",size:"sm",className:"shrink-0",disabled:a,onClick:l,children:n("connection.signOut")})]}),(i||r!==null)&&t("div",{className:"flex flex-col gap-4",children:i?t(Wt,{t:n}):s===null?t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")}):u(h,{children:[s.primary!==null&&t(Wt,{label:nt(s.primary,n),window:s.primary,t:n}),s.secondary!==null&&t(Wt,{label:nt(s.secondary,n),window:s.secondary,t:n}),s.primary===null&&s.secondary===null&&t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")})]})})]})}function Zt({bridge:o,className:a="rounded-xl border p-4"}){let{host:l}=e(),n=o.useSettingsAgent(),i=o.useSettingsAccount(),[r,c]=y(!1);return u("div",{className:a,children:[t(ui,{account:i,disabled:n==null||r,onSignOut:()=>{c(!0),o.requestSignOut().catch((s)=>l.reportError?.(s)).finally(()=>c(!1))}}),i!=null&&!i.account.account&&n&&t(Qt,{methods:n.authMethods,signIn:o.requestSignIn}),n?.actions.map((s)=>t(Fe,{action:s,onRespond:(d,p)=>{o.requestActionResponse(d,p).catch((g)=>l.reportError?.(g))}},s.id))]})}
2
- export{Wt,ui,Zt};
1
+ import{e}from"./chunk-abgdqy92.js";import{we}from"./chunk-tc3t2sgb.js";import{et}from"./chunk-2nb1475h.js";import{Zt}from"./chunk-8kd74ng1.js";import{format as f}from"date-fns";import{useState as y}from"react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Skeleton as m}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as t,jsxs as u,Fragment as h}from"react/jsx-runtime";function Kt({label:o,window:a,t:l}){let n=a?100-Math.round(Math.min(100,Math.max(0,a.usedPercent))):0,i=a&&a.resetsAt!==null?l("usage.resetsAt",{time:f(new Date(a.resetsAt*1000),"yyyy/MM/dd HH:mm")}):null;return u("div",{className:"space-y-1.5","aria-busy":!a,children:[u("div",{className:"grid min-h-5 grid-cols-[3.5rem_minmax(0,1fr)_5rem] items-center gap-3",children:[a?t("span",{className:"text-sm",children:o}):t(m,{className:"h-4 w-10 motion-reduce:animate-none"}),a?t("div",{className:"bg-muted h-2 overflow-hidden rounded-full",role:"progressbar","aria-label":o,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,children:t("div",{className:"bg-primary h-full rounded-full",style:{width:`${n}%`}})}):t(m,{className:"h-2 rounded-full motion-reduce:animate-none"}),a?t("span",{className:"text-muted-foreground text-end text-xs tabular-nums",children:l("usage.remaining",{percent:n})}):t(m,{className:"h-4 w-14 justify-self-end motion-reduce:animate-none"})]}),t("div",{className:"text-muted-foreground flex min-h-4 items-center justify-end text-xs",children:a?i:t(m,{className:"h-3 w-32 motion-reduce:animate-none"})})]})}function ai({account:o,disabled:a,onSignOut:l}){let{t:n}=e().host,i=o===void 0,r=o?.account.account??null,c=o===null?n("usage.accountUnavailable"):r===null?n("usage.notSignedIn"):r.type==="chatgpt"?[r.email,r.planType!=="unknown"?n(`usage.plan.${r.planType}`):null].filter(Boolean).join(" · "):r.type==="apiKey"?n("usage.apiKey"):n("usage.bedrock"),s=o?.rateLimits??null;return u("section",{"aria-busy":i,"aria-label":"Codex",className:"space-y-4",children:[u("div",{className:"flex min-h-8 items-center justify-between gap-4",children:[i?t(m,{className:"h-4 w-40 max-w-[65%] motion-reduce:animate-none"}):t("span",{className:"min-w-0 text-sm break-words",children:c}),i?t(m,{className:"h-8 w-16 shrink-0 motion-reduce:animate-none"}):r!==null&&t(x,{variant:"outline",size:"sm",className:"shrink-0",disabled:a,onClick:l,children:n("connection.signOut")})]}),(i||r!==null)&&t("div",{className:"flex flex-col gap-4",children:i?t(Kt,{t:n}):s===null?t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")}):u(h,{children:[s.primary!==null&&t(Kt,{label:et(s.primary,n),window:s.primary,t:n}),s.secondary!==null&&t(Kt,{label:et(s.secondary,n),window:s.secondary,t:n}),s.primary===null&&s.secondary===null&&t("span",{className:"text-muted-foreground text-sm",children:n("usage.unavailable")})]})})]})}function Wt({bridge:o,className:a="rounded-xl border p-4"}){let{host:l}=e(),n=o.useSettingsAgent(),i=o.useSettingsAccount(),[r,c]=y(!1);return u("div",{className:a,children:[t(ai,{account:i,disabled:n==null||r,onSignOut:()=>{c(!0),o.requestSignOut().catch((s)=>l.reportError?.(s)).finally(()=>c(!1))}}),i!=null&&!i.account.account&&n&&t(Zt,{methods:n.authMethods,signIn:o.requestSignIn}),n?.actions.map((s)=>t(we,{action:s,onRespond:(d,p)=>{o.requestActionResponse(d,p).catch((g)=>l.reportError?.(g))}},s.id))]})}
2
+ export{Kt,ai,Wt};
@@ -0,0 +1,2 @@
1
+ var Ja=1e6,Xa=5000000;function Tr(_,e){return _+e>5000000}function Ya(_){return(_/1e6).toFixed(1)}var Fe=5;
2
+ export{Ja,Xa,Tr,Ya,Fe};
@@ -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 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
+ 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 Ve({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{Ve};
@@ -1,3 +1,3 @@
1
- var sl=["full","compact","codexUI"];function Rr(t){return t==="compact"||t==="codexUI"}var Ha=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function ne(t){let o=Ha.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
2
- `)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function al(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
3
- export{sl,Rr,Ha,ne,al};
1
+ var dl=["full","compact","codexUI"];function ms(t){return t==="compact"||t==="codexUI"}var ja=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function ne(t){let o=ja.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
2
+ `)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function ul(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
3
+ export{dl,ms,ja,ne,ul};
@@ -1,2 +1,2 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";function Bt({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
2
- export{Bt};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";function Jt({title:t,badge:a,children:i}){return e("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[e("div",{className:"flex min-h-9 items-center gap-2",children:[r("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:t}),a]}),i]})}
2
+ export{Jt};
@@ -1,2 +1,2 @@
1
- import{qt}from"./chunk-d6cfxqzx.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function Ms({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(qt,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
2
- export{Ms};
1
+ import{Gn}from"./chunk-x1mzrhtd.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function sa({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(Gn,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
2
+ export{sa};
@@ -1,2 +1,2 @@
1
- import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function L({value:i,onValueChange:n,options:o,itemClassName:d}){return t(r,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(s,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:l("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
2
- export{L};
1
+ import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function E({value:i,onValueChange:n,options:o,itemClassName:d}){return t(r,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(s,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:l("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
2
+ export{E};
@@ -1,2 +1,2 @@
1
- import{g}from"./chunk-zzjth6f2.js";import{e}from"./chunk-esbgn8q0.js";import{yt}from"./chunk-3tzh25vq.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Ai({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=g(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>yt(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
- export{Ai};
1
+ import{g}from"./chunk-86821qec.js";import{e}from"./chunk-abgdqy92.js";import{vt}from"./chunk-81jejgvs.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Bi({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=g(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>vt(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
+ export{Bi};
@@ -0,0 +1,2 @@
1
+ import{Ae}from"./chunk-ffs5nkt0.js";function on(t){return Ae(t.absPath)}function rn(t){return t.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)??t}function sn(t){return rn(t.absPath)}
2
+ export{on,rn,sn};
@@ -1,2 +1,2 @@
1
- import{_i}from"./chunk-jpr2y0y3.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function ki({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=_i(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
2
- export{ki};
1
+ import{Ji}from"./chunk-6ehhap9k.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as h,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as N,useId as T,useLayoutEffect as _,useRef as S,useState as f}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as u}from"react/jsx-runtime";var U={allow_once:{icon:h},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function Qi({requestId:p,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,g]=f(0),[s,v]=f(null),[l,A]=f(null),x=S(null),c=Ji(D);N(()=>{g(0)},[p]),N(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)x.current?.focus()},[p,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);v({left:(window.innerWidth-o)/2,width:o,bottom:24});return}v({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(_(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[p,n,d]),_(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=u("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[u("div",{className:"border-border border-b px-3 py-2",children:[u("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]}),P]}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:x,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),g((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??h,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return u("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
2
+ export{Qi};
@@ -0,0 +1,2 @@
1
+ import{s,a,n,h}from"./chunk-6c18ag8t.js";import{V}from"./chunk-ykz0h1r0.js";import{R,se,Ge}from"./chunk-6tj5e7fc.js";import{je,te,ve}from"./chunk-kv1w4jx4.js";import{Or}from"./chunk-1a56svgj.js";import{Ve}from"./chunk-heqa4swe.js";import{Ue}from"./chunk-a71j2n86.js";import{Oe}from"./chunk-r8pm74zf.js";import{jn}from"./chunk-4p0zk3mj.js";import{Dr}from"./chunk-ayhxrzsq.js";import{ActivityIcon as O}from"lucide-react";import{useEffect as E,useMemo as C}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as P,Fragment as H}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function ba({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let N=s(),{t:L}=N,m=n((t)=>t.runStates),S=n((t)=>t.drafts),u=n((t)=>t.sessionList),v=te((t)=>t.activityOrder),p=C(()=>v.flatMap((t)=>{let e=m[t];return e&&je({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=C(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=te((t)=>t.activityCollapsedGroups),o=ve(),x=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),I=(t)=>{if(b?.(t))return;d(t)},D=Dr();E(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Or(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=x[r-1];if(!y)return;e.preventDefault(),I(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let A=(t)=>{let e=x.indexOf(t);return c(M,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&D?c(G,{children:Oe(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(R,{children:g.map((t)=>t.key==="foreground"?c(R,{children:t.rows.map(A)},t.key):c(se,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);o({activityCollapsedGroups:r})},leading:c(O,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(A)},t.key))})}function M({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:N,actions:L,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=jn(i.sessionId,d);return P(H,{children:[c(Ge,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Ue,{sessionRow:i,actions:L}),onClick:m,onKeyDown:(o)=>{if(o.target!==o.currentTarget)return;if(o.key==="Enter"||o.key===" ")o.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((o)=>u.openLink?.(`http://localhost:${o}`)),accessory:N,hint:S,actions:c(Ve,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((o)=>P("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(V,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:o.title,children:o.title})]},o.id))]})}
2
+ export{ba};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-73e9vpm9.js";import{codexTurnError as R}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as C}from"lucide-react";import{useEffect as k,useRef as i,useState as s}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as m}from"react/jsx-runtime";function Mo({children:u}){return m("div",{className:"codex-error-message",role:"alert",children:[n(C,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:u})]})}function No({error:u,retry:e}){let{t:f,turnErrorAction:T}=t(),c=R(u),[l]=s(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=s(e?.delaySeconds??null),[h,y]=s(!1),[x,g]=s(null),o=i(!1),w=i(!1),E=i(e?.run);E.current=e?.run;let S=i((N)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(N).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),b=T?.(c),d=b===void 0&&e!==void 0&&c.retryable;return k(()=>{if(!d||l===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[l,d]),m(Mo,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),b,d&&n(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>S.current("manual"),children:p===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
2
- export{Mo,No};
1
+ import{t}from"./chunk-pdmayjan.js";import{codexTurnError as R}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as C}from"lucide-react";import{useEffect as k,useRef as i,useState as s}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as m}from"react/jsx-runtime";function no({children:u}){return m("div",{className:"codex-error-message",role:"alert",children:[n(C,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:u})]})}function oo({error:u,retry:e}){let{t:f,turnErrorAction:T}=t(),c=R(u),[l]=s(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=s(e?.delaySeconds??null),[h,y]=s(!1),[x,g]=s(null),o=i(!1),w=i(!1),E=i(e?.run);E.current=e?.run;let S=i((N)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(N).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),b=T?.(c),d=b===void 0&&e!==void 0&&c.retryable;return k(()=>{if(!d||l===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[l,d]),m(no,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),b,d&&n(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>S.current("manual"),children:p===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
2
+ export{no,oo};
@@ -1,2 +1,2 @@
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};
1
+ var I={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{I};
@@ -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)},ro={"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 Ma(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function Ka(e){if(Ma(e)||e instanceof Error)return e.message;return String(e)}
2
- export{p,ro,Ma,Ka};
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 u={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)},po={"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 Da(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function Wa(e){if(Da(e)||e instanceof Error)return e.message;return String(e)}
2
+ export{u,po,Da,Wa};