@alwith/module-chat 0.5.20 → 0.5.21

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 (368) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/approval/choice-elicitation-form.js +1 -1
  3. package/dist/approval/choice-schema.js +1 -1
  4. package/dist/approval/permission-options.js +1 -1
  5. package/dist/approval/permission-view.js +1 -1
  6. package/dist/approval/schema-elicitation-form.js +1 -1
  7. package/dist/approval/url-elicitation-card.js +1 -1
  8. package/dist/{chunk-y0q6jwq4.js → chunk-00eytt1z.js} +2 -2
  9. package/dist/{chunk-95mynf7q.js → chunk-0fs2k5fe.js} +2 -2
  10. package/dist/{chunk-f1x483c9.js → chunk-0gersbj0.js} +2 -2
  11. package/dist/{chunk-bbyscgdd.js → chunk-0gy6ngda.js} +2 -2
  12. package/dist/{chunk-rkfq0c0p.js → chunk-0mp7tyea.js} +2 -2
  13. package/dist/{chunk-b12v22de.js → chunk-0vhkv9ax.js} +2 -2
  14. package/dist/{chunk-qd1z91fm.js → chunk-141kppzb.js} +1 -1
  15. package/dist/chunk-14exd146.js +2 -0
  16. package/dist/{chunk-rjkpe1fw.js → chunk-156m3888.js} +3 -3
  17. package/dist/{chunk-4bb6dzzs.js → chunk-1e6x0018.js} +2 -2
  18. package/dist/{chunk-n66yy1m1.js → chunk-1f628zap.js} +2 -2
  19. package/dist/{chunk-2f9vjmxz.js → chunk-1ppfn0e1.js} +2 -2
  20. package/dist/{chunk-ckyat78p.js → chunk-1q2cykp4.js} +2 -2
  21. package/dist/{chunk-h491shsg.js → chunk-1tkzxktd.js} +2 -2
  22. package/dist/{chunk-3yxjh7b1.js → chunk-23rjsm3a.js} +2 -2
  23. package/dist/chunk-2ce8gd89.js +2 -0
  24. package/dist/{chunk-1rg3nab3.js → chunk-2f1qx13s.js} +2 -2
  25. package/dist/{chunk-agqnt7xq.js → chunk-2nvsvw67.js} +2 -2
  26. package/dist/{chunk-1qyxrh0n.js → chunk-2tce3pc5.js} +3 -3
  27. package/dist/{chunk-28f3zv6v.js → chunk-2tkeevm0.js} +2 -2
  28. package/dist/{chunk-62jm1gct.js → chunk-33620ca6.js} +2 -2
  29. package/dist/{chunk-g2qcyqc6.js → chunk-3aq5c12k.js} +2 -2
  30. package/dist/{chunk-6t5war9h.js → chunk-3jcmv5qf.js} +2 -2
  31. package/dist/chunk-3n47hknp.js +2 -0
  32. package/dist/{chunk-ha46rhzj.js → chunk-3nr5qe41.js} +2 -2
  33. package/dist/{chunk-yg3xhn5m.js → chunk-3yvd77ph.js} +2 -2
  34. package/dist/chunk-40bcp4pa.js +2 -0
  35. package/dist/{chunk-kmdag4vy.js → chunk-42hkbpey.js} +2 -2
  36. package/dist/{chunk-jwt7q6yx.js → chunk-42nhwnbe.js} +4 -4
  37. package/dist/{chunk-ktvh4yb5.js → chunk-4s6gx750.js} +2 -2
  38. package/dist/chunk-4w3g7d6w.js +2 -0
  39. package/dist/chunk-52p7kyam.js +2 -0
  40. package/dist/{chunk-vt6cyes7.js → chunk-59957gfy.js} +2 -2
  41. package/dist/chunk-59exzf5n.js +2 -0
  42. package/dist/{chunk-annzfgfq.js → chunk-5cdr7q6f.js} +3 -3
  43. package/dist/chunk-5nc3dtyt.js +2 -0
  44. package/dist/{chunk-s8s65pj2.js → chunk-63kxepkh.js} +2 -2
  45. package/dist/{chunk-bvgqsaey.js → chunk-67hrx4kg.js} +2 -2
  46. package/dist/{chunk-k7ye738q.js → chunk-6dn3j8a2.js} +2 -2
  47. package/dist/{chunk-kc56dhwd.js → chunk-72x7rae0.js} +2 -2
  48. package/dist/{chunk-a63k8tht.js → chunk-77j8n5k5.js} +2 -2
  49. package/dist/chunk-78s6h7r4.js +2 -0
  50. package/dist/{chunk-t7drk9ja.js → chunk-7p1r1ha9.js} +2 -2
  51. package/dist/{chunk-pprt7ntb.js → chunk-7wk3d01c.js} +4 -4
  52. package/dist/chunk-80ckz04b.js +2 -0
  53. package/dist/{chunk-p7dd93e5.js → chunk-82xjggwn.js} +2 -2
  54. package/dist/chunk-85ffkcch.js +2 -0
  55. package/dist/{chunk-vbab9hc4.js → chunk-8c042xya.js} +2 -2
  56. package/dist/{chunk-qwfw4xpn.js → chunk-8ch9444t.js} +2 -2
  57. package/dist/{chunk-36m8zstj.js → chunk-8hte6dh7.js} +2 -2
  58. package/dist/{chunk-42atrgm1.js → chunk-8jxcdap5.js} +2 -2
  59. package/dist/chunk-8qw8erv6.js +2 -0
  60. package/dist/{chunk-3ka3bt0t.js → chunk-8t36vprh.js} +2 -2
  61. package/dist/{chunk-heyqzkxq.js → chunk-8w22ck92.js} +2 -2
  62. package/dist/{chunk-q2gfd4jk.js → chunk-908ndb9r.js} +2 -2
  63. package/dist/{chunk-jxntqarp.js → chunk-983gkw32.js} +2 -2
  64. package/dist/chunk-9g67z1b4.js +2 -0
  65. package/dist/chunk-9n79tr1q.js +2 -0
  66. package/dist/{chunk-581e33tz.js → chunk-9sq2etjk.js} +2 -2
  67. package/dist/{chunk-nxyrrmz8.js → chunk-a8p82wp7.js} +2 -2
  68. package/dist/chunk-ajpxjj5m.js +2 -0
  69. package/dist/{chunk-acb8t4jt.js → chunk-ap0vmczf.js} +2 -2
  70. package/dist/{chunk-v5pbaf9x.js → chunk-aqvy57zs.js} +2 -2
  71. package/dist/{chunk-azfmr99x.js → chunk-aza82m2p.js} +2 -2
  72. package/dist/{chunk-adk7aeyt.js → chunk-b2wczqtd.js} +2 -2
  73. package/dist/chunk-b3jg6nzv.js +3 -0
  74. package/dist/{chunk-swpy2b9a.js → chunk-b614gnnv.js} +2 -2
  75. package/dist/chunk-c1b8z8pa.js +2 -0
  76. package/dist/{chunk-11484wvv.js → chunk-c38t8809.js} +2 -2
  77. package/dist/chunk-c9nbavk0.js +2 -0
  78. package/dist/{chunk-yakar0e2.js → chunk-cbwya2ss.js} +2 -2
  79. package/dist/chunk-cg8ekwka.js +2 -0
  80. package/dist/{chunk-x99fyd88.js → chunk-dv65h7z5.js} +2 -2
  81. package/dist/{chunk-0whxm2f0.js → chunk-dya74vts.js} +2 -2
  82. package/dist/{chunk-9jp5t3qq.js → chunk-dyqvhn6y.js} +5 -5
  83. package/dist/{chunk-f2w2sct6.js → chunk-dyrgfdxz.js} +2 -2
  84. package/dist/{chunk-n5v1h0sk.js → chunk-e9ntencj.js} +2 -2
  85. package/dist/chunk-ec9rgnt3.js +2 -0
  86. package/dist/chunk-efrn25h9.js +2 -0
  87. package/dist/chunk-emcefs0g.js +2 -0
  88. package/dist/{chunk-z3nybrbb.js → chunk-et8rcxw6.js} +2 -2
  89. package/dist/chunk-f28hhbf4.js +2 -0
  90. package/dist/chunk-f3924gdb.js +2 -0
  91. package/dist/chunk-f8zy35gz.js +2 -0
  92. package/dist/chunk-f98at4r5.js +2 -0
  93. package/dist/{chunk-gsfgdnfp.js → chunk-fke98cj0.js} +2 -2
  94. package/dist/chunk-g242n3dt.js +2 -0
  95. package/dist/{chunk-wgrmjfyp.js → chunk-g73f62qm.js} +2 -2
  96. package/dist/{chunk-2t9j90mw.js → chunk-h1bhhqtq.js} +2 -2
  97. package/dist/{chunk-wvry7t79.js → chunk-h5m2fpp4.js} +2 -2
  98. package/dist/{chunk-g44hhdha.js → chunk-hv1ejvhg.js} +2 -2
  99. package/dist/{chunk-mr6k70s4.js → chunk-j86x2rn0.js} +2 -2
  100. package/dist/{chunk-x2nemdjf.js → chunk-jm6zja6h.js} +2 -2
  101. package/dist/{chunk-jgd6dcgy.js → chunk-k5rkpqbh.js} +2 -2
  102. package/dist/{chunk-qdg5zphd.js → chunk-k5wgf59a.js} +2 -2
  103. package/dist/{chunk-7z4gtfkd.js → chunk-k7k6qsqh.js} +2 -2
  104. package/dist/{chunk-n9gq2wbz.js → chunk-kc5k5e59.js} +3 -3
  105. package/dist/chunk-kvc6ewkt.js +4 -0
  106. package/dist/chunk-kxmajv0m.js +3 -0
  107. package/dist/{chunk-5a6xc345.js → chunk-m2b8kzpk.js} +2 -2
  108. package/dist/{chunk-drhzcs6e.js → chunk-m7wn4z9x.js} +2 -2
  109. package/dist/{chunk-bfhfbrzt.js → chunk-mcjwwxa1.js} +2 -2
  110. package/dist/{chunk-k64wvbbc.js → chunk-memvzzc6.js} +2 -2
  111. package/dist/{chunk-48fj5m0p.js → chunk-mg2mkzkk.js} +2 -2
  112. package/dist/{chunk-f5gsffbv.js → chunk-mgm1x3de.js} +2 -2
  113. package/dist/chunk-mwpchd85.js +3 -0
  114. package/dist/chunk-myrdfa3s.js +2 -0
  115. package/dist/{chunk-4gyd9hx9.js → chunk-n0khj68q.js} +2 -2
  116. package/dist/{chunk-kz1kjzmq.js → chunk-n929wkw7.js} +2 -2
  117. package/dist/chunk-nacjea1s.js +2 -0
  118. package/dist/{chunk-mvs2dzyt.js → chunk-nn25kjm4.js} +2 -2
  119. package/dist/{chunk-855w49k0.js → chunk-nq7gg9vg.js} +2 -2
  120. package/dist/{chunk-dte0n4kf.js → chunk-nqw4deag.js} +2 -2
  121. package/dist/{chunk-pwjz3yxb.js → chunk-ns5rnxdj.js} +2 -2
  122. package/dist/{chunk-667z0pac.js → chunk-nxp1b8ny.js} +2 -2
  123. package/dist/{chunk-06zh85wp.js → chunk-p4bb313p.js} +3 -3
  124. package/dist/chunk-py837qjk.js +1 -0
  125. package/dist/chunk-q7nn5xe5.js +2 -0
  126. package/dist/{chunk-grr1k5zn.js → chunk-qjhkzdhm.js} +2 -2
  127. package/dist/{chunk-m271yxxm.js → chunk-qwfwxfhn.js} +2 -2
  128. package/dist/chunk-qxcnyvps.js +2 -0
  129. package/dist/chunk-r3qrftds.js +2 -0
  130. package/dist/{chunk-1k21j77z.js → chunk-r9dt4bs3.js} +2 -2
  131. package/dist/chunk-rbqn4725.js +2 -0
  132. package/dist/{chunk-0643swd4.js → chunk-rcbb4ke2.js} +2 -2
  133. package/dist/chunk-rekc1q3m.js +2 -0
  134. package/dist/chunk-rwkkqdcv.js +2 -0
  135. package/dist/{chunk-b18zr059.js → chunk-rwnz06kr.js} +2 -2
  136. package/dist/{chunk-1fggcrvs.js → chunk-s55n9cby.js} +2 -2
  137. package/dist/chunk-sxh0pd3y.js +2 -0
  138. package/dist/{chunk-hd7bk591.js → chunk-sy5tq3y6.js} +2 -2
  139. package/dist/chunk-t0cr21e3.js +2 -0
  140. package/dist/{chunk-8mgypdap.js → chunk-t97yjy4f.js} +2 -2
  141. package/dist/{chunk-4ygyb91q.js → chunk-v4t0p6pp.js} +2 -2
  142. package/dist/{chunk-fnpf84rf.js → chunk-vcy5vyp7.js} +2 -2
  143. package/dist/chunk-vkrgdqnm.js +2 -0
  144. package/dist/{chunk-r9sweaq4.js → chunk-vs02ry2r.js} +2 -2
  145. package/dist/{chunk-s4wjckd1.js → chunk-vyk4zh1m.js} +7 -7
  146. package/dist/{chunk-vfhxerxt.js → chunk-w0hpztj7.js} +2 -2
  147. package/dist/{chunk-tv0fwt2g.js → chunk-w6rwngm3.js} +2 -2
  148. package/dist/{chunk-bg03czcx.js → chunk-w9dh298r.js} +2 -2
  149. package/dist/chunk-wvdncbrt.js +2 -0
  150. package/dist/{chunk-rbv1scqm.js → chunk-x2yc5748.js} +2 -2
  151. package/dist/{chunk-r7s7kx38.js → chunk-x334e7wb.js} +3 -3
  152. package/dist/{chunk-j69t1f4a.js → chunk-x6nz6eyb.js} +2 -2
  153. package/dist/{chunk-rjw63t34.js → chunk-xf36kt74.js} +3 -3
  154. package/dist/{chunk-0wa9yjg3.js → chunk-xgjkj9j8.js} +2 -2
  155. package/dist/{chunk-dfgak1md.js → chunk-xktybk48.js} +2 -2
  156. package/dist/{chunk-3s94ekrs.js → chunk-xmstt6hh.js} +2 -2
  157. package/dist/{chunk-g9t2d8hg.js → chunk-xrs7x5ah.js} +2 -2
  158. package/dist/{chunk-d257n8gj.js → chunk-xyvqcpjx.js} +2 -2
  159. package/dist/chunk-y7xcync7.js +2 -0
  160. package/dist/chunk-ye9tsdhn.js +2 -0
  161. package/dist/{chunk-wccx911q.js → chunk-z2fjwkmt.js} +2 -2
  162. package/dist/{chunk-gha517v4.js → chunk-z2v008kc.js} +2 -2
  163. package/dist/{chunk-pzjag1mt.js → chunk-z71pp1mb.js} +3 -3
  164. package/dist/{chunk-mj7094yh.js → chunk-zxkvvecz.js} +2 -2
  165. package/dist/codex/activity-group.js +1 -1
  166. package/dist/codex/assistant-message.js +1 -1
  167. package/dist/codex/async-question-card.js +1 -1
  168. package/dist/codex/disclosure-state.js +1 -1
  169. package/dist/codex/edited-files-card.js +1 -1
  170. package/dist/codex/image-view-activity.js +1 -1
  171. package/dist/codex/markdown-renderer.js +1 -1
  172. package/dist/codex/navigation-audio.js +1 -1
  173. package/dist/codex/navigation-preview.js +1 -1
  174. package/dist/codex/navigation-rail.js +1 -1
  175. package/dist/codex/patch-view.js +1 -1
  176. package/dist/codex/plan.js +1 -1
  177. package/dist/codex/timeline-virtualizer.js +1 -1
  178. package/dist/codex/turn-activity.js +1 -1
  179. package/dist/codex/user-message.js +1 -1
  180. package/dist/codex/virtualized-turn-list.js +1 -1
  181. package/dist/collections/collection-emoji.js +1 -1
  182. package/dist/collections/collection-menu.js +1 -1
  183. package/dist/collections/collection-panel.js +1 -1
  184. package/dist/collections/collections.js +1 -1
  185. package/dist/collections/host.js +1 -1
  186. package/dist/collections/locales.js +1 -1
  187. package/dist/collections/model.js +1 -1
  188. package/dist/collections/store.js +1 -1
  189. package/dist/composer/completion-filter.js +1 -1
  190. package/dist/composer/completion-menu.js +1 -1
  191. package/dist/composer/completion-trigger.js +1 -1
  192. package/dist/composer/effort-slider.js +1 -1
  193. package/dist/composer/menu-radio.js +1 -1
  194. package/dist/composer/model-select.js +1 -1
  195. package/dist/composer/permission-mode-select.js +1 -1
  196. package/dist/composer/prompt-input-attachments.js +1 -1
  197. package/dist/composer/prompt-input-clipboard.js +1 -1
  198. package/dist/composer/prompt-input-context.js +1 -1
  199. package/dist/composer/prompt-input-textarea.js +1 -1
  200. package/dist/composer/prompt-input.js +1 -1
  201. package/dist/conversation/action-card.js +1 -1
  202. package/dist/conversation/composer/composer.js +1 -1
  203. package/dist/conversation/composer/config-options.js +1 -1
  204. package/dist/conversation/composer/context.js +1 -1
  205. package/dist/conversation/composer/drafts.js +1 -1
  206. package/dist/conversation/composer/file-items.js +1 -1
  207. package/dist/conversation/composer/long-text.js +1 -1
  208. package/dist/conversation/composer/mention-chips.js +1 -1
  209. package/dist/conversation/composer/mention-uri.js +1 -1
  210. package/dist/conversation/composer/model-menu.js +1 -1
  211. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  212. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  213. package/dist/conversation/composer/prediction.js +1 -1
  214. package/dist/conversation/composer/slash-command-button.js +1 -1
  215. package/dist/conversation/composer/submit-button.js +1 -1
  216. package/dist/conversation/composer/usage-meter.js +1 -1
  217. package/dist/conversation/connection-notice.js +1 -1
  218. package/dist/conversation/context.js +1 -1
  219. package/dist/conversation/conversation-body.js +1 -1
  220. package/dist/conversation/conversation-search.js +1 -1
  221. package/dist/conversation/conversation-view.js +1 -1
  222. package/dist/conversation/conversation.js +1 -1
  223. package/dist/conversation/diff-modal.js +1 -1
  224. package/dist/conversation/draft-project-picker.js +1 -1
  225. package/dist/conversation/session-actions.js +1 -1
  226. package/dist/conversation/subagent-sessions.js +1 -1
  227. package/dist/image-lightbox.js +1 -1
  228. package/dist/image-preview-dialog.js +1 -1
  229. package/dist/lib/code-highlighter.js +1 -1
  230. package/dist/lib/fuzzy.js +1 -1
  231. package/dist/lib/group-blocks.js +1 -1
  232. package/dist/lib/image-encode.js +1 -1
  233. package/dist/lib/limits.js +1 -1
  234. package/dist/lib/markdown-parser.js +1 -1
  235. package/dist/lib/markdown-rules.js +1 -1
  236. package/dist/lib/model-name.js +1 -1
  237. package/dist/lib/pointer-centered-zoom.js +1 -1
  238. package/dist/lib/prepare-prompt-files.js +1 -1
  239. package/dist/lib/stream-style.js +1 -1
  240. package/dist/lib/streaming-markdown.js +1 -1
  241. package/dist/locales.js +1 -1
  242. package/dist/plugins/catalog-header.js +1 -1
  243. package/dist/plugins/catalog-skeleton.js +1 -1
  244. package/dist/plugins/host.js +1 -1
  245. package/dist/plugins/new-chat-directory.js +1 -1
  246. package/dist/plugins/pane.js +1 -1
  247. package/dist/plugins/panel-item.js +1 -1
  248. package/dist/plugins/plugin-detail-page.js +1 -1
  249. package/dist/plugins/plugin-icon.js +1 -1
  250. package/dist/plugins/plugin-icons.js +1 -1
  251. package/dist/plugins/plugins-page.js +1 -1
  252. package/dist/plugins/plugins.js +1 -1
  253. package/dist/plugins/read-skill-document.js +1 -1
  254. package/dist/plugins/skill-document.js +1 -1
  255. package/dist/plugins/skills-tab.js +1 -1
  256. package/dist/plugins/store.js +1 -1
  257. package/dist/plugins/toolbox-layout.js +1 -1
  258. package/dist/search/chat-search.js +1 -1
  259. package/dist/search/codex-source-matches.js +1 -1
  260. package/dist/search/dom-matches.js +1 -1
  261. package/dist/search/find-bar.js +1 -1
  262. package/dist/search/literal-matches.js +1 -1
  263. package/dist/session-list/account-menu.js +1 -1
  264. package/dist/session-list/activity-list.js +1 -1
  265. package/dist/session-list/archived-sessions.js +1 -1
  266. package/dist/session-list/help-menu.js +1 -1
  267. package/dist/session-list/highlight.js +1 -1
  268. package/dist/session-list/host.js +1 -1
  269. package/dist/session-list/hover-info-card.js +1 -1
  270. package/dist/session-list/navigation-header.js +1 -1
  271. package/dist/session-list/navigation-store.js +1 -1
  272. package/dist/session-list/navigation-tabs.js +1 -1
  273. package/dist/session-list/navigation.js +1 -1
  274. package/dist/session-list/overflow-marquee.js +1 -1
  275. package/dist/session-list/platform.js +1 -1
  276. package/dist/session-list/row-stop-button.js +1 -1
  277. package/dist/session-list/session-groups.js +1 -1
  278. package/dist/session-list/session-info-card.js +1 -1
  279. package/dist/session-list/session-list.js +1 -1
  280. package/dist/session-list/session-row.js +1 -1
  281. package/dist/session-list/session-state-dot.js +1 -1
  282. package/dist/session-list/session-state-menu.js +1 -1
  283. package/dist/session-list/shortcut-hint.js +1 -1
  284. package/dist/session-list/shortcut.js +1 -1
  285. package/dist/session-list/sidebar-overlay.js +1 -1
  286. package/dist/session-list/trailing-swap.js +1 -1
  287. package/dist/session-list/use-activity-notification.js +1 -1
  288. package/dist/session-list/use-activity-preview.js +1 -1
  289. package/dist/session-list/use-cmd-held.js +1 -1
  290. package/dist/session-list/use-project-sessions.js +1 -1
  291. package/dist/session-list/virtual-session-rows.js +1 -1
  292. package/dist/session-timeline/activity-group.js +1 -1
  293. package/dist/session-timeline/activity-projection.js +1 -1
  294. package/dist/session-timeline/assistant-content.js +1 -1
  295. package/dist/session-timeline/assistant-turn.js +1 -1
  296. package/dist/session-timeline/async-questions.js +1 -1
  297. package/dist/session-timeline/edited-files-card.js +1 -1
  298. package/dist/session-timeline/history-timeline.js +1 -1
  299. package/dist/session-timeline/host.js +1 -1
  300. package/dist/session-timeline/navigation-rail.js +1 -1
  301. package/dist/session-timeline/plan.js +1 -1
  302. package/dist/session-timeline/question-reply.js +1 -1
  303. package/dist/session-timeline/resource-content.js +1 -1
  304. package/dist/session-timeline/session-timeline.js +1 -1
  305. package/dist/session-timeline/timeline-registry.js +1 -1
  306. package/dist/session-timeline/turn-activity.js +1 -1
  307. package/dist/session-timeline/turn-error.js +1 -1
  308. package/dist/session-timeline/turn-retry.js +1 -1
  309. package/dist/session-timeline/turn-time.js +1 -1
  310. package/dist/session-timeline/turns.js +1 -1
  311. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  312. package/dist/session-timeline/user-message.js +1 -1
  313. package/dist/settings/codex-account-card.js +1 -1
  314. package/dist/settings/login-card.js +1 -1
  315. package/dist/settings/model-alias-settings.js +1 -1
  316. package/dist/settings/model-aliases.js +1 -1
  317. package/dist/settings/provider-logos.js +1 -1
  318. package/dist/settings/provider-section.js +1 -1
  319. package/dist/settings/providers-port.js +1 -1
  320. package/dist/settings/providers.js +1 -1
  321. package/dist/settings/settings-bridge.js +1 -1
  322. package/dist/settings/settings.js +1 -1
  323. package/package.json +2 -2
  324. package/dist/chunk-0p6y2t9b.js +0 -2
  325. package/dist/chunk-1k697ncv.js +0 -2
  326. package/dist/chunk-1mn2t6ga.js +0 -2
  327. package/dist/chunk-1r25anvg.js +0 -2
  328. package/dist/chunk-20k9syde.js +0 -1
  329. package/dist/chunk-3gk86w24.js +0 -2
  330. package/dist/chunk-3vsc49pt.js +0 -2
  331. package/dist/chunk-4d853988.js +0 -2
  332. package/dist/chunk-4p6svs37.js +0 -2
  333. package/dist/chunk-5ap6fvrp.js +0 -2
  334. package/dist/chunk-5m7vc4s6.js +0 -2
  335. package/dist/chunk-615a0yhh.js +0 -2
  336. package/dist/chunk-6syhjege.js +0 -2
  337. package/dist/chunk-8akwfgkq.js +0 -2
  338. package/dist/chunk-8c8ncw1m.js +0 -2
  339. package/dist/chunk-c32z3wjq.js +0 -2
  340. package/dist/chunk-cvz3k5gk.js +0 -2
  341. package/dist/chunk-d0vhdr07.js +0 -2
  342. package/dist/chunk-erjscd1r.js +0 -4
  343. package/dist/chunk-feg5rp9g.js +0 -2
  344. package/dist/chunk-ffspd86m.js +0 -2
  345. package/dist/chunk-fh3pjhe6.js +0 -2
  346. package/dist/chunk-g9yg36dh.js +0 -3
  347. package/dist/chunk-hp4a0e8c.js +0 -2
  348. package/dist/chunk-j8v3sfpv.js +0 -2
  349. package/dist/chunk-jmb8r6aj.js +0 -2
  350. package/dist/chunk-kbeme4w0.js +0 -3
  351. package/dist/chunk-kq48hbd5.js +0 -2
  352. package/dist/chunk-mv51zgj1.js +0 -2
  353. package/dist/chunk-mz8a6292.js +0 -2
  354. package/dist/chunk-p8g927x6.js +0 -2
  355. package/dist/chunk-pk2rvqd0.js +0 -2
  356. package/dist/chunk-px1ehzwc.js +0 -2
  357. package/dist/chunk-q9ef9n7b.js +0 -2
  358. package/dist/chunk-q9zawfn1.js +0 -2
  359. package/dist/chunk-qn6ppn0r.js +0 -2
  360. package/dist/chunk-rq5e0922.js +0 -2
  361. package/dist/chunk-ssxbxanb.js +0 -2
  362. package/dist/chunk-tpbqg729.js +0 -2
  363. package/dist/chunk-ttn8ss6b.js +0 -2
  364. package/dist/chunk-vnsgjnp3.js +0 -2
  365. package/dist/chunk-vzgv360q.js +0 -2
  366. package/dist/chunk-xft0s40a.js +0 -3
  367. package/dist/chunk-y6kzbbya.js +0 -2
  368. package/dist/chunk-y97ne5kj.js +0 -2
@@ -1,2 +0,0 @@
1
- import{n}from"./chunk-mv51zgj1.js";import{Je}from"./chunk-4ygyb91q.js";import{e,g}from"./chunk-y6kzbbya.js";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as p,EmptyDescription as c,EmptyHeader as l,EmptyTitle as d}from"@nyssance/shadcn/vega/components/ui/empty";import{Loader2Icon as v}from"lucide-react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Wt({session:t,timeline:y}){let{host:m,client:s}=e(),{t:i}=m,f=n((E)=>E.historyPages[t.id]?.cursor!=null),u=()=>g(m,s.open(t.id,t.cwd)),a=o(Je,{...y,session:t,client:s,host:m});if(t.restoring)return t.items.length===0?r("div",{className:"text-muted-foreground flex flex-1 items-center justify-center gap-2 text-sm",children:[o(v,{className:"size-4 animate-spin","aria-hidden":"true"}),i("conversation.restoring")]}):a;if(!t.attached&&t.items.length===0)return r(p,{className:"flex-1",children:[r(l,{children:[o(d,{children:i("conversation.reopen")}),o(c,{children:i("conversation.detached")})]}),o(h,{onClick:u,children:i("conversation.reopen")})]});if(t.items.length===0&&t.state==="idle"&&!f)return o(p,{className:"flex-1",children:r(l,{children:[o(d,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(c,{className:"truncate font-mono",children:t.cwd})]})});return a}
2
- export{Wt};
@@ -1,2 +0,0 @@
1
- import{n}from"./chunk-mv51zgj1.js";import{Yt,e,g}from"./chunk-y6kzbbya.js";import{Ft}from"./chunk-3vsc49pt.js";import{Wt}from"./chunk-615a0yhh.js";import{Qt}from"./chunk-j8v3sfpv.js";import{Et,Lt}from"./chunk-n9gq2wbz.js";import{Rt}from"./chunk-ha46rhzj.js";import{Alert as x,AlertDescription as C,AlertTitle as N}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as H,EmptyDescription as k,EmptyHeader as O,EmptyTitle as S}from"@nyssance/shadcn/vega/components/ui/empty";import{LockIcon as M,UnplugIcon as P}from"lucide-react";import{useMemo as z,useRef as B}from"react";import{jsx as o,jsxs as r}from"react/jsx-runtime";function br({host:t,client:c,...s}){let m=z(()=>t.openDiff?t:{...t,openDiff:Et},[t]);return r(Yt,{host:m,client:c,children:[o(I,{...s}),!t.openDiff&&o(Lt,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:w,readOnlyActions:D,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=B(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:i}=d,f=n((a)=>a.connection==="ready"),v=n((a)=>a.historyPages[t.id]?.error),y=()=>g(d,R.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return r("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,r("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!u&&o(Qt,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&o("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:r(x,{children:[o(P,{}),o(N,{children:i("conversation.stopped")}),o(C,{children:o(h,{size:"sm",variant:"outline",onClick:y,children:i("conversation.reconnect")})})]})}),u?E??o(H,{className:"flex-1",children:r(O,{children:[o(S,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(k,{children:i("conversation.welcomeDescription")})]})}):o(Wt,{session:t,timeline:m}),o(Rt,{sessionId:t.id}),t.readOnly?o("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:r(x,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[r("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[o(M,{"aria-hidden":"true",className:"size-4 shrink-0"}),r("div",{className:"min-w-0 space-y-1",children:[o(N,{children:i("conversation.readOnlyTitle")}),o(C,{children:i("conversation.readOnlyDescription")}),v&&o("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),r("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[o(h,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:i(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),D]})]})}):w??o(Ft,{session:t})]}),T]})}
2
- export{br};
@@ -1,2 +0,0 @@
1
- import{groupSessions as Ie,projectName as J,isQuickChatDirectory as ur,QUICK_CHATS_GROUP as K}from"@nyssance/codex-acp-v2/client";
2
- export{Ie,J,ur,K};
@@ -1,2 +0,0 @@
1
- var Yr=1e6,Xr=5000000;function To(_,e){return _+e>5000000}function Jr(_){return(_/1e6).toFixed(1)}var ye=5;
2
- export{Yr,Xr,To,Jr,ye};
@@ -1,2 +0,0 @@
1
- var Tr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Uo(e){return[...e].toSorted((o,n)=>(Tr[o.kind]??99)-(Tr[n.kind]??99))}function oa(e){return e==="allow_once"||e==="allow_always"}function ia(e){return e==="allow_always"||e==="reject_always"}
2
- export{Tr,Uo,oa,ia};
@@ -1,2 +0,0 @@
1
- import{l,i}from"./chunk-4p6svs37.js";import{f}from"./chunk-1k21j77z.js";import{I}from"./chunk-wvry7t79.js";import{le}from"./chunk-bfhfbrzt.js";import{E,ae,se}from"./chunk-tv0fwt2g.js";import{ExternalLinkIcon as W,PlusIcon as _}from"lucide-react";import{useEffect as q,useState as y}from"react";import{Badge as O}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as v}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogContent as G,DialogDescription as J,DialogHeader as K,DialogTitle as Q}from"@nyssance/shadcn/vega/components/ui/dialog";import{Spinner as S}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as X}from"@nyssance/shadcn/vega/components/ui/switch";import{jsx as e,jsxs as n,Fragment as T}from"react/jsx-runtime";function lt({entry:r,onBack:p}){let u=l(),{t}=u,P=i((a)=>a.readPlugin),C=i((a)=>a.installed.find(({plugin:g})=>g.id===r.plugin.id)),x=i((a)=>a.busyIds[r.plugin.id]),H=i((a)=>a.install),V=i((a)=>a.uninstall),j=i((a)=>a.setPluginEnabled),[o,B]=y(null),[D,U]=y(null),[R,M]=y(0),[c,z]=y(null);q(()=>{let a=!0;return U(null),B(null),P(r).then((g)=>{if(a)B(g)},(g)=>{if(a)U(g instanceof Error?g.message:String(g))}),()=>{a=!1}},[r,P,R]);let d=o?.summary??r.plugin,m=C?.plugin??d,s=d.interface,b=s?.displayName??d.name,k=m.availability!=="AVAILABLE"||m.installPolicy==="NOT_AVAILABLE",A=s?.longDescription??o?.description??s?.shortDescription,L=[...u.assetUrl?s?.screenshots.map((a)=>u.assetUrl(a))??[]:[],...s?.screenshotUrls??[]];return n("div",{className:"toolbox-surface flex min-h-0 flex-1 flex-col overflow-hidden",children:[e(se,{children:n("header",{className:"flex min-w-0 flex-col gap-4",children:[n("nav",{"aria-label":t("plugins.detail.root"),className:"flex min-w-0 items-center gap-2 text-[13px]",children:[e(v,{variant:"link",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 hover:no-underline",onClick:p,children:t("plugins.detail.root")}),e("span",{"aria-hidden":"true",className:"text-muted-foreground/50 text-sm",children:"/"}),e("span",{"aria-current":"page",className:"truncate",children:b})]}),n("div",{className:"flex min-h-9 flex-wrap items-center justify-between gap-4",children:[n("div",{className:"flex min-w-0 items-center gap-3",children:[e(I,{name:d.name,className:"size-9 shrink-0 rounded-lg"}),e("h1",{className:"min-w-0 text-2xl leading-8 font-semibold break-words",children:b})]}),e("div",{className:"flex shrink-0 items-center gap-3",children:C?n(T,{children:[e(X,{checked:m.enabled,disabled:!!x||k,"aria-label":t(m.enabled?"plugins.card.disable":"plugins.card.enable",{pluginName:b}),onCheckedChange:(a)=>void j(m,a)}),e(v,{variant:"outline",size:"sm",disabled:!!x,onClick:()=>void V(m),children:x?e(S,{}):t("plugins.detail.uninstall")})]}):e(v,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0","aria-label":t(k?"plugins.detail.unavailable":"plugins.detail.install"),title:t(k?"plugins.detail.unavailable":"plugins.detail.install"),disabled:!!x||k,onClick:()=>void H({...r,plugin:d}).catch(()=>{}),children:x?e(S,{"aria-hidden":"true"}):e(_,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})})]})]})}),e(f,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${E} pt-2`,children:[s?.shortDescription&&e("p",{className:"text-muted-foreground text-sm leading-6",children:s.shortDescription}),d.keywords.length>0&&e("div",{className:"mt-3 flex flex-wrap gap-2",children:[...new Set(d.keywords)].map((a)=>e(O,{variant:"secondary",className:"text-xs font-normal",children:a},a))}),n("div",{className:"mt-6 flex items-stretch overflow-x-auto border-y py-4",children:[s?.developerName&&e(N,{label:t("plugins.detail.developer"),children:s.developerName}),s?.category&&e(N,{label:t("plugins.detail.category"),children:s.category}),(m.localVersion??m.version)&&e(N,{label:t("plugins.detail.version"),children:m.localVersion??m.version}),e(N,{label:t("plugins.headings.marketplace"),children:r.marketplace.interface?.displayName??r.marketplace.name}),s?.websiteUrl&&e(N,{label:t("plugins.detail.website"),children:e(w,{url:s.websiteUrl,label:t("plugins.detail.website")})})]}),!o&&!D&&n("div",{role:"status",className:"text-muted-foreground mt-8 flex items-center gap-2 text-sm",children:[e(S,{}),t("plugins.detail.loading")]}),D&&n("div",{role:"alert",className:"mt-8 space-y-2",children:[n("p",{className:"text-destructive text-sm",children:[t("plugins.detail.errorTitle"),": ",D]}),e(v,{variant:"outline",size:"sm",className:"h-9",onClick:()=>M((a)=>a+1),children:t("plugins.loadError.retry")})]}),A&&e("p",{className:"mt-8 text-sm leading-6 whitespace-pre-wrap",children:A}),L.length>0&&e("div",{className:"mt-6 flex gap-3 overflow-x-auto",children:[...new Set(L)].map((a)=>e("img",{src:a,alt:b,loading:"lazy",className:"max-h-72 max-w-full rounded-xl border object-contain"},a))}),s&&s.capabilities.length>0&&e(h,{label:t("plugins.detail.capabilities"),count:s.capabilities.length,children:s.capabilities.map((a)=>e(O,{variant:"secondary",className:"me-2",children:a},a))}),o&&o.mcpServers.length>0&&e(h,{label:t("plugins.detail.mcpServers"),count:o.mcpServers.length,children:o.mcpServers.map((a)=>n("div",{className:"flex items-center gap-3 py-1",children:[e(I,{name:d.name,className:"size-6 rounded-md"}),e("span",{className:"text-sm font-medium",children:a})]},a))}),o&&o.skills.length>0&&e(h,{label:t("plugins.detail.skills"),count:o.skills.length,children:o.skills.map((a)=>n(v,{variant:"ghost",className:"h-auto w-full justify-start gap-3 rounded-xl px-3 py-3 text-start whitespace-normal",onClick:()=>z(a),children:[e(I,{name:a.name,className:"size-8"}),n("span",{className:"min-w-0 flex-1",children:[e("span",{className:"block text-sm font-medium",children:a.interface?.displayName??a.name}),e("span",{className:"text-muted-foreground mt-1 block truncate text-[13px] leading-5 font-normal",children:a.interface?.shortDescription??a.shortDescription??a.description})]})]},a.path??a.name))}),o&&o.apps.length>0&&e(h,{label:t("plugins.detail.apps"),count:o.apps.length,children:o.apps.map((a)=>n("div",{className:"rounded-xl px-3 py-3",children:[e("div",{className:"text-sm font-medium",children:a.name}),a.description&&e("p",{className:"text-muted-foreground mt-1 text-[13px] leading-5",children:a.description}),a.installUrl&&e(w,{url:a.installUrl,label:t("plugins.installModal.connect")})]},a.id))}),o&&o.hooks.length>0&&e(h,{label:t("plugins.detail.hooks"),count:o.hooks.length,children:o.hooks.map((a)=>e("p",{className:"text-sm",children:a.eventName},a.key))}),(s?.privacyPolicyUrl||s?.termsOfServiceUrl)&&n("div",{className:"mt-10 flex flex-wrap gap-4 border-t pt-4",children:[s.privacyPolicyUrl&&e(w,{url:s.privacyPolicyUrl,label:t("plugins.detail.privacyPolicy")}),s.termsOfServiceUrl&&e(w,{url:s.termsOfServiceUrl,label:t("plugins.detail.termsOfService")})]})]})}),e(F,{open:c!==null,onOpenChange:(a)=>{if(!a)z(null)},children:e(G,{className:ae,children:c&&n(T,{children:[e("div",{className:"shrink-0 pr-8",children:e(I,{name:c.name,className:"size-10"})}),n("div",{className:"min-h-0 space-y-6 overflow-y-auto overscroll-contain",children:[n(K,{className:"gap-3",children:[e(Q,{className:"text-2xl leading-8 font-semibold break-words",children:c.interface?.displayName??c.name}),e(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:c.description})]}),e(le,{path:c.path,description:c.description},c.path??c.name)]})]})})})]})}function N({label:r,children:p}){return n("div",{className:"flex min-w-28 shrink-0 flex-col items-center justify-between gap-1.5 border-e px-6 first:ps-2 last:border-e-0",children:[e("span",{className:"text-muted-foreground text-xs",children:r}),e("span",{className:"flex items-center text-sm font-normal",children:p})]})}function h({label:r,count:p,children:u}){return n("section",{className:"mt-8",children:[n("h2",{className:"text-base font-medium",children:[r," ",e("span",{className:"text-muted-foreground font-normal",children:p})]}),e("div",{className:"mt-3 flex flex-col gap-2",children:u})]})}function w({url:r,label:p}){let{openLink:u}=l();if(!/^https?:\/\//i.test(r))return null;return n(v,{variant:"link",className:"text-muted-foreground h-auto p-0 text-xs",title:r,onClick:()=>u(r),children:[p,e(W,{className:"size-3.5"})]})}
2
- export{lt};
@@ -1,2 +0,0 @@
1
- import{l,i}from"./chunk-4p6svs37.js";import{L,R,Q,F,D,ce}from"./chunk-20k9syde.js";import{re}from"./chunk-mr6k70s4.js";import{f}from"./chunk-1k21j77z.js";import{le}from"./chunk-bfhfbrzt.js";import{E,ae}from"./chunk-tv0fwt2g.js";import{CheckIcon as U,SparklesIcon as V,XIcon as X}from"lucide-react";import{useDeferredValue as _,useState as v}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as J,DialogClose as K,DialogContent as W,DialogDescription as Y,DialogHeader as Z,DialogTitle as ee}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as te}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as se}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ne}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as ie,TabsContent as oe,TabsList as pe,TabsTrigger as me}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function P({skill:c}){let{assetUrl:m}=l(),[u,s]=v(!1),o=c.interface?.iconSmall,b=o&&m?m(o):c.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:b&&!u?t("img",{src:b,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(V,{className:"text-muted-foreground size-6"})})}function de({skill:c}){let{t:m}=l(),u=i((o)=>o.setSkillEnabled),s=i((o)=>(c.path in o.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(se,{className:"text-muted-foreground size-3.5"}),t(ne,{checked:c.enabled,disabled:s,"aria-label":`${m(c.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${c.interface?.displayName??c.name}`,onCheckedChange:(o)=>void u(c,o)})]})}function st({query:c,ready:m,onOpenPlugin:u}){let{t:s}=l(),o=i((e)=>e.skills),b=i((e)=>e.skillErrors),j=i((e)=>e.loading)||!m,z=i((e)=>e.installed),M=i((e)=>e.skillProjects),[B,H]=v(null),[k,G]=v(!1),[O,C]=v(null),x=_(c.trim().toLowerCase()),r=o.find((e)=>e.path===O),N=z.find(({plugin:e})=>e.id===r?.pluginId),p=o.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(x)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),d=[...["user","system","admin"].flatMap((e)=>{let a=o.filter((h)=>h.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((h)=>h.path)),path:null}]:[]}),...Object.entries(M).flatMap(([e,a])=>{if(!o.some((T)=>T.scope==="repo"&&a.includes(T.path)))return[];let h=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:h,paths:new Set(a),path:e}]})],q=d.map((e)=>e.label);for(let e of d)if(e.path&&q.filter((a)=>a===e.label).length>1)e.label=e.path;let g=d.find((e)=>e.id===B)??d[0],w=g?p.filter((e)=>g.paths.has(e.path)):[],A=k||x?p:p.slice(0,6),I=(e)=>t(D,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(ce,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(F,{className:"pointer-events-none relative translate-none! self-center!",children:t(P,{skill:a})}),n(R,{className:"pointer-events-none relative min-w-0",children:[t(te,{className:"block truncate",children:a.interface?.displayName??a.name}),t(Q,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(L,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(U,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(f,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${E} space-y-8 pt-6`,children:[b.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),j?t(re,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:p.length})})]}),p.length?I(A):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(x?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!x&&p.length>6&&t(y,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":k,onClick:()=>G((e)=>!e),children:k?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:p.length-6})})]}),g&&n(ie,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")H(e)},className:"gap-6",children:[t(pe,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:d.map((e)=>t(me,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),d.map((e)=>t(oe,{value:e.id,children:e.id===g.id&&(w.length?I(w):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(J,{open:!!r,onOpenChange:(e)=>{if(!e)C(null)},children:t(W,{showCloseButton:!1,className:ae,children:r&&n(S,{children:[t(le,{path:r.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(P,{skill:r}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(de,{skill:r}),e,t(K,{render:t(y,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(X,{})})]})]}),n(Z,{className:"gap-3",children:[t(ee,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),t(Y,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:r.description})]})]})},r.path),r.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),N?t(y,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(N)},children:N.plugin.interface?.displayName??N.plugin.name}):r.pluginId]})]})})})]})}
2
- export{st};
@@ -1,4 +0,0 @@
1
- import{yi}from"./chunk-vt6cyes7.js";import{t}from"./chunk-mv51zgj1.js";import{Zo,Qo}from"./chunk-jgd6dcgy.js";import{Z}from"./chunk-j69t1f4a.js";import{ne}from"./chunk-1r25anvg.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var Wo=p(function({item:s,messageTime:c}){let l=t(),o=Qo(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
2
- ${e.text}`).join(`
3
- `):ne(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=Zo(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(Z,{block:e},`${s.id}:${n}`))}),r(yi,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
4
- export{Wo};
@@ -1,2 +0,0 @@
1
- import{io}from"./chunk-1mn2t6ga.js";import{createContext as r,useContext as i}from"react";import{jsx as s}from"react/jsx-runtime";var n=r(null);function or({host:o,children:t}){return s(n,{value:o,children:t})}function x(){let o=i(n),e={...io(),...o};if(e.t===void 0||e.i18n===void 0)throw Error("Collection host is missing; mount collections inside SessionListProvider or CollectionHostProvider");return e}function Zn(o,t){t.catch((e)=>{if(o.reportError)o.reportError(e);else console.error(e)})}function X(){let o=x();return(t)=>Zn(o,t)}function Qn(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent)}
2
- export{or,x,Zn,X,Qn};
@@ -1,2 +0,0 @@
1
- import{d}from"./chunk-d257n8gj.js";import{r,o}from"./chunk-1mn2t6ga.js";import{b,_,p,W}from"./chunk-1k697ncv.js";import{x,X,Qn}from"./chunk-feg5rp9g.js";import{ze}from"./chunk-11484wvv.js";import{N,j}from"./chunk-y0q6jwq4.js";import{de,Y}from"./chunk-r9sweaq4.js";import{closestCorners as fe,DndContext as Ce,KeyboardSensor as ye,PointerSensor as Se,useSensor as Z,useSensors as De}from"@dnd-kit/core";import{SortableContext as ee,sortableKeyboardCoordinates as we,useSortable as ae,verticalListSortingStrategy as oe}from"@dnd-kit/sortable";import{CSS as ce}from"@dnd-kit/utilities";import{cn as F}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as me,StarIcon as be,Trash2Icon as pe}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as R}from"react";import{Button as D}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as te,DialogContent as ne,DialogDescription as ie,DialogFooter as le,DialogHeader as re,DialogTitle as se}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as H,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a,Fragment as Ke}from"react/jsx-runtime";function Te({collectionId:l,sessionId:C,children:M}){let{attributes:w,listeners:v,setNodeRef:i,transform:u,transition:g,isDragging:E}=ae({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:ce.Transform.toString(u),transition:g},className:F("w-full min-w-0",E&&"opacity-50"),...w,...v,role:"group",children:M})}function Be({collection:l,children:C,onEdit:M,onConfirm:w,onNewChat:v}){let{t:i}=x(),u=Y(),g=X(),{attributes:E,listeners:m,setNodeRef:I,transform:P,transition:T,isDragging:z}=ae({id:l.id,disabled:{draggable:l.id===N,droppable:!1},data:{type:"collection"}});return e("div",{ref:I,style:{transform:ce.Transform.toString(P),transition:T},className:F("w-full min-w-0",z&&"opacity-50"),children:e(W,{open:!l.collapsed,onOpenChange:(c)=>g(u({type:"collapse",id:l.id,collapsed:!c})),label:j(l,i),count:l.sessionIds.length,leading:l.id===N?e(be,{className:"size-3.5"}):e(ze,{emoji:l.emoji,onChange:(c)=>g(u({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...E,...m,role:"group",children:c}),actions:a(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:j(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:a(Le,{children:[l.id!==N&&a(H,{onClick:M,children:[e(he,{}),i("collection.rename")]}),a(H,{onClick:v,children:[e(me,{}),i("collection.newChat")]}),a(H,{onClick:()=>w("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==N&&a(H,{variant:"destructive",onClick:()=>w("delete"),children:[e(pe,{}),i("collection.deleteCollection")]})]})})]}),children:C})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function Xi({renderRow:l,onSelect:C,onNewChat:M,Scroll:w=He}){let v=x(),{t:i}=v,u=Y(),g=X(),E=r(),{collections:m,order:I}=de(),P=o((t)=>t.sessionList),T=o((t)=>t.archivedSessions),z=o((t)=>t.sessionListLoaded),c=o((t)=>t.sessionListError),U=Me(()=>new Map([...T,...P].map((t)=>[t.sessionId,t])),[T,P]),q=v.isMac??Qn(),[y,k]=R(null),[L,K]=R(""),[J,O]=R(""),[S,B]=R(null),[f,A]=R(!1),ue=De(Z(Se,{activationConstraint:{distance:5}}),Z(ye,{coordinateGetter:we})),G=I.flatMap((t)=>m[t].collapsed?[]:m[t].sessionIds.flatMap((n)=>{let s=U.get(n);return s&&!s.archived?[s]:[]}));xe(()=>{let t=(n)=>{if(n.defaultPrevented||n.isComposing||n.repeat||n.shiftKey||n.altKey)return;if(q?!n.metaKey||n.ctrlKey:!n.ctrlKey||n.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(n.target instanceof HTMLElement&&(n.target.isContentEditable||n.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let s=Number(n.key)-1;if(!Number.isInteger(s)||s<0||s>8||!G[s])return;n.preventDefault(),C(G[s])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[G,q,C]);let ge=({active:t,over:n})=>{if(n===null)return;let s=t.data.current,h=n.data.current;if(s?.type==="session"&&h!==void 0){let V=h.type==="session"?String(h.collectionId):String(n.id);g(u({type:"move",sourceCollectionId:String(s.collectionId),collectionId:V,sessionId:String(s.sessionId),index:h.type==="session"?m[V].sessionIds.indexOf(String(h.sessionId)):void 0}))}else if(s?.type==="collection"&&h?.type==="collection"&&String(n.id)!==N)g(u({type:"reorder",id:String(t.id),index:I.indexOf(String(n.id))}))},Q=(t,n)=>{A(!0),g(t.then(n).finally(()=>A(!1)))};return a(Ke,{children:[e(w,{children:a(b,{children:[a(p,{className:F(d,"font-normal"),onClick:()=>{k("new"),K(""),O("")},children:[e(_,{children:e(me,{})}),e("span",{children:i("collection.newCollection")})]}),c&&a("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(D,{variant:"ghost",onClick:()=>g(E.listSessions({reset:!0})),children:i("collection.retry")})]}),e(Ce,{sensors:ue,collisionDetection:fe,onDragEnd:ge,children:e(ee,{items:I,strategy:oe,children:e(b,{children:I.map((t)=>e(Be,{collection:m[t],onNewChat:()=>M(t),onEdit:()=>{k(t),K(m[t].name),O(m[t].emoji??"")},onConfirm:(n)=>B({id:t,type:n}),children:e(ee,{items:m[t].sessionIds.map((n)=>JSON.stringify([t,n])),strategy:oe,children:m[t].sessionIds.map((n)=>{let s=U.get(n);if(s?.archived)return null;if(!s)return z?a("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(_,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(D,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>g(u({type:"remove",sessionId:n,collectionId:t})),children:e(pe,{})})]},n):null;return e(Te,{collectionId:t,sessionId:n,children:l(s,()=>{},t)},n)})})},t))})})})]})}),e(te,{open:y!==null,onOpenChange:(t)=>{if(!t&&!f)k(null)},children:a(ne,{children:[a(re,{children:[e(se,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ie,{children:i("collection.collectionName")})]}),a("form",{onSubmit:(t)=>{if(t.preventDefault(),y===null||!L.trim()||f)return;let n=y==="new"?`collection-${crypto.randomUUID()}`:y;Q(u([y==="new"?{type:"create",id:n,name:L}:{type:"rename",id:n,name:L},{type:"emoji",id:n,emoji:J}]),()=>k(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:L,onChange:(t)=>K(t.target.value),disabled:f}),y!=="new"&&e(ze,{emoji:J,onChange:O}),a(le,{children:[e(D,{type:"button",variant:"outline",disabled:f,onClick:()=>k(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:f||!L.trim(),children:i("collection.confirm")})]})]})]})}),e(te,{open:S!==null,onOpenChange:(t)=>{if(!t&&!f)B(null)},children:a(ne,{children:[a(re,{children:[e(se,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ie,{children:i("collection.confirmCollectionChange",{name:S===null?"":j(m[S.id],i)})})]}),a(le,{children:[e(D,{variant:"outline",disabled:f,onClick:()=>B(null),children:i("collection.cancel")}),e(D,{disabled:f,onClick:()=>{if(S!==null)Q(u({type:S.type,id:S.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
2
- export{Xi};
@@ -1,2 +0,0 @@
1
- import{a,O,Bt}from"./chunk-y97ne5kj.js";var Ao=5000;function Ee(t){return"pastedText"in t}function Hr(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Ke(t,e,o){let n=(r,s)=>{for(let[i,x]of a){if(!x.attachments.some((p)=>p.id===e.id))continue;O(i,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Hr(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!a.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),Bt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function Ot(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Ao)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};O(e,(i)=>[...i,s]),Ke(e,s,n)}
2
- export{Ao,Ee,Hr,Ke,Ot};
@@ -1,3 +0,0 @@
1
- import{d}from"./chunk-d257n8gj.js";import{b,p}from"./chunk-1k697ncv.js";import{at}from"./chunk-bvgqsaey.js";import{ke,l,Se,Oe,i}from"./chunk-4p6svs37.js";import{L,R,Q,F,D,ce,dt}from"./chunk-20k9syde.js";import{re}from"./chunk-mr6k70s4.js";import{He}from"./chunk-p7dd93e5.js";import{f}from"./chunk-1k21j77z.js";import{ct,I}from"./chunk-wvry7t79.js";import{E,se}from"./chunk-tv0fwt2g.js";import{lt}from"./chunk-cvz3k5gk.js";import{st}from"./chunk-d0vhdr07.js";import{hasPluginStore as te}from"@nyssance/codex-acp-v2/client";import{BlocksIcon as ae,BookOpenIcon as ne,CheckIcon as ie,CircleArrowUpIcon as le,MoreVerticalIcon as oe,PlusIcon as W,PuzzleIcon as de,RefreshCwIcon as me,SearchIcon as ue,Trash2Icon as pe,XIcon as ge}from"lucide-react";import{memo as fe,useDeferredValue as ve,useEffect as K,useMemo as U,useState as S}from"react";import{Button as k}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as xe,DialogContent as he,DialogDescription as Ne,DialogHeader as ye,DialogTitle as be,DialogTrigger as Pe}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as we,DropdownMenuContent as Ce,DropdownMenuItem as Ie,DropdownMenuTrigger as De}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as X}from"@nyssance/shadcn/vega/components/ui/input";import{Label as Me}from"@nyssance/shadcn/vega/components/ui/label";import{Spinner as B}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as e,jsxs as s,Fragment as Y}from"react/jsx-runtime";function T(t){return t.interface?.displayName??t.name}function Z(t){return t.interface?.shortDescription??""}function Ee({plugin:t,marketplace:c}){let{t:u}=l(),g=i((n)=>(t.id in n.busyIds)),a=i((n)=>n.installed.some((x)=>x.plugin.id===t.id)),v=i((n)=>n.install),m=t.availability!=="AVAILABLE"||t.installPolicy==="NOT_AVAILABLE",r=u(g?"plugins.card.installing":a?"plugins.sections.installed":"plugins.card.install");if(a&&!g)return e(ie,{className:"text-muted-foreground size-4 shrink-0","aria-label":r});return e(k,{size:"icon-sm",variant:"ghost",className:"text-foreground shrink-0 rounded-full",disabled:g||a||m,"aria-label":r,title:m?u("plugins.disabledReason.unknown"):r,onClick:()=>void v({plugin:t,marketplace:c}).catch(()=>{}),children:g?e(B,{"aria-hidden":"true"}):e(W,{className:"size-5",strokeWidth:2,"aria-hidden":"true"})})}function ze({plugin:t,marketplace:c,actions:u,onOpen:g}){let a=Z(t),v=t.interface?.developerName,m=t.localVersion??t.version,r=[v,m?`v${m}`:null].filter(Boolean).join(" · ");return s(ce,{className:"toolbox-row relative",children:[e(k,{variant:"ghost",className:"absolute inset-0 z-0 size-full","data-hover-background":"none","aria-label":T(t),onClick:()=>g({plugin:t,marketplace:c})}),e(F,{className:"pointer-events-none relative translate-none! self-center!",children:e("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:e(I,{name:t.name})})}),s(R,{className:"pointer-events-none relative min-w-0",children:[e(dt,{className:"mb-0.5",children:T(t)}),e(Q,{className:"line-clamp-1",title:a,children:a||c.interface?.displayName||c.name}),r&&e(Q,{"data-toolbox-metadata":"",children:r})]}),e(L,{className:"relative w-8 shrink-0 justify-center",children:u})]})}function q(){return Oe((t)=>t.connection==="ready"&&te(t.agent))}var z=48;function Be({marketplace:t,plugins:c,onOpen:u}){let{t:g}=l(),a=i((n)=>n.removeMarketplace),[v,m]=S(0),r=Math.min(v,Math.max(0,Math.ceil(c.length/z)-1));if(c.length===0)return null;return s("section",{className:"flex flex-col gap-4",children:[s("div",{className:"flex items-center gap-2",children:[e("h2",{className:"text-base font-medium",children:t.interface?.displayName??t.name}),e("span",{className:"text-muted-foreground text-xs",children:c.length}),t.path!==null&&s(we,{children:[e(De,{render:e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground ms-auto","aria-label":g("plugins.pageActions")}),children:e(oe,{})}),e(Ce,{align:"end",className:"w-max min-w-[140px] whitespace-nowrap",children:s(Ie,{className:"text-destructive",onClick:()=>void a(t.name),children:[e(pe,{className:"size-3.5"}),g("plugins.marketplace.remove")]})})]})]}),e(D,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:c.slice(r*z,(r+1)*z).map((n)=>e(ze,{onOpen:u,plugin:n,marketplace:t,actions:e(Ee,{plugin:n,marketplace:t})},n.remotePluginId??n.id))}),c.length>z&&s("div",{className:"flex items-center justify-end gap-2 px-2",children:[e(k,{variant:"outline",size:"sm",className:"h-9",disabled:r===0,onClick:()=>m(r-1),children:g("plugins.previousPage")}),s("span",{className:"text-muted-foreground text-xs",children:[r+1," / ",Math.ceil(c.length/z)]}),e(k,{variant:"outline",size:"sm",className:"h-9",disabled:(r+1)*z>=c.length,onClick:()=>m(r+1),children:g("plugins.nextPage")})]})]},t.name)}var Te=fe(function({query:c,onOpen:u}){let{t:g}=l(),a=i((n)=>n.marketplaces),v=i((n)=>n.featuredPluginIds),m=U(()=>a.map((n)=>({marketplace:n,entries:n.plugins.map((x)=>({plugin:x,text:[x.name,T(x),Z(x),x.interface?.developerName??"",...x.keywords].join(`
2
- `).toLowerCase()}))})),[a]),r=U(()=>{let n=new Set(v);return m.map(({marketplace:x,entries:h})=>({marketplace:x,plugins:h.filter(({plugin:y,text:P})=>c===""?x.path!==null||n.has(y.id):P.includes(c)).map(({plugin:y})=>y)}))},[m,v,c]);return s(Y,{children:[r.map(({marketplace:n,plugins:x})=>e(Be,{marketplace:n,plugins:x,onOpen:u},JSON.stringify([n.name,n.path,c]))),r.every((n)=>n.plugins.length===0)&&e("p",{className:"text-muted-foreground px-2 py-6 text-center text-sm",children:g("plugins.empty")})]})});function Ae(){let{t}=l(),c=q(),u=i((N)=>N.addMarketplace),g=i((N)=>N.upgradeAll),a=i((N)=>N.upgrading),[v,m]=S(""),[r,n]=S(!1),[x,h]=S(!1),[y,P]=S(null),A=async()=>{let N=v.trim();if(!N||r)return;n(!0),P(null);try{await u({source:N}),m(""),h(!1)}catch(M){P(M instanceof Error?M.message:String(M))}finally{n(!1)}};return s("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[s(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c||a,"aria-busy":a,onClick:()=>void g(),children:[a?e(B,{}):e(le,{"data-icon":"inline-start"}),t("plugins.marketplace.upgradeAll")]}),s(xe,{open:x,onOpenChange:(N)=>{if(!r)h(N)},children:[s(Pe,{render:e(k,{size:"sm",className:"h-9",variant:"outline",disabled:!c}),children:[e(W,{"data-icon":"inline-start"}),t("plugins.addMarketplace")]}),s(he,{children:[s(ye,{children:[e(be,{children:t("plugins.marketplace.addTitle")}),e(Ne,{children:t("plugins.catalog.sourceHelp")})]}),s("form",{className:"space-y-4",onSubmit:(N)=>{N.preventDefault(),A()},children:[e(Me,{htmlFor:"marketplace-source",children:t("plugins.marketplace.sourceLabel")}),e(X,{id:"marketplace-source",value:v,disabled:r,onChange:(N)=>m(N.target.value),placeholder:t("plugins.marketplace.sourcePlaceholder")}),y&&e("p",{role:"alert",className:"text-destructive text-sm",children:y}),s("div",{className:"flex justify-end gap-2",children:[e(k,{type:"button",variant:"ghost",disabled:r,onClick:()=>h(!1),children:t("plugins.marketplace.addCancel")}),s(k,{type:"submit",disabled:r||v.trim()==="",children:[r&&e(B,{}),t("plugins.marketplace.addSubmit")]})]})]})]})]})]})}function Le({onOpen:t,query:c}){let u=q(),g=i((m)=>m.marketplaceLoadErrors),a=i((m)=>m.loading)||!u,v=ve(c.trim().toLowerCase());return e(f,{className:"pe-0",viewportClassName:"pe-0",children:s("div",{className:`${E} flex flex-col gap-8`,children:[g.map((m)=>s("p",{className:"text-destructive px-2 text-xs",children:[m.marketplacePath,": ",m.message]},m.marketplacePath)),a?e(re,{}):e(Te,{query:v,onOpen:t})]})})}function Ui({cwd:t,active:c,extensions:u,onOpenCatalog:g}){let{t:a}=l(),v=Se(),m=ke(v),r=i((o)=>o.refresh),n=i((o)=>o.loading),x=i((o)=>o.error),[h,y]=S("plugins"),[P,A]=S({plugins:"",skills:""}),N=h==="skills"?P.skills:P.plugins,M=(o)=>A((O)=>({...O,[h]:o})),ee=Oe((o)=>JSON.stringify([...new Set(o.sessionList.map((O)=>He(O.cwd,o.projectContext)).filter((O)=>O!==null))].toSorted())),H=JSON.stringify([...new Set([He(t,v.state.projectContext),...JSON.parse(ee)].filter((o)=>o!==null))].toSorted()),j=i((o)=>o.installed),V=a(h==="skills"?"plugins.skills.search":"plugins.search"),[w,G]=S(null),C=q();K(()=>{if(!c||!C)return;if(m.getState().loadedScope!==H)r(JSON.parse(H))},[c,C,r,H,m]),K(()=>{if(!C)return;return v.onSkillsChanged(()=>void r(void 0,{background:!0}))},[C,r,v]);let J=(o)=>{g?.(),y("plugins"),G(o)},_=(o)=>{g?.(),y(o),G(null)};return s("div",{className:"plugins-page @container flex h-full min-h-0 overflow-hidden [--navigation-row-height:30px] [--spacing:4px]",children:[e(ct,{}),s("aside",{className:"bg-sidebar/40 flex w-44 shrink-0 flex-col border-e sm:w-60","aria-label":a("plugins.catalog.navigation"),children:[e("div",{className:"shrink-0 px-3 pt-3",children:e("div",{className:"flex h-9 items-center","data-plugin-sidebar-header":"",children:e("h2",{className:"text-sm leading-8 font-semibold",children:a("plugins.catalog.customize")})})}),s("nav",{"aria-label":a("plugins.manageTabs.aria"),className:"flex shrink-0 flex-col gap-1 px-2 pb-1",children:[u&&s(p,{className:`${d} h-8 gap-2 px-2`,active:u.active,onClick:u.onOpen,children:[e(ae,{className:"size-4"}),e("span",{children:a("plugins.extensions")})]}),["plugins","skills"].map((o)=>s(p,{className:`${d} h-8 gap-2 px-2`,active:!u?.active&&h===o&&w===null,onClick:()=>_(o),children:[o==="plugins"?e(de,{className:"size-4"}):e(ne,{className:"size-4"}),e("span",{children:a(`plugins.headings.${o}`)})]},o))]}),e("h3",{className:"text-muted-foreground mx-2 mt-1 mb-2 flex h-8 shrink-0 items-center px-2 text-xs font-medium",children:a("plugins.sections.installed")}),e(f,{className:"min-h-0 flex-1 pe-0",viewportClassName:"pe-0",children:e("nav",{"aria-label":a("plugins.sections.installed"),className:"px-2 pb-4",children:e(b,{children:!C||n&&j.length===0?s("div",{role:"status",className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs",children:[e(B,{className:"size-3.5",role:"presentation","aria-hidden":"true"}),a("plugins.detail.loading")]}):j.length===0?e("p",{className:"text-muted-foreground px-3 py-2 text-xs",children:a("plugins.sections.installedEmpty")}):j.map((o)=>s(p,{title:T(o.plugin),className:`${d} gap-2 px-2`,active:!u?.active&&w?.plugin.id===o.plugin.id,onClick:()=>J(o),children:[e(I,{name:o.plugin.name,className:"size-4 shrink-0"}),e("span",{className:"truncate",children:T(o.plugin)})]},o.plugin.id))})})})]}),e("main",{className:"toolbox-surface @container flex min-h-0 min-w-0 flex-1 flex-col","aria-label":a("plugins.catalog.content"),children:u?.active?u.content:s(Y,{children:[w&&e(lt,{entry:w,onBack:()=>_("plugins")},JSON.stringify([w.marketplace.name,w.marketplace.path,w.plugin.id,t])),s("div",{hidden:w!==null,className:w?"hidden":"flex min-h-0 flex-1 flex-col",children:[e(se,{children:e(at,{title:a(`plugins.headings.${h}`),children:s("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[s("div",{className:"relative w-52 max-w-full",children:[e(ue,{className:"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2"}),e(X,{className:"h-9 rounded-full ps-9 pe-9","aria-label":V,value:N,onChange:(o)=>M(o.target.value),placeholder:V}),N&&e(k,{className:"toolbox-search-clear absolute end-1 top-1/2 -translate-y-1/2",variant:"ghost",size:"icon-xs","aria-label":a("plugins.catalog.clearSearch"),onClick:()=>M(""),children:e(ge,{})})]}),e(k,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":a("plugins.skills.refresh"),disabled:!C||n,onClick:()=>void r(void 0,{forceRefetch:!0}),children:n?e(B,{}):e(me,{})}),h==="plugins"&&e(Ae,{})]})})}),(h==="plugins"||x)&&s("div",{className:"toolbox-content flex shrink-0 flex-col gap-4 pt-2 pb-6",children:[h==="plugins"&&e("p",{className:"text-muted-foreground text-sm",children:a("plugins.catalog.description")}),x&&s("div",{role:"alert",className:"text-destructive flex items-center justify-between gap-2 text-sm",children:[s("p",{children:[a("plugins.loadError.title"),": ",x]}),e(k,{size:"sm",className:"h-9",variant:"outline",disabled:n||!C,onClick:()=>void r(),children:a("plugins.loadError.retry")})]})]}),s("div",{className:"flex min-h-0 flex-1 flex-col",children:[e("div",{hidden:h!=="plugins",className:h==="plugins"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(Le,{query:P.plugins,onOpen:J})}),e("div",{hidden:h!=="skills",className:h==="skills"?"flex min-h-0 flex-1 flex-col":"hidden",children:e(st,{query:P.skills,ready:C,onOpenPlugin:J})})]})]})]})})]})}
3
- export{Ui};
@@ -1,2 +0,0 @@
1
- import{M}from"./chunk-667z0pac.js";import{fe}from"./chunk-1k697ncv.js";import{x,X}from"./chunk-feg5rp9g.js";import{N,j}from"./chunk-y0q6jwq4.js";import{de,Y}from"./chunk-r9sweaq4.js";import{cn as S}from"cn";import{BoxIcon as U,ChevronRightIcon as E,PlusIcon as z,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as L,DropdownMenuContent as _,DropdownMenuGroup as k,DropdownMenuItem as O,DropdownMenuRadioGroup as K,DropdownMenuRadioItem as q,DropdownMenuSeparator as J,DropdownMenuTrigger as Q}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as V}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function qn({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:R=n?"none":void 0,allowRemove:B=!0,submenu:g=!1,className:A,onOpenChange:T}){let{t}=x(),c=Y(),H=X(),P=fe(),{collections:s,order:C}=de(),i=C.find((o)=>s[o].sessionIds.includes(l)),[F,G]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(G(o),P(o),T?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),H(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(L,{modal:!1,open:F,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(Q,{disabled:r,"data-hover-background":R,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(y,{variant:"ghost",size:"icon-sm",className:A,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:S(i!==void 0&&"fill-current")})})}),a(_,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(k,{children:e(K,{value:i??null,children:C.map((o)=>a(q,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===N?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(U,{}),e("span",{className:"min-w-0 flex-1 truncate",children:j(s[o],t)})]},o))})}),e(J,{}),a(k,{children:[a(O,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(z,{}),t("collection.newCollection")]}),B&&i!==void 0&&a(O,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(V,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(y,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Ji({sessionId:l,allowRemove:f=!0}){let{t:n}=x();return e(qn,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(M,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(E,{className:"rtl:rotate-180"})})})}
2
- export{qn,Ji};
@@ -1,2 +0,0 @@
1
- import{Mn}from"./chunk-f2w2sct6.js";import{Ai}from"./chunk-v5pbaf9x.js";import{ie,Hi}from"./chunk-px1ehzwc.js";import{e}from"./chunk-y6kzbbya.js";import{useCallback as s,useSyncExternalStore as E}from"react";import"@alwith/module-chat/search.css";import{jsx as w}from"react/jsx-runtime";var h="alwith-chat:find";function Er(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function Qt({sessionId:t,rootRef:p}){let{host:v,client:a}=e(),{t:l}=v,u=E(ie.subscribe,ie.getState,ie.getState),y=s(()=>p.current?.querySelector("[data-chat-scroll]")??null,[p]),m=s((r)=>u.sessionId===t?Mn(u.turns,r,u.terminals):[],[u,t]),S=s((r,i)=>Hi(t,r,i),[t]),b=s(async(r)=>{await a.loadHistoryNavigation(t);let i=a.state.historyNavigation[t];for(let n of i?.turns??[]){if(r.aborted)return;if(!a.state.historyNavigation[t]?.loadedTurnIds.includes(n.turnId))await a.loadHistoryTurn(t,n.turnId)}let c=new Set;while(!r.aborted){let n=a.state.historyPages[t]?.cursor;if(n==null)return;if(c.has(n))throw Error("Chat history pagination returned a repeated cursor");c.add(n),await a.loadOlderHistory(t)}},[a,t]),{subscribeSearch:f,shouldOpenSearch:d}=v,g=s((r)=>{let i=(o)=>{if((o.metaKey||o.ctrlKey)&&!o.altKey&&!o.shiftKey&&o.key.toLowerCase()==="f"){if(d&&!d(o))return;o.preventDefault(),r()}},c=(o)=>{if(o.detail===t)r()};window.addEventListener("keydown",i),window.addEventListener(h,c);let n=f?.(r);return()=>{window.removeEventListener("keydown",i),window.removeEventListener(h,c),n?.()}},[f,d,t]);return w("div",{className:"absolute inset-x-0 top-0 z-30",children:w(Ai,{placement:"body",getViewport:y,findSourceMatches:m,revealTurn:S,prepareSource:b,subscribeOpen:g,labels:{search:l("conversation.search.label"),placeholder:l("conversation.search.placeholder"),previous:l("conversation.search.previous"),next:l("conversation.search.next")}},t)})}
2
- export{Er,Qt};
@@ -1,2 +0,0 @@
1
- function ge(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function to(a){if(a.shiftKey||a.altKey)return!1;return ge()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
2
- export{ge,to};
@@ -1,3 +0,0 @@
1
- import{s,r,o}from"./chunk-1mn2t6ga.js";import{Ie,J,K}from"./chunk-8akwfgkq.js";import{Alert as j,AlertDescription as P}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as de,DialogContent as ue,DialogDescription as me,DialogFooter as pe,DialogHeader as he,DialogTitle as fe}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as ve}from"@nyssance/shadcn/vega/components/ui/input";import{Select as U,SelectContent as ge,SelectItem as x,SelectTrigger as _,SelectValue as R}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as W}from"@nyssance/shadcn/vega/components/ui/spinner";import{sessionGroup as T}from"@nyssance/codex-acp-v2/client";import{cn as xe}from"cn";import{ArchiveIcon as Se,FolderIcon as M,ListFilterIcon as ye,SearchIcon as Le,Trash2Icon as X}from"lucide-react";import{useEffect as Ne,useRef as Ce,useState as d}from"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";function Y({className:u,...i}){return t(ge,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:xe("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function we({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function dr({Scroll:u=we}){let{t:i,i18n:A}=s(),m=r(),S=o((e)=>e.archivedSessions),N=o((e)=>e.connection),[B,Z]=d(""),[y,ee]=d("all"),[p,te]=d("all"),[se,ie]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=Ce(!1),[D,f]=d(null),[O,b]=d(null),[ne,G]=d(!1);Ne(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let a=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(a.has(v))throw Error("Archive pagination returned a repeated cursor");a.add(v),await m.listArchived()}}catch(a){if(!e)F(E(a))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,se]);let l=o((e)=>e.projectContext),k=!(l!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ae=[...new Set(S.filter((e)=>l&&T(l,e).id!==K).map((e)=>l?T(l,e).id:e.cwd))].toSorted(),re=B.trim().toLocaleLowerCase(A.language),Q=S.filter((e)=>{let c=l?T(l,e).id:null,a=c===K;return L(e).toLocaleLowerCase(A.language).includes(re)&&(y==="all"||(y==="quick"?a:!a))&&(p==="all"||(p==="quick"?a:c===p))}),le=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function oe(e){if(h.current)return;h.current=!0,w(!0),H(null);try{await m.unarchive(e.sessionId)}catch(c){H(E(c))}finally{h.current=!1,w(!1)}}async function ce(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let a of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===a.sessionId))continue;try{await m.delete(a.sessionId)}catch(v){e.push(a),c.push(`${L(a)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
2
- `));else f(null)}finally{h.current=!1,w(!1)}}return n("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[n("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[n("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),n(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),G(!0),f([...S])},children:[t(X,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),n("div",{className:"flex shrink-0 flex-wrap gap-3",children:[n("div",{className:"relative min-w-48 flex-1",children:[t(Le,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(ve,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>Z(e.target.value),className:"rounded-md ps-9"})]}),n(U,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");ee(e)},children:[n(_,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(ye,{"aria-hidden":"true"}),t(R,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),n(Y,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),n(U,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");te(e)},children:[n(_,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(M,{"aria-hidden":"true"}),t(R,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):J(p,l??void 0)})]}),n(Y,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ae.map((e)=>t(x,{value:e,title:e,children:J(e,l??void 0)},e))]})]})]}),n(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):q?n("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(W,{}),i("sessionList.archives.loading")]}):I?t(j,{variant:"destructive",children:n(P,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>ie((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?n("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(Se,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):Q.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(l?Ie(Q,l):[]).filter(([,e])=>e.length>0).map(([e,c])=>n("section",{className:"flex flex-col gap-3",children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===K?void 0:e,children:[t(M,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===K?i("sessionList.archives.noProject"):J(e,l??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((a)=>n("article",{"aria-label":L(a),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[n("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(a),children:L(a)}),a.updatedAt!==null&&t("time",{dateTime:a.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:le.format(new Date(a.updatedAt))})]}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),G(!1),f([a])},children:t(X,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void oe(a),children:i("sessionList.archives.unarchive")})]})]},a.sessionId))})]},e)),V&&t(j,{variant:"destructive",children:t(P,{children:V})})]})]}),t(de,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:n(ue,{showCloseButton:!C,children:[n(he,{children:[t(fe,{children:i("sessionList.archives.deleteTitle")}),t(me,{children:i(ne?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(j,{variant:"destructive",children:t(P,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),n(pe,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),n(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void ce(),children:[C&&t(W,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
3
- export{dr};
@@ -1,2 +0,0 @@
1
- import{et}from"./chunk-pprt7ntb.js";import{ti,ni,oi}from"./chunk-f5gsffbv.js";import{Jo}from"./chunk-0wa9yjg3.js";import{t}from"./chunk-mv51zgj1.js";import{ne}from"./chunk-1r25anvg.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function Br(i,n){return{installUnlock:n==="none"?()=>()=>{}:ni,preload:()=>{if(n!=="none")ti(i)},playSequence:(a,d,l)=>oi(a,d,l,i,n)}}function Yo(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:ne(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(et,{text:i.response,host:a})})]})}function Xo(i){return r(Jo,{...i,renderPreview:(n)=>r(T,{item:n})})}
2
- export{Br,Yo,Xo};
@@ -1,2 +0,0 @@
1
- import{Oi}from"./chunk-mj7094yh.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function Ce({host:e,client:i,children:o}){return r(Oi,{host:e,children:r(c,{value:e,children:r(u,{value:i,children:o})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function we(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function De(e,i){return m((o)=>e.subscribe(o),()=>i(e.getState()),()=>i(e.getState()))}function n(e){let i=we();return De(i.store,e)}function rt(e,i){if(e.reportError)e.reportError(i);else console.error(i)}
2
- export{Ce,t,we,De,n,rt};
@@ -1,2 +0,0 @@
1
- function*An(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function Ri(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of An(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
2
- export{An,Ri};
@@ -1,2 +0,0 @@
1
- import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function U(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function m(e,t){return e.find((n)=>n.category===t&&o(n))}function B(e){return U(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
2
- export{U,m,B};
@@ -1,2 +0,0 @@
1
- function Bi(n,r,o){return n("plugin:alwith-chat|read_skill_document",{path:r,roots:o??null})}
2
- export{Bi};
@@ -1,2 +0,0 @@
1
- import{createStore as r}from"@alwith/api/client";var ie=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function Fi(e){ie.setState({...e,terminals:e.terminals??{}})}function Di(e){if(ie.getState().sessionId===e)ie.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function Hi(e,n,t){let i=ie.getState();if(t.aborted||e===null||i.sessionId!==e||i.api===null)return;if(i.beforeReveal===null)throw Error("Mounted timeline has no navigation lifecycle");i.beforeReveal(),await i.api.scrollToKey(n,void 0,{align:"top"})}
2
- export{ie,Fi,Di,Hi};
@@ -1,2 +0,0 @@
1
- import{k,Tn,Pi,Zt,Ti,In,Ii}from"./chunk-pzjag1mt.js";import{t,we,De,n}from"./chunk-mv51zgj1.js";import{be}from"./chunk-hd7bk591.js";import{createStore as E}from"@alwith/api/client";import{isText as w,nativeTurnId as Q}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var b=E({entries:{}});function p(r,e){b.setState((s)=>({entries:{...s.entries,[r]:e}}))}function v(r,e){let s=Q(e),a=r.items.findLast((i)=>Q(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&Q(a)===s}function M(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...In(s._meta),...s.content.filter(w).flatMap((i)=>In(i._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:r,item:e,question:s,index:a}){let i=we(),{t:l}=t(),m=Tn(e.id,a),c=JSON.stringify([r,m]),u=De(b,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),A=n((o)=>o.connection==="ready"),f=u?.draft??Pi(s),x=d===void 0?u?.accepted:M(d,m)??u?.accepted,h=d!==void 0&&v(d,e),D=!d?.subagent&&A&&d?.attached&&!d.restoring&&!d.readOnly,g=x!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(b.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!v(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=Zt(s,f);if(!S.trim())return;let q={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:Ti(q),_meta:{codex:{questionReply:q}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(Ii,{question:s,draft:f,status:g,answer:x,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function Pn({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=k(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!v(s,e))return y(be,{content:e.content.some((i)=>!w(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(O,{sessionId:r,item:e,question:i,index:l},Tn(e.id,l)))})}
2
- export{Pn};
@@ -1,2 +0,0 @@
1
- function zt(n){return`file://${encodeURI(n.absPath).replaceAll(/[?#]/g,encodeURIComponent)}`}function Vt(n){return n.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)??n}function jt(n){return Vt(n.absPath)}
2
- export{zt,Vt,jt};
@@ -1,2 +0,0 @@
1
- function Fr(t,e){if(t.type||!e.type)return t;let o=e.type.split("/")[1],i=o!==void 0&&o!==""?`pasted-${Date.now()}.${o==="jpeg"?"jpg":o}`:"";return new File([t],t.name||i||`pasted-${Date.now()}`,{type:e.type})}function go(t){let e=[],o=!1;for(let i of t){if(i.kind!=="file")continue;let n=i.getAsFile();if(!n)continue;if(!(n.type||i.type).startsWith("image/")){o=!0;continue}e.push(Fr(n,i))}return{imageFiles:e,sawNonImageFile:o}}function fo(t){return[...t].some((e)=>e.kind==="string")}function s(t){let e=t.codePointAt(0);return e<32&&e!==9&&e!==10&&e!==13||e===127}function Dr(t){return[...t].filter((e)=>!s(e)).join("")}function Cr(t,e){let o=0;for(let i=0;i<e;i++){let n=t.charCodeAt(i);if(n>=0&&n<=8||n===11||n===12||n>=14&&n<=31||n===127)o++}return o}function Dt(t){let{value:e,selectionStart:o,selectionEnd:i}=t,n=Dr(e);if(n===e)return n;if(t.value=n,o!==null&&i!==null){let a=Math.max(0,o-Cr(e,o)),r=Math.max(0,i-Cr(e,i));requestAnimationFrame(()=>{t.setSelectionRange(a,r)})}return n}
2
- export{Fr,go,fo,Dr,Cr,Dt};
@@ -1,2 +0,0 @@
1
- import{C}from"./chunk-heyqzkxq.js";import{s,u}from"./chunk-1mn2t6ga.js";import{_,p}from"./chunk-1k697ncv.js";import{GlobeIcon as b,LogOutIcon as x}from"lucide-react";import{useState as M}from"react";import{Avatar as A,AvatarFallback as N,AvatarImage as y}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as h,DropdownMenuContent as S,DropdownMenuGroup as c,DropdownMenuItem as L,DropdownMenuLabel as P,DropdownMenuRadioGroup as I,DropdownMenuRadioItem as O,DropdownMenuSeparator as d,DropdownMenuSub as G,DropdownMenuSubContent as k,DropdownMenuSubTrigger as R,DropdownMenuTrigger as T}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function gr(e){return o(c,{...e})}function fr(e){return o(d,{...e})}function oo({className:e,...r}){return o(L,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function hr({languages:e,value:r,onChange:i}){let a=s();return n(G,{children:[n(R,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(b,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(k,{children:o(I,{value:r,onValueChange:(t)=>void u(a,Promise.resolve(i(t))),children:e.map((t)=>o(O,{value:t.code,children:t.label},t.code))})})]})}function vr({user:e,children:r,onSignOut:i,busy:a=!1}){let t=s(),{t:w}=t,[m,v]=M(!1),[D,l]=M(!1);C(m);let g=a||D,f=n(A,{className:"size-[18px] after:border-0",children:[o(y,{src:e.avatar??void 0,alt:""}),o(N,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(h,{open:m,onOpenChange:v,children:[n(T,{render:o(p,{disabled:g,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(_,{children:f}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(S,{side:"top",align:"start",sideOffset:8,className:"w-[calc(var(--anchor-width)+36px)]",children:[n(c,{children:[n(P,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[f,n("span",{className:"min-w-0 flex-1",children:[o("span",{className:"block truncate",children:e.name}),o("span",{className:"text-muted-foreground mt-0.5 block truncate text-xs font-normal",children:e.email})]})]}),o(d,{})]}),r,r!=null&&o(d,{}),o(c,{children:n(oo,{disabled:g,onClick:()=>{l(!0),u(t,i()).finally(()=>l(!1))},children:[o(x,{}),w("sessionList.signOut")]})})]})]})}
2
- export{gr,fr,oo,hr,vr};
@@ -1,2 +0,0 @@
1
- import{r}from"./chunk-1mn2t6ga.js";import{useSyncExternalStore as d}from"react";function Ne(t,i){let e=t.runStates[i];return e!==void 0&&(!e.reusableDraft||t.drafts[i]!==void 0)}function c(t,i){let e=new Set(Object.keys(i.runStates).filter((s)=>Ne(i,s))),n=t.filter((s)=>e.delete(s));return n.push(...e),n.length===t.length&&n.every((s,a)=>s===t[a])?t:n}var S=new WeakMap;function g(t){return{view:"sessions",activityOrder:c([],t.state),activitySeen:new Map,activityCollapsedGroups:new Set}}function on(t){let i=S.get(t);if(i)return i;let e=g(t),n=new Set,s=(o)=>{e={...e,...o};for(let v of n)v()};t.store.subscribe(()=>{let o=c(e.activityOrder,t.store.getState());if(o!==e.activityOrder)s({activityOrder:o})});let a={get:()=>e,set:s,subscribe:(o)=>(n.add(o),()=>n.delete(o))};return S.set(t,a),a}function pr(t){S.get(t)?.set(g(t))}function q(t){let i=on(r());return d(i.subscribe,()=>t(i.get()),()=>t(i.get()))}function ee(){return on(r()).set}function mr(){let t=q((e)=>e.view),i=ee();return[t,(e)=>i({view:e})]}
2
- export{Ne,on,pr,q,ee,mr};
@@ -1,2 +0,0 @@
1
- import{r,o}from"./chunk-1mn2t6ga.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Nt(e,s){let a=r(),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 a.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(s==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[a,e,c,f,i,s]),i?u:p??u}
2
- export{Nt};
@@ -1,2 +0,0 @@
1
- import{s,r,At,o,u}from"./chunk-1mn2t6ga.js";import{M}from"./chunk-667z0pac.js";import{he}from"./chunk-1k697ncv.js";import{me}from"./chunk-m271yxxm.js";import{Ve,ue}from"./chunk-4gyd9hx9.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as R,useState as y}from"react";import{jsx as n,jsxs as b,Fragment as C}from"react/jsx-runtime";function tn({sessionRow:e,active:v,onSelect:f,onForked:S=f,onHoverCardOpenChange:c,actions:l}){let a=s(),{t:p,i18n:k}=a,h=r(),d=o((t)=>t.runStates[e.sessionId]),I=At(),m=()=>f(e);return n(he,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:v,onClick:m,onKeyDown:(t)=>{if(t.key==="Enter"||t.key===" ")t.preventDefault(),m()},state:d?.state,interruption:d?.interruption??null,title:e.title??p("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:n(B,{sessionRow:e,onDelete:()=>I(e),onForked:S,actions:l}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ve(e.updatedAt,k.language)}):void 0,actions:d!=null?n(me,{title:p("sessionList.stop"),onStop:()=>u(a,h.stopSession(e.sessionId))}):void 0})}function B({sessionRow:e,onDelete:v,onForked:f,actions:S}){let c=s(),{t:l}=c,a=r(),p=o((i)=>F(i.agent)),k=o((i)=>i.connection==="ready"&&i.agent?.capabilities?.session?.fork!=null),[h,d]=y(!1),[I,m]=y(!1),t=R(!1);return n(ue,{sessionRow:e,renaming:h,onRename:(i)=>{if(d(!1),i!==null)u(c,a.renameSession(e.sessionId,i))},actions:b(C,{children:[p&&n(M,{icon:n(H,{}),label:l("sessionList.rename"),onClick:()=>d(!0)}),S,e.archived?n(M,{icon:n(x,{}),label:l("sessionList.unarchive"),onClick:()=>void u(c,a.unarchive(e.sessionId))}):b(C,{children:[n(M,{icon:n(A,{}),label:l("sessionList.fork"),disabled:!k||I,onClick:()=>{if(t.current)return;t.current=!0,m(!0),u(c,a.fork(e.sessionId,e.cwd).then((i)=>{let g=a.state.sessionList.find((L)=>L.sessionId===i);if(!g)throw Error("Forked chat is missing from the session list");f(g)}).finally(()=>{t.current=!1,m(!1)}))}}),n(M,{icon:n(D,{}),label:l("sessionList.archive"),onClick:()=>void u(c,a.archive(e.sessionId))})]}),n(M,{variant:"destructive",icon:n(N,{}),label:l("sessionList.delete"),onClick:v})]})})}
2
- export{tn};
@@ -1,2 +0,0 @@
1
- import{r,o}from"./chunk-1mn2t6ga.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function cr(c){let t=r(),e=o((s)=>s.projectContext),u=c===null?m:e?a(e,{cwd:t.projectPath(c)}).id:null,d=o((s)=>s.sessionList),l=o((s)=>s.connection),i=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(l==="ready"&&!i&&n===null)t.listSessions().catch(()=>{return})},[t,l,i,n]),{result:L(()=>{if(i&&e)return{status:"ready",sessionRows:d.filter((s)=>a(e,{...s,cwd:t.projectPath(s.cwd)}).id===u).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,d,i,n,u,e]),retry:f}}
2
- export{cr};
@@ -1,2 +0,0 @@
1
- import{S}from"./chunk-mj7094yh.js";import{oe}from"./chunk-x2nemdjf.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function Mi({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(S,{text:t.content,streaming:!1})});if(!n(t))return null;return e(oe,{entries:t.entries})}
2
- export{Mi};
@@ -1,3 +0,0 @@
1
- import{hn,vn}from"./chunk-r7s7kx38.js";import{k}from"./chunk-pzjag1mt.js";import{Nn}from"./chunk-k7ye738q.js";import{t}from"./chunk-mv51zgj1.js";import{bi,ne,nt,wi}from"./chunk-1r25anvg.js";import{xn}from"./chunk-x99fyd88.js";import{be}from"./chunk-hd7bk591.js";import{Pn}from"./chunk-q9ef9n7b.js";import{ui}from"./chunk-9jp5t3qq.js";import{Mi}from"./chunk-vzgv360q.js";import{hi}from"./chunk-azfmr99x.js";import{Sn,_n}from"./chunk-s8s65pj2.js";import{ot}from"./chunk-gha517v4.js";import{codexMessageError as z,codexTurnError as J,isContentEntry as oe,isEmbeddedResource as q,isImage as X,isResourceLink as ae,isText as me,nativeTurnId as le}from"@nyssance/codex-acp-v2/client";import{LoaderCircleIcon as de,SparklesIcon as ce}from"lucide-react";import{Fragment as ge,memo as ue,useEffect as pe,useState as fe}from"react";import{jsx as s,jsxs as m,Fragment as E}from"react/jsx-runtime";function U(i){if(X(i))return`${i.mimeType.toLowerCase()}:${i.data}`;if(q(i)&&"blob"in i.resource&&i.resource.mimeType?.toLowerCase().startsWith("image/"))return`${i.resource.mimeType.toLowerCase()}:${i.resource.blob}`;return null}function ye({item:i}){let{t:n}=t(),l=i.status==="in_progress",[o,c]=fe(()=>Date.now()-i.at>=1e4);return pe(()=>{if(!l)return;let a=Math.max(0,i.at+1e4-Date.now());if(c(a===0),a===0)return;let f=setTimeout(()=>c(!0),a);return()=>clearTimeout(f)},[i.id,i.at,l]),m("div",{className:"codex-context-compaction",children:[s(ce,{"aria-hidden":"true"}),s("span",{children:i.status==="completed"?n("stream.codex.contextCompacted"):i.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function N({sessionId:i,entry:n,terminals:l,streaming:o,streamingThoughtId:c}){let{t:a}=t();switch(n.kind){case"activity":return s(xn,{sessionId:i,items:n.items,terminals:l,streamingThoughtId:c});case"text":return k(n.item._meta).length>0?s(Pn,{sessionId:i,item:n.item}):s(be,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return s(Mi,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return m(Sn,{children:[s("div",{children:a("timeline.compactionFailed")}),n.item.error!==null&&s("div",{children:n.item.error})]});return s(ye,{item:n.item})}}function he({sessionId:i,turn:n,terminals:l,active:o,blocked:c=!1,continued:a=!1,edits:f=n.edits,activityItems:M=n.items,workStartedAt:Y=n.startedAt,isLast:W,error:y,interrupted:F,retry:L,retrying:u,answerActions:K,footer:Z}){let{t:d}=t(),C=n.errors.map((e)=>{let r=z(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let v=L?.turnId===le(e)?L:void 0;return s(_n,{error:r,retry:v},`${e.id}:${v?.delaySeconds??"manual"}`)});if(W&&y!==null&&!n.errors.some((e)=>{let r=z(e);return r!==null&&r.stopReason===y.stopReason&&J(r).message===J(y).message}))C.push(s(_n,{error:y},"current-run-error"));let h=C.length>0?s("div",{className:"codex-turn-errors",children:C}):null,A=n.items.filter(Nn);if(A.length>0&&A.length===n.items.length)return m(E,{children:[s(xn,{sessionId:i,items:A,terminals:l,streamingThoughtId:null}),h]});let x=n.work,T=x.length>0&&x.every((e)=>e.kind==="compaction");if(bi(n)||T&&n.final.length===0)return m(E,{children:[s("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),h]});let O=nt(n),P=n.final.filter((e)=>k(e._meta).length===0).map(ne).join(`
2
- `),w=o?null:ot(n,"assistant"),D=n.items.filter((e)=>e.kind==="tool"&&e.name==="image_generation"&&(e.status==="pending"||e.status==="in_progress")),G=new Set(n.final.flatMap((e)=>e.content.map(U).filter((r)=>r!==null))),b=n.items.flatMap((e)=>{if(e.kind!=="tool"||e.status!=="completed")return[];return e.content.filter(oe).flatMap((r,v)=>{let g=r.content,ie=e.name==="image_generation"&&X(g),re=e.toolKind!=="read"&&e.toolKind!=="search"&&(ae(g)||q(g)&&("blob"in g.resource));if(!ie&&!re)return[];let _=U(g);if(_!==null){if(G.has(_))return[];G.add(_)}return[{key:`${e.id}:${v}`,block:g}]})}),R=n.final.some((e)=>k(e._meta).length===0&&e.content.some((r)=>!me(r)||r.text.trim().length>0)),ee=D.length>0||b.length>0||T||R||n.final.some((e)=>k(e._meta).length>0),I=n.items.findIndex((e)=>n.final.includes(e)),S=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),B=x.filter((e)=>I===-1||S(e)<I),te=x.filter((e)=>I!==-1&&S(e)>I),se=[...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)})),...te.map((e)=>({kind:"work",entry:e,index:S(e)}))].toSorted((e,r)=>e.index-r.index),H=!o&&!a&&(P.trim().length>0?s(hn,{text:P,isMostRecentTurn:W,time:w,afterCopy:K}):m("div",{className:"flex items-center gap-0.5",children:[K,w&&s("span",{className:"codex-user-time ms-1",title:w.full,children:w.short})]})),p=hi({...n,items:M},{running:o,blocked:c,retrying:u!==void 0}),Q=p.kind==="reasoning"?p.ownerKey??null:null,V=p.kind==="thinking",j=wi({...n,items:M});return m(E,{children:[s(vn,{stateKey:JSON.stringify([i,n.replayed?"history":"live",n.key]),active:o&&!R,defaultExpanded:o&&!R||!n.replayed&&(F||O),...j,startedAt:j.startedAt??Y,loading:(V||p.kind==="working")&&n.work.length===0,loadingLabel:p.kind==="working"?d("stream.codex.working"):void 0,work:a||T?[]:B.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:o,streamingThoughtId:Q},e.key)),answer:ee||a?m("div",{className:"flex min-w-0 flex-col gap-3",children:[(a||T)&&B.map((e)=>s(N,{sessionId:i,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),se.map((e)=>{if(e.kind==="work")return s(N,{sessionId:i,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:Q},e.entry.key);let r=e.item;return m(ge,{children:[k(r._meta).length>0?s(Pn,{sessionId:i,item:r}):s(be,{content:r.content,messageId:r.id,streaming:o}),r===n.final.at(-1)&&H]},r.id)}),D.map((e)=>m("div",{className:"codex-image-generation",role:"status","aria-label":d(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[s("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),m("span",{className:"codex-image-generation-status",children:[o&&s(de,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),d(o?"timeline.imageGenerating":"timeline.imageStopped")]})]},e.id)),b.length>0&&s("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:b.map((e)=>s(be,{content:[e.block],messageId:e.key,streaming:!1},e.key))}),n.final.length===0&&H]}):null,footer:m(E,{children:[V&&n.work.length>0&&s("div",{className:"codex-pending-message py-2",role:"status",children:s("span",{className:"codex-activity-running",children:d("message.thinking")})}),Z,f.length>0&&!o&&!a&&s(ui,{items:f}),F&&!O&&s("div",{className:"codex-interrupted-turn",role:"status",children:d("timeline.interrupted")}),!o&&h]})}),o&&u!==void 0&&s("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:u.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(u.message)?.[1];return e===void 0?d("timeline.capacityReconnecting"):d("timeline.capacityReconnectingProgress",{progress:e})})():u.message}),o&&h]})}var ci=ue(he);
3
- export{ci};
@@ -1,2 +0,0 @@
1
- import{Ce}from"./chunk-mv51zgj1.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function Yt({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Ce,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function g(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
2
- export{Yt,e,g};
@@ -1,2 +0,0 @@
1
- var a=new Map,i=new Map,f=new Map;function Lo(t,r){if(i.has(t))throw Error("An attachment writer is already registered for this session");return i.set(t,r),()=>{if(i.get(t)===r)i.delete(t)}}function O(t,r){let n=a.get(t);if(!n)return;let e=r(n.attachments);a.set(t,{...n,attachments:e}),i.get(t)?.(e)}function Bt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function wr(t){for(;;){let e=a.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=a.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function kr(t,r){if(r===null)a.delete(t);else a.set(t,r)}var s=new Map;function Gt(t,r){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,r),()=>{if(s.get(t)===r)s.delete(t)}}function Sr(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=s.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=a.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),a.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
2
- export{a,Lo,O,Bt,wr,kr,Gt,Sr};