@alwith/module-chat 0.5.22 → 0.5.24

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 (381) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/approval/choice-elicitation-form.js +1 -1
  3. package/dist/approval/choice-schema.js +1 -1
  4. package/dist/approval/permission-options.js +1 -1
  5. package/dist/approval/permission-view.js +1 -1
  6. package/dist/approval/schema-elicitation-form.d.ts +1 -1
  7. package/dist/approval/schema-elicitation-form.js +1 -1
  8. package/dist/approval/url-elicitation-card.js +1 -1
  9. package/dist/chunk-0p6y2t9b.js +2 -0
  10. package/dist/{chunk-dya74vts.js → chunk-0pzyavch.js} +2 -2
  11. package/dist/{chunk-xgjkj9j8.js → chunk-0wa9yjg3.js} +2 -2
  12. package/dist/chunk-1e0e41vw.js +2 -0
  13. package/dist/{chunk-r9dt4bs3.js → chunk-1k21j77z.js} +2 -2
  14. package/dist/chunk-1kbxsxft.js +2 -0
  15. package/dist/chunk-1mn2t6ga.js +2 -0
  16. package/dist/{chunk-2tce3pc5.js → chunk-1qyxrh0n.js} +3 -3
  17. package/dist/{chunk-2f1qx13s.js → chunk-1rg3nab3.js} +2 -2
  18. package/dist/{chunk-xrs7x5ah.js → chunk-1vf83jdk.js} +2 -2
  19. package/dist/{chunk-1ppfn0e1.js → chunk-2f9vjmxz.js} +2 -2
  20. package/dist/chunk-2rkrmpa7.js +2 -0
  21. package/dist/{chunk-8hte6dh7.js → chunk-36m8zstj.js} +2 -2
  22. package/dist/chunk-3bsk6xcf.js +2 -0
  23. package/dist/{chunk-0mp7tyea.js → chunk-3cssygmg.js} +2 -2
  24. package/dist/{chunk-9sq2etjk.js → chunk-3e6wcamp.js} +2 -2
  25. package/dist/{chunk-8t36vprh.js → chunk-3ka3bt0t.js} +2 -2
  26. package/dist/{chunk-xmstt6hh.js → chunk-3s94ekrs.js} +2 -2
  27. package/dist/{chunk-dv65h7z5.js → chunk-3vkkmyjm.js} +2 -2
  28. package/dist/{chunk-23rjsm3a.js → chunk-3yxjh7b1.js} +2 -2
  29. package/dist/{chunk-8jxcdap5.js → chunk-42atrgm1.js} +2 -2
  30. package/dist/{chunk-mg2mkzkk.js → chunk-48fj5m0p.js} +2 -2
  31. package/dist/{chunk-156m3888.js → chunk-4a46cpnm.js} +3 -3
  32. package/dist/{chunk-1e6x0018.js → chunk-4bb6dzzs.js} +2 -2
  33. package/dist/chunk-4r7j0ymq.js +2 -0
  34. package/dist/{chunk-e9ntencj.js → chunk-509kwzxq.js} +2 -2
  35. package/dist/{chunk-m2b8kzpk.js → chunk-5a6xc345.js} +2 -2
  36. package/dist/chunk-5ap6fvrp.js +2 -0
  37. package/dist/chunk-60neqgfx.js +2 -0
  38. package/dist/{chunk-nxp1b8ny.js → chunk-667z0pac.js} +2 -2
  39. package/dist/chunk-6dbswsek.js +2 -0
  40. package/dist/{chunk-3jcmv5qf.js → chunk-6t5war9h.js} +2 -2
  41. package/dist/chunk-6trv0snh.js +2 -0
  42. package/dist/{chunk-mcjwwxa1.js → chunk-7170hbdr.js} +2 -2
  43. package/dist/{chunk-f28hhbf4.js → chunk-74qvpvzv.js} +2 -2
  44. package/dist/{chunk-jm6zja6h.js → chunk-76a04a6j.js} +2 -2
  45. package/dist/{chunk-0gy6ngda.js → chunk-7absxkjt.js} +2 -2
  46. package/dist/chunk-7k64wn19.js +4 -0
  47. package/dist/{chunk-k7k6qsqh.js → chunk-7z4gtfkd.js} +2 -2
  48. package/dist/{chunk-nq7gg9vg.js → chunk-855w49k0.js} +2 -2
  49. package/dist/chunk-8dbx6g7q.js +2 -0
  50. package/dist/{chunk-a8p82wp7.js → chunk-8hf11jas.js} +2 -2
  51. package/dist/{chunk-xyvqcpjx.js → chunk-92xxp77d.js} +2 -2
  52. package/dist/{chunk-0fs2k5fe.js → chunk-95mynf7q.js} +2 -2
  53. package/dist/{chunk-memvzzc6.js → chunk-988sgbn9.js} +2 -2
  54. package/dist/chunk-99fh3f1v.js +2 -0
  55. package/dist/{chunk-p4bb313p.js → chunk-9j9rx57q.js} +3 -3
  56. package/dist/chunk-9tn2n7xv.js +2 -0
  57. package/dist/chunk-9tp0z23q.js +2 -0
  58. package/dist/chunk-a1czzft3.js +2 -0
  59. package/dist/chunk-a4apcx3e.js +3 -0
  60. package/dist/{chunk-77j8n5k5.js → chunk-a63k8tht.js} +2 -2
  61. package/dist/{chunk-ap0vmczf.js → chunk-acb8t4jt.js} +2 -2
  62. package/dist/{chunk-2nvsvw67.js → chunk-agqnt7xq.js} +2 -2
  63. package/dist/{chunk-8c042xya.js → chunk-apyfztsv.js} +2 -2
  64. package/dist/chunk-ar4a6nyv.js +2 -0
  65. package/dist/{chunk-aza82m2p.js → chunk-azfmr99x.js} +2 -2
  66. package/dist/{chunk-0vhkv9ax.js → chunk-b12v22de.js} +2 -2
  67. package/dist/chunk-b13pahat.js +2 -0
  68. package/dist/{chunk-w9dh298r.js → chunk-bg03czcx.js} +2 -2
  69. package/dist/chunk-bmey8et5.js +2 -0
  70. package/dist/{chunk-5cdr7q6f.js → chunk-bnbc6q4p.js} +3 -3
  71. package/dist/{chunk-n3xhh6ch.js → chunk-btanfat4.js} +2 -2
  72. package/dist/{chunk-67hrx4kg.js → chunk-bvgqsaey.js} +2 -2
  73. package/dist/chunk-c32z3wjq.js +2 -0
  74. package/dist/{chunk-1q2cykp4.js → chunk-ckyat78p.js} +2 -2
  75. package/dist/chunk-cqnqwa54.js +2 -0
  76. package/dist/{chunk-aqvy57zs.js → chunk-cw76pj9b.js} +2 -2
  77. package/dist/{chunk-40bcp4pa.js → chunk-d8q2qv1m.js} +2 -2
  78. package/dist/{chunk-vyk4zh1m.js → chunk-ddk8v2g9.js} +7 -7
  79. package/dist/{chunk-vs02ry2r.js → chunk-ddv00vjf.js} +2 -2
  80. package/dist/{chunk-m7wn4z9x.js → chunk-drhzcs6e.js} +2 -2
  81. package/dist/{chunk-nqw4deag.js → chunk-dte0n4kf.js} +2 -2
  82. package/dist/chunk-dy92pv7q.js +2 -0
  83. package/dist/{chunk-63kxepkh.js → chunk-ececn091.js} +2 -2
  84. package/dist/chunk-f1gj3yzt.js +2 -0
  85. package/dist/{chunk-0gersbj0.js → chunk-f1x483c9.js} +2 -2
  86. package/dist/{chunk-dyrgfdxz.js → chunk-f2w2sct6.js} +2 -2
  87. package/dist/{chunk-mgm1x3de.js → chunk-f5gsffbv.js} +2 -2
  88. package/dist/{chunk-00eytt1z.js → chunk-fmjez7xp.js} +2 -2
  89. package/dist/{chunk-vcy5vyp7.js → chunk-fnpf84rf.js} +2 -2
  90. package/dist/{chunk-3aq5c12k.js → chunk-g2qcyqc6.js} +2 -2
  91. package/dist/chunk-g2zznfan.js +2 -0
  92. package/dist/{chunk-hv1ejvhg.js → chunk-g44hhdha.js} +2 -2
  93. package/dist/{chunk-z2v008kc.js → chunk-gha517v4.js} +2 -2
  94. package/dist/{chunk-fke98cj0.js → chunk-gsfgdnfp.js} +2 -2
  95. package/dist/chunk-h9v3pks1.js +1 -0
  96. package/dist/{chunk-x334e7wb.js → chunk-hdw3mwmb.js} +3 -3
  97. package/dist/{chunk-8w22ck92.js → chunk-heyqzkxq.js} +2 -2
  98. package/dist/{chunk-xktybk48.js → chunk-hxtxrtpm.js} +2 -2
  99. package/dist/chunk-j0m35s05.js +2 -0
  100. package/dist/{chunk-4s6gx750.js → chunk-j322kgxf.js} +2 -2
  101. package/dist/{chunk-k5rkpqbh.js → chunk-jgd6dcgy.js} +2 -2
  102. package/dist/chunk-jhzs9ab0.js +2 -0
  103. package/dist/chunk-jm6zxy9h.js +2 -0
  104. package/dist/chunk-jmb8r6aj.js +2 -0
  105. package/dist/{chunk-42nhwnbe.js → chunk-jwt7q6yx.js} +4 -4
  106. package/dist/{chunk-983gkw32.js → chunk-jxntqarp.js} +2 -2
  107. package/dist/{chunk-6dn3j8a2.js → chunk-k7ye738q.js} +2 -2
  108. package/dist/{chunk-72x7rae0.js → chunk-kc56dhwd.js} +2 -2
  109. package/dist/{chunk-42hkbpey.js → chunk-kmdag4vy.js} +2 -2
  110. package/dist/{chunk-n929wkw7.js → chunk-kz1kjzmq.js} +2 -2
  111. package/dist/{chunk-z2fjwkmt.js → chunk-m0834n5y.js} +2 -2
  112. package/dist/{chunk-qwfwxfhn.js → chunk-m271yxxm.js} +2 -2
  113. package/dist/{chunk-zxkvvecz.js → chunk-mj7094yh.js} +2 -2
  114. package/dist/{chunk-j86x2rn0.js → chunk-mnzqtg7h.js} +2 -2
  115. package/dist/{chunk-nn25kjm4.js → chunk-mvs2dzyt.js} +2 -2
  116. package/dist/chunk-mz8a6292.js +2 -0
  117. package/dist/{chunk-sy5tq3y6.js → chunk-n2e3a7n4.js} +2 -2
  118. package/dist/{chunk-n0khj68q.js → chunk-n625g0h1.js} +2 -2
  119. package/dist/{chunk-1f628zap.js → chunk-n66yy1m1.js} +2 -2
  120. package/dist/chunk-nj9y0bwb.js +2 -0
  121. package/dist/chunk-nwtambg5.js +2 -0
  122. package/dist/{chunk-82xjggwn.js → chunk-p7dd93e5.js} +2 -2
  123. package/dist/chunk-pbf73n1s.js +3 -0
  124. package/dist/chunk-pk2rvqd0.js +2 -0
  125. package/dist/{chunk-1tkzxktd.js → chunk-pmkk6e5x.js} +2 -2
  126. package/dist/{chunk-7wk3d01c.js → chunk-pprt7ntb.js} +4 -4
  127. package/dist/{chunk-ns5rnxdj.js → chunk-pwjz3yxb.js} +2 -2
  128. package/dist/chunk-pz0v5f2k.js +2 -0
  129. package/dist/{chunk-z71pp1mb.js → chunk-pzjag1mt.js} +3 -3
  130. package/dist/chunk-q9zawfn1.js +2 -0
  131. package/dist/{chunk-141kppzb.js → chunk-qd1z91fm.js} +1 -1
  132. package/dist/{chunk-k5wgf59a.js → chunk-qdg5zphd.js} +2 -2
  133. package/dist/{chunk-2tkeevm0.js → chunk-qmzb07jg.js} +2 -2
  134. package/dist/chunk-qn6ppn0r.js +2 -0
  135. package/dist/{chunk-v4t0p6pp.js → chunk-qtp1xer1.js} +2 -2
  136. package/dist/{chunk-8ch9444t.js → chunk-qwfw4xpn.js} +2 -2
  137. package/dist/{chunk-b2wczqtd.js → chunk-r19q0w11.js} +2 -2
  138. package/dist/{chunk-x2yc5748.js → chunk-rbv1scqm.js} +2 -2
  139. package/dist/{chunk-xf36kt74.js → chunk-rjw63t34.js} +3 -3
  140. package/dist/{chunk-33620ca6.js → chunk-rr36dnn9.js} +2 -2
  141. package/dist/{chunk-mwpchd85.js → chunk-sqjgh9e2.js} +3 -3
  142. package/dist/{chunk-b614gnnv.js → chunk-swpy2b9a.js} +2 -2
  143. package/dist/{chunk-s55n9cby.js → chunk-t2q8cxnh.js} +2 -2
  144. package/dist/{chunk-c38t8809.js → chunk-t6vcdf4j.js} +2 -2
  145. package/dist/{chunk-7p1r1ha9.js → chunk-t7drk9ja.js} +2 -2
  146. package/dist/chunk-tgskd2p2.js +2 -0
  147. package/dist/chunk-tpbqg729.js +2 -0
  148. package/dist/{chunk-t97yjy4f.js → chunk-ttqy9d4r.js} +2 -2
  149. package/dist/{chunk-w6rwngm3.js → chunk-tv0fwt2g.js} +2 -2
  150. package/dist/{chunk-y7xcync7.js → chunk-v5mzxjzc.js} +2 -2
  151. package/dist/{chunk-w0hpztj7.js → chunk-vfhxerxt.js} +2 -2
  152. package/dist/chunk-vnsgjnp3.js +2 -0
  153. package/dist/{chunk-59957gfy.js → chunk-vt6cyes7.js} +2 -2
  154. package/dist/chunk-wb8sf2ww.js +2 -0
  155. package/dist/{chunk-g73f62qm.js → chunk-wgrmjfyp.js} +2 -2
  156. package/dist/chunk-wm0jty6e.js +2 -0
  157. package/dist/{chunk-h5m2fpp4.js → chunk-wvry7t79.js} +2 -2
  158. package/dist/chunk-x2jd9bpn.js +3 -0
  159. package/dist/{chunk-x6nz6eyb.js → chunk-x3y5htkt.js} +2 -2
  160. package/dist/{chunk-cbwya2ss.js → chunk-yakar0e2.js} +2 -2
  161. package/dist/{chunk-3yvd77ph.js → chunk-yg3xhn5m.js} +2 -2
  162. package/dist/{chunk-dyqvhn6y.js → chunk-ypk1gwzc.js} +5 -5
  163. package/dist/{chunk-et8rcxw6.js → chunk-z3nybrbb.js} +2 -2
  164. package/dist/{chunk-rcbb4ke2.js → chunk-z7sswh39.js} +2 -2
  165. package/dist/chunk-zxp0mb14.js +2 -0
  166. package/dist/codex/activity-group.js +1 -1
  167. package/dist/codex/assistant-message.js +1 -1
  168. package/dist/codex/async-question-card.js +1 -1
  169. package/dist/codex/disclosure-state.js +1 -1
  170. package/dist/codex/edited-files-card.js +1 -1
  171. package/dist/codex/image-view-activity.js +1 -1
  172. package/dist/codex/markdown-renderer.js +1 -1
  173. package/dist/codex/navigation-audio.js +1 -1
  174. package/dist/codex/navigation-preview.js +1 -1
  175. package/dist/codex/navigation-rail.js +1 -1
  176. package/dist/codex/patch-view.js +1 -1
  177. package/dist/codex/plan.js +1 -1
  178. package/dist/codex/timeline-virtualizer.js +1 -1
  179. package/dist/codex/turn-activity.js +1 -1
  180. package/dist/codex/user-message.js +1 -1
  181. package/dist/codex/virtualized-turn-list.js +1 -1
  182. package/dist/collections/collection-emoji.js +1 -1
  183. package/dist/collections/collection-menu.js +1 -1
  184. package/dist/collections/collection-panel.js +1 -1
  185. package/dist/collections/collections.js +1 -1
  186. package/dist/collections/host.js +1 -1
  187. package/dist/collections/locales.js +1 -1
  188. package/dist/collections/model.js +1 -1
  189. package/dist/collections/store.js +1 -1
  190. package/dist/composer/completion-filter.js +1 -1
  191. package/dist/composer/completion-menu.js +1 -1
  192. package/dist/composer/completion-trigger.js +1 -1
  193. package/dist/composer/effort-slider.js +1 -1
  194. package/dist/composer/menu-radio.js +1 -1
  195. package/dist/composer/model-select.js +1 -1
  196. package/dist/composer/permission-mode-select.js +1 -1
  197. package/dist/composer/prompt-input-attachments.js +1 -1
  198. package/dist/composer/prompt-input-clipboard.js +1 -1
  199. package/dist/composer/prompt-input-context.js +1 -1
  200. package/dist/composer/prompt-input-textarea.js +1 -1
  201. package/dist/composer/prompt-input.js +1 -1
  202. package/dist/conversation/action-card.js +1 -1
  203. package/dist/conversation/composer/composer.js +1 -1
  204. package/dist/conversation/composer/config-options.js +1 -1
  205. package/dist/conversation/composer/context.js +1 -1
  206. package/dist/conversation/composer/drafts.js +1 -1
  207. package/dist/conversation/composer/file-items.js +1 -1
  208. package/dist/conversation/composer/long-text.js +1 -1
  209. package/dist/conversation/composer/mention-chips.js +1 -1
  210. package/dist/conversation/composer/mention-uri.js +1 -1
  211. package/dist/conversation/composer/model-menu.js +1 -1
  212. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  213. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  214. package/dist/conversation/composer/prediction.js +1 -1
  215. package/dist/conversation/composer/slash-command-button.js +1 -1
  216. package/dist/conversation/composer/submit-button.js +1 -1
  217. package/dist/conversation/composer/usage-meter.js +1 -1
  218. package/dist/conversation/connection-notice.js +1 -1
  219. package/dist/conversation/context.js +1 -1
  220. package/dist/conversation/conversation-body.js +1 -1
  221. package/dist/conversation/conversation-search.js +1 -1
  222. package/dist/conversation/conversation-view.js +1 -1
  223. package/dist/conversation/conversation.js +1 -1
  224. package/dist/conversation/diff-modal.js +1 -1
  225. package/dist/conversation/draft-project-picker.js +1 -1
  226. package/dist/conversation/session-actions.js +1 -1
  227. package/dist/conversation/subagent-sessions.js +1 -1
  228. package/dist/image-lightbox.js +1 -1
  229. package/dist/image-preview-dialog.js +1 -1
  230. package/dist/lib/code-highlighter.js +1 -1
  231. package/dist/lib/fuzzy.js +1 -1
  232. package/dist/lib/group-blocks.js +1 -1
  233. package/dist/lib/image-encode.js +1 -1
  234. package/dist/lib/limits.js +1 -1
  235. package/dist/lib/markdown-parser.js +1 -1
  236. package/dist/lib/markdown-rules.js +1 -1
  237. package/dist/lib/model-name.js +1 -1
  238. package/dist/lib/pointer-centered-zoom.js +1 -1
  239. package/dist/lib/prepare-prompt-files.js +1 -1
  240. package/dist/lib/stream-style.js +1 -1
  241. package/dist/lib/streaming-markdown.js +1 -1
  242. package/dist/locales.js +1 -1
  243. package/dist/plugins/catalog-header.js +1 -1
  244. package/dist/plugins/catalog-skeleton.js +1 -1
  245. package/dist/plugins/host.js +1 -1
  246. package/dist/plugins/new-chat-directory.js +1 -1
  247. package/dist/plugins/pane.js +1 -1
  248. package/dist/plugins/panel-item.js +1 -1
  249. package/dist/plugins/plugin-detail-page.js +1 -1
  250. package/dist/plugins/plugin-icon.js +1 -1
  251. package/dist/plugins/plugin-icons.js +1 -1
  252. package/dist/plugins/plugins-page.js +1 -1
  253. package/dist/plugins/plugins.js +1 -1
  254. package/dist/plugins/read-skill-document.js +1 -1
  255. package/dist/plugins/skill-document.js +1 -1
  256. package/dist/plugins/skills-tab.js +1 -1
  257. package/dist/plugins/store.js +1 -1
  258. package/dist/plugins/toolbox-layout.js +1 -1
  259. package/dist/search/chat-search.js +1 -1
  260. package/dist/search/codex-source-matches.js +1 -1
  261. package/dist/search/dom-matches.js +1 -1
  262. package/dist/search/find-bar.js +1 -1
  263. package/dist/search/literal-matches.js +1 -1
  264. package/dist/session-list/account-menu.js +1 -1
  265. package/dist/session-list/activity-list.js +1 -1
  266. package/dist/session-list/archived-sessions.js +1 -1
  267. package/dist/session-list/help-menu.js +1 -1
  268. package/dist/session-list/highlight.js +1 -1
  269. package/dist/session-list/host.js +1 -1
  270. package/dist/session-list/hover-info-card.js +1 -1
  271. package/dist/session-list/navigation-header.js +1 -1
  272. package/dist/session-list/navigation-store.d.ts +1 -1
  273. package/dist/session-list/navigation-store.js +1 -1
  274. package/dist/session-list/navigation-tabs.js +1 -1
  275. package/dist/session-list/navigation.js +1 -1
  276. package/dist/session-list/overflow-marquee.js +1 -1
  277. package/dist/session-list/platform.js +1 -1
  278. package/dist/session-list/row-stop-button.js +1 -1
  279. package/dist/session-list/session-groups.js +1 -1
  280. package/dist/session-list/session-info-card.js +1 -1
  281. package/dist/session-list/session-list.js +1 -1
  282. package/dist/session-list/session-row.js +1 -1
  283. package/dist/session-list/session-state-dot.js +1 -1
  284. package/dist/session-list/session-state-menu.js +1 -1
  285. package/dist/session-list/shortcut-hint.js +1 -1
  286. package/dist/session-list/shortcut.js +1 -1
  287. package/dist/session-list/sidebar-overlay.js +1 -1
  288. package/dist/session-list/trailing-swap.js +1 -1
  289. package/dist/session-list/use-activity-notification.js +1 -1
  290. package/dist/session-list/use-activity-preview.js +1 -1
  291. package/dist/session-list/use-cmd-held.js +1 -1
  292. package/dist/session-list/use-project-sessions.js +1 -1
  293. package/dist/session-list/virtual-session-rows.js +1 -1
  294. package/dist/session-timeline/activity-group.js +1 -1
  295. package/dist/session-timeline/activity-projection.js +1 -1
  296. package/dist/session-timeline/assistant-content.js +1 -1
  297. package/dist/session-timeline/assistant-turn.js +1 -1
  298. package/dist/session-timeline/async-questions.js +1 -1
  299. package/dist/session-timeline/edited-files-card.js +1 -1
  300. package/dist/session-timeline/history-timeline.js +1 -1
  301. package/dist/session-timeline/host.js +1 -1
  302. package/dist/session-timeline/navigation-rail.js +1 -1
  303. package/dist/session-timeline/plan.js +1 -1
  304. package/dist/session-timeline/question-reply.js +1 -1
  305. package/dist/session-timeline/resource-content.js +1 -1
  306. package/dist/session-timeline/session-timeline.js +1 -1
  307. package/dist/session-timeline/timeline-registry.js +1 -1
  308. package/dist/session-timeline/turn-activity.js +1 -1
  309. package/dist/session-timeline/turn-error.js +1 -1
  310. package/dist/session-timeline/turn-retry.js +1 -1
  311. package/dist/session-timeline/turn-time.js +1 -1
  312. package/dist/session-timeline/turns.js +1 -1
  313. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  314. package/dist/session-timeline/user-message.js +1 -1
  315. package/dist/settings/codex-account-card.js +1 -1
  316. package/dist/settings/login-card.js +1 -1
  317. package/dist/settings/model-alias-settings.js +1 -1
  318. package/dist/settings/model-aliases.js +1 -1
  319. package/dist/settings/provider-logos.js +1 -1
  320. package/dist/settings/provider-section.js +1 -1
  321. package/dist/settings/providers-port.d.ts +3 -3
  322. package/dist/settings/providers-port.js +1 -1
  323. package/dist/settings/providers.js +1 -1
  324. package/dist/settings/settings-bridge.d.ts +3 -3
  325. package/dist/settings/settings-bridge.js +1 -1
  326. package/dist/settings/settings.js +1 -1
  327. package/package.json +3 -3
  328. package/rust/Cargo.lock +484 -10
  329. package/rust/Cargo.toml +16 -1
  330. package/rust/src/__tests__/native_network.rs +406 -0
  331. package/rust/src/lib.rs +3 -0
  332. package/rust/src/native_network.rs +302 -0
  333. package/rust/src/native_network_diagnostics.rs +220 -0
  334. package/rust/src/providers/tests.rs +4 -1
  335. package/rust/src/system_proxy.rs +257 -0
  336. package/dist/chunk-14exd146.js +0 -2
  337. package/dist/chunk-2ce8gd89.js +0 -2
  338. package/dist/chunk-3n47hknp.js +0 -2
  339. package/dist/chunk-52p7kyam.js +0 -2
  340. package/dist/chunk-59exzf5n.js +0 -2
  341. package/dist/chunk-5nc3dtyt.js +0 -2
  342. package/dist/chunk-78s6h7r4.js +0 -2
  343. package/dist/chunk-80ckz04b.js +0 -2
  344. package/dist/chunk-85ffkcch.js +0 -2
  345. package/dist/chunk-8qw8erv6.js +0 -2
  346. package/dist/chunk-908ndb9r.js +0 -2
  347. package/dist/chunk-9g67z1b4.js +0 -2
  348. package/dist/chunk-9n79tr1q.js +0 -2
  349. package/dist/chunk-ajpxjj5m.js +0 -2
  350. package/dist/chunk-b3jg6nzv.js +0 -3
  351. package/dist/chunk-c1b8z8pa.js +0 -2
  352. package/dist/chunk-c9nbavk0.js +0 -2
  353. package/dist/chunk-cg8ekwka.js +0 -2
  354. package/dist/chunk-ec9rgnt3.js +0 -2
  355. package/dist/chunk-efrn25h9.js +0 -2
  356. package/dist/chunk-emcefs0g.js +0 -2
  357. package/dist/chunk-f3924gdb.js +0 -2
  358. package/dist/chunk-f8zy35gz.js +0 -2
  359. package/dist/chunk-f98at4r5.js +0 -2
  360. package/dist/chunk-g242n3dt.js +0 -2
  361. package/dist/chunk-h1bhhqtq.js +0 -2
  362. package/dist/chunk-kc5k5e59.js +0 -3
  363. package/dist/chunk-kvc6ewkt.js +0 -4
  364. package/dist/chunk-kxmajv0m.js +0 -3
  365. package/dist/chunk-myrdfa3s.js +0 -2
  366. package/dist/chunk-nacjea1s.js +0 -2
  367. package/dist/chunk-py837qjk.js +0 -1
  368. package/dist/chunk-q7nn5xe5.js +0 -2
  369. package/dist/chunk-qjhkzdhm.js +0 -2
  370. package/dist/chunk-qxcnyvps.js +0 -2
  371. package/dist/chunk-r3qrftds.js +0 -2
  372. package/dist/chunk-r8rre2zb.js +0 -2
  373. package/dist/chunk-rbqn4725.js +0 -2
  374. package/dist/chunk-rekc1q3m.js +0 -2
  375. package/dist/chunk-rwkkqdcv.js +0 -2
  376. package/dist/chunk-rwnz06kr.js +0 -2
  377. package/dist/chunk-sxh0pd3y.js +0 -2
  378. package/dist/chunk-t0cr21e3.js +0 -2
  379. package/dist/chunk-vkrgdqnm.js +0 -2
  380. package/dist/chunk-wvdncbrt.js +0 -2
  381. package/dist/chunk-ye9tsdhn.js +0 -2
@@ -1,2 +1,2 @@
1
- import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function An({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
2
- export{An};
1
+ import{useCallback as S,useLayoutEffect as C,useRef as I,useState as h}from"react";import{jsx as b}from"react/jsx-runtime";var y=30,i=32,g=6;function nn({sessionRows:t,viewport:r,renderRow:u}){let o=I(null),[c,m]=h({start:0,end:g}),[d,R]=h(()=>new Set),[E,M]=h(null),v=S((e,n)=>{R((a)=>{if(a.has(e)===n)return a;let l=new Set(a);if(n)l.add(e);else l.delete(e);return l})},[]),f=S(()=>{if(o.current===null||r===null)return;let e=r.getBoundingClientRect().top+r.clientTop-o.current.getBoundingClientRect().top,n=Math.max(0,Math.min(t.length,Math.floor(e/i)-g)),a=Math.max(n,Math.min(t.length,Math.ceil((e+r.clientHeight)/i)+g));m((l)=>l.start===n&&l.end===a?l:{start:n,end:a})},[t.length,r]);C(()=>f()),C(()=>{if(r===null)return;let e,n=()=>{if(e!==void 0)return;e=requestAnimationFrame(()=>{e=void 0,f()})},a=new ResizeObserver(n);if(a.observe(r),r.firstElementChild)a.observe(r.firstElementChild);return r.addEventListener("scroll",n,{passive:!0}),()=>{if(a.disconnect(),r.removeEventListener("scroll",n),e!==void 0)cancelAnimationFrame(e)}},[f,r]);let s=new Set;for(let e=c.start;e<Math.min(c.end,t.length);e++)s.add(e);if(t.length>0)s.add(0),s.add(t.length-1);if(t.forEach((e,n)=>{if(d.has(e.sessionId))s.add(n);if(E===e.sessionId)for(let a=Math.max(0,n-1);a<=Math.min(t.length-1,n+1);a++)s.add(a)}),t.length===0)return null;return b("div",{ref:o,"data-slot":"virtual-session-rows","data-count":t.length,className:"relative w-full",style:{height:t.length*i-(i-y)},children:[...s].toSorted((e,n)=>e-n).map((e)=>{let n=t[e];return b(T,{sessionRow:n,index:e,retainCard:v,onFocus:M,renderRow:u},n.sessionId)})})}function T({sessionRow:t,index:r,retainCard:u,onFocus:o,renderRow:c}){let m=S((d)=>u(t.sessionId,d),[u,t.sessionId]);return b("div",{"data-slot":"virtual-session-row",className:"absolute inset-x-0",style:{top:r*i,height:y},onFocusCapture:()=>o(t.sessionId),onBlurCapture:(d)=>{if(!d.currentTarget.contains(d.relatedTarget))o(null)},children:c(t,m)})}
2
+ export{nn};
@@ -0,0 +1,2 @@
1
+ import{createStore as r}from"@alwith/api/client";var De=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function Fi(e){De.setState({...e,terminals:e.terminals??{}})}function Di(e){if(De.getState().sessionId===e)De.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function Hi(e,n,t){let i=De.getState();if(t.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(n,void 0,{align:"top"})}
2
+ export{De,Fi,Di,Hi};
@@ -1,2 +1,2 @@
1
- import{Ze}from"./chunk-7wk3d01c.js";import{l,Me}from"./chunk-t0cr21e3.js";import{v}from"./chunk-r9dt4bs3.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as c}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as a,Fragment as F}from"react/jsx-runtime";function ai(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let i=n.replaceAll("\\","/"),t=i.lastIndexOf("/");return t<=0?"/":i.slice(0,t)}function I(n){let i=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(i.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${i.replace(/\/$/,"")}/${t.join("/")}`}function le({path:n,renderHeader:i,description:t}){let e=l(),{t:r}=e,d=e.readFile,[u,f]=p(null),[w,k]=p(null),[M,N]=p(0);D(()=>{let s=!1;return f(null),k(null),(n===null||!d?Promise.resolve(t??""):d(n)).then((m)=>{if(!s)f(m)},(m)=>{if(!s)k(String(m))}),()=>{s=!0}},[n,t,M,d]);let x=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:a(P,{children:[o(z,{render:o(h,{variant:"ghost",size:"icon-sm","aria-label":r("plugins.card.moreActions")}),children:o(y,{})}),a(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void Me(e,e.openPath(n)),children:r("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void Me(e,e.revealPath(n)),children:r("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:u===null,onClick:()=>{if(u!==null)Me(e,e.copyText(u))},children:r("plugins.skills.document.copy")})]})]});return a(F,{children:[i?i(x):o("div",{className:"flex justify-end",children:x}),o(v,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":r("plugins.skills.document.content")},children:w?a("div",{role:"alert",className:"space-y-3",children:[a("p",{className:"text-destructive text-sm break-words",children:[r("plugins.skills.document.error"),": ",w]}),o(h,{variant:"outline",size:"sm",onClick:()=>N((s)=>s+1),children:r("plugins.loadError.retry")})]}):u===null?a("div",{role:"status","aria-label":r("plugins.skills.loading"),className:"space-y-3",children:[o(c,{className:"h-6 w-1/3"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-2/3"})]}):o(Ze,{text:ai(u),host:{theme:e.theme,copyLabel:r("plugins.copy"),openLink:(s)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(s)||n===null?s:I(`${C(n)}/${s}`))}})})]})}
2
- export{ai,le};
1
+ import{et}from"./chunk-pprt7ntb.js";import{l,Pe}from"./chunk-g2zznfan.js";import{f}from"./chunk-1k21j77z.js";import{MoreHorizontalIcon as y}from"lucide-react";import{useEffect as D,useState as p}from"react";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as P,DropdownMenuContent as b,DropdownMenuItem as g,DropdownMenuTrigger as z}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Skeleton as c}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as o,jsxs as a,Fragment as F}from"react/jsx-runtime";function En(n){return n.replace(/^\uFEFF?---\r?\n[\s\S]*?\r?\n(?:---|\.\.\.)[ \t]*(?:\r?\n|$)/,"")}function C(n){let i=n.replaceAll("\\","/"),t=i.lastIndexOf("/");return t<=0?"/":i.slice(0,t)}function I(n){let i=/^(\/\/[^/]+\/[^/]+|[A-Za-z]:\/|\/)/.exec(n)?.[0]??"",t=[];for(let e of n.slice(i.length).split("/")){if(!e||e===".")continue;if(e==="..")t.pop();else t.push(e)}return`${i.replace(/\/$/,"")}/${t.join("/")}`}function le({path:n,renderHeader:i,description:t}){let e=l(),{t:r}=e,d=e.readFile,[u,v]=p(null),[w,k]=p(null),[M,N]=p(0);D(()=>{let s=!1;return v(null),k(null),(n===null||!d?Promise.resolve(t??""):d(n)).then((m)=>{if(!s)v(m)},(m)=>{if(!s)k(String(m))}),()=>{s=!0}},[n,t,M,d]);let x=n===null||!e.openPath&&!e.revealPath&&!e.copyText?null:a(P,{children:[o(z,{render:o(h,{variant:"ghost",size:"icon-sm","aria-label":r("plugins.card.moreActions")}),children:o(y,{})}),a(b,{align:"end",children:[e.openPath&&o(g,{onClick:()=>void Pe(e,e.openPath(n)),children:r("plugins.skills.document.open")}),e.revealPath&&o(g,{onClick:()=>void Pe(e,e.revealPath(n)),children:r("plugins.skills.document.reveal")}),e.copyText&&o(g,{disabled:u===null,onClick:()=>{if(u!==null)Pe(e,e.copyText(u))},children:r("plugins.skills.document.copy")})]})]});return a(F,{children:[i?i(x):o("div",{className:"flex justify-end",children:x}),o(f,{className:"skill-document bg-muted/50 h-[45dvh] min-h-32 min-w-0 flex-none rounded-xl pe-0",viewportClassName:"overscroll-contain p-5 text-sm leading-6",viewportProps:{role:"region",tabIndex:0,"aria-label":r("plugins.skills.document.content")},children:w?a("div",{role:"alert",className:"space-y-3",children:[a("p",{className:"text-destructive text-sm break-words",children:[r("plugins.skills.document.error"),": ",w]}),o(h,{variant:"outline",size:"sm",onClick:()=>N((s)=>s+1),children:r("plugins.loadError.retry")})]}):u===null?a("div",{role:"status","aria-label":r("plugins.skills.loading"),className:"space-y-3",children:[o(c,{className:"h-6 w-1/3"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-full"}),o(c,{className:"h-4 w-2/3"})]}):o(et,{text:En(u),host:{theme:e.theme,copyLabel:r("plugins.copy"),openLink:(s)=>e.openLink(/^(?:[a-z][a-z\d+.-]*:|\/|#)/i.test(s)||n===null?s:I(`${C(n)}/${s}`))}})})]})}
2
+ export{En,le};
@@ -1,2 +1,2 @@
1
- import{A}from"./chunk-nxp1b8ny.js";import{ye}from"./chunk-5nc3dtyt.js";import{x,Y}from"./chunk-52p7kyam.js";import{I,V}from"./chunk-00eytt1z.js";import{re,Q}from"./chunk-vs02ry2r.js";import{cn as S}from"cn";import{BoxIcon as U,ChevronRightIcon as E,PlusIcon as z,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as L,DropdownMenuContent as j,DropdownMenuGroup as y,DropdownMenuItem as k,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as K,DropdownMenuSeparator as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Bn({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:O=n?"none":void 0,allowRemove:R=!0,submenu:g=!1,className:B,onOpenChange:T}){let{t}=x(),c=Q(),H=Y(),P=ye(),{collections:s,order:C}=re(),i=C.find((o)=>s[o].sessionIds.includes(l)),[F,G]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(G(o),P(o),T?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),H(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(L,{modal:!1,open:F,onOpenChange:(o,M)=>{if(!o&&w&&M.reason==="trigger-hover"){M.cancel();return}v(o)},children:[e(J,{disabled:r,"data-hover-background":O,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(N,{variant:"ghost",size:"icon-sm",className:B,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:S(i!==void 0&&"fill-current")})})}),a(j,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(y,{children:e(_,{value:i??null,children:C.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===I?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(U,{}),e("span",{className:"min-w-0 flex-1 truncate",children:V(s[o],t)})]},o))})}),e(q,{}),a(y,{children:[a(k,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(z,{}),t("collection.newCollection")]}),R&&i!==void 0&&a(k,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(W,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(N,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Wi({sessionId:l,allowRemove:f=!0}){let{t:n}=x();return e(Bn,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(A,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(E,{className:"rtl:rotate-180"})})})}
2
- export{Bn,Wi};
1
+ import{M}from"./chunk-667z0pac.js";import{he}from"./chunk-a1czzft3.js";import{x,J}from"./chunk-9tp0z23q.js";import{N,K}from"./chunk-fmjez7xp.js";import{de,X}from"./chunk-ddv00vjf.js";import{cn as S}from"cn";import{BoxIcon as U,ChevronRightIcon as E,PlusIcon as z,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as L,DropdownMenuContent as j,DropdownMenuGroup as k,DropdownMenuItem as O,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as q,DropdownMenuSeparator as Q,DropdownMenuTrigger as V}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as W}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function qn({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:R=n?"none":void 0,allowRemove:B=!0,submenu:g=!1,className:A,onOpenChange:T}){let{t}=x(),c=X(),H=J(),P=he(),{collections:s,order:C}=de(),i=C.find((o)=>s[o].sessionIds.includes(l)),[F,G]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(G(o),P(o),T?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),H(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(L,{modal:!1,open:F,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(V,{disabled:r,"data-hover-background":R,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(y,{variant:"ghost",size:"icon-sm",className:A,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:S(i!==void 0&&"fill-current")})})}),a(j,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(k,{children:e(_,{value:i??null,children:C.map((o)=>a(q,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===N?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(U,{}),e("span",{className:"min-w-0 flex-1 truncate",children:K(s[o],t)})]},o))})}),e(Q,{}),a(k,{children:[a(O,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(z,{}),t("collection.newCollection")]}),B&&i!==void 0&&a(O,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(W,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(y,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Ji({sessionId:l,allowRemove:f=!0}){let{t:n}=x();return e(qn,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(M,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(E,{className:"rtl:rotate-180"})})})}
2
+ export{qn,Ji};
@@ -1,2 +1,2 @@
1
- import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function ee({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
2
- export{ee};
1
+ import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function ie({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
2
+ export{ie};
@@ -1,2 +1,2 @@
1
- import{Ke}from"./chunk-x2yc5748.js";import{te,Zo}from"./chunk-4s6gx750.js";import{t}from"./chunk-ye9tsdhn.js";import{Kbd as d}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as b,TooltipContent as f,TooltipTrigger as h}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as I}from"cn";import{SquareIcon as T}from"lucide-react";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Ln({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=Ke(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(te,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(T,{className:"size-3 fill-current"})}),o("div",{className:I(l&&"cursor-not-allowed"),children:n(b,{children:[o(h,{render:o(Zo,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(f,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(d,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
2
- export{Ln};
1
+ import{We}from"./chunk-rbv1scqm.js";import{ne,Po}from"./chunk-j322kgxf.js";import{t}from"./chunk-jm6zxy9h.js";import{Kbd as d}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as b,TooltipContent as f,TooltipTrigger as h}from"@nyssance/shadcn/vega/components/ui/tooltip";import{cn as I}from"cn";import{SquareIcon as T}from"lucide-react";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function xo({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=We(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(ne,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(T,{className:"size-3 fill-current"})}),o("div",{className:I(l&&"cursor-not-allowed"),children:n(b,{children:[o(h,{render:o(Po,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(f,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(d,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
2
+ export{xo};
@@ -0,0 +1,4 @@
1
+ import{yi}from"./chunk-vt6cyes7.js";import{t}from"./chunk-jm6zxy9h.js";import{Zo,Qo}from"./chunk-jgd6dcgy.js";import{Z}from"./chunk-x3y5htkt.js";import{oe}from"./chunk-f1gj3yzt.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var Wo=p(function({item:s,messageTime:c}){let l=t(),o=Qo(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
2
+ ${e.text}`).join(`
3
+ `):oe(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=Zo(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(Z,{block:e},`${s.id}:${n}`))}),r(yi,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
4
+ export{Wo};
@@ -1,2 +1,2 @@
1
- import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as d,CardContent as c,CardDescription as s,CardFooter as p,CardHeader as C,CardTitle as m}from"@nyssance/shadcn/vega/components/ui/card";import{ExternalLinkIcon as v}from"lucide-react";import{jsx as a,jsxs as e}from"react/jsx-runtime";function bi({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(d,{size:"sm",children:[e(C,{children:[a(s,{children:i("approval.needed")}),a(m,{children:r})]}),a(c,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(v,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(p,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
2
- export{bi};
1
+ import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{Card as d,CardContent as c,CardDescription as s,CardFooter as p,CardHeader as C,CardTitle as m}from"@nyssance/shadcn/vega/components/ui/card";import{ExternalLinkIcon as v}from"lucide-react";import{jsx as a,jsxs as e}from"react/jsx-runtime";function Ho({message:r,url:t,t:i,onOpen:l,onRespond:o}){return e(d,{size:"sm",children:[e(C,{children:[a(s,{children:i("approval.needed")}),a(m,{children:r})]}),a(c,{children:e("div",{className:"flex flex-col gap-3",children:[e(n,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>void l(t),children:[a(v,{"data-icon":"inline-start"}),i("approval.openLink")]}),a("p",{className:"text-muted-foreground text-sm",children:i("approval.waitingForLink")})]})}),e(p,{className:"flex flex-wrap gap-2",children:[a(n,{variant:"outline",size:"sm",onClick:()=>o("decline"),children:i("actions.decline")}),a(n,{variant:"ghost",size:"sm",onClick:()=>o("cancel"),children:i("actions.cancel")})]})]})}
2
+ export{Ho};
@@ -1,2 +1,2 @@
1
- function _o(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
2
- export{_o};
1
+ function vi(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"speaking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"working",ownerKey:n?.key}}
2
+ export{vi};
@@ -0,0 +1,2 @@
1
+ import{k,Tn,Pi,Zt,Ti,In,Ii}from"./chunk-pzjag1mt.js";import{t,ke,Q,n}from"./chunk-jm6zxy9h.js";import{Ce}from"./chunk-n2e3a7n4.js";import{createStore as M}from"@alwith/api/client";import{isText as A,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var v=M({entries:{}});function p(r,e){v.setState((s)=>({entries:{...s.entries,[r]:e}}))}function x(r,e){let s=b(e),a=r.items.findLast((i)=>b(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&b(a)===s}function O(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...In(s._meta),...s.content.filter(A).flatMap((i)=>In(i._meta))])if(a.questionItemId===e)return a.answer}return}function R({sessionId:r,item:e,question:s,index:a}){let i=ke(),{t:l}=t(),m=Tn(e.id,a),c=JSON.stringify([r,m]),u=Q(v,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),h=n((o)=>o.connection==="ready"),f=u?.draft??Pi(s),q=d===void 0?u?.accepted:O(d,m)??u?.accepted,D=d!==void 0&&x(d,e),C=!d?.subagent&&h&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!D?"closed":!C?"unavailable":"pending",E=async()=>{if(v.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=Zt(s,f);if(!S.trim())return;let w={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:Ti(w),_meta:{codex:{questionReply:w}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(Ii,{question:s,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{E()}})}function Pn({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=k(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,e))return y(Ce,{content:e.content.some((i)=>!A(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(R,{sessionId:r,item:e,question:i,index:l},Tn(e.id,l)))})}
2
+ export{Pn};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-f3924gdb.js";import{useState as d}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as v,DialogContent as C,DialogDescription as k,DialogFooter as I,DialogHeader as K,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Empty as F,EmptyDescription as b,EmptyHeader as T,EmptyTitle as x}from"@nyssance/shadcn/vega/components/ui/empty";import{Field as w,FieldGroup as A,FieldLabel as L}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Spinner as H}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function P(r,a){switch(r.methodId){case"chat-gpt":return a("connection.signIn");case"chat-gpt-device-code":return a("connection.signInDevice");case"api-key":return a("connection.signInApiKey");default:return r.name}}function $t({methods:r,signIn:a}){let{host:g}=e(),{t:o}=g,[p,u]=d(null),[f,l]=d(!1),[c,h]=d(""),y=async(n,s={})=>{u(n);try{await a(n,s)}catch(D){g.reportError?.(D)}finally{u(null)}};return i(F,{children:[i(T,{children:[t(x,{children:o("connection.signIn")}),t(b,{children:o("connection.signInHint")})]}),t("div",{className:"flex flex-wrap justify-center gap-2",children:r.map((n,s)=>i(m,{variant:s===0?"default":"outline",disabled:p!==null,onClick:()=>n.methodId==="api-key"?l(!0):void y(n.methodId),children:[p===n.methodId&&t(H,{"data-icon":"inline-start"}),P(n,o)]},n.methodId))}),t(v,{open:f,onOpenChange:l,children:i(C,{children:[i(K,{children:[t(E,{children:o("connection.apiKeyTitle")}),t(k,{children:o("connection.signInApiKey")})]}),t(A,{children:i(w,{children:[t(L,{htmlFor:"codex-api-key",children:o("connection.apiKeyTitle")}),t(B,{id:"codex-api-key",type:"password",autoComplete:"off",placeholder:o("connection.apiKeyPlaceholder"),value:c,onChange:(n)=>h(n.target.value)})]})}),i(I,{children:[t(m,{variant:"outline",onClick:()=>l(!1),children:o("actions.cancel")}),t(m,{disabled:c.trim().length===0||p!==null,onClick:()=>{l(!1),y("api-key",{"api-key":{apiKey:c.trim()}})},children:o("actions.submit")})]})]})})]})}
2
- export{$t};
1
+ import{e}from"./chunk-j0m35s05.js";import{useState as d}from"react";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as v,DialogContent as C,DialogDescription as k,DialogFooter as I,DialogHeader as K,DialogTitle as E}from"@nyssance/shadcn/vega/components/ui/dialog";import{Empty as F,EmptyDescription as b,EmptyHeader as T,EmptyTitle as x}from"@nyssance/shadcn/vega/components/ui/empty";import{Field as w,FieldGroup as A,FieldLabel as L}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Spinner as H}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as i}from"react/jsx-runtime";function P(r,a){switch(r.methodId){case"chat-gpt":return a("connection.signIn");case"chat-gpt-device-code":return a("connection.signInDevice");case"api-key":return a("connection.signInApiKey");default:return r.name}}function ft({methods:r,signIn:a}){let{host:g}=e(),{t:o}=g,[p,u]=d(null),[f,l]=d(!1),[c,h]=d(""),y=async(n,s={})=>{u(n);try{await a(n,s)}catch(D){g.reportError?.(D)}finally{u(null)}};return i(F,{children:[i(T,{children:[t(x,{children:o("connection.signIn")}),t(b,{children:o("connection.signInHint")})]}),t("div",{className:"flex flex-wrap justify-center gap-2",children:r.map((n,s)=>i(m,{variant:s===0?"default":"outline",disabled:p!==null,onClick:()=>n.methodId==="api-key"?l(!0):void y(n.methodId),children:[p===n.methodId&&t(H,{"data-icon":"inline-start"}),P(n,o)]},n.methodId))}),t(v,{open:f,onOpenChange:l,children:i(C,{children:[i(K,{children:[t(E,{children:o("connection.apiKeyTitle")}),t(k,{children:o("connection.signInApiKey")})]}),t(A,{children:i(w,{children:[t(L,{htmlFor:"codex-api-key",children:o("connection.apiKeyTitle")}),t(B,{id:"codex-api-key",type:"password",autoComplete:"off",placeholder:o("connection.apiKeyPlaceholder"),value:c,onChange:(n)=>h(n.target.value)})]})}),i(I,{children:[t(m,{variant:"outline",onClick:()=>l(!1),children:o("actions.cancel")}),t(m,{disabled:c.trim().length===0||p!==null,onClick:()=>{l(!1),y("api-key",{"api-key":{apiKey:c.trim()}})},children:o("actions.submit")})]})]})})]})}
2
+ export{ft};
@@ -1,2 +1,2 @@
1
- var we="chrome-hover hover:bg-foreground/8 data-[active=true]:bg-foreground/5",d="chrome-hover hover:bg-foreground/8 data-active:bg-foreground/5";
2
- export{we,d};
1
+ var ye="chrome-hover hover:bg-foreground/8 data-[active=true]:bg-foreground/5",d="chrome-hover hover:bg-foreground/8 data-active:bg-foreground/5";
2
+ export{ye,d};
@@ -1,4 +1,4 @@
1
- var di=`<svg xmlns="http://www.w3.org/2000/svg">
1
+ var Rn=`<svg xmlns="http://www.w3.org/2000/svg">
2
2
  <defs>
3
3
  <linearGradient id="plugin-agent-mode-paint0_linear_1_1034" x1="30.0398" y1="40.0728" x2="11.3112" y2="-1.39757" gradientUnits="userSpaceOnUse">
4
4
  <stop stop-color="#2BBFFF"/>
@@ -1286,4 +1286,4 @@ var di=`<svg xmlns="http://www.w3.org/2000/svg">
1286
1286
  </symbol>
1287
1287
  </svg>
1288
1288
  `;
1289
- export{di};
1289
+ export{Rn};
@@ -1,2 +1,2 @@
1
- import{_}from"./chunk-x2yc5748.js";import{e}from"./chunk-f3924gdb.js";import{He}from"./chunk-g242n3dt.js";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Fn({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=_(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>He(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
- export{Fn};
1
+ import{T}from"./chunk-rbv1scqm.js";import{e}from"./chunk-j0m35s05.js";import{Ke}from"./chunk-99fh3f1v.js";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Mo({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=T(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>Ke(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
+ export{Mo};
@@ -0,0 +1,2 @@
1
+ import{a,U,Bt}from"./chunk-3bsk6xcf.js";var Ao=5000;function Ee(t){return"pastedText"in t}function Hr(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Ke(t,e,o){let n=(r,s)=>{for(let[i,x]of a){if(!x.attachments.some((p)=>p.id===e.id))continue;U(i,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Hr(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!a.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),Bt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function Ot(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Ao)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};U(e,(i)=>[...i,s]),Ke(e,s,n)}
2
+ export{Ao,Ee,Hr,Ke,Ot};
@@ -1,3 +1,3 @@
1
- import{vi}from"./chunk-42hkbpey.js";import{yi}from"./chunk-9sq2etjk.js";import{bi}from"./chunk-k7k6qsqh.js";import{Je}from"./chunk-xf36kt74.js";import{n}from"./chunk-ye9tsdhn.js";import{e}from"./chunk-f3924gdb.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function Ae(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let o=t._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(t){let o=t.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let o of t.content??[])if(g(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((o)=>h(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
2
- `)}function T({subject:t,requestTitle:o}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Je,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,o){let{host:s,client:r}=e();return(l)=>{try{if(o)o(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(vi,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:o,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function Xe({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=n((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(yi,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:o,t:r.t,onRespond:l})}function me({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:o,onRespond:s});if(Ae(t))return a(Xe,{action:t,total:o??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(bi,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
3
- export{Ae,Xe,me};
1
+ import{Oo}from"./chunk-kmdag4vy.js";import{Bo}from"./chunk-3e6wcamp.js";import{Ho}from"./chunk-7z4gtfkd.js";import{Xe}from"./chunk-rjw63t34.js";import{n}from"./chunk-jm6zxy9h.js";import{e}from"./chunk-j0m35s05.js";import{isContentEntry as f,isDiffEntry as g,isFormElicitation as x,isText as h,isToolCallSubject as b,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as a,jsxs as m}from"react/jsx-runtime";function Le(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let o=t._meta?.codex;if(typeof o!=="object"||o===null)return null;let s=o.description;return typeof s==="string"?s:null}function A(t){let o=t.rawInput;if(typeof o!=="object"||o===null)return null;let s=o.command;if(typeof s==="string")return s;if(Array.isArray(s))return s.map(String).join(" ");return null}function v(t){for(let o of t.content??[])if(g(o)&&o.patch&&o.patch.text.length>0)return o.patch.text;return null}function R(t){return(t.content??[]).filter(f).map((o)=>h(o.content)?o.content.text:"").filter((o)=>o.length>0).join(`
2
+ `)}function T({subject:t,requestTitle:o}){let{host:s}=e();if(!b(t))return null;let r=t.toolCall,l=A(r),i=v(r),c=R(r),p=s.toolTitle?.(r)??r.title;return m("div",{className:"flex flex-col gap-2",children:[p&&p!==o&&l===null&&a("div",{className:"text-sm font-medium",children:p}),l!==null&&m("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[a("span",{className:"text-muted-foreground select-none",children:"$ "}),l]}),i!==null&&a("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:a(Xe,{patch:i,theme:s.theme})}),i===null&&l===null&&c.length>0&&a("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&a("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((u)=>a("li",{className:"truncate font-mono",children:u.path},`${u.path}:${u.line??""}`))})]})}function d(t,o){let{host:s,client:r}=e();return(l)=>{try{if(o)o(t.id,l);else r.respond(t.id,l)}catch(i){if(s.reportError)s.reportError(i);else console.error(i)}}}function C({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=t.params,c=r.permissionTitle?.(i)??i.title;return m(Oo,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:o,options:i.options.map((p)=>({...p,description:y(p)??void 0})),onRespond:(p)=>l({outcome:p===null?{outcome:"cancelled"}:{outcome:"selected",optionId:p}}),children:[i.description&&a("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&a(T,{subject:i.subject,requestTitle:c})]})}function Ye({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s),i=n((c)=>t.sessionId===null?void 0:c.sessions[t.sessionId]);return a(Bo,{requestId:t.id,schema:t.params.requestedSchema,message:i?.subagent?`${i.title??r.t("subagents.untitled")}: ${t.params.message}`:t.params.message,total:o,t:r.t,onRespond:l})}function be({action:t,total:o,onRespond:s}){let{host:r}=e(),l=d(t,s);if(t.kind==="permission")return a(C,{action:t,total:o,onRespond:s});if(Le(t))return a(Ye,{action:t,total:o??1,onRespond:s});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return a(Ho,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>l(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
3
+ export{Le,Ye,be};
@@ -0,0 +1,2 @@
1
+ import{l,i}from"./chunk-g2zznfan.js";import{f}from"./chunk-1k21j77z.js";import{I}from"./chunk-wvry7t79.js";import{le}from"./chunk-7170hbdr.js";import{E,ae,se}from"./chunk-tv0fwt2g.js";import{ExternalLinkIcon as W,PlusIcon as _}from"lucide-react";import{useEffect as q,useState as y}from"react";import{Badge as O}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogContent as G,DialogDescription as J,DialogHeader as K,DialogTitle as Q}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as n,Fragment as T}from"react/jsx-runtime";function lt({entry:r,onBack:p}){let u=l(),{t}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===r.plugin.id)),x=i((a)=>a.busyIds[r.plugin.id]),H=i((a)=>a.install),V=i((a)=>a.uninstall),j=i((a)=>a.setPluginEnabled),[o,B]=y(null),[D,U]=y(null),[R,M]=y(0),[c,z]=y(null);q(()=>{let a=!0;return U(null),B(null),P(r).then((g)=>{if(a)B(g)},(g)=>{if(a)U(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[r,P,R]);let d=o?.summary??r.plugin,m=C?.plugin??d,s=d.interface,b=s?.displayName??d.name,k=m.availability!=="AVAILABLE"||m.installPolicy==="NOT_AVAILABLE",A=s?.longDescription??o?.description??s?.shortDescription,L=[...u.assetUrl?s?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...s?.screenshotUrls??[]];return n("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(se,{children:n("header",{className:"flex min-w-0 flex-col gap-4",children:[n("nav",{"aria-label":t("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(v,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:t("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:b})]}),n("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[n("div",{className:"flex min-w-0 items-center gap-3",children:[e(I,{name:d.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:b})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?n(T,{children:[e(X,{checked:m.enabled,disabled:!!x||k,"aria-label":t(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:b}),onCheckedChange:(a)=>void j(m,a)}),e(v,{variant:"outline",size:"sm",disabled:!!x,onClick:()=>void V(m),children:x?e(S,{}):t("plugins.detail.uninstall")})]}):e(v,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":t(k?"plugins.detail.unavailable":"plugins.detail.install"),title:t(k?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!x||k,onClick:()=>void H({...r,plugin:d}).catch(()=>{}),children:x?e(S,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(f,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${E} pt-2`,children:[s?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:s.shortDescription}),d.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(d.keywords)].map((a)=>e(O,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),n("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[s?.developerName&&e(N,{label:t("plugins.detail.developer"),children:s.developerName}),s?.category&&e(N,{label:t("plugins.detail.category"),children:s.category}),(m.localVersion??m.version)&&e(N,{label:t("plugins.detail.version"),children:m.localVersion??m.version}),e(N,{label:t("plugins.headings.marketplace"),children:r.marketplace.interface?.displayName??r.marketplace.name}),s?.websiteUrl&&e(N,{label:t("plugins.detail.website"),children:e(w,{url:s.websiteUrl,label:t("plugins.detail.website")})})]}),!o&&!D&&n("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),t("plugins.detail.loading")]}),D&&n("div",{role:"alert",className:"mt-8 space-y-2",children:[n("p",{className:"text-destructive text-sm",children:[t("plugins.detail.errorTitle"),": ",D]}),e(v,{variant:"outline",size:"sm",className:"h-9",onClick:()=>M((a)=>a+1),children:t("plugins.loadError.retry")})]}),A&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:A}),L.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(L)].map((a)=>e("img",{src:a,alt:b,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),s&&s.capabilities.length>0&&e(h,{label:t("plugins.detail.capabilities"),count:s.capabilities.length,children:s.capabilities.map((a)=>e(O,{variant:"secondary",className:"me-2",children:a},a))}),o&&o.mcpServers.length>0&&e(h,{label:t("plugins.detail.mcpServers"),count:o.mcpServers.length,children:o.mcpServers.map((a)=>n("div",{className:"flex items-center gap-3 py-1",children:[e(I,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),o&&o.skills.length>0&&e(h,{label:t("plugins.detail.skills"),count:o.skills.length,children:o.skills.map((a)=>n(v,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(I,{name:a.name,className:"size-8"}),n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),o&&o.apps.length>0&&e(h,{label:t("plugins.detail.apps"),count:o.apps.length,children:o.apps.map((a)=>n("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:t("plugins.installModal.connect")})]},a.id))}),o&&o.hooks.length>0&&e(h,{label:t("plugins.detail.hooks"),count:o.hooks.length,children:o.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(s?.privacyPolicyUrl||s?.termsOfServiceUrl)&&n("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[s.privacyPolicyUrl&&e(w,{url:s.privacyPolicyUrl,label:t("plugins.detail.privacyPolicy")}),s.termsOfServiceUrl&&e(w,{url:s.termsOfServiceUrl,label:t("plugins.detail.termsOfService")})]})]})}),e(F,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(G,{className:ae,children:c&&n(T,{children:[e("div",{className:"shrink-0 pr-8",children:e(I,{name:c.name,className:"size-10"})}),n("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[n(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(le,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function N({label:r,children:p}){return n("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:r}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function h({label:r,count:p,children:u}){return n("section",{className:"mt-8",children:[n("h2",{className:"text-base font-medium",children:[r," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:r,label:p}){let{openLink:u}=l();if(!/^https?:\/\//i.test(r))return null;return n(v,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:r,onClick:()=>u(r),children:[p,e(W,{className:"size-3.5"})]})}
2
+ export{lt};
@@ -0,0 +1,2 @@
1
+ import{io}from"./chunk-1mn2t6ga.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function or({host:o,children:t}){return s(n,{value:o,children:t})}function x(){let o=i(n),e={...io(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function Zn(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function J(){let o=x();return(t)=>Zn(o,t)}function Qn(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
2
+ export{or,x,Zn,J,Qn};
@@ -0,0 +1,2 @@
1
+ import{ye,d}from"./chunk-92xxp77d.js";import{P}from"./chunk-42atrgm1.js";import{A}from"./chunk-2f9vjmxz.js";import{C}from"./chunk-heyqzkxq.js";import{je,Me,$e}from"./chunk-t7drk9ja.js";import{PreviewCard as w}from"@base-ui/react/preview-card";import{cn as c}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as T,useContext as L,useLayoutEffect as D,useState as I}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as u,Fragment as j}from"react/jsx-runtime";function b(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:c("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:c("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function _({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:c("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function p({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:c("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 W({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:h,headerChildren:m,wrapHeader:f,onHeaderClick:y,children:R}){let S=()=>{y?.(),t(!o)},g=c(je,"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=u(j,{children:[r!=null&&e(_,{children:r}),m??e(P,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e($e,{content:s!==void 0?e(Me,{className:c("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:h})})]}),H=m==null?u("div",{"data-active":l?"":void 0,title:n,className:c(g,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:g,children:k});return u("div",{className:"text-[#1a1c1f] dark:text-white",children:[f===void 0?H:f(H),o&&e(b,{className:"mt-0.5",children:R})]})}var E=T(()=>{}),G=T(()=>{});function Mt(){return L(G)}function he(){return L(E)}function ve({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:h,preview:m,listeningPorts:f,onOpenPort:y,accessory:R,meta:S,hint:g,actions:k,className:H,...v}){let O=u("div",{"data-slot":"navigation-session-item","data-active":o,className:c(je,ye,"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]",(m||f!=null&&f.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",H),...v,children:[e(_,{children:t!=null?e(A,{state:t,title:n??void 0}):i}),u("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(P,{className:c("leading-none",t==="done"&&"font-semibold"),children:s}),h!=null&&e(P,{className:"text-muted-foreground text-xs",children:h}),m&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:m}),f!=null&&f.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:f.map((x)=>y?u("button",{type:"button",className:"underline",onPointerDown:(N)=>N.stopPropagation(),onKeyDown:(N)=>N.stopPropagation(),onClick:(N)=>{N.stopPropagation(),y(x)},children:[":",x]},x):u("span",{children:[":",x]},x))})]}),u("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e($e,{content:R!=null?e(Me,{children:R}):S??e(Me,{}),actions:k}),g!=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:g})]})]});if(a==null)return O;return e(M,{row:O,onOpenChange:l,children:a})}function M({row:o,children:t,onOpenChange:n}){let[r,i]=I(!1),[s,a]=I(!1),l=r||s;return D(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(E.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(q,{open:l,onOpenChange:i,trigger:o,children:t})})})}function q({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return C(o),u(w.Root,{open:o,onOpenChange:t,children:[e(w.Trigger,{render:n,delay:700,closeDelay:100}),e(w.Portal,{children:e(w.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(w.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{b,_,p,W,Mt,he,ve};
@@ -0,0 +1,3 @@
1
+ import{hn,vn}from"./chunk-hdw3mwmb.js";import{k}from"./chunk-pzjag1mt.js";import{Nn}from"./chunk-k7ye738q.js";import{t}from"./chunk-jm6zxy9h.js";import{bi,oe,nt,wi}from"./chunk-f1gj3yzt.js";import{xn}from"./chunk-3vkkmyjm.js";import{Ce}from"./chunk-n2e3a7n4.js";import{Pn}from"./chunk-8dbx6g7q.js";import{ui}from"./chunk-ypk1gwzc.js";import{Mi}from"./chunk-bmey8et5.js";import{hi}from"./chunk-azfmr99x.js";import{Sn,_n}from"./chunk-ececn091.js";import{ot}from"./chunk-gha517v4.js";import{codexMessageError as z,codexTurnError as J,isContentEntry as re,isEmbeddedResource as q,isImage as X,isResourceLink as ae,isText as me,nativeTurnId as le}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as de,SparklesIcon as ce}from"lucide-react";import{Fragment as ge,memo as ue,useEffect as pe,useState as fe}from"react";import{jsx as s,jsxs as m,Fragment as E}from"react/jsx-runtime";function U(i){if(X(i))return`${i.mimeType.toLowerCase()}:${i.data}`;if(q(i)&&"blob"in i.resource&&i.resource.mimeType?.toLowerCase().startsWith("image/"))return`${i.resource.mimeType.toLowerCase()}:${i.resource.blob}`;return null}function ye({item:i}){let{t:n}=t(),l=i.status==="in_progress",[o,c]=fe(()=>Date.now()-i.at>=1e4);return pe(()=>{if(!l)return;let a=Math.max(0,i.at+1e4-Date.now());if(c(a===0),a===0)return;let f=setTimeout(()=>c(!0),a);return()=>clearTimeout(f)},[i.id,i.at,l]),m("div",{className:"codex-context-compaction",children:[s(ce,{"aria-hidden":"true"}),s("span",{children:i.status==="completed"?n("stream.codex.contextCompacted"):i.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:i,entry:n,terminals:l,streaming:o,streamingThoughtId:c}){let{t:a}=t();switch(n.kind){case"activity":return s(xn,{sessionId:i,items:n.items,terminals:l,streamingThoughtId:c});case"text":return k(n.item._meta).length>0?s(Pn,{sessionId:i,item:n.item}):s(Ce,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(Mi,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(Sn,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return s(ye,{item:n.item})}}function he({sessionId:i,turn:n,terminals:l,active:o,blocked:c=!1,continued:a=!1,edits:f=n.edits,activityItems:M=n.items,workStartedAt:Y=n.startedAt,isLast:W,error:y,interrupted:F,retry:L,retrying:u,answerActions:K,footer:Z}){let{t:d}=t(),C=n.errors.map((e)=>{let r=z(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let v=L?.turnId===le(e)?L:void 0;return s(_n,{error:r,retry:v},`${e.id}:${v?.delaySeconds??"manual"}`)});if(W&&y!==null&&!n.errors.some((e)=>{let r=z(e);return r!==null&&r.stopReason===y.stopReason&&J(r).message===J(y).message}))C.push(s(_n,{error:y},"current-run-error"));let h=C.length>0?s("div",{className:"codex-turn-errors",children:C}):null,A=n.items.filter(Nn);if(A.length>0&&A.length===n.items.length)return m(E,{children:[s(xn,{sessionId:i,items:A,terminals:l,streamingThoughtId:null}),h]});let x=n.work,T=x.length>0&&x.every((e)=>e.kind==="compaction");if(bi(n)||T&&n.final.length===0)return m(E,{children:[s("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),h]});let O=nt(n),P=n.final.filter((e)=>k(e._meta).length===0).map(oe).join(`
2
+ `),w=o?null:ot(n,"assistant"),D=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),G=new Set(n.final.flatMap((e)=>e.content.map(U).filter((r)=>r!==null))),b=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(re).flatMap((r,v)=>{let g=r.content,se=e.name==="image_generation"&&X(g),ie=e.toolKind!=="read"&&e.toolKind!=="search"&&(ae(g)||q(g)&&("blob"in g.resource));if(!se&&!ie)return[];let _=U(g);if(_!==null){if(G.has(_))return[];G.add(_)}return[{key:`${e.id}:${v}`,block:g}]})}),R=n.final.some((e)=>k(e._meta).length===0&&e.content.some((r)=>!me(r)||r.text.trim().length>0)),ee=D.length>0||b.length>0||T||R||n.final.some((e)=>k(e._meta).length>0),I=n.items.findIndex((e)=>n.final.includes(e)),S=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),B=x.filter((e)=>I===-1||S(e)<I),te=x.filter((e)=>I!==-1&&S(e)>I),ne=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...te.map((e)=>({kind:"work",entry:e,index:S(e)}))].toSorted((e,r)=>e.index-r.index),H=!o&&!a&&(P.trim().length>0?s(hn,{text:P,isMostRecentTurn:W,time:w,afterCopy:K}):m("div",{className:"flex items-center gap-0.5",children:[K,w&&s("span",{className:"codex-user-time ms-1",title:w.full,children:w.short})]})),p=hi({...n,items:M},{running:o,blocked:c,retrying:u!==void 0}),Q=p.kind==="reasoning"?p.ownerKey??null:null,V=p.kind==="thinking",j=wi({...n,items:M});return m(E,{children:[s(vn,{stateKey:JSON.stringify([i,n.replayed?"history":"live",n.key]),active:o&&!R,defaultExpanded:o&&!R||!n.replayed&&(F||O),...j,startedAt:j.startedAt??Y,loading:(V||p.kind==="working")&&n.work.length===0,loadingLabel:p.kind==="working"?d("stream.codex.working"):void 0,work:a||T?[]:B.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:o,streamingThoughtId:Q},e.key)),answer:ee||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||T)&&B.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),ne.map((e)=>{if(e.kind==="work")return s(N,{sessionId:i,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:Q},e.entry.key);let r=e.item;return m(ge,{children:[k(r._meta).length>0?s(Pn,{sessionId:i,item:r}):s(Ce,{content:r.content,messageId:r.id,streaming:o}),r===n.final.at(-1)&&H]},r.id)}),D.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":d(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&s(de,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),b.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:b.map((e)=>s(Ce,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&H]}):null,footer:m(E,{children:[V&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:d("message.thinking")})}),Z,f.length>0&&!o&&!a&&s(ui,{items:f}),F&&!O&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&h]})}),o&&u!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:u.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(u.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():u.message}),o&&h]})}var ci=ue(he);
3
+ export{ci};
@@ -1,2 +1,2 @@
1
- var f={ar:{},de:{},en:{defaultFavorites:"Favorites",addTo:"Favorite",addToNamedCollection:"Save to {{name}}",collectionName:"Collection name",clearCollection:"Clear collection",deleteCollection:"Delete collection",confirmCollectionChange:"Remove the records in “{{name}}”? Conversation content and records in other collections will be kept.",favorite:"Add to default collection",removeFromAll:"Remove from all collections",newCollection:"Create Collection",defaultName:"New collection",closeChat:"Close chat",remove:"Remove",addToCollection:"Favorite",moveTo:"Move to",removeFromGroup:"Remove from group",openSideBySide:"Open side by side",newChat:"New chat",defaultChatTitle:"New chat",title:"Collections",confirm:"Confirm",cancel:"Cancel",emoji:"Emoji",more:"More actions for {{name}}",unavailable:"Chat unavailable",retry:"Retry",rename:"Rename"},es:{},fr:{},hi:{},id:{},it:{},ja:{},ko:{},"pt-BR":{},ru:{},"zh-CN":{defaultFavorites:"收藏夹",addTo:"收藏",addToNamedCollection:"收藏到{{name}}",collectionName:"集合名称",clearCollection:"清空集合",deleteCollection:"删除集合",confirmCollectionChange:"移除“{{name}}”中的记录?对话内容和其他集合中的记录将保留。",favorite:"添加到默认集合",removeFromAll:"从所有集合移除",newCollection:"创建集合",defaultName:"新集合",closeChat:"关闭对话",remove:"移除",addToCollection:"收藏",moveTo:"移动到",removeFromGroup:"移出分组",openSideBySide:"并排打开",newChat:"新对话",defaultChatTitle:"新对话",title:"收藏",confirm:"确认",cancel:"取消",emoji:"表情",more:"{{name}}的更多操作",unavailable:"会话不可用",retry:"重试",rename:"重命名"}};
2
- export{f};
1
+ var v={ar:{},de:{},en:{defaultFavorites:"Favorites",addTo:"Favorite",addToNamedCollection:"Save to {{name}}",collectionName:"Collection name",clearCollection:"Clear collection",deleteCollection:"Delete collection",confirmCollectionChange:"Remove the records in “{{name}}”? Conversation content and records in other collections will be kept.",favorite:"Add to default collection",removeFromAll:"Remove from all collections",newCollection:"Create Collection",defaultName:"New collection",closeChat:"Close chat",remove:"Remove",addToCollection:"Favorite",moveTo:"Move to",removeFromGroup:"Remove from group",openSideBySide:"Open side by side",newChat:"New chat",defaultChatTitle:"New chat",title:"Collections",confirm:"Confirm",cancel:"Cancel",emoji:"Emoji",more:"More actions for {{name}}",unavailable:"Chat unavailable",retry:"Retry",rename:"Rename"},es:{},fr:{},hi:{},id:{},it:{},ja:{},ko:{},"pt-BR":{},ru:{},"zh-CN":{defaultFavorites:"收藏夹",addTo:"收藏",addToNamedCollection:"收藏到{{name}}",collectionName:"集合名称",clearCollection:"清空集合",deleteCollection:"删除集合",confirmCollectionChange:"移除“{{name}}”中的记录?对话内容和其他集合中的记录将保留。",favorite:"添加到默认集合",removeFromAll:"从所有集合移除",newCollection:"创建集合",defaultName:"新集合",closeChat:"关闭对话",remove:"移除",addToCollection:"收藏",moveTo:"移动到",removeFromGroup:"移出分组",openSideBySide:"并排打开",newChat:"新对话",defaultChatTitle:"新对话",title:"收藏",confirm:"确认",cancel:"取消",emoji:"表情",more:"{{name}}的更多操作",unavailable:"会话不可用",retry:"重试",rename:"重命名"}};
2
+ export{v};
@@ -1,2 +1,2 @@
1
- import{qt}from"./chunk-2ce8gd89.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function _r({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5 ps-1","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(qt,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
2
- export{_r};
1
+ import{Tt}from"./chunk-5ap6fvrp.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function ir({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5 ps-1","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(Tt,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
2
+ export{ir};
@@ -1,2 +1,2 @@
1
- async function Yo(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
2
- export{Yo};
1
+ async function No(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
2
+ export{No};
@@ -1,2 +1,2 @@
1
- import{Gt,zt,Vt,jt}from"./chunk-cbwya2ss.js";var a=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DeepSeek-Flash"}],catalog:"alwith/models.json",config:{web_search:"disabled"}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",models:[{id:"deepseek-flash",label:"DeepSeek-Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{web_search:"disabled"}},{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:"DeepSeek-Flash"}};var d=a,g={deepseek:Gt,openrouter:Vt,qwen:jt,xai:zt};function m(e){let i=g[e];if(!i)throw Error(`Provider ${e} has no logo`);return i}var z=d.filter((e)=>e.source!=="account").map(({source:e,...i})=>({...i,logo:m(i.id)}));function Si(e){return e!=null&&d.some((i)=>i.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(i.id)}:`))}function et(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 _i(e){return[...z.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 tt(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 hr(e,i){let o=_i(i).flatMap((s)=>s.models.map((t)=>tt(s.id,t.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(Si(e))throw Error("The selected ALwith account model is unavailable. Select another model before sending.");return o[0]??null}function K(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 Ut(e,i){return K(e,i)?.keyUrl??e.keyUrl??null}function Bt(e){return(e instanceof Error?e.message:typeof e==="string"?e:String(e)).includes("Provider settings are pending")}function vr(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 Pi=p;function yr(e){return Pi[e]??{}}
2
- export{z,Si,et,_i,tt,hr,K,Ut,Bt,vr,Pi,yr};
1
+ import{wt,kt,St,_t}from"./chunk-yakar0e2.js";var a=[{id:"litellm",source:"account",name:"ALwith",models:[{id:"deepseek-V4.1-flash",label:"DeepSeek-Flash"}],catalog:"alwith/models.json",config:{web_search:"disabled"}},{id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com/",keyUrl:"https://platform.deepseek.com/api_keys",models:[{id:"deepseek-flash",label:"DeepSeek-Flash",description:"Latest frontier agentic coding model with image input."}],catalog:"deepseek/models.json",config:{web_search:"disabled"}},{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:"DeepSeek-Flash"}};var d=a,g={deepseek:wt,openrouter:St,qwen:_t,xai:kt};function m(e){let i=g[e];if(!i)throw Error(`Provider ${e} has no logo`);return i}var H=d.filter((e)=>e.source!=="account").map(({source:e,...i})=>({...i,logo:m(i.id)}));function jn(e){return e!=null&&d.some((i)=>i.source==="account"&&e.startsWith(`gateway:${encodeURIComponent(i.id)}:`))}function Be(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 $n(e){return[...H.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 Ge(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 Zi(e,i){let o=$n(i).flatMap((s)=>s.models.map((t)=>Ge(s.id,t.id)));if(e!==null&&(!e.startsWith("gateway:")||o.includes(e)))return e;if(jn(e))throw Error("The selected ALwith account model is unavailable. Select another model before sending.");return o[0]??null}function j(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 bt(e,i){return j(e,i)?.keyUrl??e.keyUrl??null}function Ct(e){return(e instanceof Error?e.message:typeof e==="string"?e:String(e)).includes("Provider settings are pending")}function Qi(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 Kn=p;function Yi(e){return Kn[e]??{}}
2
+ export{H,jn,Be,$n,Ge,Zi,j,bt,Ct,Qi,Kn,Yi};
@@ -0,0 +1,2 @@
1
+ import{n}from"./chunk-jm6zxy9h.js";import{Je}from"./chunk-qtp1xer1.js";import{e,g}from"./chunk-j0m35s05.js";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as p,EmptyDescription as c,EmptyHeader as l,EmptyTitle as d}from"@nyssance/shadcn/vega/components/ui/empty";import{Loader2Icon as v}from"lucide-react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Wt({session:t,timeline:y}){let{host:m,client:s}=e(),{t:i}=m,f=n((E)=>E.historyPages[t.id]?.cursor!=null),u=()=>g(m,s.open(t.id,t.cwd)),a=o(Je,{...y,session:t,client:s,host:m});if(t.restoring)return t.items.length===0?r("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),i("conversation.restoring")]}):a;if(!t.attached&&t.items.length===0)return r(p,{className:"flex-1",children:[r(l,{children:[o(d,{children:i("conversation.reopen")}),o(c,{children:i("conversation.detached")})]}),o(h,{onClick:u,children:i("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!f)return o(p,{className:"flex-1",children:r(l,{children:[o(d,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(c,{className:"truncate font-mono",children:t.cwd})]})});return a}
2
+ export{Wt};
@@ -1,2 +1,2 @@
1
- import{_o}from"./chunk-nq7gg9vg.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function Wn(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return _o(a,r)}
2
- export{Wn};
1
+ import{vi}from"./chunk-855w49k0.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function hi(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return vi(a,r)}
2
+ export{hi};
@@ -1,2 +1,2 @@
1
- import{DropdownMenuRadioGroup as l,DropdownMenuRadioItem as r}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{cn as s}from"cn";import{jsx as t,jsxs as a}from"react/jsx-runtime";function C({value:i,onValueChange:n,options:o,itemClassName:d}){return t(l,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(r,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:s("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
2
- export{C};
1
+ import{DropdownMenuRadioGroup as l,DropdownMenuRadioItem as r}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{cn as s}from"cn";import{jsx as t,jsxs as a}from"react/jsx-runtime";function w({value:i,onValueChange:n,options:o,itemClassName:d}){return t(l,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(r,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:s("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
2
+ export{w};
@@ -0,0 +1,2 @@
1
+ import{groupSessions as Ne,projectName as ee,isQuickChatDirectory as ur,QUICK_CHATS_GROUP as q}from"@nyssance/codex-acp-v2/client";
2
+ export{Ne,ee,ur,q};
@@ -1,2 +1,2 @@
1
- import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function Ho({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
2
- export{Ho};
1
+ import{PreviewCard as e}from"@base-ui/react/preview-card";import{jsx as o,jsxs as d}from"react/jsx-runtime";function ei({open:r,onOpenChange:a,trigger:i,children:t,...n}){return d(e.Root,{open:r,onOpenChange:a,children:[o(e.Trigger,{render:i,delay:700,closeDelay:100}),o(e.Portal,{children:o(e.Positioner,{...n,className:"isolate z-50",children:o(e.Popup,{"data-slot":"codex-hover-card",className:"m-0 outline-hidden",children:t})})})]})}
2
+ export{ei};
@@ -0,0 +1,2 @@
1
+ import{S}from"./chunk-mj7094yh.js";import{ie}from"./chunk-76a04a6j.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function Mi({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(S,{text:t.content,streaming:!1})});if(!n(t))return null;return e(ie,{entries:t.entries})}
2
+ export{Mi};
@@ -1,4 +1,4 @@
1
- import{e}from"./chunk-f3924gdb.js";import{Ft}from"./chunk-0mp7tyea.js";import{z,et,K,Ut}from"./chunk-8c042xya.js";import{Ht,Ot}from"./chunk-dya74vts.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as V}from"cn";import{ChevronDownIcon as se,ExternalLinkIcon as ve,EyeIcon as ne,EyeOffIcon as oe,PlusIcon as ge,ServerIcon as ie,Trash2Icon as fe}from"lucide-react";import{useEffect as W,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as re,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as _,FieldDescription as de,FieldLabel as J}from"@nyssance/shadcn/vega/components/ui/field";import{Input as ee}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as q,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as Q}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as X}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as Y}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function H(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Z(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(H(d));if(s.reportError)s.reportError(u);else console.error(u)}}function pi({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Z(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,W(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),W(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(H(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(Y,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function ur({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Z(),h=(o)=>N.notify?.(o),c=Ot(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(z[0]?.id??""),[F,U]=y(0),[E,L]=y({}),j=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)L((G)=>{let D={...G};return delete D[r.id],D});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(L((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else L((a)=>{let G={...a};return delete G[r.id],G}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},A=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(z[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},B=async()=>{p("retry");try{let o=await Ht(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=z.find((o)=>o.id===x)??null,M=c?.customProviders.find((o)=>o.id===x)??null;return W(()=>{if(!c||x==="new"||P||M)return;k(z[0]?.id??"")},[c,x,P,M]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(Ft,{bridge:d})]}),C&&t(pi,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void B(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(mi,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),z.map((o)=>t("div",{hidden:x!==o.id,children:t(fi,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>j(r,o,f),testResult:E[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(In,{provider:o,revision:c.revision,busy:b!==null,testResult:E[o.id],onTest:()=>I(o.id),onRemove:()=>A(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(In,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{U((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function mi({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[z.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(te,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(te,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(ie,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:V("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function te({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:V("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:V("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function gi({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(gi,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function fi({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Z(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,U]=y(K(s,d?.region)?.id),[E,L]=y(d?.base_url??""),j=s.logo,I=d!==null,T=c.trim(),A=Ut(s,F),B=F!==K(s,x.saved?.region)?.id,P=E.trim()!==(x.saved?.base_url??"");W(()=>{if(u>x.revision&&T===""&&!B&&!P)k({saved:d,revision:u}),U(K(s,d?.region)?.id),L(d?.base_url??"")},[u,d,s,x.revision,T,B,P]);let M=!v&&(T!==""||B||P),o=`${s.id}-api-key`,r=async(a)=>{let G=c,D=F,m=await C(x.revision,a);if(!m)return;let O=m.providers[s.id]??null;k({saved:O,revision:m.revision}),w((g)=>g===G?"":g),U((g)=>g===D?K(s,O?.region)?.id:g),L((g)=>g===E?O?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:E.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(j,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>U(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(X,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(_,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(J,{htmlFor:o,children:n("provider.apiKey")}),A!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(A)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(q,{children:[t(Q,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&M)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(ne,{}):t(oe,{})})})]})]}),i(re,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(se,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(_,{className:"gap-2",children:[t(J,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(q,{children:t(Q,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:K(s,F)?.baseUrl??s.baseUrl,value:E,onChange:(a)=>L(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!M,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!M?S:void 0,children:i(R,{size:"sm",disabled:!M,onClick:f,children:[v&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function In({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[U,E]=y(s===null),[L,j]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
1
+ import{e}from"./chunk-j0m35s05.js";import{gt}from"./chunk-3cssygmg.js";import{H,Be,j,bt}from"./chunk-apyfztsv.js";import{yt,xt}from"./chunk-0pzyavch.js";import{CardSendIcon as pe}from"@solar-icons/react/line-duotone/card-send";import{cn as J}from"cn";import{ChevronDownIcon as se,ExternalLinkIcon as ve,EyeIcon as ne,EyeOffIcon as oe,PlusIcon as ge,ServerIcon as ie,Trash2Icon as fe}from"lucide-react";import{useEffect as V,useRef as ye,useState as y}from"react";import{Button as R}from"@nyssance/shadcn/vega/components/ui/button";import{Collapsible as re,CollapsibleContent as ae,CollapsibleTrigger as le}from"@nyssance/shadcn/vega/components/ui/collapsible";import{Field as D,FieldDescription as de,FieldLabel as O}from"@nyssance/shadcn/vega/components/ui/field";import{Input as ee}from"@nyssance/shadcn/vega/components/ui/input";import{InputGroup as q,InputGroupAddon as ce,InputGroupButton as ue,InputGroupInput as Q}from"@nyssance/shadcn/vega/components/ui/input-group";import{Select as be,SelectContent as he,SelectGroup as xe,SelectItem as Ne,SelectTrigger as Pe,SelectValue as Ce}from"@nyssance/shadcn/vega/components/ui/select";import{Separator as X}from"@nyssance/shadcn/vega/components/ui/separator";import{Spinner as Y}from"@nyssance/shadcn/vega/components/ui/spinner";import{Textarea as we}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as t,jsxs as i,Fragment as Se}from"react/jsx-runtime";function W(s){if(s instanceof Error)return s.message;if(typeof s==="object"&&s!==null&&"message"in s)return String(s.message);return String(s)}function Z(){let{host:s}=e();return(d)=>{let u=d instanceof Error?d:Error(W(d));if(s.reportError)s.reportError(u);else console.error(u)}}function Dn({refreshAccountProviders:s,openTopUp:d,group:u}){let{t:v}=e().host,C=Z(),[S,N]=y(0),[l,n]=y(null),[h,c]=y(!0),w=ye(s);return w.current=s,V(()=>{let b=()=>N((p)=>p+1);return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[]),V(()=>{let b=!0;return c(!0),w.current().then(()=>{if(b)n(null),c(!1)},(p)=>{if(b)n(W(p)),c(!1)}),()=>{b=!1}},[S]),t(u,{children:i("div",{className:"space-y-3 rounded-xl border p-4",children:[i("div",{className:"flex items-center justify-between gap-3",children:[t("h3",{className:"text-sm font-medium",children:"ALwith"}),d&&t(R,{variant:"ghost",size:"icon-sm",className:"text-primary hover:text-primary/80","aria-label":v("provider.managed.topUp"),title:v("provider.managed.topUp"),onClick:()=>{d().catch(C)},children:t(pe,{className:"size-4","aria-hidden":"true"})})]}),t("p",{className:"text-muted-foreground text-xs",children:v("provider.managed.description")}),l!==null&&i("div",{className:"space-y-2",children:[t("p",{role:"alert",className:"text-destructive text-xs",children:l}),i(R,{variant:"outline",size:"sm",disabled:h,onClick:()=>N((b)=>b+1),children:[h&&t(Y,{"aria-hidden":"true"}),v("provider.retry")]})]})]})})}function $i({port:s,bridge:d,group:u,label:v,refreshAccountProviders:C,openTopUp:S}){let{host:N}=e(),{t:l}=N,n=Z(),h=(o)=>N.notify?.(o),c=xt(s,n),w=c?.providers??{},[b,p]=y(null),[x,k]=y(H[0]?.id??""),[F,B]=y(0),[U,A]=y({}),_=async(o,r,f)=>{p(r.id);try{let a=await s.save(o,r.id,f);if(!a.error)A((M)=>{let L={...M};return delete L[r.id],L});if(a.error)n(a.error);if(!a.error)h(l(a.status==="pending"?"provider.pending":f===null?"provider.removed":"provider.saved",{name:r.name}));return a}catch(a){return n(a),null}finally{p(null)}},I=async(o)=>{p(o);try{let r=await s.test(o);if(A((f)=>({...f,[o]:r})),r.ok)h(l("provider.testSuccess",{latency:r.latencyMs??0}));else n(`${l(`provider.testErrors.${r.code}`)}${r.message?`: ${r.message}`:""}`)}catch(r){n(r)}finally{p(null)}},T=async(o,r)=>{p(r.id);try{let f=await s.saveCustom(o,r);if(f.error)n(f.error);else A((a)=>{let M={...a};return delete M[r.id],M}),h(l(f.status==="pending"?"provider.pending":"provider.saved",{name:r.name}));return!f.error}catch(f){return n(f),!1}finally{p(null)}},z=async(o)=>{if(!c)return;p(o.id);try{let r=await s.removeCustom(c.revision,o.id);if(r.error)n(r.error);else k(H[0]?.id??""),h(l(r.status==="pending"?"provider.pending":"provider.removed",{name:o.name}))}catch(r){n(r)}finally{p(null)}},K=async()=>{p("retry");try{let o=await yt(s);if(o.error)n(o.error);else if(o.status==="pending")h(l("provider.pending"))}catch(o){n(o)}finally{p(null)}},P=H.find((o)=>o.id===x)??null,E=c?.customProviders.find((o)=>o.id===x)??null;return V(()=>{if(!c||x==="new"||P||E)return;k(H[0]?.id??"")},[c,x,P,E]),i("div",{className:"flex flex-col gap-6",children:[i(u,{children:[t(v,{children:"Codex"}),t(gt,{bridge:d})]}),C&&t(Dn,{refreshAccountProviders:C,openTopUp:S,group:u}),c?.status==="pending"&&t("p",{className:"text-muted-foreground text-sm",children:l("provider.pending")}),c?.error&&t("p",{className:"text-destructive text-sm",children:c.error}),c&&c.status!=="applied"&&t(R,{variant:"outline",className:"self-start",disabled:b!==null,onClick:()=>void K(),children:l("provider.retry")}),t(u,{children:c&&i(Se,{children:[t(Hn,{activeId:x,keys:w,customProviders:c.customProviders,onSelect:k,onAdd:()=>k("new"),label:v}),H.map((o)=>t("div",{hidden:x!==o.id,children:t(Un,{provider:o,saved:w[o.id]??null,revision:c.revision,busy:b!==null,onSave:(r,f)=>_(r,o,f),testResult:U[o.id],onTest:()=>I(o.id)})},o.id)),c.customProviders.map((o)=>t("div",{hidden:x!==o.id,children:t(Xt,{provider:o,revision:c.revision,busy:b!==null,testResult:U[o.id],onTest:()=>I(o.id),onRemove:()=>z(o),onSaved:k,onSave:T})},o.id)),t("div",{hidden:x!=="new",children:t(Xt,{provider:null,revision:c.revision,busy:b!==null,onSaved:(o)=>{B((r)=>r+1),k(o)},onSave:T},F)})]})})]})}function Hn({activeId:s,keys:d,customProviders:u,onSelect:v,onAdd:C,label:S}){let{t:N}=e().host;return i("div",{children:[t(S,{children:N("provider.label")}),i("div",{className:"grid grid-cols-2 gap-2 py-4 sm:grid-cols-3",children:[H.map((l)=>{let n=l.logo,h=d[l.id]!==void 0;return t(te,{id:l.id,name:l.name,active:s===l.id,configured:h,icon:t(n,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)}),u.map((l)=>t(te,{id:l.id,name:l.name,active:s===l.id,configured:!0,icon:t(ie,{className:"size-5 shrink-0"}),onClick:()=>v(l.id)},l.id)),i(R,{type:"button",variant:"outline","aria-pressed":s==="new",onClick:C,className:J("h-9 w-full justify-start gap-2 rounded-full px-4",s==="new"&&"bg-accent"),children:[t(ge,{className:"size-4 shrink-0"}),t("span",{className:"truncate",children:N("provider.customButton")})]})]})]})}function te({id:s,name:d,active:u,configured:v,icon:C,onClick:S}){return i(R,{type:"button",variant:"outline","aria-label":d,"aria-pressed":u,onClick:S,className:J("h-9 w-full gap-2 rounded-full px-4",u&&"bg-accent"),children:[C,t("span",{className:"min-w-0 flex-1 truncate text-center",children:d}),t("span",{"data-testid":`${s}-status`,"data-configured":v,"aria-hidden":"true",className:J("size-2 shrink-0 rounded-full",v?"bg-green-500":"bg-muted-foreground/30")})]})}function On({result:s}){let{t:d}=e().host;return t("p",{role:"status",className:s.ok?"text-muted-foreground text-xs":"text-destructive text-xs",children:s.ok?d("provider.testSuccess",{latency:s.latencyMs??0}):`${d(`provider.testErrors.${s.code}`)}${s.status?` (HTTP ${s.status})`:""}`})}function me({busy:s,canTest:d,onTest:u,onRemove:v,result:C,children:S}){let{t:N}=e().host;return i("div",{className:"space-y-3 border-t pt-4",children:[C&&t(On,{result:C}),u&&t("p",{className:"text-muted-foreground text-xs leading-relaxed",children:N("provider.testDescription")}),i("div",{className:"flex flex-wrap items-center gap-2",children:[v&&i(R,{size:"sm",variant:"destructive",className:"font-normal",disabled:s,onClick:v,children:[t(fe,{className:"size-4"}),N("provider.remove")]}),i("div",{className:"ms-auto flex flex-wrap items-center gap-2",children:[u&&t(R,{size:"sm",variant:"outline",disabled:s||!d,onClick:u,children:N("provider.testButton")}),S]})]})]})}function Un({provider:s,saved:d,revision:u,busy:v,onSave:C,testResult:S,onTest:N}){let{host:l}=e(),{t:n}=l,h=Z(),[c,w]=y(""),[b,p]=y(!1),[x,k]=y({saved:d,revision:u}),[F,B]=y(j(s,d?.region)?.id),[U,A]=y(d?.base_url??""),_=s.logo,I=d!==null,T=c.trim(),z=bt(s,F),K=F!==j(s,x.saved?.region)?.id,P=U.trim()!==(x.saved?.base_url??"");V(()=>{if(u>x.revision&&T===""&&!K&&!P)k({saved:d,revision:u}),B(j(s,d?.region)?.id),A(d?.base_url??"")},[u,d,s,x.revision,T,K,P]);let E=!v&&(T!==""||K||P),o=`${s.id}-api-key`,r=async(a)=>{let M=c,L=F,m=await C(x.revision,a);if(!m)return;let G=m.providers[s.id]??null;k({saved:G,revision:m.revision}),w((g)=>g===M?"":g),B((g)=>g===L?j(s,G?.region)?.id:g),A((g)=>g===U?G?.base_url??"":g)},f=()=>{if(T===""&&x.saved===null)return;r({...T===""?{}:{apiKey:T},...F===void 0?{}:{region:F},...P?{baseUrl:U.trim()}:{}})};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[t(_,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium",children:s.name}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:I?n("provider.active",{name:s.name,count:s.models.length}):n("provider.inactive")})]}),s.regions&&i(be,{value:F,onValueChange:(a)=>B(a??s.regions?.[0]?.id),children:[t(Pe,{className:"w-32","aria-label":n("provider.region"),children:t(Ce,{})}),t(he,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"max-w-(--available-width) min-w-0 p-1",children:t(xe,{children:s.regions.map((a)=>t(Ne,{value:a.id,children:n(`provider.regions.${a.id}`)},a.id))})})]})]}),t(X,{}),i("section",{className:"space-y-4","aria-labelledby":`${s.id}-connection`,children:[t("h4",{id:`${s.id}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t(O,{htmlFor:o,children:n("provider.apiKey")}),z!==null&&i(R,{type:"button",variant:"link",size:"sm",className:"text-muted-foreground h-auto p-0 text-xs",onClick:()=>{try{l.openLink(z)}catch(a){h(a)}},children:[n("provider.getKey",{name:s.name}),t(ve,{className:"size-3","aria-hidden":"true"})]})]}),i(q,{children:[t(Q,{id:o,type:b?"text":"password",autoComplete:"off",spellCheck:!1,placeholder:I?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:c,onChange:(a)=>w(a.target.value),onKeyDown:(a)=>{if(a.key==="Enter"&&E)f()}}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(b?"provider.hideKey":"provider.showKey"),onClick:()=>p((a)=>!a),children:b?t(ne,{}):t(oe,{})})})]})]}),i(re,{className:"space-y-2",children:[i(le,{render:t(R,{variant:"ghost",size:"sm",className:"group px-2.5"}),children:[n("provider.baseUrl"),t(se,{className:"size-4 transition-transform group-aria-expanded:rotate-180","aria-hidden":"true"})]}),t(ae,{children:i(D,{className:"gap-2",children:[t(O,{htmlFor:`${s.id}-base-url`,className:"sr-only",children:n("provider.baseUrl")}),t(q,{children:t(Q,{id:`${s.id}-base-url`,type:"url",spellCheck:!1,placeholder:j(s,F)?.baseUrl??s.baseUrl,value:U,onChange:(a)=>A(a.target.value)})}),t(de,{className:"text-xs",children:n("provider.baseUrlDescription")})]})})]})]}),t(me,{busy:v,canTest:!E,onTest:I?N:void 0,onRemove:I?()=>void r(null):void 0,result:!E?S:void 0,children:i(R,{size:"sm",disabled:!E,onClick:f,children:[v&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}function Xt({provider:s,revision:d,busy:u,testResult:v,onTest:C,onRemove:S,onSaved:N,onSave:l}){let{t:n}=e().host,[h,c]=y(s?.name??""),[w,b]=y(s?.baseUrl??""),[p,x]=y(""),[k,F]=y(!1),[B,U]=y(s===null),[A,_]=y(s?.models??[]),[I,T]=y(s?JSON.stringify(s.models,null,2):`[
2
2
  { "label": "My Model", "api_id": "model-id" }
3
- ]`),[A,B]=y(null),[P]=y(()=>s?.id??`custom_${crypto.randomUUID().replaceAll("-","")}`),M=`${P}-name`,o=`${P}-base-url`,r=`${P}-api-key`,f=`${P}-models`,a=h.trim()!==s?.name||w.trim()!==s.baseUrl||p.trim()!==""||I!==JSON.stringify(s.models,null,2),G=(m)=>{if(!m)try{j(et(I)),B(null)}catch(O){B(H(O));return}E(m)},D=async()=>{let m;try{m=et(I),B(null)}catch(g){B(H(g)),E(!0);return}if(await l(d,{id:P,name:h.trim(),baseUrl:w.trim(),models:m,...p.trim()===""?{}:{apiKey:p.trim()}}))c((g)=>g===h?h.trim():g),b((g)=>g===w?w.trim():g),x((g)=>g===p?"":g),T((g)=>g===I?JSON.stringify(m,null,2):g),N(P)};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex items-center gap-3",children:[t(ie,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium break-words",children:s?.name||n("provider.addCustom")}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:n("provider.customDescription")})]}),s&&t("span",{className:"text-muted-foreground shrink-0 text-xs",children:n("provider.configured")})]}),t(X,{}),i("section",{className:"space-y-4","aria-labelledby":`${P}-connection`,children:[t("h4",{id:`${P}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(_,{className:"gap-2",children:[t(J,{htmlFor:M,children:n("provider.name")}),t(ee,{id:M,value:h,onChange:(m)=>c(m.target.value)})]}),i(_,{className:"gap-2",children:[t(J,{htmlFor:o,children:n("provider.baseUrl")}),t(ee,{id:o,type:"url",placeholder:"https://.../v1",value:w,onChange:(m)=>b(m.target.value)})]}),i(_,{className:"gap-2",children:[t(J,{htmlFor:r,children:n("provider.apiKey")}),i(q,{children:[t(Q,{id:r,type:k?"text":"password",autoComplete:"off",placeholder:s?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:p,onChange:(m)=>x(m.target.value)}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(k?"provider.hideKey":"provider.showKey"),onClick:()=>F((m)=>!m),children:k?t(ne,{}):t(oe,{})})})]})]})]}),t(X,{}),i(re,{open:U,onOpenChange:G,className:"space-y-3",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h4",{className:"text-sm font-medium",children:n("provider.models")}),i(le,{render:t(R,{variant:"ghost",size:"sm"}),children:[n(U?"provider.previewModels":"provider.editModels"),t(se,{className:V("size-4",U&&"rotate-180")})]})]}),!U&&t("ul",{className:"bg-muted/40 divide-y rounded-lg px-3",children:L.map((m)=>i("li",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 py-2.5 text-sm",children:[t("span",{className:"break-all",children:m.label}),t("span",{className:"text-muted-foreground font-mono text-xs break-all",children:m.api_id})]},m.api_id))}),t(ae,{children:i(_,{className:"gap-2","data-invalid":A!==null,children:[t(J,{htmlFor:f,children:n("provider.modelsJson")}),t(we,{id:f,"aria-invalid":A!==null,"aria-describedby":`${f}-description`,spellCheck:!1,className:"min-h-44 font-mono text-xs",value:I,onChange:(m)=>{T(m.target.value),B(null)}}),t(de,{id:`${f}-description`,className:V("text-xs",A&&"text-destructive"),role:A?"alert":void 0,children:A??n("provider.modelsJsonDescription")})]})})]}),t(me,{busy:u,canTest:!a,onTest:s?C:void 0,onRemove:s?S:void 0,result:!a?v:void 0,children:i(R,{size:"sm",disabled:u||!a||h.trim()===""||w.trim()===""||!s&&p.trim()==="",onClick:()=>void D(),children:[u&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}
4
- export{pi,ur,mi,gi,fi,In};
3
+ ]`),[z,K]=y(null),[P]=y(()=>s?.id??`custom_${crypto.randomUUID().replaceAll("-","")}`),E=`${P}-name`,o=`${P}-base-url`,r=`${P}-api-key`,f=`${P}-models`,a=h.trim()!==s?.name||w.trim()!==s.baseUrl||p.trim()!==""||I!==JSON.stringify(s.models,null,2),M=(m)=>{if(!m)try{_(Be(I)),K(null)}catch(G){K(W(G));return}U(m)},L=async()=>{let m;try{m=Be(I),K(null)}catch(g){K(W(g)),U(!0);return}if(await l(d,{id:P,name:h.trim(),baseUrl:w.trim(),models:m,...p.trim()===""?{}:{apiKey:p.trim()}}))c((g)=>g===h?h.trim():g),b((g)=>g===w?w.trim():g),x((g)=>g===p?"":g),T((g)=>g===I?JSON.stringify(m,null,2):g),N(P)};return i("div",{className:"space-y-5 rounded-xl border p-4",children:[i("div",{className:"flex items-center gap-3",children:[t(ie,{className:"size-6 shrink-0"}),i("div",{className:"min-w-0 flex-1",children:[t("h3",{className:"text-sm font-medium break-words",children:s?.name||n("provider.addCustom")}),t("div",{className:"text-muted-foreground mt-0.5 text-xs",children:n("provider.customDescription")})]}),s&&t("span",{className:"text-muted-foreground shrink-0 text-xs",children:n("provider.configured")})]}),t(X,{}),i("section",{className:"space-y-4","aria-labelledby":`${P}-connection`,children:[t("h4",{id:`${P}-connection`,className:"text-sm font-medium",children:n("provider.connectionSettings")}),i(D,{className:"gap-2",children:[t(O,{htmlFor:E,children:n("provider.name")}),t(ee,{id:E,value:h,onChange:(m)=>c(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:o,children:n("provider.baseUrl")}),t(ee,{id:o,type:"url",placeholder:"https://.../v1",value:w,onChange:(m)=>b(m.target.value)})]}),i(D,{className:"gap-2",children:[t(O,{htmlFor:r,children:n("provider.apiKey")}),i(q,{children:[t(Q,{id:r,type:k?"text":"password",autoComplete:"off",placeholder:s?n("provider.apiKeyKept"):n("provider.apiKeyPlaceholder"),value:p,onChange:(m)=>x(m.target.value)}),t(ce,{align:"inline-end",children:t(ue,{size:"icon-xs","aria-label":n(k?"provider.hideKey":"provider.showKey"),onClick:()=>F((m)=>!m),children:k?t(ne,{}):t(oe,{})})})]})]})]}),t(X,{}),i(re,{open:B,onOpenChange:M,className:"space-y-3",children:[i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t("h4",{className:"text-sm font-medium",children:n("provider.models")}),i(le,{render:t(R,{variant:"ghost",size:"sm"}),children:[n(B?"provider.previewModels":"provider.editModels"),t(se,{className:J("size-4",B&&"rotate-180")})]})]}),!B&&t("ul",{className:"bg-muted/40 divide-y rounded-lg px-3",children:A.map((m)=>i("li",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1 py-2.5 text-sm",children:[t("span",{className:"break-all",children:m.label}),t("span",{className:"text-muted-foreground font-mono text-xs break-all",children:m.api_id})]},m.api_id))}),t(ae,{children:i(D,{className:"gap-2","data-invalid":z!==null,children:[t(O,{htmlFor:f,children:n("provider.modelsJson")}),t(we,{id:f,"aria-invalid":z!==null,"aria-describedby":`${f}-description`,spellCheck:!1,className:"min-h-44 font-mono text-xs",value:I,onChange:(m)=>{T(m.target.value),K(null)}}),t(de,{id:`${f}-description`,className:J("text-xs",z&&"text-destructive"),role:z?"alert":void 0,children:z??n("provider.modelsJsonDescription")})]})})]}),t(me,{busy:u,canTest:!a,onTest:s?C:void 0,onRemove:s?S:void 0,result:!a?v:void 0,children:i(R,{size:"sm",disabled:u||!a||h.trim()===""||w.trim()===""||!s&&p.trim()==="",onClick:()=>void L(),children:[u&&t(Y,{"data-icon":"inline-start"}),n("provider.saveButton")]})})]})}
4
+ export{Dn,$i,Hn,On,Un,Xt};