@alwith/module-chat 0.6.35 → 0.6.36

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 (395) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/agent/client.js +1 -1
  3. package/dist/agent/fork-title.js +1 -1
  4. package/dist/agent/image-request.js +1 -1
  5. package/dist/agent/image-tools.js +1 -1
  6. package/dist/agent/input-config.js +1 -1
  7. package/dist/agent/input-modes/chat.js +1 -1
  8. package/dist/agent/input-modes/execution-meta.js +1 -1
  9. package/dist/agent/input-modes/image.js +1 -1
  10. package/dist/agent/input-modes/index.js +1 -1
  11. package/dist/agent/project-path.js +1 -1
  12. package/dist/agent/request-error.js +1 -1
  13. package/dist/agent/session-list-refresh.js +1 -1
  14. package/dist/app-reference.js +1 -1
  15. package/dist/application-tools.js +1 -1
  16. package/dist/approval/choice-elicitation-form.js +1 -1
  17. package/dist/approval/choice-schema.js +1 -1
  18. package/dist/approval/permission-options.js +1 -1
  19. package/dist/approval/permission-view.js +1 -1
  20. package/dist/approval/schema-elicitation-form.js +1 -1
  21. package/dist/approval/url-elicitation-card.js +1 -1
  22. package/dist/{chunk-rntrfb49.js → chunk-05n5eyp9.js} +2 -2
  23. package/dist/{chunk-th5vv83g.js → chunk-0ck2zpaa.js} +2 -2
  24. package/dist/{chunk-eevfr0tx.js → chunk-0kpapqak.js} +2 -2
  25. package/dist/{chunk-enkrqfqq.js → chunk-0qrd3jvc.js} +1 -1
  26. package/dist/{chunk-3sq2k9ca.js → chunk-0xgnhbn4.js} +2 -2
  27. package/dist/{chunk-95f0wens.js → chunk-13jj645z.js} +1 -1
  28. package/dist/{chunk-zjzzqtaj.js → chunk-13sxt6bc.js} +2 -2
  29. package/dist/{chunk-whax282d.js → chunk-1byvdggd.js} +2 -2
  30. package/dist/{chunk-epqqzh99.js → chunk-1dtg361q.js} +2 -2
  31. package/dist/chunk-1rfxfqek.js +2 -0
  32. package/dist/{chunk-qvzxzzw8.js → chunk-21mp4gww.js} +2 -2
  33. package/dist/{chunk-gy446wcz.js → chunk-22teksk6.js} +2 -2
  34. package/dist/{chunk-b8tx1n1a.js → chunk-268b0xhk.js} +1 -1
  35. package/dist/{chunk-2nv5ebq1.js → chunk-27s3z9q6.js} +2 -2
  36. package/dist/{chunk-rms7wj04.js → chunk-2bsxqh9p.js} +2 -2
  37. package/dist/{chunk-8be6eq9r.js → chunk-2kb4rtw7.js} +2 -2
  38. package/dist/{chunk-hfjttc7r.js → chunk-2segzfjp.js} +2 -2
  39. package/dist/{chunk-vyvsm4v9.js → chunk-3q3n1n1m.js} +2 -2
  40. package/dist/{chunk-pnx0f495.js → chunk-41yp708e.js} +2 -2
  41. package/dist/{chunk-8pb726d6.js → chunk-467091s6.js} +2 -2
  42. package/dist/{chunk-prr551k0.js → chunk-4ezsy9sc.js} +1 -1
  43. package/dist/{chunk-bt42z99s.js → chunk-4t2a903d.js} +2 -2
  44. package/dist/{chunk-7tgfj1zb.js → chunk-514abcnn.js} +2 -2
  45. package/dist/{chunk-wrxj79ct.js → chunk-5axg9jdz.js} +2 -2
  46. package/dist/{chunk-pvm6d77q.js → chunk-5k46n3e8.js} +2 -2
  47. package/dist/{chunk-7naym98x.js → chunk-5t2e22f6.js} +2 -2
  48. package/dist/{chunk-rb6mjycp.js → chunk-61bnywk9.js} +2 -2
  49. package/dist/chunk-62qf6t7x.js +2 -0
  50. package/dist/{chunk-0xztk729.js → chunk-68w4f5q0.js} +2 -2
  51. package/dist/{chunk-d0zazfrq.js → chunk-6e952n0r.js} +2 -2
  52. package/dist/{chunk-hwhyyaen.js → chunk-6kvrdgjn.js} +2 -2
  53. package/dist/{chunk-z53fd30n.js → chunk-6m7bnj0g.js} +2 -2
  54. package/dist/{chunk-eyw05qyj.js → chunk-6ve41ce0.js} +3 -3
  55. package/dist/chunk-6w7js8qd.js +2 -0
  56. package/dist/{chunk-qbpy0aqe.js → chunk-6wstx1k6.js} +2 -2
  57. package/dist/{chunk-r2b234a7.js → chunk-7a3q5976.js} +2 -2
  58. package/dist/{chunk-mgwkmr8g.js → chunk-7ecymeg2.js} +1 -1
  59. package/dist/{chunk-9nz4c647.js → chunk-7nfbzajq.js} +2 -2
  60. package/dist/{chunk-b0zzq2ky.js → chunk-7pfkx9a2.js} +2 -2
  61. package/dist/{chunk-8x7a5n2w.js → chunk-7rdf7eeh.js} +2 -2
  62. package/dist/{chunk-k1w3acq7.js → chunk-7vhhtb2a.js} +2 -2
  63. package/dist/{chunk-p2bn8ypc.js → chunk-80nnn15f.js} +1 -1
  64. package/dist/{chunk-sfd0pp49.js → chunk-81ka3rnv.js} +3 -3
  65. package/dist/{chunk-3t3n8nfy.js → chunk-82apcrn6.js} +2 -2
  66. package/dist/{chunk-ccner90h.js → chunk-82ytwr57.js} +2 -2
  67. package/dist/{chunk-d84xx4bh.js → chunk-85yqchzc.js} +2 -2
  68. package/dist/chunk-89jwjv3m.js +2 -0
  69. package/dist/{chunk-qgrd5xre.js → chunk-8e9h60we.js} +2 -2
  70. package/dist/{chunk-fvmnj6bg.js → chunk-8fzg0pmc.js} +2 -2
  71. package/dist/{chunk-fzfwftqs.js → chunk-8ncatcr7.js} +2 -2
  72. package/dist/{chunk-xjf2zkrg.js → chunk-8p2b77ta.js} +2 -2
  73. package/dist/{chunk-e99t3sk5.js → chunk-94fwccyb.js} +2 -2
  74. package/dist/{chunk-ymdhz3x0.js → chunk-986yknqs.js} +2 -2
  75. package/dist/chunk-98k8jwbn.js +2 -0
  76. package/dist/{chunk-ztrkk6sp.js → chunk-9v4r1cr6.js} +2 -2
  77. package/dist/{chunk-y72y3j24.js → chunk-a779rnge.js} +2 -2
  78. package/dist/{chunk-vq060dnz.js → chunk-a9mbtd12.js} +2 -2
  79. package/dist/{chunk-ytkcpeq2.js → chunk-abt670s7.js} +1 -1
  80. package/dist/{chunk-s170cg6j.js → chunk-b1yfr8gv.js} +2 -2
  81. package/dist/{chunk-aj0z9a5r.js → chunk-bb2s9nb6.js} +2 -2
  82. package/dist/{chunk-q2ykvjrz.js → chunk-beraaxpx.js} +2 -2
  83. package/dist/{chunk-j1t1fnew.js → chunk-bz890a7b.js} +2 -2
  84. package/dist/{chunk-ck70ewc8.js → chunk-ca7kgbwx.js} +1 -1
  85. package/dist/{chunk-npt6at4f.js → chunk-ckgww50b.js} +2 -2
  86. package/dist/{chunk-cgpnhrm5.js → chunk-cn9hc5xr.js} +3 -3
  87. package/dist/{chunk-ha1s3jbc.js → chunk-d564jqyw.js} +3 -3
  88. package/dist/{chunk-epqyjwrh.js → chunk-dhj0vkek.js} +2 -2
  89. package/dist/{chunk-d607659a.js → chunk-dqyfe90s.js} +2 -2
  90. package/dist/{chunk-mkawbqx5.js → chunk-dvaxrrss.js} +2 -2
  91. package/dist/{chunk-qkddvxjr.js → chunk-dxjwdfra.js} +1 -1
  92. package/dist/{chunk-qvdfrmpb.js → chunk-epqzypsa.js} +2 -2
  93. package/dist/{chunk-54jfqcd1.js → chunk-etnfpzpv.js} +2 -2
  94. package/dist/{chunk-fqchnswc.js → chunk-f4dz7xen.js} +1 -1
  95. package/dist/{chunk-23kvszfc.js → chunk-f6wp23k0.js} +1 -1
  96. package/dist/{chunk-dhx1sd4s.js → chunk-f6y0xqz9.js} +2 -2
  97. package/dist/{chunk-6xap6hvz.js → chunk-fe83mqnb.js} +2 -2
  98. package/dist/{chunk-veef1avy.js → chunk-fg7za6sb.js} +2 -2
  99. package/dist/{chunk-ged1nyhk.js → chunk-fkzvbhfw.js} +3 -3
  100. package/dist/{chunk-nfnejf16.js → chunk-fm35s6dq.js} +2 -2
  101. package/dist/{chunk-9ghxym50.js → chunk-ft9b1d3f.js} +1 -1
  102. package/dist/chunk-fwejeh0a.js +2 -0
  103. package/dist/{chunk-njw6x85v.js → chunk-g2pjvjym.js} +2 -2
  104. package/dist/{chunk-jtws1jg5.js → chunk-g31pwmy2.js} +2 -2
  105. package/dist/{chunk-1vwece23.js → chunk-g551brtp.js} +3 -3
  106. package/dist/{chunk-s1w3j9p9.js → chunk-gq2gckvv.js} +2 -2
  107. package/dist/chunk-gxn9pp4b.js +2 -0
  108. package/dist/{chunk-ppcwcrdz.js → chunk-gxvkgcs0.js} +2 -2
  109. package/dist/{chunk-y8aeahf2.js → chunk-h12xxave.js} +2 -2
  110. package/dist/{chunk-pxbww0j1.js → chunk-hd5zm7tc.js} +2 -2
  111. package/dist/chunk-hdksy68d.js +2 -0
  112. package/dist/{chunk-q8c4k6qh.js → chunk-hqfmwbq5.js} +2 -2
  113. package/dist/{chunk-9hts7x5n.js → chunk-hwccdg3k.js} +2 -2
  114. package/dist/{chunk-gk7nn747.js → chunk-hxstf6c4.js} +2 -2
  115. package/dist/{chunk-7ywnza68.js → chunk-j14fa32z.js} +2 -2
  116. package/dist/{chunk-aj6yxm6d.js → chunk-jfp8yj9p.js} +2 -2
  117. package/dist/{chunk-0sb0c014.js → chunk-jj0bpzkq.js} +2 -2
  118. package/dist/{chunk-60yk0ye9.js → chunk-jmanx88h.js} +2 -2
  119. package/dist/{chunk-ebkz1sy2.js → chunk-jpzjh400.js} +2 -2
  120. package/dist/{chunk-n4rep234.js → chunk-jra95vzv.js} +2 -2
  121. package/dist/{chunk-6br4568a.js → chunk-jreyzbd6.js} +2 -2
  122. package/dist/{chunk-db8hae9d.js → chunk-jsnt49t5.js} +2 -2
  123. package/dist/chunk-jyrpyjt3.js +2 -0
  124. package/dist/{chunk-jne0bc79.js → chunk-k7dp9ead.js} +2 -2
  125. package/dist/{chunk-sk9rm826.js → chunk-keh9cbwe.js} +1 -1
  126. package/dist/{chunk-b6kn9ack.js → chunk-keyttjc9.js} +2 -2
  127. package/dist/{chunk-ddaz4j9s.js → chunk-kg363yzh.js} +2 -2
  128. package/dist/{chunk-482segb0.js → chunk-kv22b8h2.js} +2 -2
  129. package/dist/chunk-kvmd0mhe.js +2 -0
  130. package/dist/{chunk-22nybrkv.js → chunk-m31z2z11.js} +3 -3
  131. package/dist/{chunk-g9v0jr0f.js → chunk-m9b9dzjh.js} +3 -3
  132. package/dist/{chunk-y5qzgfsd.js → chunk-md3d3pby.js} +2 -2
  133. package/dist/{chunk-hqc5c3nz.js → chunk-mf3dn22w.js} +3 -3
  134. package/dist/chunk-mnktrf2v.js +2 -0
  135. package/dist/{chunk-5mxh7h57.js → chunk-mphkyhy8.js} +2 -2
  136. package/dist/{chunk-2nq204hz.js → chunk-mqdbs8jj.js} +2 -2
  137. package/dist/{chunk-jz7mckdp.js → chunk-mywbsrxq.js} +2 -2
  138. package/dist/{chunk-kgx0jj22.js → chunk-n4rapj4e.js} +3 -3
  139. package/dist/{chunk-bdea3k6b.js → chunk-nd0d4qr4.js} +2 -2
  140. package/dist/{chunk-w2p1g8rp.js → chunk-njrvhvy4.js} +2 -2
  141. package/dist/{chunk-nebke41s.js → chunk-nrt1zx5c.js} +2 -2
  142. package/dist/{chunk-5zf3px9y.js → chunk-nxfwgbny.js} +2 -2
  143. package/dist/{chunk-dzncwejn.js → chunk-nypm3ef8.js} +2 -2
  144. package/dist/{chunk-gmns080g.js → chunk-q54ca1am.js} +2 -2
  145. package/dist/{chunk-1b3frq9c.js → chunk-q8mw16nx.js} +3 -3
  146. package/dist/chunk-qa29z7wk.js +4 -0
  147. package/dist/{chunk-k0h18sme.js → chunk-qp4b32gm.js} +2 -2
  148. package/dist/{chunk-symaxskd.js → chunk-qt4gdwcw.js} +2 -2
  149. package/dist/{chunk-3kytka7m.js → chunk-r14byyqy.js} +3 -3
  150. package/dist/{chunk-5qaa4atv.js → chunk-r7tpt9zy.js} +2 -2
  151. package/dist/{chunk-b3mja7d9.js → chunk-rcj2df96.js} +2 -2
  152. package/dist/{chunk-8eyw37rv.js → chunk-re9ryzrv.js} +2 -2
  153. package/dist/{chunk-ygake3bx.js → chunk-rf8agwdk.js} +2 -2
  154. package/dist/{chunk-rcynxrkk.js → chunk-rgsf9xkw.js} +3 -3
  155. package/dist/chunk-rkqptd9w.js +2 -0
  156. package/dist/{chunk-t6ddgvkm.js → chunk-rmdf5jhd.js} +2 -2
  157. package/dist/{chunk-jygp7479.js → chunk-rp7qt6hm.js} +2 -2
  158. package/dist/chunk-rp87rhya.js +4 -0
  159. package/dist/{chunk-w4537026.js → chunk-rq4nw301.js} +1 -1
  160. package/dist/{chunk-7nfv27hz.js → chunk-s15zgqkg.js} +2 -2
  161. package/dist/{chunk-fggwwmzc.js → chunk-s7396jw0.js} +3 -3
  162. package/dist/{chunk-xqrhfxct.js → chunk-s953r0cw.js} +2 -2
  163. package/dist/chunk-sbcgvk9a.js +2 -0
  164. package/dist/{chunk-bm457bsd.js → chunk-sd6sd4r8.js} +2 -2
  165. package/dist/{chunk-6v0r7m92.js → chunk-sjh2sz62.js} +2 -2
  166. package/dist/{chunk-9ns2xh84.js → chunk-ssrhst9t.js} +2 -2
  167. package/dist/{chunk-q8y2a23c.js → chunk-tdmz20zc.js} +2 -2
  168. package/dist/{chunk-wf4z9w5x.js → chunk-tfkz3bae.js} +2 -2
  169. package/dist/{chunk-s11mgwyh.js → chunk-va5f2mdb.js} +2 -2
  170. package/dist/{chunk-ry5phnnk.js → chunk-vc6yxjs3.js} +2 -2
  171. package/dist/{chunk-bysgsnph.js → chunk-vn7159fh.js} +2 -2
  172. package/dist/{chunk-gw4zbw0m.js → chunk-w1ndngnh.js} +2 -2
  173. package/dist/{chunk-mg9a4t04.js → chunk-w86ckd6d.js} +2 -2
  174. package/dist/{chunk-shzj5zf0.js → chunk-w9z2zezn.js} +2 -2
  175. package/dist/{chunk-20dc4fm0.js → chunk-wf5tt5t4.js} +2 -2
  176. package/dist/{chunk-c0czkyzh.js → chunk-wrqmbvv2.js} +2 -2
  177. package/dist/{chunk-6ea6q6dj.js → chunk-wv501ppg.js} +1 -1
  178. package/dist/{chunk-mgve4dcw.js → chunk-ww4tmz88.js} +2 -2
  179. package/dist/{chunk-h71pkpwg.js → chunk-wy7rkpqe.js} +2 -2
  180. package/dist/{chunk-1a46v4cy.js → chunk-x0m0ebq0.js} +1 -1
  181. package/dist/{chunk-4g2412p5.js → chunk-x2xwfwcx.js} +2 -2
  182. package/dist/{chunk-aq3hemsb.js → chunk-x8j184pq.js} +3 -3
  183. package/dist/chunk-xb28q0sm.js +2 -0
  184. package/dist/{chunk-a4ebhcsy.js → chunk-xkv1qwkh.js} +2 -2
  185. package/dist/{chunk-qbmgsd3h.js → chunk-xvf85xre.js} +2 -2
  186. package/dist/chunk-xxaj040w.js +2 -0
  187. package/dist/{chunk-rxj5619b.js → chunk-y6ac70r7.js} +2 -2
  188. package/dist/{chunk-xanfp0nh.js → chunk-y6b3mjjn.js} +1 -1
  189. package/dist/{chunk-9hwqfjc1.js → chunk-ya8e4rt0.js} +2 -2
  190. package/dist/{chunk-aeccrrg1.js → chunk-yde0ncgz.js} +1 -1
  191. package/dist/{chunk-nvadhyne.js → chunk-yekcndnq.js} +2 -2
  192. package/dist/{chunk-8yetzgqb.js → chunk-yn6pz38m.js} +2 -2
  193. package/dist/{chunk-vjfxm73q.js → chunk-yqzpxk5y.js} +2 -2
  194. package/dist/{chunk-aemtk0r5.js → chunk-z26j4tt7.js} +2 -2
  195. package/dist/{chunk-359pf448.js → chunk-z29anjt1.js} +2 -2
  196. package/dist/{chunk-rbs3079t.js → chunk-z6swkqb1.js} +2 -2
  197. package/dist/{chunk-wf0ytnh9.js → chunk-zetd8vk4.js} +1 -1
  198. package/dist/{chunk-k5065dzv.js → chunk-zsd44z1c.js} +2 -2
  199. package/dist/{chunk-z27pxeqg.js → chunk-zssbsc1f.js} +2 -2
  200. package/dist/{chunk-18gcnf2a.js → chunk-zxa4jnpe.js} +2 -2
  201. package/dist/{chunk-tj4b0s68.js → chunk-zz582m73.js} +2 -2
  202. package/dist/client.js +1 -1
  203. package/dist/codex/activity-group.js +1 -1
  204. package/dist/codex/artifact-links.js +1 -1
  205. package/dist/codex/assistant-message.js +1 -1
  206. package/dist/codex/async-question-card.js +1 -1
  207. package/dist/codex/edited-files-card.js +1 -1
  208. package/dist/codex/image-view-activity.js +1 -1
  209. package/dist/codex/markdown-renderer.js +1 -1
  210. package/dist/codex/navigation-audio.js +1 -1
  211. package/dist/codex/navigation-preview.js +1 -1
  212. package/dist/codex/navigation-rail.js +1 -1
  213. package/dist/codex/patch-view.js +1 -1
  214. package/dist/codex/timeline-virtualizer.js +1 -1
  215. package/dist/codex/turn-activity.js +1 -1
  216. package/dist/codex/user-message.js +1 -1
  217. package/dist/codex/virtualized-turn-list.js +1 -1
  218. package/dist/collections/collection-emoji.js +1 -1
  219. package/dist/collections/collection-menu.js +1 -1
  220. package/dist/collections/collection-panel.js +1 -1
  221. package/dist/collections/collections.js +1 -1
  222. package/dist/collections/host.js +1 -1
  223. package/dist/collections/model.js +1 -1
  224. package/dist/collections/store.js +1 -1
  225. package/dist/composer/completion-filter.js +1 -1
  226. package/dist/composer/completion-menu.js +1 -1
  227. package/dist/composer/completion-trigger.js +1 -1
  228. package/dist/composer/effort-slider.js +1 -1
  229. package/dist/composer/inline-document.js +1 -1
  230. package/dist/composer/inline-dom.js +1 -1
  231. package/dist/composer/model-select.js +1 -1
  232. package/dist/composer/permission-mode-select.js +1 -1
  233. package/dist/composer/prompt-input-attachments.js +1 -1
  234. package/dist/composer/prompt-input-clipboard.js +1 -1
  235. package/dist/composer/prompt-input-context.js +1 -1
  236. package/dist/composer/prompt-input-inline.js +1 -1
  237. package/dist/composer/prompt-input-textarea.js +1 -1
  238. package/dist/composer/prompt-input.js +1 -1
  239. package/dist/conversation/action-card.js +1 -1
  240. package/dist/conversation/composer/app-mentions.js +1 -1
  241. package/dist/conversation/composer/apps-menu.js +1 -1
  242. package/dist/conversation/composer/composer-menu.js +1 -1
  243. package/dist/conversation/composer/composer.js +1 -1
  244. package/dist/conversation/composer/config-options.js +1 -1
  245. package/dist/conversation/composer/context.js +1 -1
  246. package/dist/conversation/composer/drafts.js +1 -1
  247. package/dist/conversation/composer/long-text.js +1 -1
  248. package/dist/conversation/composer/mention-chips.js +1 -1
  249. package/dist/conversation/composer/mention-uri.js +1 -1
  250. package/dist/conversation/composer/model-menu.js +1 -1
  251. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  252. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  253. package/dist/conversation/composer/prompt-history.js +1 -1
  254. package/dist/conversation/composer/slash-command-button.js +1 -1
  255. package/dist/conversation/composer/submit-button.js +1 -1
  256. package/dist/conversation/composer/usage-meter.js +1 -1
  257. package/dist/conversation/connection-notice.js +1 -1
  258. package/dist/conversation/context.js +1 -1
  259. package/dist/conversation/conversation-body.js +1 -1
  260. package/dist/conversation/conversation-search.js +1 -1
  261. package/dist/conversation/conversation-view.js +1 -1
  262. package/dist/conversation/conversation.js +1 -1
  263. package/dist/conversation/diff-modal.js +1 -1
  264. package/dist/conversation/draft-project-picker.js +1 -1
  265. package/dist/conversation/session-actions.js +1 -1
  266. package/dist/conversation/subagent-sessions.js +1 -1
  267. package/dist/conversation/subagent-tasks.js +1 -1
  268. package/dist/desktop/desktop-composer.d.ts +2 -1
  269. package/dist/desktop/desktop-composer.js +1 -1
  270. package/dist/desktop/desktop.js +1 -1
  271. package/dist/desktop/draft-model-select.js +1 -1
  272. package/dist/desktop/load-image.js +1 -1
  273. package/dist/desktop/model-catalog.js +1 -1
  274. package/dist/desktop/model-recovery.js +1 -1
  275. package/dist/desktop/model-settings-action.js +1 -1
  276. package/dist/desktop/native-file-drop.d.ts +2 -1
  277. package/dist/desktop/native-file-drop.js +1 -1
  278. package/dist/generated/commands.d.ts +3 -0
  279. package/dist/generated/commands.js +1 -1
  280. package/dist/generated-image-storage.js +1 -1
  281. package/dist/image-lightbox.js +1 -1
  282. package/dist/image-preview-dialog.js +1 -1
  283. package/dist/image.js +1 -1
  284. package/dist/lib/app-reference.js +1 -1
  285. package/dist/lib/application-metadata.js +1 -1
  286. package/dist/lib/chat-path.js +1 -1
  287. package/dist/lib/code-highlighter.js +1 -1
  288. package/dist/lib/file-url.js +1 -1
  289. package/dist/lib/fuzzy.js +1 -1
  290. package/dist/lib/group-blocks.js +1 -1
  291. package/dist/lib/image-encode.js +1 -1
  292. package/dist/lib/markdown-parser.js +1 -1
  293. package/dist/lib/markdown-rules.js +1 -1
  294. package/dist/lib/model-name.js +1 -1
  295. package/dist/lib/prepare-prompt-files.js +1 -1
  296. package/dist/lib/reference-presentation.js +1 -1
  297. package/dist/lib/stream-style.js +1 -1
  298. package/dist/lib/streaming-markdown.js +1 -1
  299. package/dist/mermaid/diagram.js +1 -1
  300. package/dist/mermaid/export.js +1 -1
  301. package/dist/mermaid/index.js +1 -1
  302. package/dist/mermaid/preview.js +1 -1
  303. package/dist/oauth/claude-login.js +1 -1
  304. package/dist/oauth.js +1 -1
  305. package/dist/plugins/catalog-skeleton.js +1 -1
  306. package/dist/plugins/host.js +1 -1
  307. package/dist/plugins/plugin-detail-page.js +1 -1
  308. package/dist/plugins/plugin-icon.js +1 -1
  309. package/dist/plugins/plugin-icons.js +1 -1
  310. package/dist/plugins/plugins-page.js +1 -1
  311. package/dist/plugins/plugins.js +1 -1
  312. package/dist/plugins/read-skill-document.js +1 -1
  313. package/dist/plugins/skill-document.js +1 -1
  314. package/dist/plugins/skills-tab.js +1 -1
  315. package/dist/plugins/store.js +1 -1
  316. package/dist/reference-projection.js +1 -1
  317. package/dist/search/chat-search.js +1 -1
  318. package/dist/search/codex-source-matches.js +1 -1
  319. package/dist/search/dom-matches.js +1 -1
  320. package/dist/search/find-bar.js +1 -1
  321. package/dist/search/literal-matches.js +1 -1
  322. package/dist/session-list/account-menu.js +1 -1
  323. package/dist/session-list/activity-list.js +1 -1
  324. package/dist/session-list/archived-sessions.js +1 -1
  325. package/dist/session-list/help-menu.js +1 -1
  326. package/dist/session-list/host.js +1 -1
  327. package/dist/session-list/navigation-controls.js +1 -1
  328. package/dist/session-list/navigation-header.js +1 -1
  329. package/dist/session-list/navigation-store.js +1 -1
  330. package/dist/session-list/navigation-tabs.js +1 -1
  331. package/dist/session-list/navigation.js +1 -1
  332. package/dist/session-list/platform.js +1 -1
  333. package/dist/session-list/session-groups.js +1 -1
  334. package/dist/session-list/session-info-card.js +1 -1
  335. package/dist/session-list/session-list.js +1 -1
  336. package/dist/session-list/session-row.js +1 -1
  337. package/dist/session-list/session-state-dot.js +1 -1
  338. package/dist/session-list/session-state-menu.js +1 -1
  339. package/dist/session-list/shortcut-hint.js +1 -1
  340. package/dist/session-list/shortcut.js +1 -1
  341. package/dist/session-list/sidebar-overlay.js +1 -1
  342. package/dist/session-list/use-activity-notification.js +1 -1
  343. package/dist/session-list/use-activity-preview.js +1 -1
  344. package/dist/session-list/use-cmd-held.js +1 -1
  345. package/dist/session-list/use-project-sessions.js +1 -1
  346. package/dist/session-list/virtual-session-rows.js +1 -1
  347. package/dist/session-timeline/activity-group.js +1 -1
  348. package/dist/session-timeline/activity-projection.js +1 -1
  349. package/dist/session-timeline/assistant-content.js +1 -1
  350. package/dist/session-timeline/assistant-image-references.js +1 -1
  351. package/dist/session-timeline/assistant-turn.js +1 -1
  352. package/dist/session-timeline/async-questions.js +1 -1
  353. package/dist/session-timeline/edited-files-card.js +1 -1
  354. package/dist/session-timeline/history-timeline.js +1 -1
  355. package/dist/session-timeline/host.js +1 -1
  356. package/dist/session-timeline/image-generation-progress.js +1 -1
  357. package/dist/session-timeline/navigation-rail.js +1 -1
  358. package/dist/session-timeline/plan.js +1 -1
  359. package/dist/session-timeline/question-reply.js +1 -1
  360. package/dist/session-timeline/resource-content.js +1 -1
  361. package/dist/session-timeline/session-timeline.js +1 -1
  362. package/dist/session-timeline/timeline-registry.js +1 -1
  363. package/dist/session-timeline/turn-activity.js +1 -1
  364. package/dist/session-timeline/turn-error.js +1 -1
  365. package/dist/session-timeline/turn-retry.js +1 -1
  366. package/dist/session-timeline/turns.js +1 -1
  367. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  368. package/dist/session-timeline/user-message.js +1 -1
  369. package/dist/settings/codex-account-card.js +1 -1
  370. package/dist/settings/login-card.js +1 -1
  371. package/dist/settings/model-alias-settings.js +1 -1
  372. package/dist/settings/provider-logos.js +1 -1
  373. package/dist/settings/provider-section.js +1 -1
  374. package/dist/settings/providers-port.js +1 -1
  375. package/dist/settings/providers.js +1 -1
  376. package/dist/settings/settings-bridge.js +1 -1
  377. package/dist/settings/settings.js +1 -1
  378. package/package.json +2 -2
  379. package/dist/chunk-33fxyn5r.js +0 -2
  380. package/dist/chunk-63kwbtgs.js +0 -2
  381. package/dist/chunk-by7k0ypx.js +0 -4
  382. package/dist/chunk-c70a2esc.js +0 -2
  383. package/dist/chunk-fxzh4f7c.js +0 -4
  384. package/dist/chunk-j2bp0zbe.js +0 -2
  385. package/dist/chunk-k97dpdcj.js +0 -2
  386. package/dist/chunk-khd2r3jh.js +0 -2
  387. package/dist/chunk-kvgn4b2n.js +0 -2
  388. package/dist/chunk-mybye5t2.js +0 -2
  389. package/dist/chunk-nrfyvzmk.js +0 -2
  390. package/dist/chunk-pz5d0vgv.js +0 -2
  391. package/dist/chunk-qv61ef2y.js +0 -2
  392. package/dist/chunk-svxnx1c7.js +0 -2
  393. package/dist/chunk-t3rv7vat.js +0 -2
  394. package/dist/chunk-wexhc7rb.js +0 -2
  395. package/dist/chunk-zpm0t5ye.js +0 -2
@@ -1,2 +1,2 @@
1
- function _s(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function Is(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
2
- export{_s,Is};
1
+ function Is(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function Ps(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
2
+ export{Is,Ps};
@@ -1,2 +1,2 @@
1
- import{c}from"./chunk-gk7nn747.js";import{Jr}from"./chunk-b0zzq2ky.js";import{de}from"./chunk-aj0z9a5r.js";import{I}from"./chunk-ckft9abb.js";import{isContentEntry as N,isImage as w,isResourceLink as C}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as S,ImageIcon as A,LoaderCircleIcon as R,RefreshCwIcon as T}from"lucide-react";import{useEffect as B,useState as v}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";function ct(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function E(e){let s=[];for(let[n,l]of e.content.entries()){if(!N(l))continue;let i=l.content;if(w(i))s.push({key:`${e.id}:${n}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(C(i))s.push({key:`${e.id}:${n}`,path:i.uri,alt:i.name})}if(s.length)return s;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function U({images:e}){let{loadImage:s,openImageGallery:a,openImage:n,t:l}=c(),i=de(),[g,y]=v({}),[x,k]=v(0),h=JSON.stringify(e);B(()=>{let t=!0,m=JSON.parse(h);y({});for(let o of m)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&s?s(Jr(o.path,i)):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)y((p)=>({...p,[o.key]:{src:u}}))},()=>{if(t)y((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[h,s,i,x]);let b=e.flatMap((t)=>{let m=g[t.key];return m&&"src"in m?[{src:m.src,alt:t.alt}]:[]});return r("div",{className:"codex-image-thumbnails",children:e.map((t,m)=>{let o=g[t.key];if(!o)return r("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:r(R,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>k((d)=>d+1),children:r(T,{"aria-hidden":"true"})},t.key);return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let d=e.slice(0,m).filter((u)=>{let p=g[u.key];return p&&"src"in p}).length;if(a)a(b,d);else n?.(o.src)},children:r("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function Zr({blocks:e}){let{t:s}=c(),a=e.flatMap(E),[n,l]=I(`image-view:${e[0].id}`,!1);return f("div",{className:"codex-activity-item",children:[f("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":n,onClick:()=>l((i)=>!i),children:[f("span",{className:"codex-activity-label",children:[r(A,{className:"codex-activity-icon","aria-hidden":"true"}),r("span",{className:"codex-activity-leading",children:s("stream.codex.viewedImages",{count:a.length})})]}),r(S,{className:n?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),n&&r(U,{images:a})]})}
2
- export{ct,Zr};
1
+ import{c}from"./chunk-hxstf6c4.js";import{Xr}from"./chunk-7pfkx9a2.js";import{de}from"./chunk-bb2s9nb6.js";import{I}from"./chunk-ckft9abb.js";import{isContentEntry as N,isImage as w,isResourceLink as C}from"@nyssance/codex-acp-v2/client";import{ChevronRightIcon as S,ImageIcon as A,LoaderCircleIcon as R,RefreshCwIcon as T}from"lucide-react";import{useEffect as B,useState as v}from"react";import{jsx as r,jsxs as f}from"react/jsx-runtime";function ct(e){return e.type==="tool_use"&&e.name==="view_image"&&e.status==="completed"}function E(e){let s=[];for(let[n,l]of e.content.entries()){if(!N(l))continue;let i=l.content;if(w(i))s.push({key:`${e.id}:${n}`,src:`data:${i.mimeType};base64,${i.data}`,alt:e.title??""});if(C(i))s.push({key:`${e.id}:${n}`,path:i.uri,alt:i.name})}if(s.length)return s;let a=e.rawInput;if(a!==null&&typeof a==="object"&&"path"in a&&typeof a.path==="string")return[{key:e.id,path:a.path,alt:a.path.split(/[\\/]/).at(-1)??a.path}];throw Error(`Image view ${e.id} has no image source`)}function U({images:e}){let{loadImage:s,openImageGallery:a,openImage:n,t:l}=c(),i=de(),[g,y]=v({}),[x,k]=v(0),h=JSON.stringify(e);B(()=>{let t=!0,m=JSON.parse(h);y({});for(let o of m)(o.src!==void 0?Promise.resolve(o.src):o.path!==void 0&&s?s(Xr(o.path,i)):Promise.reject(Error("Image loading is unavailable"))).then((u)=>{if(t)y((p)=>({...p,[o.key]:{src:u}}))},()=>{if(t)y((u)=>({...u,[o.key]:{error:!0}}))});return()=>{t=!1}},[h,s,i,x]);let b=e.flatMap((t)=>{let m=g[t.key];return m&&"src"in m?[{src:m.src,alt:t.alt}]:[]});return r("div",{className:"codex-image-thumbnails",children:e.map((t,m)=>{let o=g[t.key];if(!o)return r("div",{className:"codex-image-thumbnail",role:"status","aria-label":l("stream.codex.imageLoading"),children:r(R,{className:"motion-safe:animate-spin","aria-hidden":"true"})},t.key);if("error"in o)return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,"aria-label":l("stream.codex.imageFailed"),onClick:()=>k((d)=>d+1),children:r(T,{"aria-hidden":"true"})},t.key);return r("button",{type:"button",className:"codex-image-thumbnail",title:t.alt,onClick:()=>{let d=e.slice(0,m).filter((u)=>{let p=g[u.key];return p&&"src"in p}).length;if(a)a(b,d);else n?.(o.src)},children:r("img",{src:o.src,alt:t.alt,draggable:!1})},t.key)})})}function Qr({blocks:e}){let{t:s}=c(),a=e.flatMap(E),[n,l]=I(`image-view:${e[0].id}`,!1);return f("div",{className:"codex-activity-item",children:[f("button",{type:"button",className:"codex-activity-header","data-codex-disclosure":"","aria-expanded":n,onClick:()=>l((i)=>!i),children:[f("span",{className:"codex-activity-label",children:[r(A,{className:"codex-activity-icon","aria-hidden":"true"}),r("span",{className:"codex-activity-leading",children:s("stream.codex.viewedImages",{count:a.length})})]}),r(S,{className:n?"codex-image-chevron codex-image-chevron-open":"codex-image-chevron","aria-hidden":"true"})]}),n&&r(U,{images:a})]})}
2
+ export{ct,Qr};
@@ -1,2 +1,2 @@
1
- import{Et,oe}from"./chunk-vnxa4qe2.js";import{ur}from"./chunk-ztrkk6sp.js";import{Po,To,Ft,Ot,Mo}from"./chunk-q8c4k6qh.js";import{cn as P}from"cn";import{ArrowUpIcon as ve,Loader2Icon as Ie,SquareIcon as xe,XIcon as he}from"lucide-react";import{Children as Z,useCallback as h,useEffect as T,useMemo as Pe,useRef as S,useState as Le}from"react";import{flushSync as ye}from"react-dom";import{InputGroup as Fe,InputGroupAddon as te,InputGroupButton as re}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as a,jsxs as Te}from"react/jsx-runtime";function ee(l){let i=new FormData(l).get("message");return typeof i==="string"?i:""}var rr=({className:l,bashMode:i=!1,attachmentPolicy:n,onCommand:f,onSubmitError:L,canSubmit:g,onSubmitAsync:b,accept:M,multiple:ne,globalDrop:E,syncHiddenInput:U,maxFiles:_,maxFileSize:H,onError:v,onSubmit:se,children:ie,...ue})=>{let u=Ot(),p=!!u,ae=i&&p&&u.textInput.value.startsWith("!"),y=S(null),C=S(null),k=S(!1),[le,D]=Le([]),d=p?u.attachments.files:le,B=S(d);B.current=d;let pe=h(()=>{y.current?.click()},[]),O=h((e)=>{if(!M||M.trim()==="")return!0;return M.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let o=t.slice(0,-1);return e.type.startsWith(o)}return e.type===t})},[M]),W=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),me=h((e)=>{let r=[...e],t=r.filter((s)=>O(s));if(r.length&&t.length===0){v?.({code:"accept",message:"No files match the accepted types."});return}let o=(s)=>H?s.size<=H:!0,c=t.filter(o);if(t.length>0&&c.length===0){v?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((s)=>{let I=n?n.uniqueFiles(c,s):c,m=typeof _==="number"?Math.max(0,_-s.length):void 0,z=typeof m==="number"?I.slice(0,m):I;if(typeof m==="number"&&I.length>m)v?.({code:"max_files",message:"Too many files. Some were not added."});let V=[];for(let x of z){let Y=n?.sourcePath(x),R=n?.isLocalImage?.(x);V.push({id:crypto.randomUUID(),type:"file",url:R&&x.size===0?"":URL.createObjectURL(x),mediaType:W(x),filename:x.name,size:x.size,lastModified:x.lastModified,...Y===void 0?{}:{sourcePath:Y},...R?{localImage:R}:{}})}return[...s,...V]})},[n,W,O,_,H,v]),ce=h((e)=>D((r)=>{let t=r.find((o)=>o.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((o)=>o.id!==e)}),[]),de=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),G=p?u.attachments.add:me,F=h((e)=>{let r=[...e],t=r.filter((c)=>!(c.type??"").toLowerCase().startsWith("image/"));if(t.length>0){v?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let o=r.reduce((c,s)=>c+(n?.useLocalImages&&n.isLocalImage?.(s)?0:s.size),0);if(o>0){let c=d.filter((s)=>(s.mediaType??"").toLowerCase().startsWith("image/")&&!(n?.useLocalImages&&s.localImage)).reduce((s,I)=>s+(I.size??0),0);if(Et(c,o)){v?.({code:"max_total_size",message:`Total image size must not exceed ${oe}MB.`});return}}G(r)},[d,G,v,n]),q=p?u.attachments.remove:ce,N=p?u.attachments.clear:de,X=p?u.attachments.openFileDialog:pe;T(()=>{if(!p)return;u.__registerFileInput(y,n?.openFileDialog??(()=>y.current?.click()))},[p,u,n]),T(()=>{if(U&&y.current&&d.length===0)y.current.value=""},[d,U]),T(()=>{let e=C.current;if(!e)return;if(E)return;let r=(o)=>{if(o.dataTransfer?.types?.includes("Files"))o.preventDefault()},t=(o)=>{if(o.dataTransfer?.types?.includes("Files"))o.preventDefault();if(o.dataTransfer?.files&&o.dataTransfer.files.length>0)if(n?.onSelectFiles)n.onSelectFiles([...o.dataTransfer.files]);else F(o.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[F,E,n]),T(()=>{if(!E)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)if(n?.onSelectFiles)n.onSelectFiles([...t.dataTransfer.files]);else F(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[F,E,n]),T(()=>()=>{if(!p){for(let e of B.current)if(e.url)URL.revokeObjectURL(e.url)}},[p]);let fe=(e)=>{if(e.currentTarget.files)if(n?.onSelectFiles)n.onSelectFiles([...e.currentTarget.files]);else F(e.currentTarget.files);e.currentTarget.value=""},J=Pe(()=>({files:d.map((e)=>({...e,id:e.id})),add:F,remove:q,clear:N,openFileDialog:X,fileInputRef:y}),[d,F,q,N,X]),A=S({controller:u,files:d,canSubmit:g});A.current={controller:u,files:d,canSubmit:g};let w=S(!0);T(()=>(w.current=!0,()=>{w.current=!1}),[]);let K=async(e)=>{let r=g===void 0?!0:g();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&b===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=C.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let o=p?u.textInput.value:ee(t),c=u?.textInput.getRevision?.(),s=d,I=()=>{if(!w.current)return;let m=A.current;if(m.files!==s)return;if(p){if(c===void 0||m.controller===null||m.controller.textInput.getRevision?.()!==c)return;if(m.controller.textInput.clearSubmitted===void 0)m.controller.textInput.clear();else m.controller.textInput.clearSubmitted()}else if(ee(t)===o)t.reset();N()};k.current=!0;try{if(f?.(o.trim()))return I(),{status:"accepted"};let m=await ur(s,n),z=A.current.canSubmit===void 0?!0:A.current.canSubmit();if(z!==!0)return{status:"blocked",reason:z};if(!w.current)return{status:"blocked",reason:"form_unmounted"};if(m.rejectedCount>0)v?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(b!==void 0)await b({text:o,files:m.files});else if(e!==null)await se({text:o,files:m.files},e);return I(),{status:"accepted"}}finally{k.current=!1}},ge=(e)=>{e.preventDefault(),K(e).catch(L)},be=h((e)=>{if(!e.trim())return;if(p&&u)ye(()=>{u.textInput.setInput(e)});C.current?.requestSubmit()},[u,p]),Q=a(To.Provider,{value:()=>K(null),children:Te(Po.Provider,{value:be,children:[a("input",{accept:n?.onSelectFiles?n.accept:M,"aria-label":"Upload files",className:"hidden",multiple:ne,onChange:fe,ref:y,title:"Upload files",type:"file"}),a("form",{className:P("w-full",l),onSubmit:ge,ref:C,"data-tour":"chat-input",...ue,children:a(Fe,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ae&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:ie})})]})});return p?a(Ft.Provider,{value:J,children:Q}):a(Mo.Provider,{value:J,children:Q})};function sr({className:l,...i}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",l),...i})}function ar({className:l,...i}){return a(te,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",l),...i})}function lr({className:l,...i}){return a(te,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",l),...i})}function cr({className:l,...i}){return a("div",{className:P("flex items-center gap-1",l),...i})}var j=({variant:l="ghost",className:i,size:n,collapsed:f=!1,...L})=>{let g=f||Z.count(L.children)<=1?"icon-xs":"xs";return a(re,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(f||Z.count(L.children)<=1)&&"size-7",i),size:g,type:"button",variant:l,...L})},dr=({className:l,variant:i="ghost",size:n="icon-xs",status:f,children:L,...g})=>{let b=a(ve,{className:"size-4"});if(f==="submitted")b=a(Ie,{className:"size-4 animate-spin"});else if(f==="streaming")b=a(xe,{className:"size-3 fill-current"});else if(f==="error")b=a(he,{className:"size-4"});return a(re,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",l),size:n,type:"submit",variant:i,...g,children:L??b})};
2
- export{rr,sr,ar,lr,cr,j,dr};
1
+ import{Et,oe}from"./chunk-vnxa4qe2.js";import{pr}from"./chunk-9v4r1cr6.js";import{To,Mo,Ft,Ot,No}from"./chunk-hqfmwbq5.js";import{cn as P}from"cn";import{ArrowUpIcon as ve,Loader2Icon as Ie,SquareIcon as xe,XIcon as he}from"lucide-react";import{Children as Z,useCallback as h,useEffect as T,useMemo as Pe,useRef as S,useState as Le}from"react";import{flushSync as ye}from"react-dom";import{InputGroup as Fe,InputGroupAddon as te,InputGroupButton as re}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as a,jsxs as Te}from"react/jsx-runtime";function ee(l){let i=new FormData(l).get("message");return typeof i==="string"?i:""}var sr=({className:l,bashMode:i=!1,attachmentPolicy:n,onCommand:f,onSubmitError:L,canSubmit:g,onSubmitAsync:b,accept:M,multiple:ne,globalDrop:E,syncHiddenInput:U,maxFiles:_,maxFileSize:H,onError:v,onSubmit:se,children:ie,...ue})=>{let u=Ot(),p=!!u,ae=i&&p&&u.textInput.value.startsWith("!"),y=S(null),C=S(null),k=S(!1),[le,D]=Le([]),d=p?u.attachments.files:le,B=S(d);B.current=d;let pe=h(()=>{y.current?.click()},[]),O=h((e)=>{if(!M||M.trim()==="")return!0;return M.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let o=t.slice(0,-1);return e.type.startsWith(o)}return e.type===t})},[M]),W=h((e)=>{if(e.type)return e.type;let r=(e.name||"").toLowerCase();if(r.endsWith(".png"))return"image/png";if(r.endsWith(".jpg")||r.endsWith(".jpeg"))return"image/jpeg";if(r.endsWith(".webp"))return"image/webp";if(r.endsWith(".gif"))return"image/gif";if(r.endsWith(".bmp"))return"image/bmp";if(r.endsWith(".svg"))return"image/svg+xml";return""},[]),me=h((e)=>{let r=[...e],t=r.filter((s)=>O(s));if(r.length&&t.length===0){v?.({code:"accept",message:"No files match the accepted types."});return}let o=(s)=>H?s.size<=H:!0,c=t.filter(o);if(t.length>0&&c.length===0){v?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((s)=>{let I=n?n.uniqueFiles(c,s):c,m=typeof _==="number"?Math.max(0,_-s.length):void 0,z=typeof m==="number"?I.slice(0,m):I;if(typeof m==="number"&&I.length>m)v?.({code:"max_files",message:"Too many files. Some were not added."});let V=[];for(let x of z){let Y=n?.sourcePath(x),R=n?.isLocalImage?.(x);V.push({id:crypto.randomUUID(),type:"file",url:R&&x.size===0?"":URL.createObjectURL(x),mediaType:W(x),filename:x.name,size:x.size,lastModified:x.lastModified,...Y===void 0?{}:{sourcePath:Y},...R?{localImage:R}:{}})}return[...s,...V]})},[n,W,O,_,H,v]),ce=h((e)=>D((r)=>{let t=r.find((o)=>o.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((o)=>o.id!==e)}),[]),de=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),G=p?u.attachments.add:me,F=h((e)=>{let r=[...e],t=r.filter((c)=>!(c.type??"").toLowerCase().startsWith("image/"));if(t.length>0){v?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let o=r.reduce((c,s)=>c+(n?.useLocalImages&&n.isLocalImage?.(s)?0:s.size),0);if(o>0){let c=d.filter((s)=>(s.mediaType??"").toLowerCase().startsWith("image/")&&!(n?.useLocalImages&&s.localImage)).reduce((s,I)=>s+(I.size??0),0);if(Et(c,o)){v?.({code:"max_total_size",message:`Total image size must not exceed ${oe}MB.`});return}}G(r)},[d,G,v,n]),q=p?u.attachments.remove:ce,N=p?u.attachments.clear:de,X=p?u.attachments.openFileDialog:pe;T(()=>{if(!p)return;u.__registerFileInput(y,n?.openFileDialog??(()=>y.current?.click()))},[p,u,n]),T(()=>{if(U&&y.current&&d.length===0)y.current.value=""},[d,U]),T(()=>{let e=C.current;if(!e)return;if(E)return;let r=(o)=>{if(o.dataTransfer?.types?.includes("Files"))o.preventDefault()},t=(o)=>{if(o.dataTransfer?.types?.includes("Files"))o.preventDefault();if(o.dataTransfer?.files&&o.dataTransfer.files.length>0)if(n?.onSelectFiles)n.onSelectFiles([...o.dataTransfer.files]);else F(o.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[F,E,n]),T(()=>{if(!E)return;let e=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault()},r=(t)=>{if(t.dataTransfer?.types?.includes("Files"))t.preventDefault();if(t.dataTransfer?.files&&t.dataTransfer.files.length>0)if(n?.onSelectFiles)n.onSelectFiles([...t.dataTransfer.files]);else F(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[F,E,n]),T(()=>()=>{if(!p){for(let e of B.current)if(e.url)URL.revokeObjectURL(e.url)}},[p]);let fe=(e)=>{if(e.currentTarget.files)if(n?.onSelectFiles)n.onSelectFiles([...e.currentTarget.files]);else F(e.currentTarget.files);e.currentTarget.value=""},J=Pe(()=>({files:d.map((e)=>({...e,id:e.id})),add:F,remove:q,clear:N,openFileDialog:X,fileInputRef:y}),[d,F,q,N,X]),A=S({controller:u,files:d,canSubmit:g});A.current={controller:u,files:d,canSubmit:g};let w=S(!0);T(()=>(w.current=!0,()=>{w.current=!1}),[]);let K=async(e)=>{let r=g===void 0?!0:g();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&b===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=C.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let o=p?u.textInput.value:ee(t),c=u?.textInput.getRevision?.(),s=d,I=()=>{if(!w.current)return;let m=A.current;if(m.files!==s)return;if(p){if(c===void 0||m.controller===null||m.controller.textInput.getRevision?.()!==c)return;if(m.controller.textInput.clearSubmitted===void 0)m.controller.textInput.clear();else m.controller.textInput.clearSubmitted()}else if(ee(t)===o)t.reset();N()};k.current=!0;try{if(f?.(o.trim()))return I(),{status:"accepted"};let m=await pr(s,n),z=A.current.canSubmit===void 0?!0:A.current.canSubmit();if(z!==!0)return{status:"blocked",reason:z};if(!w.current)return{status:"blocked",reason:"form_unmounted"};if(m.rejectedCount>0)v?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(b!==void 0)await b({text:o,files:m.files});else if(e!==null)await se({text:o,files:m.files},e);return I(),{status:"accepted"}}finally{k.current=!1}},ge=(e)=>{e.preventDefault(),K(e).catch(L)},be=h((e)=>{if(!e.trim())return;if(p&&u)ye(()=>{u.textInput.setInput(e)});C.current?.requestSubmit()},[u,p]),Q=a(Mo.Provider,{value:()=>K(null),children:Te(To.Provider,{value:be,children:[a("input",{accept:n?.onSelectFiles?n.accept:M,"aria-label":"Upload files",className:"hidden",multiple:ne,onChange:fe,ref:y,title:"Upload files",type:"file"}),a("form",{className:P("w-full",l),onSubmit:ge,ref:C,"data-tour":"chat-input",...ue,children:a(Fe,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ae&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:ie})})]})});return p?a(Ft.Provider,{value:J,children:Q}):a(No.Provider,{value:J,children:Q})};function ar({className:l,...i}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",l),...i})}function lr({className:l,...i}){return a(te,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",l),...i})}function cr({className:l,...i}){return a(te,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",l),...i})}function dr({className:l,...i}){return a("div",{className:P("flex items-center gap-1",l),...i})}var j=({variant:l="ghost",className:i,size:n,collapsed:f=!1,...L})=>{let g=f||Z.count(L.children)<=1?"icon-xs":"xs";return a(re,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(f||Z.count(L.children)<=1)&&"size-7",i),size:g,type:"button",variant:l,...L})},ur=({className:l,variant:i="ghost",size:n="icon-xs",status:f,children:L,...g})=>{let b=a(ve,{className:"size-4"});if(f==="submitted")b=a(Ie,{className:"size-4 animate-spin"});else if(f==="streaming")b=a(xe,{className:"size-3 fill-current"});else if(f==="error")b=a(he,{className:"size-4"});return a(re,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",l),size:n,type:"submit",variant:i,...g,children:L??b})};
2
+ export{sr,ar,lr,cr,dr,j,ur};
@@ -1,2 +1,2 @@
1
- import{en}from"./chunk-8eyw37rv.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function Rs({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(en,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
2
- export{Rs};
1
+ import{en}from"./chunk-re9ryzrv.js";import{Button as n}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as a,jsxs as o,Fragment as l}from"react/jsx-runtime";function Ls({title:i,actions:r=[],children:t}){return o(l,{children:[o("div",{className:"flex h-[var(--navigation-row-height,30px)] items-center gap-0.5","data-tauri-drag-region":!0,children:[a("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold","data-tauri-drag-region":!0,children:i}),r.map((e)=>a(en,{label:e.label,shortcut:e.shortcut,children:a(n,{variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] p-0","aria-label":e.label,onClick:e.onClick,children:e.icon})},e.key))]}),t!=null&&a("div",{className:"flex flex-col gap-0.5",children:t})]})}
2
+ export{Ls};
@@ -1,2 +1,2 @@
1
- import{Gt}from"./chunk-k014w2jg.js";import{cn as v}from"cn";import{XIcon as E}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as X,useRef as N,useState as b}from"react";import{Dialog as _,DialogClose as L,DialogContent as j,DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as F}from"react/jsx-runtime";function fr({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=X(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(_,{open:l,onOpenChange:y,children:F(j,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(A,{className:"sr-only",children:M||"Image preview"}),i(L,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(E,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?Gt({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
2
- export{fr};
1
+ import{Gt}from"./chunk-k014w2jg.js";import{cn as v}from"cn";import{XIcon as E}from"lucide-react";import{useCallback as p,useEffect as D,useMemo as X,useRef as N,useState as b}from"react";import{Dialog as _,DialogClose as L,DialogContent as j,DialogTitle as A}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as F}from"react/jsx-runtime";function hr({open:l,onOpenChange:y,url:h,filename:M,scale:d,onScaleChange:f,containerRef:z,containerClassName:H,dialogContentClassName:P,imageClassName:T}){let g=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[I,O]=b(1),o=g(d??I),R=N(null),s=z??R,S=N(null),[m,x]=b({width:0,height:0}),[C,W]=b({width:0,height:0}),w=p((e)=>{let n=g(e);if(typeof f==="function"){f(n);return}O(n)},[f,g]);D(()=>{if(!l)return;if(!h)return;if(typeof d==="number")return;O(1)},[l,h,d]),D(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{x({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let Z=p(()=>{w(1)},[w]),r=X(()=>{let{width:e,height:n}=C,{width:t,height:a}=m;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),u=e*c,k=n*c;return{width:u*o,height:k*o}},[o,C,m]);if(!h)return null;return i(_,{open:l,onOpenChange:y,children:F(j,{className:v("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",P),showCloseButton:!1,children:[i(A,{className:"sr-only",children:M||"Image preview"}),i(L,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(E,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=S.current,u=a&&c?Gt({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(w(t),a&&u)requestAnimationFrame(()=>{a.scrollTo(u)})},className:v("h-full w-full scrollbar-thin overflow-auto",H),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(m.width,r.width),height:Math.max(m.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:M||"image preview",className:v("block object-contain select-none",T),decoding:"async",draggable:!1,ref:S,onDoubleClick:Z,onLoad:(e)=>{let n=e.currentTarget;W({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))x({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
2
+ export{hr};
@@ -0,0 +1,2 @@
1
+ import{At}from"./chunk-wv501ppg.js";import{n}from"./chunk-bb2s9nb6.js";import{e,x}from"./chunk-8e9h60we.js";import{Y,y,ee}from"./chunk-rkqptd9w.js";import{isBooleanOption as U,isGroupedSelect as q,isSelectOption as A}from"@nyssance/codex-acp-v2/client";import{Zap as Z}from"lucide-react";import{memo as D,useRef as F}from"react";import{jsx as w}from"react/jsx-runtime";function H({sessionId:l,options:u,disabled:B,onModelChange:h,onConfigChange:C,defaultGroup:G={id:"models",name:"Models"},catalog:I=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=n((o)=>Boolean(o.configPending[l])),p=F({sessionId:l,model:!0}),b=P&&(p.current.sessionId!==l||p.current.model),k=n((o)=>{let r=o.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=y(u,"model"),a=y(u,"thought_level"),O=u.filter((o)=>o.configId!=="collaboration_mode"&&(o.category==="model_config"||o.category!=="mode"&&o!==t&&o!==a)),v=O.filter(A),m=O.filter(U);if(!t&&!a&&v.length===0&&m.length===0)return null;let f=(o,r)=>{if(r===o.currentValue)return Promise.resolve();p.current={sessionId:l,model:o===t};let d=C?C(o.configId,r):N.setConfig(l,o.configId,r);return x(c,d),d},g=a?Y(a):[],z=g.reduce((o,r)=>r.name.length>=o.length?r.name:o,""),R=t?ee(t):i("composer.model"),_=(o)=>({api_id:o.value,label:o.name}),S=I(t&&q(t.options)?t.options.map((o)=>({id:o.groupId,name:o.name,models:o.options.map(_)})):[{...G,models:t?Y(t).map(_):[]}]),V=S.flatMap((o)=>o.models),M=V.find((o)=>o.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((o)=>o.configId==="fast_mode"||o.configId==="fast-mode");return w(At,{disabled:B||b||k,switching:b,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:V,showModelList:Boolean(t),onChange:(o)=>{if(o.api_id===t?.currentValue)return;if(h)h(o.api_id);else if(t)f(t,o.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:S,t:i,effortConfig:a&&g.length>0?{name:"Effort",value:a.currentValue,levels:g,sizer:z,onChange:(o)=>f(a,o)}:void 0,selectOptions:v.map((o)=>({id:o.configId,name:o.name,value:o.currentValue,options:Y(o).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(o,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:w(Z,{className:"size-4","aria-hidden":"true"})},...m.filter((o)=>o!==s).map((o)=>({id:o.configId,name:o.name,currentValue:o.currentValue}))],onBooleanChange:(o,r)=>{let d=o==="fast_mode"?s:m.find((E)=>E.configId===o);if(!d)throw Error(`Unknown boolean config: ${o}`);f(d,r)}})}var kn=D(H);
2
+ export{kn};
@@ -1,2 +1,2 @@
1
- import{I}from"./chunk-ckft9abb.js";import{n}from"./chunk-aj0z9a5r.js";import{Ut}from"./chunk-wf0ytnh9.js";import{y,te}from"./chunk-j2bp0zbe.js";import{e}from"./chunk-qgrd5xre.js";import{uo}from"./chunk-mg9a4t04.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as X,Loader2Icon as F,SquareIcon as Y}from"lucide-react";import{useCallback as Z,useEffect as ss,useId as J,useRef as L,useState as w}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as h}from"react/jsx-runtime";function co(s,d){let p=n((l)=>l.sessions),o=n((l)=>l.actions),[k,f]=w(()=>new Set);return(l)=>{let r=d?.(l)??null,i=uo(s.id,l,p,o,s);if(i.length===0)return r;let b=`${s.id}:${l.key}`,u=new Map;for(let c of i){let x=l.items.find((g)=>g.id===c.originItemId)?.id??l.user?.id??null,m=u.get(x)??[];m.push(c),u.set(x,m)}return{active:r?.active===!0||i.some((c)=>c.status==="running"||c.status==="requires_action"),defaultExpanded:r?.defaultExpanded===!0||k.has(b),content:r?.content??null,entries:[...r?.entries??[],...[...u].map(([c,x])=>({afterItemId:c,content:t(Pi,{sessionId:s.id,turn:l,parent:s,tasks:x,onExpand:()=>f((m)=>m.has(b)?m:new Set([...m,b]))})}))]}}}function Pi({sessionId:s,turn:d,parent:p,tasks:o,onExpand:k}){let{host:f}=e(),l=n((a)=>a.sessions),r=n((a)=>a.actions),i=o??uo(s,d,l,r,p),b=i.some((a)=>a.status==="running"),u=i.some((a)=>a.status==="running"||a.status==="requires_action"),[c,x]=I(`subagents:${s}:${d.key}`,u,!0),m=J();if(i.length===0)return null;let g=new Map;for(let a of i)g.set(a.status,(g.get(a.status)??0)+1);let N=[...g].map(([a,E])=>`${f.t(`subagents.${a}`)} ${E}`).join(" · ");return h("section",{"data-subagent-sessions":!0,"data-subagent-turn":d.key,"aria-label":f.t("subagents.group"),className:"my-2 min-w-0",children:[h(C,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":c,"aria-controls":m,onClick:()=>{if(!c)k?.();x(!c)},children:[c?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),b?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),h("span",{className:"shrink-0",children:[f.t("subagents.group")," · ",i.length]}),t("span",{className:"truncate",role:"status",children:N})]}),t("div",{id:m,hidden:!c,className:"border-border ms-3 min-w-0 border-s ps-2",children:i.map((a)=>t(es,{task:a,cwd:p?.cwd??l[s]?.cwd??"",visible:c,stateKey:`${s}:${d.key}:${a.key}`,onRead:()=>{k?.(),x(!0)}},a.key))})]})}function O(s,d){if(!d)return s;let p=new Map(s.items.map((o)=>[`${o.kind}:${o.id}`,o]));for(let o of d.items)p.set(`${o.kind}:${o.id}`,o);return{...s,...d,items:[...p.values()]}}function es({task:s,cwd:d,stateKey:p,visible:o,onRead:k}){let{client:f,host:l}=e(),{t:r}=l,i=s.session,b=n((S)=>S.connection==="ready"),[u,c]=I(`subagent:${p}`,!1),[x,m]=w(!1),[g,N]=w(null),[a,E]=w(null),[R,Q]=w(null),[B,P]=w(!1),q=L(!1),_=L(!1),j=J(),W=i&&y(i.configOptions,"model"),T=s.title??r("subagents.untitled"),M=a?O(a,i):i,U=b&&i?.attached&&i.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=i?.cwd??d,z=Z(async(S)=>{if(!f.readSubagentHistory||H===null||q.current)return;_.current=!0,q.current=!0,P(!0),N(null);try{let v=await f.readSubagentHistory(H,D,S);E((K)=>K===null?v.session:O(v.session,K)),Q(v.cursor)}catch(v){N(v instanceof Error?v.message:String(v))}finally{q.current=!1,P(!1)}},[f,H,D]);ss(()=>{if(o&&u&&!_.current)z(null)},[o,u,z]);let V=async()=>{if(!i)throw Error("A live child session is required for cancellation");m(!0),N(null);try{await f.cancel(i.id)}catch(S){N(S instanceof Error?S.message:String(S))}finally{m(!1)}};return h("section",{"aria-label":T,className:"min-w-0",children:[h("div",{className:"flex min-w-0 items-center gap-1",children:[h(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${T} · ${r(`subagents.${s.status}`)}`,"aria-expanded":u,"aria-controls":j,onClick:()=>{if(!u)k();c(!u)},children:[u?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:T}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:r(`subagents.${s.status}`)})]}),U&&t(C,{variant:"ghost",size:"icon-sm",disabled:x,"aria-label":r("subagents.cancel",{name:T}),onClick:()=>{V()},children:x?t(F,{className:"size-3.5 animate-spin"}):t(Y,{className:"size-3.5"})})]}),g&&!u&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),h("div",{id:j,hidden:!u,className:"min-w-0 ps-4",children:[(s.description||W)&&h("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),W&&t("span",{className:"shrink-0",children:te(W)})]}),g&&h("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{z(a===null?null:R)},children:r("timeline.retry")})]}),B&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:r("timeline.loadingEarlier")}),R&&t(C,{variant:"ghost",size:"sm",disabled:B,onClick:()=>{z(R)},children:r("timeline.loadEarlier")}),o&&u&&(M&&M.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ts,{session:M})}):!B&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:r("subagents.noMessages")}))]})]})}function ts({session:s}){let{client:d,host:p}=e(),o=co(s);return t(Ut,{session:s,client:d,host:p,turnWork:o})}
2
- export{co,Pi};
1
+ import{I}from"./chunk-ckft9abb.js";import{n}from"./chunk-bb2s9nb6.js";import{Ut}from"./chunk-zetd8vk4.js";import{y,ee}from"./chunk-rkqptd9w.js";import{e}from"./chunk-8e9h60we.js";import{po}from"./chunk-w86ckd6d.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as X,Loader2Icon as F,SquareIcon as Y}from"lucide-react";import{useCallback as Z,useEffect as ss,useId as J,useRef as L,useState as w}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as h}from"react/jsx-runtime";function uo(s,d){let p=n((l)=>l.sessions),o=n((l)=>l.actions),[k,f]=w(()=>new Set);return(l)=>{let r=d?.(l)??null,i=po(s.id,l,p,o,s);if(i.length===0)return r;let b=`${s.id}:${l.key}`,u=new Map;for(let c of i){let x=l.items.find((g)=>g.id===c.originItemId)?.id??l.user?.id??null,m=u.get(x)??[];m.push(c),u.set(x,m)}return{active:r?.active===!0||i.some((c)=>c.status==="running"||c.status==="requires_action"),defaultExpanded:r?.defaultExpanded===!0||k.has(b),content:r?.content??null,entries:[...r?.entries??[],...[...u].map(([c,x])=>({afterItemId:c,content:t(Ti,{sessionId:s.id,turn:l,parent:s,tasks:x,onExpand:()=>f((m)=>m.has(b)?m:new Set([...m,b]))})}))]}}}function Ti({sessionId:s,turn:d,parent:p,tasks:o,onExpand:k}){let{host:f}=e(),l=n((a)=>a.sessions),r=n((a)=>a.actions),i=o??po(s,d,l,r,p),b=i.some((a)=>a.status==="running"),u=i.some((a)=>a.status==="running"||a.status==="requires_action"),[c,x]=I(`subagents:${s}:${d.key}`,u,!0),m=J();if(i.length===0)return null;let g=new Map;for(let a of i)g.set(a.status,(g.get(a.status)??0)+1);let N=[...g].map(([a,E])=>`${f.t(`subagents.${a}`)} ${E}`).join(" · ");return h("section",{"data-subagent-sessions":!0,"data-subagent-turn":d.key,"aria-label":f.t("subagents.group"),className:"my-2 min-w-0",children:[h(C,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":c,"aria-controls":m,onClick:()=>{if(!c)k?.();x(!c)},children:[c?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),b?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),h("span",{className:"shrink-0",children:[f.t("subagents.group")," · ",i.length]}),t("span",{className:"truncate",role:"status",children:N})]}),t("div",{id:m,hidden:!c,className:"border-border ms-3 min-w-0 border-s ps-2",children:i.map((a)=>t(es,{task:a,cwd:p?.cwd??l[s]?.cwd??"",visible:c,stateKey:`${s}:${d.key}:${a.key}`,onRead:()=>{k?.(),x(!0)}},a.key))})]})}function O(s,d){if(!d)return s;let p=new Map(s.items.map((o)=>[`${o.kind}:${o.id}`,o]));for(let o of d.items)p.set(`${o.kind}:${o.id}`,o);return{...s,...d,items:[...p.values()]}}function es({task:s,cwd:d,stateKey:p,visible:o,onRead:k}){let{client:f,host:l}=e(),{t:r}=l,i=s.session,b=n((S)=>S.connection==="ready"),[u,c]=I(`subagent:${p}`,!1),[x,m]=w(!1),[g,N]=w(null),[a,E]=w(null),[R,Q]=w(null),[B,P]=w(!1),q=L(!1),_=L(!1),j=J(),W=i&&y(i.configOptions,"model"),T=s.title??r("subagents.untitled"),M=a?O(a,i):i,U=b&&i?.attached&&i.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=i?.cwd??d,z=Z(async(S)=>{if(!f.readSubagentHistory||H===null||q.current)return;_.current=!0,q.current=!0,P(!0),N(null);try{let v=await f.readSubagentHistory(H,D,S);E((K)=>K===null?v.session:O(v.session,K)),Q(v.cursor)}catch(v){N(v instanceof Error?v.message:String(v))}finally{q.current=!1,P(!1)}},[f,H,D]);ss(()=>{if(o&&u&&!_.current)z(null)},[o,u,z]);let V=async()=>{if(!i)throw Error("A live child session is required for cancellation");m(!0),N(null);try{await f.cancel(i.id)}catch(S){N(S instanceof Error?S.message:String(S))}finally{m(!1)}};return h("section",{"aria-label":T,className:"min-w-0",children:[h("div",{className:"flex min-w-0 items-center gap-1",children:[h(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${T} · ${r(`subagents.${s.status}`)}`,"aria-expanded":u,"aria-controls":j,onClick:()=>{if(!u)k();c(!u)},children:[u?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:T}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:r(`subagents.${s.status}`)})]}),U&&t(C,{variant:"ghost",size:"icon-sm",disabled:x,"aria-label":r("subagents.cancel",{name:T}),onClick:()=>{V()},children:x?t(F,{className:"size-3.5 animate-spin"}):t(Y,{className:"size-3.5"})})]}),g&&!u&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),h("div",{id:j,hidden:!u,className:"min-w-0 ps-4",children:[(s.description||W)&&h("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),W&&t("span",{className:"shrink-0",children:ee(W)})]}),g&&h("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{z(a===null?null:R)},children:r("timeline.retry")})]}),B&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:r("timeline.loadingEarlier")}),R&&t(C,{variant:"ghost",size:"sm",disabled:B,onClick:()=>{z(R)},children:r("timeline.loadEarlier")}),o&&u&&(M&&M.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ts,{session:M})}):!B&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:r("subagents.noMessages")}))]})]})}function ts({session:s}){let{client:d,host:p}=e(),o=uo(s);return t(Ut,{session:s,client:d,host:p,turnWork:o})}
2
+ export{uo,Ti};
@@ -1,3 +1,3 @@
1
- import{s,a,o}from"./chunk-pxbww0j1.js";import{Xe,ge,se}from"./chunk-t3rv7vat.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as ce}from"cn";import{ArchiveIcon as de,FolderIcon as Q,ListFilterIcon as ue,SearchIcon as me,Trash2Icon as U}from"lucide-react";import{useEffect as pe,useRef as he,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as fe,DialogContent as ve,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as n}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:ce("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 $s({Scroll:u=we}){let{t:i,i18n:A}=s(),m=a(),S=o((e)=>e.archivedSessions),N=o((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,Z]=d("all"),[ee,te]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=he(!1),[D,f]=d(null),[O,b]=d(null),[ie,G]=d(!1);pe(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let r=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(r.has(v))throw Error("Archive pagination returned a repeated cursor");r.add(v),await m.listArchived()}}catch(r){if(!e)F(E(r))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,ee]);let l=o((e)=>e.projectContext),k=!(l!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ne=[...new Set(S.filter((e)=>l&&j(l,e).id!==se).map((e)=>l?j(l,e).id:e.cwd))].toSorted(),ae=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=l?j(l,e).id:null,r=c===se;return L(e).toLocaleLowerCase(A.language).includes(ae)&&(y==="all"||(y==="quick"?r:!r))&&(p==="all"||(p==="quick"?r:c===p))}),re=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function le(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 oe(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let r of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===r.sessionId))continue;try{await m.delete(r.sessionId)}catch(v){e.push(r),c.push(`${L(r)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
1
+ import{s,a,o}from"./chunk-hd5zm7tc.js";import{Xe,ge,se}from"./chunk-gxn9pp4b.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as ce}from"cn";import{ArchiveIcon as de,FolderIcon as Q,ListFilterIcon as ue,SearchIcon as me,Trash2Icon as U}from"lucide-react";import{useEffect as pe,useRef as he,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as fe,DialogContent as ve,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ne}from"@nyssance/shadcn/vega/components/ui/input";import{Select as _,SelectContent as Ce,SelectItem as x,SelectTrigger as R,SelectValue as W}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as J}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as n}from"react/jsx-runtime";function M({className:u,...i}){return t(Ce,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:ce("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 js({Scroll:u=we}){let{t:i,i18n:A}=s(),m=a(),S=o((e)=>e.archivedSessions),N=o((e)=>e.connection),[B,X]=d(""),[y,Y]=d("all"),[p,Z]=d("all"),[ee,te]=d(0),[q,z]=d(!0),[I,F]=d(null),[V,H]=d(null),[C,w]=d(!1),h=he(!1),[D,f]=d(null),[O,b]=d(null),[ie,G]=d(!1);pe(()=>{if(N!=="ready")return;let e=!1;z(!0),F(null);async function c(){try{await m.listArchived({reset:!0});let r=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(r.has(v))throw Error("Archive pagination returned a repeated cursor");r.add(v),await m.listArchived()}}catch(r){if(!e)F(E(r))}finally{if(!e)z(!1)}}return c(),()=>{e=!0}},[m,N,ee]);let l=o((e)=>e.projectContext),k=!(l!==null&&N==="ready"&&!q&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ne=[...new Set(S.filter((e)=>l&&j(l,e).id!==se).map((e)=>l?j(l,e).id:e.cwd))].toSorted(),ae=B.trim().toLocaleLowerCase(A.language),K=S.filter((e)=>{let c=l?j(l,e).id:null,r=c===se;return L(e).toLocaleLowerCase(A.language).includes(ae)&&(y==="all"||(y==="quick"?r:!r))&&(p==="all"||(p==="quick"?r:c===p))}),re=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function le(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 oe(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let r of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===r.sessionId))continue;try{await m.delete(r.sessionId)}catch(v){e.push(r),c.push(`${L(r)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
2
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(U,{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(me,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ne,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>X(e.target.value),className:"rounded-md ps-9"})]}),n(_,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Y(e)},children:[n(R,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(ue,{"aria-hidden":"true"}),t(W,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),n(M,{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(_,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");Z(e)},children:[n(R,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(Q,{"aria-hidden":"true"}),t(W,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):ge(p,l??void 0)})]}),n(M,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ne.map((e)=>t(x,{value:e,title:e,children:ge(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(J,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:n(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>te((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(de,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):K.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(l?Xe(K,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===se?void 0:e,children:[t(Q,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===se?i("sessionList.archives.noProject"):ge(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((r)=>n("article",{"aria-label":L(r),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(r),children:L(r)}),r.updatedAt!==null&&t("time",{dateTime:r.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:re.format(new Date(r.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([r])},children:t(U,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void le(r),children:i("sessionList.archives.unarchive")})]})]},r.sessionId))})]},e)),V&&t(P,{variant:"destructive",children:t(T,{children:V})})]})]}),t(fe,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:n(ve,{showCloseButton:!C,children:[n(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(ie?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),O&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:O})}),n(Se,{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 oe(),children:[C&&t(J,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
3
- export{$s};
3
+ export{js};
@@ -1,2 +1,2 @@
1
- import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function $o(n){if(n.kind!=="tool")return!1;let t=n._meta?.codex;return typeof t==="object"&&t!==null&&"commandSource"in t&&t.commandSource==="userShell"}function Xr(n,t,r){if(n.kind!=="tool"){let o=p(n.content),d=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(o);return{type:"thinking",id:n.id,thinking:d?d[1]:o,isComplete:!r}}if(n.name==="subagent"){let o=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:g(o.agentPath,n.id),threadId:f(o.agentThreadId,"agentThreadId",n.id),activity:y(o.activity,n.id),model:l(o.model,"model",n.id),reasoningEffort:l(o.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let o=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof o.tool!=="string"||!Array.isArray(o.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:o.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:o.agents}}let a=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},i=u(n,t);if(Array.isArray(a.command))a.command=a.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof a.command!=="string"){let o=i?.command??n.title;if(o!==null)a.command=o}let e=n.rawOutput;if(typeof e==="object"&&e!==null&&"output"in e&&typeof e.output==="string")e=e.output;if(i!==null&&i.output.length>0)e=i.output;let c=i?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:a,rawOutput:e,...$o(n)?{userShell:!0}:{},...typeof c==="number"?{exitCode:c}:{}}}function s(n,t){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${t} is missing an object codex-acp-v2 always sends`);return n}function l(n,t,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${t}`)}function g(n,t){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${t} has no agent path`);return r}function f(n,t,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${t}`)}function y(n,t){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${t} has an unknown activity ${String(n)}`)}
2
- export{$o,Xr};
1
+ import{terminalOf as u,textOf as p}from"@nyssance/codex-acp-v2/client";function jo(n){if(n.kind!=="tool")return!1;let t=n._meta?.codex;return typeof t==="object"&&t!==null&&"commandSource"in t&&t.commandSource==="userShell"}function Yr(n,t,r){if(n.kind!=="tool"){let o=p(n.content),d=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(o);return{type:"thinking",id:n.id,thinking:d?d[1]:o,isComplete:!r}}if(n.name==="subagent"){let o=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:g(o.agentPath,n.id),threadId:f(o.agentThreadId,"agentThreadId",n.id),activity:y(o.activity,n.id),model:l(o.model,"model",n.id),reasoningEffort:l(o.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let o=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof o.tool!=="string"||!Array.isArray(o.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:o.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:o.agents}}let a=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},i=u(n,t);if(Array.isArray(a.command))a.command=a.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof a.command!=="string"){let o=i?.command??n.title;if(o!==null)a.command=o}let e=n.rawOutput;if(typeof e==="object"&&e!==null&&"output"in e&&typeof e.output==="string")e=e.output;if(i!==null&&i.output.length>0)e=i.output;let c=i?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:a,rawOutput:e,...jo(n)?{userShell:!0}:{},...typeof c==="number"?{exitCode:c}:{}}}function s(n,t){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${t} is missing an object codex-acp-v2 always sends`);return n}function l(n,t,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${t}`)}function g(n,t){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${t} has no agent path`);return r}function f(n,t,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${t}`)}function y(n,t){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${t} has an unknown activity ${String(n)}`)}
2
+ export{jo,Yr};
@@ -1,2 +1,2 @@
1
- import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function Ra(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function ma(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function La(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(K,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(C,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(T,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(j,{value:o.value,id:l})},o.value)})})]});return s(L,{children:[r(I,{htmlFor:n,children:e.title}),k(e.property)?r(H,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):O(e.property)?r(B,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(M,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function Ai({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=S(()=>Ra(e),[e]),[m,u]=A(()=>ma(c));D(()=>u(ma(c)),[n,c]);let g=c.every((a)=>La(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(E,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(N,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(q,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(P,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(V,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(G,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(R,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
2
- export{Ra,ma,La,Ai};
1
+ import{isArrayProperty as x,isBooleanProperty as k,isNumberProperty as O,isStringProperty as w}from"@nyssance/codex-acp-v2/client";import{useEffect as D,useMemo as S,useState as A}from"react";import{Button as F}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as C}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Dialog as E,DialogContent as N,DialogDescription as V,DialogFooter as R,DialogHeader as q,DialogTitle as P}from"@nyssance/shadcn/vega/components/ui/dialog";import{Field as L,FieldDescription as f,FieldGroup as G,FieldLabel as I,FieldLegend as v,FieldSet as h}from"@nyssance/shadcn/vega/components/ui/field";import{Input as B}from"@nyssance/shadcn/vega/components/ui/input";import{Label as K}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as T,RadioGroupItem as j}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Switch as H}from"@nyssance/shadcn/vega/components/ui/switch";import{Textarea as M}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as r,jsxs as s}from"react/jsx-runtime";function _(n){if(!w(n))return null;if(n.oneOf&&n.oneOf.length>0)return n.oneOf.map((e)=>({value:e.const,label:e.title??e.const,...e.description?{description:e.description}:{}}));if(n.enum&&n.enum.length>0)return n.enum.map((e)=>({value:e,label:e}));return null}function z(n){let e=n,i=e._meta?.alwith?.options;if(Array.isArray(i)&&Array.isArray(e.enum))return i.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));if(Array.isArray(e.enum))return e.enum.map((t)=>({value:String(t),label:String(t)}));if(Array.isArray(e.oneOf))return e.oneOf.map((t)=>({value:t.const,label:t.title,...t.description?{description:t.description}:{}}));return null}function Ra(n){let e=new Set(n.required??[]);return Object.entries(n.properties??{}).map(([i,t])=>({key:i,property:t,title:t.title??i,description:t.description??null,required:e.has(i),options:_(t),multiOptions:x(t)?z(t.items):null}))}function ga(n){let e={};for(let i of n){let t=i.property.default;if(t!==void 0&&t!==null)e[i.key]=t;else if(i.options)e[i.key]=i.options[0].value;else if(k(i.property))e[i.key]=!1;else if(x(i.property))e[i.key]=[]}return e}function La(n,e){if(n.multiOptions)return Array.isArray(e)&&e.length>0;if(!n.required)return!0;return e!==void 0&&e!==""&&!(Array.isArray(e)&&e.length===0)}function b({id:n,label:e,description:i,control:t}){return s("div",{className:"hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",children:[t,s(K,{htmlFor:n,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[r("div",{className:"text-foreground text-sm",children:e}),i&&r("div",{className:"text-muted-foreground text-xs",children:i})]})]})}function J({id:n,field:e,value:i,onChange:t}){if(e.multiOptions){let o=new Set(Array.isArray(i)?i:[]);return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r("div",{className:"flex flex-col gap-1",children:e.multiOptions.map((l)=>{let c=`${n}:${l.value}`;return r(b,{id:c,...l,control:r(C,{id:c,checked:o.has(l.value),onCheckedChange:(m)=>{let u=new Set(o);if(m)u.add(l.value);else u.delete(l.value);t([...u])}})},l.value)})})]})}if(e.options)return s(h,{children:[r(v,{variant:"label",children:e.title}),e.description&&r(f,{children:e.description}),r(T,{value:typeof i==="string"?i:"",onValueChange:(o)=>t(String(o)),className:"flex flex-col gap-1",children:e.options.map((o)=>{let l=`${n}:${o.value}`;return r(b,{id:l,...o,control:r(j,{value:o.value,id:l})},o.value)})})]});return s(L,{children:[r(I,{htmlFor:n,children:e.title}),k(e.property)?r(H,{id:n,checked:i===!0,onCheckedChange:(o)=>t(o)}):O(e.property)?r(B,{id:n,type:"number",required:e.required,value:typeof i==="number"?i:"",onChange:(o)=>t(o.target.value===""?void 0:Number(o.target.value))}):r(M,{id:n,rows:2,required:e.required,value:typeof i==="string"?i:"",onChange:(o)=>t(o.target.value)}),e.description&&r(f,{children:e.description})]})}function Ei({requestId:n,schema:e,message:i,total:t,t:o,onRespond:l}){let c=S(()=>Ra(e),[e]),[m,u]=A(()=>ga(c));D(()=>u(ga(c)),[n,c]);let g=c.every((a)=>La(a,m[a.key])),y=()=>{if(!g)return;let a={};for(let[p,d]of Object.entries(m))if(d!==void 0)a[p]=d;l({action:"accept",content:a})};return r(E,{open:!0,onOpenChange:(a)=>!a&&l({action:"cancel"}),children:s(N,{className:"flex max-h-[80vh] flex-col gap-4 sm:max-w-lg",onKeyDown:(a)=>{if(a.key==="Enter"&&(a.metaKey||a.ctrlKey))a.preventDefault(),y()},children:[s(q,{children:[s("div",{className:"flex items-center justify-between gap-2 pe-8",children:[r(P,{children:e.title??o("approval.needed")}),t>1&&r("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${t}`})]}),r(V,{children:i})]}),r("div",{className:"min-h-0 flex-1 overflow-y-auto",children:r(G,{children:c.map((a)=>r(J,{id:`${n}:${a.key}`,field:a,value:m[a.key],onChange:(p)=>u((d)=>({...d,[a.key]:p}))},a.key))})}),s(R,{children:[r(F,{variant:"ghost",onClick:()=>l({action:"decline"}),children:o("actions.decline")}),r(F,{disabled:!g,onClick:y,children:o("actions.submit")})]})]})})}
2
+ export{Ra,ga,La,Ei};
@@ -1,4 +1,4 @@
1
- import{no}from"./chunk-ry5phnnk.js";import{Ce}from"./chunk-ytkcpeq2.js";import{ds}from"./chunk-s1w3j9p9.js";import{w,Kt}from"./chunk-4g2412p5.js";import{t}from"./chunk-aj0z9a5r.js";import{_s,Is}from"./chunk-7tgfj1zb.js";import{C}from"./chunk-q2ykvjrz.js";import{be}from"./chunk-d607659a.js";import{isEmbeddedResource as g,isImage as x,isResourceLink as R,isText as h}from"@nyssance/codex-acp-v2/client";import{memo as v}from"react";import{jsx as i,jsxs as y}from"react/jsx-runtime";var cs=v(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=Is(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
1
+ import{oo}from"./chunk-vc6yxjs3.js";import{Ce}from"./chunk-abt670s7.js";import{us}from"./chunk-gq2gckvv.js";import{w,Kt}from"./chunk-x2xwfwcx.js";import{t}from"./chunk-bb2s9nb6.js";import{Is,Ps}from"./chunk-514abcnn.js";import{C}from"./chunk-beraaxpx.js";import{be}from"./chunk-dqyfe90s.js";import{isEmbeddedResource as g,isImage as x,isResourceLink as R,isText as h}from"@nyssance/codex-acp-v2/client";import{memo as v}from"react";import{jsx as i,jsxs as y}from"react/jsx-runtime";var ds=v(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=Ps(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
2
2
  ${e.text}`).join(`
3
- `):be(n),l=n.content.filter(x),d=new Set(Kt(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=w(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(h).map((e)=>{let s=_s(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return y("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(C,{block:e},`${n.id}:${s}`))}),i(no,{value:{names:u,icon:p.skillIcon},children:i(ds,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(Ce,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
4
- export{cs};
3
+ `):be(n),l=n.content.filter(x),d=new Set(Kt(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=w(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(h).map((e)=>{let s=Is(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return y("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(C,{block:e},`${n.id}:${s}`))}),i(oo,{value:{names:u,icon:p.skillIcon},children:i(us,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(Ce,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
4
+ export{ds};
@@ -0,0 +1,2 @@
1
+ function*Eo(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 wr(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 Eo(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
2
+ export{Eo,wr};
@@ -1,2 +1,2 @@
1
- import{createStore as r}from"@alwith/api/client";var pt=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function rs(e){pt.setState({...e,terminals:e.terminals??{}})}function ss(e){if(pt.getState().sessionId===e)pt.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function as(e,n,t){let i=pt.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{pt,rs,ss,as};
1
+ import{createStore as r}from"@alwith/api/client";var pt=r({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}});function ss(e){pt.setState({...e,terminals:e.terminals??{}})}function as(e){if(pt.getState().sessionId===e)pt.setState({sessionId:null,turns:[],api:null,beforeReveal:null,terminals:{}})}async function ls(e,n,t){let i=pt.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{pt,ss,as,ls};
@@ -1,2 +1,2 @@
1
- import{k}from"./chunk-aj0z9a5r.js";import{e}from"./chunk-qgrd5xre.js";import{useRef as y,useState as m}from"react";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as f}from"react/jsx-runtime";function Dn({client:s,session:t}){let{host:r}=e(),[a,l]=m(!1),[d,c]=m(null),i=y(!1),p=k(s.store,(o)=>o.connection==="ready"),v=a||!p||t.restoring;async function g(){if(i.current||!p||t.restoring)return;i.current=!0,c(null),l(!0);try{await s.open(t.id,t.cwd)}catch(o){c(o instanceof Error?o.message:String(o))}finally{i.current=!1,l(!1)}}return f("div",{className:"text-muted-foreground flex flex-wrap items-center gap-3 px-4 py-3 text-sm","aria-busy":a,"data-model-recovery":!0,children:[f("div",{className:"min-w-0 flex-1 basis-full",children:[n("p",{children:r.t("provider.modelUnavailable")}),d&&n("p",{role:"alert",className:"text-destructive break-words",children:d})]}),r.openSettings&&n(u,{size:"sm",variant:"outline",onClick:()=>void r.openSettings?.("provider"),children:r.t("settings.provider")}),n(u,{size:"sm",disabled:v,onClick:()=>void g(),children:r.t(t.restoring?"conversation.restoring":"provider.retry")})]})}
2
- export{Dn};
1
+ import{k}from"./chunk-bb2s9nb6.js";import{e}from"./chunk-8e9h60we.js";import{useRef as y,useState as m}from"react";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as f}from"react/jsx-runtime";function Fn({client:s,session:t}){let{host:r}=e(),[a,l]=m(!1),[d,c]=m(null),i=y(!1),p=k(s.store,(o)=>o.connection==="ready"),v=a||!p||t.restoring;async function g(){if(i.current||!p||t.restoring)return;i.current=!0,c(null),l(!0);try{await s.open(t.id,t.cwd)}catch(o){c(o instanceof Error?o.message:String(o))}finally{i.current=!1,l(!1)}}return f("div",{className:"text-muted-foreground flex flex-wrap items-center gap-3 px-4 py-3 text-sm","aria-busy":a,"data-model-recovery":!0,children:[f("div",{className:"min-w-0 flex-1 basis-full",children:[n("p",{children:r.t("provider.modelUnavailable")}),d&&n("p",{role:"alert",className:"text-destructive break-words",children:d})]}),r.openSettings&&n(u,{size:"sm",variant:"outline",onClick:()=>void r.openSettings?.("provider"),children:r.t("settings.provider")}),n(u,{size:"sm",disabled:v,onClick:()=>void g(),children:r.t(t.restoring?"conversation.restoring":"provider.retry")})]})}
2
+ export{Fn};
@@ -1,2 +1,2 @@
1
- import{F}from"./chunk-gk7nn747.js";import{t}from"./chunk-aj0z9a5r.js";import{C}from"./chunk-q2ykvjrz.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(F,{text:e.text,streaming:o})})}if(i.isImage(e))return n(C,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(C,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Ke({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
1
+ import{F}from"./chunk-hxstf6c4.js";import{t}from"./chunk-bb2s9nb6.js";import{C}from"./chunk-beraaxpx.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(F,{text:e.text,streaming:o})})}if(i.isImage(e))return n(C,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(C,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Ke({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
2
2
  export{Ke};
@@ -1,2 +1,2 @@
1
- import{Rr}from"./chunk-n4rep234.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function Mr({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(Rr,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
2
- export{Mr};
1
+ import{Lr}from"./chunk-jra95vzv.js";import{useCallback as xe,useEffect as P,useLayoutEffect as ye,useMemo as X,useRef as I,useState as E}from"react";import"@alwith/module-chat/navigation-rail.css";import{jsx as T,jsxs as Ne,Fragment as ke}from"react/jsx-runtime";var Se=4,ge=10;function we(h,x){let v=new Map(x.flatMap((c)=>c.itemIds.map((S)=>[S,c.key]))),p=Array(h.length),C;for(let c=h.length-1;c>=0;c--)C=v.get(h[c])??C,p[c]=C;let A=Math.max(-1,...x.map((c)=>c.key))+1,B=new Set,n=[];for(let[c,S]of h.entries()){let w=v.get(S),m=n.at(-1);if(!m||w!==void 0&&w!==m.key||w===void 0&&m.itemIds.length>=64&&p[c]!==m.key){let y=w!==void 0&&!B.has(w)?w:A++;m={key:y,startIndex:c,itemIds:[]},n.push(m),B.add(y)}m.itemIds.push(S)}return n}function fe(h,x){if(h.size!==x.size)return!1;for(let v of h)if(!x.has(v))return!1;return!0}function Nr({audio:h,beforeReveal:x,ensureItemMounted:v,items:p,onPreviewItem:C,renderPreview:A,onRevealError:B,scrollRoot:n,targetTopMarginPx:c=16}){let[S,w]=E(()=>{let e=p.at(-1);return new Set(e===void 0?[]:[e.id])}),[m,y]=E(null),[_,O]=E(null),[Z,R]=E(!1),[j,pe]=E(()=>new Set),[ve,be]=E(!0),[Ie,F]=E(null),{installUnlock:ee,preload:te,playSequence:ne}=h,K=I(null),M=I(null),U=I(!1),H=I(null),L=I(0),G=I(null),k=I(null),V=I(new Set),z=X(()=>p.map((e)=>e.id).join("\x00"),[p]),J=I(p);J.current=p;let ie=I(j),re=I(S),se=I({itemIdsKey:z,scrollRoot:n});if(se.current.scrollRoot!==n)L.current+=1,se.current={itemIdsKey:z,scrollRoot:n};let g=X(()=>v===void 0?p.filter((e)=>j.has(e.id)):p,[v,p,j]),ae=X(()=>g.map((e)=>({inputTokens:e.inputTokens,outputTokens:e.outputTokens})),[g]),D=I({ids:"",groups:[]}),oe=g.map((e)=>e.id).join("\x00");if(D.current.ids!==oe)D.current={ids:oe,groups:we(g.map((e)=>e.id),D.current.groups)};P(()=>ee(),[ee]),P(()=>()=>{if(L.current+=1,G.current?.cancel(),k.current!==null)clearTimeout(k.current)},[]),P(()=>{y(null),R(!1),O(null),M.current=null,U.current=!1,H.current=null,F(null),V.current.clear()},[n]),P(()=>{te()},[te]),P(()=>{if(n===null)return;let e=new Set,t=new Map,i=new Set(J.current.map((s)=>s.id)),r=()=>{let s=new Set(t.values()),d=J.current.filter((f)=>s.has(f.id)).map((f)=>f.id),o=d.findIndex((f)=>e.has(f));if(o===-1)return;let b=o;for(let f=o+1;f<d.length;f++)if(e.has(d[f]))b=f;let N=new Set(d.slice(o,b+1));if(fe(re.current,N))return;re.current=N,w(N)},a=new IntersectionObserver((s)=>{for(let d of s){let o=t.get(d.target);if(d.isIntersecting)e.add(o);else e.delete(o)}r()},{root:n,rootMargin:`-${c}px 0px 0px 0px`}),u=()=>{let s=new Set,d=new Set;for(let o of n.querySelectorAll("[data-content-search-unit-key]")){let b=o.dataset.contentSearchUnitKey;if(b===void 0||!i.has(b)||s.has(b))continue;s.add(b);let N=o.closest("[data-turn-key]"),f=N===null||d.has(N)?o:N;if(d.add(f),t.has(f))continue;t.set(f,b),a.observe(f)}for(let o of t.keys()){if(d.has(o))continue;a.unobserve(o),e.delete(t.get(o)),t.delete(o)}if(r(),fe(ie.current,s))return;ie.current=s,pe(s)};u();let l=new MutationObserver((s)=>{if(s.some((o)=>[...o.addedNodes,...o.removedNodes].some((b)=>b instanceof Element&&(b.matches("[data-turn-key], [data-content-search-unit-key]")||b.querySelector("[data-turn-key], [data-content-search-unit-key]")!==null))))u()});return l.observe(n,{childList:!0,subtree:!0}),()=>{l.disconnect(),a.disconnect()}},[z,n,c]);let Y=g.find((e)=>S.has(e.id))?.id??g.at(-1)?.id;ye(()=>{let e=K.current;if(e===null||M.current!==null||Y===void 0)return;let t=e.querySelector(`[data-timeline-user-message-navigation-item-id="${CSS.escape(Y)}"]`);if(t===null)return;let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();if(r.top<i.top)e.scrollTop+=r.top-i.top;else if(r.bottom>i.bottom)e.scrollTop+=r.bottom-i.bottom+1},[Y,z]),P(()=>{let e=n?.querySelector("[data-timeline-user-message-navigation-content]");if(!n||!e)return;let t=()=>{let r=n.getBoundingClientRect(),a=e.getBoundingClientRect();if(r.width===0||a.width===0)return;let u=n.offsetWidth>0?r.width/n.offsetWidth:1;be((a.left-r.left)/u>=48)},i=new ResizeObserver(t);return i.observe(n),i.observe(e),t(),()=>i.disconnect()},[n]);let he=xe(async(e,t="smooth")=>{if(n===null)throw Error("Thread user-message navigation scroll root is missing");let i=L.current+1;L.current=i,x();let r=()=>n.querySelector(`[data-content-search-unit-key="${CSS.escape(e.id)}"]`),a=r(),u=a!==null&&n.clientHeight>0&&a.closest("[data-turn-key]")!==null&&Math.abs(a.getBoundingClientRect().top-n.getBoundingClientRect().top)>n.clientHeight*2;if((a===null||u)&&v!==void 0){if(t==="instant"&&e.isLoaded===!1)return;a=await v(e,()=>L.current===i)??r(),t="instant"}if(L.current!==i)return;if(a===null)return;let l=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;a.scrollIntoView({behavior:l?"instant":t,block:"start"});let s=a.querySelector("[data-user-message-bubble], [data-composer-attachment-pill]");if(G.current?.cancel(),G.current=null,s===null)return;let d=getComputedStyle(s).backgroundColor,o=`color-mix(in srgb, var(--foreground) 14%, ${d})`;G.current=s.animate?.([{backgroundColor:o},{backgroundColor:o,offset:0.35},{backgroundColor:d}],{duration:l?0:1000,easing:"cubic-bezier(0.23, 1, 0.32, 1)"})??null},[x,v,n]);if(g.length<Se||!ve)return null;let Q=()=>{if(k.current!==null)clearTimeout(k.current);k.current=null},ue=(e,t=!1)=>{if(Q(),C===void 0||e.isLoaded!==!1||V.current.has(e.turnKey))return;let i=()=>{k.current=null,V.current.add(e.turnKey),C(e).catch(()=>V.current.delete(e.turnKey))};if(t)i();else k.current=setTimeout(i,150)},q=m===null?null:g.find((e)=>e.id===m.item.id)??g.find((e)=>e.nativeTurnId!==void 0&&e.nativeTurnId===m.item.nativeTurnId)??m.item,le=(e,t="smooth")=>{he(e,t).catch((i)=>{if(B)B(i);else throw i})},de=g.findIndex((e)=>e.id===(_??Ie)),ce=K.current,Te=m===null||!ce?.contains(m.button)?0:Me(ce,m.button),me=(e)=>{let t=e?.closest("[data-timeline-user-message-navigation-item-id]"),i=K.current;if(t===void 0||t===null||!i.contains(t))return null;let r=t.dataset.timelineUserMessageNavigationItemId,a=g.findIndex((u)=>u.id===r);return{button:t,item:g[a],index:a}},W=(e)=>{let t=M.current;if(t?.pointerId!==e.pointerId)return;if(M.current=null,O(null),t.captureTarget.hasPointerCapture(e.pointerId))t.captureTarget.releasePointerCapture(e.pointerId)};return T("nav",{"aria-label":"User messages",className:"timeline-user-message-navigation absolute start-4 top-1/2 z-20 -translate-y-1/2",children:T(Lr,{open:Z,onOpenChange:R,side:"inline-end",sideOffset:0,align:"center",alignOffset:Te,trigger:T("div",{ref:K,"data-timeline-user-message-navigation-rail-list":!0,"data-scrubbing":_===null?void 0:"",className:"timeline-user-message-navigation-rail-list",onPointerEnter:()=>{H.current=null},onPointerDown:(e)=>{if(e.button!==0)return;Q();let t=me(e.target instanceof Element?e.target:null);if(t===null)return;U.current=!1,M.current={pointerId:e.pointerId,itemId:t.item.id,itemIndex:t.index,captureTarget:t.button},t.button.setPointerCapture(e.pointerId),O(t.item.id),y(t),R(!0)},onPointerMove:(e)=>{let t=M.current;if(t===null){let l=me(e.target instanceof Element?e.target:null);if(l!==null){F(l.item.id);let s=H.current;if(s!==null&&s!==l.index)ne(s,l.index,ae);H.current=l.index,y((d)=>d?.item.id===l.item.id?d:l),ue(l.item)}return}if(t.pointerId!==e.pointerId)return;if((e.buttons&1)===0){W(e);return}let i=e.currentTarget.getBoundingClientRect(),r=Math.max(0,Math.min(g.length-1,Math.floor((e.clientY-i.top+e.currentTarget.scrollTop)/ge))),u={button:e.currentTarget.querySelectorAll("[data-timeline-user-message-navigation-item-id]")[r],item:g[r],index:r};if(u.item.id===t.itemId)return;ne(t.itemIndex,u.index,ae),H.current=u.index,M.current={...t,itemId:u.item.id,itemIndex:u.index},U.current=!0,O(u.item.id),y(u),le(u.item,"instant")},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onPointerLeave:()=>{if(Q(),F(null),H.current=null,M.current===null&&!Z)y(null)},children:T("div",{className:"flex flex-col",children:D.current.groups.map((e)=>T("div",{className:"flex w-9 shrink-0 flex-col [content-visibility:auto]",style:{height:e.itemIds.length*ge},children:g.slice(e.startIndex,e.startIndex+e.itemIds.length).map((t,i)=>{let r=e.startIndex+i,a=Math.abs(r-de),u=de===-1||a>3?void 0:[1,0.7,0.4,0.2][a];return T("button",{type:"button","data-timeline-user-message-navigation-item-id":t.id,"data-scrub-target":_===t.id?"":void 0,"aria-current":S.has(t.id)?"true":void 0,"aria-label":`Jump to user message ${r+1}`,className:"timeline-user-message-navigation-row",onClick:(l)=>{if(U.current){U.current=!1;return}let s={button:l.currentTarget,item:t,index:r};y(s),R(!0),le(t)},onFocus:(l)=>{ue(t,!0),y({button:l.currentTarget,item:t,index:r}),R(!0)},children:T("span",{className:"flex h-0.5 w-[30px] items-center",children:T("span",{className:"timeline-user-message-navigation-marker",style:u===void 0?void 0:{"--marker-progress":u}})})},t.id)})},e.key))})}),children:q!==null&&T("div",{className:"bg-popover/95 text-popover-foreground ring-border w-80 max-w-[calc(100vw-1rem)] overflow-hidden rounded-xl p-2 text-sm leading-5 shadow-xl ring-[0.5px] backdrop-blur-sm",children:A?A(q):Ne(ke,{children:[T("div",{className:"min-w-0 truncate font-medium",children:q.label}),q.response.length>0&&T("div",{className:"text-muted-foreground mt-1 line-clamp-3",children:q.response})]})})})})}function Me(h,x){let v=h.getBoundingClientRect(),p=x.getBoundingClientRect();return p.top+p.height/2-(v.top+v.height/2)}
2
+ export{Nr};
@@ -1,2 +1,2 @@
1
- var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function Vo(t,o){let e=/^[^/\\:]+:\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?$/.test(t);if(/^[a-z][a-z\d+.-]*:/i.test(t)&&!e||s(t))return t;if(t.startsWith("www."))return`https://${t}`;if(o===null)throw Error("The conversation's directory is unavailable");return`${encodeURI(o.replace(/[\\/]$/,"")).replaceAll(/[?#]/g,encodeURIComponent)}/${t}`}function Vt(t,o){let e=Vo(t,o),n;if(/^file:/i.test(e)){let r=new URL(e);if(n=decodeURIComponent(r.pathname),/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(r.hostname&&r.hostname!=="localhost")n=`//${r.hostname}${n}`}else if(s(e))try{n=decodeURI(e)}catch(r){if(!(r instanceof URIError))throw r;n=e}else return null;return n.replace(l,"")}function Qr(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function Jr(t,o){if(/^file:/i.test(t)){let e=new URL(t),n=decodeURIComponent(e.pathname);if(/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(e.hostname&&e.hostname!=="localhost")n=`//${e.hostname}${n}`;return n}if(s(t))return t;if(o===null)throw Error("The conversation's directory is unavailable");return`${o.replace(/[\\/]$/,"")}/${t}`}
2
- export{Vo,Vt,Qr,Jr};
1
+ var l=/(?::\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?|#L\d+(?:C\d+)?(?:-L\d+(?:C\d+)?)?)$/;function s(t){return t.startsWith("/")||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(String.raw`\\`)}function $o(t,o){let e=/^[^/\\:]+:\d+(?::\d+)?(?:[-–]\d+(?::\d+)?)?$/.test(t);if(/^[a-z][a-z\d+.-]*:/i.test(t)&&!e||s(t))return t;if(t.startsWith("www."))return`https://${t}`;if(o===null)throw Error("The conversation's directory is unavailable");return`${encodeURI(o.replace(/[\\/]$/,"")).replaceAll(/[?#]/g,encodeURIComponent)}/${t}`}function Vt(t,o){let e=$o(t,o),n;if(/^file:/i.test(e)){let r=new URL(e);if(n=decodeURIComponent(r.pathname),/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(r.hostname&&r.hostname!=="localhost")n=`//${r.hostname}${n}`}else if(s(e))try{n=decodeURI(e)}catch(r){if(!(r instanceof URIError))throw r;n=e}else return null;return n.replace(l,"")}function Jr(t,o){let e=(i)=>i.replaceAll("\\","/").replace(/\/+$/,""),n=e(t),r=e(o);return r===n||r.startsWith(`${n}/`)}function Xr(t,o){if(/^file:/i.test(t)){let e=new URL(t),n=decodeURIComponent(e.pathname);if(/^\/[A-Za-z]:\//.test(n))n=n.slice(1);if(e.hostname&&e.hostname!=="localhost")n=`//${e.hostname}${n}`;return n}if(s(t))return t;if(o===null)throw Error("The conversation's directory is unavailable");return`${o.replace(/[\\/]$/,"")}/${t}`}
2
+ export{$o,Vt,Jr,Xr};
@@ -1,2 +1,2 @@
1
- var Ts=(t)=>{let e=t.startsWith("/")&&t!=="/"?t.replace(/\/+$/,""):t,r=/^\/(?:private\/)?(var|tmp|etc)(\/.*)?$/.exec(e);if(!r)return[e];let s=`${r[1]}${r[2]??""}`;return[`/private/${s}`,`/${s}`]};
2
- export{Ts};
1
+ var Ms=(t)=>{let e=t.startsWith("/")&&t!=="/"?t.replace(/\/+$/,""):t,r=/^\/(?:private\/)?(var|tmp|etc)(\/.*)?$/.exec(e);if(!r)return[e];let s=`${r[1]}${r[2]??""}`;return[`/private/${s}`,`/${s}`]};
2
+ export{Ms};
@@ -1,2 +1,2 @@
1
- import{Wr}from"./chunk-b3mja7d9.js";function Gr(t,o){if(Wr(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
2
- export{Gr};
1
+ import{Zr}from"./chunk-rcj2df96.js";function zr(t,o){if(Zr(o))return y(t);return t.map((e)=>({kind:"block",block:e}))}function i(t){return t.type==="thinking"||t.type==="tool_use"||t.type==="subagent"||t.type==="collab"}function c(t){return t.type==="tool_use"&&t.kind!=="think"}function y(t){let o=[],e=[],r=()=>{if(e.length===0)return;o.push({kind:"codexActivityGroup",blocks:e}),e=[]};for(let n of t){if(i(n)&&c(n)){e.push(n);continue}if(r(),i(n)){o.push({kind:"codexActivityGroup",blocks:[n]});continue}o.push({kind:"block",block:n})}return r(),o}
2
+ export{zr};
@@ -1,2 +1,2 @@
1
- import{s}from"./chunk-pxbww0j1.js";import{ln}from"./chunk-evgfpd16.js";import{O}from"./chunk-kv1v7kgn.js";import{cn,Le}from"./chunk-95f0wens.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as H,zhCN as L}from"date-fns/locale";import{ClockIcon as z,MessageSquareIcon as E}from"lucide-react";import{useEffect as g,useState as A}from"react";import{Input as D}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as w}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as M}from"react/jsx-runtime";var S={en:H,"zh-CN":L};function ft(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:r})}function Ne({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:C,PathAction:u}=s(),f=Le(),y=cn();g(()=>{f(n)},[n,f]);let[I,p]=A(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?ft(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(z,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(ln,{title:n?o(D,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(O,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(E,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(M,{children:[l,l&&a!==void 0&&o(w,{}),a]}):void 0})}
1
+ import{s}from"./chunk-hd5zm7tc.js";import{ln}from"./chunk-evgfpd16.js";import{O}from"./chunk-kv1v7kgn.js";import{cn,Le}from"./chunk-13jj645z.js";import{formatDistanceToNowStrict as x}from"date-fns";import{enUS as H,zhCN as L}from"date-fns/locale";import{ClockIcon as z,MessageSquareIcon as E}from"lucide-react";import{useEffect as g,useState as A}from"react";import{Input as D}from"@nyssance/shadcn/vega/components/ui/input";import{Separator as w}from"@nyssance/shadcn/vega/components/ui/separator";import{jsx as o,jsxs as h,Fragment as M}from"react/jsx-runtime";var S={en:H,"zh-CN":L};function ft(t,a){let r=a==="zh-CN"?S["zh-CN"]:S.en;return x(new Date(t),{locale:r})}function Ne({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:C,PathAction:u}=s(),f=Le(),y=cn();g(()=>{f(n)},[n,f]);let[I,p]=A(t.title??"");g(()=>{if(n)p(t.title??"")},[n,t.title]);let d=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},N=t.archived?i("sessionList.archived"):t.updatedAt!==null?ft(t.updatedAt,C.language):null,v=[];if(N!==null)v.push({icon:o(z,{className:"size-3.5"}),text:N});let l=u&&o(u,{cwd:t.cwd,onOpened:y});return o(ln,{title:n?o(D,{autoFocus:!0,value:I,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>p(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")d(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>d(e.target.value)}):h("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(O,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(E,{className:"size-3.5"}),details:v,actions:l||a!==void 0?h(M,{children:[l,l&&a!==void 0&&o(w,{}),a]}):void 0})}
2
2
  export{ft,Ne};
@@ -1,6 +1,6 @@
1
- var a=["auto","1:1","3:4","9:16","4:3","16:9"],qi=["For image generation and editing, use the application generate_image tool. The host owns the selected image model and credentials. Use attached images as references. Do not substitute another image tool or call provider endpoints yourself.","The application already renders, stores and provides downloads for every successful image result. These are image requests, not coding or filesystem tasks. Do not read imagegen skill files, run shell/Python commands, write Base64 or PNG files, or create download links merely to deliver an image. A request for a PNG or transparent background does not request a filesystem export.","Call generate_image once for the requested image or variant batch. After success, finish the turn using the returned image reference, for example ![Image](reference). Do not regenerate a successful result to change its display or packaging. If a capability is unsupported, explain briefly rather than starting another generation or coding task.","In code mode, the tool result may be a string containing JSON metadata followed by image data URIs, rather than an object with a content property. If necessary, output only its first JSON metadata line to obtain the image reference. Do not echo, inspect, decode or write the image data: the host already displays it."].join(`
1
+ var a=["auto","1:1","3:4","9:16","4:3","16:9"],Wi=["For image generation and editing, use the application generate_image tool. The host owns the selected image model and credentials. Use attached images as references. Do not substitute another image tool or call provider endpoints yourself.","The application already renders, stores and provides downloads for every successful image result. These are image requests, not coding or filesystem tasks. Do not read imagegen skill files, run shell/Python commands, write Base64 or PNG files, or create download links merely to deliver an image. A request for a PNG or transparent background does not request a filesystem export.","Call generate_image once for the requested image or variant batch. After success, finish the turn using the returned image reference, for example ![Image](reference). Do not regenerate a successful result to change its display or packaging. If a capability is unsupported, explain briefly rather than starting another generation or coding task.","In code mode, the tool result may be a string containing JSON metadata followed by image data URIs, rather than an object with a content property. If necessary, output only its first JSON metadata line to obtain the image reference. Do not echo, inspect, decode or write the image data: the host already displays it."].join(`
2
2
 
3
- `);function fo(e){if(e===void 0)return;if(!a.includes(e))throw Error("Invalid image aspect ratio");return e}function Wi(e,t){return t&&t!=="auto"?`${e}
3
+ `);function ho(e){if(e===void 0)return;if(!a.includes(e))throw Error("Invalid image aspect ratio");return e}function Zi(e,t){return t&&t!=="auto"?`${e}
4
4
 
5
5
  Produce the image with an aspect ratio of ${t}. Preserve subject proportions without stretching.`:e}
6
- export{qi,fo,Wi};
6
+ export{Wi,ho,Zi};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-aj0z9a5r.js";import{Nn}from"./chunk-svxnx1c7.js";import{FileIcon as i,XIcon as m}from"lucide-react";import{Badge as r}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Oi({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(r,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(i,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:Nn(e)}),o(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:Nn(e)}),onClick:()=>n(e),children:o(m,{className:"size-3"})})]},e))})}
2
- export{Oi};
1
+ import{t}from"./chunk-bb2s9nb6.js";import{Tn}from"./chunk-kvmd0mhe.js";import{FileIcon as i,XIcon as m}from"lucide-react";import{Badge as r}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as l}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as o,jsxs as c}from"react/jsx-runtime";function Hi({mentions:a,onRemove:n}){let{t:s}=t();if(a.length===0)return null;return o("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:a.map((e)=>c(r,{variant:"secondary",className:"gap-1 pe-0.5",title:e,children:[o(i,{className:"size-3"}),o("span",{className:"max-w-40 truncate",children:Tn(e)}),o(l,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":s("composer.removeMention",{name:Tn(e)}),onClick:()=>n(e),children:o(m,{className:"size-3"})})]},e))})}
2
+ export{Hi};
@@ -1,2 +1,2 @@
1
- import{E}from"./chunk-q8y2a23c.js";import{s,h}from"./chunk-pxbww0j1.js";import{v,f}from"./chunk-95f0wens.js";import{GlobeIcon as I,LogOutIcon as G}from"lucide-react";import{useRef as R,useState as c}from"react";import{Avatar as k,AvatarFallback as T,AvatarImage as B}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as H,DropdownMenuContent as U,DropdownMenuGroup as d,DropdownMenuItem as F,DropdownMenuLabel as j,DropdownMenuRadioGroup as z,DropdownMenuRadioItem as V,DropdownMenuSeparator as l,DropdownMenuSub as W,DropdownMenuSubContent as _,DropdownMenuSubTrigger as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function Ds(e){return o(d,{...e})}function Fs(e){return o(l,{...e})}function si({className:e,...r}){return o(F,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function Os({languages:e,value:r,onChange:i}){let a=s();return n(W,{children:[n(q,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(I,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(_,{children:o(z,{value:r,onValueChange:(t)=>void h(a,Promise.resolve(i(t))),children:e.map((t)=>o(V,{value:t.code,children:t.label},t.code))})})]})}function Hs({user:e,children:r,onSignOut:i,busy:a=!1}){let t=s(),{t:N}=t,[g,C]=c(!1),[L,m]=c(!1),M=R(null),[w,S]=c({width:0,offset:0}),O=(x)=>{if(x){let p=M.current,u=p?.closest("[data-sidebar-footer-row]");if(!p||!u)throw Error("AccountMenu must sit in a [data-sidebar-footer-row] row");let y=u.getBoundingClientRect(),A=p.getBoundingClientRect(),P=getComputedStyle(u).direction==="rtl";S({width:u.clientWidth,offset:P?y.right-A.right:A.left-y.left})}C(x)};E(g);let b=a||L,D=n(k,{className:"size-[18px] after:border-0",children:[o(B,{src:e.avatar??void 0,alt:""}),o(T,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(H,{open:g,onOpenChange:O,children:[n(J,{ref:M,render:o(f,{disabled:b,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(v,{children:D}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(U,{side:"top",align:"start",alignOffset:-w.offset,sideOffset:8,style:{width:w.width},children:[n(d,{children:[n(j,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[o(v,{children:D}),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(l,{})]}),r,r!=null&&o(l,{}),o(d,{children:n(si,{disabled:b,onClick:()=>{m(!0),h(t,i()).finally(()=>m(!1))},children:[o(G,{}),N("sessionList.signOut")]})})]})]})}
2
- export{Ds,Fs,si,Os,Hs};
1
+ import{E}from"./chunk-tdmz20zc.js";import{s,h}from"./chunk-hd5zm7tc.js";import{v,f}from"./chunk-13jj645z.js";import{GlobeIcon as I,LogOutIcon as G}from"lucide-react";import{useRef as R,useState as c}from"react";import{Avatar as k,AvatarFallback as T,AvatarImage as B}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as H,DropdownMenuContent as U,DropdownMenuGroup as d,DropdownMenuItem as F,DropdownMenuLabel as j,DropdownMenuRadioGroup as z,DropdownMenuRadioItem as V,DropdownMenuSeparator as l,DropdownMenuSub as W,DropdownMenuSubContent as _,DropdownMenuSubTrigger as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function Fs(e){return o(d,{...e})}function Os(e){return o(l,{...e})}function ai({className:e,...r}){return o(F,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function Hs({languages:e,value:r,onChange:i}){let a=s();return n(W,{children:[n(q,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(I,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(_,{children:o(z,{value:r,onValueChange:(t)=>void h(a,Promise.resolve(i(t))),children:e.map((t)=>o(V,{value:t.code,children:t.label},t.code))})})]})}function Us({user:e,children:r,onSignOut:i,busy:a=!1}){let t=s(),{t:N}=t,[g,C]=c(!1),[L,m]=c(!1),M=R(null),[w,S]=c({width:0,offset:0}),O=(x)=>{if(x){let p=M.current,u=p?.closest("[data-sidebar-footer-row]");if(!p||!u)throw Error("AccountMenu must sit in a [data-sidebar-footer-row] row");let y=u.getBoundingClientRect(),A=p.getBoundingClientRect(),P=getComputedStyle(u).direction==="rtl";S({width:u.clientWidth,offset:P?y.right-A.right:A.left-y.left})}C(x)};E(g);let b=a||L,D=n(k,{className:"size-[18px] after:border-0",children:[o(B,{src:e.avatar??void 0,alt:""}),o(T,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(H,{open:g,onOpenChange:O,children:[n(J,{ref:M,render:o(f,{disabled:b,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(v,{children:D}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(U,{side:"top",align:"start",alignOffset:-w.offset,sideOffset:8,style:{width:w.width},children:[n(d,{children:[n(j,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[o(v,{children:D}),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(l,{})]}),r,r!=null&&o(l,{}),o(d,{children:n(ai,{disabled:b,onClick:()=>{m(!0),h(t,i()).finally(()=>m(!1))},children:[o(G,{}),N("sessionList.signOut")]})})]})]})}
2
+ export{Fs,Os,ai,Hs,Us};
@@ -1,2 +1,2 @@
1
- import{Kr}from"./chunk-wf4z9w5x.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function jr(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return Kr(a,r)}
2
- export{jr};
1
+ import{qr}from"./chunk-tfkz3bae.js";import{isPlanItems as o}from"@nyssance/codex-acp-v2/client";function Kr(s,r){let n=s.items.findLast((e)=>e.kind!=="user"),a=s.items.map((e)=>{switch(e.kind){case"user":return{key:e.id,kind:"user",active:!1};case"tool":return{key:e.id,kind:"tool",active:e.status==="pending"||e.status==="in_progress"};case"compaction":return{key:e.id,kind:"compaction",active:e.status==="in_progress"};case"plan":return{key:e.id,kind:"plan",active:o(e.plan)&&e.plan.entries.some((t)=>t.status==="in_progress")};case"thought":return{key:e.id,kind:"reasoning",active:e===n};case"assistant":{let t=e._meta?.codex,i=typeof t==="object"&&t!==null&&(("messageCompleted"in t)&&t.messageCompleted===!0||("messageCompletedAt"in t)&&typeof t.messageCompletedAt==="number");return{key:e.id,kind:s.final.includes(e)?"answer":"text",active:e===n&&!i}}}});return qr(a,r)}
2
+ export{Kr};
@@ -0,0 +1,2 @@
1
+ import{invoke as r}from"@tauri-apps/api/core";import{listen as t,once as n,emit as s,emitTo as o}from"@tauri-apps/api/event";var u={providersRead:()=>r("plugin:alwith-chat|providers_read"),providersSave:(e)=>r("plugin:alwith-chat|providers_save",e),providersSaveCustom:(e)=>r("plugin:alwith-chat|providers_save_custom",e),providersRemoveCustom:(e)=>r("plugin:alwith-chat|providers_remove_custom",e),providersTest:(e)=>r("plugin:alwith-chat|providers_test",e),providersApply:()=>r("plugin:alwith-chat|providers_apply"),providersAccountBind:(e)=>r("plugin:alwith-chat|providers_account_bind",e),providersRefreshManaged:(e)=>r("plugin:alwith-chat|providers_refresh_managed",e),providersClearManaged:()=>r("plugin:alwith-chat|providers_clear_managed"),readSkillDocument:(e)=>r("plugin:alwith-chat|read_skill_document",e),sessionsList:(e)=>r("plugin:alwith-chat|sessions_list",e),sessionsCountTypes:(e)=>r("plugin:alwith-chat|sessions_count_types",e),sessionsPersonaEvidence:(e)=>r("plugin:alwith-chat|sessions_persona_evidence",e),getModelPricing:()=>r("plugin:alwith-chat|get_model_pricing"),scanSessionAggregates:(e)=>r("plugin:alwith-chat|scan_session_aggregates",e),exportWeekSessions:()=>r("plugin:alwith-chat|export_week_sessions"),dailyTokenUsage:(e)=>r("plugin:alwith-chat|daily_token_usage",e),downloadUsageJson:(e)=>r("plugin:alwith-chat|download_usage_json",e),wordCloud:(e)=>r("plugin:alwith-chat|word_cloud",e),readDroppedFile:(e)=>r("plugin:alwith-chat|read_dropped_file",e),clipboardFilePaths:()=>r("plugin:alwith-chat|clipboard_file_paths"),writePastedFile:(e)=>r("plugin:alwith-chat|write_pasted_file",e),readImage:(e)=>r("plugin:alwith-chat|read_image",e),saveFile:(e)=>r("plugin:alwith-chat|save_file",e),writeTextAttachment:(e)=>r("plugin:alwith-chat|write_text_attachment",e),previewFile:(e)=>r("plugin:alwith-chat|preview_file",e)},fo={"providers:changed":{name:"providers:changed",listen:(e)=>t("providers:changed",e),once:(e)=>n("providers:changed",e),emit:(e)=>s("providers:changed",e),emitTo:(e,i)=>o(e,"providers:changed",i)},"providers:managed-revoked":{name:"providers:managed-revoked",listen:(e)=>t("providers:managed-revoked",e),once:(e)=>n("providers:managed-revoked",e),emit:(e)=>s("providers:managed-revoked",e),emitTo:(e,i)=>o(e,"providers:managed-revoked",i)}};function Da(e){return typeof e==="object"&&e!==null&&typeof e.code==="string"&&typeof e.message==="string"}function Xa(e){if(Da(e)||e instanceof Error)return e.message;return String(e)}
2
+ export{u,fo,Da,Xa};
@@ -1,2 +1,2 @@
1
- import{qe}from"./chunk-aj0z9a5r.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 Fn({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(qe,{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 x(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
2
- export{Fn,e,x};
1
+ import{qe}from"./chunk-bb2s9nb6.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 On({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(qe,{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 x(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
2
+ export{On,e,x};
@@ -1,2 +1,2 @@
1
- import{Re}from"./chunk-e99t3sk5.js";function di(r){let s=Re(),c=r.split("|").map((e)=>e.trim()).filter(Boolean),o=c.reduce((e,t)=>t.split("+").length>e.split("+").length?t:e,c[0]??r),a=[];for(let e of o.split("+").map((t)=>t.trim()))switch(e.toLowerCase()){case"commandorcontrol":case"cmdorctrl":a.push(s?"⌘":"Ctrl");break;case"command":case"meta":case"cmd":a.push(s?"⌘":"Win");break;case"control":case"ctrl":a.push(s?"⌃":"Ctrl");break;case"shift":a.push(s?"⇧":"Shift");break;case"alt":case"option":a.push(s?"⌥":"Alt");break;case"enter":case"return":a.push(s?"↩":"Enter");break;case"tab":a.push(s?"⇥":"Tab");break;case"backspace":case"delete":a.push(s?"⌫":"Backspace");break;case"escape":case"esc":a.push(s?"⎋":"Esc");break;case"space":a.push(s?"␣":"Space");break;case"fn":a.push("fn");break;case"arrowleft":a.push("←");break;case"arrowright":a.push("→");break;case"arrowup":a.push("↑");break;case"arrowdown":a.push("↓");break;default:a.push(e.toUpperCase())}return a}function Ee(r){return di(r).join(Re()?"":"+")}
2
- export{di,Ee};
1
+ import{Re}from"./chunk-94fwccyb.js";function ui(r){let s=Re(),c=r.split("|").map((e)=>e.trim()).filter(Boolean),o=c.reduce((e,t)=>t.split("+").length>e.split("+").length?t:e,c[0]??r),a=[];for(let e of o.split("+").map((t)=>t.trim()))switch(e.toLowerCase()){case"commandorcontrol":case"cmdorctrl":a.push(s?"⌘":"Ctrl");break;case"command":case"meta":case"cmd":a.push(s?"⌘":"Win");break;case"control":case"ctrl":a.push(s?"⌃":"Ctrl");break;case"shift":a.push(s?"⇧":"Shift");break;case"alt":case"option":a.push(s?"⌥":"Alt");break;case"enter":case"return":a.push(s?"↩":"Enter");break;case"tab":a.push(s?"⇥":"Tab");break;case"backspace":case"delete":a.push(s?"⌫":"Backspace");break;case"escape":case"esc":a.push(s?"⎋":"Esc");break;case"space":a.push(s?"␣":"Space");break;case"fn":a.push("fn");break;case"arrowleft":a.push("←");break;case"arrowright":a.push("→");break;case"arrowup":a.push("↑");break;case"arrowdown":a.push("↓");break;default:a.push(e.toUpperCase())}return a}function Ee(r){return ui(r).join(Re()?"":"+")}
2
+ export{ui,Ee};
@@ -1,2 +1,2 @@
1
- import{ke}from"./chunk-33fxyn5r.js";import{ut}from"./chunk-4ma6bmcm.js";import{isContentEntry as d,isImage as l,isText as p}from"@nyssance/codex-acp-v2/client";var Aa="generate_image",qa=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],hl={model:"wham",size:"auto"},Yr={name:Aa,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1},annotations:{readOnlyHint:!0}};function je(r){let e=r.content.filter(d).map((n)=>n.content);if(e.length)return e;let o=r.rawOutput?.result;return Array.isArray(o?.content)?o.content:[]}function dt(r){let e=r.rawInput;return e?.server==="alwith"&&e.tool===Aa}function es(r){return r.items.flatMap((e)=>{if(!ut(e)||!dt(e))return[];return je(e).flatMap((o,n)=>{let s=ke(o);return s===null?[]:[[`${e.id}:${n}`,s]]})})}function ts(r){return r.items.flatMap((e)=>{if(!ut(e))return[];let o=e.rawInput,n=je(e),s={};for(let i of n){if(!p(i)||!i.text.startsWith("{"))continue;try{let t=JSON.parse(i.text);if(t&&typeof t==="object"&&"kind"in t&&t.kind==="alwith.image")s={..."model"in t&&typeof t.model==="string"?{model:t.model}:{},..."size"in t&&typeof t.size==="string"?{size:t.size}:{}}}catch(t){if(!(t instanceof SyntaxError))throw t}}return n.flatMap((i,t)=>{if(!l(i))return[];let{mimeType:a,data:m}=i;return[{id:`${e.id}:${t}`,toolId:e.id,...s,...typeof o?.arguments?.prompt==="string"?{prompt:o.arguments.prompt}:{},mimeType:a,data:m,src:`data:${a};base64,${m}`}]})})}function re(r){let e=qa.find((o)=>o.id===r.model);if(!e||!e.sizes.includes(r.size))throw Error("Invalid image model or size");return e}function vl(r,e,o){let n=re(r);if(n.provider!=="seedream")throw Error("Expected a Seedream model");if(o.length>n.maxReferences)throw Error(`This model accepts at most ${n.maxReferences} reference images`);return{model:n.id,prompt:e,size:r.size,response_format:"b64_json",watermark:!1,...o.length?{image:o}:{},...n.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
2
- export{Aa,qa,hl,Yr,je,dt,es,ts,re,vl};
1
+ import{ke}from"./chunk-sbcgvk9a.js";import{ut}from"./chunk-4ma6bmcm.js";import{isContentEntry as d,isImage as l,isText as p}from"@nyssance/codex-acp-v2/client";var Aa="generate_image",qa=[{id:"MiniMax-H3-Image",label:"MiniMax H3 Image",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"MiniMax-H3-Image-Highspeed",label:"MiniMax H3 Image Highspeed",provider:"minimax",sizes:["1K","2K","4K"],maxReferences:16},{id:"wham",label:"ChatGPT Images",provider:"chatgpt",sizes:["auto"],maxReferences:16},{id:"doubao-seedream-4-5-251128",label:"Seedream 4.5",provider:"seedream",sizes:["2K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-lite-260128",label:"Seedream 5.0 Lite",provider:"seedream",sizes:["2K","3K","4K"],maxReferences:14},{id:"doubao-seedream-5-0-pro-260628",label:"Seedream 5.0 Pro",provider:"seedream",sizes:["1K","2K"],maxReferences:10}],hl={model:"wham",size:"auto"},es={name:Aa,description:"Generate or edit images using the user's selected image model. Use this tool for image creation and editing. For edits, supply reference IDs returned by earlier calls or the current image request; do not read credentials or call image services yourself. Return the generated image to the user. The host controls model selection.",inputSchema:{type:"object",properties:{prompt:{type:"string",description:"Complete image generation or editing instructions"},references:{type:"array",items:{type:"string"},description:"Image reference IDs supplied by the host or previous image results"}},required:["prompt"],additionalProperties:!1},annotations:{readOnlyHint:!0}};function je(r){let e=r.content.filter(d).map((n)=>n.content);if(e.length)return e;let o=r.rawOutput?.result;return Array.isArray(o?.content)?o.content:[]}function dt(r){let e=r.rawInput;return e?.server==="alwith"&&e.tool===Aa}function ts(r){return r.items.flatMap((e)=>{if(!ut(e)||!dt(e))return[];return je(e).flatMap((o,n)=>{let s=ke(o);return s===null?[]:[[`${e.id}:${n}`,s]]})})}function ns(r){return r.items.flatMap((e)=>{if(!ut(e))return[];let o=e.rawInput,n=je(e),s={};for(let i of n){if(!p(i)||!i.text.startsWith("{"))continue;try{let t=JSON.parse(i.text);if(t&&typeof t==="object"&&"kind"in t&&t.kind==="alwith.image")s={..."model"in t&&typeof t.model==="string"?{model:t.model}:{},..."size"in t&&typeof t.size==="string"?{size:t.size}:{}}}catch(t){if(!(t instanceof SyntaxError))throw t}}return n.flatMap((i,t)=>{if(!l(i))return[];let{mimeType:a,data:m}=i;return[{id:`${e.id}:${t}`,toolId:e.id,...s,...typeof o?.arguments?.prompt==="string"?{prompt:o.arguments.prompt}:{},mimeType:a,data:m,src:`data:${a};base64,${m}`}]})})}function re(r){let e=qa.find((o)=>o.id===r.model);if(!e||!e.sizes.includes(r.size))throw Error("Invalid image model or size");return e}function vl(r,e,o){let n=re(r);if(n.provider!=="seedream")throw Error("Expected a Seedream model");if(o.length>n.maxReferences)throw Error(`This model accepts at most ${n.maxReferences} reference images`);return{model:n.id,prompt:e,size:r.size,response_format:"b64_json",watermark:!1,...o.length?{image:o}:{},...n.id==="doubao-seedream-4-5-251128"?{}:{output_format:"png"}}}
2
+ export{Aa,qa,hl,es,je,dt,ts,ns,re,vl};
@@ -1,2 +1,2 @@
1
- import{fr}from"./chunk-rb6mjycp.js";import{g}from"./chunk-q8c4k6qh.js";import{cn as v}from"cn";import{PaperclipIcon as k,XIcon as T}from"lucide-react";import{Fragment as M,useEffect as L,useRef as z,useState as P}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as E,HoverCardContent as R,HoverCardTrigger as D}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(R,{align:"start",...t})}function mr({data:t,t:n,className:l,...m}){let c=g(),[u,f]=P(!1),[I,d]=P(1),C=z(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",A=a||(o?n("input.image"):n("input.attachment"));return L(()=>{if(!u)return;let p=0.1,h=(i)=>Math.min(10,Math.max(0.1,i)),y=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,x=s==="+"||s==="=",H=s==="-"||s==="_",w=s==="0";if(!x&&!H&&!w)return;i.preventDefault(),d((b)=>{if(w)return 1;if(x)return h(b+p);return h(b-p)})};return window.addEventListener("keydown",y,{passive:!1}),()=>window.removeEventListener("keydown",y)},[u]),r(K,{children:[r(E,{children:[e(D,{render:r("div",{className:v("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",l),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(N,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{d(1),f(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(k,{className:"size-3"})}),r(N,{"aria-label":n("input.removeAttachment"),className:v("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(p)=>{p.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(T,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e(fr,{containerRef:C,filename:a||n("input.image"),onOpenChange:f,onScaleChange:d,open:u,scale:I,url:t.url})]})}function gr({children:t,className:n,...l}){let m=g();if(!m.files.length)return null;return e("div",{className:v("flex w-full flex-wrap items-center gap-1",n),...l,children:m.files.map((c)=>e(M,{children:t(c)},c.id))})}
2
- export{mr,gr};
1
+ import{hr}from"./chunk-61bnywk9.js";import{g}from"./chunk-hqfmwbq5.js";import{cn as v}from"cn";import{PaperclipIcon as k,XIcon as T}from"lucide-react";import{Fragment as M,useEffect as L,useRef as z,useState as P}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{HoverCard as E,HoverCardContent as R,HoverCardTrigger as D}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as e,jsxs as r,Fragment as K}from"react/jsx-runtime";function F(t){return e(R,{align:"start",...t})}function gr({data:t,t:n,className:l,...m}){let c=g(),[u,f]=P(!1),[I,d]=P(1),C=z(null),a=t.filename||"",o=(t.mediaType?.startsWith("image/")&&t.url?"image":"file")==="image",A=a||(o?n("input.image"):n("input.attachment"));return L(()=>{if(!u)return;let p=0.1,h=(i)=>Math.min(10,Math.max(0.1,i)),y=(i)=>{if(!(i.ctrlKey||i.metaKey))return;let s=i.key,x=s==="+"||s==="=",H=s==="-"||s==="_",w=s==="0";if(!x&&!H&&!w)return;i.preventDefault(),d((b)=>{if(w)return 1;if(x)return h(b+p);return h(b-p)})};return window.addEventListener("keydown",y,{passive:!1}),()=>window.removeEventListener("keydown",y)},[u]),r(K,{children:[r(E,{children:[e(D,{render:r("div",{className:v("group border-border hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent relative flex h-8 cursor-pointer items-center gap-1.5 rounded-md border px-1.5 text-sm font-medium transition-all select-none",l),...m,children:[r("div",{className:"relative size-5 shrink-0",children:[o?e(N,{type:"button",variant:"ghost",size:"icon-xs","aria-label":n("input.image"),className:"bg-background absolute inset-0 size-5 overflow-hidden rounded p-0 transition-opacity group-hover:opacity-0",onClick:()=>{d(1),f(!0)},children:e("img",{alt:a||"attachment",className:"size-5 object-cover",height:20,src:t.url,width:20})}):e("div",{className:"bg-background text-muted-foreground absolute inset-0 flex size-5 items-center justify-center overflow-hidden rounded transition-opacity group-hover:opacity-0",children:e(k,{className:"size-3"})}),r(N,{"aria-label":n("input.removeAttachment"),className:v("absolute -top-1 -right-1 size-4 rounded-full p-0 opacity-0 transition-opacity [&>svg]:size-3","pointer-events-none group-hover:pointer-events-auto group-hover:opacity-100"),onClick:(p)=>{p.stopPropagation(),c.remove(t.id)},type:"button",variant:"ghost",children:[e(T,{}),e("span",{className:"sr-only",children:n("input.removeAttachment")})]})]}),!o&&e("span",{className:"max-w-40 flex-1 truncate text-xs",children:A})]})}),e(F,{className:"w-auto p-2",children:r("div",{className:"w-auto space-y-3",children:[o&&e("div",{className:"flex max-h-96 w-96 items-center justify-center overflow-hidden rounded-md border",children:e("img",{alt:a||"attachment preview",className:"max-h-full max-w-full object-contain",height:384,src:t.url,width:448})}),e("div",{className:"flex items-center gap-2.5",children:r("div",{className:"min-w-0 flex-1 space-y-1 px-0.5",children:[e("h4",{className:"truncate text-sm leading-none font-semibold",children:a||(o?"Image":"Attachment")}),t.mediaType&&e("p",{className:"text-muted-foreground truncate font-mono text-xs",children:t.mediaType})]})})]})})]}),o&&t.url&&e(hr,{containerRef:C,filename:a||n("input.image"),onOpenChange:f,onScaleChange:d,open:u,scale:I,url:t.url})]})}function fr({children:t,className:n,...l}){let m=g();if(!m.files.length)return null;return e("div",{className:v("flex w-full flex-wrap items-center gap-1",n),...l,children:m.files.map((c)=>e(M,{children:t(c)},c.id))})}
2
+ export{gr,fr};
@@ -1,2 +1,2 @@
1
- function Re(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function ui(a){if(a.shiftKey||a.altKey)return!1;return Re()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
2
- export{Re,ui};
1
+ function Re(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function pi(a){if(a.shiftKey||a.altKey)return!1;return Re()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
2
+ export{Re,pi};
@@ -1,2 +1,2 @@
1
- import{t}from"./chunk-aj0z9a5r.js";import{Bt}from"./chunk-22nybrkv.js";import{Nr,Ar,Er}from"./chunk-8be6eq9r.js";import{Mr}from"./chunk-9nz4c647.js";import{be}from"./chunk-d607659a.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 Oa(i,n){return{installUnlock:n==="none"?()=>()=>{}:Ar,preload:()=>{if(n!=="none")Nr(i)},playSequence:(a,d,l)=>Er(a,d,l,i,n)}}function Pr(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:be(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(Bt,{text:i.response,host:a})})]})}function Tr(i){return r(Mr,{...i,renderPreview:(n)=>r(T,{item:n})})}
2
- export{Oa,Pr,Tr};
1
+ import{t}from"./chunk-bb2s9nb6.js";import{Bt}from"./chunk-m31z2z11.js";import{Ar,Er,Rr}from"./chunk-2kb4rtw7.js";import{Nr}from"./chunk-7nfbzajq.js";import{be}from"./chunk-dqyfe90s.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 Oa(i,n){return{installUnlock:n==="none"?()=>()=>{}:Er,preload:()=>{if(n!=="none")Ar(i)},playSequence:(a,d,l)=>Rr(a,d,l,i,n)}}function Tr(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:be(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(Bt,{text:i.response,host:a})})]})}function Mr(i){return r(Nr,{...i,renderPreview:(n)=>r(T,{item:n})})}
2
+ export{Oa,Tr,Mr};
@@ -0,0 +1,2 @@
1
+ import{ne}from"./chunk-1byvdggd.js";import{b}from"./chunk-fg7za6sb.js";import{k}from"./chunk-bb2s9nb6.js";import{_n}from"./chunk-fwejeh0a.js";import{Ue}from"./chunk-qa29z7wk.js";import{yn}from"./chunk-nd0d4qr4.js";import{Ge}from"./chunk-z29anjt1.js";import{Fn}from"./chunk-7a3q5976.js";import{Be}from"./chunk-f6wp23k0.js";import{An,En}from"./chunk-xxaj040w.js";import{isTauri as R}from"@tauri-apps/api/core";import{useMemo as D,useRef as f}from"react";import{jsx as l,jsxs as g,Fragment as w}from"react/jsx-runtime";var P;function M(){return P??=yn(),P}function F({imagesOnly:i,allowDirectory:s,picker:n,openPicker:a,pickFilePaths:r}){let e=_n();return l(En,{imagesOnly:i,allowDirectory:s,picker:n,openPicker:a,pickFilePaths:r,sessionId:e.session.id,enabled:e.inputReady&&!e.sending&&!e.shellMode,onMention:e.addMention,onBusyChange:e.setAdding})}function ya({client:i,providers:s,catalog:n,shellCommands:a=!0,imagesOnly:r=!1,allowDirectory:e=!1,pickFilePaths:m,modelMenu:y,children:h,...u}){let p=f(null),c=f(null),d=!r&&m!==void 0&&R(),C=D(()=>({...An,useLocalImages:d,...d?{openFileDialog:()=>{if(!c.current)throw Error("The file picker is not ready");c.current()}}:{},accept:r?"image/png,image/jpeg,image/webp,image/gif":void 0,onSelectFiles(o){if(!p.current)throw Error("The file picker is not ready");p.current(o)}}),[r,d]),{session:t}=u,v=k(i.store,(o)=>o.modelRecovery[t.id]??!1);return g(w,{children:[v&&!ne(t.error?.error)&&l(Fn,{client:i,session:t,providers:s??M(),catalog:n},t.id),g(Ue,{modelMenu:y??{defaultGroup:b,catalog:(o)=>Ge(o,n),headerAction:l(Be,{})},...u,attachmentPolicy:C,onShellCommand:a?(o)=>i.executeShell(t.id,o):void 0,children:[l(F,{imagesOnly:r,allowDirectory:e,picker:p,openPicker:c,pickFilePaths:m}),h]})]})}
2
+ export{ya};