@alwith/module-chat 0.6.17 → 0.6.19

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 (557) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/agent/application-client.d.ts +30 -0
  3. package/dist/agent/application-client.js +1 -0
  4. package/dist/agent/client.d.ts +125 -0
  5. package/dist/agent/client.js +1 -0
  6. package/dist/agent/custom-model-effort.d.ts +4 -0
  7. package/dist/agent/custom-model-effort.js +1 -0
  8. package/dist/agent/fork-title.d.ts +1 -0
  9. package/dist/agent/fork-title.js +1 -0
  10. package/dist/agent/image-request.d.ts +6 -0
  11. package/dist/agent/image-request.js +1 -0
  12. package/dist/agent/image-tools.d.ts +9 -0
  13. package/dist/agent/image-tools.js +1 -0
  14. package/dist/agent/input-config.d.ts +17 -0
  15. package/dist/agent/input-config.js +1 -0
  16. package/dist/agent/input-modes/chat.d.ts +10 -0
  17. package/dist/agent/input-modes/chat.js +1 -0
  18. package/dist/agent/input-modes/execution-meta.d.ts +1 -0
  19. package/dist/agent/input-modes/execution-meta.js +1 -0
  20. package/dist/agent/input-modes/image-context.d.ts +1 -0
  21. package/dist/agent/input-modes/image-context.js +1 -0
  22. package/dist/agent/input-modes/image.d.ts +14 -0
  23. package/dist/agent/input-modes/image.js +1 -0
  24. package/dist/agent/input-modes/index.d.ts +46 -0
  25. package/dist/agent/input-modes/index.js +1 -0
  26. package/dist/agent/project-path.d.ts +2 -0
  27. package/dist/agent/project-path.js +1 -0
  28. package/dist/agent/request-error.d.ts +3 -0
  29. package/dist/agent/request-error.js +1 -0
  30. package/dist/agent/session-list-refresh.d.ts +2 -0
  31. package/dist/agent/session-list-refresh.js +1 -0
  32. package/dist/app-reference.js +1 -1
  33. package/dist/application-tools.d.ts +1 -1
  34. package/dist/application-tools.js +1 -1
  35. package/dist/approval/choice-elicitation-form.js +1 -1
  36. package/dist/approval/choice-schema.js +1 -1
  37. package/dist/approval/permission-options.js +1 -1
  38. package/dist/approval/permission-view.js +1 -1
  39. package/dist/approval/schema-elicitation-form.js +1 -1
  40. package/dist/approval/url-elicitation-card.js +1 -1
  41. package/dist/chunk-02qwd1yq.js +2 -0
  42. package/dist/chunk-052wfeys.js +2 -0
  43. package/dist/chunk-06wtwk7b.js +2 -0
  44. package/dist/chunk-0jpzztpz.js +2 -0
  45. package/dist/chunk-0z7gy762.js +2 -0
  46. package/dist/{chunk-3h3cmjh2.js → chunk-113maskf.js} +2 -2
  47. package/dist/{chunk-bqbpded2.js → chunk-15m908ph.js} +2 -2
  48. package/dist/{chunk-rvmbvv03.js → chunk-1d29gnb2.js} +2 -2
  49. package/dist/chunk-1fadxh2z.js +2 -0
  50. package/dist/{chunk-dcevaazr.js → chunk-1gr60c40.js} +2 -2
  51. package/dist/chunk-1npqxk6m.js +2 -0
  52. package/dist/{chunk-97tgc9ym.js → chunk-26w51q10.js} +2 -2
  53. package/dist/{chunk-zq18ffn0.js → chunk-2aw505xv.js} +2 -2
  54. package/dist/{chunk-twbeapwa.js → chunk-2gwegefd.js} +2 -2
  55. package/dist/chunk-2hkj5qxh.js +2 -0
  56. package/dist/{chunk-y7n8m9st.js → chunk-2ncdext6.js} +2 -2
  57. package/dist/chunk-30a5fgk9.js +2 -0
  58. package/dist/chunk-337hq36y.js +2 -0
  59. package/dist/{chunk-2pahy4hs.js → chunk-34mq2dbm.js} +2 -2
  60. package/dist/{chunk-3174p320.js → chunk-3g9n4bk2.js} +2 -2
  61. package/dist/chunk-3tp8fe70.js +2 -0
  62. package/dist/{chunk-fzze5xcw.js → chunk-3tvq6xr2.js} +2 -2
  63. package/dist/chunk-3tzh25vq.js +2 -0
  64. package/dist/{chunk-netp71kb.js → chunk-44r55va6.js} +2 -2
  65. package/dist/{chunk-qdgsg6v4.js → chunk-4jp1d558.js} +2 -2
  66. package/dist/chunk-4sa0m3w5.js +2 -0
  67. package/dist/chunk-4sfxcw58.js +6 -0
  68. package/dist/{chunk-6es8tgxc.js → chunk-4wm5emgf.js} +2 -2
  69. package/dist/{chunk-x6f51rt2.js → chunk-51x80v4h.js} +2 -2
  70. package/dist/{chunk-xmpaqxer.js → chunk-5c42mfat.js} +2 -2
  71. package/dist/{chunk-j6r44m9g.js → chunk-5gn8xw58.js} +2 -2
  72. package/dist/chunk-5jq3xg3q.js +2 -0
  73. package/dist/{chunk-9z9jffth.js → chunk-64apxzn7.js} +2 -2
  74. package/dist/{chunk-trh02gwn.js → chunk-6e84zbgs.js} +2 -2
  75. package/dist/chunk-6f06hbsk.js +2 -0
  76. package/dist/chunk-6g553fkh.js +2 -0
  77. package/dist/{chunk-h3xn4d48.js → chunk-6j1x3gny.js} +2 -2
  78. package/dist/chunk-73e9vpm9.js +2 -0
  79. package/dist/{chunk-twx75z08.js → chunk-74b70n1g.js} +2 -2
  80. package/dist/chunk-7b5ryhwh.js +2 -0
  81. package/dist/{chunk-sct2h2dm.js → chunk-7d1wnjw5.js} +2 -2
  82. package/dist/chunk-7evd34gw.js +3 -0
  83. package/dist/{chunk-fd72zzqm.js → chunk-7g11pcm4.js} +3 -3
  84. package/dist/{chunk-ct0xqakr.js → chunk-7p7fxgdb.js} +2 -2
  85. package/dist/chunk-7pwdjhg8.js +2 -0
  86. package/dist/chunk-80sbwjrr.js +2 -0
  87. package/dist/chunk-816tez3v.js +2 -0
  88. package/dist/{chunk-vypkwd0x.js → chunk-81n37a11.js} +2 -2
  89. package/dist/{chunk-11cbk1je.js → chunk-84p483n0.js} +2 -2
  90. package/dist/{chunk-8djjctdj.js → chunk-84zzf0ys.js} +2 -2
  91. package/dist/{chunk-hn6f6yrp.js → chunk-88ysxbdh.js} +2 -2
  92. package/dist/{chunk-aaqk0jrt.js → chunk-8hygfx41.js} +2 -2
  93. package/dist/{chunk-c05dxz9x.js → chunk-8q5zwkry.js} +2 -2
  94. package/dist/chunk-8rb896tq.js +2 -0
  95. package/dist/{chunk-9072bnjm.js → chunk-90847w64.js} +2 -2
  96. package/dist/{chunk-ha5xrc0a.js → chunk-97pn8v17.js} +2 -2
  97. package/dist/chunk-9k58vckd.js +2 -0
  98. package/dist/chunk-9x08kyf6.js +2 -0
  99. package/dist/{chunk-b9q9d2jh.js → chunk-agdkhyaj.js} +3 -3
  100. package/dist/chunk-ajp19sh9.js +2 -0
  101. package/dist/chunk-ak196z4y.js +2 -0
  102. package/dist/chunk-ane53rqa.js +2 -0
  103. package/dist/{chunk-qm1z1zcw.js → chunk-arm9x6kc.js} +2 -2
  104. package/dist/{chunk-veb90k24.js → chunk-ath5nv2w.js} +2 -2
  105. package/dist/chunk-bba9qej8.js +2 -0
  106. package/dist/{chunk-wyndwb68.js → chunk-bf7sgpzq.js} +2 -2
  107. package/dist/chunk-bg0vkt53.js +2 -0
  108. package/dist/{chunk-csgkwny6.js → chunk-bqhbksy2.js} +2 -2
  109. package/dist/chunk-brv52tgj.js +2 -0
  110. package/dist/chunk-bve6cykn.js +2 -0
  111. package/dist/chunk-bw3bpr6m.js +2 -0
  112. package/dist/chunk-c2h4wr7g.js +7 -0
  113. package/dist/{chunk-gk0tq3n9.js → chunk-ch8e8a32.js} +2 -2
  114. package/dist/{chunk-hqykt9hr.js → chunk-cydnp9mm.js} +2 -2
  115. package/dist/{chunk-4gq7ye1a.js → chunk-d0s10qy5.js} +2 -2
  116. package/dist/chunk-d6cfxqzx.js +2 -0
  117. package/dist/{chunk-1e7gk302.js → chunk-d9mj74pb.js} +2 -2
  118. package/dist/{chunk-x0h0g1ma.js → chunk-dd9k5bbt.js} +2 -2
  119. package/dist/{chunk-7nehhgej.js → chunk-dheg4bs2.js} +2 -2
  120. package/dist/{chunk-620q6hmz.js → chunk-dr5swvaa.js} +2 -2
  121. package/dist/chunk-dsf2x63w.js +7 -0
  122. package/dist/chunk-e1fzfaqj.js +2 -0
  123. package/dist/{chunk-bnpwhf5c.js → chunk-e1zsnc8z.js} +2 -2
  124. package/dist/{chunk-tkbs5ev1.js → chunk-er5wxkt2.js} +2 -2
  125. package/dist/chunk-esbgn8q0.js +2 -0
  126. package/dist/chunk-etvdqkvb.js +4 -0
  127. package/dist/{chunk-segftqt4.js → chunk-evpjxbzm.js} +2 -2
  128. package/dist/{chunk-2ptyqcf3.js → chunk-ex063jn9.js} +2 -2
  129. package/dist/chunk-eynwjzqp.js +2 -0
  130. package/dist/{chunk-05eg5p11.js → chunk-f78jd8xh.js} +2 -2
  131. package/dist/chunk-f9xtcxfb.js +2 -0
  132. package/dist/{chunk-d1n4w7hn.js → chunk-fdmbfq9g.js} +2 -2
  133. package/dist/chunk-fkkk1fza.js +2 -0
  134. package/dist/{chunk-f2jc13bq.js → chunk-ftsnryz8.js} +2 -2
  135. package/dist/{chunk-m2x1s408.js → chunk-fvxxzgrc.js} +2 -2
  136. package/dist/chunk-fwqpwbd8.js +2 -0
  137. package/dist/{chunk-7eqtvqrn.js → chunk-fyxetwxv.js} +2 -2
  138. package/dist/{chunk-q2z9w661.js → chunk-g1nck6pp.js} +2 -2
  139. package/dist/{chunk-7919s3et.js → chunk-gpv1dc5y.js} +2 -2
  140. package/dist/chunk-gs0b02g2.js +2 -0
  141. package/dist/{chunk-vnr9rqs6.js → chunk-gttw4rmx.js} +3 -3
  142. package/dist/chunk-gwskdhaw.js +2 -0
  143. package/dist/chunk-h7xjw0p4.js +2 -0
  144. package/dist/{chunk-j5njgy7p.js → chunk-h82jte5p.js} +2 -2
  145. package/dist/{chunk-hwvr7b0j.js → chunk-hfghqddp.js} +2 -2
  146. package/dist/{chunk-vextf7ba.js → chunk-hj05zh7h.js} +2 -2
  147. package/dist/chunk-hnkde8me.js +2 -0
  148. package/dist/{chunk-5wsyenq9.js → chunk-hqt5j789.js} +2 -2
  149. package/dist/chunk-j39bhfsp.js +2 -0
  150. package/dist/{chunk-n13y99dj.js → chunk-j3g21ext.js} +2 -2
  151. package/dist/chunk-j6000jts.js +2 -0
  152. package/dist/{chunk-7h3f7s97.js → chunk-j78kgyff.js} +5 -5
  153. package/dist/{chunk-yaxsff9s.js → chunk-jgqt7k0h.js} +2 -2
  154. package/dist/chunk-jpr2y0y3.js +2 -0
  155. package/dist/{chunk-tz8wmvs9.js → chunk-jpr5ewnh.js} +2 -2
  156. package/dist/{chunk-00z352ph.js → chunk-k4a3p16c.js} +2 -2
  157. package/dist/{chunk-k86843av.js → chunk-k5nd3vyq.js} +2 -2
  158. package/dist/chunk-k883x8fv.js +2 -0
  159. package/dist/{chunk-t96rf4pg.js → chunk-kj2zk46g.js} +2 -2
  160. package/dist/chunk-kkqrxb9w.js +3 -0
  161. package/dist/{chunk-qtft8hnb.js → chunk-kn792h8n.js} +2 -2
  162. package/dist/chunk-kqvgmkvr.js +2 -0
  163. package/dist/chunk-m087n233.js +3 -0
  164. package/dist/{chunk-adc8e01w.js → chunk-ma6ycen5.js} +2 -2
  165. package/dist/{chunk-4hz2ax5w.js → chunk-ma7thf1j.js} +2 -2
  166. package/dist/{chunk-t94rfs41.js → chunk-mahb3t97.js} +2 -2
  167. package/dist/chunk-mf0k3xd4.js +3 -0
  168. package/dist/chunk-mhv75thj.js +0 -0
  169. package/dist/chunk-n811d65m.js +4 -0
  170. package/dist/chunk-n96z8etk.js +2 -0
  171. package/dist/{chunk-9hmqa3cs.js → chunk-nbgw51b6.js} +2 -2
  172. package/dist/{chunk-82xjggwn.js → chunk-ne4b53kn.js} +2 -2
  173. package/dist/chunk-nhkm2gr7.js +1 -0
  174. package/dist/{chunk-3karja82.js → chunk-nn30qzhx.js} +2 -2
  175. package/dist/{chunk-ex20n22v.js → chunk-nqt9gyz9.js} +2 -2
  176. package/dist/{chunk-qwtmwj5m.js → chunk-p3gawvqr.js} +2 -2
  177. package/dist/chunk-p5hk14fk.js +2 -0
  178. package/dist/{chunk-ev9tkjgy.js → chunk-pc11a2w0.js} +3 -3
  179. package/dist/chunk-ph7srp7q.js +2 -0
  180. package/dist/chunk-phee3jn9.js +2 -0
  181. package/dist/{chunk-qnbr2cmg.js → chunk-pqz2471h.js} +2 -2
  182. package/dist/chunk-psndz2rs.js +2 -0
  183. package/dist/{chunk-1xaskqdj.js → chunk-pxv38ttf.js} +2 -2
  184. package/dist/{chunk-wv127h6d.js → chunk-pxzj3ae7.js} +2 -2
  185. package/dist/{chunk-9rf3qecr.js → chunk-q1yz3t9z.js} +2 -2
  186. package/dist/chunk-q4c6f84f.js +2 -0
  187. package/dist/chunk-q7rq46qc.js +2 -0
  188. package/dist/{chunk-d924by6g.js → chunk-qk1yqepm.js} +2 -2
  189. package/dist/{chunk-5ymq8y72.js → chunk-qma11tpm.js} +3 -3
  190. package/dist/chunk-qmcr5f9k.js +2 -0
  191. package/dist/chunk-r7hwgk2v.js +2 -0
  192. package/dist/{chunk-3yq0a0f1.js → chunk-rg9ckzpr.js} +2 -2
  193. package/dist/{chunk-41v0g6sw.js → chunk-rhe4w638.js} +2 -2
  194. package/dist/chunk-rkqptd9w.js +2 -0
  195. package/dist/{chunk-p0d6rr6q.js → chunk-rp7tnbss.js} +2 -2
  196. package/dist/chunk-rv3k0kfr.js +2 -0
  197. package/dist/chunk-rz9fnphz.js +2 -0
  198. package/dist/chunk-s6medm3z.js +2 -0
  199. package/dist/{chunk-4qghztvg.js → chunk-s9mejb9v.js} +2 -2
  200. package/dist/{chunk-z38xf1rw.js → chunk-scdj02m8.js} +3 -3
  201. package/dist/chunk-sfgegn3p.js +2 -0
  202. package/dist/chunk-sjb5stzq.js +2 -0
  203. package/dist/chunk-sp2ny9ak.js +2 -0
  204. package/dist/chunk-stv8pr4v.js +2 -0
  205. package/dist/chunk-swkcmtme.js +2 -0
  206. package/dist/chunk-sz993t5e.js +2 -0
  207. package/dist/{chunk-nszq1xrj.js → chunk-t5ff3cn7.js} +2 -2
  208. package/dist/{chunk-xbp4r3n4.js → chunk-ta6rbxh5.js} +3 -3
  209. package/dist/chunk-tc6d0v1y.js +2 -0
  210. package/dist/chunk-tdvx2n5m.js +2 -0
  211. package/dist/chunk-tftgnw1w.js +2 -0
  212. package/dist/{chunk-11z072sz.js → chunk-thaa1n4f.js} +2 -2
  213. package/dist/chunk-tyrzaz6c.js +2 -0
  214. package/dist/{chunk-4dabfz24.js → chunk-vg1y693r.js} +3 -3
  215. package/dist/chunk-vg9p0hvk.js +2 -0
  216. package/dist/chunk-vm81n2c0.js +2 -0
  217. package/dist/chunk-vt7dkgtx.js +2 -0
  218. package/dist/chunk-w1wr14da.js +2 -0
  219. package/dist/{chunk-gee5kh24.js → chunk-w1yrsbw1.js} +2 -2
  220. package/dist/{chunk-kcra1mgf.js → chunk-wbjf9maj.js} +2 -2
  221. package/dist/{chunk-y1fpm5r2.js → chunk-wew3t005.js} +2 -2
  222. package/dist/{chunk-gxjg94y5.js → chunk-wpacvdsv.js} +2 -2
  223. package/dist/{chunk-vqkwvrxc.js → chunk-wq47c4ws.js} +2 -2
  224. package/dist/{chunk-tjfjvzv5.js → chunk-x2wcwpw3.js} +2 -2
  225. package/dist/chunk-x3v10a71.js +2 -0
  226. package/dist/{chunk-bsra0akd.js → chunk-x49qjrbk.js} +2 -2
  227. package/dist/chunk-x4jm2eh9.js +4 -0
  228. package/dist/{chunk-fvz27k62.js → chunk-xfzmxq3g.js} +2 -2
  229. package/dist/{chunk-a1k3ffay.js → chunk-xnc0175v.js} +2 -2
  230. package/dist/chunk-xnx8p8c0.js +4 -0
  231. package/dist/{chunk-gbc31gbf.js → chunk-xqb4thy8.js} +2 -2
  232. package/dist/{chunk-pvd09dx5.js → chunk-xspnhgq6.js} +2 -2
  233. package/dist/chunk-xwwjj45a.js +2 -0
  234. package/dist/chunk-xx29efrs.js +4 -0
  235. package/dist/{chunk-vkc8ssbv.js → chunk-xx7t8r87.js} +2 -2
  236. package/dist/chunk-xyffk47k.js +2 -0
  237. package/dist/{chunk-mhxgws9c.js → chunk-y3mx5sf0.js} +2 -2
  238. package/dist/{chunk-xtwpbvdx.js → chunk-yb5yhh8t.js} +2 -2
  239. package/dist/chunk-ye7ecnej.js +2 -0
  240. package/dist/{chunk-sg681jnt.js → chunk-ynxb5xqz.js} +4 -4
  241. package/dist/{chunk-8weq6t3q.js → chunk-z107z7dt.js} +2 -2
  242. package/dist/{chunk-9eme3n5c.js → chunk-z6x70w62.js} +2 -2
  243. package/dist/{chunk-2ss8m0ja.js → chunk-zjk12jjm.js} +4 -4
  244. package/dist/{chunk-64wzvf7k.js → chunk-zw2x5ztr.js} +2 -2
  245. package/dist/{chunk-mgsxsaj1.js → chunk-zxfx7psd.js} +2 -2
  246. package/dist/{chunk-9xhw5zmq.js → chunk-zyn0ys4m.js} +2 -2
  247. package/dist/{chunk-5ygdb72w.js → chunk-zzjth6f2.js} +2 -2
  248. package/dist/client.d.ts +9 -30
  249. package/dist/client.js +1 -1
  250. package/dist/codex/activity-group.js +1 -1
  251. package/dist/codex/artifact-links.d.ts +9 -0
  252. package/dist/codex/artifact-links.js +1 -0
  253. package/dist/codex/assistant-message.js +1 -1
  254. package/dist/codex/async-question-card.js +1 -1
  255. package/dist/codex/disclosure-state.js +1 -1
  256. package/dist/codex/edited-files-card.js +1 -1
  257. package/dist/codex/image-view-activity.js +1 -1
  258. package/dist/codex/markdown-renderer.js +1 -1
  259. package/dist/codex/navigation-audio.js +1 -1
  260. package/dist/codex/navigation-preview.js +1 -1
  261. package/dist/codex/navigation-rail.js +1 -1
  262. package/dist/codex/patch-view.js +1 -1
  263. package/dist/codex/plan.js +1 -1
  264. package/dist/codex/timeline-virtualizer.js +1 -1
  265. package/dist/codex/turn-activity.js +1 -1
  266. package/dist/codex/user-message.js +1 -1
  267. package/dist/codex/virtualized-turn-list.js +1 -1
  268. package/dist/collections/collection-emoji.js +1 -1
  269. package/dist/collections/collection-menu.js +1 -1
  270. package/dist/collections/collection-panel.js +1 -1
  271. package/dist/collections/collections.js +1 -1
  272. package/dist/collections/host.js +1 -1
  273. package/dist/collections/locales.js +1 -1
  274. package/dist/collections/model.js +1 -1
  275. package/dist/collections/store.js +1 -1
  276. package/dist/composer/completion-filter.js +1 -1
  277. package/dist/composer/completion-menu.js +1 -1
  278. package/dist/composer/completion-trigger.js +1 -1
  279. package/dist/composer/effort-slider.js +1 -1
  280. package/dist/composer/inline-document.js +1 -1
  281. package/dist/composer/inline-dom.js +1 -1
  282. package/dist/composer/menu-radio.js +1 -1
  283. package/dist/composer/model-select.js +1 -1
  284. package/dist/composer/permission-mode-select.js +1 -1
  285. package/dist/composer/prompt-input-attachments.js +1 -1
  286. package/dist/composer/prompt-input-clipboard.js +1 -1
  287. package/dist/composer/prompt-input-context.js +1 -1
  288. package/dist/composer/prompt-input-inline.js +1 -1
  289. package/dist/composer/prompt-input-textarea.js +1 -1
  290. package/dist/composer/prompt-input.js +1 -1
  291. package/dist/conversation/action-card.js +1 -1
  292. package/dist/conversation/composer/app-mentions.js +1 -1
  293. package/dist/conversation/composer/apps-menu.js +1 -1
  294. package/dist/conversation/composer/composer-menu.js +1 -1
  295. package/dist/conversation/composer/composer.js +1 -1
  296. package/dist/conversation/composer/config-options.js +1 -1
  297. package/dist/conversation/composer/context.js +1 -1
  298. package/dist/conversation/composer/drafts.js +1 -1
  299. package/dist/conversation/composer/file-items.js +1 -1
  300. package/dist/conversation/composer/long-text.js +1 -1
  301. package/dist/conversation/composer/mention-chips.js +1 -1
  302. package/dist/conversation/composer/mention-uri.js +1 -1
  303. package/dist/conversation/composer/model-menu.js +1 -1
  304. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  305. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  306. package/dist/conversation/composer/prediction.js +1 -1
  307. package/dist/conversation/composer/prompt-history.js +1 -1
  308. package/dist/conversation/composer/slash-command-button.js +1 -1
  309. package/dist/conversation/composer/submit-button.js +1 -1
  310. package/dist/conversation/composer/usage-meter.js +1 -1
  311. package/dist/conversation/connection-notice.js +1 -1
  312. package/dist/conversation/context.js +1 -1
  313. package/dist/conversation/conversation-body.js +1 -1
  314. package/dist/conversation/conversation-search.js +1 -1
  315. package/dist/conversation/conversation-view.js +1 -1
  316. package/dist/conversation/conversation.js +1 -1
  317. package/dist/conversation/diff-modal.js +1 -1
  318. package/dist/conversation/draft-project-picker.js +1 -1
  319. package/dist/conversation/session-actions.js +1 -1
  320. package/dist/conversation/subagent-sessions.js +1 -1
  321. package/dist/conversation/subagent-tasks.js +1 -1
  322. package/dist/conversation/types.d.ts +1 -0
  323. package/dist/desktop/desktop-composer.d.ts +13 -0
  324. package/dist/desktop/desktop-composer.js +1 -0
  325. package/dist/desktop/desktop.d.ts +7 -0
  326. package/dist/desktop/desktop.js +1 -0
  327. package/dist/desktop/draft-model-select.d.ts +10 -0
  328. package/dist/desktop/draft-model-select.js +1 -0
  329. package/dist/desktop/load-image.d.ts +1 -0
  330. package/dist/desktop/load-image.js +1 -0
  331. package/dist/desktop/model-catalog.d.ts +10 -0
  332. package/dist/desktop/model-catalog.js +1 -0
  333. package/dist/desktop/model-recovery.d.ts +10 -0
  334. package/dist/desktop/model-recovery.js +1 -0
  335. package/dist/desktop/model-settings-action.d.ts +2 -0
  336. package/dist/desktop/model-settings-action.js +1 -0
  337. package/dist/desktop/native-file-drop.d.ts +8 -0
  338. package/dist/desktop/native-file-drop.js +1 -0
  339. package/dist/generated/commands.d.ts +103 -48
  340. package/dist/generated/commands.js +1 -1
  341. package/dist/image-lightbox.js +1 -1
  342. package/dist/image-preview-dialog.js +1 -1
  343. package/dist/image.js +1 -1
  344. package/dist/lib/app-reference.js +1 -1
  345. package/dist/lib/application-metadata.js +1 -1
  346. package/dist/lib/chat-path.d.ts +4 -0
  347. package/dist/lib/chat-path.js +1 -0
  348. package/dist/lib/code-highlighter.js +1 -1
  349. package/dist/lib/file-url.js +1 -1
  350. package/dist/lib/fuzzy.js +1 -1
  351. package/dist/lib/group-blocks.js +1 -1
  352. package/dist/lib/image-encode.js +1 -1
  353. package/dist/lib/limits.js +1 -1
  354. package/dist/lib/markdown-parser.js +1 -1
  355. package/dist/lib/markdown-rules.js +1 -1
  356. package/dist/lib/model-name.js +1 -1
  357. package/dist/lib/pointer-centered-zoom.js +1 -1
  358. package/dist/lib/prepare-prompt-files.js +1 -1
  359. package/dist/lib/reference-presentation.js +1 -1
  360. package/dist/lib/stream-style.js +1 -1
  361. package/dist/lib/streaming-markdown.js +1 -1
  362. package/dist/lib/tool-artifacts.js +1 -1
  363. package/dist/locales.d.ts +210 -0
  364. package/dist/locales.js +1 -1
  365. package/dist/mermaid/diagram.d.ts +3 -0
  366. package/dist/mermaid/diagram.js +1 -0
  367. package/dist/mermaid/export.d.ts +6 -0
  368. package/dist/mermaid/export.js +1 -0
  369. package/dist/mermaid/index.d.ts +1 -0
  370. package/dist/mermaid/index.js +1 -0
  371. package/dist/mermaid/preview.d.ts +11 -0
  372. package/dist/mermaid/preview.js +1 -0
  373. package/dist/oauth/claude-login.js +1 -1
  374. package/dist/oauth.js +1 -1
  375. package/dist/plugins/catalog-header.js +1 -1
  376. package/dist/plugins/catalog-skeleton.js +1 -1
  377. package/dist/plugins/host.js +1 -1
  378. package/dist/plugins/locales.js +1 -1
  379. package/dist/plugins/new-chat-directory.js +1 -1
  380. package/dist/plugins/pane.js +1 -1
  381. package/dist/plugins/panel-item.js +1 -1
  382. package/dist/plugins/plugin-detail-page.js +1 -1
  383. package/dist/plugins/plugin-icon.js +1 -1
  384. package/dist/plugins/plugin-icons.js +1 -1
  385. package/dist/plugins/plugins-page.js +1 -1
  386. package/dist/plugins/plugins.js +1 -1
  387. package/dist/plugins/read-skill-document.js +1 -1
  388. package/dist/plugins/skill-document.js +1 -1
  389. package/dist/plugins/skills-tab.js +1 -1
  390. package/dist/plugins/store.d.ts +1 -0
  391. package/dist/plugins/store.js +1 -1
  392. package/dist/plugins/toolbox-layout.js +1 -1
  393. package/dist/reference-projection.js +1 -1
  394. package/dist/search/chat-search.js +1 -1
  395. package/dist/search/codex-source-matches.js +1 -1
  396. package/dist/search/dom-matches.js +1 -1
  397. package/dist/search/find-bar.js +1 -1
  398. package/dist/search/literal-matches.js +1 -1
  399. package/dist/session-list/account-menu.js +1 -1
  400. package/dist/session-list/activity-list.js +1 -1
  401. package/dist/session-list/archived-sessions.js +1 -1
  402. package/dist/session-list/help-menu.js +1 -1
  403. package/dist/session-list/highlight.js +1 -1
  404. package/dist/session-list/host.js +1 -1
  405. package/dist/session-list/hover-info-card.js +1 -1
  406. package/dist/session-list/locales.js +1 -1
  407. package/dist/session-list/navigation-controls.js +1 -1
  408. package/dist/session-list/navigation-header.js +1 -1
  409. package/dist/session-list/navigation-store.js +1 -1
  410. package/dist/session-list/navigation-tabs.js +1 -1
  411. package/dist/session-list/navigation.js +1 -1
  412. package/dist/session-list/overflow-marquee.js +1 -1
  413. package/dist/session-list/platform.js +1 -1
  414. package/dist/session-list/row-stop-button.js +1 -1
  415. package/dist/session-list/session-groups.js +1 -1
  416. package/dist/session-list/session-info-card.js +1 -1
  417. package/dist/session-list/session-list.js +1 -1
  418. package/dist/session-list/session-row.js +1 -1
  419. package/dist/session-list/session-state-dot.js +1 -1
  420. package/dist/session-list/session-state-menu.js +1 -1
  421. package/dist/session-list/shortcut-hint.js +1 -1
  422. package/dist/session-list/shortcut.js +1 -1
  423. package/dist/session-list/sidebar-overlay.js +1 -1
  424. package/dist/session-list/trailing-swap.js +1 -1
  425. package/dist/session-list/use-activity-notification.js +1 -1
  426. package/dist/session-list/use-activity-preview.js +1 -1
  427. package/dist/session-list/use-cmd-held.js +1 -1
  428. package/dist/session-list/use-project-sessions.js +1 -1
  429. package/dist/session-list/virtual-session-rows.js +1 -1
  430. package/dist/session-timeline/activity-group.js +1 -1
  431. package/dist/session-timeline/activity-projection.js +1 -1
  432. package/dist/session-timeline/assistant-content.js +1 -1
  433. package/dist/session-timeline/assistant-image-references.js +1 -1
  434. package/dist/session-timeline/assistant-turn.js +1 -1
  435. package/dist/session-timeline/async-questions.js +1 -1
  436. package/dist/session-timeline/edited-files-card.js +1 -1
  437. package/dist/session-timeline/history-timeline.js +1 -1
  438. package/dist/session-timeline/host.d.ts +3 -0
  439. package/dist/session-timeline/host.js +1 -1
  440. package/dist/session-timeline/image-generation-progress.js +1 -1
  441. package/dist/session-timeline/navigation-rail.js +1 -1
  442. package/dist/session-timeline/plan.js +1 -1
  443. package/dist/session-timeline/question-reply.js +1 -1
  444. package/dist/session-timeline/resource-content.d.ts +1 -0
  445. package/dist/session-timeline/resource-content.js +1 -1
  446. package/dist/session-timeline/session-timeline.js +1 -1
  447. package/dist/session-timeline/timeline-registry.js +1 -1
  448. package/dist/session-timeline/turn-activity.js +1 -1
  449. package/dist/session-timeline/turn-error.js +1 -1
  450. package/dist/session-timeline/turn-retry.js +1 -1
  451. package/dist/session-timeline/turn-time.js +1 -1
  452. package/dist/session-timeline/turns.js +1 -1
  453. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  454. package/dist/session-timeline/user-message.js +1 -1
  455. package/dist/settings/codex-account-card.js +1 -1
  456. package/dist/settings/login-card.js +1 -1
  457. package/dist/settings/model-alias-settings.js +1 -1
  458. package/dist/settings/model-aliases.js +1 -1
  459. package/dist/settings/provider-logos.d.ts +4 -0
  460. package/dist/settings/provider-logos.js +1 -1
  461. package/dist/settings/provider-section.js +1 -1
  462. package/dist/settings/providers-port.js +1 -1
  463. package/dist/settings/providers.d.ts +1 -1
  464. package/dist/settings/providers.js +1 -1
  465. package/dist/settings/settings-bridge.js +1 -1
  466. package/dist/settings/settings.js +1 -1
  467. package/native/darwin-arm64/THIRD_PARTY_NOTICES.md +8 -8
  468. package/native/darwin-arm64/artifact.json +1 -1
  469. package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
  470. package/native/win32-x64/THIRD_PARTY_NOTICES.md +7 -7
  471. package/native/win32-x64/alwith_native_chat.dll +0 -0
  472. package/native/win32-x64/artifact.json +1 -1
  473. package/package.json +10 -4
  474. package/dist/chunk-0307kp7e.js +0 -2
  475. package/dist/chunk-04vnhbvc.js +0 -2
  476. package/dist/chunk-0yqb54zg.js +0 -2
  477. package/dist/chunk-1renytb3.js +0 -3
  478. package/dist/chunk-2drcx544.js +0 -2
  479. package/dist/chunk-2sxxr6j8.js +0 -2
  480. package/dist/chunk-2tc9kn50.js +0 -2
  481. package/dist/chunk-3t5cksae.js +0 -2
  482. package/dist/chunk-4h07zyxp.js +0 -2
  483. package/dist/chunk-4jy404m1.js +0 -2
  484. package/dist/chunk-4n4gap45.js +0 -2
  485. package/dist/chunk-4zz6dnqa.js +0 -2
  486. package/dist/chunk-5m45z6qm.js +0 -4
  487. package/dist/chunk-6xds0dkq.js +0 -2
  488. package/dist/chunk-7cv512vy.js +0 -2
  489. package/dist/chunk-7hwg9r4y.js +0 -2
  490. package/dist/chunk-856bck34.js +0 -2
  491. package/dist/chunk-95n1cpnj.js +0 -2
  492. package/dist/chunk-9h77fcpn.js +0 -2
  493. package/dist/chunk-9pcx42v8.js +0 -2
  494. package/dist/chunk-9rvf1am9.js +0 -2
  495. package/dist/chunk-ehmdmfs5.js +0 -2
  496. package/dist/chunk-f0kgxjp1.js +0 -2
  497. package/dist/chunk-fjk1g303.js +0 -2
  498. package/dist/chunk-fjseqvmx.js +0 -1
  499. package/dist/chunk-gez0k8zs.js +0 -7
  500. package/dist/chunk-gjfhvaxn.js +0 -2
  501. package/dist/chunk-h4xxyhpn.js +0 -4
  502. package/dist/chunk-hmet2d96.js +0 -2
  503. package/dist/chunk-hwmpcj3y.js +0 -2
  504. package/dist/chunk-j9snfndd.js +0 -2
  505. package/dist/chunk-jz6zecb7.js +0 -2
  506. package/dist/chunk-kp7qa98m.js +0 -2
  507. package/dist/chunk-ncwf6pjj.js +0 -3
  508. package/dist/chunk-nh9gk065.js +0 -2
  509. package/dist/chunk-nxj8m5bm.js +0 -2
  510. package/dist/chunk-pn5ghg65.js +0 -2
  511. package/dist/chunk-pwcw4zp2.js +0 -2
  512. package/dist/chunk-q3vvg0de.js +0 -2
  513. package/dist/chunk-qkw2nhsr.js +0 -4
  514. package/dist/chunk-rncx5gxz.js +0 -2
  515. package/dist/chunk-s5c2ha8t.js +0 -2
  516. package/dist/chunk-sp411z4y.js +0 -7
  517. package/dist/chunk-sqm2vsf5.js +0 -2
  518. package/dist/chunk-t4dsmqdq.js +0 -2
  519. package/dist/chunk-thhtbvj1.js +0 -2
  520. package/dist/chunk-tvbgjmtw.js +0 -3
  521. package/dist/chunk-v0y5fepf.js +0 -3
  522. package/dist/chunk-vctq22tq.js +0 -2
  523. package/dist/chunk-vepv6ktb.js +0 -2
  524. package/dist/chunk-vet6snkp.js +0 -4
  525. package/dist/chunk-vjmgh1q9.js +0 -2
  526. package/dist/chunk-vmg3evhm.js +0 -2
  527. package/dist/chunk-w22ch68s.js +0 -2
  528. package/dist/chunk-wdacgfwp.js +0 -2
  529. package/dist/chunk-xmks1g9y.js +0 -2
  530. package/dist/chunk-xqwbn2ph.js +0 -2
  531. package/dist/chunk-y6kxhkjm.js +0 -2
  532. package/dist/chunk-yy1pm240.js +0 -2
  533. package/dist/chunk-z7ehwkcq.js +0 -2
  534. package/dist/chunk-zah0npdy.js +0 -2
  535. package/dist/chunk-zah37d5q.js +0 -2
  536. package/dist/chunk-zcwsc0gx.js +0 -2
  537. /package/native/darwin-arm64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-APACHE +0 -0
  538. /package/native/darwin-arm64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-MIT +0 -0
  539. /package/native/darwin-arm64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-APACHE +0 -0
  540. /package/native/darwin-arm64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-MIT +0 -0
  541. /package/native/darwin-arm64/licenses/{mio-1.2.4 → mio-1.2.5}/LICENSE +0 -0
  542. /package/native/darwin-arm64/licenses/{nix-0.31.3 → nix-0.32.0}/LICENSE +0 -0
  543. /package/native/darwin-arm64/licenses/{opencode-ai-models-0.0.124 → opencode-ai-models-0.0.136}/LICENSE +0 -0
  544. /package/native/darwin-arm64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-APACHE +0 -0
  545. /package/native/darwin-arm64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-MIT +0 -0
  546. /package/native/darwin-arm64/licenses/{rustls-webpki-0.103.16 → rustls-webpki-0.103.17}/LICENSE +0 -0
  547. /package/native/darwin-arm64/licenses/{zip-9.5.1 → zip-9.6.0}/LICENSE +0 -0
  548. /package/native/win32-x64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-APACHE +0 -0
  549. /package/native/win32-x64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-MIT +0 -0
  550. /package/native/win32-x64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-APACHE +0 -0
  551. /package/native/win32-x64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-MIT +0 -0
  552. /package/native/win32-x64/licenses/{mio-1.2.4 → mio-1.2.5}/LICENSE +0 -0
  553. /package/native/win32-x64/licenses/{opencode-ai-models-0.0.124 → opencode-ai-models-0.0.136}/LICENSE +0 -0
  554. /package/native/win32-x64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-APACHE +0 -0
  555. /package/native/win32-x64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-MIT +0 -0
  556. /package/native/win32-x64/licenses/{rustls-webpki-0.103.16 → rustls-webpki-0.103.17}/LICENSE +0 -0
  557. /package/native/win32-x64/licenses/{zip-9.5.1 → zip-9.6.0}/LICENSE +0 -0
@@ -1 +1 @@
1
- import{et,zt,Vt}from"../chunk-9rf3qecr.js";export{et as MODEL_ALIASES_KEY,Vt as saveModelAlias,zt as useModelAliases};
1
+ import{pt,Jt,Xt}from"../chunk-q1yz3t9z.js";export{pt as MODEL_ALIASES_KEY,Xt as saveModelAlias,Jt as useModelAliases};
@@ -4,3 +4,7 @@ export declare function DeepSeekLogo(props: SVGProps<SVGSVGElement>): import("re
4
4
  export declare function GrokLogo(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
5
5
  export declare function OpenRouterLogo(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
6
6
  export declare function QwenLogo(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
7
+ export declare function AlwithAccountLogo(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
8
+ export declare function ChatGPTLogo(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
9
+ export declare function MiniMaxLogo(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
10
+ export declare function SeedreamLogo(props: SVGProps<SVGSVGElement>): import("react").JSX.Element;
@@ -1 +1 @@
1
- import{Eo,Ot,Ut,Bt,Gt}from"../chunk-x0h0g1ma.js";export{Eo as ClaudeLogo,Ot as DeepSeekLogo,Ut as GrokLogo,Bt as OpenRouterLogo,Gt as QwenLogo};
1
+ import{Ki,Hn,Un,Bn,Gn,Wi,Zi,Qi,Ji}from"../chunk-dd9k5bbt.js";export{Wi as AlwithAccountLogo,Zi as ChatGPTLogo,Ki as ClaudeLogo,Hn as DeepSeekLogo,Un as GrokLogo,Qi as MiniMaxLogo,Bn as OpenRouterLogo,Gn as QwenLogo,Ji as SeedreamLogo};
@@ -1 +1 @@
1
- import{wo,$r,ko,So,_o,Sn}from"../chunk-vet6snkp.js";import"../chunk-zah37d5q.js";import"../chunk-z7ehwkcq.js";import"../chunk-twx75z08.js";import"../chunk-3yq0a0f1.js";import"../chunk-4h07zyxp.js";import"../chunk-x0h0g1ma.js";import"../chunk-xbp4r3n4.js";import"../chunk-vypkwd0x.js";import"../chunk-0yqb54zg.js";import"../chunk-xmks1g9y.js";import"../chunk-pwcw4zp2.js";import"../chunk-qdgsg6v4.js";import"../chunk-tjfjvzv5.js";import"../chunk-vjmgh1q9.js";import"../chunk-vnr9rqs6.js";import"../chunk-xqwbn2ph.js";import"../chunk-f0kgxjp1.js";export{Sn as CustomProviderEditor,wo as ManagedProviderSection,_o as ProviderRow,$r as ProviderSection,ko as ProviderTabs,So as TestFeedback};
1
+ import{ai,Zs,li,ci,di,Xn}from"../chunk-n811d65m.js";import"../chunk-74b70n1g.js";import"../chunk-rg9ckzpr.js";import"../chunk-ta6rbxh5.js";import"../chunk-4jp1d558.js";import"../chunk-x2wcwpw3.js";import"../chunk-jpr2y0y3.js";import"../chunk-81n37a11.js";import"../chunk-gttw4rmx.js";import"../chunk-x3v10a71.js";import"../chunk-rkqptd9w.js";import"../chunk-5jq3xg3q.js";import"../chunk-n96z8etk.js";import"../chunk-tdvx2n5m.js";import"../chunk-dd9k5bbt.js";import"../chunk-esbgn8q0.js";import"../chunk-73e9vpm9.js";import"../chunk-1fadxh2z.js";export{Xn as CustomProviderEditor,ai as ManagedProviderSection,di as ProviderRow,Zs as ProviderSection,li as ProviderTabs,ci as TestFeedback};
@@ -1 +1 @@
1
- import{Po,Io,Kr,qr,At,Et}from"../chunk-zah37d5q.js";import"../chunk-z7ehwkcq.js";import"../chunk-4h07zyxp.js";import"../chunk-x0h0g1ma.js";export{Po as PROVIDERS_CHANGED,Io as PROVIDERS_REVOKED,At as applyProvidersWhenIdle,qr as createManagedProvidersPort,Kr as createProvidersPort,Et as useProviders};
1
+ import{Fi,Oi,_n,ha,Pn,Ue}from"../chunk-5jq3xg3q.js";import"../chunk-n96z8etk.js";import"../chunk-tdvx2n5m.js";import"../chunk-dd9k5bbt.js";export{Fi as PROVIDERS_CHANGED,Oi as PROVIDERS_REVOKED,Pn as applyProvidersWhenIdle,ha as createManagedProvidersPort,_n as createProvidersPort,Ue as useProviders};
@@ -75,7 +75,7 @@ export declare function providerGroups(snapshot: ProviderSnapshot): Array<{
75
75
  models: GatewayModel[];
76
76
  }>;
77
77
  export declare function gatewayModelId(providerId: string, modelId: string): string;
78
- export declare function resolveSessionModel(model: string | null, snapshot: ProviderSnapshot): string | null;
78
+ export declare function resolveSessionModel(model: string | null, snapshot: ProviderSnapshot, purpose?: "session" | "draft", isAccount?: (model: string | null | undefined) => boolean): string | null;
79
79
  export declare function providerRegion(provider: Provider, regionId: string | null | undefined): ProviderRegion | null;
80
80
  export declare function providerKeyUrl(provider: Provider, regionId: string | null | undefined): string | null;
81
81
  export declare function providerApplicationPending(error: unknown): boolean;
@@ -1 +1 @@
1
- import{q,No,Ye,Mo,Xe,Yr,X,Dt,Ht,Xr,Ao,ea}from"../chunk-4h07zyxp.js";import"../chunk-x0h0g1ma.js";export{Ao as MODEL_PRESENTATION,q as PROVIDERS,Xr as customModelEffort,Xe as gatewayModelId,No as isAccountModel,Ye as parseCustomModels,ea as presentModel,Ht as providerApplicationPending,Mo as providerGroups,Dt as providerKeyUrl,X as providerRegion,Yr as resolveSessionModel};
1
+ import{R,bt,Ct,fe,S,xa,se,Dn,Fn,ba,wt,Ca}from"../chunk-tdvx2n5m.js";import"../chunk-dd9k5bbt.js";export{wt as MODEL_PRESENTATION,R as PROVIDERS,ba as customModelEffort,S as gatewayModelId,bt as isAccountModel,Ct as parseCustomModels,Ca as presentModel,Fn as providerApplicationPending,fe as providerGroups,Dn as providerKeyUrl,se as providerRegion,xa as resolveSessionModel};
@@ -1 +1 @@
1
- import{Zr,Qr,Jr}from"../chunk-00z352ph.js";export{Zr as codexSettingsBridge,Jr as createSettingsBridgeClient,Qr as serveSettingsBridge};
1
+ import{qs,Ks,Ws}from"../chunk-k4a3p16c.js";export{qs as codexSettingsBridge,Ws as createSettingsBridgeClient,Ks as serveSettingsBridge};
@@ -1 +1 @@
1
- import{Zr,Qr,Jr}from"../chunk-00z352ph.js";import"../chunk-vjmgh1q9.js";import"../chunk-qdgsg6v4.js";import"../chunk-vypkwd0x.js";import"../chunk-tjfjvzv5.js";import"../chunk-vnr9rqs6.js";import"../chunk-f0kgxjp1.js";import"../chunk-xqwbn2ph.js";import"../chunk-pwcw4zp2.js";import"../chunk-xbp4r3n4.js";import"../chunk-xmks1g9y.js";import"../chunk-0yqb54zg.js";import{Ft}from"../chunk-3yq0a0f1.js";import{Rt,To,Lt}from"../chunk-twx75z08.js";import{Ot,Ut,Bt,Gt}from"../chunk-x0h0g1ma.js";import{q,No,Ye,Mo,Xe,Yr,X,Dt,Ht,Xr,Ao,ea}from"../chunk-4h07zyxp.js";import"../chunk-z7ehwkcq.js";import{Po,Io,Kr,qr,At,Et}from"../chunk-zah37d5q.js";import{wo,$r,ko,So,_o,Sn}from"../chunk-vet6snkp.js";import{et,zt,Vt}from"../chunk-9rf3qecr.js";import{Wr}from"../chunk-hwmpcj3y.js";export{Lt as CodexAccountCard,To as CodexAccountSummary,Sn as CustomProviderEditor,Ot as DeepSeekLogo,Ut as GrokLogo,Ft as LoginCard,et as MODEL_ALIASES_KEY,Ao as MODEL_PRESENTATION,wo as ManagedProviderSection,Wr as ModelAliasSettings,Bt as OpenRouterLogo,q as PROVIDERS,Po as PROVIDERS_CHANGED,Io as PROVIDERS_REVOKED,_o as ProviderRow,$r as ProviderSection,ko as ProviderTabs,Gt as QwenLogo,So as TestFeedback,Rt as UsageLimitRow,At as applyProvidersWhenIdle,Zr as codexSettingsBridge,qr as createManagedProvidersPort,Kr as createProvidersPort,Jr as createSettingsBridgeClient,Xr as customModelEffort,Xe as gatewayModelId,No as isAccountModel,Ye as parseCustomModels,ea as presentModel,Ht as providerApplicationPending,Mo as providerGroups,Dt as providerKeyUrl,X as providerRegion,Yr as resolveSessionModel,Vt as saveModelAlias,Qr as serveSettingsBridge,zt as useModelAliases,Et as useProviders};
1
+ import{qs,Ks,Ws}from"../chunk-k4a3p16c.js";import"../chunk-jpr2y0y3.js";import"../chunk-4jp1d558.js";import"../chunk-81n37a11.js";import"../chunk-x2wcwpw3.js";import"../chunk-gttw4rmx.js";import"../chunk-1fadxh2z.js";import"../chunk-73e9vpm9.js";import"../chunk-esbgn8q0.js";import"../chunk-ta6rbxh5.js";import"../chunk-rkqptd9w.js";import"../chunk-x3v10a71.js";import{Qt}from"../chunk-rg9ckzpr.js";import{Wt,ui,Zt}from"../chunk-74b70n1g.js";import{Hn,Un,Bn,Gn}from"../chunk-dd9k5bbt.js";import{R,bt,Ct,fe,S,xa,se,Dn,Fn,ba,wt,Ca}from"../chunk-tdvx2n5m.js";import"../chunk-n96z8etk.js";import{Fi,Oi,_n,ha,Pn,Ue}from"../chunk-5jq3xg3q.js";import{ai,Zs,li,ci,di,Xn}from"../chunk-n811d65m.js";import{pt,Jt,Xt}from"../chunk-q1yz3t9z.js";import{Qs}from"../chunk-q4c6f84f.js";export{Zt as CodexAccountCard,ui as CodexAccountSummary,Xn as CustomProviderEditor,Hn as DeepSeekLogo,Un as GrokLogo,Qt as LoginCard,pt as MODEL_ALIASES_KEY,wt as MODEL_PRESENTATION,ai as ManagedProviderSection,Qs as ModelAliasSettings,Bn as OpenRouterLogo,R as PROVIDERS,Fi as PROVIDERS_CHANGED,Oi as PROVIDERS_REVOKED,di as ProviderRow,Zs as ProviderSection,li as ProviderTabs,Gn as QwenLogo,ci as TestFeedback,Wt as UsageLimitRow,Pn as applyProvidersWhenIdle,qs as codexSettingsBridge,ha as createManagedProvidersPort,_n as createProvidersPort,Ws as createSettingsBridgeClient,ba as customModelEffort,S as gatewayModelId,bt as isAccountModel,Ct as parseCustomModels,Ca as presentModel,Fn as providerApplicationPending,fe as providerGroups,Dn as providerKeyUrl,se as providerRegion,xa as resolveSessionModel,Xt as saveModelAlias,Ks as serveSettingsBridge,Jt as useModelAliases,Ue as useProviders};
@@ -2,7 +2,7 @@
2
2
 
3
3
  ALwith native implementations are proprietary. Dependencies retain their own licences.
4
4
 
5
- - @opencode-ai/models@0.0.124 (models.dev pricing data): MIT; licenses/opencode-ai-models-0.0.124/
5
+ - @opencode-ai/models@0.0.136 (models.dev pricing data): MIT; licenses/opencode-ai-models-0.0.136/
6
6
  - Inflector@0.11.4: BSD-2-Clause; licenses/Inflector-0.11.4/; source: https://raw.githubusercontent.com/whatisinternet/inflector/a4a95eac75043f4bffb127c7c8ec886b5b106053/LICENSE.md
7
7
  - adler32@1.2.0: Zlib; licenses/adler32-1.2.0/
8
8
  - aes@0.9.4: MIT OR Apache-2.0; licenses/aes-0.9.4/
@@ -14,11 +14,11 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
14
14
  - base64@0.23.1: MIT OR Apache-2.0; licenses/base64-0.23.1/
15
15
  - bitflags@2.13.2: MIT OR Apache-2.0; licenses/bitflags-2.13.2/
16
16
  - block-buffer@0.12.1: MIT OR Apache-2.0; licenses/block-buffer-0.12.1/
17
- - bumpalo@3.20.3: MIT OR Apache-2.0; licenses/bumpalo-3.20.3/
17
+ - bumpalo@3.20.4: MIT OR Apache-2.0; licenses/bumpalo-3.20.4/
18
18
  - bytecount@0.6.9: Apache-2.0/MIT; licenses/bytecount-0.6.9/
19
19
  - bytes@1.12.1: MIT; licenses/bytes-1.12.1/
20
20
  - bzip2@0.6.1: MIT OR Apache-2.0; licenses/bzip2-0.6.1/
21
- - cc@1.11.1: MIT OR Apache-2.0; licenses/cc-1.11.1/
21
+ - cc@1.11.2: MIT OR Apache-2.0; licenses/cc-1.11.2/
22
22
  - cfg-if@1.0.5: MIT OR Apache-2.0; licenses/cfg-if-1.0.5/
23
23
  - cfg_aliases@0.2.2: MIT; licenses/cfg_aliases-0.2.2/
24
24
  - chacha20@0.10.2: MIT OR Apache-2.0; licenses/chacha20-0.10.2/
@@ -100,8 +100,8 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
100
100
  - lru-slab@0.1.3: MIT OR Apache-2.0 OR Zlib; licenses/lru-slab-0.1.3/
101
101
  - lzma-rust2@0.25.0: Apache-2.0; licenses/lzma-rust2-0.25.0/
102
102
  - memchr@2.8.3: Unlicense OR MIT; licenses/memchr-2.8.3/
103
- - mio@1.2.4: MIT; licenses/mio-1.2.4/
104
- - nix@0.31.3: MIT; licenses/nix-0.31.3/
103
+ - mio@1.2.5: MIT; licenses/mio-1.2.5/
104
+ - nix@0.32.0: MIT; licenses/nix-0.32.0/
105
105
  - no_std_io2@0.9.4: Apache-2.0 OR MIT; licenses/no_std_io2-0.9.4/
106
106
  - num-conv@0.2.2: MIT OR Apache-2.0; licenses/num-conv-0.2.2/
107
107
  - num-traits@0.2.19: MIT OR Apache-2.0; licenses/num-traits-0.2.19/
@@ -122,7 +122,7 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
122
122
  - quinn-proto@0.11.19: MIT OR Apache-2.0; licenses/quinn-proto-0.11.19/
123
123
  - quinn-udp@0.5.16: MIT OR Apache-2.0; licenses/quinn-udp-0.5.16/
124
124
  - quote@1.0.47: MIT OR Apache-2.0; licenses/quote-1.0.47/
125
- - rand@0.10.3: MIT OR Apache-2.0; licenses/rand-0.10.3/
125
+ - rand@0.10.4: MIT OR Apache-2.0; licenses/rand-0.10.4/
126
126
  - rand_core@0.10.1: MIT OR Apache-2.0; licenses/rand_core-0.10.1/
127
127
  - rand_pcg@0.10.2: MIT OR Apache-2.0; licenses/rand_pcg-0.10.2/
128
128
  - regex-lite@0.1.9: MIT OR Apache-2.0; licenses/regex-lite-0.1.9/
@@ -137,7 +137,7 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
137
137
  - rustls@0.23.46: Apache-2.0 OR ISC OR MIT; licenses/rustls-0.23.46/
138
138
  - rustls-pki-types@1.16.0: MIT OR Apache-2.0; licenses/rustls-pki-types-1.16.0/
139
139
  - rustls-platform-verifier@0.7.1: MIT OR Apache-2.0; licenses/rustls-platform-verifier-0.7.1/
140
- - rustls-webpki@0.103.16: ISC; licenses/rustls-webpki-0.103.16/
140
+ - rustls-webpki@0.103.17: ISC; licenses/rustls-webpki-0.103.17/
141
141
  - rustversion@1.0.23: MIT OR Apache-2.0; licenses/rustversion-1.0.23/
142
142
  - scopeguard@1.2.0: MIT OR Apache-2.0; licenses/scopeguard-1.2.0/
143
143
  - security-framework@3.7.0: MIT OR Apache-2.0; licenses/security-framework-3.7.0/
@@ -202,7 +202,7 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
202
202
  - zerotrie@0.2.5: Unicode-3.0; licenses/zerotrie-0.2.5/
203
203
  - zerovec@0.11.9: Unicode-3.0; licenses/zerovec-0.11.9/
204
204
  - zerovec-derive@0.11.7: Unicode-3.0; licenses/zerovec-derive-0.11.7/
205
- - zip@9.5.1: MIT; licenses/zip-9.5.1/
205
+ - zip@9.6.0: MIT; licenses/zip-9.6.0/
206
206
  - zlib-rs@0.6.8: Zlib; licenses/zlib-rs-0.6.8/
207
207
  - zmij@1.0.23: MIT; licenses/zmij-1.0.23/
208
208
  - zopfli@0.8.4: Apache-2.0; licenses/zopfli-0.8.4/
@@ -4,5 +4,5 @@
4
4
  "abi": 1,
5
5
  "target": "aarch64-apple-darwin",
6
6
  "binary": "libalwith_native_chat.dylib",
7
- "sha256": "c51681bd62566325c9eea0ca278429e9523cafebc1ecc51ae964ebcb7b8bf243"
7
+ "sha256": "dca67af9c5610b7227e6a5dee3eb9749042c51e54fae39371cec45aae202866d"
8
8
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  ALwith native implementations are proprietary. Dependencies retain their own licences.
4
4
 
5
- - @opencode-ai/models@0.0.124 (models.dev pricing data): MIT; licenses/opencode-ai-models-0.0.124/
5
+ - @opencode-ai/models@0.0.136 (models.dev pricing data): MIT; licenses/opencode-ai-models-0.0.136/
6
6
  - Inflector@0.11.4: BSD-2-Clause; licenses/Inflector-0.11.4/; source: https://raw.githubusercontent.com/whatisinternet/inflector/a4a95eac75043f4bffb127c7c8ec886b5b106053/LICENSE.md
7
7
  - adler32@1.2.0: Zlib; licenses/adler32-1.2.0/
8
8
  - aes@0.9.4: MIT OR Apache-2.0; licenses/aes-0.9.4/
@@ -14,11 +14,11 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
14
14
  - base64@0.23.1: MIT OR Apache-2.0; licenses/base64-0.23.1/
15
15
  - bitflags@2.13.2: MIT OR Apache-2.0; licenses/bitflags-2.13.2/
16
16
  - block-buffer@0.12.1: MIT OR Apache-2.0; licenses/block-buffer-0.12.1/
17
- - bumpalo@3.20.3: MIT OR Apache-2.0; licenses/bumpalo-3.20.3/
17
+ - bumpalo@3.20.4: MIT OR Apache-2.0; licenses/bumpalo-3.20.4/
18
18
  - bytecount@0.6.9: Apache-2.0/MIT; licenses/bytecount-0.6.9/
19
19
  - bytes@1.12.1: MIT; licenses/bytes-1.12.1/
20
20
  - bzip2@0.6.1: MIT OR Apache-2.0; licenses/bzip2-0.6.1/
21
- - cc@1.11.1: MIT OR Apache-2.0; licenses/cc-1.11.1/
21
+ - cc@1.11.2: MIT OR Apache-2.0; licenses/cc-1.11.2/
22
22
  - cfg-if@1.0.5: MIT OR Apache-2.0; licenses/cfg-if-1.0.5/
23
23
  - cfg_aliases@0.2.2: MIT; licenses/cfg_aliases-0.2.2/
24
24
  - chacha20@0.10.2: MIT OR Apache-2.0; licenses/chacha20-0.10.2/
@@ -96,7 +96,7 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
96
96
  - lru-slab@0.1.3: MIT OR Apache-2.0 OR Zlib; licenses/lru-slab-0.1.3/
97
97
  - lzma-rust2@0.25.0: Apache-2.0; licenses/lzma-rust2-0.25.0/
98
98
  - memchr@2.8.3: Unlicense OR MIT; licenses/memchr-2.8.3/
99
- - mio@1.2.4: MIT; licenses/mio-1.2.4/
99
+ - mio@1.2.5: MIT; licenses/mio-1.2.5/
100
100
  - no_std_io2@0.9.4: Apache-2.0 OR MIT; licenses/no_std_io2-0.9.4/
101
101
  - num-conv@0.2.2: MIT OR Apache-2.0; licenses/num-conv-0.2.2/
102
102
  - num-traits@0.2.19: MIT OR Apache-2.0; licenses/num-traits-0.2.19/
@@ -117,7 +117,7 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
117
117
  - quinn-proto@0.11.19: MIT OR Apache-2.0; licenses/quinn-proto-0.11.19/
118
118
  - quinn-udp@0.5.16: MIT OR Apache-2.0; licenses/quinn-udp-0.5.16/
119
119
  - quote@1.0.47: MIT OR Apache-2.0; licenses/quote-1.0.47/
120
- - rand@0.10.3: MIT OR Apache-2.0; licenses/rand-0.10.3/
120
+ - rand@0.10.4: MIT OR Apache-2.0; licenses/rand-0.10.4/
121
121
  - rand_core@0.10.1: MIT OR Apache-2.0; licenses/rand_core-0.10.1/
122
122
  - rand_pcg@0.10.2: MIT OR Apache-2.0; licenses/rand_pcg-0.10.2/
123
123
  - regex-lite@0.1.9: MIT OR Apache-2.0; licenses/regex-lite-0.1.9/
@@ -131,7 +131,7 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
131
131
  - rustls@0.23.46: Apache-2.0 OR ISC OR MIT; licenses/rustls-0.23.46/
132
132
  - rustls-pki-types@1.16.0: MIT OR Apache-2.0; licenses/rustls-pki-types-1.16.0/
133
133
  - rustls-platform-verifier@0.7.1: MIT OR Apache-2.0; licenses/rustls-platform-verifier-0.7.1/
134
- - rustls-webpki@0.103.16: ISC; licenses/rustls-webpki-0.103.16/
134
+ - rustls-webpki@0.103.17: ISC; licenses/rustls-webpki-0.103.17/
135
135
  - rustversion@1.0.23: MIT OR Apache-2.0; licenses/rustversion-1.0.23/
136
136
  - scopeguard@1.2.0: MIT OR Apache-2.0; licenses/scopeguard-1.2.0/
137
137
  - semver@1.0.28: MIT OR Apache-2.0; licenses/semver-1.0.28/
@@ -195,7 +195,7 @@ ALwith native implementations are proprietary. Dependencies retain their own lic
195
195
  - zerotrie@0.2.5: Unicode-3.0; licenses/zerotrie-0.2.5/
196
196
  - zerovec@0.11.9: Unicode-3.0; licenses/zerovec-0.11.9/
197
197
  - zerovec-derive@0.11.7: Unicode-3.0; licenses/zerovec-derive-0.11.7/
198
- - zip@9.5.1: MIT; licenses/zip-9.5.1/
198
+ - zip@9.6.0: MIT; licenses/zip-9.6.0/
199
199
  - zlib-rs@0.6.8: Zlib; licenses/zlib-rs-0.6.8/
200
200
  - zmij@1.0.23: MIT; licenses/zmij-1.0.23/
201
201
  - zopfli@0.8.4: Apache-2.0; licenses/zopfli-0.8.4/
@@ -4,5 +4,5 @@
4
4
  "abi": 1,
5
5
  "target": "x86_64-pc-windows-msvc",
6
6
  "binary": "alwith_native_chat.dll",
7
- "sha256": "b464b15e1d67ccaadab0d51c6cf23f37d99365122358c08dc5520016ebf45b4f"
7
+ "sha256": "7443076bde2c0b1622bdc1633f9ab9a8b7396103e1f267f2803c941246fa221f"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwith/module-chat",
3
- "version": "0.6.17",
3
+ "version": "0.6.19",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -350,6 +350,11 @@
350
350
  "types": "./dist/oauth.d.ts",
351
351
  "import": "./dist/oauth.js",
352
352
  "default": "./dist/oauth.js"
353
+ },
354
+ "./desktop": {
355
+ "types": "./dist/desktop/desktop.d.ts",
356
+ "import": "./dist/desktop/desktop.js",
357
+ "default": "./dist/desktop/desktop.js"
353
358
  }
354
359
  },
355
360
  "peerDependencies": {
@@ -409,7 +414,7 @@
409
414
  "@nyssance/codex-acp-v2": "^0.7.70",
410
415
  "@nyssance/shadcn": "^4.23.4",
411
416
  "@shadcn/react": "^0.3.1",
412
- "@solar-icons/react": "^2.5.0",
417
+ "@solar-icons/react": "^2.6.0",
413
418
  "ansi_up": "^6.0.6",
414
419
  "class-variance-authority": "^0.7.1",
415
420
  "cn": "^0.5.2",
@@ -420,10 +425,11 @@
420
425
  "highlight.js": "^11.12.0",
421
426
  "katex": "^0.19.1",
422
427
  "ldrs": "^1.1.9",
423
- "lucide-react": "^1.72.0",
428
+ "lucide-react": "^1.73.0",
424
429
  "marked": "^18.2.0",
425
430
  "marked-linkify-it": "^4.0.2",
426
- "motion": "^14.13.0",
431
+ "mermaid": "^12.3.0",
432
+ "motion": "^14.14.0",
427
433
  "smplr": "^1.2.0"
428
434
  },
429
435
  "license": "SEE LICENSE IN LICENSE",
@@ -1,2 +0,0 @@
1
- import{pe}from"./chunk-1e7gk302.js";import{x}from"./chunk-9h77fcpn.js";import{t,Ct}from"./chunk-xqwbn2ph.js";import{isEmbeddedResource as T,isImage as y,isResourceLink as L}from"@nyssance/codex-acp-v2/client";import{DownloadIcon as F,FileIcon as I,ImageOffIcon as U,LoaderCircleIcon as z}from"lucide-react";import{useState as C}from"react";import{Button as p}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as s}from"react/jsx-runtime";function ka(e){let r=e.split(/[\\/]/).at(-1)??e;if(e.startsWith("file:")||/^https?:/.test(e))r=new URL(e).pathname.split("/").at(-1)??"";try{return decodeURIComponent(r)||"attachment"}catch(a){if(a instanceof URIError)return r||"attachment";throw a}}function j(e,r){let a=document.createElement("a");a.href=r,a.download=e,a.click()}function ne({block:e,generated:r=!1}){let a=t(),[d,f]=C(!1),[R,B]=C(null);if(L(e)){let c=x(e.uri);if(c!==null)return n(pe,{app:{id:c,name:e.title??e.name}});if(e.uri==="codex-image:unavailable")return s("span",{className:"text-muted-foreground flex items-center gap-2 rounded-lg border p-3 text-sm",children:[n(U,{className:"size-4"}),a.t("timeline.imageUnavailable")]});let u=ka(e.uri);return s(p,{variant:"outline",className:"h-auto max-w-full min-w-0 justify-start gap-3 overflow-hidden p-3","aria-label":e.title??e.name,title:e.uri,onClick:()=>a.openLink(e.uri),children:[n(I,{}),s("span",{className:"min-w-0 flex-1 text-start",children:[n("span",{className:"block truncate",children:e.title??e.name}),s("span",{className:"text-muted-foreground block truncate text-xs",children:[(e.title??e.name)!==u&&`${u} · `,e.mimeType??u.split(".").at(-1)?.toUpperCase()]})]})]})}if(!T(e)&&!y(e))return null;let i=y(e)?{uri:e.uri??`image.${e.mimeType.split("/")[1]??"png"}`,mimeType:e.mimeType,blob:e.data}:e.resource,o=ka(i.uri);if("text"in i)return s("div",{className:"min-w-0",children:[n("pre",{className:"overflow-x-auto whitespace-pre-wrap",children:i.text}),s(p,{variant:"link",size:"sm",className:"max-w-full min-w-0",title:i.uri,onClick:()=>a.openLink(i.uri),children:[n(I,{}),n("span",{className:"truncate",children:o})]})]});let m=`data:${i.mimeType??"application/octet-stream"};base64,${i.blob}`,g=i.mimeType?.toLowerCase().startsWith("image/")&&R!==m,{openImage:w,openImageGallery:v}=a,h=v?()=>v([{src:m,alt:o,uri:i.uri}],0):w&&(()=>w(m)),l=r&&g,E=async()=>{f(!0);try{if(a.saveFile)await a.saveFile(o,i.blob);else j(o,m)}catch(c){Ct(a,c)}finally{f(!1)}},N=n("img",{src:m,alt:"",className:r?"max-h-[40rem] max-w-full object-contain":"max-h-96 max-w-full rounded object-contain",onError:()=>B(m)});return s("div",{className:l?"codex-generated-image":"flex max-w-full min-w-0 flex-col items-start gap-1",children:[g&&(h===void 0?N:n(p,{variant:"ghost",className:r?"codex-generated-image-preview h-auto max-w-full p-0":"h-auto max-w-full p-0","aria-label":a.t("timeline.viewImage"),onClick:h,children:N})),s(p,{variant:l?"secondary":"link",size:l?"icon":"sm",className:l?"codex-generated-image-download":"max-w-full min-w-0",disabled:d,title:a.t("timeline.download",{name:o}),"aria-label":a.t("timeline.download",{name:o}),onClick:()=>{E()},children:[d?n(z,{className:"motion-safe:animate-spin"}):n(F,{}),!l&&n("span",{className:"truncate",children:o})]})]})}
2
- export{ka,ne};
@@ -1,2 +0,0 @@
1
- import{E}from"./chunk-f0kgxjp1.js";import{t}from"./chunk-xqwbn2ph.js";import{ne}from"./chunk-0307kp7e.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(E,{text:e.text,streaming:o})})}if(i.isImage(e))return n(ne,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(ne,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Ae({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
2
- export{Ae};
@@ -1,2 +0,0 @@
1
- import{o}from"./chunk-xqwbn2ph.js";import{e}from"./chunk-pwcw4zp2.js";import{v,Q}from"./chunk-xmks1g9y.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var d=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function f(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let n=Math.min(100,a/t*100),p=n>=90?"text-destructive":n>=70?"text-foreground":"text-muted-foreground";return{pct:n,className:p}}function G(a){let t=v(a.configOptions,"model");return t===void 0?void 0:Q(t)}function ze(a,t){let n=a.windowDurationMins;if(n===null)return t("usage.usage");if(n%1440===0)return t("usage.windowDays",{count:n/1440});return t("usage.windowHours",{count:Math.round(n/60)})}function P(a){let{client:t}=e(),n=o((s)=>a&&s.connection==="ready"&&D(s.agent)),[p,c]=F(null);return T(()=>{if(!n){c(null);return}let s=!0;t.readRateLimits().then((m)=>{if(s)c(m)},()=>{return});let l=t.onRateLimits((m)=>{if(s)c(m)});return()=>{s=!1,l()}},[n,t]),n?p:null}function _({session:a}){let{t}=e().host,n=v(a.configOptions,"model"),p=n!==void 0&&(L(n.options)?n.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((y)=>y.value===n.currentValue)):!n.currentValue.startsWith("gateway:")&&n.options.some((i)=>i.value===n.currentValue)),c=P(p),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let m=s&&s.size>0?V(s.used,s.size):null,x=7,b=2*Math.PI*x,h=f(l?.inputTokens),k=f(l?.outputTokens),g=f(l?.cachedReadTokens),w=f(l?.cachedWriteTokens),S=f(l?.totalTokens)||h+k+g+w,R=h+g,C=R>0?A.format(g/R):t("tokens.notAvailable"),M=[[t("tokens.input"),d.format(h)],[t("tokens.output"),d.format(k)],[t("tokens.cachedRead"),d.format(g)],[t("tokens.cachedWrite"),d.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),d.format(S)]],N=G(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&u("span",{children:[Math.round(m.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[N!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:N,children:N})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,y])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:y})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:d.format(s.used),limit:d.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:ze(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var un=W(_);
2
- export{ze,un};
@@ -1,3 +0,0 @@
1
- import{d}from"./chunk-s5c2ha8t.js";import{I,m}from"./chunk-4jy404m1.js";import{kt}from"./chunk-c05dxz9x.js";import{Le,c,Fe,Ze,i}from"./chunk-95n1cpnj.js";import{B,G,ie,z,V,fe,_t}from"./chunk-fjseqvmx.js";import{ge}from"./chunk-ct0xqakr.js";import{We}from"./chunk-82xjggwn.js";import{b}from"./chunk-d924by6g.js";import{It,F}from"./chunk-j6r44m9g.js";import{j,ye}from"./chunk-qnbr2cmg.js";import{Pt}from"./chunk-d1n4w7hn.js";import{St}from"./chunk-sqm2vsf5.js";import{hasPluginStore as ee}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as te,BookOpenIcon as ae,CheckIcon as ne,CircleArrowUpIcon as se,MoreVerticalIcon as le,PlusIcon as U,PuzzleIcon as oe,RefreshCwIcon as re,SearchIcon as ce,Trash2Icon as de,XIcon as me}from"lucide-react";import{memo as ue,useDeferredValue as pe,useEffect as K,useMemo as Q,useState as C}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as xe,DialogDescription as he,DialogHeader as Ne,DialogTitle as ke,DialogTrigger as be}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Pe,DropdownMenuContent as we,DropdownMenuItem as Ce,DropdownMenuTrigger as Ie}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{Label as Se}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as E}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Z}from"react/jsx-runtime";function O(t){return t.interface?.displayName??t.name}function X(t){return t.interface?.shortDescription??""}function De({plugin:t,marketplace:r}){let{t:p}=c(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((v)=>v.plugin.id===t.id)),f=i((n)=>n.install),u=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",o=p(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(ne,{className:"text-muted-foreground size-4 shrink-0","aria-label":o});return e(N,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||u,"aria-label":o,title:u?p("plugins.disabledReason.unknown"):o,onClick:()=>void f({plugin:t,marketplace:r}).catch(()=>{}),children:g?e(E,{"aria-hidden":"true"}):e(U,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function Me({plugin:t,marketplace:r,actions:p,onOpen:g}){let a=X(t),f=t.interface?.developerName,u=t.localVersion??t.version,o=[f,u?`v${u}`:null].filter(Boolean).join(" · ");return s(fe,{className:"toolbox-row relative",children:[e(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":O(t),onClick:()=>g({plugin:t,marketplace:r})}),e(z,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(F,{name:t.name})})}),s(G,{className:"pointer-events-none relative min-w-0",children:[e(_t,{className:"mb-0.5",children:O(t)}),e(ie,{className:"line-clamp-1",title:a,children:a||r.interface?.displayName||r.name}),o&&e(ie,{"data-toolbox-metadata":"",children:o})]}),e(B,{className:"relative w-8 shrink-0 justify-center",children:p})]})}function R(){return Ze((t)=>t.connection==="ready"&&ee(t.agent))}var D=48;function Ee({marketplace:t,plugins:r,onOpen:p}){let{t:g}=c(),a=i((n)=>n.removeMarketplace),[f,u]=C(0),o=Math.min(f,Math.max(0,Math.ceil(r.length/D)-1));if(r.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:r.length}),t.path!==null&&s(Pe,{children:[e(Ie,{render:e(N,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(le,{})}),e(we,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ce,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(de,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(V,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:r.slice(o*D,(o+1)*D).map((n)=>e(Me,{onOpen:p,plugin:n,marketplace:t,actions:e(De,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),r.length>D&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(N,{variant:"outline",size:"sm",className:"h-9",disabled:o===0,onClick:()=>u(o-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[o+1," / ",Math.ceil(r.length/D)]}),e(N,{variant:"outline",size:"sm",className:"h-9",disabled:(o+1)*D>=r.length,onClick:()=>u(o+1),children:g("plugins.nextPage")})]})]},t.name)}var ze=ue(function({query:r,onOpen:p}){let{t:g}=c(),a=i((n)=>n.marketplaces),f=i((n)=>n.featuredPluginIds),u=Q(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((v)=>({plugin:v,text:[v.name,O(v),X(v),v.interface?.developerName??"",...v.keywords].join(`
2
- `).toLowerCase()}))})),[a]),o=Q(()=>{let n=new Set(f);return u.map(({marketplace:v,entries:x})=>({marketplace:v,plugins:x.filter(({plugin:k,text:y})=>r===""?v.path!==null||n.has(k.id):y.includes(r)).map(({plugin:k})=>k)}))},[u,f,r]);return s(Z,{children:[o.map(({marketplace:n,plugins:v})=>e(Ee,{marketplace:n,plugins:v,onOpen:p},JSON.stringify([n.name,n.path,r]))),o.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Oe(){let{t}=c(),r=R(),p=i((h)=>h.addMarketplace),g=i((h)=>h.upgradeAll),a=i((h)=>h.upgrading),[f,u]=C(""),[o,n]=C(!1),[v,x]=C(!1),[k,y]=C(null),T=async()=>{let h=f.trim();if(!h||o)return;n(!0),y(null);try{await p({source:h}),u(""),x(!1)}catch(S){y(S instanceof Error?S.message:String(S))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(E,{}):e(se,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(ve,{open:v,onOpenChange:(h)=>{if(!o)x(h)},children:[s(be,{render:e(N,{size:"sm",className:"h-9",variant:"outline",disabled:!r}),children:[e(U,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(xe,{children:[s(Ne,{children:[e(ke,{children:t("plugins.marketplace.addTitle")}),e(he,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(h)=>{h.preventDefault(),T()},children:[e(Se,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(W,{id:"marketplace-source",value:f,disabled:o,onChange:(h)=>u(h.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),k&&e("p",{role:"alert",className:"text-destructive text-sm",children:k}),s("div",{className:"flex justify-end gap-2",children:[e(N,{type:"button",variant:"ghost",disabled:o,onClick:()=>x(!1),children:t("plugins.marketplace.addCancel")}),s(N,{type:"submit",disabled:o||f.trim()==="",children:[o&&e(E,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Be({onOpen:t,query:r}){let p=R(),g=i((u)=>u.marketplaceLoadErrors),a=i((u)=>u.loading)||!p,f=pe(r.trim().toLowerCase());return e(b,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${j} flex flex-col gap-8`,children:[g.map((u)=>s("p",{className:"text-destructive px-2 text-xs",children:[u.marketplacePath,": ",u.message]},u.marketplacePath)),a?e(ge,{}):e(ze,{query:f,onOpen:t})]})})}function _r({cwd:t,active:r,extensions:p,onOpenCatalog:g}){let{t:a}=c(),f=Fe(),u=Le(f),o=i((l)=>l.refresh),n=i((l)=>l.loading),v=i((l)=>l.error),[x,k]=C("plugins"),[y,T]=C({plugins:"",skills:""}),h=x==="skills"?y.skills:y.plugins,S=(l)=>T((M)=>({...M,[x]:l})),Y=Ze((l)=>JSON.stringify([...new Set(l.sessionList.map((M)=>We(M.cwd,l.projectContext)).filter((M)=>M!==null))].toSorted())),A=JSON.stringify([...new Set([We(t,f.state.projectContext),...JSON.parse(Y)].filter((l)=>l!==null))].toSorted()),L=i((l)=>l.installed),J=a(x==="skills"?"plugins.skills.search":"plugins.search"),[P,q]=C(null),w=R();K(()=>{if(!r||!w)return;if(u.getState().loadedScope!==A)o(JSON.parse(A))},[r,w,o,A,u]),K(()=>{if(!w)return;return f.onSkillsChanged(()=>void o(void 0,{background:!0}))},[w,o,f]);let H=(l)=>{g?.(),k("plugins"),q(l)},_=(l)=>{g?.(),k(l),q(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(It,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[p&&s(m,{className:`${d} h-8 gap-2 px-2`,active:p.active,onClick:p.onOpen,children:[e(te,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((l)=>s(m,{className:`${d} h-8 gap-2 px-2`,active:!p?.active&&x===l&&P===null,onClick:()=>_(l),children:[l==="plugins"?e(oe,{className:"size-4"}):e(ae,{className:"size-4"}),e("span",{children:a(`plugins.headings.${l}`)})]},l))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(b,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(I,{children:!w||n&&L.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(E,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):L.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):L.map((l)=>s(m,{title:O(l.plugin),className:`${d} gap-2 px-2`,active:!p?.active&&P?.plugin.id===l.plugin.id,onClick:()=>H(l),children:[e(F,{name:l.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:O(l.plugin)})]},l.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:p?.active?p.content:s(Z,{children:[P&&e(Pt,{entry:P,onBack:()=>_("plugins")},JSON.stringify([P.marketplace.name,P.marketplace.path,P.plugin.id,t])),s("div",{hidden:P!==null,className:P?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(ye,{children:e(kt,{title:a(`plugins.headings.${x}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ce,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(W,{className:"h-9 rounded-full ps-9 pe-9","aria-label":J,value:h,onChange:(l)=>S(l.target.value),placeholder:J}),h&&e(N,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>S(""),children:e(me,{})})]}),e(N,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!w||n,onClick:()=>void o(void 0,{forceRefetch:!0}),children:n?e(E,{}):e(re,{})}),x==="plugins"&&e(Oe,{})]})})}),(x==="plugins"||v)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[x==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),v&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",v]}),e(N,{size:"sm",className:"h-9",variant:"outline",disabled:n||!w,onClick:()=>void o(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:x!=="plugins",className:x==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Be,{query:y.plugins,onOpen:H})}),e("div",{hidden:x!=="skills",className:x==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(St,{query:y.skills,ready:w,onOpenPlugin:H})})]})]})]})})]})}
3
- export{_r};
@@ -1,2 +0,0 @@
1
- function ft(o){return o.kind==="tool"&&o.status==="completed"&&o.toolKind!=="read"&&o.toolKind!=="search"}
2
- export{ft};
@@ -1,2 +0,0 @@
1
- import{d}from"./chunk-s5c2ha8t.js";import{s,n}from"./chunk-3t5cksae.js";import{I,f,m,ee}from"./chunk-4jy404m1.js";import{T,le,Oo}from"./chunk-vctq22tq.js";import{ot}from"./chunk-11z072sz.js";import{O,te}from"./chunk-p0d6rr6q.js";import{Ie,se}from"./chunk-05eg5p11.js";import{closestCorners as ge,DndContext as fe,KeyboardSensor as Ce,PointerSensor as ye,useSensor as V,useSensors as Se}from"@dnd-kit/core";import{SortableContext as W,sortableKeyboardCoordinates as De,useSortable as ae,verticalListSortingStrategy as X}from"@dnd-kit/sortable";import{CSS as ce}from"@dnd-kit/utilities";import{cn as F}from"cn";import{BrushCleaningIcon as we,MessageSquareIcon as ve,MoreHorizontalIcon as Ne,PencilIcon as he,PlusIcon as de,StarIcon as be,Trash2Icon as me}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as L}from"react";import{Button as w}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as Y,DialogContent as Z,DialogDescription as oe,DialogFooter as ne,DialogHeader as ie,DialogTitle as re}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as H,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a,Fragment as ze}from"react/jsx-runtime";function Te({collectionId:l,sessionId:y,children:x}){let{attributes:v,listeners:N,setNodeRef:i,transform:u,transition:g,isDragging:M}=ae({id:JSON.stringify([l,y]),data:{type:"session",collectionId:l,sessionId:y}});return e("div",{ref:i,style:{transform:ce.Transform.toString(u),transition:g},className:F("w-full min-w-0",M&&"opacity-50"),...v,...N,role:"group",children:x})}function Be({collection:l,children:y,onEdit:x,onConfirm:v,onNewChat:N}){let{t:i}=T(),u=se(),g=le(),{attributes:M,listeners:p,setNodeRef:h,transform:R,transition:P,isDragging:z}=ae({id:l.id,disabled:{draggable:l.id===O,droppable:!1},data:{type:"collection"}});return e("div",{ref:h,style:{transform:ce.Transform.toString(R),transition:P},className:F("w-full min-w-0",z&&"opacity-50"),children:e(ee,{open:!l.collapsed,onOpenChange:(c)=>g(u({type:"collapse",id:l.id,collapsed:!c})),label:te(l,i),count:l.sessionIds.length,leading:l.id===O?e(be,{className:"size-3.5"}):e(ot,{emoji:l.emoji,onChange:(c)=>g(u({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...M,...p,role:"group",children:c}),actions:a(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(w,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:te(l,i)}),children:e(Ne,{className:"size-3.5"})})}),e(ke,{children:a(Le,{children:[l.id!==O&&a(H,{onClick:x,children:[e(he,{}),i("collection.rename")]}),a(H,{onClick:N,children:[e(de,{}),i("collection.newChat")]}),a(H,{onClick:()=>v("clear"),children:[e(we,{}),i("collection.clearCollection")]}),l.id!==O&&a(H,{variant:"destructive",onClick:()=>v("delete"),children:[e(me,{}),i("collection.deleteCollection")]})]})})]}),children:y})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function na({renderRow:l,onSelect:y,onNewChat:x,Scroll:v=He}){let N=T(),{t:i}=N,u=se(),g=le(),M=s(),{collections:p,order:h}=Ie(),R=n((o)=>o.sessionList),P=n((o)=>o.archivedSessions),z=n((o)=>o.sessionListLoaded),c=n((o)=>o.sessionListError),U=Me(()=>new Map([...P,...R].map((o)=>[o.sessionId,o])),[P,R]),_=N.isMac??Oo(),[S,E]=L(null),[k,K]=L(""),[q,j]=L(""),[D,B]=L(null),[C,J]=L(!1),pe=Se(V(ye,{activationConstraint:{distance:5}}),V(Ce,{coordinateGetter:De})),G=h.flatMap((o)=>p[o].collapsed?[]:p[o].sessionIds.flatMap((t)=>{let r=U.get(t);return r&&!r.archived?[r]:[]}));xe(()=>{let o=(t)=>{if(t.defaultPrevented||t.isComposing||t.repeat||t.shiftKey||t.altKey)return;if(_?!t.metaKey||t.ctrlKey:!t.ctrlKey||t.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(t.target instanceof HTMLElement&&(t.target.isContentEditable||t.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let r=Number(t.key)-1;if(!Number.isInteger(r)||r<0||r>8||!G[r])return;t.preventDefault(),y(G[r])};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[G,_,y]);let ue=({active:o,over:t})=>{if(t===null)return;let r=o.data.current,b=t.data.current;if(r?.type==="session"&&b!==void 0){let Q=b.type==="session"?String(b.collectionId):String(t.id);g(u({type:"move",sourceCollectionId:String(r.collectionId),collectionId:Q,sessionId:String(r.sessionId),index:b.type==="session"?p[Q].sessionIds.indexOf(String(b.sessionId)):void 0}))}else if(r?.type==="collection"&&b?.type==="collection"&&String(t.id)!==O)g(u({type:"reorder",id:String(o.id),index:h.indexOf(String(t.id))}))},A=(o,t)=>{J(!0),g(o.then(t).finally(()=>J(!1)))};return a(ze,{children:[e(v,{children:a(I,{children:[a(m,{className:F(d,"font-normal"),onClick:()=>{E("new"),K(""),j("")},children:[e(f,{children:e(de,{})}),e("span",{children:i("collection.newCollection")})]}),c&&a("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(w,{variant:"ghost",onClick:()=>g(M.listSessions({reset:!0})),children:i("collection.retry")})]}),e(fe,{sensors:pe,collisionDetection:ge,onDragEnd:ue,children:e(W,{items:h,strategy:X,children:e(I,{children:h.map((o)=>e(Be,{collection:p[o],onNewChat:()=>x(o),onEdit:()=>{E(o),K(p[o].name),j(p[o].emoji??"")},onConfirm:(t)=>B({id:o,type:t}),children:e(W,{items:p[o].sessionIds.map((t)=>JSON.stringify([o,t])),strategy:X,children:p[o].sessionIds.map((t)=>{let r=U.get(t);if(r?.archived)return null;if(!r)return z?a("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(f,{children:e(ve,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(w,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>g(u({type:"remove",sessionId:t,collectionId:o})),children:e(me,{})})]},t):null;return e(Te,{collectionId:o,sessionId:t,children:l(r,()=>{},o)},t)})})},o))})})})]})}),e(Y,{open:S!==null,onOpenChange:(o)=>{if(!o&&!C)E(null)},children:a(Z,{children:[a(ie,{children:[e(re,{children:i(S==="new"?"collection.newCollection":"collection.rename")}),e(oe,{children:i("collection.collectionName")})]}),a("form",{onSubmit:(o)=>{if(o.preventDefault(),S===null||!k.trim()||C)return;let t=S==="new"?`collection-${crypto.randomUUID()}`:S;A(u([S==="new"?{type:"create",id:t,name:k}:{type:"rename",id:t,name:k},{type:"emoji",id:t,emoji:q}]),()=>E(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:k,onChange:(o)=>K(o.target.value),disabled:C}),S!=="new"&&e(ot,{emoji:q,onChange:j}),a(ne,{children:[e(w,{type:"button",variant:"outline",disabled:C,onClick:()=>E(null),children:i("collection.cancel")}),e(w,{type:"submit",disabled:C||!k.trim(),children:i("collection.confirm")})]})]})]})}),e(Y,{open:D!==null,onOpenChange:(o)=>{if(!o&&!C)B(null)},children:a(Z,{children:[a(ie,{children:[e(re,{children:i(D?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(oe,{children:i("collection.confirmCollectionChange",{name:D===null?"":te(p[D.id],i)})})]}),a(ne,{children:[e(w,{variant:"outline",disabled:C,onClick:()=>B(null),children:i("collection.cancel")}),e(w,{disabled:C,onClick:()=>{if(D!==null)A(u({type:D.type,id:D.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
2
- export{na};
@@ -1,2 +0,0 @@
1
- import{E}from"./chunk-f0kgxjp1.js";import{de}from"./chunk-bqbpded2.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function ir({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(E,{text:t.content,streaming:!1})});if(!n(t))return null;return e(de,{entries:t.entries})}
2
- export{ir};
@@ -1,2 +0,0 @@
1
- import{N}from"./chunk-netp71kb.js";import{createContext as c,useContext as p,useState as x,useSyncExternalStore as y}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as D,DialogContent as L,DialogDescription as h,DialogFooter as w,DialogHeader as P,DialogTitle as H}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as o,jsxs as d}from"react/jsx-runtime";var S=c(null),C=c(null),v=c(null);function sa({host:e,client:t,children:i}){let[r,l]=x(null);N(r!==null);let{t:u}=e;return o(S,{value:e,children:o(C,{value:t,children:d(v,{value:l,children:[i,o(D,{open:r!==null,onOpenChange:(f)=>!f&&l(null),children:d(L,{children:[d(P,{children:[o(H,{children:u("sessionList.deleteTitle")}),o(h,{children:u("sessionList.deleteDescription")})]}),d(w,{children:[o(m,{variant:"outline",onClick:()=>l(null),children:u("sessionList.cancel")}),o(m,{onClick:()=>{if(r)g(e,t.delete(r.sessionId));l(null)},children:u("sessionList.delete")})]})]})})]})})})}function a(){let e=p(S);if(e===null)throw Error("Session list host is missing");return e}function Uo(){return p(S)}function s(){let e=p(C);if(e===null)throw Error("Session list client is missing");return e}function qt(){let e=p(v);if(e===null)throw Error("Session list provider is missing");return e}function n(e){let t=s();return y((i)=>t.store.subscribe(i),()=>e(t.store.getState()),()=>e(t.store.getState()))}function g(e,t){return t.then(()=>{},(i)=>{if(e.reportError)e.reportError(i);else console.error(i)})}
2
- export{sa,a,Uo,s,qt,n,g};
@@ -1,2 +0,0 @@
1
- import{Eo,Ot,Ut,Bt,Gt}from"./chunk-x0h0g1ma.js";var a=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DS Flash"}],catalog:"alwith/models.json",config:{}},{id:"anthropic",name:"Anthropic",apiType:"anthropic",baseUrl:"https://api.anthropic.com",keyUrl:"https://platform.claude.com/settings/keys",models:[{id:"claude-opus-5-5",label:"Opus 5.5"},{id:"claude-sonnet-5-5",label:"Sonnet 5.5"},{id:"claude-haiku-5-5",label:"Haiku 5.5"},{id:"claude-fable-5-2",label:"Fable 5.2"}],catalog:"anthropic/models.json",config:{}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",webSearch:"deepseek",models:[{id:"deepseek-flash",label:"Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{}},{id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",keyUrl:"https://openrouter.ai/keys",models:[{id:"moonshotai/kimi-k3",label:"Kimi K3"},{id:"minimax/minimax-m3",label:"MiniMax M3"},{id:"z-ai/glm-5.3",label:"GLM 5.3"},{id:"deepseek/deepseek-v4-pro",label:"DeepSeek V4 Pro"},{id:"qwen/qwen3.8-max-0902",label:"Qwen 3.8 Max"},{id:"x-ai/grok-4.6",label:"Grok 4.6"}],catalog:"openrouter/models.json"},{id:"qwen",name:"Qwen",regions:[{id:"intl",baseUrl:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",keyUrl:"https://modelstudio.console.alibabacloud.com/?tab=model#/api-key"},{id:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",keyUrl:"https://bailian.console.aliyun.com/#/api-key"}],models:[{id:"qwen3.8-max",label:"3.8 Max"},{id:"qwen3.8-flash",label:"3.8 Flash"},{id:"qwen3.7-max",label:"3.7 Max"},{id:"qwen3.7-plus",label:"3.7 Plus"},{id:"qwen3.6-flash",label:"3.6 Flash"}],catalog:"qwen/models.json"},{id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",keyUrl:"https://console.x.ai",models:[{id:"grok-4.6",label:"Grok 4.6"},{id:"grok-4.5",label:"Grok 4.5"},{id:"grok-4.3",label:"Grok 4.3"}],catalog:"xai/models.json"}];var l={models:[{slug:"glm-5.3",display_name:"GLM-5.3",description:"GLM-5.3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.3-flash",display_name:"GLM-5.3-Flash",description:"GLM-5.3-Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.2",display_name:"GLM-5.2",description:"GLM-5.2 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"none",description:"Disable reasoning"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.1",display_name:"GLM-5.1",description:"GLM-5.1 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:200000,max_context_window:200000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3.1-Flash",display_name:"MiniMax M3.1 Flash",description:"MiniMax M3.1 Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"xhigh",description:"Xhigh reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3",display_name:"MiniMax M3",description:"MiniMax M3 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-evolving",display_name:"Doubao Seed Evolving",description:"Doubao Seed Evolving via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-pro-260915",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-lite-260915",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3.1-pro",display_name:"Kimi K3.1 Pro",description:"Kimi K3.1 Pro via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3",display_name:"Kimi K3",description:"Kimi K3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k2.7-code",display_name:"Kimi K2.7 Code",description:"Kimi K2.7 Code via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:262144,max_context_window:262144,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-pro",display_name:"MiMo V2.6 Pro",description:"MiMo V2.6 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-flash",display_name:"MiMo V2.6 Flash",description:"MiMo V2.6 Flash via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-pro",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-lite",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"}]};var p={"gateway:deepseek:deepseek-flash":{shortLabel:"Flash"},"gateway:litellm:deepseek-V4.1-flash":{shortLabel:"Flash",label:"DS Flash"}};var d=a,g={anthropic:Eo,deepseek:Ot,openrouter:Bt,qwen:Gt,xai:Ut};function m(e){let i=g[e];if(!i)throw Error(`Provider ${e} has no logo`);return i}var q=d.filter((e)=>e.source!=="account").map(({source:e,...i})=>({...i,logo:m(i.id)}));function No(e){return e!=null&&d.some((i)=>i.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(i.id)}:`))}function Ye(e){let i=JSON.parse(e);if(!Array.isArray(i)||i.length===0)throw Error("Add at least one model");let o=new Set;return i.map((s)=>{if(typeof s!=="object"||s===null||Array.isArray(s))throw Error("Each model must be an object");let t=s,r=typeof t.label==="string"?t.label.trim():"",n=typeof t.api_id==="string"?t.api_id.trim():"";if(r===""||n==="")throw Error("Model label and API ID cannot be empty");if(o.has(n))throw Error("Model IDs must be unique");if(o.add(n),t.contextWindow!==void 0&&t.contextWindow!==null&&(!Number.isSafeInteger(t.contextWindow)||t.contextWindow<=0))throw Error("Model contextWindow must be a positive integer");if(t.description!==void 0&&typeof t.description!=="string")throw Error("Model description must be a string");return{label:r,api_id:n,...t.contextWindow===void 0?{}:{contextWindow:t.contextWindow},...t.description===void 0?{}:{description:t.description}}})}function Mo(e){return[...q.filter((i)=>e.providers[i.id]!==void 0).map((i)=>({id:i.id,name:i.name,models:i.models})),...[...e.customProviders,...e.managedProviders??[]].map((i)=>({id:i.id,name:i.name,models:i.models.map((o)=>({id:o.api_id,label:o.label,...o.description==null?{}:{description:o.description}}))}))]}function Xe(e,i){let o=e.startsWith("custom_")?`custom-${Array.from(new TextEncoder().encode(e),(s)=>s.toString(16).padStart(2,"0")).join("")}`:e;return`gateway:${encodeURIComponent(o)}:${encodeURIComponent(i)}`}function Yr(e,i){let o=Mo(i).flatMap((s)=>s.models.map((t)=>Xe(s.id,t.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(No(e))throw Error("The selected ALwith account model is unavailable. Select another model before sending.");return o[0]??null}function X(e,i){if(!e.regions)return null;let o=e.regions.find((s)=>s.id===i)??e.regions[0];if(!o)throw Error(`Provider ${e.id} declares no regions`);return o}function Dt(e,i){return X(e,i)?.keyUrl??e.keyUrl??null}function Ht(e){if(typeof e==="object"&&e!==null&&"code"in e&&e.code==="pending")return!0;return(e instanceof Error?e.message:typeof e==="string"?e:typeof e==="object"&&e!==null&&("message"in e)?String(e.message):String(e)).includes("Provider settings are pending")}function Xr(e){let i=e?.match(/^gateway:custom-[^:]+:(.+)$/);if(!i)return null;let o=decodeURIComponent(i[1]),s=l.models.find((t)=>t.slug===o);return s?{value:s.default_reasoning_level,hidden:s.supported_reasoning_levels.length===0}:null}var Ao=p;function ea(e){return Ao[e]??{}}
2
- export{q,No,Ye,Mo,Xe,Yr,X,Dt,Ht,Xr,Ao,ea};
@@ -1,2 +0,0 @@
1
- import{Pe,d}from"./chunk-s5c2ha8t.js";import{R}from"./chunk-aaqk0jrt.js";import{H}from"./chunk-7eqtvqrn.js";import{N}from"./chunk-netp71kb.js";import{tt,Oe,nt}from"./chunk-yaxsff9s.js";import{PreviewCard as C}from"@base-ui/react/preview-card";import{cn as u}from"cn";import{LockIcon as D}from"lucide-react";import{createContext as _,useContext as E,useLayoutEffect as M,useState as L}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as p,Fragment as K}from"react/jsx-runtime";function I(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:u("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:u("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function f({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:u("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function m({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:u("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function ee({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:b,headerChildren:g,wrapHeader:c,onHeaderClick:P,children:y}){let S=()=>{P?.(),t(!o)},x=u(tt,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),k=p(K,{children:[r!=null&&e(f,{children:r}),g??e(R,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(nt,{content:s!==void 0?e(Oe,{className:u("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:b})})]}),O=g==null?p("div",{"data-active":l?"":void 0,title:n,className:u(x,d),onClick:S,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),S()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),k]}):e("div",{"data-active":l?"":void 0,className:x,children:k});return p("div",{className:"text-[#1a1c1f] dark:text-white",children:[c===void 0?O:c(O),o&&e(I,{className:"mt-0.5",children:y})]})}var G=_(()=>{}),z=_(()=>{});function $t(){return E(z)}function Se(){return E(G)}function _e({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:b,preview:g,listeningPorts:c,onOpenPort:P,accessory:y,meta:S,hint:x,actions:k,className:O,...v}){let T=p("div",{"data-slot":"navigation-session-item","data-active":o,className:u(tt,Pe,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||c!=null&&c.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",O),...v,children:[e(f,{children:t!=null?e(H,{state:t,title:n??void 0}):i}),p("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(R,{className:u("leading-none",t==="done"&&"font-semibold"),children:s}),b!=null&&e(R,{className:"text-muted-foreground text-xs",children:b}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),c!=null&&c.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:c.map((w)=>P?p("button",{type:"button",className:"underline",onPointerDown:(h)=>h.stopPropagation(),onKeyDown:(h)=>h.stopPropagation(),onClick:(h)=>{h.stopPropagation(),P(w)},children:[":",w]},w):p("span",{children:[":",w]},w))})]}),p("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(D,{className:"text-muted-foreground size-3"}),e(nt,{content:y!=null?e(Oe,{children:y}):S??e(Oe,{}),actions:k}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return T;return e(q,{row:T,onOpenChange:l,children:a})}function q({row:o,children:t,onOpenChange:n}){let[r,i]=L(!1),[s,a]=L(!1),l=r||s;return M(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(G.Provider,{value:a,children:e(z.Provider,{value:()=>{i(!1),a(!1)},children:e(j,{open:l,onOpenChange:i,trigger:o,children:t})})})}function j({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return N(o),p(C.Root,{open:o,onOpenChange:t,children:[e(C.Trigger,{render:n,delay:700,closeDelay:100}),e(C.Portal,{children:e(C.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(C.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
2
- export{I,f,m,ee,$t,Se,_e};
@@ -1,2 +0,0 @@
1
- import{s,n}from"./chunk-3t5cksae.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function Ur(c){let e=s(),o=n((t)=>t.projectContext),u=c===null?m:o?a(o,{cwd:e.projectPath(c)}).id:null,d=n((t)=>t.sessionList),l=n((t)=>t.connection),i=n((t)=>t.sessionListLoaded),r=n((t)=>t.sessionListError),f=()=>e.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(l==="ready"&&!i&&r===null)e.listSessions().catch(()=>{return})},[e,l,i,r]),{result:L(()=>{if(i&&o)return{status:"ready",sessionRows:d.filter((t)=>a(o,{...t,cwd:e.projectPath(t.cwd)}).id===u).toSorted((t,p)=>(p.updatedAt??"").localeCompare(t.updatedAt??""))};if(r!==null)return{status:"failed",error:r};return{status:"loading"}},[e,d,i,r,u,o]),retry:f}}
2
- export{Ur};
@@ -1,2 +0,0 @@
1
- import{d}from"./chunk-s5c2ha8t.js";import{a}from"./chunk-3t5cksae.js";import{f,m}from"./chunk-4jy404m1.js";import{Je}from"./chunk-a1k3ffay.js";import{cn as r}from"cn";import{ArrowLeftIcon as s,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as c,DropdownMenuContent as u,DropdownMenuItem as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as L}from"react/jsx-runtime";function Tr({onCollapseAll:i}){let{t:n}=a();return L(c,{children:[o(w,{render:o(Je,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(u,{align:"end",className:"w-52",children:o(g,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function Nr({screen:i,onSwitch:n}){let{t:e}=a(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(m,{className:r(d,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(f,{children:i==="main"?o(s,{}):o(l,{})})})}
2
- export{Tr,Nr};
@@ -1,4 +0,0 @@
1
- import{L}from"./chunk-pvd09dx5.js";import{Hn,u,C,gn,On,lt}from"./chunk-gk0tq3n9.js";import{bi,Fn,Ci,Dn}from"./chunk-z38xf1rw.js";import{ct,dt,fn}from"./chunk-vmg3evhm.js";import{ce,h}from"./chunk-5ygdb72w.js";import{cn as q}from"cn";import{forwardRef as z,useImperativeHandle as j,useLayoutEffect as U,useRef as d}from"react";import{jsx as V}from"react/jsx-runtime";var F=(r,S)=>r.text===S.text&&JSON.stringify(r.apps)===JSON.stringify(S.apps),Ln=z((r,S)=>{let I=ce(),H=h(),s=d(null),R=d(null),a=d(C(u({text:I.textInput.value,apps:r.applications}))),f=d({start:r.initialCaret??u(a.current).length,end:r.initialCaret??u(a.current).length}),y=d(r.initialUndo?[{...r.initialUndo,selection:{start:Math.max(0,(r.initialCaret??1)-1),end:Math.max(0,(r.initialCaret??1)-1)}}]:[]),P=d([]),A=d(""),K=d(r.skillIcon),g=d(!1),x=d(!1),w=d(null),c=d({props:r,controller:I,attachments:H});c.current={props:r,controller:I,attachments:H};let m=()=>{if(s.current&&document.activeElement===s.current)f.current=Ci(s.current,a.current.apps,f.current);return f.current},T=()=>{let e=s.current;if(!e)return;let t={...f.current};e.focus(),f.current=t,Dn(e,t)},v=()=>({...a.current,selection:m()}),D=(e,t)=>{if(!s.current)return;if(bi(s.current,e,c.current.props.skillNames,c.current.props.skillIcon),K.current=c.current.props.skillIcon,A.current=JSON.stringify(c.current.props.skillNames??[]),s.current.dataset.empty=String(e.text.length===0&&e.apps.length===0),f.current=t,document.activeElement===s.current)Dn(s.current,t)},k=(e,t,n=!0,l=!0)=>{if(l&&!F(a.current,e)){if(y.current.push(w.current??v()),y.current.length>100)y.current.shift();P.current=[]}if(w.current=null,a.current=e,f.current=t,n)D(e,t);c.current.props.onApplicationsChange(e.apps),c.current.controller.textInput.setInput(e.text)},b=(e)=>{let t=m(),n=u(a.current),l=u(e),i=new Set([...n.slice(0,t.start),...n.slice(t.end)].flatMap((E)=>typeof E==="string"?[]:[E.id])),p=l.filter((E)=>typeof E==="string"||!i.has(E.id)),o=C([...n.slice(0,t.start),...p,...n.slice(t.end)]),O=t.start+p.length;k(o,{start:O,end:O})},B=(e)=>{let n=(e?y.current:P.current).pop();if(!n)return;(e?P.current:y.current).push(v()),k({text:n.text,apps:n.apps},n.selection,!0,!1)},N=()=>{if(!s.current)return;let e=C(Fn(s.current,a.current.apps)),t=m();if(g.current)return;let n=fn(e.text),l=n===e.text?e:C(u({text:n,apps:e.apps}));k(l,t,n!==e.text)};U(()=>{let e=s.current;if(!e)throw Error("Inline prompt input is missing");Object.defineProperties(e,{value:{configurable:!0,get:()=>a.current.text,set:(i)=>{a.current=C(u({text:i,apps:a.current.apps})),D(a.current,f.current)}},selectionStart:{configurable:!0,get:()=>gn(u(a.current),m().start)},selectionEnd:{configurable:!0,get:()=>gn(u(a.current),m().end)},setSelectionRange:{configurable:!0,value:(i,p)=>{let o=u(a.current);f.current={start:On(o,i),end:On(o,p)},D(a.current,f.current),e.dispatchEvent(new Event("select"))}},disabled:{configurable:!0,get:()=>Boolean(c.current.props.disabled)},form:{configurable:!0,get:()=>e.closest("form")}}),R.current=e,D(a.current,f.current),T();let n=()=>{m()},l=(i)=>{if(c.current.props.disabled){i.preventDefault();return}if(g.current||i.isComposing)return;if(i.inputType==="historyUndo"||i.inputType==="historyRedo")i.preventDefault(),B(i.inputType==="historyUndo");else if(i.inputType==="insertParagraph"||i.inputType==="insertLineBreak")i.preventDefault(),b({text:`
2
- `,apps:[]});else w.current=v()};return e.addEventListener("beforeinput",l),e.addEventListener("change",N),document.addEventListener("selectionchange",n),()=>{e.removeEventListener("beforeinput",l),e.removeEventListener("change",N),document.removeEventListener("selectionchange",n),R.current=null}},[]),U(()=>{if(g.current)return;let e=C(u({text:I.textInput.value,apps:r.applications}));if(F(e,a.current)&&A.current===JSON.stringify(r.skillNames??[])&&K.current===r.skillIcon)return;let t=m();a.current=e,D(e,t)},[I.textInput.value,r.applications,r.skillNames,r.skillIcon]),j(S,()=>({focus:T,getTextarea:()=>R.current,isComposing:()=>g.current||x.current,resetHeight:()=>{y.current=[],P.current=[]},insertInvocation:(e)=>{T(),b({text:`${e} `,apps:[]})},insertApplication:(e)=>{if(T(),a.current.apps.some((t)=>t.id===e.id))return;b({text:"",apps:[{...e,offset:0}]})}}),[]);let J=(e)=>{if(g.current||x.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;if(c.current.props.onKeyDown?.(e),e.defaultPrevented)return;if((e.metaKey||e.ctrlKey)&&!e.altKey&&(e.key.toLowerCase()==="z"||e.key.toLowerCase()==="y")){e.preventDefault(),B(e.key.toLowerCase()==="z"&&!e.shiftKey);return}if(e.key==="Enter"){if(e.preventDefault(),e.shiftKey)b({text:`
3
- `,apps:[]});else{let t=s.current?.closest("form"),n=t?.querySelector('button[type="submit"]');if(n&&!n.disabled)t?.requestSubmit(n)}return}if(e.key==="Backspace"||e.key==="Delete"){let t=m(),n=u(a.current);if(t.start!==t.end){e.preventDefault(),b({text:"",apps:[]});return}let l=gn(n,t.start),i=L(a.current.text,c.current.props.skillNames??[]).find((o)=>e.key==="Backspace"?o.end===l:o.start===l);if(i){e.preventDefault();let o=t.start-(e.key==="Backspace"?i.name.length:0);k(C([...n.slice(0,o),...n.slice(o+i.name.length)]),{start:o,end:o});return}let p=e.key==="Backspace"?t.start-1:t.start;if(p>=0&&p<n.length&&typeof n[p]!=="string")e.preventDefault(),k(C([...n.slice(0,p),...n.slice(p+1)]),{start:p,end:p});else if(e.key==="Backspace"&&n.length===0){let o=c.current.attachments.files.at(-1);if(o)e.preventDefault(),c.current.attachments.remove(o.id)}}if(e.key.length===1&&e.key.charCodeAt(0)<32)e.preventDefault()},M=(e)=>{let t=m();if(t.start===t.end)return;let n=u(a.current).slice(t.start,t.end),l=C(n);if(e.preventDefault(),e.clipboardData.setData("text/plain",n.map((i)=>typeof i==="string"?i:`${i.name} `).join("")),e.clipboardData.setData(Hn,JSON.stringify({version:1,...l})),e.type==="cut"&&!r.disabled)b({text:"",apps:[]})};return V("div",{ref:s,role:"textbox","aria-multiline":"true","aria-label":r["aria-label"],"aria-disabled":r.disabled||void 0,contentEditable:!r.disabled,suppressContentEditableWarning:!0,"data-chat-input":!0,"data-inline-input":!0,"data-placeholder":r.placeholder,"data-empty":a.current.text.length===0&&a.current.apps.length===0,className:q("bg-chat-input-bg data-[empty=true]:before:text-chat-input-placeholder relative max-h-(--chat-input-max-height) min-w-0 flex-1 overflow-y-auto p-0 pe-2.5 leading-(--chat-input-line-height) break-words whitespace-pre-wrap outline-none data-[empty=true]:before:pointer-events-none data-[empty=true]:before:absolute data-[empty=true]:before:content-[attr(data-placeholder)]",r.className),onInput:N,onKeyDown:J,onCompositionStart:()=>{w.current=v(),g.current=!0,x.current=!1},onCompositionEnd:()=>{g.current=!1,N(),x.current=!0,requestAnimationFrame(()=>{x.current=!1})},onPasteCapture:(e)=>r.onPasteCapture?.(e),onPaste:(e)=>{if(e.defaultPrevented||r.disabled)return;let{imageFiles:t,sawNonImageFile:n}=ct(e.clipboardData.items);if(e.preventDefault(),t.length){H.add(t);return}if(n&&!dt(e.clipboardData.items))return;b(lt(e.clipboardData)??{text:fn(e.clipboardData.getData("text/plain")),apps:[]})},onCopy:M,onCut:M,onDrop:(e)=>{e.preventDefault()}})});Ln.displayName="PromptInputInline";
4
- export{Ln};
@@ -1,2 +0,0 @@
1
- import{ii}from"./chunk-xmpaqxer.js";import{o}from"./chunk-xqwbn2ph.js";import{e,y}from"./chunk-pwcw4zp2.js";import{Z,v,Q}from"./chunk-xmks1g9y.js";import{isBooleanOption as U,isGroupedSelect as q,isSelectOption as A}from"@nyssance/codex-acp-v2/client";import{Zap as D}from"lucide-react";import{memo as F,useRef as H}from"react";import{jsx as B}from"react/jsx-runtime";function J({sessionId:l,options:u,disabled:G,onModelChange:h,onConfigChange:C,defaultGroup:I={id:"models",name:"Models"},catalog:x=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=o((n)=>Boolean(n.configPending[l])),p=H({sessionId:l,model:!0}),b=P&&(p.current.sessionId!==l||p.current.model),k=o((n)=>{let r=n.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=v(u,"model"),a=v(u,"thought_level"),O=u.filter((n)=>n.configId!=="collaboration_mode"&&(n.category==="model_config"||n.category!=="mode"&&n!==t&&n!==a)),_=O.filter(A),m=O.filter(U);if(!t&&!a&&_.length===0&&m.length===0)return null;let f=(n,r)=>{if(r===n.currentValue)return Promise.resolve();p.current={sessionId:l,model:n===t};let d=C?C(n.configId,r):N.setConfig(l,n.configId,r);return y(c,d),d},g=a?Z(a):[],z=g.reduce((n,r)=>r.name.length>=n.length?r.name:n,""),R=t?Q(t):i("composer.model"),S=(n)=>({api_id:n.value,label:n.name}),V=x(t&&q(t.options)?t.options.map((n)=>({id:n.groupId,name:n.name,models:n.options.map(S)})):[{...I,models:t?Z(t).map(S):[]}]),w=V.flatMap((n)=>n.models),M=w.find((n)=>n.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((n)=>n.configId==="fast_mode"||n.configId==="fast-mode");return B(ii,{disabled:G||b||k,switching:b,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:w,showModelList:Boolean(t),onChange:(n)=>{if(n.api_id===t?.currentValue)return;if(h)h(n.api_id);else if(t)f(t,n.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:V,t:i,effortConfig:a&&g.length>0?{name:"Effort",value:a.currentValue,levels:g,sizer:z,onChange:(n)=>f(a,n)}:void 0,selectOptions:_.map((n)=>({id:n.configId,name:n.name,value:n.currentValue,options:Z(n).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(n,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:B(D,{className:"size-4","aria-hidden":"true"})},...m.filter((n)=>n!==s).map((n)=>({id:n.configId,name:n.name,currentValue:n.currentValue}))],onBooleanChange:(n,r)=>{let d=n==="fast_mode"?s:m.find((E)=>E.configId===n);if(!d)throw Error(`Unknown boolean config: ${n}`);f(d,r)}})}var nn=F(J);
2
- export{nn};
@@ -1,2 +0,0 @@
1
- import{_}from"./chunk-1xaskqdj.js";import{o}from"./chunk-xqwbn2ph.js";import{gt}from"./chunk-7hwg9r4y.js";import{v,Q}from"./chunk-xmks1g9y.js";import{e}from"./chunk-pwcw4zp2.js";import{Mn}from"./chunk-trh02gwn.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as Y,Loader2Icon as F,SquareIcon as Z}from"lucide-react";import{useCallback as ss,useEffect as es,useId as J,useRef as L,useState as N}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as p,Fragment as as}from"react/jsx-runtime";function Nn(s,l){let d=o((u)=>u.sessions),r=o((u)=>u.actions),[y,m]=N(()=>new Set);return(u)=>{let c=l?.(u)??null,a=Mn(s.id,u,d,r,s);if(a.length===0)return c;let x=`${s.id}:${u.key}`;return{active:c?.active===!0||a.some((i)=>i.status==="running"||i.status==="requires_action"),defaultExpanded:c?.defaultExpanded===!0||y.has(x),content:p(as,{children:[t(Zo,{sessionId:s.id,turn:u,parent:s,tasks:a,onExpand:()=>m((i)=>i.has(x)?i:new Set([...i,x]))}),c?.content]})}}}function Zo({sessionId:s,turn:l,parent:d,tasks:r,onExpand:y}){let{host:m}=e(),u=o((n)=>n.sessions),c=o((n)=>n.actions),a=r??Mn(s,l,u,c,d),x=a.some((n)=>n.status==="running"),i=a.some((n)=>n.status==="running"||n.status==="requires_action"),[f,k]=_(`subagents:${s}:${l.key}`,i,!0),w=J();if(a.length===0)return null;let g=new Map;for(let n of a)g.set(n.status,(g.get(n.status)??0)+1);let S=[...g].map(([n,E])=>`${m.t(`subagents.${n}`)} ${E}`).join(" · ");return p("section",{"data-subagent-sessions":!0,"data-subagent-turn":l.key,"aria-label":m.t("subagents.group"),className:"my-2 min-w-0",children:[p(C,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":f,"aria-controls":w,onClick:()=>{if(!f)y?.();k(!f)},children:[f?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),x?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(Y,{className:"size-3.5 shrink-0"}),p("span",{className:"shrink-0",children:[m.t("subagents.group")," · ",a.length]}),t("span",{className:"truncate",role:"status",children:S})]}),t("div",{id:w,hidden:!f,className:"border-border ms-3 min-w-0 border-s ps-2",children:a.map((n)=>t(ts,{task:n,cwd:d?.cwd??u[s]?.cwd??"",visible:f,stateKey:`${s}:${l.key}:${n.key}`,onRead:()=>{y?.(),k(!0)}},n.key))})]})}function O(s,l){if(!l)return s;let d=new Map(s.items.map((r)=>[`${r.kind}:${r.id}`,r]));for(let r of l.items)d.set(`${r.kind}:${r.id}`,r);return{...s,...l,items:[...d.values()]}}function ts({task:s,cwd:l,stateKey:d,visible:r,onRead:y}){let{client:m,host:u}=e(),{t:c}=u,a=s.session,x=o((h)=>h.connection==="ready"),[i,f]=_(`subagent:${d}`,!1),[k,w]=N(!1),[g,S]=N(null),[n,E]=N(null),[I,U]=N(null),[R,M]=N(!1),B=L(!1),P=L(!1),j=J(),q=a&&v(a.configOptions,"model"),z=s.title??c("subagents.untitled"),W=n?O(n,a):a,V=x&&a?.attached&&a.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=a?.cwd??l,T=ss(async(h)=>{if(!m.readSubagentHistory||H===null||B.current)return;P.current=!0,B.current=!0,M(!0),S(null);try{let b=await m.readSubagentHistory(H,D,h);E((K)=>K===null?b.session:O(b.session,K)),U(b.cursor)}catch(b){S(b instanceof Error?b.message:String(b))}finally{B.current=!1,M(!1)}},[m,H,D]);es(()=>{if(r&&i&&!P.current)T(null)},[r,i,T]);let X=async()=>{if(!a)throw Error("A live child session is required for cancellation");w(!0),S(null);try{await m.cancel(a.id)}catch(h){S(h instanceof Error?h.message:String(h))}finally{w(!1)}};return p("section",{"aria-label":z,className:"min-w-0",children:[p("div",{className:"flex min-w-0 items-center gap-1",children:[p(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${z} · ${c(`subagents.${s.status}`)}`,"aria-expanded":i,"aria-controls":j,onClick:()=>{if(!i)y();f(!i)},children:[i?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:z}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:c(`subagents.${s.status}`)})]}),V&&t(C,{variant:"ghost",size:"icon-sm",disabled:k,"aria-label":c("subagents.cancel",{name:z}),onClick:()=>{X()},children:k?t(F,{className:"size-3.5 animate-spin"}):t(Z,{className:"size-3.5"})})]}),g&&!i&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),p("div",{id:j,hidden:!i,className:"min-w-0 ps-4",children:[(s.description||q)&&p("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),q&&t("span",{className:"shrink-0",children:Q(q)})]}),g&&p("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{T(n===null?null:I)},children:c("timeline.retry")})]}),R&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:c("timeline.loadingEarlier")}),I&&t(C,{variant:"ghost",size:"sm",disabled:R,onClick:()=>{T(I)},children:c("timeline.loadEarlier")}),r&&i&&(W&&W.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ns,{session:W})}):!R&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:c("subagents.noMessages")}))]})]})}function ns({session:s}){let{client:l,host:d}=e(),r=Nn(s);return t(gt,{session:s,client:l,host:d,turnWork:r})}
2
- export{Nn,Zo};
@@ -1,2 +0,0 @@
1
- import{Ii}from"./chunk-y1fpm5r2.js";import{Ee,t,Re,o,Ct}from"./chunk-xqwbn2ph.js";import{cr,xt,ro,pr,mr}from"./chunk-sct2h2dm.js";import{vt}from"./chunk-f2jc13bq.js";import{Ei}from"./chunk-4dabfz24.js";import{$i}from"./chunk-7919s3et.js";import{Ki,qi}from"./chunk-fvz27k62.js";import{tr,nr}from"./chunk-t94rfs41.js";import{Vi}from"./chunk-9z9jffth.js";import{ji}from"./chunk-11cbk1je.js";import{rr}from"./chunk-qkw2nhsr.js";import{codexExtensionCapabilities as Ve,codexMessageError as Be,codexRetryNotice as qe,codexTurnError as Oe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Fe}from"lucide-react";import{useCallback as M,useEffect as H,useLayoutEffect as ve,useMemo as U,useRef as h,useState as _}from"react";import{flushSync as Te}from"react-dom";import{Button as Y}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as i,jsxs as E}from"react/jsx-runtime";var ye=24;function Ke(e){let d=Math.max(0,e.turnTopPx-ye),g=Math.max(0,e.scrollHeightPx-e.viewportHeightPx),s=d-g;return{scrollTopPx:d,spacerPx:s>0?e.spacerPx+s:e.spacerPx}}function Ue({viewportRef:e,viewportProps:d,children:g}){return i("div",{ref:e,...d,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:g})}function _e({sessionId:e,turnId:d,root:g,error:s,connected:R}){let z=h(null),V=Re(),{t:b}=t(),S=M(()=>{V.loadHistoryTurn(e,d).catch(()=>{})},[V,e,d]);return H(()=>{if(!g||!z.current||!R||s)return;let w=new IntersectionObserver((W)=>{if(W.some((v)=>v.isIntersecting))w.disconnect(),S()},{root:g,rootMargin:"800px 0px"});return w.observe(z.current),()=>w.disconnect()},[g,R,s,S]),i("div",{ref:z,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":d,"data-markdown-pending":!0,children:s?E("div",{className:"flex flex-col items-center gap-2",children:[i("p",{role:"alert",className:"text-destructive text-xs",children:s}),i(Y,{variant:"outline",size:"sm",onClick:S,disabled:!R,children:b("timeline.navigationRetry")})]}):E("div",{role:"status","aria-label":b("timeline.navigationLoading"),className:"space-y-3",children:[i("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),i("div",{className:"bg-muted h-3 w-4/5 rounded"}),i("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function We(e,d){let g=h([]),s=h(null);if(s.current?.items!==e.items||s.current.state!==e.state||s.current.ended!==e.turnEndedAt||s.current.usage!==e.turnUsage||s.current.historyOrder!==d)s.current={state:e.state,items:e.items,ended:e.turnEndedAt,usage:e.turnUsage,historyOrder:d,turns:cr(e,g.current,d)};let R=s.current.turns;return g.current=R,R}function gt(e){return i(Ee,{host:e.host,client:e.client,children:i($e,{...e})})}function $e({session:e,leading:d,afterTurn:g,turnWork:s,answerActions:R,turnFooter:z,renderUserMessage:V,insert:b,navigation:S,anchorNewTurn:w=!1,Viewport:W=Ue}){let v=Re(),A=t(),T=o((n)=>n.historyNavigation[e.id]),xe=U(()=>e.commands.map((n)=>n.name),[e.commands]),c=We(e,T?.turns),L=c.at(-1)?.key,he=pr(e,c),y=e.state==="running"||e.state==="requires_action",D=U(()=>$i(c,T),[c,T]),Z=U(()=>D.flatMap((n)=>n.turn===void 0?[]:[{...n.turn,key:n.turnKey}]),[D]),be=U(()=>S===void 0?[]:Ki(c,e.turnUsage,T),[S,c,e.turnUsage,T]),ee=b&&b.afterItemId!==null?c.findIndex((n)=>n.items.some((a)=>a.id===b.afterItemId)):-1,j=h(c);j.current=c;let[l,we]=_(null),x=o((n)=>n.historyPages[e.id]),k=o((n)=>n.connection==="ready"),Se=o((n)=>Ve(n.agent).sessionRetry),te=x!==void 0;H(()=>{if(k&&te&&!e.restoring)v.loadHistoryNavigation(e.id).catch(()=>{})},[v,k,te,e.id,e.restoring]);let[ke,Pe]=_(!1),O=h(null),[Ie,ne]=_(!1),re=h(0),X=h({key:L,running:y});X.current={key:L,running:y};let[ie,F]=_(0),I=h(0),N=h(null);I.current=ie;let Ne=M(()=>{if(N.current!==null)N.current.keepTop=!1},[]),{isFollowing:C,scrollToBottom:G,stopFollowing:B,schedulePin:oe,contentResized:le,beginLocate:ae,cancelLocation:ue}=ji(l,y,Ne),se=M(()=>{if(l===null||!y)return;let n=c.at(-1)?.key;if(n===void 0)return;let a=ae(!0),u=()=>a.isCurrent()&&X.current.running&&X.current.key===n,r=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!u())return;let f=l.querySelector(`[data-codex-turn="${CSS.escape(n)}"]`);if(f===null)return;let m=l.scrollTop+f.getBoundingClientRect().top-l.getBoundingClientRect().top,P=Ke({turnTopPx:m,scrollHeightPx:l.scrollHeight,viewportHeightPx:l.clientHeight,spacerPx:I.current});N.current=P.spacerPx>0?{element:f,heightPx:f.getBoundingClientRect().height+P.spacerPx,keepTop:!0}:null,Te(()=>F(P.spacerPx)),requestAnimationFrame(()=>{if(u())a.finish(P.scrollTopPx)})})),p=O.current;if(p===null)return;p.scrollToKey(n,void 0,{align:"top"}).then(()=>{if(u())r()})},[ae,y,l,c]);ve(()=>{if(!w||y)return;ue(),N.current=null,I.current=0,F(0)},[w,ue,y]);let J=M(()=>{B(),v.loadOlderHistory(e.id).catch(()=>{})},[v,e.id,B]);H(()=>{if(l===null)return;let n=()=>{let a=l.scrollTop<600;if(Pe(a),a&&!T?.complete&&k&&!e.restoring&&!C&&x?.cursor&&!x.loading&&!x.error)J()};return n(),l.addEventListener("scroll",n,{passive:!0}),()=>l.removeEventListener("scroll",n)},[k,x,C,J,l,e.restoring,T?.complete]),H(()=>{tr({sessionId:e.id,turns:Z,api:O.current,beforeReveal:B,terminals:e.terminals})},[e.id,e.terminals,Z,B]),H(()=>()=>nr(e.id),[e.id]);let He=M(async(n,a)=>{let u=++re.current;ne(!0);try{if(n.isLoaded===!1&&n.nativeTurnId!==void 0)await v.loadHistoryTurn(e.id,n.nativeTurnId),await new Promise((m)=>requestAnimationFrame(()=>m()));if(!a())return null;let r=j.current.find((m)=>m.user?.id===(n.messageId??n.id))??j.current.find((m)=>m.user!==null&&n.nativeTurnId!==void 0&&m.items.some((P)=>ge(P)===n.nativeTurnId));if(!r?.user)return null;let p=r.user.id,f=O.current;if(f===null)throw Error("Virtual timeline is not mounted");return await f.scrollToKey(r.key,(m)=>m.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(re.current===u)ne(!1)}},[v,e.id]),Ae=M(async(n)=>{if(n.nativeTurnId!==void 0)await v.previewHistoryTurn(e.id,n.nativeTurnId)},[v,e.id]);H(()=>{if(l===null)return;let n=l.querySelector("[data-codex-timeline]");if(n===null)throw Error("Timeline content element is missing");let a=new ResizeObserver(()=>{let u=N.current,r=null;if(u!==null){let p=Math.max(0,u.heightPx-u.element.getBoundingClientRect().height);if(p!==I.current&&(p<I.current||u.keepTop)){if(I.current=p,Te(()=>F(p)),p===0)N.current=null}if(p>0&&u.keepTop)r=l.scrollTop+u.element.getBoundingClientRect().top-l.getBoundingClientRect().top-ye}le(r)});if(a.observe(n),a.observe(l),L!==void 0){let u=l.querySelector(`[data-codex-turn="${CSS.escape(L)}"]`);if(u===null)throw Error("Latest turn is not mounted");a.observe(u)}return()=>a.disconnect()},[le,L,l]),H(()=>{if(e.items.length===0)return;oe()},[oe,e.items]);let ce=h(null);ve(()=>{if(l===null)return;let n=c.at(-1),a=ce.current;if(ce.current=n===void 0?null:{key:n.key,running:y},n===void 0||a===null||n.user===null||n.replayed)return;if(w){if(y&&e.turnEndedAt[n.user.id]===void 0&&(n.key!==a.key||!a.running))N.current=null,I.current=0,F(0),se()}else if(n.key!==a.key)G()},[se,w,y,G,l,e.turnEndedAt,c]);let Le=(n,a)=>{let u=n,r=u.turn;if(r===void 0){if(u.nativeTurnId===void 0)throw Error(`Turn is missing at index ${a}`);return i(_e,{sessionId:e.id,turnId:u.nativeTurnId,root:l,error:T?.turnErrors[u.nativeTurnId],connected:k&&!C&&!Ie})}let p=c.indexOf(r),f=r.key===he,m=mr(e,c,p),P=!f&&m.continued,K=r.key===L,q=r.errors.at(-1),de=q===void 0?null:Be(q),Q=q===void 0?null:ge(q),Ce=!e.subagent&&K&&!f&&k&&Se&&e.attached&&!e.readOnly&&!e.restoring&&q===e.items.at(-1)&&de!==null&&Oe(de).kind==="overloaded"&&Q!==null&&e.lastStopReason!=="end_turn"&&e.lastStopReason!=="cancelled",me=z?.(r)??null,pe=s?.(r)??null,Me=pe!==null||r.work.length>0||r.final.length>0||r.errors.length>0||f||me!==null||xt(r)||ro(r)||K&&(e.error!==null||e.lastStopReason==="cancelled"),fe=r.user===null?null:vt(r);return E("div",{"data-virtualized-turn-content":!0,"data-codex-turn":r.key,className:"flex flex-col gap-1.5",children:[r.user!==null&&(V===void 0?i(rr,{item:r.user,messageTime:fe,skillNames:xe}):V(r.user,fe)),Me&&i(Ei,{sessionId:e.id,turn:r,terminals:e.terminals,active:f,blocked:e.state==="requires_action",continued:P,edits:m.edits,activityItems:m.items,workStartedAt:m.startedAt,isLast:K,error:e.error,retrying:f?qe(e._meta)??void 0:void 0,retry:Ce?{turnId:Q,delaySeconds:Vi(c),run:(ze)=>v.retrySession(e.id,Q,ze)}:void 0,interrupted:ro(r)||!f&&K&&e.lastStopReason==="cancelled",extraWork:pe,answerActions:R?.(r),footer:me}),a===ee&&b?.node,g?.(r)]})};return E("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[i(W,{viewportRef:we,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":A.t("timeline.label")},children:i("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:E("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[b&&ee===-1&&b.node,i(Ii,{ref:O,entries:D,renderTurn:Le,scrollElement:l,sessionKey:e.id,preserveViewport:!C,leadingInsetPx:12,leadingContent:d===void 0?void 0:i("div",{className:"pt-3",children:d})}),w&&i("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:ie}}),i("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),i("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),T?.error&&i("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:i(Y,{variant:"outline",size:"sm",disabled:!k,title:T.error,onClick:()=>{v.loadHistoryNavigation(e.id).catch(()=>{})},children:A.t("timeline.navigationRetry")})}),ke&&x?.cursor&&!T?.complete&&E("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[i(Y,{variant:"outline",size:"sm",disabled:!k||e.restoring||x.loading,onClick:J,children:x.loading?A.t("timeline.loadingEarlier"):A.t("timeline.loadEarlier")}),x.error&&i("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:x.error})]}),S!==void 0&&i(qi,{items:be,audio:S.audio,scrollRoot:l,beforeReveal:B,ensureItemMounted:He,onPreviewItem:Ae,onRevealError:(n)=>Ct(A,n),targetTopMarginPx:16},e.id),i("button",{type:"button",className:C?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:C?-1:void 0,onClick:G,"aria-label":A.t("timeline.scrollToBottom"),children:y?E("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"}),i("span",{className:"codex-wave-dot"})]}):i(Fe,{})})]})}
2
- export{gt};
@@ -1,2 +0,0 @@
1
- import{we}from"./chunk-mgsxsaj1.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function yo({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:we(t)}):null}function xo({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(yo,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Mt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(xo,{label:t,shortcut:o}):t})]})}
2
- export{yo,xo,Mt};
@@ -1,2 +0,0 @@
1
- import{Tt}from"./chunk-9pcx42v8.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function Le(e){let t=r.get(e);if(!t)t=Tt(e),r.set(e,t);return t}function Pr({host:e,client:t,children:n}){let s=Le(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function c(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function Fe(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function Ze(e){let t=Fe();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Le(Fe());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function De(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
2
- export{Le,Pr,c,Fe,Ze,i,De};
@@ -1,2 +0,0 @@
1
- import{me}from"./chunk-620q6hmz.js";function x(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function bt(e){if(!e.includes("app://"))return[];let n=me(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=x(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Sa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function gr(e,n){return[Sa(n),e.trim()].filter(Boolean).join(" ")}function fr(e,n){let r=Sa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
2
- export{x,bt,Sa,gr,fr};
@@ -1,2 +0,0 @@
1
- import{createStore as M}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function E(a){return a.interface?.displayName??a.name}function I(a){let u={},n=new Map,l=new Map;for(let p of a.data){for(let o of p.skills)if(n.set(o.path,o),o.scope==="repo"){let m=u[p.cwd]??[];if(!m.includes(o.path))m.push(o.path);u[p.cwd]=m}for(let o of p.errors)l.set(o.path,o)}return{skills:[...n.values()],errors:[...l.values()],projects:u}}function v(a){let u=[];for(let n of a.marketplaces)for(let l of n.plugins)if(l.installed)u.push({plugin:l,marketplace:n});return u.toSorted((n,l)=>(l.plugin.installedAt??0)-(n.plugin.installedAt??0))}function fo(a){let{plugin:u,marketplace:n}=a;return{installAttemptId:crypto.randomUUID(),pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function A(a){let{plugin:u,marketplace:n}=a;return{pluginName:n.path===null?u.remotePluginId??u.name:u.name,...n.path===null?{remoteMarketplaceName:n.name}:{marketplacePath:n.path}}}function Tt(a,u){let n=u??{t:(e)=>e},l=(e,r)=>n.t(e,r),p=(e)=>n.notify?.(e),o=(e)=>{if(n.reportError)n.reportError(Error(e));else console.error(e)},m=null,b=null,d=(e)=>S.setState(e),P=()=>S.getState(),y=async(e=!1)=>{if(await P().refresh(void 0,{forceRefetch:e,background:!0}),P().error)throw Error(l("plugins.toast.syncError",{message:P().error}))},f=(e,r)=>d((s)=>{let t={...s.busyIds};if(r===null)delete t[e];else t[e]=r;return{busyIds:t}}),h=(e,r)=>d((s)=>{let t={...s.busyMarketplaces};if(r)t[e]=!0;else delete t[e];return{busyMarketplaces:t}}),w=M({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=P().cwds,r={})=>{if(m={cwds:e,forceRefetch:r.forceRefetch===!0||m?.forceRefetch===!0},d({cwds:e,...!r.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(m){let s=m;m=null,d({error:null});try{let[t,i,g]=await Promise.all([a.listSkills(s.cwds,s.forceRefetch),a.listPlugins({...s.cwds.length>0?{cwds:s.cwds}:{},...s.forceRefetch?{forceRefetch:!0}:{}}),a.installedPlugins(s.cwds)]);if(m)continue;let c=I(t);d({loadedScope:JSON.stringify(s.cwds),skills:c.skills,skillProjects:c.projects,skillErrors:c.errors,marketplaces:i.marketplaces,marketplaceLoadErrors:i.marketplaceLoadErrors,featuredPluginIds:i.featuredPluginIds,installed:v(g)})}catch(t){if(!m)d({error:k(t)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in P().busyIds)throw Error("Plugin operation already in progress");let r=E(e.plugin);f(e.plugin.id,"installing");try{let s=await a.installPlugin(fo(e));return await y(),f(e.plugin.id,null),p(l("plugins.toast.installed",{pluginName:r})),s}catch(s){throw o(`${l("plugins.toast.installError")}: ${k(s)}`),s}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,r)=>{if(e.id in P().busyIds)return;f(e.id,"toggling");let s=(i)=>d((g)=>({installed:g.installed.map((c)=>c.plugin.id===e.id?{...c,plugin:{...c.plugin,enabled:i}}:c)}));s(r);let t=e.enabled;try{let i=e.source.type==="remote"?e.remotePluginId:void 0;if(i===null)throw Error("Remote plugin ID is missing");let g=await a.setPluginEnabled(e.id,r,i);t=g.enabled,s(g.enabled),await y();let c=P().installed.find((R)=>R.plugin.id===e.id);if(c)t=c.plugin.enabled;if(!c||t!==r)throw Error(l("plugins.toast.toggleNotApplied"));f(e.id,null),p(l(r?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:E(e)}))}catch(i){s(t),o(`${l("plugins.toast.toggleError")}: ${k(i)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in P().busyIds)return;let r=E(e);f(e.id,"uninstalling");try{let s=e.source.type==="remote"?e.remotePluginId:e.id;if(!s)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(s),await y(),P().installed.some((t)=>t.plugin.id===e.id))throw Error(l("plugins.toast.uninstallNotApplied"));f(e.id,null),p(l("plugins.toast.uninstalled",{pluginName:r}))}catch(s){o(`${l("plugins.toast.uninstallError")}: ${k(s)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(A(e))).plugin,setSkillEnabled:async(e,r)=>{if(e.path in P().busySkills)return;d((t)=>({busySkills:{...t.busySkills,[e.path]:!0}})),d((t)=>({skills:t.skills.map((i)=>i.path===e.path?{...i,enabled:r}:i)}));let s=e.interface?.displayName??e.name;try{let t=await a.setSkillEnabled({path:e.path,enabled:r});if(d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:t.effectiveEnabled}:g)})),t.effectiveEnabled!==r){o(l("plugins.catalog.toggleNotApplied"));return}p(l(r?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:s}))}catch(t){d((i)=>({skills:i.skills.map((g)=>g.path===e.path?{...g,enabled:e.enabled}:g)})),o(`${l("plugins.skills.toggleError")}: ${k(t)}`)}finally{d((t)=>{let i={...t.busySkills};return delete i[e.path],{busySkills:i}})}},addMarketplace:async(e)=>{let r=await a.addMarketplace(e);return await y(!0),p(r.alreadyAdded?l("plugins.marketplace.alreadyAdded",{marketplaceName:r.marketplaceName}):l("plugins.marketplace.added",{marketplaceName:r.marketplaceName})),r},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),p(l("plugins.marketplace.removed",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.removeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let r=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),r.errors.length>0)o(`${l("plugins.marketplace.upgradeError")}: ${r.errors.map((s)=>s.message).join("; ")}`);else p(l("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(r){o(`${l("plugins.marketplace.upgradeError")}: ${k(r)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(P().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(l("plugins.marketplace.upgradeAllError"));else p(l("plugins.marketplace.upgradedAll"))}catch(e){o(`${l("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(w,{bindHost:(e)=>{n=e}});return S}
2
- export{fo,Tt};
@@ -1,2 +0,0 @@
1
- function ei(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function An(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ve(t){return t.type==="array"}function mn(t){return(Ve(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
2
- export{ei,An,Ve,mn};