@alwith/module-chat 0.6.31 → 0.6.32

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 (453) hide show
  1. package/README.md +1 -1
  2. package/dist/activity-host.js +1 -1
  3. package/dist/agent/client.js +1 -1
  4. package/dist/agent/custom-model-effort.js +1 -1
  5. package/dist/agent/fork-title.js +1 -1
  6. package/dist/agent/image-request.js +1 -1
  7. package/dist/agent/image-tools.js +1 -1
  8. package/dist/agent/input-config.js +1 -1
  9. package/dist/agent/input-modes/chat.js +1 -1
  10. package/dist/agent/input-modes/execution-meta.js +1 -1
  11. package/dist/agent/input-modes/image-context.js +1 -1
  12. package/dist/agent/input-modes/image.js +1 -1
  13. package/dist/agent/input-modes/index.js +1 -1
  14. package/dist/agent/project-path.js +1 -1
  15. package/dist/agent/request-error.js +1 -1
  16. package/dist/agent/session-list-refresh.js +1 -1
  17. package/dist/app-reference.js +1 -1
  18. package/dist/application-tools.js +1 -1
  19. package/dist/approval/choice-elicitation-form.js +1 -1
  20. package/dist/approval/choice-schema.js +1 -1
  21. package/dist/approval/permission-options.js +1 -1
  22. package/dist/approval/permission-view.js +1 -1
  23. package/dist/approval/schema-elicitation-form.js +1 -1
  24. package/dist/approval/url-elicitation-card.js +1 -1
  25. package/dist/{chunk-dakt7k9q.js → chunk-016v1nnv.js} +4 -4
  26. package/dist/{chunk-b0p2j2ab.js → chunk-02sj8dwy.js} +1 -1
  27. package/dist/{chunk-r7n16m8h.js → chunk-02ttte9p.js} +2 -2
  28. package/dist/{chunk-swmxz9q0.js → chunk-036wyz4n.js} +2 -2
  29. package/dist/{chunk-3942tdd5.js → chunk-06kse58j.js} +2 -2
  30. package/dist/{chunk-hz8yrg2t.js → chunk-06mvwewp.js} +2 -2
  31. package/dist/{chunk-qbxdgkk9.js → chunk-081v7emv.js} +2 -2
  32. package/dist/{chunk-avq6x733.js → chunk-0brr8j8e.js} +2 -2
  33. package/dist/{chunk-8f8dma9e.js → chunk-0rp62g6e.js} +2 -2
  34. package/dist/{chunk-b4qe4xnp.js → chunk-0zncrzar.js} +2 -2
  35. package/dist/{chunk-me230xjh.js → chunk-11kv54bx.js} +3 -3
  36. package/dist/{chunk-5dtpfpq5.js → chunk-12bfnfbk.js} +2 -2
  37. package/dist/{chunk-vhxr0c4c.js → chunk-15m908ph.js} +2 -2
  38. package/dist/{chunk-nfkfgz2s.js → chunk-179a1053.js} +2 -2
  39. package/dist/{chunk-84zzf0ys.js → chunk-1gb1vwvy.js} +2 -2
  40. package/dist/{chunk-2dq1epq4.js → chunk-1jznzjzn.js} +2 -2
  41. package/dist/{chunk-d336k00a.js → chunk-1pnbntv2.js} +2 -2
  42. package/dist/{chunk-axz2rr58.js → chunk-1td0yv2k.js} +2 -2
  43. package/dist/chunk-1wk1yw69.js +2 -0
  44. package/dist/chunk-1x9h1tbx.js +2 -0
  45. package/dist/{chunk-0ga1y5v1.js → chunk-1y5zgya3.js} +2 -2
  46. package/dist/{chunk-j1kf4cj2.js → chunk-27n96a07.js} +5 -5
  47. package/dist/{chunk-djppmswk.js → chunk-2ad4fb9z.js} +2 -2
  48. package/dist/chunk-2ay0m7xn.js +2 -0
  49. package/dist/{chunk-t56ncd8f.js → chunk-2d4zb2ac.js} +2 -2
  50. package/dist/{chunk-e0t3cpx3.js → chunk-2efda0yv.js} +2 -2
  51. package/dist/chunk-2qa3c571.js +2 -0
  52. package/dist/{chunk-k1atcess.js → chunk-2wcvmm9v.js} +2 -2
  53. package/dist/{chunk-mtcxr3ns.js → chunk-33bd1ey8.js} +2 -2
  54. package/dist/{chunk-esxjnj1y.js → chunk-3a8qwbgh.js} +3 -3
  55. package/dist/{chunk-ftsqd7n5.js → chunk-3d3z6dam.js} +2 -2
  56. package/dist/{chunk-e8mxwqxy.js → chunk-3dvxhfcr.js} +2 -2
  57. package/dist/{chunk-m9rbb04n.js → chunk-3qbtzxkm.js} +2 -2
  58. package/dist/{chunk-5dxzfdd1.js → chunk-3vdx0cme.js} +2 -2
  59. package/dist/{chunk-7n1v87h0.js → chunk-3y9az4b9.js} +2 -2
  60. package/dist/{chunk-eexn5mmk.js → chunk-4hasepkm.js} +2 -2
  61. package/dist/{chunk-vazspetj.js → chunk-4vfrxhj4.js} +2 -2
  62. package/dist/{chunk-pyx2n7yx.js → chunk-4z6gyvy3.js} +2 -2
  63. package/dist/{chunk-54awxpw2.js → chunk-51s7qck0.js} +2 -2
  64. package/dist/{chunk-fz9y067h.js → chunk-544g9fky.js} +2 -2
  65. package/dist/chunk-5c14j9ws.js +2 -0
  66. package/dist/chunk-5e575zvm.js +2 -0
  67. package/dist/{chunk-4sj3t6mk.js → chunk-5f7t16kj.js} +2 -2
  68. package/dist/{chunk-jkqh03w4.js → chunk-5h49mv0e.js} +2 -2
  69. package/dist/{chunk-46j8adkj.js → chunk-5hjk7xnq.js} +2 -2
  70. package/dist/{chunk-ezaypwps.js → chunk-5jvpeww3.js} +2 -2
  71. package/dist/{chunk-t9ktp4sf.js → chunk-5p53j8mf.js} +2 -2
  72. package/dist/{chunk-7dy4z3r8.js → chunk-5qgzkc2a.js} +2 -2
  73. package/dist/{chunk-2sc2z6g5.js → chunk-5t2ge7gg.js} +2 -2
  74. package/dist/chunk-5tfqn4zq.js +4 -0
  75. package/dist/{chunk-bajn7ssf.js → chunk-64wn1w0e.js} +2 -2
  76. package/dist/{chunk-jtnjd3ec.js → chunk-680e6bz4.js} +2 -2
  77. package/dist/{chunk-8477q09c.js → chunk-698pt406.js} +2 -2
  78. package/dist/chunk-6ewv4vns.js +2 -0
  79. package/dist/{chunk-4115mzgp.js → chunk-6jpthrtx.js} +3 -3
  80. package/dist/chunk-6wsr59dr.js +2 -0
  81. package/dist/{chunk-91jmmkd3.js → chunk-6yx869ht.js} +2 -2
  82. package/dist/{chunk-tjc0ntnh.js → chunk-705j0x4q.js} +2 -2
  83. package/dist/{chunk-abxsr9d1.js → chunk-72qwq3k2.js} +2 -2
  84. package/dist/{chunk-ansfap1a.js → chunk-7a806p3q.js} +3 -3
  85. package/dist/chunk-7d61ydjw.js +2 -0
  86. package/dist/{chunk-wy4rtebz.js → chunk-7dmshm2n.js} +2 -2
  87. package/dist/{chunk-4mca4p7m.js → chunk-7yp1qpbm.js} +2 -2
  88. package/dist/chunk-8at9k0cn.js +2 -0
  89. package/dist/{chunk-hzhcajx1.js → chunk-8q5zwkry.js} +2 -2
  90. package/dist/{chunk-r3s28905.js → chunk-8s74mbzh.js} +3 -3
  91. package/dist/{chunk-et01n220.js → chunk-9b8gnrcb.js} +2 -2
  92. package/dist/{chunk-8zy4az1y.js → chunk-9gqq6pvf.js} +2 -2
  93. package/dist/{chunk-wf4z9w5x.js → chunk-9m36e0yq.js} +2 -2
  94. package/dist/{chunk-d5pn8932.js → chunk-9n8cds8p.js} +2 -2
  95. package/dist/{chunk-0pxeark7.js → chunk-9pm3vzgx.js} +3 -3
  96. package/dist/chunk-aehcqbaf.js +2 -0
  97. package/dist/{chunk-r7z3mvej.js → chunk-af0e5epn.js} +2 -2
  98. package/dist/{chunk-g23ktesb.js → chunk-apd3qtd1.js} +2 -2
  99. package/dist/{chunk-mnz33drf.js → chunk-as10p32q.js} +3 -3
  100. package/dist/{chunk-smd9rszw.js → chunk-askwff3a.js} +3 -3
  101. package/dist/{chunk-70ks1y6v.js → chunk-ayk3xaqx.js} +2 -2
  102. package/dist/chunk-b5g055qp.js +2 -0
  103. package/dist/{chunk-6kyq5zxt.js → chunk-b7ze9dje.js} +2 -2
  104. package/dist/{chunk-18gxawh7.js → chunk-b89bzpce.js} +2 -2
  105. package/dist/{chunk-aa2xhwh2.js → chunk-basmnv1z.js} +2 -2
  106. package/dist/{chunk-f9zpep12.js → chunk-bf7sgpzq.js} +2 -2
  107. package/dist/{chunk-xq4xeksc.js → chunk-c531krny.js} +3 -3
  108. package/dist/{chunk-z930082m.js → chunk-cfj92m1y.js} +2 -2
  109. package/dist/{chunk-4p1z0b21.js → chunk-chg6j0zg.js} +2 -2
  110. package/dist/{chunk-yvmjh230.js → chunk-cjj5bxdb.js} +2 -2
  111. package/dist/{chunk-kcgc9915.js → chunk-cr0pb6g0.js} +2 -2
  112. package/dist/chunk-cx3vphb1.js +2 -0
  113. package/dist/{chunk-7rqryntm.js → chunk-cy5kh1yr.js} +2 -2
  114. package/dist/chunk-d9q9qgm1.js +2 -0
  115. package/dist/{chunk-pqw5qz4e.js → chunk-djqexpgf.js} +2 -2
  116. package/dist/{chunk-1vf301b7.js → chunk-dxpd5v1r.js} +3 -3
  117. package/dist/{chunk-gvqvw7ms.js → chunk-e31s069c.js} +2 -2
  118. package/dist/chunk-eb78ebxa.js +2 -0
  119. package/dist/{chunk-9cfmet6r.js → chunk-egbb5295.js} +2 -2
  120. package/dist/{chunk-rtjf5haf.js → chunk-enbvjbcm.js} +2 -2
  121. package/dist/{chunk-r013w7yb.js → chunk-enc99kvz.js} +2 -2
  122. package/dist/{chunk-32zzqeyf.js → chunk-ezrq0dya.js} +2 -2
  123. package/dist/{chunk-413sz7fx.js → chunk-f84mdhkx.js} +2 -2
  124. package/dist/{chunk-7egc2x4q.js → chunk-fbrv2v3t.js} +1 -1
  125. package/dist/{chunk-wwywmqh8.js → chunk-fy8dmpv3.js} +2 -2
  126. package/dist/{chunk-3qwmf9qd.js → chunk-ggxdrm0c.js} +2 -2
  127. package/dist/{chunk-bj3sacn1.js → chunk-gh1rtwrb.js} +2 -2
  128. package/dist/{chunk-afypqn52.js → chunk-gm6145td.js} +3 -3
  129. package/dist/{chunk-bmeych5s.js → chunk-h3geg09z.js} +2 -2
  130. package/dist/{chunk-1jsjn8ga.js → chunk-h9hz5has.js} +2 -2
  131. package/dist/{chunk-b64hyshj.js → chunk-hj8nkk6a.js} +2 -2
  132. package/dist/chunk-hjbq9ez1.js +2 -0
  133. package/dist/{chunk-5fcp7haj.js → chunk-hpcvfjxz.js} +3 -3
  134. package/dist/chunk-hwppy236.js +2 -0
  135. package/dist/chunk-hzcerz8j.js +2 -0
  136. package/dist/{chunk-darm80tf.js → chunk-j4w2hbbe.js} +2 -2
  137. package/dist/{chunk-bbfzm39y.js → chunk-j9f4mh66.js} +2 -2
  138. package/dist/{chunk-edqxxx93.js → chunk-jfyz3rx6.js} +2 -2
  139. package/dist/{chunk-f0gq9f1f.js → chunk-jgf77q2w.js} +3 -3
  140. package/dist/{chunk-qt16accq.js → chunk-jnpkpe5t.js} +2 -2
  141. package/dist/chunk-jp2s1xsa.js +2 -0
  142. package/dist/{chunk-38geb5gj.js → chunk-jsay66xb.js} +2 -2
  143. package/dist/{chunk-4d2khkms.js → chunk-k1f40yn4.js} +2 -2
  144. package/dist/{chunk-vw6546pp.js → chunk-k76s8cq2.js} +2 -2
  145. package/dist/{chunk-m395aw24.js → chunk-ka0hcw5j.js} +3 -3
  146. package/dist/{chunk-4w0x1hdt.js → chunk-kdcde4s5.js} +2 -2
  147. package/dist/{chunk-7hfd7hnm.js → chunk-kj3a1k2q.js} +2 -2
  148. package/dist/{chunk-g9426ns9.js → chunk-kvwyryw2.js} +2 -2
  149. package/dist/{chunk-afnnrn6z.js → chunk-ky3n1mza.js} +2 -2
  150. package/dist/chunk-ky4j58wz.js +2 -0
  151. package/dist/{chunk-0c0txenw.js → chunk-m31f2m2y.js} +2 -2
  152. package/dist/{chunk-cxhyh0w9.js → chunk-m6yg0dc9.js} +2 -2
  153. package/dist/{chunk-a74zcp1j.js → chunk-m8243rnx.js} +2 -2
  154. package/dist/{chunk-239gtn3z.js → chunk-ma6ycen5.js} +2 -2
  155. package/dist/{chunk-1bvgs2t1.js → chunk-mahky9ad.js} +2 -2
  156. package/dist/{chunk-vzm88w2r.js → chunk-mfmh7ztq.js} +2 -2
  157. package/dist/{chunk-1xrdp5kw.js → chunk-mfx9679q.js} +2 -2
  158. package/dist/{chunk-pbx1417n.js → chunk-mxw0cq67.js} +2 -2
  159. package/dist/{chunk-pqz2471h.js → chunk-n8b9yg4q.js} +2 -2
  160. package/dist/{chunk-6ja6pt5x.js → chunk-n96z8etk.js} +2 -2
  161. package/dist/{chunk-ymgc4317.js → chunk-nec3tcjh.js} +2 -2
  162. package/dist/{chunk-jytat3j5.js → chunk-nf7q3crw.js} +3 -3
  163. package/dist/{chunk-npkbsc1k.js → chunk-ns31r47h.js} +3 -3
  164. package/dist/chunk-p0v9d7e1.js +2 -0
  165. package/dist/{chunk-nn8pmwqz.js → chunk-p6ffd8yn.js} +2 -2
  166. package/dist/{chunk-5h8h4sas.js → chunk-p9226dye.js} +2 -2
  167. package/dist/{chunk-b4wh6k5s.js → chunk-p9x6rya1.js} +2 -2
  168. package/dist/{chunk-dzw6vqqf.js → chunk-pd5yrdg6.js} +2 -2
  169. package/dist/{chunk-mzqfa37p.js → chunk-pe79c1re.js} +2 -2
  170. package/dist/{chunk-vbbndjfd.js → chunk-pwk7epmy.js} +2 -2
  171. package/dist/{chunk-yfb5hj4w.js → chunk-q988bycf.js} +2 -2
  172. package/dist/chunk-qj87dxrr.js +2 -0
  173. package/dist/{chunk-jx0djwvd.js → chunk-qm0zd4wj.js} +2 -2
  174. package/dist/{chunk-gtyrc6cd.js → chunk-qm9c9sd7.js} +2 -2
  175. package/dist/{chunk-m7tj6194.js → chunk-qmx3t5he.js} +2 -2
  176. package/dist/chunk-qth2ames.js +2 -0
  177. package/dist/chunk-qyfkwznx.js +2 -0
  178. package/dist/chunk-r26hz85q.js +2 -0
  179. package/dist/{chunk-ywax4zad.js → chunk-r84xcy0d.js} +2 -2
  180. package/dist/{chunk-7393tva2.js → chunk-rayhzb8p.js} +2 -2
  181. package/dist/{chunk-nabyjzn5.js → chunk-rfkgks0a.js} +2 -2
  182. package/dist/chunk-rkqptd9w.js +2 -0
  183. package/dist/{chunk-a6vp2dmt.js → chunk-rsbced6k.js} +2 -2
  184. package/dist/{chunk-wdxxr1xk.js → chunk-s520nawn.js} +2 -2
  185. package/dist/{chunk-pxv16edc.js → chunk-sjhjjhan.js} +2 -2
  186. package/dist/{chunk-jv1db7gt.js → chunk-sm526pev.js} +2 -2
  187. package/dist/{chunk-gt50nb3j.js → chunk-spqfmr4z.js} +2 -2
  188. package/dist/chunk-srqs8z90.js +2 -0
  189. package/dist/{chunk-sjqhtpzr.js → chunk-tftgnw1w.js} +2 -2
  190. package/dist/{chunk-9sag90th.js → chunk-tszqev50.js} +2 -2
  191. package/dist/chunk-twwcd2qv.js +2 -0
  192. package/dist/{chunk-tnmghaap.js → chunk-tzb4b5ve.js} +2 -2
  193. package/dist/{chunk-tdw7k1df.js → chunk-v6x7x69b.js} +2 -2
  194. package/dist/chunk-v92wj4tv.js +2 -0
  195. package/dist/{chunk-964fwwsg.js → chunk-vcj2jfnz.js} +2 -2
  196. package/dist/{chunk-36j9fer8.js → chunk-vqqafkcx.js} +2 -2
  197. package/dist/{chunk-bsqe29dh.js → chunk-w1dvg42z.js} +2 -2
  198. package/dist/{chunk-19jh646d.js → chunk-w2z3sxdq.js} +2 -2
  199. package/dist/chunk-wcfjjs1a.js +2 -0
  200. package/dist/chunk-wg223rq3.js +2 -0
  201. package/dist/{chunk-9162ez1n.js → chunk-wkbxdz82.js} +2 -2
  202. package/dist/chunk-wv6ntscn.js +2 -0
  203. package/dist/{chunk-p474fn4q.js → chunk-wvm8srp7.js} +2 -2
  204. package/dist/chunk-x03z0hme.js +2 -0
  205. package/dist/{chunk-2c7a0zdc.js → chunk-x4bzkzbt.js} +2 -2
  206. package/dist/{chunk-5cas0xvp.js → chunk-xckysrk7.js} +2 -2
  207. package/dist/{chunk-batckcj8.js → chunk-xg6ayxsy.js} +2 -2
  208. package/dist/{chunk-2d8msv4h.js → chunk-xmfn69hh.js} +2 -2
  209. package/dist/{chunk-drs741zm.js → chunk-xtcrdywd.js} +2 -2
  210. package/dist/{chunk-7g0cbkbp.js → chunk-y47sn7w2.js} +2 -2
  211. package/dist/{chunk-8ktb3g8c.js → chunk-y81242w2.js} +2 -2
  212. package/dist/{chunk-paxthe5v.js → chunk-yjbs9ze0.js} +2 -2
  213. package/dist/{chunk-5dygcexv.js → chunk-ypdh88cj.js} +2 -2
  214. package/dist/{chunk-483jakc1.js → chunk-yw927w3q.js} +2 -2
  215. package/dist/{chunk-s0mrsrb0.js → chunk-zb0ns231.js} +3 -3
  216. package/dist/chunk-zdqjjwx0.js +2 -0
  217. package/dist/chunk-zhd1v2fs.js +2 -0
  218. package/dist/{chunk-42dfq7ze.js → chunk-zhf7403q.js} +2 -2
  219. package/dist/{chunk-7vby3f2v.js → chunk-zmr5pwhd.js} +2 -2
  220. package/dist/{chunk-hm7f1vsx.js → chunk-znafsq0a.js} +2 -2
  221. package/dist/chunk-zr999cgt.js +5 -0
  222. package/dist/{chunk-3btheq4v.js → chunk-zvfad5gd.js} +2 -2
  223. package/dist/{chunk-6hxz5cpc.js → chunk-zwpv75f4.js} +2 -2
  224. package/dist/{chunk-rkejggyx.js → chunk-zyermn00.js} +2 -2
  225. package/dist/client.js +1 -1
  226. package/dist/codex/activity-group.js +1 -1
  227. package/dist/codex/artifact-links.js +1 -1
  228. package/dist/codex/assistant-message.js +1 -1
  229. package/dist/codex/async-question-card.js +1 -1
  230. package/dist/codex/edited-files-card.js +1 -1
  231. package/dist/codex/image-view-activity.js +1 -1
  232. package/dist/codex/markdown-renderer.js +1 -1
  233. package/dist/codex/navigation-audio.js +1 -1
  234. package/dist/codex/navigation-preview.js +1 -1
  235. package/dist/codex/navigation-rail.js +1 -1
  236. package/dist/codex/patch-view.js +1 -1
  237. package/dist/codex/plan.js +1 -1
  238. package/dist/codex/timeline-virtualizer.js +1 -1
  239. package/dist/codex/turn-activity.js +1 -1
  240. package/dist/codex/user-message.js +1 -1
  241. package/dist/codex/virtualized-turn-list.js +1 -1
  242. package/dist/collections/collection-emoji.js +1 -1
  243. package/dist/collections/collection-menu.js +1 -1
  244. package/dist/collections/collection-panel.js +1 -1
  245. package/dist/collections/collections.js +1 -1
  246. package/dist/collections/host.js +1 -1
  247. package/dist/collections/locales.js +1 -1
  248. package/dist/collections/model.js +1 -1
  249. package/dist/collections/store.js +1 -1
  250. package/dist/composer/completion-filter.js +1 -1
  251. package/dist/composer/completion-menu.js +1 -1
  252. package/dist/composer/completion-trigger.js +1 -1
  253. package/dist/composer/effort-slider.js +1 -1
  254. package/dist/composer/inline-document.js +1 -1
  255. package/dist/composer/inline-dom.js +1 -1
  256. package/dist/composer/menu-radio.js +1 -1
  257. package/dist/composer/model-select.js +1 -1
  258. package/dist/composer/permission-mode-select.js +1 -1
  259. package/dist/composer/prompt-input-attachments.js +1 -1
  260. package/dist/composer/prompt-input-clipboard.js +1 -1
  261. package/dist/composer/prompt-input-context.js +1 -1
  262. package/dist/composer/prompt-input-inline.js +1 -1
  263. package/dist/composer/prompt-input-textarea.js +1 -1
  264. package/dist/composer/prompt-input.js +1 -1
  265. package/dist/conversation/action-card.js +1 -1
  266. package/dist/conversation/composer/app-mentions.js +1 -1
  267. package/dist/conversation/composer/apps-menu.js +1 -1
  268. package/dist/conversation/composer/composer-menu.js +1 -1
  269. package/dist/conversation/composer/composer.js +1 -1
  270. package/dist/conversation/composer/config-options.js +1 -1
  271. package/dist/conversation/composer/context.js +1 -1
  272. package/dist/conversation/composer/drafts.js +1 -1
  273. package/dist/conversation/composer/file-items.js +1 -1
  274. package/dist/conversation/composer/long-text.js +1 -1
  275. package/dist/conversation/composer/mention-chips.js +1 -1
  276. package/dist/conversation/composer/mention-uri.js +1 -1
  277. package/dist/conversation/composer/model-menu.js +1 -1
  278. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  279. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  280. package/dist/conversation/composer/prediction.js +1 -1
  281. package/dist/conversation/composer/prompt-history.js +1 -1
  282. package/dist/conversation/composer/slash-command-button.js +1 -1
  283. package/dist/conversation/composer/submit-button.js +1 -1
  284. package/dist/conversation/composer/usage-meter.js +1 -1
  285. package/dist/conversation/connection-notice.js +1 -1
  286. package/dist/conversation/context.js +1 -1
  287. package/dist/conversation/conversation-body.js +1 -1
  288. package/dist/conversation/conversation-search.js +1 -1
  289. package/dist/conversation/conversation-view.js +1 -1
  290. package/dist/conversation/conversation.js +1 -1
  291. package/dist/conversation/diff-modal.js +1 -1
  292. package/dist/conversation/draft-project-picker.js +1 -1
  293. package/dist/conversation/session-actions.js +1 -1
  294. package/dist/conversation/subagent-sessions.js +1 -1
  295. package/dist/conversation/subagent-tasks.js +1 -1
  296. package/dist/desktop/desktop-composer.js +1 -1
  297. package/dist/desktop/desktop.js +1 -1
  298. package/dist/desktop/draft-model-select.js +1 -1
  299. package/dist/desktop/load-image.js +1 -1
  300. package/dist/desktop/model-catalog.js +1 -1
  301. package/dist/desktop/model-recovery.js +1 -1
  302. package/dist/desktop/model-settings-action.js +1 -1
  303. package/dist/desktop/native-file-drop.js +1 -1
  304. package/dist/generated/commands.js +1 -1
  305. package/dist/image-lightbox.js +1 -1
  306. package/dist/image-preview-dialog.js +1 -1
  307. package/dist/image.js +1 -1
  308. package/dist/lib/app-reference.js +1 -1
  309. package/dist/lib/application-metadata.js +1 -1
  310. package/dist/lib/chat-path.js +1 -1
  311. package/dist/lib/code-highlighter.js +1 -1
  312. package/dist/lib/file-url.js +1 -1
  313. package/dist/lib/fuzzy.js +1 -1
  314. package/dist/lib/group-blocks.js +1 -1
  315. package/dist/lib/image-encode.js +1 -1
  316. package/dist/lib/limits.js +1 -1
  317. package/dist/lib/markdown-parser.js +1 -1
  318. package/dist/lib/markdown-rules.js +1 -1
  319. package/dist/lib/model-name.js +1 -1
  320. package/dist/lib/prepare-prompt-files.js +1 -1
  321. package/dist/lib/reference-presentation.js +1 -1
  322. package/dist/lib/stream-style.js +1 -1
  323. package/dist/lib/streaming-markdown.js +1 -1
  324. package/dist/lib/tool-artifacts.js +1 -1
  325. package/dist/locales.js +1 -1
  326. package/dist/mermaid/diagram.js +1 -1
  327. package/dist/mermaid/export.js +1 -1
  328. package/dist/mermaid/index.js +1 -1
  329. package/dist/mermaid/preview.js +1 -1
  330. package/dist/oauth/claude-login.js +1 -1
  331. package/dist/oauth.js +1 -1
  332. package/dist/plugins/catalog-header.js +1 -1
  333. package/dist/plugins/catalog-skeleton.js +1 -1
  334. package/dist/plugins/host.js +1 -1
  335. package/dist/plugins/new-chat-directory.js +1 -1
  336. package/dist/plugins/panel-item.js +1 -1
  337. package/dist/plugins/plugin-detail-page.js +1 -1
  338. package/dist/plugins/plugin-icon.js +1 -1
  339. package/dist/plugins/plugin-icons.js +1 -1
  340. package/dist/plugins/plugins-page.js +1 -1
  341. package/dist/plugins/plugins.js +1 -1
  342. package/dist/plugins/read-skill-document.js +1 -1
  343. package/dist/plugins/skill-document.js +1 -1
  344. package/dist/plugins/skills-tab.js +1 -1
  345. package/dist/plugins/store.js +1 -1
  346. package/dist/plugins/toolbox-layout.js +1 -1
  347. package/dist/reference-projection.js +1 -1
  348. package/dist/search/chat-search.js +1 -1
  349. package/dist/search/codex-source-matches.js +1 -1
  350. package/dist/search/dom-matches.js +1 -1
  351. package/dist/search/find-bar.js +1 -1
  352. package/dist/search/literal-matches.js +1 -1
  353. package/dist/session-list/account-menu.js +1 -1
  354. package/dist/session-list/activity-list.js +1 -1
  355. package/dist/session-list/archived-sessions.js +1 -1
  356. package/dist/session-list/help-menu.js +1 -1
  357. package/dist/session-list/highlight.js +1 -1
  358. package/dist/session-list/host.js +1 -1
  359. package/dist/session-list/hover-info-card.js +1 -1
  360. package/dist/session-list/locales.js +1 -1
  361. package/dist/session-list/navigation-controls.js +1 -1
  362. package/dist/session-list/navigation-header.js +1 -1
  363. package/dist/session-list/navigation-store.js +1 -1
  364. package/dist/session-list/navigation-tabs.js +1 -1
  365. package/dist/session-list/navigation.js +1 -1
  366. package/dist/session-list/platform.js +1 -1
  367. package/dist/session-list/row-stop-button.js +1 -1
  368. package/dist/session-list/session-groups.js +1 -1
  369. package/dist/session-list/session-info-card.js +1 -1
  370. package/dist/session-list/session-list.js +1 -1
  371. package/dist/session-list/session-row.js +1 -1
  372. package/dist/session-list/session-state-dot.js +1 -1
  373. package/dist/session-list/session-state-menu.js +1 -1
  374. package/dist/session-list/shortcut-hint.js +1 -1
  375. package/dist/session-list/shortcut.js +1 -1
  376. package/dist/session-list/sidebar-overlay.js +1 -1
  377. package/dist/session-list/trailing-swap.js +1 -1
  378. package/dist/session-list/use-activity-notification.js +1 -1
  379. package/dist/session-list/use-activity-preview.js +1 -1
  380. package/dist/session-list/use-cmd-held.js +1 -1
  381. package/dist/session-list/use-project-sessions.js +1 -1
  382. package/dist/session-list/virtual-session-rows.js +1 -1
  383. package/dist/session-timeline/activity-group.js +1 -1
  384. package/dist/session-timeline/activity-projection.js +1 -1
  385. package/dist/session-timeline/assistant-content.js +1 -1
  386. package/dist/session-timeline/assistant-image-references.js +1 -1
  387. package/dist/session-timeline/assistant-turn.js +1 -1
  388. package/dist/session-timeline/async-questions.js +1 -1
  389. package/dist/session-timeline/edited-files-card.js +1 -1
  390. package/dist/session-timeline/history-timeline.js +1 -1
  391. package/dist/session-timeline/host.js +1 -1
  392. package/dist/session-timeline/image-generation-progress.js +1 -1
  393. package/dist/session-timeline/navigation-rail.js +1 -1
  394. package/dist/session-timeline/plan.js +1 -1
  395. package/dist/session-timeline/question-reply.js +1 -1
  396. package/dist/session-timeline/resource-content.js +1 -1
  397. package/dist/session-timeline/session-timeline.js +1 -1
  398. package/dist/session-timeline/timeline-registry.js +1 -1
  399. package/dist/session-timeline/turn-activity.js +1 -1
  400. package/dist/session-timeline/turn-error.js +1 -1
  401. package/dist/session-timeline/turn-retry.js +1 -1
  402. package/dist/session-timeline/turn-time.js +1 -1
  403. package/dist/session-timeline/turns.js +1 -1
  404. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  405. package/dist/session-timeline/user-message.js +1 -1
  406. package/dist/settings/codex-account-card.js +1 -1
  407. package/dist/settings/login-card.js +1 -1
  408. package/dist/settings/model-alias-settings.js +1 -1
  409. package/dist/settings/model-aliases.js +1 -1
  410. package/dist/settings/provider-logos.js +1 -1
  411. package/dist/settings/provider-section.js +1 -1
  412. package/dist/settings/providers-port.js +1 -1
  413. package/dist/settings/providers.js +1 -1
  414. package/dist/settings/settings-bridge.js +1 -1
  415. package/dist/settings/settings.js +1 -1
  416. package/package.json +4 -4
  417. package/dist/chunk-0f00j53n.js +0 -2
  418. package/dist/chunk-0mc30tx9.js +0 -2
  419. package/dist/chunk-0pmacxae.js +0 -2
  420. package/dist/chunk-138xvdrk.js +0 -2
  421. package/dist/chunk-189aq7st.js +0 -2
  422. package/dist/chunk-29wxdp28.js +0 -2
  423. package/dist/chunk-2f5cbah7.js +0 -2
  424. package/dist/chunk-48zgp33j.js +0 -2
  425. package/dist/chunk-4p3ekttc.js +0 -2
  426. package/dist/chunk-5g32hx9d.js +0 -2
  427. package/dist/chunk-5ny4ped8.js +0 -2
  428. package/dist/chunk-5wed639g.js +0 -2
  429. package/dist/chunk-6m9frvzj.js +0 -2
  430. package/dist/chunk-6xzf444w.js +0 -2
  431. package/dist/chunk-cz31f4gr.js +0 -2
  432. package/dist/chunk-dhda1jhs.js +0 -2
  433. package/dist/chunk-eedgav4q.js +0 -2
  434. package/dist/chunk-eg00mvca.js +0 -2
  435. package/dist/chunk-h1t76wws.js +0 -2
  436. package/dist/chunk-hfh3yen9.js +0 -5
  437. package/dist/chunk-hmtsavm4.js +0 -2
  438. package/dist/chunk-hqfhb4ng.js +0 -2
  439. package/dist/chunk-jtcccqpp.js +0 -2
  440. package/dist/chunk-m0skv5q0.js +0 -2
  441. package/dist/chunk-m3a6paxj.js +0 -2
  442. package/dist/chunk-mjfc1dyv.js +0 -2
  443. package/dist/chunk-n7pyzjq1.js +0 -2
  444. package/dist/chunk-p781sb6h.js +0 -2
  445. package/dist/chunk-pv7t4hw8.js +0 -2
  446. package/dist/chunk-qecs9e31.js +0 -2
  447. package/dist/chunk-rak4mkgh.js +0 -2
  448. package/dist/chunk-ts7h148j.js +0 -2
  449. package/dist/chunk-v5m2qx8b.js +0 -4
  450. package/dist/chunk-vchbk4h5.js +0 -2
  451. package/dist/chunk-x0m4ctqf.js +0 -2
  452. package/dist/chunk-xpts50f0.js +0 -2
  453. package/dist/chunk-zd1fk347.js +0 -2
@@ -1,2 +1,2 @@
1
- import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function be({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
2
- export{be};
1
+ import{CheckCircleIcon as c,CircleIcon as o,LoaderIcon as i}from"lucide-react";import{jsx as n,jsxs as e}from"react/jsx-runtime";function ve({entries:s}){let d=s.filter((a)=>a.status==="completed").length,t=s.find((a)=>a.status==="in_progress");return e("div",{className:"codex-plan",children:[e("div",{className:"codex-plan-summary",children:[e("span",{children:[d,"/",s.length]}),t!==void 0&&e("span",{className:"codex-plan-active",children:["· ",t.content]})]}),n("div",{className:"codex-plan-entries",children:s.map((a)=>e("div",{className:"codex-plan-entry","data-status":a.status,children:[a.status==="completed"&&n(c,{"aria-hidden":"true"}),a.status==="in_progress"&&n(i,{className:"codex-plan-spinner","aria-hidden":"true"}),a.status==="pending"&&n(o,{"aria-hidden":"true"}),n("span",{children:a.content})]},a.content))})]})}
2
+ export{ve};
@@ -1,2 +1,2 @@
1
- import{fe}from"./chunk-32zzqeyf.js";import{z,Sr}from"./chunk-pbx1417n.js";import{t}from"./chunk-7393tva2.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Oi({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=fe(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(z,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(Sr,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
2
- export{Oi};
1
+ import{he}from"./chunk-ezrq0dya.js";import{j,rr}from"./chunk-mxw0cq67.js";import{t}from"./chunk-rayhzb8p.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function Di({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=he(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(j,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(rr,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
2
+ export{Di};
@@ -1,2 +1,2 @@
1
- var I={ar:{untitled:"دردشة جديدة",signOut:"تسجيل الخروج",help:"مساعدة",language:"اللغة",foreground:"المقدمة",background:"الخلفية",chats:"الدردشات",activity:"نشاط",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة",filter:"تصفية",collapseAllGroups:"طي كل المجموعات",openLeading:"فتح الشاشة ‎-1",backToMain:"العودة إلى الشاشة الرئيسية"},de:{untitled:"Neuer Chat",signOut:"Abmelden",help:"Hilfe",language:"Sprache",foreground:"Vordergrund",background:"Hintergrund",chats:"Chats",activity:"Aktivität",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert",filter:"Filtern",collapseAllGroups:"Alle Gruppen einklappen",openLeading:"Bildschirm -1 öffnen",backToMain:"Zurück zum Hauptbildschirm"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",signOut:"Sign out",help:"Help",language:"Language",foreground:"Foreground",background:"Background",chats:"Chats",activity:"Activity",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"},filter:"Filter",collapseAllGroups:"Collapse all groups",openLeading:"Open -1 screen",backToMain:"Back to main screen"},es:{untitled:"Nuevo chat",signOut:"Cerrar sesión",help:"Ayuda",language:"Idioma",foreground:"Primer plano",background:"Fondo",chats:"Chats",activity:"Actividad",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados",filter:"Filtrar",collapseAllGroups:"Contraer todos los grupos",openLeading:"Abrir la pantalla -1",backToMain:"Volver a la pantalla principal"},fr:{untitled:"Nouveau chat",signOut:"Se déconnecter",help:"Aide",language:"Langue",foreground:"Premier plan",background:"Arrière-plan",chats:"Discussions",activity:"Activité",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées",filter:"Filtrer",collapseAllGroups:"Réduire tous les groupes",openLeading:"Ouvrir l’écran -1",backToMain:"Revenir à l’écran principal"},hi:{untitled:"नई चैट",signOut:"साइन आउट",help:"सहायता",language:"भाषा",foreground:"अग्रभूमि",background:"पृष्ठभूमि",chats:"चैट",activity:"गतिविधि",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत",filter:"फ़िल्टर",collapseAllGroups:"सभी समूह संक्षिप्त करें",openLeading:"-1 स्क्रीन खोलें",backToMain:"मुख्य स्क्रीन पर लौटें"},id:{untitled:"Obrolan baru",signOut:"Keluar",help:"Bantuan",language:"Bahasa",foreground:"Depan",background:"Latar",chats:"Obrolan",activity:"Aktivitas",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan",filter:"Filter",collapseAllGroups:"Ciutkan semua grup",openLeading:"Buka layar -1",backToMain:"Kembali ke layar utama"},it:{untitled:"Nuova chat",signOut:"Esci",help:"Aiuto",language:"Lingua",foreground:"Primo piano",background:"Sfondo",chats:"Chat",activity:"Attività",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate",filter:"Filtra",collapseAllGroups:"Comprimi tutti i gruppi",openLeading:"Apri la schermata -1",backToMain:"Torna alla schermata principale"},ja:{untitled:"新しいチャット",signOut:"サインアウト",help:"ヘルプ",language:"言語",foreground:"フォアグラウンド",background:"背景",chats:"チャット",activity:"アクティビティ",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み",filter:"フィルター",collapseAllGroups:"すべてのグループを折りたたむ",openLeading:"-1 画面を開く",backToMain:"メイン画面に戻る"},ko:{untitled:"새 채팅",signOut:"로그아웃",help:"도움말",language:"언어",foreground:"포그라운드",background:"배경",chats:"채팅",activity:"활동",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨",filter:"필터",collapseAllGroups:"모든 그룹 접기",openLeading:"-1 화면 열기",backToMain:"메인 화면으로 돌아가기"},"pt-BR":{untitled:"Novo chat",signOut:"Sair",help:"Ajuda",language:"Idioma",foreground:"Primeiro plano",background:"Fundo",chats:"Chats",activity:"Atividade",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas",filter:"Filtrar",collapseAllGroups:"Recolher todos os grupos",openLeading:"Abrir a tela -1",backToMain:"Voltar à tela principal"},ru:{untitled:"Новый чат",signOut:"Выйти",help:"Справка",language:"Язык",foreground:"Передний план",background:"Фон",chats:"Чаты",activity:"Активность",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве",filter:"Фильтр",collapseAllGroups:"Свернуть все группы",openLeading:"Открыть экран -1",backToMain:"На главный экран"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",signOut:"退出登录",help:"帮助",language:"语言",foreground:"前台",background:"后台",chats:"聊天",activity:"活动",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"},filter:"筛选",collapseAllGroups:"折叠全部分组",openLeading:"进入 -1 屏",backToMain:"返回主屏"}};
2
- export{I};
1
+ var P={ar:{untitled:"دردشة جديدة",signOut:"تسجيل الخروج",help:"مساعدة",language:"اللغة",foreground:"المقدمة",background:"الخلفية",chats:"الدردشات",activity:"نشاط",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة",filter:"تصفية",collapseAllGroups:"طي كل المجموعات",openLeading:"فتح الشاشة ‎-1",backToMain:"العودة إلى الشاشة الرئيسية"},de:{untitled:"Neuer Chat",signOut:"Abmelden",help:"Hilfe",language:"Sprache",foreground:"Vordergrund",background:"Hintergrund",chats:"Chats",activity:"Aktivität",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert",filter:"Filtern",collapseAllGroups:"Alle Gruppen einklappen",openLeading:"Bildschirm -1 öffnen",backToMain:"Zurück zum Hauptbildschirm"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",signOut:"Sign out",help:"Help",language:"Language",foreground:"Foreground",background:"Background",chats:"Chats",activity:"Activity",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"},filter:"Filter",collapseAllGroups:"Collapse all groups",openLeading:"Open -1 screen",backToMain:"Back to main screen"},es:{untitled:"Nuevo chat",signOut:"Cerrar sesión",help:"Ayuda",language:"Idioma",foreground:"Primer plano",background:"Fondo",chats:"Chats",activity:"Actividad",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados",filter:"Filtrar",collapseAllGroups:"Contraer todos los grupos",openLeading:"Abrir la pantalla -1",backToMain:"Volver a la pantalla principal"},fr:{untitled:"Nouveau chat",signOut:"Se déconnecter",help:"Aide",language:"Langue",foreground:"Premier plan",background:"Arrière-plan",chats:"Discussions",activity:"Activité",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées",filter:"Filtrer",collapseAllGroups:"Réduire tous les groupes",openLeading:"Ouvrir l’écran -1",backToMain:"Revenir à l’écran principal"},hi:{untitled:"नई चैट",signOut:"साइन आउट",help:"सहायता",language:"भाषा",foreground:"अग्रभूमि",background:"पृष्ठभूमि",chats:"चैट",activity:"गतिविधि",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत",filter:"फ़िल्टर",collapseAllGroups:"सभी समूह संक्षिप्त करें",openLeading:"-1 स्क्रीन खोलें",backToMain:"मुख्य स्क्रीन पर लौटें"},id:{untitled:"Obrolan baru",signOut:"Keluar",help:"Bantuan",language:"Bahasa",foreground:"Depan",background:"Latar",chats:"Obrolan",activity:"Aktivitas",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan",filter:"Filter",collapseAllGroups:"Ciutkan semua grup",openLeading:"Buka layar -1",backToMain:"Kembali ke layar utama"},it:{untitled:"Nuova chat",signOut:"Esci",help:"Aiuto",language:"Lingua",foreground:"Primo piano",background:"Sfondo",chats:"Chat",activity:"Attività",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate",filter:"Filtra",collapseAllGroups:"Comprimi tutti i gruppi",openLeading:"Apri la schermata -1",backToMain:"Torna alla schermata principale"},ja:{untitled:"新しいチャット",signOut:"サインアウト",help:"ヘルプ",language:"言語",foreground:"フォアグラウンド",background:"背景",chats:"チャット",activity:"アクティビティ",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み",filter:"フィルター",collapseAllGroups:"すべてのグループを折りたたむ",openLeading:"-1 画面を開く",backToMain:"メイン画面に戻る"},ko:{untitled:"새 채팅",signOut:"로그아웃",help:"도움말",language:"언어",foreground:"포그라운드",background:"배경",chats:"채팅",activity:"활동",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨",filter:"필터",collapseAllGroups:"모든 그룹 접기",openLeading:"-1 화면 열기",backToMain:"메인 화면으로 돌아가기"},"pt-BR":{untitled:"Novo chat",signOut:"Sair",help:"Ajuda",language:"Idioma",foreground:"Primeiro plano",background:"Fundo",chats:"Chats",activity:"Atividade",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas",filter:"Filtrar",collapseAllGroups:"Recolher todos os grupos",openLeading:"Abrir a tela -1",backToMain:"Voltar à tela principal"},ru:{untitled:"Новый чат",signOut:"Выйти",help:"Справка",language:"Язык",foreground:"Передний план",background:"Фон",chats:"Чаты",activity:"Активность",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве",filter:"Фильтр",collapseAllGroups:"Свернуть все группы",openLeading:"Открыть экран -1",backToMain:"На главный экран"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",signOut:"退出登录",help:"帮助",language:"语言",foreground:"前台",background:"后台",chats:"聊天",activity:"活动",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"},filter:"筛选",collapseAllGroups:"折叠全部分组",openLeading:"进入 -1 屏",backToMain:"返回主屏"}};
2
+ export{P};
@@ -1,2 +1,2 @@
1
- import{inSessionTree as _,nativeTurnId as k}from"@nyssance/codex-acp-v2/client";function a(i){return i!==null&&typeof i==="object"&&!Array.isArray(i)?i:null}function r(i){return typeof i==="string"&&i.length>0?i:null}function R(i){switch(i){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function Qn(i,l,p,S,b=p[i]){let f=b?.items??l.items,I=new Set(l.items.map(k).filter((t)=>t!==null)),A=new Set([...I].filter((t)=>{let n=f.find((e)=>e.kind==="user"&&k(e)===t)??f.find((e)=>k(e)===t);return l.items.some((e)=>e.kind===n?.kind&&e.id===n.id)})),T=Object.values(p).filter((t)=>t.subagent?.parentId===i),u=new Map,h=new Set,x=new Set(l.items.map((t)=>t.id)),y=(t,n,e,s)=>{if(h.add(t),!x.has(s))return;if(!u.has(t))u.set(t,{key:t,threadId:t,title:n,description:e,status:"unknown",originItemId:s})};for(let t of f){if(t.kind!=="tool")continue;let n=a(t._meta?.codex),e=a(n?.subagent),s=a(t.rawInput);if(e?.activity==="started"||s?.activity==="started"){let c=r(e?.threadId)??r(s?.agentThreadId),d=r(e?.path)??r(s?.agentPath);if(c)y(c,d?.split("/").findLast(Boolean)??null,null,t.id)}let o=a(n?.collaboration);if(o?.tool==="spawnAgent"||t.title==="spawnAgent"){let c=o?.receiverThreadIds??s?.receiverThreadIds,d=Array.isArray(o?.agents)?o.agents.map(a):[];if(Array.isArray(c))for(let g of c){let m=r(g);if(!m)continue;let w=d.find((v)=>v?.threadId===m);y(m,r(w?.nickname)??r(w?.role),r(s?.prompt),t.id)}}}for(let t of T){let n=a(t.subagent?._meta?.codex),e=r(n?.threadId),s=r(n?.parentTurnId),o=e===null?void 0:u.get(e);if(!o&&(e!==null&&h.has(e)||s===null||!A.has(s)))continue;let c=e??t.id;u.set(c,{...o,key:c,threadId:e,title:t.title,description:t.subagent?.description??null,session:t,status:"unknown"})}for(let t of f){if(t.kind!=="tool")continue;let n=a(t._meta?.codex),e=a(n?.collaboration);if(Array.isArray(e?.agents))for(let c of e.agents){let d=a(c),g=u.get(r(d?.threadId)??"");if(g)g.status=R(a(d?.state)?.status)}let s=a(n?.subagent),o=u.get(r(s?.threadId)??"");if(o&&s?.activity==="completed")o.status="completed";if(o&&s?.activity==="interrupted")o.status="interrupted"}for(let t of u.values()){let n=t.session;if(!n)continue;if(S.some((e)=>_(p,n.id,e.sessionId))||n.state==="requires_action")t.status="requires_action";else if(n.attached&&n.state==="running")t.status="running";else if(n.error||n.lastStopReason==="error")t.status="failed";else if(n.lastStopReason==="cancelled")t.status="interrupted";else if(n.lastStopReason==="end_turn")t.status="completed";else if(t.status==="unknown")t.status=!n.attached?"detached":n.state}return[...u.values()]}
2
- export{Qn};
1
+ import{inSessionTree as _,nativeTurnId as k}from"@nyssance/codex-acp-v2/client";function a(i){return i!==null&&typeof i==="object"&&!Array.isArray(i)?i:null}function r(i){return typeof i==="string"&&i.length>0?i:null}function R(i){switch(i){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function no(i,l,p,S,b=p[i]){let f=b?.items??l.items,I=new Set(l.items.map(k).filter((t)=>t!==null)),A=new Set([...I].filter((t)=>{let n=f.find((e)=>e.kind==="user"&&k(e)===t)??f.find((e)=>k(e)===t);return l.items.some((e)=>e.kind===n?.kind&&e.id===n.id)})),T=Object.values(p).filter((t)=>t.subagent?.parentId===i),u=new Map,h=new Set,x=new Set(l.items.map((t)=>t.id)),y=(t,n,e,s)=>{if(h.add(t),!x.has(s))return;if(!u.has(t))u.set(t,{key:t,threadId:t,title:n,description:e,status:"unknown",originItemId:s})};for(let t of f){if(t.kind!=="tool")continue;let n=a(t._meta?.codex),e=a(n?.subagent),s=a(t.rawInput);if(e?.activity==="started"||s?.activity==="started"){let c=r(e?.threadId)??r(s?.agentThreadId),d=r(e?.path)??r(s?.agentPath);if(c)y(c,d?.split("/").findLast(Boolean)??null,null,t.id)}let o=a(n?.collaboration);if(o?.tool==="spawnAgent"||t.title==="spawnAgent"){let c=o?.receiverThreadIds??s?.receiverThreadIds,d=Array.isArray(o?.agents)?o.agents.map(a):[];if(Array.isArray(c))for(let g of c){let m=r(g);if(!m)continue;let w=d.find((v)=>v?.threadId===m);y(m,r(w?.nickname)??r(w?.role),r(s?.prompt),t.id)}}}for(let t of T){let n=a(t.subagent?._meta?.codex),e=r(n?.threadId),s=r(n?.parentTurnId),o=e===null?void 0:u.get(e);if(!o&&(e!==null&&h.has(e)||s===null||!A.has(s)))continue;let c=e??t.id;u.set(c,{...o,key:c,threadId:e,title:t.title,description:t.subagent?.description??null,session:t,status:"unknown"})}for(let t of f){if(t.kind!=="tool")continue;let n=a(t._meta?.codex),e=a(n?.collaboration);if(Array.isArray(e?.agents))for(let c of e.agents){let d=a(c),g=u.get(r(d?.threadId)??"");if(g)g.status=R(a(d?.state)?.status)}let s=a(n?.subagent),o=u.get(r(s?.threadId)??"");if(o&&s?.activity==="completed")o.status="completed";if(o&&s?.activity==="interrupted")o.status="interrupted"}for(let t of u.values()){let n=t.session;if(!n)continue;if(S.some((e)=>_(p,n.id,e.sessionId))||n.state==="requires_action")t.status="requires_action";else if(n.attached&&n.state==="running")t.status="running";else if(n.error||n.lastStopReason==="error")t.status="failed";else if(n.lastStopReason==="cancelled")t.status="interrupted";else if(n.lastStopReason==="end_turn")t.status="completed";else if(t.status==="unknown")t.status=!n.attached?"detached":n.state}return[...u.values()]}
2
+ export{no};
@@ -1,2 +1,2 @@
1
- import{createContext as o,useContext as n,useEffect as r}from"react";var Br=o(null);function R(t){let e=n(Br);r(()=>{if(t&&e!==null)return e()},[t,e])}
2
- export{Br,R};
1
+ import{createContext as o,useContext as n,useEffect as r}from"react";var vi=o(null);function A(t){let e=n(vi);r(()=>{if(t&&e!==null)return e()},[t,e])}
2
+ export{vi,A};
@@ -1,2 +1,2 @@
1
- import{d,i}from"./chunk-0f00j53n.js";import{k}from"./chunk-qk1yqepm.js";import{U}from"./chunk-8ktb3g8c.js";import{we}from"./chunk-paxthe5v.js";import{Q,_e,Pe}from"./chunk-pqz2471h.js";import{ExternalLinkIcon as M,PlusIcon as W}from"lucide-react";import{useEffect as _,useState as y}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as q,DialogContent as F,DialogDescription as G,DialogHeader as J,DialogTitle as K}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as s,Fragment as O}from"react/jsx-runtime";function Qt({entry:o,onBack:p}){let u=d(),{t:l}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===o.plugin.id)),v=i((a)=>a.busyIds[o.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[n,B]=y(null),[D,I]=y(null),[j,R]=y(0),[c,z]=y(null);_(()=>{let a=!0;return I(null),B(null),P(o).then((g)=>{if(a)B(g)},(g)=>{if(a)I(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[o,P,j]);let m=n?.summary??o.plugin,r=C?.plugin??m,t=m.interface,h=t?.displayName??m.name,b=r.availability!=="AVAILABLE"||r.installPolicy==="NOT_AVAILABLE",E=t?.longDescription??n?.description??t?.shortDescription,A=[...u.assetUrl?t?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...t?.screenshotUrls??[]];return s("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(Pe,{children:s("header",{className:"flex min-w-0 flex-col gap-4",children:[s("nav",{"aria-label":l("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:l("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:h})]}),s("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[s("div",{className:"flex min-w-0 items-center gap-3",children:[e(U,{name:m.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:h})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?s(O,{children:[r.source.type==="remote"?null:e(X,{checked:r.enabled,disabled:!!v||b,"aria-label":l(r.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:h}),onCheckedChange:(a)=>void V(r,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void H(r),children:v?e(S,{}):l("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":l(b?"plugins.detail.unavailable":"plugins.detail.install"),title:l(b?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||b,onClick:()=>void T({...o,plugin:m}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} pt-2`,children:[t?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:t.shortDescription}),m.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(m.keywords)].map((a)=>e(L,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),s("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[t?.developerName&&e(x,{label:l("plugins.detail.developer"),children:t.developerName}),t?.category&&e(x,{label:l("plugins.detail.category"),children:t.category}),(r.localVersion??r.version)&&e(x,{label:l("plugins.detail.version"),children:r.localVersion??r.version}),e(x,{label:l("plugins.headings.marketplace"),children:o.marketplace.interface?.displayName??o.marketplace.name}),t?.websiteUrl&&e(x,{label:l("plugins.detail.website"),children:e(w,{url:t.websiteUrl,label:l("plugins.detail.website")})})]}),!n&&!D&&s("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),l("plugins.detail.loading")]}),D&&s("div",{role:"alert",className:"mt-8 space-y-2",children:[s("p",{className:"text-destructive text-sm",children:[l("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:l("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:h,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),t&&t.capabilities.length>0&&e(N,{label:l("plugins.detail.capabilities"),count:t.capabilities.length,children:t.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),n&&n.mcpServers.length>0&&e(N,{label:l("plugins.detail.mcpServers"),count:n.mcpServers.length,children:n.mcpServers.map((a)=>s("div",{className:"flex items-center gap-3 py-1",children:[e(U,{name:m.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),n&&n.skills.length>0&&e(N,{label:l("plugins.detail.skills"),count:n.skills.length,children:n.skills.map((a)=>s(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(U,{name:a.name,className:"size-8"}),s("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),n&&n.apps.length>0&&e(N,{label:l("plugins.detail.apps"),count:n.apps.length,children:n.apps.map((a)=>s("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:l("plugins.installModal.connect")})]},a.id))}),n&&n.hooks.length>0&&e(N,{label:l("plugins.detail.hooks"),count:n.hooks.length,children:n.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(t?.privacyPolicyUrl||t?.termsOfServiceUrl)&&s("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[t.privacyPolicyUrl&&e(w,{url:t.privacyPolicyUrl,label:l("plugins.detail.privacyPolicy")}),t.termsOfServiceUrl&&e(w,{url:t.termsOfServiceUrl,label:l("plugins.detail.termsOfService")})]})]})}),e(q,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(F,{className:_e,children:c&&s(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(U,{name:c.name,className:"size-10"})}),s("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[s(J,{className:"gap-3",children:[e(K,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(G,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(we,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function x({label:o,children:p}){return s("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:o}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:o,count:p,children:u}){return s("section",{className:"mt-8",children:[s("h2",{className:"text-base font-medium",children:[o," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:o,label:p}){let{openLink:u}=d();if(!/^https?:\/\//i.test(o))return null;return s(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:o,onClick:()=>u(o),children:[p,e(M,{className:"size-3.5"})]})}
2
- export{Qt};
1
+ import{d,i}from"./chunk-r26hz85q.js";import{k}from"./chunk-qk1yqepm.js";import{U}from"./chunk-y81242w2.js";import{ke}from"./chunk-yjbs9ze0.js";import{Q,Se,_e}from"./chunk-n8b9yg4q.js";import{ExternalLinkIcon as M,PlusIcon as W}from"lucide-react";import{useEffect as _,useState as y}from"react";import{Badge as L}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as q,DialogContent as F,DialogDescription as G,DialogHeader as J,DialogTitle as K}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as s,Fragment as O}from"react/jsx-runtime";function Vt({entry:o,onBack:p}){let u=d(),{t:l}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===o.plugin.id)),v=i((a)=>a.busyIds[o.plugin.id]),T=i((a)=>a.install),H=i((a)=>a.uninstall),V=i((a)=>a.setPluginEnabled),[n,B]=y(null),[D,I]=y(null),[j,R]=y(0),[c,z]=y(null);_(()=>{let a=!0;return I(null),B(null),P(o).then((g)=>{if(a)B(g)},(g)=>{if(a)I(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[o,P,j]);let m=n?.summary??o.plugin,r=C?.plugin??m,t=m.interface,h=t?.displayName??m.name,b=r.availability!=="AVAILABLE"||r.installPolicy==="NOT_AVAILABLE",E=t?.longDescription??n?.description??t?.shortDescription,A=[...u.assetUrl?t?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...t?.screenshotUrls??[]];return s("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(_e,{children:s("header",{className:"flex min-w-0 flex-col gap-4",children:[s("nav",{"aria-label":l("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(f,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:l("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:h})]}),s("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[s("div",{className:"flex min-w-0 items-center gap-3",children:[e(U,{name:m.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:h})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?s(O,{children:[r.source.type==="remote"?null:e(X,{checked:r.enabled,disabled:!!v||b,"aria-label":l(r.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:h}),onCheckedChange:(a)=>void V(r,a)}),e(f,{variant:"outline",size:"sm",disabled:!!v,onClick:()=>void H(r),children:v?e(S,{}):l("plugins.detail.uninstall")})]}):e(f,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":l(b?"plugins.detail.unavailable":"plugins.detail.install"),title:l(b?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!v||b,onClick:()=>void T({...o,plugin:m}).catch(()=>{}),children:v?e(S,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(k,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${Q} pt-2`,children:[t?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:t.shortDescription}),m.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(m.keywords)].map((a)=>e(L,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),s("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[t?.developerName&&e(x,{label:l("plugins.detail.developer"),children:t.developerName}),t?.category&&e(x,{label:l("plugins.detail.category"),children:t.category}),(r.localVersion??r.version)&&e(x,{label:l("plugins.detail.version"),children:r.localVersion??r.version}),e(x,{label:l("plugins.headings.marketplace"),children:o.marketplace.interface?.displayName??o.marketplace.name}),t?.websiteUrl&&e(x,{label:l("plugins.detail.website"),children:e(w,{url:t.websiteUrl,label:l("plugins.detail.website")})})]}),!n&&!D&&s("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),l("plugins.detail.loading")]}),D&&s("div",{role:"alert",className:"mt-8 space-y-2",children:[s("p",{className:"text-destructive text-sm",children:[l("plugins.detail.errorTitle"),": ",D]}),e(f,{variant:"outline",size:"sm",className:"h-9",onClick:()=>R((a)=>a+1),children:l("plugins.loadError.retry")})]}),E&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:E}),A.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(A)].map((a)=>e("img",{src:a,alt:h,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),t&&t.capabilities.length>0&&e(N,{label:l("plugins.detail.capabilities"),count:t.capabilities.length,children:t.capabilities.map((a)=>e(L,{variant:"secondary",className:"me-2",children:a},a))}),n&&n.mcpServers.length>0&&e(N,{label:l("plugins.detail.mcpServers"),count:n.mcpServers.length,children:n.mcpServers.map((a)=>s("div",{className:"flex items-center gap-3 py-1",children:[e(U,{name:m.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),n&&n.skills.length>0&&e(N,{label:l("plugins.detail.skills"),count:n.skills.length,children:n.skills.map((a)=>s(f,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(U,{name:a.name,className:"size-8"}),s("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),n&&n.apps.length>0&&e(N,{label:l("plugins.detail.apps"),count:n.apps.length,children:n.apps.map((a)=>s("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:l("plugins.installModal.connect")})]},a.id))}),n&&n.hooks.length>0&&e(N,{label:l("plugins.detail.hooks"),count:n.hooks.length,children:n.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(t?.privacyPolicyUrl||t?.termsOfServiceUrl)&&s("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[t.privacyPolicyUrl&&e(w,{url:t.privacyPolicyUrl,label:l("plugins.detail.privacyPolicy")}),t.termsOfServiceUrl&&e(w,{url:t.termsOfServiceUrl,label:l("plugins.detail.termsOfService")})]})]})}),e(q,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(F,{className:Se,children:c&&s(O,{children:[e("div",{className:"shrink-0 pr-8",children:e(U,{name:c.name,className:"size-10"})}),s("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[s(J,{className:"gap-3",children:[e(K,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(G,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(ke,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function x({label:o,children:p}){return s("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:o}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function N({label:o,count:p,children:u}){return s("section",{className:"mt-8",children:[s("h2",{className:"text-base font-medium",children:[o," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:o,label:p}){let{openLink:u}=d();if(!/^https?:\/\//i.test(o))return null;return s(f,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:o,onClick:()=>u(o),children:[p,e(M,{className:"size-3.5"})]})}
2
+ export{Vt};
@@ -0,0 +1,2 @@
1
+ import{x}from"./chunk-jfyz3rx6.js";import{Ki,Wi,Zi,Qi}from"./chunk-wvm8srp7.js";import{Rn,E,yt,V,Ct}from"./chunk-680e6bz4.js";import{Bot as p}from"lucide-react";import{jsx as l}from"react/jsx-runtime";var r={"alwith-account":Ki,chatgpt:Wi,minimax:Zi,seedream:Qi};function Fi({provider:o,className:i,...a}){let e=Object.hasOwn(r,o)?r[o]:E.find((n)=>n.id===o)?.logo??p;return l(e,{"aria-hidden":"true",...a,className:["size-4 shrink-0",i].filter(Boolean).join(" ")})}var s=new Map(Rn.filter((o)=>o.source==="account").flatMap((o)=>o.models.map((i)=>[V(o.id,i.id),i.label]))),d=new Map([...Rn.map((o)=>[o.id,o.source==="account"?1:2]),[x.id,0]]);function Tn(o){return o.shortLabel??o.label}function He(o,i={}){return o.toSorted((e,n)=>(d.get(e.id)??3)-(d.get(n.id)??3)).map((e)=>{let n=e.id===x.id;return{...e,models:e.models.map((t)=>({...t,label:s.get(t.api_id)??t.label,shortLabel:t.shortLabel??Ct[t.api_id]?.shortLabel,icon:i.providerIcon?.(e.id,t.api_id)??l(Fi,{provider:n?"chatgpt":e.id==="litellm"||e.id==="alwith-managed-litellm"||yt(t.api_id)?"alwith-account":e.id})}))}})}
2
+ export{Fi,Tn,He};
@@ -0,0 +1,2 @@
1
+ import{be}from"./chunk-x4bzkzbt.js";function C(e){return/^app:\/\/([^/?#\s)]+)$/.exec(e)?.[1]??null}function Ht(e){if(!e.includes("app://"))return[];let n=be(),r=new Map;return n.walkTokens(n.lexer(e),(i)=>{if(i.type!=="link")return;let p=i,t=C(p.href);if(t!==null)r.set(t,{id:t,name:p.text.replace(/^\$/,"")})}),[...r.values()]}function Pa(e){return[...new Map(e.map((n)=>[n.id,n])).values()].map((n)=>`[$${n.name.replace(/[\\`*_[\]<>]/g,"\\$&")}](app://${n.id})`).join(" ")}function ps(e,n){return[Pa(n),e.trim()].filter(Boolean).join(" ")}function ms(e,n){let r=Pa(n);if(!r)return e;if(e===r)return"";return e.startsWith(`${r} `)?e.slice(r.length+1):e}
2
+ export{C,Ht,Pa,ps,ms};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-18gxawh7.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function _s({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
2
- export{_s};
1
+ import{e}from"./chunk-b89bzpce.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function oa({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
2
+ export{oa};
@@ -1,5 +1,5 @@
1
- import{zo}from"./chunk-esxjnj1y.js";import{t}from"./chunk-7393tva2.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function Ta(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
- `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function Ma(o){let s=new Map,e=null;for(let n of o.split(`
3
- `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Na(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?Ma(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=n.patch?Ta(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
4
- ${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function xi({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return c(zo,{files:Na(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[c(n,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
- export{Ta,Ma,Na,xi};
1
+ import{No}from"./chunk-3a8qwbgh.js";import{t}from"./chunk-rayhzb8p.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as c,jsxs as g,Fragment as h}from"react/jsx-runtime";function La(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
+ `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function Da(o){let s=new Map,e=null;for(let n of o.split(`
3
+ `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Fa(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?Da(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let d=u(i,r),f=n.patch?La(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=d.additions,l.deletions+=d.deletions,l.patch=l.patch?`${l.patch}
4
+ ${f}`:f;else s.set(r,{path:r,patch:f,...d})}}return[...s.values()]}function Ir({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return c(No,{files:Fa(o),actions:s.EditedFilesActions?c(s.EditedFilesActions,{items:o}):void 0,onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[c(n,{path:i.path,className:"codex-edited-file-icon"}),c("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
+ export{La,Da,Fa,Ir};
@@ -1,2 +1,2 @@
1
- var B="collection-default";function ie(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Qe(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function on(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function Us(o,e=Qe()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
2
- export{B,ie,Qe,on,Us};
1
+ var z="collection-default";function se(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Qe(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function tn(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function Ys(o,e=Qe()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
2
+ export{z,se,Qe,tn,Ys};
@@ -0,0 +1,2 @@
1
+ import{x}from"./chunk-jfyz3rx6.js";import{wt}from"./chunk-pd5yrdg6.js";import{e}from"./chunk-b89bzpce.js";import{bt,V}from"./chunk-680e6bz4.js";import{Tn,He}from"./chunk-1wk1yw69.js";import{Be}from"./chunk-tszqev50.js";import{Zap as g}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function ca({snapshot:s,model:l,onChange:r,nativeModels:t,catalog:c}){let{host:u}=e(),{t:a}=u,f=[{id:x.id,name:x.name,models:t===void 0?[{api_id:"",label:x.name}]:t.map((o)=>({api_id:o.id,label:o.label??o.id}))},...(s===null?[]:bt(s)).map((o)=>({id:o.id,name:o.name,models:o.models.map((i)=>({api_id:V(o.id,i.id),label:i.label??i.id}))}))],p=He(f,c),d=p.flatMap((o)=>o.models),m=l===null?t===void 0?d[0]:{api_id:"",label:a("composer.model")}:d.find((o)=>o.api_id===l)??{api_id:l,label:l};return n(wt,{value:{...m,label:Tn(m)},models:d,modelGroups:p,header:{name:a("composer.model"),action:n(Be,{})},compactCatalog:!0,booleanOptions:[{id:"fast_mode",name:a("composer.fastMode"),currentValue:!1,disabled:!0,title:a("composer.fastModeUnsupported"),icon:n(g,{className:"size-4","aria-hidden":"true"})}],showModelList:!0,onChange:(o)=>r(o.api_id),t:(o)=>a(o)})}
2
+ export{ca};
@@ -1,4 +1,4 @@
1
- var ci=`<svg xmlns="http://www.w3.org/2000/svg">
1
+ var Qo=`<svg xmlns="http://www.w3.org/2000/svg">
2
2
  <defs>
3
3
  <linearGradient id="plugin-agent-mode-paint0_linear_1_1034" x1="30.0398" y1="40.0728" x2="11.3112" y2="-1.39757" gradientUnits="userSpaceOnUse">
4
4
  <stop stop-color="#2BBFFF"/>
@@ -1286,4 +1286,4 @@ var ci=`<svg xmlns="http://www.w3.org/2000/svg">
1286
1286
  </symbol>
1287
1287
  </svg>
1288
1288
  `;
1289
- export{ci};
1289
+ export{Qo};
@@ -1,2 +1,2 @@
1
- import{n}from"./chunk-7393tva2.js";import{ut}from"./chunk-avq6x733.js";import{e,x}from"./chunk-18gxawh7.js";import{Zn}from"./chunk-38geb5gj.js";import{Loader2Icon as v}from"lucide-react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as f}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as o,jsxs as i}from"react/jsx-runtime";function Bt({session:t,timeline:s}){let{host:m,client:a}=e(),{t:r}=m,u=n((h)=>h.historyPages[t.id]?.cursor!=null),y=Zn(t,s?.turnWork),E=()=>x(m,a.open(t.id,t.cwd)),p=o(ut,{...s,session:t,client:a,host:m,turnWork:y});if(t.restoring)return t.items.length===0?i("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[o(f,{children:r("conversation.reopen")}),o(l,{children:r("conversation.detached")})]}),o(g,{onClick:E,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return o(c,{className:"flex-1",children:i(d,{children:[o(f,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),o(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
2
- export{Bt};
1
+ import{n}from"./chunk-rayhzb8p.js";import{Nt}from"./chunk-0brr8j8e.js";import{e,b}from"./chunk-b89bzpce.js";import{to}from"./chunk-jsay66xb.js";import{Loader2Icon as v}from"lucide-react";import{Button as x}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as c,EmptyDescription as l,EmptyHeader as d,EmptyTitle as f}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as o,jsxs as i}from"react/jsx-runtime";function cn({session:t,timeline:s}){let{host:m,client:a}=e(),{t:r}=m,u=n((h)=>h.historyPages[t.id]?.cursor!=null),y=to(t,s?.turnWork),E=()=>b(m,a.open(t.id,t.cwd)),p=o(Nt,{...s,session:t,client:a,host:m,turnWork:y});if(t.restoring)return t.items.length===0?i("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),r("conversation.restoring")]}):p;if(!t.attached&&t.items.length===0)return i(c,{className:"flex-1",children:[i(d,{children:[o(f,{children:r("conversation.reopen")}),o(l,{children:r("conversation.detached")})]}),o(x,{onClick:E,children:r("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!u)return o(c,{className:"flex-1",children:i(d,{children:[o(f,{className:"text-[28px] font-normal",children:r("conversation.welcomeTitle")}),o(l,{className:"truncate font-mono",children:t.cwd})]})});return p}
2
+ export{cn};
@@ -0,0 +1,2 @@
1
+ function yi(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function eo(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Je(t){return t.type==="array"}function on(t){return(Je(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
2
+ export{yi,eo,Je,on};
@@ -1,2 +1,2 @@
1
- import{d}from"./chunk-0f00j53n.js";import{q,K,W,Z}from"./chunk-7egc2x4q.js";import{Item as i}from"@nyssance/shadcn/vega/components/ui/item";import{Skeleton as s}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as e,jsxs as a}from"react/jsx-runtime";function ke({skills:l=!1}){let{t:o}=d();return a("div",{role:"status","aria-label":o(l?"plugins.skills.loading":"plugins.loading"),className:"my-3 flex flex-col gap-4",children:[e(s,{className:"h-4 w-36"}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2","aria-hidden":"true",children:[1,2,3,4,5,6,7,8].map((t)=>a(i,{size:"xs",className:"toolbox-row",children:[e(W,{children:e(s,{className:"size-10 rounded-xl"})}),a(K,{className:"min-w-0 group-data-[size=xs]/item:gap-2",children:[e(s,{className:"h-4 w-2/3"}),e(s,{className:"h-3 w-full"}),e(s,{className:"h-3 w-1/3"})]}),e(q,{children:e(s,{className:"size-8 rounded-full"})})]},t))})]})}
2
- export{ke};
1
+ import{d}from"./chunk-r26hz85q.js";import{q,K,W,Z}from"./chunk-fbrv2v3t.js";import{Item as i}from"@nyssance/shadcn/vega/components/ui/item";import{Skeleton as s}from"@nyssance/shadcn/vega/components/ui/skeleton";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Ce({skills:l=!1}){let{t:o}=d();return a("div",{role:"status","aria-label":o(l?"plugins.skills.loading":"plugins.loading"),className:"my-3 flex flex-col gap-4",children:[e(s,{className:"h-4 w-36"}),e(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2","aria-hidden":"true",children:[1,2,3,4,5,6,7,8].map((t)=>a(i,{size:"xs",className:"toolbox-row",children:[e(W,{children:e(s,{className:"size-10 rounded-xl"})}),a(K,{className:"min-w-0 group-data-[size=xs]/item:gap-2",children:[e(s,{className:"h-4 w-2/3"}),e(s,{className:"h-3 w-full"}),e(s,{className:"h-3 w-1/3"})]}),e(q,{children:e(s,{className:"size-8 rounded-full"})})]},t))})]})}
2
+ export{Ce};
@@ -1,2 +1,2 @@
1
- import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var Or={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},Hr={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function V({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=Or[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",Hr.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
2
- export{Or,Hr,V};
1
+ import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as i}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var ui={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-blue-500",idle:"bg-green-500"},pi={requires_action:"text-red-500",running:"text-yellow-500",done:"text-blue-500",idle:"text-green-500"};function G({state:n,className:t,pulse:s=!0,title:r}){if(n===void 0)return null;let o=ui[n];if(n==="running"&&s)return u("span",{title:r,className:i("relative inline-flex size-1.5 shrink-0 items-center justify-center",pi.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:r,className:i("size-2 shrink-0 rounded-full",o,t)})}
2
+ export{ui,pi,G};
@@ -1,3 +1,3 @@
1
- import{c}from"./chunk-hz8yrg2t.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
2
- `).length}function Va(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function ls({blocks:e}){return s(zo,{files:Va(e)})}function zo({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
3
- export{Va,ls,zo};
1
+ import{c}from"./chunk-06mvwewp.js";import{ChevronDownIcon as b,ChevronUpIcon as C,FileDiffIcon as k}from"lucide-react";import{useState as m}from"react";import{jsx as s,jsxs as o}from"react/jsx-runtime";function x(e){if(e===null||e.length===0)return 0;return e.split(`
2
+ `).length}function Oa(e){let a=new Map;for(let r of e)for(let u of r.content){if(u.type!=="diff")continue;let d=u,f=d._meta?.alwith?.hunks??[],l=f.reduce((n,i)=>n+x(i.newText),0),h=f.reduce((n,i)=>n+x(i.oldText),0);for(let n of d.changes){let i=a.get(n.path);if(i)i.additions+=l,i.deletions+=h;else a.set(n.path,{path:n.path,additions:l,deletions:h})}}return[...a.values()]}function Tr({blocks:e}){return s(No,{files:Oa(e)})}function No({files:e,onOpen:a,renderPath:r,actions:u}){let{t:d,openLink:f}=c(),[l,h]=m(!0),[n,i]=m(!1);if(e.length===0)return null;let g=e.reduce((t,p)=>t+p.additions,0),v=e.reduce((t,p)=>t+p.deletions,0);return o("section",{className:"codex-edited-files-card",children:[o("div",{className:"codex-edited-files-header",children:[s("div",{className:"codex-edited-files-icon","aria-hidden":"true",children:s(k,{})}),o("div",{className:"codex-edited-files-summary",children:[s("strong",{children:d("stream.codex.editedFilesCount",{count:e.length})}),s("button",{type:"button","data-codex-disclosure":"",onClick:()=>{h((t)=>!t),i(!1)},"aria-expanded":l,children:d(l?"stream.codex.hideChanges":"stream.codex.viewChanges")})]}),u,o("div",{className:"codex-edited-files-total",title:d("stream.codex.changedLines"),children:[o("span",{className:"codex-diff-additions",children:["+",g]}),o("span",{className:"codex-diff-deletions",children:["-",v]})]})]}),l&&o("div",{className:"codex-edited-files-list",children:[(n?e:e.slice(0,3)).map((t)=>o("div",{className:"codex-edited-file-row",children:[s("button",{type:"button",className:"codex-edited-file-path",title:t.path,onClick:()=>a===void 0?f(t.path):a(t),children:r===void 0?t.path:r(t)}),o("span",{className:"codex-edited-file-counts",children:[o("span",{className:"codex-diff-additions",children:["+",t.additions]}),o("span",{className:"codex-diff-deletions",children:["-",t.deletions]})]})]},t.path)),e.length>3&&o("button",{type:"button",className:"codex-edited-files-more","aria-expanded":n,onClick:()=>i((t)=>!t),children:[d(n?"stream.codex.showFewerFiles":"stream.codex.showMoreFiles",{count:e.length-3}),n?s(C,{size:16,"aria-hidden":"true"}):s(b,{size:16,"aria-hidden":"true"})]})]})]})}
3
+ export{Oa,Tr,No};
@@ -1,2 +1,2 @@
1
- import{a,o}from"./chunk-r7z3mvej.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function $n(e,r){let s=a(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(r==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,i,r]),i?u:p??u}
2
- export{$n};
1
+ import{a,o}from"./chunk-af0e5epn.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Kt(e,r){let s=a(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await s.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(r==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[s,e,c,f,i,r]),i?u:p??u}
2
+ export{Kt};
@@ -1,2 +1,2 @@
1
- import{ys,rt,Wo,xs,bs,Cs}from"./chunk-tjc0ntnh.js";import{forwardRef as ye,useCallback as K,useEffect as ge,useImperativeHandle as ve,useLayoutEffect as w,useMemo as ne,useRef as s,useState as F}from"react";import{jsx as R,jsxs as re}from"react/jsx-runtime";var pe=12,X=2,V=800,he=new Map;function Re({turnKey:q,heightPx:x,placeholder:W=!1,deferUntilReady:n=!1,observe:b,onReady:L,children:z}){let h=s(null),[H,_]=F(!1),U=K((m)=>{h.current=m,b(q,m)},[b,q]);return w(()=>{let m=h.current;if(m===null)throw Error("Codex turn element is missing");let T=()=>{L(m),_(!0)};if(m.querySelector("[data-markdown-pending]")===null){T();return}let d=new MutationObserver(()=>{if(m.querySelector("[data-markdown-pending]")!==null)return;d.disconnect(),T()});return d.observe(m,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-markdown-pending"]}),()=>d.disconnect()},[L]),re("div",{style:H?void 0:{position:"relative",height:x,overflow:"hidden"},children:[R("div",{ref:U,className:"[&_[data-virtualized-turn-content]]:[content-visibility:visible]","data-turn-key":q,"aria-busy":!H||void 0,style:!H&&!W&&n?{visibility:"hidden"}:void 0,"data-turn-ready":H?"":void 0,children:z}),!H&&!W&&n&&R("div",{"aria-hidden":"true",className:"codex-turn-loading",children:re("div",{className:"codex-turn-loading-lines",children:[R("span",{}),R("span",{}),R("span",{})]})})]})}var vs=ye(function({entries:x,renderTurn:W,scrollElement:n,sessionKey:b,leadingContent:L,leadingInsetPx:z=0,preserveViewport:h=!1},H){let _=s(null),[U,m]=F(z),T=L!==void 0&&L!==null;w(()=>{let e=_.current;if(e===null)return;let t=()=>m(e.getBoundingClientRect().height);t();let o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[T]);let d=ne(()=>he.get(b),[b]),[j,J]=F(()=>d?.turnHeightsByKey??{}),i=ne(()=>ys({entries:x,gapPx:pe,measuredHeightsByKey:j,leadingInsetPx:T?U:z}),[x,j,T,U,z]),me=ne(()=>{let e=rt({distanceFromBottomPx:d?.distanceFromBottomPx??0,layout:i,overscanCount:X,viewportHeightPx:V}),t=d?.renderedWindow;if(t===void 0||t===null)return e;return Wo({anchorKey:t.anchorKey,layout:i,previousRange:{startIndex:0,endIndex:Math.min(t.count,e.endIndex-e.startIndex)}})??e},[d,i]),[M,ie]=F(me),[y,oe]=F(V),[c,ue]=F(null),N=s(d?.distanceFromBottomPx??0),k=s(M),ae=s(i.turnKeys),l=s(j),S=s(i),se=s(i),P=s(new Map),v=s(null),C=s(null),E=s(null),D=s(new Map),Q=s(!1),ce=s(()=>{}),O=s(null),de=K(()=>{if(!h||n===null||v.current!==null||O.current!==null)return;let e=n.getBoundingClientRect();if(e.height<=0)return;let t=[...P.current].filter(([,r])=>r.hasAttribute("data-turn-ready")).map(([r,u])=>{let a=u.getBoundingClientRect(),g=S.current.turnIndexByKey.get(r),B=g===void 0?a.height:S.current.heightsPx[g];return{key:r,element:u,rect:a,bottom:a.top+B}}).filter(({rect:r,bottom:u})=>u>e.top&&r.top<e.bottom).toSorted((r,u)=>r.rect.top-u.rect.top),o=t.flatMap((r)=>[...r.element.querySelectorAll("[data-user-message-bubble], .codex-markdown-root > *")].filter((u)=>!u.closest('[aria-hidden="true"], [inert]')).map((u)=>({key:r.key,element:u,rect:u.getBoundingClientRect()})).filter(({rect:u})=>u.height>0&&u.top>=e.top&&u.top<e.bottom)).toSorted((r,u)=>r.rect.top-u.rect.top)[0]??t[0];if(o)O.current={key:o.key,element:o.element,top:o.rect.top-e.top,scrollTop:n.scrollTop}},[h,n]),Y=s(de);Y.current=de;let p=K((e,t)=>{let o=Math.min(e,i.totalHeightPx),r=rt({distanceFromBottomPx:o,layout:i,overscanCount:X,viewportHeightPx:t}),u=k.current,a=u.startIndex<=r.startIndex&&u.endIndex>=r.endIndex?u:r;if(N.current=o,k.current=a,ae.current=i.turnKeys,oe(t),a!==u)ie(a)},[i]),A=K((e)=>{let t=Math.max(0,e.scrollHeight-i.totalHeightPx);return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop-t)},[i.totalHeightPx]),fe=K((e)=>{let t=e.dataset.turnKey;if(t===void 0)throw Error("Codex measured turn is missing its key");let o=Math.max(1,e.getBoundingClientRect().height);if(l.current[t]===o)return;Y.current();let r={...l.current,[t]:o};l.current=r,J(r)},[]),Z=K(()=>{if(C.current!==null)return C.current;return C.current=new ResizeObserver((e)=>{for(let t of e){let o=t.target;if(!("turnReady"in o.dataset)&&o.querySelector("[data-markdown-pending]")!==null)continue;let r=o.dataset.turnKey;if(r===void 0)throw Error("Codex measured turn is missing its key");let u=Math.max(1,t.borderBoxSize[0]?.blockSize??t.contentRect.height);D.current.set(r,u)}if(E.current!==null||D.current.size===0)return;E.current=requestAnimationFrame(()=>{E.current=null;let t=[...D.current].filter(([r,u])=>l.current[r]!==u);if(D.current.clear(),t.length===0)return;Y.current();let o={...l.current,...Object.fromEntries(t)};l.current=o,J(o)})}),C.current},[]),xe=K((e,t)=>{let o=P.current.get(e);if(o!==void 0)Z().unobserve(o),P.current.delete(e);if(t===null)return;if(t.dataset.turnKey!==e)throw Error(`Codex turn key does not match its element: ${e}`);P.current.set(e,t),Z().observe(t)},[Z]);ge(()=>()=>{if(C.current?.disconnect(),E.current!==null)cancelAnimationFrame(E.current);D.current.clear(),C.current=null,P.current.clear()},[]),w(()=>{ce.current=()=>{if(n===null)return;let e=A(n);if(v.current!==null){N.current=e,oe(n.clientHeight||V);return}p(e,n.clientHeight||V)}},[A,n,p]),w(()=>{if(n===null)return;if(!Q.current){Q.current=!0;let o=d?.distanceFromBottomPx??0;n.scrollTo({behavior:"instant",top:Math.max(0,o>0?S.current.totalHeightPx-n.clientHeight-o:n.scrollHeight-n.clientHeight)})}let e=()=>ce.current();e(),n.addEventListener("scroll",e,{passive:!0});let t=new ResizeObserver(e);return t.observe(n),()=>{n.removeEventListener("scroll",e),t.disconnect()}},[d,n]),w(()=>{if(n===null||c===null)return;let e=P.current.get(c.turnKey);if(e?.querySelector("[data-markdown-pending]")!==null)return;let t=e.offsetHeight;if(t<=0)return;if(l.current[c.turnKey]!==t){let g={...l.current,[c.turnKey]:t};l.current=g,J(g);return}let o=c.getTargetElement(e)??e,r=e.getBoundingClientRect(),u=o.getBoundingClientRect(),a=Cs({align:c.align,layout:i,targetHeightPx:u.height,targetOffsetPx:u.top-r.top,turnKey:c.turnKey,viewportHeightPx:n.clientHeight});if(a===null)throw Error(`Codex virtual turn is missing: ${c.turnKey}`);n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-a)}),p(a,n.clientHeight||V),queueMicrotask(()=>{if(v.current!==c)return;c.complete(),v.current=null,ue(null)})},[i,c,n,p]),w(()=>{let e=se.current;if(se.current=i,S.current=i,n===null||c!==null){O.current=null;return}let t=O.current;O.current=null;let o=t===null?void 0:n.contains(t.element)?t.element:P.current.get(t.key);if(h&&e!==i&&t!==null&&o!==void 0){let u=o.getBoundingClientRect().top-n.getBoundingClientRect().top,a=n.scrollTop-t.scrollTop;n.scrollTop+=u-t.top+a,p(A(n),n.clientHeight);return}let r=N.current;if(h&&e!==i&&Q.current)r=Math.max(0,e.totalHeightPx-n.clientHeight-n.scrollTop);if((r>24||h)&&e!==i){let u=A(n);if(u<=96&&!h){p(u,y);return}let a=rt({distanceFromBottomPx:r,layout:e,overscanCount:0,viewportHeightPx:y}),g=e.turnKeys.slice(a.startIndex,a.endIndex).filter((f)=>i.turnIndexByKey.has(f)),B=g.find((f)=>l.current[f]!==void 0)??g[0];if(B!==void 0){let f=xs({anchorKey:B,distanceFromBottomPx:r,nextLayout:i,previousLayout:e});if(f===null)throw Error(`Codex viewport anchor is missing: ${B}`);r=f,n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-r)})}}p(r,y)},[i,c,A,n,p,y,h]),w(()=>{k.current=M},[M]),ge(()=>()=>{v.current?.complete(),v.current=null;let e=k.current,o=S.current.turnKeys[e.startIndex];he.set(b,{distanceFromBottomPx:N.current,renderedWindow:o===void 0?null:{anchorKey:o,count:e.endIndex-e.startIndex},turnHeightsByKey:l.current})},[b]),ve(H,()=>({scrollToKey(e,t=(r)=>r,o={align:"center"}){v.current?.complete();let r=i.turnIndexByKey.get(e);if(r===void 0)throw Error(`Codex virtual turn is missing: ${e}`);let u=i.turnKeys[r],a=bs({layout:i,turnKey:e,viewportHeightPx:y});if(a===null)throw Error(`Codex virtual turn is missing: ${e}`);let g=rt({distanceFromBottomPx:a,layout:i,overscanCount:X,viewportHeightPx:y});return k.current=g,ie(g),new Promise((B)=>{let f={align:o.align,complete:B,getTargetElement:t,turnKey:u};v.current=f,ue(f)})}}),[i,y]);let I=M,G=ae.current;if(!(G===i.turnKeys||G.length===i.turnKeys.length&&G.every((e,t)=>e===i.turnKeys[t]))){let e=G[M.startIndex];I=(e===void 0?null:Wo({anchorKey:e,layout:i,previousRange:M}))??rt({distanceFromBottomPx:N.current,layout:i,overscanCount:X,viewportHeightPx:y})}let ee=x.length-1,le=x[ee],te=x.slice(I.startIndex,Math.min(I.endIndex,ee)).map((e,t)=>({entry:e,index:I.startIndex+t}));if(le!==void 0)te.push({entry:le,index:ee});return re("div",{"data-codex-timeline":!0,"data-codex-virtualized-pending-key":c?.turnKey,"data-codex-virtualized-range":`${I.startIndex}:${I.endIndex}`,"data-codex-virtualized-total-count":x.length,"data-codex-virtualized-turn-count":te.length,className:"relative shrink-0",style:{height:i.totalHeightPx},children:[T&&R("div",{ref:_,"data-codex-timeline-leading":!0,className:"absolute inset-x-0 top-0",children:L}),te.map(({entry:e,index:t})=>R("div",{className:"absolute inset-x-0",style:{top:i.topOffsetsPx[t]??0},children:R(Re,{turnKey:e.turnKey,heightPx:i.heightsPx[t],placeholder:e.placeholder,deferUntilReady:e.deferUntilReady,observe:xe,onReady:fe,children:W(e,t)})},e.turnKey))]})});
2
- export{vs};
1
+ import{br,ot,_o,Cr,wr,kr}from"./chunk-705j0x4q.js";import{forwardRef as ye,useCallback as K,useEffect as ge,useImperativeHandle as ve,useLayoutEffect as w,useMemo as ne,useRef as s,useState as F}from"react";import{jsx as R,jsxs as re}from"react/jsx-runtime";var pe=12,X=2,V=800,he=new Map;function Re({turnKey:q,heightPx:x,placeholder:W=!1,deferUntilReady:n=!1,observe:b,onReady:L,children:z}){let h=s(null),[H,_]=F(!1),U=K((m)=>{h.current=m,b(q,m)},[b,q]);return w(()=>{let m=h.current;if(m===null)throw Error("Codex turn element is missing");let T=()=>{L(m),_(!0)};if(m.querySelector("[data-markdown-pending]")===null){T();return}let d=new MutationObserver(()=>{if(m.querySelector("[data-markdown-pending]")!==null)return;d.disconnect(),T()});return d.observe(m,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-markdown-pending"]}),()=>d.disconnect()},[L]),re("div",{style:H?void 0:{position:"relative",height:x,overflow:"hidden"},children:[R("div",{ref:U,className:"[&_[data-virtualized-turn-content]]:[content-visibility:visible]","data-turn-key":q,"aria-busy":!H||void 0,style:!H&&!W&&n?{visibility:"hidden"}:void 0,"data-turn-ready":H?"":void 0,children:z}),!H&&!W&&n&&R("div",{"aria-hidden":"true",className:"codex-turn-loading",children:re("div",{className:"codex-turn-loading-lines",children:[R("span",{}),R("span",{}),R("span",{})]})})]})}var xr=ye(function({entries:x,renderTurn:W,scrollElement:n,sessionKey:b,leadingContent:L,leadingInsetPx:z=0,preserveViewport:h=!1},H){let _=s(null),[U,m]=F(z),T=L!==void 0&&L!==null;w(()=>{let e=_.current;if(e===null)return;let t=()=>m(e.getBoundingClientRect().height);t();let o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[T]);let d=ne(()=>he.get(b),[b]),[j,J]=F(()=>d?.turnHeightsByKey??{}),i=ne(()=>br({entries:x,gapPx:pe,measuredHeightsByKey:j,leadingInsetPx:T?U:z}),[x,j,T,U,z]),me=ne(()=>{let e=ot({distanceFromBottomPx:d?.distanceFromBottomPx??0,layout:i,overscanCount:X,viewportHeightPx:V}),t=d?.renderedWindow;if(t===void 0||t===null)return e;return _o({anchorKey:t.anchorKey,layout:i,previousRange:{startIndex:0,endIndex:Math.min(t.count,e.endIndex-e.startIndex)}})??e},[d,i]),[M,ie]=F(me),[y,oe]=F(V),[c,ue]=F(null),N=s(d?.distanceFromBottomPx??0),k=s(M),ae=s(i.turnKeys),l=s(j),S=s(i),se=s(i),P=s(new Map),v=s(null),C=s(null),E=s(null),D=s(new Map),Q=s(!1),ce=s(()=>{}),O=s(null),de=K(()=>{if(!h||n===null||v.current!==null||O.current!==null)return;let e=n.getBoundingClientRect();if(e.height<=0)return;let t=[...P.current].filter(([,r])=>r.hasAttribute("data-turn-ready")).map(([r,u])=>{let a=u.getBoundingClientRect(),g=S.current.turnIndexByKey.get(r),B=g===void 0?a.height:S.current.heightsPx[g];return{key:r,element:u,rect:a,bottom:a.top+B}}).filter(({rect:r,bottom:u})=>u>e.top&&r.top<e.bottom).toSorted((r,u)=>r.rect.top-u.rect.top),o=t.flatMap((r)=>[...r.element.querySelectorAll("[data-user-message-bubble], .codex-markdown-root > *")].filter((u)=>!u.closest('[aria-hidden="true"], [inert]')).map((u)=>({key:r.key,element:u,rect:u.getBoundingClientRect()})).filter(({rect:u})=>u.height>0&&u.top>=e.top&&u.top<e.bottom)).toSorted((r,u)=>r.rect.top-u.rect.top)[0]??t[0];if(o)O.current={key:o.key,element:o.element,top:o.rect.top-e.top,scrollTop:n.scrollTop}},[h,n]),Y=s(de);Y.current=de;let p=K((e,t)=>{let o=Math.min(e,i.totalHeightPx),r=ot({distanceFromBottomPx:o,layout:i,overscanCount:X,viewportHeightPx:t}),u=k.current,a=u.startIndex<=r.startIndex&&u.endIndex>=r.endIndex?u:r;if(N.current=o,k.current=a,ae.current=i.turnKeys,oe(t),a!==u)ie(a)},[i]),A=K((e)=>{let t=Math.max(0,e.scrollHeight-i.totalHeightPx);return Math.max(0,e.scrollHeight-e.clientHeight-e.scrollTop-t)},[i.totalHeightPx]),fe=K((e)=>{let t=e.dataset.turnKey;if(t===void 0)throw Error("Codex measured turn is missing its key");let o=Math.max(1,e.getBoundingClientRect().height);if(l.current[t]===o)return;Y.current();let r={...l.current,[t]:o};l.current=r,J(r)},[]),Z=K(()=>{if(C.current!==null)return C.current;return C.current=new ResizeObserver((e)=>{for(let t of e){let o=t.target;if(!("turnReady"in o.dataset)&&o.querySelector("[data-markdown-pending]")!==null)continue;let r=o.dataset.turnKey;if(r===void 0)throw Error("Codex measured turn is missing its key");let u=Math.max(1,t.borderBoxSize[0]?.blockSize??t.contentRect.height);D.current.set(r,u)}if(E.current!==null||D.current.size===0)return;E.current=requestAnimationFrame(()=>{E.current=null;let t=[...D.current].filter(([r,u])=>l.current[r]!==u);if(D.current.clear(),t.length===0)return;Y.current();let o={...l.current,...Object.fromEntries(t)};l.current=o,J(o)})}),C.current},[]),xe=K((e,t)=>{let o=P.current.get(e);if(o!==void 0)Z().unobserve(o),P.current.delete(e);if(t===null)return;if(t.dataset.turnKey!==e)throw Error(`Codex turn key does not match its element: ${e}`);P.current.set(e,t),Z().observe(t)},[Z]);ge(()=>()=>{if(C.current?.disconnect(),E.current!==null)cancelAnimationFrame(E.current);D.current.clear(),C.current=null,P.current.clear()},[]),w(()=>{ce.current=()=>{if(n===null)return;let e=A(n);if(v.current!==null){N.current=e,oe(n.clientHeight||V);return}p(e,n.clientHeight||V)}},[A,n,p]),w(()=>{if(n===null)return;if(!Q.current){Q.current=!0;let o=d?.distanceFromBottomPx??0;n.scrollTo({behavior:"instant",top:Math.max(0,o>0?S.current.totalHeightPx-n.clientHeight-o:n.scrollHeight-n.clientHeight)})}let e=()=>ce.current();e(),n.addEventListener("scroll",e,{passive:!0});let t=new ResizeObserver(e);return t.observe(n),()=>{n.removeEventListener("scroll",e),t.disconnect()}},[d,n]),w(()=>{if(n===null||c===null)return;let e=P.current.get(c.turnKey);if(e?.querySelector("[data-markdown-pending]")!==null)return;let t=e.offsetHeight;if(t<=0)return;if(l.current[c.turnKey]!==t){let g={...l.current,[c.turnKey]:t};l.current=g,J(g);return}let o=c.getTargetElement(e)??e,r=e.getBoundingClientRect(),u=o.getBoundingClientRect(),a=kr({align:c.align,layout:i,targetHeightPx:u.height,targetOffsetPx:u.top-r.top,turnKey:c.turnKey,viewportHeightPx:n.clientHeight});if(a===null)throw Error(`Codex virtual turn is missing: ${c.turnKey}`);n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-a)}),p(a,n.clientHeight||V),queueMicrotask(()=>{if(v.current!==c)return;c.complete(),v.current=null,ue(null)})},[i,c,n,p]),w(()=>{let e=se.current;if(se.current=i,S.current=i,n===null||c!==null){O.current=null;return}let t=O.current;O.current=null;let o=t===null?void 0:n.contains(t.element)?t.element:P.current.get(t.key);if(h&&e!==i&&t!==null&&o!==void 0){let u=o.getBoundingClientRect().top-n.getBoundingClientRect().top,a=n.scrollTop-t.scrollTop;n.scrollTop+=u-t.top+a,p(A(n),n.clientHeight);return}let r=N.current;if(h&&e!==i&&Q.current)r=Math.max(0,e.totalHeightPx-n.clientHeight-n.scrollTop);if((r>24||h)&&e!==i){let u=A(n);if(u<=96&&!h){p(u,y);return}let a=ot({distanceFromBottomPx:r,layout:e,overscanCount:0,viewportHeightPx:y}),g=e.turnKeys.slice(a.startIndex,a.endIndex).filter((f)=>i.turnIndexByKey.has(f)),B=g.find((f)=>l.current[f]!==void 0)??g[0];if(B!==void 0){let f=Cr({anchorKey:B,distanceFromBottomPx:r,nextLayout:i,previousLayout:e});if(f===null)throw Error(`Codex viewport anchor is missing: ${B}`);r=f,n.scrollTo({behavior:"instant",top:Math.max(0,i.totalHeightPx-n.clientHeight-r)})}}p(r,y)},[i,c,A,n,p,y,h]),w(()=>{k.current=M},[M]),ge(()=>()=>{v.current?.complete(),v.current=null;let e=k.current,o=S.current.turnKeys[e.startIndex];he.set(b,{distanceFromBottomPx:N.current,renderedWindow:o===void 0?null:{anchorKey:o,count:e.endIndex-e.startIndex},turnHeightsByKey:l.current})},[b]),ve(H,()=>({scrollToKey(e,t=(r)=>r,o={align:"center"}){v.current?.complete();let r=i.turnIndexByKey.get(e);if(r===void 0)throw Error(`Codex virtual turn is missing: ${e}`);let u=i.turnKeys[r],a=wr({layout:i,turnKey:e,viewportHeightPx:y});if(a===null)throw Error(`Codex virtual turn is missing: ${e}`);let g=ot({distanceFromBottomPx:a,layout:i,overscanCount:X,viewportHeightPx:y});return k.current=g,ie(g),new Promise((B)=>{let f={align:o.align,complete:B,getTargetElement:t,turnKey:u};v.current=f,ue(f)})}}),[i,y]);let I=M,G=ae.current;if(!(G===i.turnKeys||G.length===i.turnKeys.length&&G.every((e,t)=>e===i.turnKeys[t]))){let e=G[M.startIndex];I=(e===void 0?null:_o({anchorKey:e,layout:i,previousRange:M}))??ot({distanceFromBottomPx:N.current,layout:i,overscanCount:X,viewportHeightPx:y})}let ee=x.length-1,le=x[ee],te=x.slice(I.startIndex,Math.min(I.endIndex,ee)).map((e,t)=>({entry:e,index:I.startIndex+t}));if(le!==void 0)te.push({entry:le,index:ee});return re("div",{"data-codex-timeline":!0,"data-codex-virtualized-pending-key":c?.turnKey,"data-codex-virtualized-range":`${I.startIndex}:${I.endIndex}`,"data-codex-virtualized-total-count":x.length,"data-codex-virtualized-turn-count":te.length,className:"relative shrink-0",style:{height:i.totalHeightPx},children:[T&&R("div",{ref:_,"data-codex-timeline-leading":!0,className:"absolute inset-x-0 top-0",children:L}),te.map(({entry:e,index:t})=>R("div",{className:"absolute inset-x-0",style:{top:i.topOffsetsPx[t]??0},children:R(Re,{turnKey:e.turnKey,heightPx:i.heightsPx[t],placeholder:e.placeholder,deferUntilReady:e.deferUntilReady,observe:xe,onReady:fe,children:W(e,t)})},e.turnKey))]})});
2
+ export{xr};
@@ -1,2 +1,2 @@
1
- import{g}from"./chunk-32zzqeyf.js";import{e}from"./chunk-18gxawh7.js";import{u}from"./chunk-6ja6pt5x.js";import{isTauri as R}from"@tauri-apps/api/core";import{getCurrentWebview as M}from"@tauri-apps/api/webview";import{useEffect as j,useLayoutEffect as k,useRef as q}from"react";import{flushSync as v}from"react-dom";var z=33554432,x=new WeakMap;function U(s){return s.split(/[/\\]/).findLast((m)=>m!=="")??s}var bn={sourcePath:(s)=>x.get(s),uniqueFiles(s,m){let l=new Set(m.map((d)=>d.sourcePath));return s.filter((d)=>{let h=x.get(d);if(h===void 0)return!0;if(l.has(h))return!1;return l.add(h),!0})}};function Cn({sessionId:s,imagesOnly:m=!1,picker:l,enabled:d,onMention:h,onBusyChange:C}){let D=g(),{host:T}=e(),o=q({sessionId:s,attachments:D,enabled:d,onMention:h,onBusyChange:C,host:T,imagesOnly:m});return k(()=>{o.current={sessionId:s,attachments:D,enabled:d,onMention:h,onBusyChange:C,host:T,imagesOnly:m}}),j(()=>{if(!R())return;let f=!1,W,S=Promise.resolve(),b=0,y=()=>!f&&o.current.sessionId===s&&o.current.enabled,w=(r)=>{let{host:i}=o.current;if(i.reportError)i.reportError(r);else console.error(r)},E=()=>w(Error(o.current.host.t("composer.dropUnavailable")));o.current.onBusyChange(!1);let F=(r)=>{b++,v(()=>o.current.onBusyChange(!0)),S=S.then(async()=>{try{let i=new Set(o.current.attachments.files.map((t)=>t.sourcePath));for(let t of new Set(await r())){let a=typeof t==="string"?t:t.name;if(!y())return;try{if(typeof t!=="string"&&t.type.startsWith("image/")){v(()=>o.current.attachments.add([t]));continue}if(typeof t!=="string"&&t.size>z)throw Error("Pasted file exceeds the 32 MiB limit");let p=typeof t==="string"?t:await u.writePastedFile({name:t.name,data:[...new Uint8Array(await t.arrayBuffer())]});if(!y())return;let c=await u.readDroppedFile({path:p});if(!y())return;if(c.image===null){if(o.current.imagesOnly)throw Error(o.current.host.t("composer.unsupportedAttachmentTitle"));v(()=>o.current.onMention(c.path))}else if(!i.has(c.path)){let A=Uint8Array.from(atob(c.image.data),(P)=>P.charCodeAt(0)),n=new File([A],c.name,{type:c.image.mimeType});x.set(n,c.path),i.add(c.path),v(()=>o.current.attachments.add([n]))}}catch(p){if(!f)w(Object.assign(Error(o.current.host.t("composer.dropFailed",{name:U(a)})),{description:p instanceof Error?p.message:String(p)}))}}}finally{if(b--,!f)v(()=>o.current.onBusyChange(b>0))}}).catch((i)=>{if(!f)w(i)})},B=(r)=>{if(!y()){E();return}if(o.current.imagesOnly&&r.some((i)=>!i.type.startsWith("image/"))){w(Error(o.current.host.t("composer.unsupportedAttachmentTitle")));return}F(()=>Promise.resolve(r))};if(l)l.current=B;let O=M().onDragDropEvent((r)=>{if(f||r.payload.type!=="drop")return;let{paths:i,position:t}=r.payload,a=document.elementFromPoint(t.x/window.devicePixelRatio,t.y/window.devicePixelRatio);if(!a?.closest("[data-chat-drop-zone]")||a.closest('[role="dialog"]'))return;if(!y()){E();return}F(()=>Promise.resolve(i))}),L=(r)=>{let i=r.target;if(!(i instanceof Element)||!i.matches("[data-chat-input]"))return;if(!i.closest("[data-chat-drop-zone]")||i.closest('[role="dialog"]'))return;let t=r.clipboardData;if(!t)return;let a=[...t.files??[]],p=[...t.items??[]];if(!(t.types.includes("Files")&&!a.length&&!p.some((n)=>n.type.startsWith("image/")))&&!a.some((n)=>!n.type.startsWith("image/"))&&!p.some((n)=>n.kind==="file"&&!n.type.startsWith("image/"))&&!["text/uri-list","x-special/gnome-copied-files"].some((n)=>t.types.includes(n)&&/^file:\/\//m.test(t.getData(n))))return;if(r.preventDefault(),r.stopPropagation(),!y()){E();return}let A=u.clipboardFilePaths().then((n)=>({value:n}),(n)=>({error:n}));F(async()=>{let n=await A;if("error"in n)throw n.error;let P=n.value;if(P.length)return P;if(a.length)return a;throw Error("The clipboard contains no readable local files")})};return document.addEventListener("paste",L,!0),O.then((r)=>{if(f)r();else W=r}).catch((r)=>{if(!f)w(r)}),()=>{if(f=!0,l?.current===B)l.current=null;document.removeEventListener("paste",L,!0),W?.()}},[s,l]),null}
2
- export{bn,Cn};
1
+ import{g}from"./chunk-ezrq0dya.js";import{e}from"./chunk-b89bzpce.js";import{p}from"./chunk-n96z8etk.js";import{isTauri as R}from"@tauri-apps/api/core";import{getCurrentWebview as M}from"@tauri-apps/api/webview";import{useEffect as j,useLayoutEffect as k,useRef as q}from"react";import{flushSync as v}from"react-dom";var z=33554432,x=new WeakMap;function U(s){return s.split(/[/\\]/).findLast((m)=>m!=="")??s}var _n={sourcePath:(s)=>x.get(s),uniqueFiles(s,m){let u=new Set(m.map((d)=>d.sourcePath));return s.filter((d)=>{let h=x.get(d);if(h===void 0)return!0;if(u.has(h))return!1;return u.add(h),!0})}};function Pn({sessionId:s,imagesOnly:m=!1,picker:u,enabled:d,onMention:h,onBusyChange:C}){let D=g(),{host:T}=e(),o=q({sessionId:s,attachments:D,enabled:d,onMention:h,onBusyChange:C,host:T,imagesOnly:m});return k(()=>{o.current={sessionId:s,attachments:D,enabled:d,onMention:h,onBusyChange:C,host:T,imagesOnly:m}}),j(()=>{if(!R())return;let l=!1,W,S=Promise.resolve(),b=0,y=()=>!l&&o.current.sessionId===s&&o.current.enabled,w=(r)=>{let{host:i}=o.current;if(i.reportError)i.reportError(r);else console.error(r)},E=()=>w(Error(o.current.host.t("composer.dropUnavailable")));o.current.onBusyChange(!1);let F=(r)=>{b++,v(()=>o.current.onBusyChange(!0)),S=S.then(async()=>{try{let i=new Set(o.current.attachments.files.map((t)=>t.sourcePath));for(let t of new Set(await r())){let a=typeof t==="string"?t:t.name;if(!y())return;try{if(typeof t!=="string"&&t.type.startsWith("image/")){v(()=>o.current.attachments.add([t]));continue}if(typeof t!=="string"&&t.size>z)throw Error("Pasted file exceeds the 32 MiB limit");let f=typeof t==="string"?t:await p.writePastedFile({name:t.name,data:[...new Uint8Array(await t.arrayBuffer())]});if(!y())return;let c=await p.readDroppedFile({path:f});if(!y())return;if(c.image===null){if(o.current.imagesOnly)throw Error(o.current.host.t("composer.unsupportedAttachmentTitle"));v(()=>o.current.onMention(c.path))}else if(!i.has(c.path)){let A=Uint8Array.from(atob(c.image.data),(P)=>P.charCodeAt(0)),n=new File([A],c.name,{type:c.image.mimeType});x.set(n,c.path),i.add(c.path),v(()=>o.current.attachments.add([n]))}}catch(f){if(!l)w(Object.assign(Error(o.current.host.t("composer.dropFailed",{name:U(a)})),{description:f instanceof Error?f.message:String(f)}))}}}finally{if(b--,!l)v(()=>o.current.onBusyChange(b>0))}}).catch((i)=>{if(!l)w(i)})},B=(r)=>{if(!y()){E();return}if(o.current.imagesOnly&&r.some((i)=>!i.type.startsWith("image/"))){w(Error(o.current.host.t("composer.unsupportedAttachmentTitle")));return}F(()=>Promise.resolve(r))};if(u)u.current=B;let O=M().onDragDropEvent((r)=>{if(l||r.payload.type!=="drop")return;let{paths:i,position:t}=r.payload,a=document.elementFromPoint(t.x/window.devicePixelRatio,t.y/window.devicePixelRatio);if(!a?.closest("[data-chat-drop-zone]")||a.closest('[role="dialog"]'))return;if(!y()){E();return}F(()=>Promise.resolve(i))}),L=(r)=>{let i=r.target;if(!(i instanceof Element)||!i.matches("[data-chat-input]"))return;if(!i.closest("[data-chat-drop-zone]")||i.closest('[role="dialog"]'))return;let t=r.clipboardData;if(!t)return;let a=[...t.files??[]],f=[...t.items??[]];if(!(t.types.includes("Files")&&!a.length&&!f.some((n)=>n.type.startsWith("image/")))&&!a.some((n)=>!n.type.startsWith("image/"))&&!f.some((n)=>n.kind==="file"&&!n.type.startsWith("image/"))&&!["text/uri-list","x-special/gnome-copied-files"].some((n)=>t.types.includes(n)&&/^file:\/\//m.test(t.getData(n))))return;if(r.preventDefault(),r.stopPropagation(),!y()){E();return}let A=p.clipboardFilePaths().then((n)=>({value:n}),(n)=>({error:n}));F(async()=>{let n=await A;if("error"in n)throw n.error;let P=n.value;if(P.length)return P;if(a.length)return a;throw Error("The clipboard contains no readable local files")})};return document.addEventListener("paste",L,!0),O.then((r)=>{if(l)r();else W=r}).catch((r)=>{if(!l)w(r)}),()=>{if(l=!0,u?.current===B)u.current=null;document.removeEventListener("paste",L,!0),W?.()}},[s,u]),null}
2
+ export{_n,Pn};
@@ -1,2 +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
+ import{nativeTurnId as p}from"@nyssance/codex-acp-v2/client";function Or(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{Or};
@@ -1,2 +1,2 @@
1
- import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function mi(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||i(l).kind!=="overloaded")break;if(n++,o.user!==null)break}return a[n-1]??null}
2
- export{mi};
1
+ import{codexMessageError as u,codexTurnError as i}from"@nyssance/codex-acp-v2/client";var a=[10,30,120,300];function Dr(e){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r],t=o.errors.at(-1),l=t===void 0?null:u(t);if(l===null||i(l).kind!=="overloaded")break;if(n++,o.user!==null)break}return a[n-1]??null}
2
+ export{Dr};
@@ -1,2 +1,2 @@
1
- import{Kr}from"./chunk-wf4z9w5x.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function yi(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return Kr(a,r)}
2
- export{yi};
1
+ import{Nr}from"./chunk-9m36e0yq.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function Mr(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return Nr(a,r)}
2
+ export{Mr};
@@ -1,2 +1,2 @@
1
- import{createStore as I}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function w(a){return a.interface?.displayName??a.name}function v(a){let g={},i=new Map,r=new Map;for(let c of a.data){for(let o of c.skills)if(i.set(o.path,o),o.scope==="repo"){let p=g[c.cwd]??[];if(!p.includes(o.path))p.push(o.path);g[c.cwd]=p}for(let o of c.errors)r.set(o.path,o)}return{skills:[...i.values()],errors:[...r.values()],projects:g}}function A(a){let g=[];for(let i of a.marketplaces)for(let r of i.plugins)if(r.installed)g.push({plugin:r,marketplace:i});return g.toSorted((i,r)=>(r.plugin.installedAt??0)-(i.plugin.installedAt??0))}function li(a){let{plugin:g,marketplace:i}=a;return{installAttemptId:crypto.randomUUID(),pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function N(a){let{plugin:g,marketplace:i}=a;return{pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function tn(a,g){let i=g??{t:(e)=>e},r=(e,l)=>i.t(e,l),c=(e)=>i.notify?.(e),o=(e)=>{if(i.reportError)i.reportError(Error(e));else console.error(e)},p=null,b=null,d=(e)=>S.setState(e),m=()=>S.getState(),y=async(e=!1)=>{if(await m().refresh(void 0,{forceRefetch:e,background:!0}),m().error)throw Error(r("plugins.toast.syncError",{message:m().error}))},f=(e,l)=>d((n)=>{let s={...n.busyIds};if(l===null)delete s[e];else s[e]=l;return{busyIds:s}}),h=(e,l)=>d((n)=>{let s={...n.busyMarketplaces};if(l)s[e]=!0;else delete s[e];return{busyMarketplaces:s}}),R=I({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=m().cwds,l={})=>{let n=l.forceRefetch===!0||p?.forceRefetch===!0,s=l.catalog!==!1||n||p?.catalog===!0;if(p={cwds:e,forceRefetch:n,catalog:s},d({cwds:e,...!l.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(p){let t=p;p=null,d({error:null});try{let[u,P,M]=await Promise.all([a.listSkills(t.cwds,t.forceRefetch),t.catalog?a.listPlugins({...t.cwds.length>0?{cwds:t.cwds}:{},...t.forceRefetch?{forceRefetch:!0}:{}}):null,a.installedPlugins(t.cwds)]);if(p)continue;let E=v(u);d({loadedScope:JSON.stringify(t.cwds),skills:E.skills,skillProjects:E.projects,skillErrors:E.errors,...P?{marketplaces:P.marketplaces,marketplaceLoadErrors:P.marketplaceLoadErrors,featuredPluginIds:P.featuredPluginIds}:{},installed:A(M)})}catch(u){if(!p)d({error:k(u)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in m().busyIds)throw Error("Plugin operation already in progress");let l=w(e.plugin);f(e.plugin.id,"installing");try{let n=await a.installPlugin(li(e));return await y(),f(e.plugin.id,null),c(r("plugins.toast.installed",{pluginName:l})),n}catch(n){throw o(`${r("plugins.toast.installError")}: ${k(n)}`),n}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,l)=>{if(e.id in m().busyIds)return;f(e.id,"toggling");let n=(t)=>d((u)=>({installed:u.installed.map((P)=>P.plugin.id===e.id?{...P,plugin:{...P.plugin,enabled:t}}:P)}));n(l);let s=e.enabled;try{let t=await a.setPluginEnabled(e.id,l);s=t.enabled,n(t.enabled),await y();let u=m().installed.find((P)=>P.plugin.id===e.id);if(u)s=u.plugin.enabled;if(!u||s!==l)throw Error(r("plugins.toast.toggleNotApplied"));f(e.id,null),c(r(l?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:w(e)}))}catch(t){n(s),o(`${r("plugins.toast.toggleError")}: ${k(t)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in m().busyIds)return;let l=w(e);f(e.id,"uninstalling");try{let n=e.source.type==="remote"?e.remotePluginId:e.id;if(!n)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(n),await y(),m().installed.some((s)=>s.plugin.id===e.id))throw Error(r("plugins.toast.uninstallNotApplied"));f(e.id,null),c(r("plugins.toast.uninstalled",{pluginName:l}))}catch(n){o(`${r("plugins.toast.uninstallError")}: ${k(n)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(N(e))).plugin,setSkillEnabled:async(e,l)=>{if(e.path in m().busySkills)return;d((s)=>({busySkills:{...s.busySkills,[e.path]:!0}})),d((s)=>({skills:s.skills.map((t)=>t.path===e.path?{...t,enabled:l}:t)}));let n=e.interface?.displayName??e.name;try{let s=await a.setSkillEnabled({path:e.path,enabled:l});if(d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:s.effectiveEnabled}:u)})),s.effectiveEnabled!==l){o(r("plugins.catalog.toggleNotApplied"));return}c(r(l?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:n}))}catch(s){d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:e.enabled}:u)})),o(`${r("plugins.skills.toggleError")}: ${k(s)}`)}finally{d((s)=>{let t={...s.busySkills};return delete t[e.path],{busySkills:t}})}},addMarketplace:async(e)=>{let l=await a.addMarketplace(e);return await y(!0),c(l.alreadyAdded?r("plugins.marketplace.alreadyAdded",{marketplaceName:l.marketplaceName}):r("plugins.marketplace.added",{marketplaceName:l.marketplaceName})),l},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),c(r("plugins.marketplace.removed",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.removeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let l=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),l.errors.length>0)o(`${r("plugins.marketplace.upgradeError")}: ${l.errors.map((n)=>n.message).join("; ")}`);else c(r("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.upgradeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(m().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(r("plugins.marketplace.upgradeAllError"));else c(r("plugins.marketplace.upgradedAll"))}catch(e){o(`${r("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(R,{bindHost:(e)=>{i=e}});return S}
2
- export{li,tn};
1
+ import{createStore as I}from"@alwith/api/client";function k(a){return a instanceof Error?a.message:String(a)}function w(a){return a.interface?.displayName??a.name}function v(a){let g={},i=new Map,r=new Map;for(let c of a.data){for(let o of c.skills)if(i.set(o.path,o),o.scope==="repo"){let p=g[c.cwd]??[];if(!p.includes(o.path))p.push(o.path);g[c.cwd]=p}for(let o of c.errors)r.set(o.path,o)}return{skills:[...i.values()],errors:[...r.values()],projects:g}}function A(a){let g=[];for(let i of a.marketplaces)for(let r of i.plugins)if(r.installed)g.push({plugin:r,marketplace:i});return g.toSorted((i,r)=>(r.plugin.installedAt??0)-(i.plugin.installedAt??0))}function Xo(a){let{plugin:g,marketplace:i}=a;return{installAttemptId:crypto.randomUUID(),pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function N(a){let{plugin:g,marketplace:i}=a;return{pluginName:i.path===null?g.remotePluginId??g.name:g.name,...i.path===null?{remoteMarketplaceName:i.name}:{marketplacePath:i.path}}}function jt(a,g){let i=g??{t:(e)=>e},r=(e,l)=>i.t(e,l),c=(e)=>i.notify?.(e),o=(e)=>{if(i.reportError)i.reportError(Error(e));else console.error(e)},p=null,b=null,d=(e)=>S.setState(e),m=()=>S.getState(),y=async(e=!1)=>{if(await m().refresh(void 0,{forceRefetch:e,background:!0}),m().error)throw Error(r("plugins.toast.syncError",{message:m().error}))},f=(e,l)=>d((n)=>{let s={...n.busyIds};if(l===null)delete s[e];else s[e]=l;return{busyIds:s}}),h=(e,l)=>d((n)=>{let s={...n.busyMarketplaces};if(l)s[e]=!0;else delete s[e];return{busyMarketplaces:s}}),R=I({loading:!1,loadedScope:null,upgrading:!1,error:null,cwds:[],marketplaces:[],marketplaceLoadErrors:[],featuredPluginIds:[],installed:[],skills:[],skillProjects:{},skillErrors:[],busyIds:{},busySkills:{},busyMarketplaces:{},refresh:(e=m().cwds,l={})=>{let n=l.forceRefetch===!0||p?.forceRefetch===!0,s=l.catalog!==!1||n||p?.catalog===!0;if(p={cwds:e,forceRefetch:n,catalog:s},d({cwds:e,...!l.background?{loading:!0}:{}}),b)return b;return b=(async()=>{while(p){let t=p;p=null,d({error:null});try{let[u,P,M]=await Promise.all([a.listSkills(t.cwds,t.forceRefetch),t.catalog?a.listPlugins({...t.cwds.length>0?{cwds:t.cwds}:{},...t.forceRefetch?{forceRefetch:!0}:{}}):null,a.installedPlugins(t.cwds)]);if(p)continue;let E=v(u);d({loadedScope:JSON.stringify(t.cwds),skills:E.skills,skillProjects:E.projects,skillErrors:E.errors,...P?{marketplaces:P.marketplaces,marketplaceLoadErrors:P.marketplaceLoadErrors,featuredPluginIds:P.featuredPluginIds}:{},installed:A(M)})}catch(u){if(!p)d({error:k(u)})}}})().finally(()=>{b=null,d({loading:!1})}),b},install:async(e)=>{if(e.plugin.id in m().busyIds)throw Error("Plugin operation already in progress");let l=w(e.plugin);f(e.plugin.id,"installing");try{let n=await a.installPlugin(Xo(e));return await y(),f(e.plugin.id,null),c(r("plugins.toast.installed",{pluginName:l})),n}catch(n){throw o(`${r("plugins.toast.installError")}: ${k(n)}`),n}finally{f(e.plugin.id,null)}},setPluginEnabled:async(e,l)=>{if(e.id in m().busyIds)return;f(e.id,"toggling");let n=(t)=>d((u)=>({installed:u.installed.map((P)=>P.plugin.id===e.id?{...P,plugin:{...P.plugin,enabled:t}}:P)}));n(l);let s=e.enabled;try{let t=await a.setPluginEnabled(e.id,l);s=t.enabled,n(t.enabled),await y();let u=m().installed.find((P)=>P.plugin.id===e.id);if(u)s=u.plugin.enabled;if(!u||s!==l)throw Error(r("plugins.toast.toggleNotApplied"));f(e.id,null),c(r(l?"plugins.toast.enabled":"plugins.toast.disabled",{pluginName:w(e)}))}catch(t){n(s),o(`${r("plugins.toast.toggleError")}: ${k(t)}`)}finally{f(e.id,null)}},uninstall:async(e)=>{if(e.id in m().busyIds)return;let l=w(e);f(e.id,"uninstalling");try{let n=e.source.type==="remote"?e.remotePluginId:e.id;if(!n)throw Error("Remote plugin ID is missing");if(await a.uninstallPlugin(n),await y(),m().installed.some((s)=>s.plugin.id===e.id))throw Error(r("plugins.toast.uninstallNotApplied"));f(e.id,null),c(r("plugins.toast.uninstalled",{pluginName:l}))}catch(n){o(`${r("plugins.toast.uninstallError")}: ${k(n)}`)}finally{f(e.id,null)}},readPlugin:async(e)=>(await a.readPlugin(N(e))).plugin,setSkillEnabled:async(e,l)=>{if(e.path in m().busySkills)return;d((s)=>({busySkills:{...s.busySkills,[e.path]:!0}})),d((s)=>({skills:s.skills.map((t)=>t.path===e.path?{...t,enabled:l}:t)}));let n=e.interface?.displayName??e.name;try{let s=await a.setSkillEnabled({path:e.path,enabled:l});if(d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:s.effectiveEnabled}:u)})),s.effectiveEnabled!==l){o(r("plugins.catalog.toggleNotApplied"));return}c(r(l?"plugins.skills.enabledToast":"plugins.skills.disabledToast",{skillName:n}))}catch(s){d((t)=>({skills:t.skills.map((u)=>u.path===e.path?{...u,enabled:e.enabled}:u)})),o(`${r("plugins.skills.toggleError")}: ${k(s)}`)}finally{d((s)=>{let t={...s.busySkills};return delete t[e.path],{busySkills:t}})}},addMarketplace:async(e)=>{let l=await a.addMarketplace(e);return await y(!0),c(l.alreadyAdded?r("plugins.marketplace.alreadyAdded",{marketplaceName:l.marketplaceName}):r("plugins.marketplace.added",{marketplaceName:l.marketplaceName})),l},removeMarketplace:async(e)=>{h(e,!0);try{await a.removeMarketplace(e),await y(),h(e,!1),c(r("plugins.marketplace.removed",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.removeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeMarketplace:async(e)=>{h(e,!0);try{let l=await a.upgradeMarketplaces(e);if(await y(!0),h(e,!1),l.errors.length>0)o(`${r("plugins.marketplace.upgradeError")}: ${l.errors.map((n)=>n.message).join("; ")}`);else c(r("plugins.marketplace.upgraded",{marketplaceName:e}))}catch(l){o(`${r("plugins.marketplace.upgradeError")}: ${k(l)}`)}finally{h(e,!1)}},upgradeAll:async()=>{if(m().upgrading)return;d({upgrading:!0});try{let e=await a.upgradeMarketplaces();if(await y(!0),d({upgrading:!1}),e.errors.length>0)o(r("plugins.marketplace.upgradeAllError"));else c(r("plugins.marketplace.upgradedAll"))}catch(e){o(`${r("plugins.marketplace.upgradeAllRequestError")}: ${k(e)}`)}finally{d({upgrading:!1})}}}),S=Object.assign(R,{bindHost:(e)=>{i=e}});return S}
2
+ export{Xo,jt};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-7393tva2.js";import{codexTurnError as R}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as C}from"lucide-react";import{useEffect as k,useRef as i,useState as s}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as m}from"react/jsx-runtime";function no({children:u}){return m("div",{className:"codex-error-message",role:"alert",children:[n(C,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:u})]})}function oo({error:u,retry:e}){let{t:f,turnErrorAction:T}=t(),c=R(u),[l]=s(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=s(e?.delaySeconds??null),[h,y]=s(!1),[x,g]=s(null),o=i(!1),w=i(!1),E=i(e?.run);E.current=e?.run;let S=i((N)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(N).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),b=T?.(c),d=b===void 0&&e!==void 0&&c.retryable;return k(()=>{if(!d||l===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[l,d]),m(no,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),b,d&&n(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>S.current("manual"),children:p===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
2
- export{no,oo};
1
+ import{t}from"./chunk-rayhzb8p.js";import{codexTurnError as R}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as C}from"lucide-react";import{useEffect as k,useRef as i,useState as s}from"react";import{Button as I}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as m}from"react/jsx-runtime";function To({children:u}){return m("div",{className:"codex-error-message",role:"alert",children:[n(C,{"aria-hidden":"true"}),n("div",{className:"min-w-0 flex-1",children:u})]})}function Mo({error:u,retry:e}){let{t:f,turnErrorAction:T}=t(),c=R(u),[l]=s(()=>e?.delaySeconds==null?null:Date.now()+e.delaySeconds*1000),[p,v]=s(e?.delaySeconds??null),[h,y]=s(!1),[x,g]=s(null),o=i(!1),w=i(!1),E=i(e?.run);E.current=e?.run;let S=i((N)=>{let a=E.current;if(o.current||a===void 0)return;o.current=!0,y(!0),g(null),a(N).catch((r)=>{w.current=!0,o.current=!1,v(null),y(!1),g(r instanceof Error?r.message:String(r))})}),b=T?.(c),d=b===void 0&&e!==void 0&&c.retryable;return k(()=>{if(!d||l===null)return;let a=setInterval(()=>{if(w.current||o.current)return;let r=Math.max(0,Math.ceil((l-Date.now())/1000));if(v(r),r===0)S.current("automatic")},1000);return()=>clearInterval(a)},[l,d]),m(To,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:c.message}),b,d&&n(I,{variant:"outline",size:"sm",disabled:h,onClick:()=>S.current("manual"),children:p===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:p})})]}),x!==null&&n("div",{className:"text-muted-foreground mt-2 text-sm",children:x})]})}
2
+ export{To,Mo};
@@ -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 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
+ 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 ll(){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 cl(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 Ba(t,i);return _a(e,n)}function Ba(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+Ga(e,n)}function dl(e,n){return D(_a(e,n))}function Ga(e,n){if(n<=l)return za(n)[n-e-1];return Math.round((n-e-1)/(n-1)*(l-1))}function za(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 ul(){return r.context?.state}function pl(e){return g(e).ready}
2
+ export{Gr,ll,zr,Vr,cl,Sa,Ba,_a,dl,Ga,za,ul,pl};
@@ -1,2 +1,2 @@
1
- import{_o,Pt}from"./chunk-7rqryntm.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function tt(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=_o(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function el(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return Pt(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
2
- export{tt,el};
1
+ import{mo,kt}from"./chunk-cy5kh1yr.js";function c(t){return{key:t.name,label:t.name,description:t.description??void 0,payload:t.name}}function nt(t,s,o=50){let i=new Set,r=t.filter((n)=>{if(i.has(n.name))return!1;return i.add(n.name),!0});if(!s)return r.slice(0,o).map(c);let l=s.toLowerCase(),e=[];for(let n of r){let a=mo(n.name,s);if(a)e.push({c:n,score:a.score});else if(n.description?.toLowerCase().includes(l))e.push({c:n,score:-1})}return e.sort((n,a)=>a.score-n.score),e.slice(0,o).map((n)=>c(n.c))}function Qa(t,s,o,i=50){let r=o?`${o.replace(/\/$/,"")}/`:"",l=t.map((e)=>({abs:e,rel:r&&e.startsWith(r)?e.slice(r.length):e}));return kt(l,s,(e)=>e.rel,i).map(({item:e})=>({key:e.abs,label:e.rel,payload:e.abs}))}
2
+ export{nt,Qa};
@@ -0,0 +1,2 @@
1
+ import{s,a,o,h}from"./chunk-af0e5epn.js";import{G}from"./chunk-33bd1ey8.js";import{M,re,Ee}from"./chunk-qm9c9sd7.js";import{Te,J,ue}from"./chunk-5jvpeww3.js";import{ii}from"./chunk-d9q9qgm1.js";import{Pe}from"./chunk-5h49mv0e.js";import{Ie}from"./chunk-apd3qtd1.js";import{Me}from"./chunk-cfj92m1y.js";import{Kt}from"./chunk-3d3z6dam.js";import{ei}from"./chunk-y47sn7w2.js";import{ActivityIcon as D}from"lucide-react";import{useEffect as O,useMemo as A}from"react";import{Kbd as E}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as C,Fragment as T}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function Rs({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let R=s(),{t:N}=R,m=o((t)=>t.runStates),S=o((t)=>t.drafts),u=o((t)=>t.sessionList),v=J((t)=>t.activityOrder),p=A(()=>v.flatMap((t)=>{let e=m[t];return e&&Te({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=A(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=J((t)=>t.activityCollapsedGroups),n=ue(),L=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),x=(t)=>{if(b?.(t))return;d(t)},P=ei();O(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!ii(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=L[r-1];if(!y)return;e.preventDefault(),x(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let I=(t)=>{let e=L.indexOf(t);return c(H,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>x(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&P?c(E,{children:Me(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(M,{children:g.map((t)=>t.key==="foreground"?c(M,{children:t.rows.map(I)},t.key):c(re,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);n({activityCollapsedGroups:r})},leading:c(D,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(I)},t.key))})}function H({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:R,actions:N,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=Kt(i.sessionId,d);return C(T,{children:[c(Ee,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Ie,{sessionRow:i,actions:N}),onClick:m,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((n)=>u.openLink?.(`http://localhost:${n}`)),accessory:R,hint:S,actions:c(Pe,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((n)=>C("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(G,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
2
+ export{Rs};
@@ -0,0 +1,2 @@
1
+ import{Oe}from"./chunk-m6yg0dc9.js";import{r,X,hn}from"./chunk-egbb5295.js";var Ei=5000;function Ye(t){return"pastedText"in t}function ht(t,e,p){let n=(a,o)=>{for(let[i,x]of r){if(!x.attachments.some((s)=>s.id===e.id))continue;X(i,(s)=>s.map((d)=>d.id===e.id?{...e,url:o===void 0?"":Oe(o),pastedText:{text:e.pastedText.text,status:a}}:d))}};if(!r.get(t)?.attachments.some((a)=>a.id===e.id))return;n("pending"),hn(e.id,p("pasted-text.txt",e.pastedText.text).then((a)=>n("ready",a)).catch(()=>n("error")))}function fn(t,e,p,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let a=t.clipboardData.getData("text/plain");if(a.length<Ei)return;t.preventDefault(),t.stopPropagation();let o={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:p,url:"",pastedText:{text:a,status:"pending"}};X(e,(i)=>[...i,o]),ht(e,o,n)}
2
+ export{Ei,Ye,ht,fn};
@@ -1,2 +1,2 @@
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
+ 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 qr(e,n){return d??=new l,d.connect(e,n)}
2
+ export{Fo,qr};
@@ -1,2 +1,2 @@
1
- import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function Ge({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
2
- export{Ge};
1
+ import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function Pe({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
2
+ export{Pe};