@alwith/module-chat 0.6.27 → 0.6.29

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 (484) hide show
  1. package/assets/catalogs/qwen/models.json +40 -0
  2. package/assets/provider-catalog.json +4 -0
  3. package/dist/activity-host.js +1 -1
  4. package/dist/agent/client.d.ts +1 -0
  5. package/dist/agent/client.js +1 -1
  6. package/dist/agent/custom-model-effort.js +1 -1
  7. package/dist/agent/fork-title.js +1 -1
  8. package/dist/agent/image-request.js +1 -1
  9. package/dist/agent/image-tools.js +1 -1
  10. package/dist/agent/input-config.js +1 -1
  11. package/dist/agent/input-modes/chat.js +1 -1
  12. package/dist/agent/input-modes/execution-meta.js +1 -1
  13. package/dist/agent/input-modes/image-context.js +1 -1
  14. package/dist/agent/input-modes/image.js +1 -1
  15. package/dist/agent/input-modes/index.js +1 -1
  16. package/dist/agent/project-path.js +1 -1
  17. package/dist/agent/request-error.js +1 -1
  18. package/dist/agent/session-list-refresh.js +1 -1
  19. package/dist/app-reference.js +1 -1
  20. package/dist/application-tools.js +1 -1
  21. package/dist/approval/choice-elicitation-form.js +1 -1
  22. package/dist/approval/choice-schema.js +1 -1
  23. package/dist/approval/permission-options.js +1 -1
  24. package/dist/approval/permission-view.js +1 -1
  25. package/dist/approval/schema-elicitation-form.js +1 -1
  26. package/dist/approval/url-elicitation-card.js +1 -1
  27. package/dist/chunk-06aaghwq.js +2 -0
  28. package/dist/{chunk-jp4xjks0.js → chunk-0c956xc0.js} +2 -2
  29. package/dist/chunk-0f00j53n.js +2 -0
  30. package/dist/{chunk-yryg27yy.js → chunk-12bfnfbk.js} +2 -2
  31. package/dist/chunk-12pd4nxy.js +2 -0
  32. package/dist/{chunk-w5zvy4ex.js → chunk-188q5xn8.js} +2 -2
  33. package/dist/chunk-189aq7st.js +2 -0
  34. package/dist/{chunk-ne4b53kn.js → chunk-19jh646d.js} +2 -2
  35. package/dist/{chunk-ftsnryz8.js → chunk-1bvgs2t1.js} +2 -2
  36. package/dist/{chunk-n4wp3h3j.js → chunk-1dpk9zrb.js} +2 -2
  37. package/dist/{chunk-ma6ycen5.js → chunk-239gtn3z.js} +2 -2
  38. package/dist/chunk-2c4hqv8f.js +2 -0
  39. package/dist/{chunk-18kdsdmy.js → chunk-2c7a0zdc.js} +2 -2
  40. package/dist/chunk-2rk59ngw.js +2 -0
  41. package/dist/{chunk-tgnftxyb.js → chunk-32zzqeyf.js} +2 -2
  42. package/dist/{chunk-y3mx5sf0.js → chunk-36j9fer8.js} +2 -2
  43. package/dist/chunk-36rxa8k7.js +3 -0
  44. package/dist/{chunk-wde0m4pf.js → chunk-37x36kph.js} +3 -3
  45. package/dist/{chunk-4vayk46h.js → chunk-3btheq4v.js} +2 -2
  46. package/dist/{chunk-c7qzvt21.js → chunk-3cwbxnxr.js} +3 -3
  47. package/dist/{chunk-jvy6p83k.js → chunk-3gkb117f.js} +3 -3
  48. package/dist/{chunk-bbrx6m7n.js → chunk-3kxerrsh.js} +2 -2
  49. package/dist/{chunk-zzz6kmh8.js → chunk-42dfq7ze.js} +2 -2
  50. package/dist/{chunk-9neb2f30.js → chunk-46j8adkj.js} +2 -2
  51. package/dist/{chunk-84p483n0.js → chunk-483jakc1.js} +2 -2
  52. package/dist/chunk-48zgp33j.js +2 -0
  53. package/dist/{chunk-vdt7cp6c.js → chunk-4fghmx57.js} +2 -2
  54. package/dist/chunk-4npg9v6h.js +2 -0
  55. package/dist/{chunk-8wk3e4z7.js → chunk-4sj3t6mk.js} +2 -2
  56. package/dist/{chunk-v3v2twfm.js → chunk-4y07ykv2.js} +2 -2
  57. package/dist/chunk-52hvpdxw.js +2 -0
  58. package/dist/{chunk-h5mdgrq6.js → chunk-54awxpw2.js} +2 -2
  59. package/dist/{chunk-p96vgnxw.js → chunk-5arfhz6m.js} +2 -2
  60. package/dist/{chunk-0bv3tw1m.js → chunk-5cas0xvp.js} +2 -2
  61. package/dist/chunk-5dxzfdd1.js +2 -0
  62. package/dist/{chunk-ypdh88cj.js → chunk-5dygcexv.js} +2 -2
  63. package/dist/{chunk-z6x70w62.js → chunk-5h8h4sas.js} +2 -2
  64. package/dist/{chunk-dd9k5bbt.js → chunk-5n2304a1.js} +2 -2
  65. package/dist/chunk-5wed639g.js +2 -0
  66. package/dist/{chunk-qa9p0a64.js → chunk-621g2ntr.js} +3 -3
  67. package/dist/{chunk-bgnxw313.js → chunk-6eebeq0f.js} +2 -2
  68. package/dist/chunk-6g5qmjph.js +2 -0
  69. package/dist/{chunk-747qe35q.js → chunk-6gejqbns.js} +2 -2
  70. package/dist/{chunk-0m4s668v.js → chunk-6hxz5cpc.js} +2 -2
  71. package/dist/{chunk-4d9sajzj.js → chunk-6ja6pt5x.js} +2 -2
  72. package/dist/{chunk-30nre2gw.js → chunk-6kyq5zxt.js} +2 -2
  73. package/dist/chunk-6m9frvzj.js +2 -0
  74. package/dist/{chunk-jdwd4ta9.js → chunk-6r1e3y4e.js} +3 -3
  75. package/dist/{chunk-nrpgmawz.js → chunk-6wkcqhkk.js} +2 -2
  76. package/dist/{chunk-axvjn527.js → chunk-6yzknjee.js} +2 -2
  77. package/dist/chunk-717437bm.js +2 -0
  78. package/dist/chunk-7ckdhz5y.js +2 -0
  79. package/dist/chunk-7egc2x4q.js +1 -0
  80. package/dist/{chunk-tr0bmqn9.js → chunk-7g0cbkbp.js} +2 -2
  81. package/dist/{chunk-k5nd3vyq.js → chunk-7hfd7hnm.js} +2 -2
  82. package/dist/{chunk-xwwjj45a.js → chunk-7jk8s061.js} +2 -2
  83. package/dist/{chunk-64apxzn7.js → chunk-7n1v87h0.js} +2 -2
  84. package/dist/{chunk-0enb3f4n.js → chunk-7rqryntm.js} +2 -2
  85. package/dist/{chunk-95ywdfe0.js → chunk-7sf2wz1n.js} +2 -2
  86. package/dist/{chunk-7rtwekkz.js → chunk-7vby3f2v.js} +2 -2
  87. package/dist/{chunk-m68t534g.js → chunk-8ktb3g8c.js} +2 -2
  88. package/dist/{chunk-qceex4vv.js → chunk-8p861ztc.js} +2 -2
  89. package/dist/{chunk-w1yrsbw1.js → chunk-8w5bt0nc.js} +2 -2
  90. package/dist/{chunk-1wr1ef9x.js → chunk-9162ez1n.js} +2 -2
  91. package/dist/{chunk-sjm9p42x.js → chunk-91jmmkd3.js} +2 -2
  92. package/dist/{chunk-88ysxbdh.js → chunk-964fwwsg.js} +2 -2
  93. package/dist/chunk-9xdne4k4.js +4 -0
  94. package/dist/{chunk-b2n5sj31.js → chunk-aa2xhwh2.js} +2 -2
  95. package/dist/{chunk-gjtxked2.js → chunk-abxsr9d1.js} +2 -2
  96. package/dist/{chunk-etvdqkvb.js → chunk-afnnrn6z.js} +2 -2
  97. package/dist/{chunk-jmc7ddz8.js → chunk-agz11n1h.js} +3 -3
  98. package/dist/{chunk-pxr5snwm.js → chunk-ahzjy61p.js} +2 -2
  99. package/dist/{chunk-qzerhkyb.js → chunk-ansfap1a.js} +3 -3
  100. package/dist/chunk-aq22zye1.js +2 -0
  101. package/dist/{chunk-syjt7y4v.js → chunk-azak3tb5.js} +2 -2
  102. package/dist/{chunk-v9weanq6.js → chunk-b4qe4xnp.js} +2 -2
  103. package/dist/{chunk-x49qjrbk.js → chunk-b4wh6k5s.js} +2 -2
  104. package/dist/{chunk-p3gawvqr.js → chunk-b64hyshj.js} +2 -2
  105. package/dist/{chunk-why9g2kd.js → chunk-bajn7ssf.js} +2 -2
  106. package/dist/{chunk-16dyzkha.js → chunk-bbvhgh27.js} +2 -2
  107. package/dist/{chunk-ha9n1k24.js → chunk-bnf6pmgc.js} +2 -2
  108. package/dist/{chunk-q3s59jyn.js → chunk-bsqe29dh.js} +2 -2
  109. package/dist/chunk-cp3qcgdv.js +4 -0
  110. package/dist/{chunk-v0wmy9b3.js → chunk-cttsbjr0.js} +2 -2
  111. package/dist/{chunk-dheg4bs2.js → chunk-cxhyh0w9.js} +2 -2
  112. package/dist/{chunk-r5f77gtx.js → chunk-d336k00a.js} +2 -2
  113. package/dist/{chunk-3tvq6xr2.js → chunk-d5pn8932.js} +2 -2
  114. package/dist/{chunk-53r6pr16.js → chunk-d8bjsf1d.js} +2 -2
  115. package/dist/{chunk-j4w2hbbe.js → chunk-darm80tf.js} +2 -2
  116. package/dist/{chunk-d71nz1je.js → chunk-dbrrbwb8.js} +2 -2
  117. package/dist/chunk-dfzhma2x.js +2 -0
  118. package/dist/{chunk-v96vkrw2.js → chunk-ds6bqmdr.js} +2 -2
  119. package/dist/{chunk-5bhp61sd.js → chunk-dwf38vyq.js} +2 -2
  120. package/dist/chunk-dxfhy8gr.js +2 -0
  121. package/dist/{chunk-hf5bpahd.js → chunk-dzw6vqqf.js} +2 -2
  122. package/dist/{chunk-e9nvbe3j.js → chunk-e8mxwqxy.js} +2 -2
  123. package/dist/chunk-eedgav4q.js +2 -0
  124. package/dist/{chunk-zyn0ys4m.js → chunk-eexn5mmk.js} +2 -2
  125. package/dist/{chunk-fnm2xznx.js → chunk-efkfzgs9.js} +2 -2
  126. package/dist/chunk-ehcnfvaz.js +2 -0
  127. package/dist/{chunk-cgnzqmqd.js → chunk-epdnafa1.js} +2 -2
  128. package/dist/{chunk-ag2t01q7.js → chunk-esxjnj1y.js} +3 -3
  129. package/dist/{chunk-3nawfa7b.js → chunk-ezaypwps.js} +2 -2
  130. package/dist/{chunk-bf7sgpzq.js → chunk-f9zpep12.js} +2 -2
  131. package/dist/{chunk-fwb6tf7m.js → chunk-fednb216.js} +2 -2
  132. package/dist/{chunk-pxv38ttf.js → chunk-fpsn6fmf.js} +2 -2
  133. package/dist/{chunk-2yvj9k42.js → chunk-fvf1et2s.js} +2 -2
  134. package/dist/{chunk-exrd2xzz.js → chunk-fvw65b49.js} +2 -2
  135. package/dist/{chunk-cp4wxmh5.js → chunk-fz9y067h.js} +2 -2
  136. package/dist/{chunk-brv52tgj.js → chunk-g9426ns9.js} +2 -2
  137. package/dist/chunk-gdn4vvks.js +2 -0
  138. package/dist/chunk-ge0anaww.js +4 -0
  139. package/dist/chunk-gjj5wbms.js +4 -0
  140. package/dist/{chunk-dxwbgg69.js → chunk-gt50nb3j.js} +2 -2
  141. package/dist/chunk-h1t76wws.js +2 -0
  142. package/dist/chunk-hc9bcwpa.js +2 -0
  143. package/dist/{chunk-26w51q10.js → chunk-hpv8x22r.js} +2 -2
  144. package/dist/chunk-hqfhb4ng.js +2 -0
  145. package/dist/{chunk-xnbvdqnt.js → chunk-htsbt68m.js} +2 -2
  146. package/dist/{chunk-c13rnm7b.js → chunk-hz8yrg2t.js} +2 -2
  147. package/dist/{chunk-fwghjmd1.js → chunk-hzhcajx1.js} +2 -2
  148. package/dist/chunk-j1khvg9s.js +2 -0
  149. package/dist/{chunk-7ng6qs9c.js → chunk-jbnbx285.js} +2 -2
  150. package/dist/{chunk-nqt9gyz9.js → chunk-jkqh03w4.js} +2 -2
  151. package/dist/{chunk-j8zpjnf8.js → chunk-k0rfgjm6.js} +2 -2
  152. package/dist/{chunk-3hsft68c.js → chunk-k1atcess.js} +2 -2
  153. package/dist/{chunk-dx5hh359.js → chunk-kk5acm1s.js} +5 -5
  154. package/dist/{chunk-4a4awnss.js → chunk-kq8jv5tf.js} +2 -2
  155. package/dist/{chunk-8hygfx41.js → chunk-kv1v7kgn.js} +2 -2
  156. package/dist/chunk-kzh7w9c0.js +2 -0
  157. package/dist/chunk-m76tgtge.js +3 -0
  158. package/dist/{chunk-grfrfh7s.js → chunk-m7t9asrq.js} +2 -2
  159. package/dist/{chunk-3q8vw3wb.js → chunk-m7tj6194.js} +2 -2
  160. package/dist/{chunk-4sfxcw58.js → chunk-me230xjh.js} +3 -3
  161. package/dist/{chunk-64cbt3ym.js → chunk-mtcxr3ns.js} +2 -2
  162. package/dist/{chunk-7s7cevjh.js → chunk-n7f38k3f.js} +2 -2
  163. package/dist/chunk-n7pyzjq1.js +2 -0
  164. package/dist/{chunk-0e5dx357.js → chunk-n9e1v175.js} +2 -2
  165. package/dist/{chunk-1gr60c40.js → chunk-nabyjzn5.js} +2 -2
  166. package/dist/{chunk-wpacvdsv.js → chunk-nn8pmwqz.js} +2 -2
  167. package/dist/chunk-nq2tqdb2.js +2 -0
  168. package/dist/chunk-nravn5bk.js +2 -0
  169. package/dist/chunk-p781sb6h.js +2 -0
  170. package/dist/chunk-pbx1417n.js +2 -0
  171. package/dist/{chunk-masqfje4.js → chunk-pqw5qz4e.js} +2 -2
  172. package/dist/{chunk-6ym1a5wa.js → chunk-pv7t4hw8.js} +2 -2
  173. package/dist/{chunk-vmfhnkxj.js → chunk-q98s7d94.js} +2 -2
  174. package/dist/{chunk-d582db8v.js → chunk-qc49fm8e.js} +2 -2
  175. package/dist/{chunk-j2ffde9c.js → chunk-qd8j2d63.js} +5 -5
  176. package/dist/{chunk-75dr7tyz.js → chunk-qdbyn3xv.js} +2 -2
  177. package/dist/chunk-qecs9e31.js +2 -0
  178. package/dist/{chunk-cdxdjn5n.js → chunk-qz9q0g2b.js} +2 -2
  179. package/dist/{chunk-jgqt7k0h.js → chunk-r013w7yb.js} +2 -2
  180. package/dist/{chunk-h3mwzf3d.js → chunk-r3s28905.js} +3 -3
  181. package/dist/chunk-r51vcbf0.js +2 -0
  182. package/dist/{chunk-5mjs63fv.js → chunk-r7z3mvej.js} +2 -2
  183. package/dist/chunk-rak4mkgh.js +2 -0
  184. package/dist/{chunk-v32jvbgx.js → chunk-rhyw89ap.js} +2 -2
  185. package/dist/{chunk-h1kvdf3t.js → chunk-sb2694hc.js} +2 -2
  186. package/dist/{chunk-3qedn07q.js → chunk-sdhkpkbs.js} +2 -2
  187. package/dist/{chunk-c22xq7a3.js → chunk-smd9rszw.js} +3 -3
  188. package/dist/{chunk-je27hf3t.js → chunk-sx1gjwb6.js} +3 -3
  189. package/dist/chunk-sykf5jnc.js +2 -0
  190. package/dist/{chunk-4g1s7gdh.js → chunk-t56ncd8f.js} +2 -2
  191. package/dist/{chunk-cans04tz.js → chunk-tbz64dbd.js} +3 -3
  192. package/dist/{chunk-zypgrbd9.js → chunk-tdaznr5w.js} +2 -2
  193. package/dist/{chunk-erp1g3as.js → chunk-tjc0ntnh.js} +2 -2
  194. package/dist/chunk-ts7h148j.js +2 -0
  195. package/dist/chunk-v0xy25sh.js +2 -0
  196. package/dist/{chunk-w562jf57.js → chunk-v6f6s828.js} +2 -2
  197. package/dist/{chunk-55m88zbv.js → chunk-vazspetj.js} +2 -2
  198. package/dist/{chunk-zv3bm3np.js → chunk-vbbndjfd.js} +2 -2
  199. package/dist/{chunk-swqbbw8q.js → chunk-vhxr0c4c.js} +2 -2
  200. package/dist/{chunk-bzzx1y15.js → chunk-vjgze5n7.js} +2 -2
  201. package/dist/{chunk-vev9q4t4.js → chunk-vvmmzcms.js} +3 -3
  202. package/dist/{chunk-e3nccytb.js → chunk-vvy4ke91.js} +2 -2
  203. package/dist/{chunk-mfmh7ztq.js → chunk-w5rg8wk8.js} +2 -2
  204. package/dist/{chunk-gbsn1qep.js → chunk-w7vcd8d1.js} +4 -4
  205. package/dist/{chunk-xqb4thy8.js → chunk-wf4z9w5x.js} +2 -2
  206. package/dist/chunk-wfk50eh6.js +2 -0
  207. package/dist/{chunk-qkn0y5wx.js → chunk-wxafew32.js} +2 -2
  208. package/dist/chunk-wxjm3mq8.js +2 -0
  209. package/dist/chunk-x0m4ctqf.js +2 -0
  210. package/dist/{chunk-eynwjzqp.js → chunk-x9rppnkq.js} +2 -2
  211. package/dist/{chunk-7tw7rn0m.js → chunk-xca0vnvk.js} +2 -2
  212. package/dist/chunk-xk41ehy8.js +2 -0
  213. package/dist/{chunk-pebkk426.js → chunk-xmy7ebed.js} +2 -2
  214. package/dist/{chunk-rn54592t.js → chunk-xpj8gb9a.js} +2 -2
  215. package/dist/chunk-xpts50f0.js +2 -0
  216. package/dist/chunk-xqsfaaae.js +2 -0
  217. package/dist/{chunk-bapn03er.js → chunk-y5xjf5sb.js} +2 -2
  218. package/dist/chunk-y780cd4m.js +2 -0
  219. package/dist/{chunk-m2n6sxf8.js → chunk-ybwevt5n.js} +2 -2
  220. package/dist/{chunk-e00dz09f.js → chunk-yc7w1en3.js} +2 -2
  221. package/dist/{chunk-ncgwbdmj.js → chunk-yfb5hj4w.js} +2 -2
  222. package/dist/{chunk-52wrk1mh.js → chunk-ymgc4317.js} +2 -2
  223. package/dist/{chunk-84ncszbf.js → chunk-yn3d949k.js} +2 -2
  224. package/dist/chunk-ynp45k84.js +2 -0
  225. package/dist/{chunk-7zww33h8.js → chunk-yqhvxm9m.js} +2 -2
  226. package/dist/{chunk-ermc9p1p.js → chunk-z930082m.js} +2 -2
  227. package/dist/{chunk-81838qem.js → chunk-zcfsbgvw.js} +2 -2
  228. package/dist/chunk-zewseva6.js +2 -0
  229. package/dist/client.js +1 -1
  230. package/dist/codex/activity-group.js +1 -1
  231. package/dist/codex/artifact-links.js +1 -1
  232. package/dist/codex/assistant-message.js +1 -1
  233. package/dist/codex/async-question-card.js +1 -1
  234. package/dist/codex/disclosure-state.js +1 -1
  235. package/dist/codex/edited-files-card.js +1 -1
  236. package/dist/codex/image-view-activity.js +1 -1
  237. package/dist/codex/markdown-renderer.js +1 -1
  238. package/dist/codex/markdown.css +4 -0
  239. package/dist/codex/navigation-audio.js +1 -1
  240. package/dist/codex/navigation-preview.js +1 -1
  241. package/dist/codex/navigation-rail.js +1 -1
  242. package/dist/codex/patch-view.js +1 -1
  243. package/dist/codex/plan.js +1 -1
  244. package/dist/codex/timeline-virtualizer.js +1 -1
  245. package/dist/codex/turn-activity.js +1 -1
  246. package/dist/codex/user-message.js +1 -1
  247. package/dist/codex/virtualized-turn-list.js +1 -1
  248. package/dist/collections/collection-emoji.js +1 -1
  249. package/dist/collections/collection-menu.js +1 -1
  250. package/dist/collections/collection-panel.js +1 -1
  251. package/dist/collections/collections.js +1 -1
  252. package/dist/collections/host.js +1 -1
  253. package/dist/collections/locales.js +1 -1
  254. package/dist/collections/model.js +1 -1
  255. package/dist/collections/store.js +1 -1
  256. package/dist/composer/completion-filter.js +1 -1
  257. package/dist/composer/completion-menu.js +1 -1
  258. package/dist/composer/completion-trigger.js +1 -1
  259. package/dist/composer/effort-slider.js +1 -1
  260. package/dist/composer/inline-document.js +1 -1
  261. package/dist/composer/inline-dom.js +1 -1
  262. package/dist/composer/menu-radio.js +1 -1
  263. package/dist/composer/model-select.js +1 -1
  264. package/dist/composer/permission-mode-select.js +1 -1
  265. package/dist/composer/prompt-input-attachments.js +1 -1
  266. package/dist/composer/prompt-input-clipboard.js +1 -1
  267. package/dist/composer/prompt-input-context.d.ts +2 -0
  268. package/dist/composer/prompt-input-context.js +1 -1
  269. package/dist/composer/prompt-input-inline.js +1 -1
  270. package/dist/composer/prompt-input-textarea.js +1 -1
  271. package/dist/composer/prompt-input.js +1 -1
  272. package/dist/conversation/action-card.js +1 -1
  273. package/dist/conversation/composer/app-mentions.js +1 -1
  274. package/dist/conversation/composer/apps-menu.js +1 -1
  275. package/dist/conversation/composer/composer-menu.js +1 -1
  276. package/dist/conversation/composer/composer.js +1 -1
  277. package/dist/conversation/composer/config-options.js +1 -1
  278. package/dist/conversation/composer/context.js +1 -1
  279. package/dist/conversation/composer/drafts.d.ts +2 -1
  280. package/dist/conversation/composer/drafts.js +1 -1
  281. package/dist/conversation/composer/file-items.js +1 -1
  282. package/dist/conversation/composer/long-text.js +1 -1
  283. package/dist/conversation/composer/mention-chips.js +1 -1
  284. package/dist/conversation/composer/mention-uri.js +1 -1
  285. package/dist/conversation/composer/model-menu.js +1 -1
  286. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  287. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  288. package/dist/conversation/composer/prediction.js +1 -1
  289. package/dist/conversation/composer/prompt-history.js +1 -1
  290. package/dist/conversation/composer/slash-command-button.js +1 -1
  291. package/dist/conversation/composer/submit-button.js +1 -1
  292. package/dist/conversation/composer/usage-meter.js +1 -1
  293. package/dist/conversation/connection-notice.js +1 -1
  294. package/dist/conversation/context.js +1 -1
  295. package/dist/conversation/conversation-body.js +1 -1
  296. package/dist/conversation/conversation-search.js +1 -1
  297. package/dist/conversation/conversation-view.js +1 -1
  298. package/dist/conversation/conversation.d.ts +1 -1
  299. package/dist/conversation/conversation.js +1 -1
  300. package/dist/conversation/diff-modal.js +1 -1
  301. package/dist/conversation/draft-project-picker.js +1 -1
  302. package/dist/conversation/session-actions.js +1 -1
  303. package/dist/conversation/subagent-sessions.js +1 -1
  304. package/dist/conversation/subagent-tasks.d.ts +1 -0
  305. package/dist/conversation/subagent-tasks.js +1 -1
  306. package/dist/desktop/desktop-composer.d.ts +3 -2
  307. package/dist/desktop/desktop-composer.js +1 -1
  308. package/dist/desktop/desktop.js +1 -1
  309. package/dist/desktop/draft-model-select.js +1 -1
  310. package/dist/desktop/load-image.js +1 -1
  311. package/dist/desktop/model-catalog.js +1 -1
  312. package/dist/desktop/model-recovery.d.ts +2 -2
  313. package/dist/desktop/model-recovery.js +1 -1
  314. package/dist/desktop/model-settings-action.js +1 -1
  315. package/dist/desktop/native-file-drop.d.ts +4 -1
  316. package/dist/desktop/native-file-drop.js +1 -1
  317. package/dist/generated/commands.js +1 -1
  318. package/dist/image-lightbox.js +1 -1
  319. package/dist/image-preview-dialog.js +1 -1
  320. package/dist/image.js +1 -1
  321. package/dist/lib/app-reference.js +1 -1
  322. package/dist/lib/application-metadata.js +1 -1
  323. package/dist/lib/chat-path.js +1 -1
  324. package/dist/lib/code-highlighter.js +1 -1
  325. package/dist/lib/file-url.js +1 -1
  326. package/dist/lib/fuzzy.js +1 -1
  327. package/dist/lib/group-blocks.js +1 -1
  328. package/dist/lib/image-encode.js +1 -1
  329. package/dist/lib/limits.js +1 -1
  330. package/dist/lib/markdown-parser.js +1 -1
  331. package/dist/lib/markdown-rules.js +1 -1
  332. package/dist/lib/model-name.js +1 -1
  333. package/dist/lib/pointer-centered-zoom.js +1 -1
  334. package/dist/lib/prepare-prompt-files.js +1 -1
  335. package/dist/lib/reference-presentation.js +1 -1
  336. package/dist/lib/stream-style.js +1 -1
  337. package/dist/lib/streaming-markdown.js +1 -1
  338. package/dist/lib/tool-artifacts.js +1 -1
  339. package/dist/locales.js +1 -1
  340. package/dist/mermaid/diagram.js +1 -1
  341. package/dist/mermaid/export.js +1 -1
  342. package/dist/mermaid/index.js +1 -1
  343. package/dist/mermaid/preview.js +1 -1
  344. package/dist/oauth/claude-login.js +1 -1
  345. package/dist/oauth.js +1 -1
  346. package/dist/plugins/catalog-header.js +1 -1
  347. package/dist/plugins/catalog-skeleton.js +1 -1
  348. package/dist/plugins/host.js +1 -1
  349. package/dist/plugins/locales.js +1 -1
  350. package/dist/plugins/new-chat-directory.js +1 -1
  351. package/dist/plugins/panel-item.js +1 -1
  352. package/dist/plugins/plugin-detail-page.js +1 -1
  353. package/dist/plugins/plugin-icon.js +1 -1
  354. package/dist/plugins/plugin-icons.js +1 -1
  355. package/dist/plugins/plugins-page.js +1 -1
  356. package/dist/plugins/plugins.js +1 -1
  357. package/dist/plugins/read-skill-document.js +1 -1
  358. package/dist/plugins/skill-document.js +1 -1
  359. package/dist/plugins/skills-tab.js +1 -1
  360. package/dist/plugins/store.js +1 -1
  361. package/dist/reference-projection.js +1 -1
  362. package/dist/search/chat-search.js +1 -1
  363. package/dist/search/codex-source-matches.js +1 -1
  364. package/dist/search/dom-matches.js +1 -1
  365. package/dist/search/find-bar.js +1 -1
  366. package/dist/search/literal-matches.js +1 -1
  367. package/dist/session-list/account-menu.js +1 -1
  368. package/dist/session-list/activity-list.js +1 -1
  369. package/dist/session-list/archived-sessions.js +1 -1
  370. package/dist/session-list/help-menu.js +1 -1
  371. package/dist/session-list/highlight.js +1 -1
  372. package/dist/session-list/host.js +1 -1
  373. package/dist/session-list/hover-info-card.js +1 -1
  374. package/dist/session-list/navigation-controls.js +1 -1
  375. package/dist/session-list/navigation-header.js +1 -1
  376. package/dist/session-list/navigation-store.js +1 -1
  377. package/dist/session-list/navigation-tabs.js +1 -1
  378. package/dist/session-list/navigation.js +1 -1
  379. package/dist/session-list/overflow-marquee.js +1 -1
  380. package/dist/session-list/platform.js +1 -1
  381. package/dist/session-list/row-stop-button.js +1 -1
  382. package/dist/session-list/session-groups.js +1 -1
  383. package/dist/session-list/session-info-card.js +1 -1
  384. package/dist/session-list/session-list.js +1 -1
  385. package/dist/session-list/session-row.js +1 -1
  386. package/dist/session-list/session-state-dot.js +1 -1
  387. package/dist/session-list/session-state-menu.js +1 -1
  388. package/dist/session-list/shortcut-hint.js +1 -1
  389. package/dist/session-list/shortcut.js +1 -1
  390. package/dist/session-list/sidebar-overlay.js +1 -1
  391. package/dist/session-list/trailing-swap.js +1 -1
  392. package/dist/session-list/use-activity-notification.js +1 -1
  393. package/dist/session-list/use-activity-preview.js +1 -1
  394. package/dist/session-list/use-cmd-held.js +1 -1
  395. package/dist/session-list/use-project-sessions.js +1 -1
  396. package/dist/session-list/virtual-session-rows.js +1 -1
  397. package/dist/session-timeline/activity-group.js +1 -1
  398. package/dist/session-timeline/activity-projection.js +1 -1
  399. package/dist/session-timeline/assistant-content.js +1 -1
  400. package/dist/session-timeline/assistant-image-references.js +1 -1
  401. package/dist/session-timeline/assistant-turn.d.ts +4 -0
  402. package/dist/session-timeline/assistant-turn.js +1 -1
  403. package/dist/session-timeline/async-questions.js +1 -1
  404. package/dist/session-timeline/edited-files-card.js +1 -1
  405. package/dist/session-timeline/history-timeline.js +1 -1
  406. package/dist/session-timeline/host.js +1 -1
  407. package/dist/session-timeline/image-generation-progress.js +1 -1
  408. package/dist/session-timeline/navigation-rail.js +1 -1
  409. package/dist/session-timeline/plan.js +1 -1
  410. package/dist/session-timeline/question-reply.js +1 -1
  411. package/dist/session-timeline/resource-content.js +1 -1
  412. package/dist/session-timeline/session-timeline.js +1 -1
  413. package/dist/session-timeline/timeline-registry.js +1 -1
  414. package/dist/session-timeline/turn-activity.js +1 -1
  415. package/dist/session-timeline/turn-error.js +1 -1
  416. package/dist/session-timeline/turn-retry.js +1 -1
  417. package/dist/session-timeline/turn-time.js +1 -1
  418. package/dist/session-timeline/turns.js +1 -1
  419. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  420. package/dist/session-timeline/user-message.js +1 -1
  421. package/dist/settings/codex-account-card.js +1 -1
  422. package/dist/settings/login-card.js +1 -1
  423. package/dist/settings/model-alias-settings.js +1 -1
  424. package/dist/settings/model-aliases.js +1 -1
  425. package/dist/settings/provider-logos.js +1 -1
  426. package/dist/settings/provider-section.js +1 -1
  427. package/dist/settings/providers-port.js +1 -1
  428. package/dist/settings/providers.js +1 -1
  429. package/dist/settings/settings-bridge.js +1 -1
  430. package/dist/settings/settings.js +1 -1
  431. package/package.json +2 -2
  432. package/dist/chunk-0g1hc09b.js +0 -2
  433. package/dist/chunk-0jg7hgp5.js +0 -2
  434. package/dist/chunk-24y0mvqf.js +0 -2
  435. package/dist/chunk-2bbdgf43.js +0 -2
  436. package/dist/chunk-317w17va.js +0 -2
  437. package/dist/chunk-3z86hy2s.js +0 -2
  438. package/dist/chunk-51xk5tw2.js +0 -2
  439. package/dist/chunk-5x5n3b15.js +0 -2
  440. package/dist/chunk-6c8wzcja.js +0 -2
  441. package/dist/chunk-6e84zbgs.js +0 -2
  442. package/dist/chunk-7hxdns4x.js +0 -2
  443. package/dist/chunk-8gt8yn8k.js +0 -4
  444. package/dist/chunk-9nbkggqn.js +0 -2
  445. package/dist/chunk-9wc4emwt.js +0 -2
  446. package/dist/chunk-acf4sdp7.js +0 -2
  447. package/dist/chunk-aht6f6tf.js +0 -2
  448. package/dist/chunk-amf0m4tb.js +0 -2
  449. package/dist/chunk-ax7c2kam.js +0 -2
  450. package/dist/chunk-bztkz3dz.js +0 -2
  451. package/dist/chunk-chn1mkv0.js +0 -2
  452. package/dist/chunk-cv0qbty5.js +0 -3
  453. package/dist/chunk-e1fzfaqj.js +0 -2
  454. package/dist/chunk-g3y0r56h.js +0 -2
  455. package/dist/chunk-gdtpwbqn.js +0 -1
  456. package/dist/chunk-gpv1dc5y.js +0 -2
  457. package/dist/chunk-hd11bfmp.js +0 -2
  458. package/dist/chunk-j62heyzq.js +0 -2
  459. package/dist/chunk-k2nbrerw.js +0 -2
  460. package/dist/chunk-knrc6kks.js +0 -2
  461. package/dist/chunk-kqwfwck2.js +0 -2
  462. package/dist/chunk-mckz9qv5.js +0 -2
  463. package/dist/chunk-njqan8zg.js +0 -2
  464. package/dist/chunk-nvb46gdw.js +0 -2
  465. package/dist/chunk-pzwnrxvk.js +0 -2
  466. package/dist/chunk-qzn6qtmy.js +0 -2
  467. package/dist/chunk-rkwq0grt.js +0 -2
  468. package/dist/chunk-rv3k0kfr.js +0 -2
  469. package/dist/chunk-s1nfyggb.js +0 -2
  470. package/dist/chunk-s8cj6aw6.js +0 -2
  471. package/dist/chunk-stv8pr4v.js +0 -2
  472. package/dist/chunk-t9t53gsj.js +0 -3
  473. package/dist/chunk-v2pa8yak.js +0 -4
  474. package/dist/chunk-vd6eqshg.js +0 -2
  475. package/dist/chunk-vqby71fp.js +0 -2
  476. package/dist/chunk-vzgn8exd.js +0 -2
  477. package/dist/chunk-w5q2ygsa.js +0 -2
  478. package/dist/chunk-xe7ep70k.js +0 -2
  479. package/dist/chunk-y4tj08c1.js +0 -2
  480. package/dist/chunk-y8gz9rsc.js +0 -2
  481. package/dist/chunk-z6dx6dnt.js +0 -2
  482. package/dist/chunk-zft4afb8.js +0 -2
  483. package/dist/chunk-zm0j9nw3.js +0 -2
  484. package/dist/chunk-zw4ehzza.js +0 -4
@@ -1,2 +1,2 @@
1
- function U(i,t){let e=new Set(t.map((n)=>n.startsWith("$")?n:`/${n}`));return[...i.matchAll(/[$/][^\s]+/g)].flatMap((n)=>e.has(n[0])&&(n.index===0||/[\s\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i[n.index-1]))?[{start:n.index,end:n.index+n[0].length,name:n[0],kind:n[0].startsWith("$")?"skill":"command"}]:[])}function Va(i,t){return U(i,t).filter((e)=>e.kind==="skill").map(({start:e,end:n,name:r})=>({start:e,end:n,name:r}))}var Bt="inline-flex items-baseline gap-1 align-baseline whitespace-nowrap leading-[inherit] font-normal text-[color:var(--app-reference-foreground,var(--link))] select-all",xs={command:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9"}]],skill:[["path",{d:"M12 5v16"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z"}]],app:[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1"}]]};
2
- export{U,Va,Bt,xs};
1
+ function H(i,t){let e=new Set(t.map((n)=>n.startsWith("$")?n:`/${n}`));return[...i.matchAll(/[$/][^\s]+/g)].flatMap((n)=>e.has(n[0])&&(n.index===0||/[\s\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul},。!?:;((]/u.test(i[n.index-1]))?[{start:n.index,end:n.index+n[0].length,name:n[0],kind:n[0].startsWith("$")?"skill":"command"}]:[])}function za(i,t){return H(i,t).filter((e)=>e.kind==="skill").map(({start:e,end:n,name:r})=>({start:e,end:n,name:r}))}var Ot="inline-flex items-baseline gap-1 align-baseline whitespace-nowrap leading-[inherit] font-normal text-[color:var(--app-reference-foreground,var(--link))] select-all",is={command:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9"}]],skill:[["path",{d:"M12 5v16"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z"}]],app:[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1"}]]};
2
+ export{H,za,Ot,is};
@@ -1,5 +1,5 @@
1
- import{U,Bt,xs}from"./chunk-4vayk46h.js";import{m}from"./chunk-75dr7tyz.js";function f(o,d,r){let s=document.createElement("span");if(s.contentEditable="false",s.setAttribute("aria-label",o),s.className=Bt,r){let t=document.createElement("img");t.src=r,t.alt="",t.draggable=!1,t.setAttribute("aria-hidden","true"),t.className="size-3.5 shrink-0 self-center object-contain";let l=document.createElement("span");return l.textContent=o,s.append(t,l),s}let a=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let[t,l]of Object.entries({viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))a.setAttribute(t,l);a.setAttribute("class","size-3.5 shrink-0 self-center");for(let[t,l]of xs[d]){let e=document.createElementNS("http://www.w3.org/2000/svg",t);for(let[i,c]of Object.entries(l))e.setAttribute(i,c);a.append(e)}let n=document.createElement("span");return n.textContent=o,s.append(a,n),s}function mr(o,d,r=[],s){let a=document.createDocumentFragment(),n="",t=()=>{let e=0;for(let i of U(n,r)){a.append(document.createTextNode(n.slice(e,i.start)));let c=f(i.name.slice(1),i.kind,i.kind==="skill"?s?.(i.name.slice(1)):void 0);if(i.kind==="skill")c.dataset.inlineSkill=i.name;else c.dataset.inlineCommand=i.name;a.append(c);let u=document.createElement("span");u.dataset.inlineAnchor="",u.textContent="​",a.append(u),e=i.end}if(n.slice(e))a.append(document.createTextNode(n.slice(e)));n=""};for(let e of m(d)){if(typeof e==="string"){n+=e;continue}t();let i=f(e.name,"app");i.dataset.inlineApp=e.id,a.append(i);let c=document.createElement("span");c.dataset.inlineAnchor="",c.textContent="​",a.append(c)}t();let l=document.createElement("br");l.dataset.inlineCaret="",a.append(l),o.replaceChildren(a)}function fo(o,d){let r=[],s=new Map(d.map((n)=>[n.id,n])),a=(n)=>{if(n.nodeType===Node.TEXT_NODE){r.push(...(n.textContent??"").split(""));return}if(n instanceof HTMLElement){if(n.hasAttribute("data-inline-caret"))return;if(n.hasAttribute("data-inline-anchor")){r.push(...(n.textContent??"").replace("​","").split(""));return}let t=n.dataset.inlineSkill??n.dataset.inlineCommand;if(t!==void 0){r.push(...t.split(""));return}let l=n.dataset.inlineApp;if(l!==void 0){let i=s.get(l);if(i)r.push(i);return}if(n.tagName==="BR"){r.push(`
1
+ import{H,Ot,is}from"./chunk-3btheq4v.js";import{p}from"./chunk-qdbyn3xv.js";function f(o,d,r){let s=document.createElement("span");if(s.contentEditable="false",s.setAttribute("aria-label",o),s.className=Ot,r){let t=document.createElement("img");t.src=r,t.alt="",t.draggable=!1,t.setAttribute("aria-hidden","true"),t.className="size-3.5 shrink-0 self-center object-contain";let l=document.createElement("span");return l.textContent=o,s.append(t,l),s}let a=document.createElementNS("http://www.w3.org/2000/svg","svg");for(let[t,l]of Object.entries({viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))a.setAttribute(t,l);a.setAttribute("class","size-3.5 shrink-0 self-center");for(let[t,l]of is[d]){let e=document.createElementNS("http://www.w3.org/2000/svg",t);for(let[i,c]of Object.entries(l))e.setAttribute(i,c);a.append(e)}let n=document.createElement("span");return n.textContent=o,s.append(a,n),s}function sr(o,d,r=[],s){let a=document.createDocumentFragment(),n="",t=()=>{let e=0;for(let i of H(n,r)){a.append(document.createTextNode(n.slice(e,i.start)));let c=f(i.name.slice(1),i.kind,i.kind==="skill"?s?.(i.name.slice(1)):void 0);if(i.kind==="skill")c.dataset.inlineSkill=i.name;else c.dataset.inlineCommand=i.name;a.append(c);let u=document.createElement("span");u.dataset.inlineAnchor="",u.textContent="​",a.append(u),e=i.end}if(n.slice(e))a.append(document.createTextNode(n.slice(e)));n=""};for(let e of p(d)){if(typeof e==="string"){n+=e;continue}t();let i=f(e.name,"app");i.dataset.inlineApp=e.id,a.append(i);let c=document.createElement("span");c.dataset.inlineAnchor="",c.textContent="​",a.append(c)}t();let l=document.createElement("br");l.dataset.inlineCaret="",a.append(l),o.replaceChildren(a)}function fo(o,d){let r=[],s=new Map(d.map((n)=>[n.id,n])),a=(n)=>{if(n.nodeType===Node.TEXT_NODE){r.push(...(n.textContent??"").split(""));return}if(n instanceof HTMLElement){if(n.hasAttribute("data-inline-caret"))return;if(n.hasAttribute("data-inline-anchor")){r.push(...(n.textContent??"").replace("​","").split(""));return}let t=n.dataset.inlineSkill??n.dataset.inlineCommand;if(t!==void 0){r.push(...t.split(""));return}let l=n.dataset.inlineApp;if(l!==void 0){let i=s.get(l);if(i)r.push(i);return}if(n.tagName==="BR"){r.push(`
2
2
  `);return}if((n.tagName==="DIV"||n.tagName==="P")&&r.length&&r.at(-1)!==`
3
3
  `)r.push(`
4
- `)}for(let t of n.childNodes)a(t)};for(let n of o.childNodes)a(n);return r}function gr(o,d,r){let s=window.getSelection();if(!s?.rangeCount)return r;let a=s.getRangeAt(0);if(!o.contains(a.startContainer)||!o.contains(a.endContainer))return r;let n=(t,l)=>{let e=document.createRange();return e.selectNodeContents(o),e.setEnd(t,l),fo(e.cloneContents(),d).length};return{start:n(a.startContainer,a.startOffset),end:n(a.endContainer,a.endOffset)}}function ho(o,d){let r=(n)=>{let t=Math.max(0,n);for(let[l,e]of[...o.childNodes].entries())if(e.nodeType===Node.TEXT_NODE){let i=e.textContent?.length??0;if(t<=i)return[e,t];t-=i}else if(e instanceof HTMLElement&&e.hasAttribute("data-inline-anchor")){let i=e.firstChild,c=(e.textContent??"").replace("​","").length;if(i&&t<=c)return[i,t+(i.textContent?.startsWith("​")?1:0)];t-=c}else if(e instanceof HTMLElement&&(e.dataset.inlineSkill!==void 0||e.dataset.inlineCommand!==void 0)){let i=(e.dataset.inlineSkill??e.dataset.inlineCommand).length;if(t<i)return[o,l];t-=i}else if(e instanceof HTMLElement&&e.dataset.inlineApp!==void 0){if(t===0)return[o,l];t--}else if(e instanceof HTMLElement&&e.tagName==="BR")return[o,l];return[o,o.childNodes.length]},s=document.createRange();s.setStart(...r(d.start)),s.setEnd(...r(d.end));let a=window.getSelection();a?.removeAllRanges(),a?.addRange(s)}
5
- export{mr,fo,gr,ho};
4
+ `)}for(let t of n.childNodes)a(t)};for(let n of o.childNodes)a(n);return r}function ar(o,d,r){let s=window.getSelection();if(!s?.rangeCount)return r;let a=s.getRangeAt(0);if(!o.contains(a.startContainer)||!o.contains(a.endContainer))return r;let n=(t,l)=>{let e=document.createRange();return e.selectNodeContents(o),e.setEnd(t,l),fo(e.cloneContents(),d).length};return{start:n(a.startContainer,a.startOffset),end:n(a.endContainer,a.endOffset)}}function ho(o,d){let r=(n)=>{let t=Math.max(0,n);for(let[l,e]of[...o.childNodes].entries())if(e.nodeType===Node.TEXT_NODE){let i=e.textContent?.length??0;if(t<=i)return[e,t];t-=i}else if(e instanceof HTMLElement&&e.hasAttribute("data-inline-anchor")){let i=e.firstChild,c=(e.textContent??"").replace("​","").length;if(i&&t<=c)return[i,t+(i.textContent?.startsWith("​")?1:0)];t-=c}else if(e instanceof HTMLElement&&(e.dataset.inlineSkill!==void 0||e.dataset.inlineCommand!==void 0)){let i=(e.dataset.inlineSkill??e.dataset.inlineCommand).length;if(t<i)return[o,l];t-=i}else if(e instanceof HTMLElement&&e.dataset.inlineApp!==void 0){if(t===0)return[o,l];t--}else if(e instanceof HTMLElement&&e.tagName==="BR")return[o,l];return[o,o.childNodes.length]},s=document.createRange();s.setStart(...r(d.start)),s.setEnd(...r(d.end));let a=window.getSelection();a?.removeAllRanges(),a?.addRange(s)}
5
+ export{sr,fo,ar,ho};
@@ -1,4 +1,4 @@
1
- import{it}from"./chunk-cp4wxmh5.js";import{Yi}from"./chunk-x49qjrbk.js";import{l}from"./chunk-6283nzqs.js";import{ve}from"./chunk-tgnftxyb.js";import{autoUpdate as ot}from"@floating-ui/dom";import{cn as rt}from"cn";import{BookOpenIcon as st,FileIcon as at,SquareSlashIcon as lt,StoreIcon as ut}from"lucide-react";import{useCallback as ct,useEffect as y,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as g}from"react";import{createPortal as mt}from"react-dom";import{Button as _}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as d,jsxs as T,Fragment as pt}from"react/jsx-runtime";function Xi({handleRef:a,anchorRef:f,commands:q,renderSlashMenu:k,searchFiles:u,onMention:R,onSearchError:Q,fileSearchDebounceMs:M=0,bashMode:z=!1,forcedOpen:i=!1,onForcedOpenChange:c,emptyLabel:F,fileStatusLabels:L,morePlugins:N}){let D=ve(),s=D.textInput.value,[K,P]=g(0),[O,S]=g(!1),[x,B]=g(null),[E,h]=g(0),U=Z(null);y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>P(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[a]);let V=Y(()=>z&&s.startsWith("!")?null:Yi(s,K),[s,K,z]),o=V?.kind==="at"&&!u?null:V,H=`${o?.kind??"forced"}:${o?.query??""}:${i}`,[tt,et]=g(H);if(tt!==H)et(H),h(0);let I=Z(null);y(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=s;else if(s!==I.current)c?.(!1)},[i,s,c]);let b=o?.kind==="at"?o.query:null;y(()=>{if(b===null||!u){B(null);return}let t=!0,e=()=>{u(b).then((r)=>{if(t)B({query:b,search:u,items:r})},(r)=>{if(t)B({query:b,search:u,items:[]}),Q(r)})},n=M>0?window.setTimeout(e,M):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[b,u,M,Q]);let v=Y(()=>{if(o?.kind==="at")return x?.query===o.query&&x.search===u?x.items:[];if(k&&(o?.kind==="slash"||i))return[];if(o)return it(q,o.query);if(i)return it(q,"");return[]},[o,i,q,x,u,k]),m=o?o.kind==="slash":i;y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>S(!0),n=()=>{if(S(!1),i)c?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[a,i,c]),y(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let p=O&&(o!==null?o.kind==="slash"||v.length>0||!!L:i);y(()=>{if(!p)return;U.current?.querySelector(`[data-idx="${E}"]`)?.scrollIntoView({block:"nearest"})},[E,p]);function A(t){let e=a.current?.getTextarea();if(!e)return;let n,r;if(o){let j=o.kind==="slash"?`${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `:`@${t.label} `;if(n=s.slice(0,o.start)+j+s.slice(o.end),o.kind==="at")R?.(t.payload);r=o.start+j.length}else if(i)n=`${s.length===0||s.endsWith(`
1
+ import{tt}from"./chunk-fz9y067h.js";import{Mr}from"./chunk-b4wh6k5s.js";import{l}from"./chunk-6283nzqs.js";import{fe}from"./chunk-32zzqeyf.js";import{autoUpdate as rt}from"@floating-ui/dom";import{cn as st}from"cn";import{BookOpenIcon as it,FileIcon as at,SquareSlashIcon as lt,StoreIcon as ut}from"lucide-react";import{useCallback as ct,useEffect as y,useLayoutEffect as X,useMemo as Y,useRef as Z,useState as g}from"react";import{createPortal as mt}from"react-dom";import{Button as _}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as d,jsxs as T,Fragment as pt}from"react/jsx-runtime";function Tr({handleRef:a,anchorRef:f,commands:q,renderSlashMenu:k,searchFiles:u,onMention:R,onSearchError:Q,fileSearchDebounceMs:M=0,bashMode:z=!1,forcedOpen:i=!1,onForcedOpenChange:c,emptyLabel:F,fileStatusLabels:L,morePlugins:N}){let D=fe(),s=D.textInput.value,[K,P]=g(0),[O,S]=g(!1),[x,B]=g(null),[E,h]=g(0),U=Z(null);y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>P(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}},[a]);let V=Y(()=>z&&s.startsWith("!")?null:Mr(s,K),[s,K,z]),o=V?.kind==="at"&&!u?null:V,H=`${o?.kind??"forced"}:${o?.query??""}:${i}`,[et,nt]=g(H);if(et!==H)nt(H),h(0);let I=Z(null);y(()=>{if(!i){I.current=null;return}if(I.current===null)I.current=s;else if(s!==I.current)c?.(!1)},[i,s,c]);let b=o?.kind==="at"?o.query:null;y(()=>{if(b===null||!u){B(null);return}let t=!0,e=()=>{u(b).then((r)=>{if(t)B({query:b,search:u,items:r})},(r)=>{if(t)B({query:b,search:u,items:[]}),Q(r)})},n=M>0?window.setTimeout(e,M):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[b,u,M,Q]);let v=Y(()=>{if(o?.kind==="at")return x?.query===o.query&&x.search===u?x.items:[];if(k&&(o?.kind==="slash"||i))return[];if(o)return tt(q,o.query);if(i)return tt(q,"");return[]},[o,i,q,x,u,k]),m=o?o.kind==="slash":i;y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=()=>S(!0),n=()=>{if(S(!1),i)c?.(!1)};return S(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[a,i,c]),y(()=>{if(i)a.current?.getTextarea()?.focus()},[i,a]);let p=O&&(o!==null?o.kind==="slash"||v.length>0||!!L:i);y(()=>{if(!p)return;U.current?.querySelector(`[data-idx="${E}"]`)?.scrollIntoView({block:"nearest"})},[E,p]);function A(t){let e=a.current?.getTextarea();if(!e)return;let n,r;if(o){let j=o.kind==="slash"?`${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `:`@${t.label} `;if(n=s.slice(0,o.start)+j+s.slice(o.end),o.kind==="at")R?.(t.payload);r=o.start+j.length}else if(i)n=`${s.length===0||s.endsWith(`
2
2
  `)?s:`${s}
3
- `}${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `,r=n.length,c?.(!1);else return;D.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=(n)=>{if(!p||m&&k)return;if(a.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>v.length===0?0:Math.min(v.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=v[E];if(r)A(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)P(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else c?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,G]=g(null),[W,nt]=g(null),C=ct(()=>{let t=f?.current;if(!t)return;let e=t.getBoundingClientRect();G({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[f]);if(X(()=>{if(!p){G(null);return}C()},[p,C]),X(()=>{let t=f?.current;if(!p||!t||!W)return;return ot(t,W,C,{animationFrame:!0})},[p,W,f,C]),p&&m&&k)return k({query:o?.query??"",close:()=>{if(o)P(o.start),a.current?.getTextarea()?.setSelectionRange(o.start,o.start);else c?.(!1)},selectCommand:(t)=>A({key:t,label:t,payload:t}),replaceQuery:(t)=>{let e=a.current?.getTextarea();if(!e)return;let n=o?.start??e.selectionStart,r=o?.end??e.selectionEnd;D.textInput.setInput(s.slice(0,n)+s.slice(r)),c?.(!1),requestAnimationFrame(()=>{if(a.current?.getTextarea()!==e)return;e.focus(),e.setSelectionRange(n,n),t()})}});if(!p||f&&!w)return null;let J=d("div",{ref:nt,className:f?"fixed z-50":l.position,style:f&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:T("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:[T("div",{className:l.list,children:[v.length===0&&m&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:F}),v.length===0&&!m&&L&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===b&&x.search===u?L.empty:L.loading}),v.map((t,e)=>{let n=m?t.payload.startsWith("$")?st:lt:at;return T(_,{type:"button",variant:"ghost",role:"option","aria-selected":e===E,"data-idx":e,onMouseDown:(r)=>{r.preventDefault(),A(t)},onMouseEnter:()=>h(e),className:rt(m?l.row:"flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===E&&l.selected),children:[d(n,{className:m?l.icon:"text-muted-foreground size-4 shrink-0"}),d("span",{className:m?l.label:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&d("span",{"data-slot":"description",className:l.description,children:t.description})]},t.key)})]}),m&&N&&d(pt,{children:T(_,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),c?.(!1),N.open()},className:l.row,children:[d(ut,{className:l.icon}),d("span",{className:l.label,children:N.label})]})})]})});return f?mt(J,document.body):J}
4
- export{Xi};
3
+ `}${t.payload.startsWith("$")?t.payload:`/${t.payload}`} `,r=n.length,c?.(!1);else return;D.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(r,r)})}y(()=>{let t=a.current?.getTextarea();if(!t)return;let e=(n)=>{if(!p||m&&k)return;if(a.current?.isComposing()||n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),h((r)=>v.length===0?0:Math.min(v.length-1,r+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),h((r)=>Math.max(0,r-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let r=v[E];if(r)A(r)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),o)P(Math.max(0,o.start-1)),t.setSelectionRange(o.start,o.start);else c?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,G]=g(null),[W,ot]=g(null),C=ct(()=>{let t=f?.current;if(!t)return;let e=t.getBoundingClientRect();G({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[f]);if(X(()=>{if(!p){G(null);return}C()},[p,C]),X(()=>{let t=f?.current;if(!p||!t||!W)return;return rt(t,W,C,{animationFrame:!0})},[p,W,f,C]),p&&m&&k)return k({query:o?.query??"",close:()=>{if(o)P(o.start),a.current?.getTextarea()?.setSelectionRange(o.start,o.start);else c?.(!1)},selectCommand:(t)=>A({key:t,label:t,payload:t}),replaceQuery:(t)=>{let e=a.current?.getTextarea();if(!e)return;let n=o?.start??e.selectionStart,r=o?.end??e.selectionEnd;D.textInput.setInput(s.slice(0,n)+s.slice(r)),c?.(!1),requestAnimationFrame(()=>{if(a.current?.getTextarea()!==e)return;e.focus(),e.setSelectionRange(n,n),t()})}});if(!p||f&&!w)return null;let J=d("div",{ref:ot,className:f?"fixed z-50":l.position,style:f&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:T("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:l.surface,children:[T("div",{className:l.list,children:[v.length===0&&m&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:F}),v.length===0&&!m&&L&&d("div",{role:"option","aria-disabled":"true","aria-selected":"false",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===b&&x.search===u?L.empty:L.loading}),v.map((t,e)=>{let n=m?t.payload.startsWith("$")?it:lt:at;return T(_,{type:"button",variant:"ghost",role:"option","aria-selected":e===E,"data-idx":e,onMouseDown:(r)=>{r.preventDefault(),A(t)},onMouseEnter:()=>h(e),className:st(m?l.row:"flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===E&&l.selected),children:[d(n,{className:m?l.icon:"text-muted-foreground size-4 shrink-0"}),d("span",{className:m?l.label:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&d("span",{"data-slot":"description",className:l.description,children:t.description})]},t.key)})]}),m&&N&&d(pt,{children:T(_,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),c?.(!1),N.open()},className:l.row,children:[d(ut,{className:l.icon}),d("span",{className:l.label,children:N.label})]})})]})});return f?mt(J,document.body):J}
4
+ export{Tr};
@@ -1,2 +1,2 @@
1
- function i(n,o=0){if(o>32)throw Error("Session input config is too deeply nested");if(n===null||typeof n==="string"||typeof n==="boolean")return n;if(typeof n==="number"&&Number.isFinite(n))return n;if(Array.isArray(n))return n.map((t)=>i(t,o+1));if(n&&typeof n==="object"&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null))return Object.fromEntries(Object.keys(n).toSorted().map((t)=>[t,i(n[t],o+1)]));throw Error("Session input config must contain only JSON values")}function Vi(n){if(!n||typeof n!=="object"||!("mode"in n)||typeof n.mode!=="string"||!n.mode.trim()||n.mode.length>128||/\p{Cc}/u.test(n.mode)||!("config"in n)||!n.config||typeof n.config!=="object"||Array.isArray(n.config))throw Error("Expected session input configuration with mode and config");let o=i(n.config),t={mode:n.mode,config:o};if(new TextEncoder().encode(JSON.stringify(t)).byteLength>65536)throw Error("Session input config exceeds 64 KiB");return t}function Nn(n,o){if(!n||typeof n!=="object"||!("sessionId"in n)||n.sessionId!==o||!("revision"in n)||typeof n.revision!=="number"||!Number.isSafeInteger(n.revision)||n.revision<0||!("inputConfig"in n))throw Error("Invalid Codex session input snapshot");return{sessionId:o,revision:n.revision,inputConfig:n.inputConfig===null?null:Vi(n.inputConfig)}}
2
- export{Vi,Nn};
1
+ function i(n,o=0){if(o>32)throw Error("Session input config is too deeply nested");if(n===null||typeof n==="string"||typeof n==="boolean")return n;if(typeof n==="number"&&Number.isFinite(n))return n;if(Array.isArray(n))return n.map((t)=>i(t,o+1));if(n&&typeof n==="object"&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null))return Object.fromEntries(Object.keys(n).toSorted().map((t)=>[t,i(n[t],o+1)]));throw Error("Session input config must contain only JSON values")}function cr(n){if(!n||typeof n!=="object"||!("mode"in n)||typeof n.mode!=="string"||!n.mode.trim()||n.mode.length>128||/\p{Cc}/u.test(n.mode)||!("config"in n)||!n.config||typeof n.config!=="object"||Array.isArray(n.config))throw Error("Expected session input configuration with mode and config");let o=i(n.config),t={mode:n.mode,config:o};if(new TextEncoder().encode(JSON.stringify(t)).byteLength>65536)throw Error("Session input config exceeds 64 KiB");return t}function On(n,o){if(!n||typeof n!=="object"||!("sessionId"in n)||n.sessionId!==o||!("revision"in n)||typeof n.revision!=="number"||!Number.isSafeInteger(n.revision)||n.revision<0||!("inputConfig"in n))throw Error("Invalid Codex session input snapshot");return{sessionId:o,revision:n.revision,inputConfig:n.inputConfig===null?null:cr(n.inputConfig)}}
2
+ export{cr,On};
@@ -1,2 +1,2 @@
1
- import{a,o}from"./chunk-5mjs63fv.js";import{QUICK_CHATS_GROUP as m,sessionGroup as l}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function Hs(i){let t=a(),e=o((s)=>s.projectContext),c=i===null?m:e?l(e,{cwd:t.projectPath(i)}).id:null,u=o((s)=>s.sessionList),d=o((s)=>s.connection),r=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!r&&n===null)t.listSessions().catch(()=>{return})},[t,d,r,n]),{result:L(()=>{if(r&&e)return{status:"ready",sessionRows:u.filter((s)=>l(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,u,r,n,c,e]),retry:f}}
2
- export{Hs};
1
+ import{a,o}from"./chunk-r7z3mvej.js";import{QUICK_CHATS_GROUP as m,sessionGroup as l}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function aa(i){let t=a(),e=o((s)=>s.projectContext),c=i===null?m:e?l(e,{cwd:t.projectPath(i)}).id:null,u=o((s)=>s.sessionList),d=o((s)=>s.connection),r=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!r&&n===null)t.listSessions().catch(()=>{return})},[t,d,r,n]),{result:L(()=>{if(r&&e)return{status:"ready",sessionRows:u.filter((s)=>l(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,u,r,n,c,e]),retry:f}}
2
+ export{aa};
@@ -1,2 +1,2 @@
1
- import{Et}from"./chunk-rv3k0kfr.js";import{isContentEntry as d,isImage as l,isText as p}from"@nyssance/codex-acp-v2/client";var Ma="generate_image",Na=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],Ka={model:"wham",size:"auto"},ji={name:Ma,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1},annotations:{readOnlyHint:!0}};function c(o){let t=o.content.filter(d).map((i)=>i.content);if(t.length)return t;let r=o.rawOutput?.result;return Array.isArray(r?.content)?r.content:[]}function $i(o){return o.items.flatMap((t)=>{if(!Et(t))return[];let r=t.rawInput,i=c(t),s={};for(let n of i){if(!p(n)||!n.text.startsWith("{"))continue;try{let e=JSON.parse(n.text);if(e&&typeof e==="object"&&"kind"in e&&e.kind==="alwith.image")s={..."model"in e&&typeof e.model==="string"?{model:e.model}:{},..."size"in e&&typeof e.size==="string"?{size:e.size}:{}}}catch(e){if(!(e instanceof SyntaxError))throw e}}return i.flatMap((n,e)=>{if(!l(n))return[];let{mimeType:a,data:m}=n;return[{id:`${t.id}:${e}`,toolId:t.id,...s,...typeof r?.arguments?.prompt==="string"?{prompt:r.arguments.prompt}:{},mimeType:a,data:m,src:`data:${a};base64,${m}`}]})})}function te(o){let t=Na.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function Wa(o,t,r){let i=te(o);if(i.provider!=="seedream")throw Error("Expected a Seedream model");if(r.length>i.maxReferences)throw Error(`This model accepts at most ${i.maxReferences} reference images`);return{model:i.id,prompt:t,size:o.size,response_format:"b64_json",watermark:!1,...r.length?{image:r}:{},...i.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
2
- export{Ma,Na,Ka,ji,$i,te,Wa};
1
+ import{_t}from"./chunk-h1t76wws.js";import{isContentEntry as d,isImage as l,isText as p}from"@nyssance/codex-acp-v2/client";var Oa="generate_image",Ha=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],Za={model:"wham",size:"auto"},fr={name:Oa,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1},annotations:{readOnlyHint:!0}};function c(o){let t=o.content.filter(d).map((i)=>i.content);if(t.length)return t;let r=o.rawOutput?.result;return Array.isArray(r?.content)?r.content:[]}function hr(o){return o.items.flatMap((t)=>{if(!_t(t))return[];let r=t.rawInput,i=c(t),s={};for(let n of i){if(!p(n)||!n.text.startsWith("{"))continue;try{let e=JSON.parse(n.text);if(e&&typeof e==="object"&&"kind"in e&&e.kind==="alwith.image")s={..."model"in e&&typeof e.model==="string"?{model:e.model}:{},..."size"in e&&typeof e.size==="string"?{size:e.size}:{}}}catch(e){if(!(e instanceof SyntaxError))throw e}}return i.flatMap((n,e)=>{if(!l(n))return[];let{mimeType:a,data:m}=n;return[{id:`${t.id}:${e}`,toolId:t.id,...s,...typeof r?.arguments?.prompt==="string"?{prompt:r.arguments.prompt}:{},mimeType:a,data:m,src:`data:${a};base64,${m}`}]})})}function te(o){let t=Ha.find((r)=>r.id===o.model);if(!t||!t.sizes.includes(o.size))throw Error("Invalid image model or size");return t}function Qa(o,t,r){let i=te(o);if(i.provider!=="seedream")throw Error("Expected a Seedream model");if(r.length>i.maxReferences)throw Error(`This model accepts at most ${i.maxReferences} reference images`);return{model:i.id,prompt:t,size:o.size,response_format:"b64_json",watermark:!1,...r.length?{image:r}:{},...i.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
2
+ export{Oa,Ha,Za,fr,hr,te,Qa};
@@ -1,2 +1,2 @@
1
- import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function Or(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
2
- export{Or};
1
+ import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function ki(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
2
+ export{ki};
@@ -0,0 +1,2 @@
1
+ import{o}from"./chunk-r7z3mvej.js";import{ze,ne,ve}from"./chunk-ezaypwps.js";import{useEffect as S,useMemo as f}from"react";function xa(s){let c=ne((i)=>i.activityOrder),a=o((i)=>{let n=Object.values(i.runStates).filter((t)=>c.includes(t.sessionId)&&(t.state==="done"||t.state==="requires_action")&&ze(i,t.sessionId)).map((t)=>[t.sessionId,JSON.stringify([t.state,t.since,t.interruption])]);return JSON.stringify(n)}),e=f(()=>new Map(JSON.parse(a)),[a]),u=ne((i)=>i.activitySeen),r=ve();return S(()=>{if(s==="activity")r({activitySeen:e})},[s,e,r]),s!=="activity"&&[...e].some(([i,n])=>u.get(i)!==n)}
2
+ export{xa};
@@ -1,2 +1,2 @@
1
- import{Si}from"./chunk-2bbdgf43.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as _,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as h,useId as T,useLayoutEffect as N,useRef as S,useState as p}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as f}from"react/jsx-runtime";var U={allow_once:{icon:_},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function wi({requestId:u,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,v]=p(0),[s,x]=p(null),[l,A]=p(null),g=S(null),c=Si(D);h(()=>{v(0)},[u]),h(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)g.current?.focus()},[u,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);x({left:(window.innerWidth-o)/2,width:o,bottom:24});return}x({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(N(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[u,n,d]),N(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=f("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border flex min-h-0 min-w-0 flex-col overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[i("div",{"data-permission-header":!0,className:"shrink-0 px-3 pt-2",children:f("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]})}),i("div",{"data-permission-content":!0,className:"min-h-0 flex-1 overflow-auto overscroll-contain px-3 pb-2",children:P}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:g,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),v((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"border-border shrink-0 border-t outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??_,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return f("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
2
- export{wi};
1
+ import{Zi}from"./chunk-n7pyzjq1.js";import{autoUpdate as L}from"@floating-ui/dom";import{cn as I}from"cn";import{CheckCheckIcon as M,CheckIcon as _,ShieldXIcon as V,XIcon as F}from"lucide-react";import{useCallback as H,useEffect as h,useId as T,useLayoutEffect as N,useRef as S,useState as p}from"react";import{createPortal as z}from"react-dom";import{jsx as i,jsxs as f}from"react/jsx-runtime";var U={allow_once:{icon:_},allow_always:{icon:M},reject_once:{icon:F},reject_always:{icon:V}};function Wi({requestId:u,options:D,title:E,children:P,total:w=1,alwaysLabel:j="always",autoFocus:y="always",anchorRef:n,onRespond:r}){let b=T(),[a,v]=p(0),[s,x]=p(null),[l,A]=p(null),g=S(null),c=Zi(D);h(()=>{v(0)},[u]),h(()=>{let e=document.activeElement;if(y==="always"||e===null||e===document.body)g.current?.focus()},[u,l,y]);let d=H(()=>{let e=n?.current;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0){let o=Math.min(640,window.innerWidth*0.9);x({left:(window.innerWidth-o)/2,width:o,bottom:24});return}x({left:t.left,width:t.width,bottom:window.innerHeight-t.bottom+20})},[n]);if(N(()=>{if(!n)return;let e=0,t=()=>{if(n.current)d();else e=requestAnimationFrame(t)};return t(),()=>cancelAnimationFrame(e)},[u,n,d]),N(()=>{let e=n?.current;if(!e||!l)return;return L(e,l,d,{animationFrame:!0})},[n,l,d]),n&&!s)return null;let k=f("div",{ref:A,"data-overlay":"permission-request",className:I("bg-card border-border flex min-h-0 min-w-0 flex-col overflow-hidden rounded-lg border",n&&"fixed z-50"),style:n&&s?{left:s.left,width:s.width,bottom:s.bottom}:void 0,children:[i("div",{"data-permission-header":!0,className:"shrink-0 px-3 pt-2",children:f("div",{className:"flex items-center justify-between gap-2",children:[i("div",{id:b,className:"text-foreground text-sm font-medium",children:E}),w>1&&i("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${w}`})]})}),i("div",{"data-permission-content":!0,className:"min-h-0 flex-1 overflow-auto overscroll-contain px-3 pb-2",children:P}),i("div",{role:"listbox","aria-labelledby":b,tabIndex:0,ref:g,onKeyDown:(e)=>{let t=c.length;if(t===0&&e.key!=="Escape")return;if(e.key==="ArrowDown"||e.key==="ArrowUp")e.preventDefault(),v((o)=>e.key==="ArrowDown"?(o+1)%t:(o-1+t)%t);else if(e.key==="Enter")e.preventDefault(),r(c[a].optionId);else if(e.key==="Escape")e.preventDefault(),r(null);else if(/^[1-9]$/.test(e.key)&&Number(e.key)<=t)e.preventDefault(),r(c[Number(e.key)-1].optionId)},className:"border-border shrink-0 border-t outline-none",children:c.map((e,t)=>{let o=e.kind??"allow_once",C=U[o]?.icon??_,K=o==="allow_always"||o==="reject_always",O=o==="reject_once"||o==="reject_always";return f("div",{role:"option",tabIndex:-1,"aria-selected":t===a,title:e.description,onClick:()=>void r(e.optionId),onKeyDown:(m)=>{if(m.key==="Enter"||m.key===" ")m.preventDefault(),m.stopPropagation(),r(e.optionId)},className:I("flex cursor-pointer items-center gap-2 px-3 py-1.5 text-sm select-none",t===a?"bg-ring text-accent-foreground":"text-foreground",O&&t!==a&&"text-muted-foreground"),children:[i("span",{className:"min-w-3 text-xs opacity-70",children:t+1}),i(C,{className:"size-3.5 shrink-0 opacity-80"}),i("span",{className:"min-w-0 flex-1 truncate",children:e.name}),K&&i("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] tracking-wide uppercase",children:j})]},e.optionId)})})]});return n?z(k,document.body):k}
2
+ export{Wi};
@@ -0,0 +1,2 @@
1
+ import{createContext as t,useContext as o}from"react";var lo=t(null);function an(){let e=o(lo);if(e===null)throw Error("Composer is missing");return e}
2
+ export{lo,an};
@@ -1,2 +1,2 @@
1
- var t=new Map;var a=0;function Fo(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Fo(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function Kr(e,n){return d??=new l,d.connect(e,n)}
2
- export{Fo,Kr};
1
+ var t=new Map;var a=0;function Lo(e,n){let r=n?void 0:t.get(e);if(r===void 0)return null;return t.delete(e),t.set(e,r),{...r,tokens:structuredClone(r.tokens)}}function c(e){if(e.isStreaming||e.text.length>1048576)return;if(t.delete(e.text))a-=e.text.length;t.set(e.text,{...e,tokens:structuredClone(e.tokens)}),a+=e.text.length;while(a>2097152||t.size>200){let n=t.keys().next().value;a-=n.length,t.delete(n)}}class l{worker=new Worker(new URL("@alwith/module-chat/markdown-parser.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(e)=>{let n=e.data,r=this.active;if(n.clientId!==r?.clientId||n.revision!==r.revision){this.fail(Error("Markdown worker returned an unexpected request"));return}if(this.active=null,!n.ok){this.fail(Error(n.error));return}let i={...r.input,tokens:n.tokens};c(i);let s=this.clients.get(r.clientId),o=this.pending.get(r.clientId),u=o!==void 0&&r.input.isStreaming&&o.input.isStreaming&&o.input.text.startsWith(r.input.text);if(s!==void 0&&(s.revision===r.revision||u))s.onResult(i);this.dispatch()},this.worker.onerror=(e)=>this.fail(Error(e.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize Markdown parsing result"))}fail(e){this.failure=e,this.worker.terminate(),this.pending.clear(),this.active=null;for(let n of this.clients.values())n.onError(e)}send(e){try{this.worker.postMessage(e)}catch(n){this.fail(n instanceof Error?n:Error(String(n)))}}dispatch(){if(this.active!==null||this.pending.size===0)return;let e=this.pending.values().next().value;this.pending.delete(e.clientId),this.active=e,this.send({type:"parse",clientId:e.clientId,revision:e.revision,source:e.input.source})}connect(e,n){if(this.failure!==null)throw this.failure;let r=++this.nextClientId,i={revision:0,onResult:e,onError:n};return this.clients.set(r,i),{update:(s)=>{if(this.failure!==null)throw this.failure;i.revision+=1;let o=Lo(s.text,s.isStreaming);if(o!==null){this.pending.delete(r),i.onResult(o);return}this.pending.set(r,{clientId:r,revision:i.revision,input:s}),this.dispatch()},dispose:()=>{if(!this.clients.delete(r))return;if(this.pending.delete(r),this.clients.size===0)this.worker.terminate(),d=void 0;else if(this.failure===null)this.send({type:"dispose",clientId:r})}}}}var d;function Qr(e,n){return d??=new l,d.connect(e,n)}
2
+ export{Lo,Qr};
@@ -1,2 +1,2 @@
1
- import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function Rn(e){let{parse:o,execute:t,...s}=e;return{...s,execute:(n,i)=>t(o(n),i)}}var co="alwith";function m(e){if(e.length>128)throw Error("Too many application tools");let o=new Map;for(let t of e){if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(t.name)||o.has(t.name))throw Error(`Invalid or duplicate application tool: ${t.name}`);if(!t.description.trim()||t.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${t.name}`);o.set(t.name,{...t,inputSchema:structuredClone(t.inputSchema)})}return o}var p=(e)=>({content:[{type:"text",text:e instanceof Error?e.message:String(e)}],isError:!0});class uo{servers=new Map;session;identity;constructor(e,o){this.session=e,this.identity=o}declare(e,o){let t={agent:e,tools:m(o),sessionId:null};return t.mcp=u(()=>this.server(t)),t.registration=e.registerMcpServer({name:co,handler:t.mcp.handler}),this.servers.set(t.registration.serverId,t),t.registration.declaration}bind(e,o){let t=this.servers.get(e);if(!t)throw Error(`Application tool server is not registered: ${e}`);for(let[s,n]of this.servers)if(n.sessionId===o)this.dispose(s);t.sessionId=o}drop(e){for(let[o,t]of this.servers)if(t.sessionId===e)this.dispose(o)}clear(){for(let e of this.servers.keys())this.dispose(e)}dispose(e){let o=this.servers.get(e);if(!o)return;this.servers.delete(e),o.registration.dispose().then(()=>o.mcp.close())}server(e){let o=new g({name:co,version:"1.0.0"},{capabilities:{tools:{}}});return o.setRequestHandler("tools/list",()=>({tools:[...e.tools.values()].map((t)=>({name:t.name,...t.title===void 0?{}:{title:t.title},description:t.description,inputSchema:structuredClone(t.inputSchema),...t.annotations===void 0?{}:{annotations:t.annotations}}))})),o.setRequestHandler("tools/call",async(t,s)=>{let n=e.tools.get(t.params.name);if(!n)return p(Error(`Application tool is not registered: ${t.params.name}`));let i=e.sessionId,l=i===null?void 0:this.session(i);if(i===null||!l?.attached||l.readOnly)return p(Error("Application tool session is not attached"));let{toolCallId:c,turnId:d}=this.identity(t.params._meta??{}),a=s.mcpReq.signal;try{let r=await n.execute(t.params.arguments??{},{sessionId:i,toolCallId:c,turnId:d,signal:a,agent:e.agent});return a.throwIfAborted(),r}catch(r){if(a.aborted)throw r;return p(r)}}),o}}
2
- export{Rn,co,uo};
1
+ import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function Un(e){let{parse:o,execute:t,...s}=e;return{...s,execute:(n,i)=>t(o(n),i)}}var ko="alwith";function m(e){if(e.length>128)throw Error("Too many application tools");let o=new Map;for(let t of e){if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(t.name)||o.has(t.name))throw Error(`Invalid or duplicate application tool: ${t.name}`);if(!t.description.trim()||t.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${t.name}`);o.set(t.name,{...t,inputSchema:structuredClone(t.inputSchema)})}return o}var p=(e)=>({content:[{type:"text",text:e instanceof Error?e.message:String(e)}],isError:!0});class So{servers=new Map;session;identity;constructor(e,o){this.session=e,this.identity=o}declare(e,o){let t={agent:e,tools:m(o),sessionId:null};return t.mcp=u(()=>this.server(t)),t.registration=e.registerMcpServer({name:ko,handler:t.mcp.handler}),this.servers.set(t.registration.serverId,t),t.registration.declaration}bind(e,o){let t=this.servers.get(e);if(!t)throw Error(`Application tool server is not registered: ${e}`);for(let[s,n]of this.servers)if(n.sessionId===o)this.dispose(s);t.sessionId=o}drop(e){for(let[o,t]of this.servers)if(t.sessionId===e)this.dispose(o)}clear(){for(let e of this.servers.keys())this.dispose(e)}dispose(e){let o=this.servers.get(e);if(!o)return;this.servers.delete(e),o.registration.dispose().then(()=>o.mcp.close())}server(e){let o=new g({name:ko,version:"1.0.0"},{capabilities:{tools:{}}});return o.setRequestHandler("tools/list",()=>({tools:[...e.tools.values()].map((t)=>({name:t.name,...t.title===void 0?{}:{title:t.title},description:t.description,inputSchema:structuredClone(t.inputSchema),...t.annotations===void 0?{}:{annotations:t.annotations}}))})),o.setRequestHandler("tools/call",async(t,s)=>{let n=e.tools.get(t.params.name);if(!n)return p(Error(`Application tool is not registered: ${t.params.name}`));let i=e.sessionId,l=i===null?void 0:this.session(i);if(i===null||!l?.attached||l.readOnly)return p(Error("Application tool session is not attached"));let{toolCallId:c,turnId:d}=this.identity(t.params._meta??{}),a=s.mcpReq.signal;try{let r=await n.execute(t.params.arguments??{},{sessionId:i,toolCallId:c,turnId:d,signal:a,agent:e.agent});return a.throwIfAborted(),r}catch(r){if(a.aborted)throw r;return p(r)}}),o}}
2
+ export{Un,ko,So};
@@ -0,0 +1,2 @@
1
+ import{So}from"./chunk-4y07ykv2.js";import{hr,te}from"./chunk-46j8adkj.js";import{gr}from"./chunk-b4qe4xnp.js";import{wo}from"./chunk-x9rppnkq.js";import{Fn}from"./chunk-6wkcqhkk.js";import{ur,bo}from"./chunk-me230xjh.js";import{dr}from"./chunk-qz9q0g2b.js";import{On}from"./chunk-3kxerrsh.js";import{ge}from"./chunk-pv7t4hw8.js";import{et,Re}from"./chunk-ts7h148j.js";import{Co}from"./chunk-5dygcexv.js";import{ee,Dn}from"./chunk-xca0vnvk.js";import{CodexClient as M,configRevisionOf as O,isBooleanOption as S,isGroupedSelect as v,isImage as R,isSelectOption as f,mergeMeta as g,runStateSource as C}from"@nyssance/codex-acp-v2/client";var b={id:"chatgpt",name:"ChatGPT"};function y(e){return e===null?void 0:{alwith:{model:e}}}function d(e){let s=e.find((t)=>t.category==="model"&&t.type==="select");return s?.type==="select"&&typeof s.currentValue==="string"?s.currentValue:null}function I(e){let s=e["x-codex-turn-metadata"];if(typeof e.callId!=="string"||typeof s?.turn_id!=="string")throw Error("Codex tool call metadata is missing callId or turn_id");return{toolCallId:e.callId,turnId:s.turn_id}}class lr extends M{applicationRegistry=new So((e)=>this.holds(e)?this.session(e):void 0,I);toolSelection;async executeShell(e,s){let t=this.session(e);if(!t.attached||t.restoring||t.readOnly||t.state!=="idle")throw Error("The session is not ready for a shell command");await this.codexCapabilities.executeShell(e,s),this.materializeDraft(e)}modelListeners=new Set;confirmedModelListeners=new Set;savedModels={main:null,chat:null};slotModels={main:null,chat:null};slotTargets={main:null,chat:null};slotVersions={main:0,chat:0};draftDirectoryIntents=new Map;draftOperations=new Map;gatewayModels=new Map;configOwners=new Map;openingOwners=new Map;schedulingConfig=new Set;replayRepairs=new Map;accountRevocations=new Map;accountRecoveries=new Map;resolveModelOption;constructor(e,s){let{applicationTools:t=[],resolveModel:i,imageService:n,...o}=s;super(e,o,{sessionWindows:{},draftSessions:{},modelRecovery:{},nativeModels:[]});this.toolSelection=t,this.resolveModelOption=i,this.imageService=n,this.imageTool=n?dr(n,(a)=>this.imageRequests.get(a)):void 0}imageTool;imageService;inputModes=new Map;inputSelections=new Map;async readInputConfig(e){let s=this.live(),t=await s.request("_codex/session_input_config_get",{sessionId:e});if(s!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,t)}async writeInputConfig(e,s){let t=this.live(),i=await t.request("_codex/session_input_config_set",{sessionId:e,inputConfig:s});if(t!==this.agent)throw Error("Session input configuration belongs to a disconnected agent");return this.acceptInputConfig(e,i)}acceptInputConfig(e,s){let t=On(s,e);this.inputModes.delete(e),this.inputSelections.delete(e);let i=t.inputConfig;if(i&&et(i.mode)){if(Re(i.mode).parseConfig(i.config),this.inputModes.set(e,i.mode),i.mode==="image")this.inputSelections.set(e,ge.parseConfig(i.config))}return t}imageRequests=new Map;prompt(e,s,t={}){if(!this.imageService)return super.prompt(e,s,t);if(!this.inputModes.has(e))return this.imageService.inputMode(e).then((i)=>(this.inputModes.set(e,i),this.prompt(e,s,t)));return Re(this.inputModes.get(e)).routePrompt({native:()=>super.prompt(e,s,{...t,meta:g(t.meta,{alwith:{imageIntent:null,applicationContext:Re("chat").applicationContext(null)}})}),image:()=>this.promptImage(e,s,t)})}promptImage(e,s,t){if(!this.imageService)throw Error("Image service is not connected");bo(t.meta?.alwith?.imageAspectRatio);let i=t.meta?.alwith?.imageSelection;if(i!==void 0)te(i);let n=i??this.inputSelections.get(e)??this.imageService.selection(),o={...this.session(e).state!=="idle"?this.imageRequests.get(e)?.selection??n:n};te(o);let a=crypto.randomUUID();return this.promptImages.set(a,new Map(s.flatMap((r,l)=>R(r)?[[`attachment:${l}`,`data:${r.mimeType};base64,${r.data}`]]:[]))),super.prompt(e,s,{...t,meta:g(t.meta,{alwith:{imageSelection:o,imageRequestId:a,applicationContext:ge.applicationContext(t.meta?.alwith?.imageIntent??"generate",ur),imageIntent:t.meta?.alwith?.imageIntent??"generate"}})}).finally(()=>this.promptImages.delete(a))}promptMeta(e,s){let t=s.meta?.alwith?.imageSelection;if(this.inputModes.get(e)==="image"&&t&&this.imageService&&(this.session(e).state==="idle"||!this.imageRequests.has(e))){let i=new Map(hr(this.session(e)).map((o)=>[o.id,o.src]));for(let[o,a]of this.promptImages.get((s.meta?.alwith).imageRequestId)??[])i.set(o,a);let n=bo((s.meta?.alwith).imageAspectRatio);this.imageRequests.set(e,{selection:t,references:i,...n?{aspect:n}:{}})}return Co(super.promptMeta(e,s))}promptImages=new Map;promptWithImages(e,s,t={}){return this.prompt(e,s,{...t,meta:g({alwith:{imageIntent:"generate"}},t.meta)})}async applicationToolsFor(e){let s=typeof this.toolSelection==="function"?await this.toolSelection(e):this.toolSelection,t=e.options.meta?.alwith;return[...s,...e.options.applicationTools??[],...t?.nativeTools?.imageGeneration===!1&&this.imageTool?[this.imageTool]:[]]}releaseImages(e){this.imageRequests.delete(e)}onDisconnected(){for(let e of this.imageRequests.keys())this.releaseImages(e);this.promptImages.clear(),this.applicationRegistry.clear(),super.onDisconnected(),this.setApp({nativeModels:[]})}async cancel(e){this.releaseImages(e),await super.cancel(e)}async close(e){this.releaseImages(e),this.applicationRegistry.drop(e),await super.close(e)}async stopSession(e){this.releaseImages(e),this.applicationRegistry.drop(e);let s=this.state.draftSessions[e];if(s===void 0)return super.stopSession(e);await this.changeDraft([s],()=>this.state.draftSessions[e]?super.close(e):super.stopSession(e))}setApp(e){this.store.setState(e)}applyRunStates(e,s="event"){let t=this.state.runStates,i=e.map((n)=>{let o=t[n.sessionId];return o&&JSON.stringify(o)===JSON.stringify(n)?o:n});if(C(t)===s&&i.length===Object.keys(t).length&&i.every((n)=>n===t[n.sessionId]))return;super.applyRunStates(i,s)}enqueueSession(e,s,t=!0){let i=!t&&!this.schedulingConfig.has(e);return super.enqueueSession(e,()=>{let n=()=>{let r=this.holds(e)?d(this.session(e).configOptions):null;return s().then(async(l)=>{if(this.holds(e)&&d(this.session(e).configOptions)!==r)await this.normalizeCustomEffort(e,!0);return l})},o=()=>{let r=i?this.normalizeCustomEffort(e,!1):void 0;return r?r.then(n):n()},a=t?void 0:this.replayRepairs.get(e)?.promise;return a?a.then(o):o()},t)}customEffortChange(e,s,t=!1,i){if(!this.holds(e))return;let n=this.session(e);if(!n.attached||n.readOnly)return;let o=d(n.configOptions),a=wo(o);if(!a)return;let r=n.configOptions.find((p)=>p.category==="thought_level"&&f(p)),l,h;if(r&&f(r)){let p=v(r.options)?r.options.flatMap((c)=>c.options):r.options;if(r.currentValue===a.value||!s&&p.some((c)=>c.value===r.currentValue))return;if(!p.some((c)=>c.value===a.value))throw Error(`The model does not advertise its default effort: ${o}`);l=r.configId,h=!s&&i!==void 0&&p.some((c)=>c.value===i)?i:a.value}else{if(!a.hidden||!t||o===null)return;let p=n.configOptions.find((c)=>c.category==="model");if(!p)throw Error("The custom model has no model option");l=p.configId,h=o}return{configId:l,value:h}}normalizeCustomEffort(e,s,t=!1,i){let n=this.customEffortChange(e,s,t,i);return n?this.writeCustomEffort(e,n.configId,n.value):void 0}async writeCustomEffort(e,s,t){let i=this.live(),n=this.lifecycle.capture(e),o=await i.request("session/set_config_option",{sessionId:e,configId:s,type:"id",value:t});if(i!==this.agent||!this.lifecycle.isCurrent(n))throw Error("Effort configuration belongs to a retired session");this.publishSession({...this.session(e),configOptions:o.configOptions,configRevision:O(o)??this.session(e).configRevision})}async afterSessionCreated(e){await super.afterSessionCreated(e);try{await super.enqueueSession(e,async()=>this.normalizeCustomEffort(e,!0,!0),!1)}catch(s){try{await this.delete(e)}catch(t){throw AggregateError([s,t],"Failed to initialize and clean up the custom model session",{cause:t})}throw s}}replay(e,s,t){let i=this.replayRepairs.get(e);if(i?.cwd===s)return i.promise;let n=this.replayWithEffort(e,s,t);this.replayRepairs.set(e,{cwd:s,promise:n});let o=()=>{if(this.replayRepairs.get(e)?.promise===n)this.replayRepairs.delete(e)};return n.then(o,o),n}async replayWithEffort(e,s,t){let i=this.holds(e)?this.session(e).configOptions:[],n=i.find((r)=>r.category==="thought_level")?.currentValue,o=this.state.modelRecovery[e]??!1;try{if(await super.replay(e,s,t),!o&&this.state.modelRecovery[e]&&!this.session(e).readOnly&&!ee(this.session(e).error?.error))await super.replay(e,s,t)}finally{this.accountRecoveries.delete(e)}if(this.state.modelRecovery[e]&&!this.session(e).readOnly&&!ee(this.session(e).error?.error))throw Error(this.session(e).error?.error?.message??"The selected model connection is unavailable");let a=this.lifecycle.capture(e);try{await this.normalizeCustomEffort(e,!1,!0,d(i)===d(this.session(e).configOptions)&&typeof n==="string"?n:void 0)}catch(r){if(this.holds(e)&&this.lifecycle.isCurrent(a))this.publishSession({...this.session(e),attached:!1,restoring:!1});throw r}}async connect(){if(await super.connect(),this.state.projectContext===null)await this.refreshProjectContext()}async listProjectSessions(e){await this.listSessions();let s=this.projectPath(e),t=this.sessionGroup({cwd:s}).id;return this.state.sessionList.filter((i)=>this.sessionGroup(i).id===t)}async newSession(e,s=null,t="main"){if(s!==null&&typeof s==="object")return super.newSession(e,s);let i=++this.slotVersions[t],n=await this.createNativeSession(e,await this.resolveModel(s),null);return this.activateSlot(t,n,i),n}async createNativeSession(e,s,t,i="chat"){let n=await super.newSession(e,{draft:t!==null,meta:g(y(s),this.imageService||t!==null?{alwith:{...this.imageService?{inputMode:i}:{},...t===null?{}:{draft:!0}}}:void 0)});if(t!==null)this.draftDirectoryIntents.set(n,e),this.setApp((o)=>({draftSessions:{...o.draftSessions,[n]:t}}));return this.noteModel(this.session(n)),n}async open(e,s,t="main"){if(typeof t!=="string")return super.open(e,s,t);if(t==="chat"&&this.imageService&&(this.inputModes.get(e)??await this.imageService.inputMode(e))==="image")throw Error("Image conversations must be opened in the main window");this.bindSlot(t,e),++this.slotVersions[t];let i=this.holds(e)?this.session(e):void 0;if(i?.attached&&(!this.imageService||this.inputModes.has(e))&&!i.restoring&&!i.readOnly&&!this.lifecycle.operations.busy(e)&&!this.replayRepairs.has(e)){this.followModel(t,i);return}await this.replayForOwner(e,s,t)}async replayForOwner(e,s,t){this.openingOwners.set(e,t);try{await this.replay(e,s)}finally{if(this.openingOwners.get(e)===t)this.openingOwners.delete(e)}}async requestContext(e,s,t){if(this.imageService){let i=s.kind==="resume"?s.sessionId:s.kind==="fork"?s.sourceSessionId:null,n=i===null?t.meta?.alwith?.inputMode??"chat":await this.imageService.inputMode(i),o=Re(n),a=Co(t.meta),r={...a?.alwith,nativeTools:o.nativeTools},l=await this.requestModelContext(e,s,{...t,meta:{...a,alwith:r}});return{...l,bind:async(h)=>{await l.bind?.(h),this.inputModes.set(h,n)}}}return this.requestModelContext(e,s,t)}async requestModelContext(e,s,t){if(s.kind==="resume"&&this.state.modelRecovery[s.sessionId]&&t.meta?.alwith?.model===void 0){let l=s.sessionId,h=this.accountRevocations.get(l)??0,p=await this.firstAvailableModel();if((this.accountRevocations.get(l)??0)!==h)throw Error("ALwith account changed during model selection");return this.accountRecoveries.set(l,h),this.requestToolContext(e,s,{...t,meta:g(t.meta,{alwith:{model:p,accountModelSelection:!0}})})}if(s.kind!=="resume"||t.meta?.alwith?.model!==void 0)return this.requestToolContext(e,s,t);let i=s.sessionId,n=this.holds(i)?this.session(i):void 0,o=(n?d(n.configOptions):null)??this.gatewayModels.get(i)??null,a=await this.resolveModel(o),r=o===null?null:a;return this.requestToolContext(e,s,{...t,meta:g(y(r),t.meta)})}async requestToolContext(e,s,t){let i=await this.applicationToolsFor({cwd:e,operation:s,options:t}),n=await super.requestContext(e,s,t);if(!i.length)return n;if(!this.state.agent?.capabilities?.session?.mcp?.acp)throw Error("The agent does not advertise capabilities.session.mcp.acp");let o=this.applicationRegistry.declare(this.live(),i);return{...n,mcpServers:[...n.mcpServers??[],o],bind:async(a)=>{await n.bind?.(a),this.applicationRegistry.bind(o.serverId,a)}}}async installedApps(e){let s=this.live(),t=await super.installedApps(e),i=await gr((n,o)=>s.request(n,o),t.apps.map((n)=>n.id),e?.threadId);if(s!==this.live())throw Error("Application metadata belongs to a disconnected agent");return{apps:t.apps.map((n)=>({...n,...i.get(n.id)}))}}async firstAvailableModel(){let e=await this.resolveModel(null);if(e===null)throw Error("No available models. Configure a model connection and try again.");return e}async recoverReplay(e,s,t,i){let n=ee(t);if(!n&&!Dn(t))return super.recoverReplay(e,s,t,i);try{await super.afterResume(e,s,i)}catch(o){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;this.setApp((a)=>({historyPages:{...a.historyPages,[e]:{cursor:null,loading:!1,error:o instanceof Error?o.message:String(o)}}}))}if(n){if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.publishSession({...this.session(e),attached:!1,restoring:!1,readOnly:!1,error:{stopReason:"error",error:{code:-32000,message:t.reason??t.message,data:t.data},meta:null}}),!0}if(i.signal.throwIfAborted(),!this.current(i)||!this.holds(e))return!0;return this.accountRevocations.set(e,(this.accountRevocations.get(e)??0)+1),this.setApp((o)=>({modelRecovery:{...o.modelRecovery,[e]:!0}})),this.publishSession({...this.session(e),cwd:s,attached:!1,restoring:!1,readOnly:!1,error:{stopReason:"error",error:{code:-32000,message:t.reason??t.message,data:t.data},meta:null}}),!0}markAccountModelsUnavailable(e){this.setApp((s)=>({modelRecovery:{...s.modelRecovery,...Object.fromEntries(e.map((t)=>[t,!0]))}}));for(let s of e){if(this.accountRevocations.set(s,(this.accountRevocations.get(s)??0)+1),!this.holds(s))continue;this.publishSession({...this.session(s),attached:!1,readOnly:this.session(s).readOnly})}}async resumeModel(e,s){let t=this.session(e);if(!this.state.modelRecovery[e]&&(t.attached||!ee(t.error?.error)))throw Error("Model recovery is not required");if(!s)throw Error("Select a model before continuing");let i=this.accountRevocations.get(e)??0,n=await this.resolveModel(s);if(!n)throw Error("The selected provider connection or model is unavailable");if((this.accountRevocations.get(e)??0)!==i)throw Error("ALwith account changed during model selection");this.accountRecoveries.set(e,i);try{await this.replay(e,t.cwd,{meta:{alwith:{model:n,accountModelSelection:!0}}})}catch(a){if(this.holds(e)&&this.state.modelRecovery[e])this.publishSession({...this.session(e),attached:!1,restoring:!1});throw a}finally{this.accountRecoveries.delete(e)}if((this.accountRevocations.get(e)??0)!==i&&this.state.modelRecovery[e])throw Error("ALwith account changed during model selection");let o=this.session(e);if(!o.attached||o.readOnly)throw Error(o.error?.error?.message??"Cannot resume this conversation");this.accountRevocations.delete(e),this.setApp((a)=>{let{[e]:r,...l}=a.modelRecovery;return{modelRecovery:l}}),this.confirmModel(this.state.sessionWindows[e]??"main",o)}setConfig(e,s,t,i="main"){this.configOwners.set(`${e}:${s}`,i),this.schedulingConfig.add(e);try{return super.setConfig(e,s,t)}finally{this.schedulingConfig.delete(e)}}onConfigChanged(e,s,t){super.onConfigChanged(e,s,t),this.noteModel(this.session(e));let i=this.configOwners.get(`${e}:${s}`)??"main";if(this.configOwners.delete(`${e}:${s}`),t.configOptions.some((n)=>n.configId===s&&n.category==="model"))this.confirmModel(i,this.session(e))}changeDraft(e,s){let t=Promise.allSettled(e.map((i)=>this.draftOperations.get(i)).filter((i)=>i!==void 0)).then(s);for(let i of e)this.draftOperations.set(i,t);return t}prepareDraft(e,s,t=null,i=!1,n="chat"){if(e==="chat"&&n!=="chat")throw Error("The floating chat only supports chat input");let o=++this.slotVersions[e];return this.changeDraft([e],async()=>{let a=s??(await this.refreshProjectContext(!0)).chatDirectory,r=Object.keys(this.state.draftSessions).find((c)=>this.state.draftSessions[c]===e);if(r)await this.lifecycle.admission.pending(r);let l=t??(r?d(this.session(r).configOptions):this.savedModels[e]??this.slotModels[e]),h=i?null:await this.resolveModel(l,t===null?"draft":"session");if(r&&(this.inputModes.get(r)??"chat")===n&&this.session(r).cwd===a&&(!this.draftDirectoryIntents.has(r)||this.draftDirectoryIntents.get(r)===s)&&!i&&!this.state.modelRecovery[r]&&(h===null?!d(this.session(r).configOptions)?.startsWith("gateway:"):d(this.session(r).configOptions)===h)){if(this.activateSlot(e,r,o),!this.session(r).attached)await this.replayForOwner(r,a,e);if(t!==null)this.confirmModel(e,this.session(r));return r}let p=await this.createNativeSession(s,h,e,n);try{if(r&&this.session(r).cwd===a)for(let c of this.session(r).configOptions){if(c.category==="model")continue;if(c.category==="thought_level"&&d(this.session(r).configOptions)!==d(this.session(p).configOptions)&&wo(d(this.session(p).configOptions))!==null)continue;let u=this.session(p).configOptions.find((w)=>w.configId===c.configId);if(!u||u.currentValue===c.currentValue)continue;if(S(c)&&S(u))await this.setConfig(p,c.configId,c.currentValue);else if(f(c)&&f(u)){if((v(u.options)?u.options.flatMap((m)=>m.options):u.options).some((m)=>m.value===c.currentValue))await this.setConfig(p,c.configId,c.currentValue)}}if(r)await this.deleteEmptyDraft(r)}catch(c){throw await this.deleteEmptyDraft(p),c}if(this.activateSlot(e,p,o),t!==null||i||l!==null&&l!==h)this.confirmModel(e,this.session(p));return p})}discardDraft(e){if(e!=="main"&&e!=="chat")return super.discardDraft(e);return this.changeDraft([e],async()=>{for(let[s,t]of Object.entries(this.state.draftSessions))if(t===e)await this.deleteEmptyDraft(s)})}transferDraft(e,s){return this.changeDraft(["main","chat"],async()=>{if(s==="chat"&&this.inputModes.get(e)==="image")throw Error("Image conversations must remain in the main window");if(!this.state.draftSessions[e]||this.state.draftSessions[e]===s)return;for(let[t,i]of Object.entries(this.state.draftSessions))if(i===s)await this.deleteEmptyDraft(t);this.setApp((t)=>t.draftSessions[e]?{draftSessions:{...t.draftSessions,[e]:s}}:{})})}deleteEmptyDraft(e){return this.enqueueSession(e,async()=>{if(!this.state.draftSessions[e])return;await this.delete(e),this.gatewayModels.delete(e)})}onDraftMaterialized(e){super.onDraftMaterialized(e),this.draftDirectoryIntents.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions;return{draftSessions:i}}),this.noteModel(this.session(e))}onSessionDropped(e){this.applicationRegistry.drop(e),super.onSessionDropped(e),this.inputModes.delete(e),this.inputSelections.delete(e),this.draftDirectoryIntents.delete(e),this.gatewayModels.delete(e),this.accountRevocations.delete(e),this.accountRecoveries.delete(e),this.setApp((s)=>{let{[e]:t,...i}=s.draftSessions,{[e]:n,...o}=s.sessionWindows,{[e]:a,...r}=s.modelRecovery;return{draftSessions:i,sessionWindows:o,modelRecovery:r}})}fork(e,s,t){let i=typeof t==="object"?t:t===void 0?{}:{lastTurnId:t};return super.fork(e,s,i)}async forkInternal(e,s,t){let n=[...(await Promise.all([this.indexSessions(),this.indexSessions(void 0,!0)])).flat(),...this.state.sessionList,...this.state.archivedSessions],o=(this.holds(e)?this.session(e).title:null)??n.find((l)=>l.sessionId===e)?.title,a=await super.forkInternal(e,s,{...t,meta:g(y(this.gatewayModels.get(e)??null),t.meta)});await super.enqueueSession(a,async()=>this.normalizeCustomEffort(a,!1,!0),!1);let r=o??this.session(a).title;if(r)await this.renameSession(a,Fn(r,n.flatMap((l)=>l.title?[l.title]:[])));return a}onForked(e,s){super.onForked(e,s),this.noteModel(this.session(e))}onReplayed(e,s){super.onReplayed(e,s);let t=this.accountRevocations.get(e);if(t!==void 0&&this.accountRecoveries.get(e)!==t)this.markAccountModelsUnavailable([e]);if(this.state.modelRecovery[e]&&this.accountRecoveries.get(e)===(this.accountRevocations.get(e)??0)&&this.session(e).attached&&!this.session(e).readOnly)this.accountRevocations.delete(e),this.setApp((i)=>{let{[e]:n,...o}=i.modelRecovery;return{modelRecovery:o}});this.noteModel(this.session(e))}setModelSelections(e){this.savedModels={...e},this.slotModels={...e}}onConfirmedModel(e){return this.confirmedModelListeners.add(e),()=>this.confirmedModelListeners.delete(e)}onSessionChanged(e){super.onSessionChanged(e);let s=this.accountRevocations.get(e.id);if(s!==void 0&&this.accountRecoveries.get(e.id)!==s&&e.attached){this.publishSession({...e,attached:!1});return}this.followModel("main",e),this.followModel("chat",e)}followModel(e,s){if(this.slotTargets[e]!==s.id||!s.attached||s.restoring)return;let t=d(s.configOptions);if(t!==null)this.slotModels[e]=t}activateSlot(e,s,t){if(this.slotVersions[e]!==t)return;this.bindSlot(e,s),this.followModel(e,this.session(s))}bindSlot(e,s){let t=e==="main"?"chat":"main";if(this.slotTargets[t]===s)this.slotTargets[t]=null,++this.slotVersions[t];this.slotTargets[e]=s,this.setApp((i)=>({sessionWindows:{...i.sessionWindows,[s]:e}}))}confirmModel(e,s){let t=d(s.configOptions);if(t===null)throw Error("Model selection did not return the current model");this.followModel(e,s),this.savedModels[e]=t;for(let i of this.confirmedModelListeners)i(e,t)}resolveModel(e,s="session"){return this.resolveModelOption?this.resolveModelOption(e,s):Promise.resolve(e)}onSessionModel(e){return this.modelListeners.add(e),()=>this.modelListeners.delete(e)}noteModel(e){let s=d(e.configOptions);if(s===null)return;let t=e.configOptions.find((n)=>n.category==="model"&&n.type==="select");if(t&&f(t)){let o=(v(t.options)?t.options.find((a)=>a.groupId===b.id)?.options??[]:t.options.filter((a)=>!a.value.startsWith("gateway:"))).map((a)=>({id:a.value,label:a.name}));if(JSON.stringify(o)!==JSON.stringify(this.state.nativeModels))this.setApp({nativeModels:o})}let i=t!==void 0&&f(t)&&t.options.some((n)=>("groupId"in n)&&n.groupId!==b.id&&n.options.some((o)=>o.value===s));if(i)this.gatewayModels.set(e.id,s);else this.gatewayModels.delete(e.id);if(!this.state.draftSessions[e.id])for(let n of this.modelListeners)n(e.id,s,i)}}
2
+ export{b,lr};
@@ -1,2 +1,2 @@
1
- import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function zr(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function al(){c()}function Vr(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function jr(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return ka(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function ll(e,n,t,i,o,a){if(a==="none")return;_(o,[ka(e,n,t,i,a)])}function ka(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return Ua(t,i);return Sa(e,n)}function Ua(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function Sa(e,n){return y+Ba(e,n)}function cl(e,n){return D(Sa(e,n))}function Ba(e,n){if(n<=l)return Ga(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Ga(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function dl(){return r.context?.state}function ul(e){return g(e).ready}
2
- export{zr,al,Vr,jr,ll,ka,Ua,Sa,cl,Ba,Ga,dl,ul};
1
+ import{CacheStorage as I,Soundfont as M}from"smplr";var T=4,y=21,l=88,s=[39,41,43,44,46,48,50],p=0.035,b=0.16,S=88,E=50,h="acoustic_grand_piano",O="MusyngKite",w="FluidR3_GM",f=[0,2,4,5,7,9,11],U=2,C=5,m=globalThis;if(m.__alwithTimelineUserMessageNavigationAudio?.version!==T)m.__alwithTimelineUserMessageNavigationAudio={version:T,context:null,storage:I("alwith-timeline-navigation-instruments"),players:new Map,nextNoteTime:0,unlockConsumerCount:0};var r=m.__alwithTimelineUserMessageNavigationAudio;function d(){return r.context??=new AudioContext,r.context}function c(){let e=d();if(e.state==="running"){r.nextNoteTime=e.currentTime;return}e.resume().then(()=>{r.nextNoteTime=e.currentTime},(n)=>{if(n instanceof DOMException&&n.name==="NotAllowedError")return;console.error("Failed to unlock timeline navigation audio",n)})}function k(e){let n=d();return M(n,{instrument:e,kit:e===h?O:w,storage:r.storage,volume:E})}function g(e){let n=r.players.get(e);if(n!==void 0)return n;let t=k(e),i={player:t,ready:t.ready};return r.players.set(e,i),i}function Gr(e){g(e).ready.catch((n)=>{console.error(`Failed to load navigation instrument "${e}"`,n)})}function il(){c()}function zr(){if(r.unlockConsumerCount===0)window.addEventListener("pointerdown",c,{capture:!0}),window.addEventListener("keydown",c,{capture:!0});return r.unlockConsumerCount++,()=>{if(r.unlockConsumerCount--,r.unlockConsumerCount===0)window.removeEventListener("pointerdown",c,{capture:!0}),window.removeEventListener("keydown",c,{capture:!0})}}function Vr(e,n,t,i,o){if(o==="none")return;let a=Math.sign(n-e),u=Math.abs(n-e),x=Array.from({length:u},(L,A)=>{let N=e+a*(A+1),v=t[N];return Sa(N,t.length,v.inputTokens,v.outputTokens,o)});_(i,x)}function rl(e,n,t,i,o,a){if(a==="none")return;_(o,[Sa(e,n,t,i,a)])}function Sa(e,n,t,i,o){if(o==="none")throw Error("navigationMidiNote: 声音已关闭,不该求音符");if(o==="auto")return Ua(t,i);return _a(e,n)}function Ua(e,n){let t=Math.imul(e,5)+Math.imul(n,3)>>>0,i=(Math.imul(e,11)^Math.imul(n,13))>>>0,o=t%f.length;return 12*(U+i%C+1)+f[o]}function _a(e,n){return y+Ba(e,n)}function sl(e,n){return D(_a(e,n))}function Ba(e,n){if(n<=l)return Ga(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function Ga(e){if(e<=s.length)return s.slice(0,e);let n=new Set(s),t=s[0]-1,i=s.at(-1)+1;while(n.size<e&&(t>=0||i<l)){if(t>=0&&n.size<e)n.add(t--);if(i<l&&n.size<e)n.add(i++)}for(let o=0;n.size<e&&o<l;o++)n.add(o);return[...n].toSorted((o,a)=>o-a)}function D(e){return 440*2**((e-69)/12)}function _(e,n){let t=d();if(t.state!=="running")return;let{player:i,ready:o}=g(e);o.then(()=>{let a=Math.max(t.currentTime,r.nextNoteTime);for(let u=0;u<n.length;u++)i.start({note:n[u],time:a+u*p,duration:b,velocity:S});r.nextNoteTime=a+n.length*p}).catch((a)=>{console.error(`Failed to play navigation instrument "${e}"`,a)})}function al(){return r.context?.state}function ll(e){return g(e).ready}
2
+ export{Gr,il,zr,Vr,rl,Sa,Ua,_a,sl,Ba,Ga,al,ll};
@@ -1,2 +1,2 @@
1
- import{d,i}from"./chunk-njqan8zg.js";import{q,K,ce,W,Z,ke}from"./chunk-gdtpwbqn.js";import{we}from"./chunk-3hsft68c.js";import{k}from"./chunk-qk1yqepm.js";import{Se}from"./chunk-3qedn07q.js";import{Q,_e}from"./chunk-pqz2471h.js";import{CheckIcon as O,SparklesIcon as A,XIcon as U}from"lucide-react";import{useDeferredValue as V,useState as y}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogClose as X,DialogContent as _,DialogDescription as J,DialogHeader as R,DialogTitle as Y}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as le,TabsTrigger as ie}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:p}=d(),[u,s]=y(!1),l=r.interface?.iconSmall,h=l&&p?p(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(A,{className:"text-muted-foreground size-6"})})}function oe({skill:r}){let{t:p}=d(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${p(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function zt({query:r,ready:p,onOpenPlugin:u}){let{t:s}=d(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!p,j=i((e)=>e.installed),z=i((e)=>e.skillProjects),[M,E]=y(null),[v,L]=y(!1),[B,C]=y(null),b=V(r.trim().toLowerCase()),o=l.find((e)=>e.path===B),x=j.find(({plugin:e})=>e.id===o?.pluginId),c=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(b)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),m=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(z).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],H=m.map((e)=>e.label);for(let e of m)if(e.path&&H.filter((a)=>a===e.label).length>1)e.label=e.path;let g=m.find((e)=>e.id===M)??m[0],D=g?c.filter((e)=>g.paths.has(e.path)):[],G=v||b?c:c.slice(0,6),w=(e)=>t(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(ke,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(W,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(K,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(ce,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(q,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(O,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(k,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${Q} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(we,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:c.length})})]}),c.length?w(G):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(b?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!b&&c.length>6&&t(N,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":v,onClick:()=>L((e)=>!e),children:v?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:c.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")E(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:m.map((e)=>t(ie,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),m.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(F,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(_,{showCloseButton:!1,className:_e,children:o&&n(S,{children:[t(Se,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(oe,{skill:o}),e,t(X,{render:t(N,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(U,{})})]})]}),n(R,{className:"gap-3",children:[t(Y,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),x?t(N,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(x)},children:x.plugin.interface?.displayName??x.plugin.name}):o.pluginId]})]})})})]})}
2
- export{zt};
1
+ import{d,i}from"./chunk-0f00j53n.js";import{q,K,de,W,Z,Se}from"./chunk-7egc2x4q.js";import{ke}from"./chunk-k1atcess.js";import{k}from"./chunk-qk1yqepm.js";import{we}from"./chunk-sdhkpkbs.js";import{Q,_e}from"./chunk-pqz2471h.js";import{CheckIcon as O,SparklesIcon as A,XIcon as U}from"lucide-react";import{useDeferredValue as V,useState as y}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogClose as X,DialogContent as _,DialogDescription as J,DialogHeader as R,DialogTitle as Y}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as le,TabsTrigger as ie}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:p}=d(),[u,s]=y(!1),l=r.interface?.iconSmall,h=l&&p?p(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(A,{className:"text-muted-foreground size-6"})})}function oe({skill:r}){let{t:p}=d(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${p(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function Yt({query:r,ready:p,onOpenPlugin:u}){let{t:s}=d(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!p,j=i((e)=>e.installed),z=i((e)=>e.skillProjects),[M,E]=y(null),[v,L]=y(!1),[B,C]=y(null),b=V(r.trim().toLowerCase()),o=l.find((e)=>e.path===B),x=j.find(({plugin:e})=>e.id===o?.pluginId),c=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(b)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),m=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(z).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],H=m.map((e)=>e.label);for(let e of m)if(e.path&&H.filter((a)=>a===e.label).length>1)e.label=e.path;let g=m.find((e)=>e.id===M)??m[0],D=g?c.filter((e)=>g.paths.has(e.path)):[],G=v||b?c:c.slice(0,6),w=(e)=>t(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(Se,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(W,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(K,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(de,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(q,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(O,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(k,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${Q} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(ke,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:c.length})})]}),c.length?w(G):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(b?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!b&&c.length>6&&t(N,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":v,onClick:()=>L((e)=>!e),children:v?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:c.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")E(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:m.map((e)=>t(ie,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),m.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(F,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(_,{showCloseButton:!1,className:_e,children:o&&n(S,{children:[t(we,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(oe,{skill:o}),e,t(X,{render:t(N,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(U,{})})]})]}),n(R,{className:"gap-3",children:[t(Y,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),x?t(N,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(x)},children:x.plugin.interface?.displayName??x.plugin.name}):o.pluginId]})]})})})]})}
2
+ export{Yt};
@@ -1,2 +1,2 @@
1
- import{u}from"./chunk-stv8pr4v.js";import{cn as o}from"cn";import{motion as v}from"motion/react";import{jsx as i,jsxs as g}from"react/jsx-runtime";function ut({active:n,expanded:r=!1,highlight:s=!0,className:a,...l}){return i("button",{type:"button","data-active":n?"":void 0,"aria-current":n?"page":void 0,className:o(s&&u,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)]":"size-[var(--navigation-row-height,30px)]",a),...l})}function Vs({tabs:n,view:r,onViewChange:s,onReset:a,notifications:l,trailing:p,className:d}){return g("div",{className:o("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",d),children:[i("div",{role:"tablist",className:"bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-52 flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]",children:n.map((e)=>{let t=r===e.key;return g(ut,{role:"tab",active:t,expanded:t,highlight:!1,"aria-selected":t,title:e.title,onClick:()=>s(e.key),onDoubleClick:a&&(()=>a(e.key)),className:o("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-[18px] [&_svg]:shrink-0",t?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[t&&i(v.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"bg-destructive pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:o("relative z-10 grid",t?"ms-1.5 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})}),p!=null&&i("div",{className:"ms-auto flex shrink-0 items-center gap-0.5",children:p})]})}
2
- export{ut,Vs};
1
+ import{m}from"./chunk-189aq7st.js";import{cn as o}from"cn";import{motion as u}from"motion/react";import{jsx as i,jsxs as g}from"react/jsx-runtime";function Mt({active:n,expanded:r=!1,highlight:s=!0,className:a,...l}){return i("button",{type:"button","data-active":n?"":void 0,"aria-current":n?"page":void 0,className:o(s&&m,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)]":"size-[var(--navigation-row-height,30px)]",a),...l})}function va({tabs:n,view:r,onViewChange:s,onReset:a,notifications:l,trailing:p,className:d}){return g("div",{className:o("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",d),children:[i("div",{role:"tablist",className:"bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-52 flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]",children:n.map((e)=>{let t=r===e.key;return g(Mt,{role:"tab",active:t,expanded:t,highlight:!1,"aria-selected":t,title:e.title,onClick:()=>s(e.key),onDoubleClick:a&&(()=>a(e.key)),className:o("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-[18px] [&_svg]:shrink-0",t?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[t&&i(u.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"bg-destructive pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:o("relative z-10 grid",t?"ms-1.5 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})}),p!=null&&i("div",{className:"ms-auto flex shrink-0 items-center gap-0.5",children:p})]})}
2
+ export{Mt,va};
@@ -0,0 +1,2 @@
1
+ import{nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function Li(d,u){let f=new Set,i=(e)=>{let t=e.items.map(p).find((o)=>o!==null),r=e.items.every((o)=>o.replayed);if(t===void 0||f.has(t))return{turnKey:e.key,turn:e,deferUntilReady:r};return f.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:r}};if(!u?.complete)return d.map(i);let a=new Map;for(let e of d){let t=e.items.map(p).find((o)=>o!==null);if(t===void 0)continue;let r=a.get(t)??[];r.push(e),a.set(t,r)}let c=new Set(u.turns.map((e)=>e.turnId)),T=new Set(u.loadedTurnIds),y=new Map,l=new Map,s,n=[];for(let e of d){if(!e.items.some((t)=>c.has(p(t)??""))){n.push(e);continue}if(n.length>0){if(s)l.set(s,n);else y.set(e,n);n=[]}s=e}if(s&&n.length>0)l.set(s,n),n=[];return[...u.turns.flatMap((e)=>{let t=a.get(e.turnId);if(t)return t.flatMap((r)=>[...(y.get(r)??[]).map(i),i(r),...(l.get(r)??[]).map(i)]);return T.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...n.map(i)]}
2
+ export{Li};
@@ -1,2 +1,2 @@
1
- var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function lo(n){let e=n?.alwith;if(!e||typeof e!=="object"||Array.isArray(e))return n;return{...n,alwith:Object.fromEntries(Object.entries(e).filter(([t])=>!i.has(t)))}}
2
- export{lo};
1
+ var i=new Set(["inputMode","imageIntent","imageInstructions","imageSelection","imageRequestId","imageAspectRatio"]);function Co(n){let e=n?.alwith;if(!e||typeof e!=="object"||Array.isArray(e))return n;return{...n,alwith:Object.fromEntries(Object.entries(e).filter(([t])=>!i.has(t)))}}
2
+ export{Co};
@@ -1,2 +1,2 @@
1
- import{lr}from"./chunk-88ysxbdh.js";async function m(r){try{let i=await(await fetch(r)).blob();if(typeof createImageBitmap==="function")return(await createImageBitmap(i)).close(),!0;return await new Promise((a)=>{let o=new Image;o.onload=()=>a(!0),o.onerror=()=>a(!1),o.src=r})}catch{return!1}}async function ar(r){let n=await Promise.all(r.map(async({id:a,lastModified:o,sourcePath:p,...t})=>{let e=t.url;if(t.url.startsWith("blob:")){let s=await lr(t.url,t.mediaType);if(s===null)return null;e=s}let l=t.mediaType.toLowerCase().startsWith("image/"),c=e.startsWith("data:image/");if(l&&c&&!await m(e))return null;let u=e.startsWith("data:")?e.slice(5,e.indexOf(";")):t.mediaType;return{...t,url:e,mediaType:u}})),i=n.filter((a)=>a!==null);return{files:i,rejectedCount:n.length-i.length}}
2
- export{ar};
1
+ import{Pr}from"./chunk-964fwwsg.js";async function m(r){try{let i=await(await fetch(r)).blob();if(typeof createImageBitmap==="function")return(await createImageBitmap(i)).close(),!0;return await new Promise((a)=>{let o=new Image;o.onload=()=>a(!0),o.onerror=()=>a(!1),o.src=r})}catch{return!1}}async function _r(r){let n=await Promise.all(r.map(async({id:a,lastModified:o,sourcePath:p,...t})=>{let e=t.url;if(t.url.startsWith("blob:")){let s=await Pr(t.url,t.mediaType);if(s===null)return null;e=s}let l=t.mediaType.toLowerCase().startsWith("image/"),c=e.startsWith("data:image/");if(l&&c&&!await m(e))return null;let u=e.startsWith("data:")?e.slice(5,e.indexOf(";")):t.mediaType;return{...t,url:e,mediaType:u}})),i=n.filter((a)=>a!==null);return{files:i,rejectedCount:n.length-i.length}}
2
+ export{_r};
@@ -1,2 +1,2 @@
1
- import{useId as a}from"react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function Ki(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Claude"}),l("path",{fill:"#D97757",fillRule:"nonzero",d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})]})}function Hn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"DeepSeek"}),l("path",{fill:"#4D6BFE",d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})]})}function Un(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Grok"}),l("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})]})}function Bn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"OpenRouter"}),l("path",{d:"M2 7h3.5c1.6 0 2.6.5 3.6 1.7l3 3.6c1 1.2 2 1.7 3.6 1.7H20"}),l("path",{d:"M2 17h3.5c1.6 0 2.6-.5 3.6-1.7l3-3.6c1-1.2 2-1.7 3.6-1.7H20"}),l("path",{d:"M17.5 4.5L21 7l-3.5 2.5M17.5 14.5L21 17l-3.5 2.5"})]})}var r="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z";function Gn(e){let o=a().replaceAll(":","");return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Qwen"}),l("path",{d:r,fill:`url(#${o})`,fillRule:"nonzero"}),l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[l("stop",{offset:"0%",stopColor:"#6336E7",stopOpacity:".84"}),l("stop",{offset:"100%",stopColor:"#6F69F7",stopOpacity:".84"})]})})]})}function Wi(e){return l("svg",{viewBox:"-3 -3 30 30",fill:"currentColor",...e,children:l("path",{d:"M1.5 1.5h21v21h-7v-7h-7v-7h-7zM1.5 15.5h7v7h-7z"})})}function Zi(e){return l("svg",{fill:"currentColor",fillRule:"evenodd",height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:l("path",{d:"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"})})}function Qi(e){let o=a();return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100.182%",y1:"50.057%",y2:"50.057%",children:[l("stop",{offset:"0%",stopColor:"#E2167E"}),l("stop",{offset:"100%",stopColor:"#FE603C"})]})}),l("path",{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z",fill:`url(#${o})`,fillRule:"nonzero"})]})}function Ji(e){return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("path",{d:"M19.44 10.153l-2.936 11.586a.215.215 0 00.214.261h5.87a.215.215 0 00.214-.261l-2.95-11.586a.214.214 0 00-.412 0zM3.28 12.778l-2.275 8.96A.214.214 0 001.22 22h4.532a.212.212 0 00.214-.165.214.214 0 000-.097l-2.276-8.96a.214.214 0 00-.41 0z",fill:"#00E5E5"}),l("path",{d:"M7.29 5.359L3.148 21.738a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.358a.214.214 0 00-.41 0z",fill:"#006EFF"}),l("path",{d:"M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.216.216 0 00.171-.078.214.214 0 00.044-.183L14.439.15z",fill:"#006EFF"}),l("path",{d:"M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.215.215 0 00.214-.264L10.688 7.741a.214.214 0 00-.41 0z",fill:"#00E5E5"})]})}
2
- export{Ki,Hn,Un,Bn,Gn,Wi,Zi,Qi,Ji};
1
+ import{useId as a}from"react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function Ji(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Claude"}),l("path",{fill:"#D97757",fillRule:"nonzero",d:"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"})]})}function Pn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"DeepSeek"}),l("path",{fill:"#4D6BFE",d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})]})}function In(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Grok"}),l("path",{d:"M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"})]})}function Tn(e){return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"OpenRouter"}),l("path",{d:"M2 7h3.5c1.6 0 2.6.5 3.6 1.7l3 3.6c1 1.2 2 1.7 3.6 1.7H20"}),l("path",{d:"M2 17h3.5c1.6 0 2.6-.5 3.6-1.7l3-3.6c1-1.2 2-1.7 3.6-1.7H20"}),l("path",{d:"M17.5 4.5L21 7l-3.5 2.5M17.5 14.5L21 17l-3.5 2.5"})]})}var r="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z";function Mn(e){let o=a().replaceAll(":","");return t("svg",{viewBox:"0 0 24 24",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[l("title",{children:"Qwen"}),l("path",{d:r,fill:`url(#${o})`,fillRule:"nonzero"}),l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100%",y1:"0%",y2:"0%",children:[l("stop",{offset:"0%",stopColor:"#6336E7",stopOpacity:".84"}),l("stop",{offset:"100%",stopColor:"#6F69F7",stopOpacity:".84"})]})})]})}function Xi(e){return l("svg",{viewBox:"-3 -3 30 30",fill:"currentColor",...e,children:l("path",{d:"M1.5 1.5h21v21h-7v-7h-7v-7h-7zM1.5 15.5h7v7h-7z"})})}function Yi(e){return l("svg",{fill:"currentColor",fillRule:"evenodd",height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:l("path",{d:"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"})})}function er(e){let o=a();return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("defs",{children:t("linearGradient",{id:o,x1:"0%",x2:"100.182%",y1:"50.057%",y2:"50.057%",children:[l("stop",{offset:"0%",stopColor:"#E2167E"}),l("stop",{offset:"100%",stopColor:"#FE603C"})]})}),l("path",{d:"M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z",fill:`url(#${o})`,fillRule:"nonzero"})]})}function tr(e){return t("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",...e,children:[l("path",{d:"M19.44 10.153l-2.936 11.586a.215.215 0 00.214.261h5.87a.215.215 0 00.214-.261l-2.95-11.586a.214.214 0 00-.412 0zM3.28 12.778l-2.275 8.96A.214.214 0 001.22 22h4.532a.212.212 0 00.214-.165.214.214 0 000-.097l-2.276-8.96a.214.214 0 00-.41 0z",fill:"#00E5E5"}),l("path",{d:"M7.29 5.359L3.148 21.738a.215.215 0 00.203.261h8.29a.214.214 0 00.215-.261L7.7 5.358a.214.214 0 00-.41 0z",fill:"#006EFF"}),l("path",{d:"M14.44.15a.214.214 0 00-.41 0L8.366 21.739a.214.214 0 00.214.261H19.9a.216.216 0 00.171-.078.214.214 0 00.044-.183L14.439.15z",fill:"#006EFF"}),l("path",{d:"M10.278 7.741L6.685 21.736a.214.214 0 00.214.264h7.17a.215.215 0 00.214-.264L10.688 7.741a.214.214 0 00-.41 0z",fill:"#00E5E5"})]})}
2
+ export{Ji,Pn,In,Tn,Mn,Xi,Yi,er,tr};
@@ -0,0 +1,2 @@
1
+ var Ja=1e6,Xa=5000000;function Ir(_,e){return _+e>5000000}function Ya(_){return(_/1e6).toFixed(1)}var Le=5;
2
+ export{Ja,Xa,Ir,Ya,Le};
@@ -1,4 +1,4 @@
1
- import{Pt,It,$n}from"./chunk-9wc4emwt.js";import{Mt,g}from"./chunk-tgnftxyb.js";import{InputGroupTextarea as R}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as M}from"cn";import{forwardRef as F,useCallback as K,useEffect as T,useImperativeHandle as L,useRef as d}from"react";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,N=()=>!1,po=F(({onChange:c,onKeyDown:b,onCompositionStart:y,onCompositionEnd:I,className:E,placeholder:C,bashMode:S=!1,isSendShortcut:H=z,isNewlineShortcut:P=N,...h},k)=>{let n=Mt(),p=g(),i=d(!1),s=d(!1),a=d(null),l=d(null),o=K(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||i.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);T(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([u])=>{if(u&&u.contentRect.width!==t)t=u.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),T(o,[o,n?.textInput.value,h.value]);let m=S&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(i.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||s.current)return;if(b?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
1
+ import{wt,kt,Ln}from"./chunk-xqsfaaae.js";import{Tt,g}from"./chunk-32zzqeyf.js";import{InputGroupTextarea as R}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as M}from"cn";import{forwardRef as F,useCallback as K,useEffect as T,useImperativeHandle as L,useRef as d}from"react";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,N=()=>!1,go=F(({onChange:c,onKeyDown:b,onCompositionStart:y,onCompositionEnd:I,className:E,placeholder:C,bashMode:S=!1,isSendShortcut:H=z,isNewlineShortcut:P=N,...h},k)=>{let n=Tt(),p=g(),i=d(!1),s=d(!1),a=d(null),l=d(null),o=K(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||i.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);T(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([u])=>{if(u&&u.contentRect.width!==t)t=u.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),T(o,[o,n?.textInput.value,h.value]);let m=S&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(i.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||s.current)return;if(b?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
2
2
  `&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(P(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:u,value:f}=t,v=`${f.slice(0,r)}
3
- ${f.slice(u)}`;if(n)n.textInput.setInput(v);else t.value=v;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:u}=Pt(t),f=It(t);if(r.length>0)e.preventDefault(),p.add(r);else if(u&&!f)e.preventDefault()},D=n?{value:i.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=i.current?e.currentTarget.value:$n(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!i.current)$n(e.currentTarget);o(),c?.(e)}};return L(k,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>i.current||s.current,getTextarea:()=>a.current}),[]),q(R,{"data-chat-input":!0,ref:a,rows:3,className:M("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",E),name:"message",onCompositionEnd:(e)=>{i.current=!1;let t=$n(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),I?.(e),s.current=!0,requestAnimationFrame(()=>{s.current=!1})},onCompositionStart:(e)=>{s.current=!1,i.current=!0,y?.(e)},onKeyDown:w,onPaste:A,placeholder:C,...h,...D})});po.displayName="PromptInputTextarea";
4
- export{po};
3
+ ${f.slice(u)}`;if(n)n.textInput.setInput(v);else t.value=v;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:u}=wt(t),f=kt(t);if(r.length>0)e.preventDefault(),p.add(r);else if(u&&!f)e.preventDefault()},D=n?{value:i.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=i.current?e.currentTarget.value:Ln(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!i.current)Ln(e.currentTarget);o(),c?.(e)}};return L(k,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>i.current||s.current,getTextarea:()=>a.current}),[]),q(R,{"data-chat-input":!0,ref:a,rows:3,className:M("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",E),name:"message",onCompositionEnd:(e)=>{i.current=!1;let t=Ln(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),I?.(e),s.current=!0,requestAnimationFrame(()=>{s.current=!1})},onCompositionStart:(e)=>{s.current=!1,i.current=!0,y?.(e)},onKeyDown:w,onPaste:A,placeholder:C,...h,...D})});go.displayName="PromptInputTextarea";
4
+ export{go};
@@ -1,2 +1,2 @@
1
- import{useCallback as l,useSyncExternalStore as d}from"react";var pt="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function Xt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(pt))n()}),[e]);return d(t,()=>o(e.get(pt)))}async function Yt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[pt])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[pt]:i}})}
2
- export{pt,Xt,Yt};
1
+ import{useCallback as l,useSyncExternalStore as d}from"react";var at="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function $t(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(at))n()}),[e]);return d(t,()=>o(e.get(at)))}async function qt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[at])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[at]:i}})}
2
+ export{at,$t,qt};
@@ -0,0 +1,2 @@
1
+ import{w}from"./chunk-dxfhy8gr.js";import{e}from"./chunk-2c4hqv8f.js";import{useRef as y,useState as m}from"react";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as f}from"react/jsx-runtime";function Cn({client:s,session:t}){let{host:r}=e(),[a,l]=m(!1),[d,c]=m(null),i=y(!1),p=w(s.store,(o)=>o.connection==="ready"),v=a||!p||t.restoring;async function g(){if(i.current||!p||t.restoring)return;i.current=!0,c(null),l(!0);try{await s.open(t.id,t.cwd)}catch(o){c(o instanceof Error?o.message:String(o))}finally{i.current=!1,l(!1)}}return f("div",{className:"text-muted-foreground flex flex-wrap items-center gap-3 px-4 py-3 text-sm","aria-busy":a,"data-model-recovery":!0,children:[f("div",{className:"min-w-0 flex-1 basis-full",children:[n("p",{children:r.t("provider.modelUnavailable")}),d&&n("p",{role:"alert",className:"text-destructive break-words",children:d})]}),r.openSettings&&n(u,{size:"sm",variant:"outline",onClick:()=>void r.openSettings?.("provider"),children:r.t("settings.provider")}),n(u,{size:"sm",disabled:v,onClick:()=>void g(),children:r.t(t.restoring?"conversation.restoring":"provider.retry")})]})}
2
+ export{Cn};
@@ -1,2 +1,2 @@
1
- import{So}from"./chunk-317w17va.js";async function vr(i,c){let s=new WeakSet;while(!c.aborted){let r=[...i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')].filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function Nt(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of So(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<o)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,o-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let o=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+o.length}),r+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){l();return}if(t.tagName==="BR"){l();return}let n=m.has(t.tagName);if(n)l();for(let a of t.childNodes)u(a);if(n)l()};return u(i),l(),s}
2
- export{vr,Nt};
1
+ import{Jn}from"./chunk-hc9bcwpa.js";async function Yo(i,c){let s=new WeakSet;while(!c.aborted){let r=[...i.querySelectorAll('[data-codex-disclosure][aria-expanded="false"]')].filter((e)=>!s.has(e)&&!e.matches(":disabled"));for(let e of r)s.add(e),e.click();if(r.length===0&&i.querySelector("[data-markdown-pending]")===null)return;await new Promise((e)=>requestAnimationFrame(()=>e()))}}function st(i,c){if(!c)return[];let s=[],r="",e=[],l=()=>{let t=0,n=0;for(let{start:a,end:o}of Jn(r,c)){while(t<e.length&&e[t].end<=a)t++;n=Math.max(n,t);while(n<e.length&&e[n].end<o)n++;let d=e[t],f=e[n];if(!d||!f)throw Error("Search text offset has no DOM node");let h=document.createRange();h.setStart(d.node,a-d.start),h.setEnd(f.node,o-f.start),s.push(h)}r="",e=[]},m=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","DT","DD","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TD","TH","TR","UL"]),u=(t)=>{if(t.nodeType===Node.TEXT_NODE){let a=t.parentElement;if(!a||a.offsetParent===null&&a.tagName!=="BODY")return;let o=t.nodeValue??"";e.push({node:t,start:r.length,end:r.length+o.length}),r+=o;return}if(!(t instanceof Element))return;if(t.matches("script, style, [hidden], [aria-hidden='true']")){l();return}if(t.tagName==="BR"){l();return}let n=m.has(t.tagName);if(n)l();for(let a of t.childNodes)u(a);if(n)l()};return u(i),l(),s}
2
+ export{Yo,st};
@@ -1,2 +1,2 @@
1
- import{ss}from"./chunk-dxwbgg69.js";import{CheckIcon as M,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function v(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function N({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[u,m]=f(!1),[l,b]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=()=>{if(r.scrollHeight===0){m(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");m(r.scrollHeight>A*x+1)};d();let t=new ResizeObserver(d);return t.observe(r),()=>t.disconnect()},[]),k(()=>{if(!u||l)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=new Map,t=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let y=g.target;if(!d.has(y))continue;v(y,g.isIntersecting&&g.intersectionRatio>=1,d.get(y))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let i of d.keys()){if(r.contains(i))continue;t?.unobserve(i),d.delete(i)}for(let i of r.querySelectorAll(L)){if(d.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");d.set(i,g),v(i,t===null&&R(i,r),g),t?.observe(i)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{t?.disconnect(),C.disconnect();for(let[i,g]of d)v(i,!0,g)}},[u,l]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:u&&!l?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),u&&!l&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),u&&p("button",{type:"button","aria-expanded":l,className:"codex-user-message-collapse-trigger",onClick:()=>{b((r)=>!r)},children:[e("span",{children:l?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:l?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function Bo({text:n,label:o,host:s}){let[a,c]=f(!1),[u,m]=f(null),l=async()=>{c(!1),m(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(b){m(String(b)),s?.onCopyError?.(b)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:u??o,onClick:()=>void l(),children:a?e(M,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(ss,{src:c,alt:"",onClose:()=>a(!1)})]})}function rs({message:n,text:o,textParts:s,applicationReferences:a,mentions:c,images:u,messageTime:m,host:l,bubbleStyle:b}){let{t:r,openImage:d}=l;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[c.length>0&&e("div",{className:"codex-user-mentions",children:c.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),u.length>0&&e("div",{className:"codex-user-images",children:u.map((t)=>e(S,{image:t,openImage:d},`${t.mimeType}:${t.data}`))}),(o.length>0||a)&&e(h,{children:p("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:b,children:[a,s?s.map((t,x)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(N,{text:t.text,host:l}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},x)):e(N,{text:o,host:l})]})}),p("div",{className:"codex-user-actions",children:[e(Bo,{text:o,label:r("actions.copy"),host:l}),m&&e("span",{className:"codex-user-time",title:m.full,children:m.short})]})]})})}
2
- export{Bo,rs};
1
+ import{ds}from"./chunk-gt50nb3j.js";import{CheckIcon as M,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function v(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function N({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[u,m]=f(!1),[l,b]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=()=>{if(r.scrollHeight===0){m(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");m(r.scrollHeight>A*x+1)};d();let t=new ResizeObserver(d);return t.observe(r),()=>t.disconnect()},[]),k(()=>{if(!u||l)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=new Map,t=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let y=g.target;if(!d.has(y))continue;v(y,g.isIntersecting&&g.intersectionRatio>=1,d.get(y))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let i of d.keys()){if(r.contains(i))continue;t?.unobserve(i),d.delete(i)}for(let i of r.querySelectorAll(L)){if(d.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");d.set(i,g),v(i,t===null&&R(i,r),g),t?.observe(i)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{t?.disconnect(),C.disconnect();for(let[i,g]of d)v(i,!0,g)}},[u,l]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:u&&!l?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),u&&!l&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),u&&p("button",{type:"button","aria-expanded":l,className:"codex-user-message-collapse-trigger",onClick:()=>{b((r)=>!r)},children:[e("span",{children:l?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:l?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function Vo({text:n,label:o,host:s}){let[a,c]=f(!1),[u,m]=f(null),l=async()=>{c(!1),m(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(b){m(String(b)),s?.onCopyError?.(b)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:u??o,onClick:()=>void l(),children:a?e(M,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(ds,{src:c,alt:"",onClose:()=>a(!1)})]})}function cs({message:n,text:o,textParts:s,applicationReferences:a,mentions:c,images:u,messageTime:m,host:l,bubbleStyle:b}){let{t:r,openImage:d}=l;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[c.length>0&&e("div",{className:"codex-user-mentions",children:c.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),u.length>0&&e("div",{className:"codex-user-images",children:u.map((t)=>e(S,{image:t,openImage:d},`${t.mimeType}:${t.data}`))}),(o.length>0||a)&&e(h,{children:p("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:b,children:[a,s?s.map((t,x)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(N,{text:t.text,host:l}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},x)):e(N,{text:o,host:l})]})}),p("div",{className:"codex-user-actions",children:[e(Vo,{text:o,label:r("actions.copy"),host:l}),m&&e("span",{className:"codex-user-time",title:m.full,children:m.short})]})]})})}
2
+ export{Vo,cs};
@@ -1,2 +1,2 @@
1
- import{invoke as i}from"@tauri-apps/api/core";import{emit as t,emitTo as n,listen as s,once as a}from"@tauri-apps/api/event";var p={providersRead:()=>i("plugin:alwith-chat|providers_read"),providersSave:(e)=>i("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>i("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>i("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>i("plugin:alwith-chat|providers_test",e),providersApply:()=>i("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>i("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>i("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>i("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>i("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>i("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>i("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>i("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>i("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>i("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>i("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>i("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>i("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>i("plugin:alwith-chat|word_cloud",e),readDroppedFile:(e)=>i("plugin:alwith-chat|read_dropped_file",e),clipboardFilePaths:()=>i("plugin:alwith-chat|clipboard_file_paths"),writePastedFile:(e)=>i("plugin:alwith-chat|write_pasted_file",e),readImage:(e)=>i("plugin:alwith-chat|read_image",e),saveFile:(e)=>i("plugin:alwith-chat|save_file",e),writeTextAttachment:(e)=>i("plugin:alwith-chat|write_text_attachment",e),previewFile:(e)=>i("plugin:alwith-chat|preview_file",e)},ro={"providers:changed":{name:"providers:changed",listen:(e)=>s("providers:changed",e),once:(e)=>a("providers:changed",e),emit:(e)=>t("providers:changed",e),emitTo:(e,r)=>n(e,"providers:changed",r)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>s("providers:managed-revoked",e),once:(e)=>a("providers:managed-revoked",e),emit:(e)=>t("providers:managed-revoked",e),emitTo:(e,r)=>n(e,"providers:managed-revoked",r)}};function Ta(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function qa(e){if(Ta(e)||e instanceof Error)return e.message;return String(e)}
2
- export{p,ro,Ta,qa};
1
+ import{invoke as i}from"@tauri-apps/api/core";import{emit as t,emitTo as n,listen as s,once as a}from"@tauri-apps/api/event";var u={providersRead:()=>i("plugin:alwith-chat|providers_read"),providersSave:(e)=>i("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>i("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>i("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>i("plugin:alwith-chat|providers_test",e),providersApply:()=>i("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>i("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>i("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>i("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>i("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>i("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>i("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>i("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>i("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>i("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>i("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>i("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>i("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>i("plugin:alwith-chat|word_cloud",e),readDroppedFile:(e)=>i("plugin:alwith-chat|read_dropped_file",e),clipboardFilePaths:()=>i("plugin:alwith-chat|clipboard_file_paths"),writePastedFile:(e)=>i("plugin:alwith-chat|write_pasted_file",e),readImage:(e)=>i("plugin:alwith-chat|read_image",e),saveFile:(e)=>i("plugin:alwith-chat|save_file",e),writeTextAttachment:(e)=>i("plugin:alwith-chat|write_text_attachment",e),previewFile:(e)=>i("plugin:alwith-chat|preview_file",e)},uo={"providers:changed":{name:"providers:changed",listen:(e)=>s("providers:changed",e),once:(e)=>a("providers:changed",e),emit:(e)=>t("providers:changed",e),emitTo:(e,r)=>n(e,"providers:changed",r)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>s("providers:managed-revoked",e),once:(e)=>a("providers:managed-revoked",e),emit:(e)=>t("providers:managed-revoked",e),emitTo:(e,r)=>n(e,"providers:managed-revoked",r)}};function Da(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function Wa(e){if(Da(e)||e instanceof Error)return e.message;return String(e)}
2
+ export{u,uo,Da,Wa};
@@ -1,2 +1,2 @@
1
- import{E}from"./chunk-r5f77gtx.js";import{s}from"./chunk-5mjs63fv.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function js({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return E(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
2
- export{js};
1
+ import{R}from"./chunk-d336k00a.js";import{s}from"./chunk-r7z3mvej.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function ga({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return R(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
2
+ export{ga};