@alwith/module-chat 0.5.26 → 0.5.27

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 (339) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/approval/choice-elicitation-form.js +1 -1
  3. package/dist/approval/choice-schema.js +1 -1
  4. package/dist/approval/permission-options.js +1 -1
  5. package/dist/approval/permission-view.js +1 -1
  6. package/dist/approval/schema-elicitation-form.js +1 -1
  7. package/dist/approval/url-elicitation-card.js +1 -1
  8. package/dist/chunk-02mwhdhw.js +2 -0
  9. package/dist/{chunk-rsp574n3.js → chunk-074wn2jr.js} +2 -2
  10. package/dist/{chunk-jnc6b9r3.js → chunk-0stda83g.js} +2 -2
  11. package/dist/{chunk-k2gwmccn.js → chunk-0tzra5rn.js} +1 -1
  12. package/dist/{chunk-w233xc7k.js → chunk-0v2d2kme.js} +3 -3
  13. package/dist/chunk-0w6g1w1a.js +2 -0
  14. package/dist/chunk-0wr12bg8.js +2 -0
  15. package/dist/{chunk-a63k8tht.js → chunk-1341xyde.js} +2 -2
  16. package/dist/{chunk-xdm2are3.js → chunk-18j37y1m.js} +2 -2
  17. package/dist/{chunk-1zh28e39.js → chunk-1mcg9mwq.js} +2 -2
  18. package/dist/chunk-1sxf2rqx.js +2 -0
  19. package/dist/chunk-2aw4d623.js +2 -0
  20. package/dist/chunk-2fgwkj52.js +3 -0
  21. package/dist/{chunk-3jwbx8ch.js → chunk-2twh547k.js} +2 -2
  22. package/dist/{chunk-q0fhp33b.js → chunk-3137n54p.js} +2 -2
  23. package/dist/{chunk-x5swmb1j.js → chunk-31s3s58d.js} +2 -2
  24. package/dist/{chunk-nv3z0brr.js → chunk-3jd4dkv4.js} +2 -2
  25. package/dist/chunk-3jw1yt27.js +2 -0
  26. package/dist/{chunk-f06zyvek.js → chunk-3kk0rxch.js} +2 -2
  27. package/dist/{chunk-pv5g85k0.js → chunk-41z12m3j.js} +4 -4
  28. package/dist/{chunk-hf3t1bxh.js → chunk-45542yk3.js} +2 -2
  29. package/dist/{chunk-t2z4venp.js → chunk-4edeen4z.js} +2 -2
  30. package/dist/{chunk-wgta9nfd.js → chunk-4j2c9r6m.js} +2 -2
  31. package/dist/{chunk-81paw5rb.js → chunk-4kbkbvjp.js} +2 -2
  32. package/dist/chunk-4phhhm7t.js +2 -0
  33. package/dist/{chunk-a15vdarc.js → chunk-4saf1qa5.js} +2 -2
  34. package/dist/{chunk-n8yww1mr.js → chunk-53qt3tjb.js} +1 -1
  35. package/dist/chunk-546h1tk7.js +2 -0
  36. package/dist/{chunk-6g7btgsr.js → chunk-5b19mbh6.js} +2 -2
  37. package/dist/{chunk-jsabvejp.js → chunk-5t5y5e8n.js} +1 -1
  38. package/dist/{chunk-b7z51agd.js → chunk-5yb7twvm.js} +1 -1
  39. package/dist/{chunk-h9m4z5dk.js → chunk-5ysapftt.js} +3 -3
  40. package/dist/{chunk-s7yzvpmc.js → chunk-5yzjwrat.js} +3 -3
  41. package/dist/{chunk-rezwwmw7.js → chunk-6e1bwjtk.js} +2 -2
  42. package/dist/{chunk-8zrfdjy4.js → chunk-6k8m2c80.js} +2 -2
  43. package/dist/{chunk-ap6sr2c6.js → chunk-6t5war9h.js} +2 -2
  44. package/dist/{chunk-v5mzxjzc.js → chunk-6vntcyv6.js} +2 -2
  45. package/dist/{chunk-rp39j6ed.js → chunk-6w6yy1md.js} +2 -2
  46. package/dist/{chunk-ef99py8a.js → chunk-6whr1y2s.js} +2 -2
  47. package/dist/{chunk-81r1geaz.js → chunk-75vtd3ww.js} +2 -2
  48. package/dist/{chunk-1dbc0cfj.js → chunk-79jjxyb7.js} +2 -2
  49. package/dist/{chunk-22tg663v.js → chunk-7x1qnb20.js} +2 -2
  50. package/dist/chunk-7zryea1b.js +2 -0
  51. package/dist/{chunk-46phvpzh.js → chunk-84yjrafh.js} +2 -2
  52. package/dist/{chunk-fgk4f0jq.js → chunk-8a61phqa.js} +2 -2
  53. package/dist/{chunk-725wv6ca.js → chunk-8bdeyvy3.js} +2 -2
  54. package/dist/chunk-8fnjpx11.js +2 -0
  55. package/dist/{chunk-awfvvmjt.js → chunk-8gztbvxt.js} +2 -2
  56. package/dist/chunk-8kwxqckk.js +2 -0
  57. package/dist/{chunk-3xh0e0ya.js → chunk-8qyb69g5.js} +1 -1
  58. package/dist/{chunk-qn4zvgc9.js → chunk-8xb3b71p.js} +2 -2
  59. package/dist/{chunk-92xxp77d.js → chunk-90r8y97z.js} +2 -2
  60. package/dist/{chunk-vr0dfq9w.js → chunk-91zvyqnt.js} +2 -2
  61. package/dist/chunk-93y78gn4.js +2 -0
  62. package/dist/{chunk-10emnq39.js → chunk-95mynf7q.js} +2 -2
  63. package/dist/{chunk-wtf1eyzy.js → chunk-95qfzbmx.js} +1 -1
  64. package/dist/{chunk-nh0s0y35.js → chunk-98cbjkvk.js} +3 -3
  65. package/dist/{chunk-bfcswk98.js → chunk-99w9jq4v.js} +2 -2
  66. package/dist/{chunk-1k21j77z.js → chunk-9cqpn67f.js} +2 -2
  67. package/dist/chunk-9gt81b51.js +2 -0
  68. package/dist/{chunk-ch5v5zsw.js → chunk-9x0qmswv.js} +1 -1
  69. package/dist/chunk-az5ayr2d.js +2 -0
  70. package/dist/{chunk-pqphdgp6.js → chunk-b67h7yss.js} +1 -1
  71. package/dist/chunk-bfqqsv6a.js +2 -0
  72. package/dist/{chunk-nsb0d92p.js → chunk-br9wsczn.js} +2 -2
  73. package/dist/{chunk-vgrjqwbq.js → chunk-c0b3zze8.js} +2 -2
  74. package/dist/chunk-c26xgmyr.js +2 -0
  75. package/dist/chunk-cd4v63j8.js +2 -0
  76. package/dist/{chunk-dwn6bx69.js → chunk-d0cb9bks.js} +1 -1
  77. package/dist/{chunk-gha517v4.js → chunk-d0w04ydg.js} +2 -2
  78. package/dist/chunk-dtsybj2a.js +2 -0
  79. package/dist/{chunk-btdrvsgy.js → chunk-dxgha4a2.js} +2 -2
  80. package/dist/{chunk-2x9mxyxr.js → chunk-e2q5znh5.js} +2 -2
  81. package/dist/{chunk-rnrs0cqn.js → chunk-e43x30mv.js} +1 -1
  82. package/dist/{chunk-y1mqx60y.js → chunk-ee0krzt0.js} +2 -2
  83. package/dist/chunk-eg86g265.js +2 -0
  84. package/dist/{chunk-crx8p5zx.js → chunk-ehdqspxk.js} +2 -2
  85. package/dist/chunk-ek4acj2p.js +2 -0
  86. package/dist/{chunk-k1vkc88d.js → chunk-epg5w48v.js} +2 -2
  87. package/dist/chunk-eqwga6j5.js +2 -0
  88. package/dist/{chunk-7a668qzy.js → chunk-famkkndg.js} +2 -2
  89. package/dist/{chunk-tv0fwt2g.js → chunk-fpmspg92.js} +2 -2
  90. package/dist/{chunk-htzd730z.js → chunk-frbakxev.js} +2 -2
  91. package/dist/chunk-g7by9ta9.js +2 -0
  92. package/dist/{chunk-0kdemqjf.js → chunk-ggehtpkh.js} +2 -2
  93. package/dist/{chunk-fbq107z8.js → chunk-gsnqwd84.js} +2 -2
  94. package/dist/{chunk-5c5z2b48.js → chunk-h2ewgw0x.js} +2 -2
  95. package/dist/chunk-h6jkgcw1.js +2 -0
  96. package/dist/{chunk-e7j7mnmz.js → chunk-hck587pb.js} +2 -2
  97. package/dist/{chunk-b6nbarjg.js → chunk-hcwgc3r7.js} +2 -2
  98. package/dist/{chunk-2ac213n3.js → chunk-hs91aaaz.js} +2 -2
  99. package/dist/{chunk-w8qn76a1.js → chunk-htjpckp6.js} +5 -5
  100. package/dist/{chunk-4vk86bbk.js → chunk-jan870w7.js} +3 -3
  101. package/dist/{chunk-77cd8tev.js → chunk-jgwrjncj.js} +2 -2
  102. package/dist/{chunk-99ftqpgg.js → chunk-jkvqtwe6.js} +1 -1
  103. package/dist/{chunk-04kcmpnb.js → chunk-jrmygc4p.js} +1 -1
  104. package/dist/{chunk-tpwdaz8k.js → chunk-jrnfqqfc.js} +2 -2
  105. package/dist/{chunk-gjvpthp9.js → chunk-k2q7wjp6.js} +2 -2
  106. package/dist/{chunk-ymy8d3hp.js → chunk-k3e8wper.js} +3 -3
  107. package/dist/{chunk-t7drk9ja.js → chunk-kd87rt80.js} +2 -2
  108. package/dist/{chunk-3p9g44yz.js → chunk-m4eqmf0x.js} +5 -5
  109. package/dist/{chunk-j2y4wx1h.js → chunk-m9rgwr0p.js} +2 -2
  110. package/dist/{chunk-pp2qkwk7.js → chunk-n368fh3r.js} +3 -3
  111. package/dist/{chunk-y7ngqt59.js → chunk-ngqr3n0s.js} +2 -2
  112. package/dist/{chunk-hk66xnxp.js → chunk-pgqsw2sh.js} +2 -2
  113. package/dist/{chunk-xdvbb3av.js → chunk-pym8eb5y.js} +2 -2
  114. package/dist/{chunk-jst7n5r4.js → chunk-q0z9jq6p.js} +1 -1
  115. package/dist/{chunk-f7ggbprz.js → chunk-q70h5z14.js} +2 -2
  116. package/dist/{chunk-mttcvwhx.js → chunk-qd7jqtqr.js} +2 -2
  117. package/dist/{chunk-d3j5904d.js → chunk-qnc6w06c.js} +2 -2
  118. package/dist/{chunk-bvgqsaey.js → chunk-qxgmjjh2.js} +2 -2
  119. package/dist/{chunk-nr3spt0n.js → chunk-qy06pvy8.js} +2 -2
  120. package/dist/{chunk-09zfz3ap.js → chunk-r7svwjdg.js} +2 -2
  121. package/dist/{chunk-708232f3.js → chunk-rf5g26qv.js} +1 -1
  122. package/dist/chunk-rfn9vecr.js +2 -0
  123. package/dist/{chunk-667z0pac.js → chunk-s3h496tf.js} +2 -2
  124. package/dist/{chunk-03x33m2h.js → chunk-s56e2286.js} +2 -2
  125. package/dist/{chunk-dfcks9g4.js → chunk-s6m0ske7.js} +2 -2
  126. package/dist/{chunk-yez26qfc.js → chunk-scxhc46w.js} +2 -2
  127. package/dist/{chunk-hza92pfj.js → chunk-secfh4re.js} +2 -2
  128. package/dist/{chunk-nn72eqzh.js → chunk-shwnd0ta.js} +2 -2
  129. package/dist/{chunk-4qp43adx.js → chunk-sp39pqt6.js} +2 -2
  130. package/dist/{chunk-heyqzkxq.js → chunk-spfbykq8.js} +2 -2
  131. package/dist/{chunk-b1rvs016.js → chunk-srpsc10y.js} +1 -1
  132. package/dist/{chunk-jkbss7sb.js → chunk-szwq5b69.js} +1 -1
  133. package/dist/{chunk-730x182s.js → chunk-t3s1ydnq.js} +2 -2
  134. package/dist/{chunk-2apyrry0.js → chunk-thzq3tfa.js} +2 -2
  135. package/dist/chunk-tjkftq6f.js +2 -0
  136. package/dist/{chunk-pzmeeawh.js → chunk-tk2471ny.js} +1 -1
  137. package/dist/{chunk-epq42kf9.js → chunk-tk4t9h7r.js} +1 -1
  138. package/dist/{chunk-p58e9z34.js → chunk-v3etjs4w.js} +2 -2
  139. package/dist/{chunk-a5htm58g.js → chunk-v7rtfzg4.js} +2 -2
  140. package/dist/{chunk-wnn9r2r6.js → chunk-vm2qb3ns.js} +2 -2
  141. package/dist/chunk-wc53vqaw.js +2 -0
  142. package/dist/chunk-wcgwtn6h.js +2 -0
  143. package/dist/{chunk-chq163r8.js → chunk-wdrzhaxf.js} +2 -2
  144. package/dist/{chunk-sdf73s05.js → chunk-wpn4rdwv.js} +3 -3
  145. package/dist/{chunk-ce3wg766.js → chunk-x52rbm87.js} +2 -2
  146. package/dist/chunk-x54538jy.js +1 -0
  147. package/dist/{chunk-sjg8df4m.js → chunk-xhrs52gv.js} +2 -2
  148. package/dist/{chunk-g9gktxv9.js → chunk-xz6pb64j.js} +2 -2
  149. package/dist/chunk-yg6vhdq9.js +2 -0
  150. package/dist/{chunk-7appp9ad.js → chunk-z3dwf54f.js} +1 -1
  151. package/dist/{chunk-zyvvk8b2.js → chunk-z8njjc2c.js} +2 -2
  152. package/dist/{chunk-8xdak312.js → chunk-zfxwm1g9.js} +2 -2
  153. package/dist/chunk-zk6745qh.js +2 -0
  154. package/dist/{chunk-4jghs8rf.js → chunk-zx27nf5b.js} +2 -2
  155. package/dist/codex/activity-group.js +1 -1
  156. package/dist/codex/assistant-message.js +1 -1
  157. package/dist/codex/async-question-card.js +1 -1
  158. package/dist/codex/edited-files-card.js +1 -1
  159. package/dist/codex/image-view-activity.js +1 -1
  160. package/dist/codex/markdown-renderer.js +1 -1
  161. package/dist/codex/navigation-audio.js +1 -1
  162. package/dist/codex/navigation-preview.js +1 -1
  163. package/dist/codex/navigation-rail.js +1 -1
  164. package/dist/codex/patch-view.js +1 -1
  165. package/dist/codex/timeline-virtualizer.js +1 -1
  166. package/dist/codex/turn-activity.js +1 -1
  167. package/dist/codex/user-message.js +1 -1
  168. package/dist/codex/virtualized-turn-list.js +1 -1
  169. package/dist/collections/collection-emoji.js +1 -1
  170. package/dist/collections/collection-menu.js +1 -1
  171. package/dist/collections/collection-panel.js +1 -1
  172. package/dist/collections/collections.js +1 -1
  173. package/dist/collections/host.js +1 -1
  174. package/dist/collections/locales.js +1 -1
  175. package/dist/collections/model.js +1 -1
  176. package/dist/collections/store.js +1 -1
  177. package/dist/composer/completion-filter.js +1 -1
  178. package/dist/composer/completion-menu.js +1 -1
  179. package/dist/composer/effort-slider.js +1 -1
  180. package/dist/composer/menu-radio.js +1 -1
  181. package/dist/composer/model-select.js +1 -1
  182. package/dist/composer/permission-mode-select.js +1 -1
  183. package/dist/composer/prompt-input-attachments.js +1 -1
  184. package/dist/composer/prompt-input-clipboard.js +1 -1
  185. package/dist/composer/prompt-input-context.js +1 -1
  186. package/dist/composer/prompt-input-textarea.js +1 -1
  187. package/dist/composer/prompt-input.js +1 -1
  188. package/dist/conversation/action-card.js +1 -1
  189. package/dist/conversation/composer/composer.js +1 -1
  190. package/dist/conversation/composer/config-options.js +1 -1
  191. package/dist/conversation/composer/context.js +1 -1
  192. package/dist/conversation/composer/drafts.js +1 -1
  193. package/dist/conversation/composer/file-items.js +1 -1
  194. package/dist/conversation/composer/long-text.js +1 -1
  195. package/dist/conversation/composer/mention-chips.js +1 -1
  196. package/dist/conversation/composer/mention-uri.js +1 -1
  197. package/dist/conversation/composer/model-menu.js +1 -1
  198. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  199. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  200. package/dist/conversation/composer/prediction.js +1 -1
  201. package/dist/conversation/composer/slash-command-button.js +1 -1
  202. package/dist/conversation/composer/submit-button.js +1 -1
  203. package/dist/conversation/composer/usage-meter.js +1 -1
  204. package/dist/conversation/connection-notice.js +1 -1
  205. package/dist/conversation/context.js +1 -1
  206. package/dist/conversation/conversation-body.js +1 -1
  207. package/dist/conversation/conversation-search.js +1 -1
  208. package/dist/conversation/conversation-view.js +1 -1
  209. package/dist/conversation/conversation.js +1 -1
  210. package/dist/conversation/diff-modal.js +1 -1
  211. package/dist/conversation/draft-project-picker.js +1 -1
  212. package/dist/conversation/session-actions.js +1 -1
  213. package/dist/conversation/subagent-sessions.js +1 -1
  214. package/dist/image-lightbox.js +1 -1
  215. package/dist/lib/code-highlighter.js +1 -1
  216. package/dist/lib/fuzzy.js +1 -1
  217. package/dist/lib/group-blocks.js +1 -1
  218. package/dist/lib/limits.js +1 -1
  219. package/dist/lib/markdown-parser.js +1 -1
  220. package/dist/lib/markdown-rules.js +1 -1
  221. package/dist/lib/model-name.js +1 -1
  222. package/dist/lib/stream-style.js +1 -1
  223. package/dist/lib/streaming-markdown.js +1 -1
  224. package/dist/locales.d.ts +52 -0
  225. package/dist/locales.js +1 -1
  226. package/dist/plugins/catalog-header.js +1 -1
  227. package/dist/plugins/catalog-skeleton.js +1 -1
  228. package/dist/plugins/host.js +1 -1
  229. package/dist/plugins/locales.js +1 -1
  230. package/dist/plugins/pane.js +1 -1
  231. package/dist/plugins/panel-item.js +1 -1
  232. package/dist/plugins/plugin-detail-page.js +1 -1
  233. package/dist/plugins/plugin-icon.js +1 -1
  234. package/dist/plugins/plugin-icons.js +1 -1
  235. package/dist/plugins/plugins-page.js +1 -1
  236. package/dist/plugins/plugins.js +1 -1
  237. package/dist/plugins/skill-document.js +1 -1
  238. package/dist/plugins/skills-tab.js +1 -1
  239. package/dist/plugins/store.js +1 -1
  240. package/dist/plugins/toolbox-layout.js +1 -1
  241. package/dist/search/chat-search.js +1 -1
  242. package/dist/search/codex-source-matches.js +1 -1
  243. package/dist/search/dom-matches.js +1 -1
  244. package/dist/search/find-bar.js +1 -1
  245. package/dist/search/literal-matches.js +1 -1
  246. package/dist/session-list/account-menu.js +1 -1
  247. package/dist/session-list/activity-list.js +1 -1
  248. package/dist/session-list/archived-sessions.js +1 -1
  249. package/dist/session-list/help-menu.js +1 -1
  250. package/dist/session-list/highlight.js +1 -1
  251. package/dist/session-list/host.js +1 -1
  252. package/dist/session-list/hover-info-card.js +1 -1
  253. package/dist/session-list/locales.d.ts +52 -0
  254. package/dist/session-list/locales.js +1 -1
  255. package/dist/session-list/navigation-controls.d.ts +9 -0
  256. package/dist/session-list/navigation-controls.js +1 -0
  257. package/dist/session-list/navigation-header.js +1 -1
  258. package/dist/session-list/navigation-store.js +1 -1
  259. package/dist/session-list/navigation-tabs.d.ts +2 -1
  260. package/dist/session-list/navigation-tabs.js +1 -1
  261. package/dist/session-list/navigation.js +1 -1
  262. package/dist/session-list/platform.js +1 -1
  263. package/dist/session-list/row-stop-button.js +1 -1
  264. package/dist/session-list/session-groups.js +1 -1
  265. package/dist/session-list/session-info-card.js +1 -1
  266. package/dist/session-list/session-list.css +11 -0
  267. package/dist/session-list/session-list.d.ts +1 -0
  268. package/dist/session-list/session-list.js +1 -1
  269. package/dist/session-list/session-row.js +1 -1
  270. package/dist/session-list/session-state-menu.js +1 -1
  271. package/dist/session-list/shortcut-hint.js +1 -1
  272. package/dist/session-list/shortcut.js +1 -1
  273. package/dist/session-list/sidebar-overlay.js +1 -1
  274. package/dist/session-list/trailing-swap.js +1 -1
  275. package/dist/session-list/use-activity-notification.js +1 -1
  276. package/dist/session-list/use-activity-preview.js +1 -1
  277. package/dist/session-list/use-cmd-held.js +1 -1
  278. package/dist/session-list/use-project-sessions.js +1 -1
  279. package/dist/session-list/virtual-session-rows.js +1 -1
  280. package/dist/session-timeline/activity-group.js +1 -1
  281. package/dist/session-timeline/activity-projection.js +1 -1
  282. package/dist/session-timeline/assistant-content.js +1 -1
  283. package/dist/session-timeline/assistant-turn.js +1 -1
  284. package/dist/session-timeline/async-questions.js +1 -1
  285. package/dist/session-timeline/edited-files-card.js +1 -1
  286. package/dist/session-timeline/history-timeline.js +1 -1
  287. package/dist/session-timeline/host.js +1 -1
  288. package/dist/session-timeline/navigation-rail.js +1 -1
  289. package/dist/session-timeline/plan.js +1 -1
  290. package/dist/session-timeline/question-reply.js +1 -1
  291. package/dist/session-timeline/resource-content.js +1 -1
  292. package/dist/session-timeline/session-timeline.js +1 -1
  293. package/dist/session-timeline/turn-activity.js +1 -1
  294. package/dist/session-timeline/turn-error.js +1 -1
  295. package/dist/session-timeline/turn-time.js +1 -1
  296. package/dist/session-timeline/turns.js +1 -1
  297. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  298. package/dist/session-timeline/user-message.js +1 -1
  299. package/dist/settings/codex-account-card.js +1 -1
  300. package/dist/settings/login-card.js +1 -1
  301. package/dist/settings/model-alias-settings.js +1 -1
  302. package/dist/settings/model-aliases.js +1 -1
  303. package/dist/settings/provider-logos.js +1 -1
  304. package/dist/settings/provider-section.js +1 -1
  305. package/dist/settings/providers-port.js +1 -1
  306. package/dist/settings/providers.js +1 -1
  307. package/dist/settings/settings-bridge.js +1 -1
  308. package/dist/settings/settings.js +1 -1
  309. package/package.json +2 -2
  310. package/dist/chunk-04xjj6q3.js +0 -2
  311. package/dist/chunk-13yrk1nh.js +0 -2
  312. package/dist/chunk-2djv6s3a.js +0 -2
  313. package/dist/chunk-2dvryx1q.js +0 -2
  314. package/dist/chunk-2qgz3m2a.js +0 -2
  315. package/dist/chunk-3f3y9t21.js +0 -2
  316. package/dist/chunk-3mfdf7f8.js +0 -2
  317. package/dist/chunk-6fefnp6e.js +0 -2
  318. package/dist/chunk-6t98jn94.js +0 -2
  319. package/dist/chunk-9geb2z3g.js +0 -3
  320. package/dist/chunk-9mky3b7v.js +0 -2
  321. package/dist/chunk-a3tbf7mx.js +0 -2
  322. package/dist/chunk-a90z5e8w.js +0 -2
  323. package/dist/chunk-ab0err7k.js +0 -2
  324. package/dist/chunk-fprj3wy4.js +0 -2
  325. package/dist/chunk-h1f8wgyb.js +0 -2
  326. package/dist/chunk-k0dnnn77.js +0 -2
  327. package/dist/chunk-kpp4v1hs.js +0 -1
  328. package/dist/chunk-mahpnk66.js +0 -2
  329. package/dist/chunk-mzpdh336.js +0 -2
  330. package/dist/chunk-n432m43g.js +0 -2
  331. package/dist/chunk-p272qmbv.js +0 -2
  332. package/dist/chunk-p3hxcpfy.js +0 -2
  333. package/dist/chunk-py0zbgaj.js +0 -2
  334. package/dist/chunk-qn2jfxff.js +0 -2
  335. package/dist/chunk-rvh3nbvm.js +0 -2
  336. package/dist/chunk-s2w7e9pg.js +0 -2
  337. package/dist/chunk-v0p94epn.js +0 -2
  338. package/dist/chunk-wsbh4n9e.js +0 -2
  339. package/dist/chunk-zacep5bq.js +0 -2
@@ -1,2 +1,2 @@
1
- import{l,i}from"./chunk-wtf1eyzy.js";import{L,R,Y,F,D,ce}from"./chunk-kpp4v1hs.js";import{re}from"./chunk-b7z51agd.js";import{f}from"./chunk-1k21j77z.js";import{le}from"./chunk-nn72eqzh.js";import{E,ae}from"./chunk-tv0fwt2g.js";import{CheckIcon as U,SparklesIcon as V,XIcon as X}from"lucide-react";import{useDeferredValue as _,useState as v}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as J,DialogClose as K,DialogContent as Q,DialogDescription as W,DialogHeader as Z,DialogTitle as ee}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as te}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as se}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ne}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as ie,TabsContent as oe,TabsList as pe,TabsTrigger as me}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function P({skill:c}){let{assetUrl:m}=l(),[u,s]=v(!1),o=c.interface?.iconSmall,b=o&&m?m(o):c.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:b&&!u?t("img",{src:b,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(V,{className:"text-muted-foreground size-6"})})}function de({skill:c}){let{t:m}=l(),u=i((o)=>o.setSkillEnabled),s=i((o)=>(c.path in o.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(se,{className:"text-muted-foreground size-3.5"}),t(ne,{checked:c.enabled,disabled:s,"aria-label":`${m(c.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${c.interface?.displayName??c.name}`,onCheckedChange:(o)=>void u(c,o)})]})}function st({query:c,ready:m,onOpenPlugin:u}){let{t:s}=l(),o=i((e)=>e.skills),b=i((e)=>e.skillErrors),j=i((e)=>e.loading)||!m,z=i((e)=>e.installed),M=i((e)=>e.skillProjects),[B,H]=v(null),[k,G]=v(!1),[O,C]=v(null),x=_(c.trim().toLowerCase()),r=o.find((e)=>e.path===O),N=z.find(({plugin:e})=>e.id===r?.pluginId),p=o.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(x)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),d=[...["user","system","admin"].flatMap((e)=>{let a=o.filter((h)=>h.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((h)=>h.path)),path:null}]:[]}),...Object.entries(M).flatMap(([e,a])=>{if(!o.some((T)=>T.scope==="repo"&&a.includes(T.path)))return[];let h=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:h,paths:new Set(a),path:e}]})],q=d.map((e)=>e.label);for(let e of d)if(e.path&&q.filter((a)=>a===e.label).length>1)e.label=e.path;let g=d.find((e)=>e.id===B)??d[0],w=g?p.filter((e)=>g.paths.has(e.path)):[],A=k||x?p:p.slice(0,6),I=(e)=>t(D,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(ce,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(F,{className:"pointer-events-none relative translate-none! self-center!",children:t(P,{skill:a})}),n(R,{className:"pointer-events-none relative min-w-0",children:[t(te,{className:"block truncate",children:a.interface?.displayName??a.name}),t(Y,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(L,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(U,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(f,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${E} space-y-8 pt-6`,children:[b.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),j?t(re,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:p.length})})]}),p.length?I(A):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(x?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!x&&p.length>6&&t(y,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":k,onClick:()=>G((e)=>!e),children:k?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:p.length-6})})]}),g&&n(ie,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")H(e)},className:"gap-6",children:[t(pe,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:d.map((e)=>t(me,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),d.map((e)=>t(oe,{value:e.id,children:e.id===g.id&&(w.length?I(w):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(J,{open:!!r,onOpenChange:(e)=>{if(!e)C(null)},children:t(Q,{showCloseButton:!1,className:ae,children:r&&n(S,{children:[t(le,{path:r.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(P,{skill:r}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(de,{skill:r}),e,t(K,{render:t(y,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(X,{})})]})]}),n(Z,{className:"gap-3",children:[t(ee,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),t(W,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:r.description})]})]})},r.path),r.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),N?t(y,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(N)},children:N.plugin.interface?.displayName??N.plugin.name}):r.pluginId]})]})})})]})}
2
- export{st};
1
+ import{l,i}from"./chunk-95qfzbmx.js";import{L,E,Y,R,F,ae}from"./chunk-x54538jy.js";import{re}from"./chunk-5yb7twvm.js";import{h}from"./chunk-9cqpn67f.js";import{ce}from"./chunk-shwnd0ta.js";import{D,se}from"./chunk-fpmspg92.js";import{CheckIcon as U,SparklesIcon as V,XIcon as X}from"lucide-react";import{useDeferredValue as _,useState as v}from"react";import{Button as y}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as J,DialogClose as K,DialogContent as Q,DialogDescription as W,DialogHeader as Z,DialogTitle as ee}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as te}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as ne}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as le}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as ie,TabsContent as oe,TabsList as pe,TabsTrigger as me}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function P({skill:c}){let{assetUrl:m}=l(),[u,s]=v(!1),o=c.interface?.iconSmall,b=o&&m?m(o):c.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:b&&!u?t("img",{src:b,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(V,{className:"text-muted-foreground size-6"})})}function de({skill:c}){let{t:m}=l(),u=i((o)=>o.setSkillEnabled),s=i((o)=>(c.path in o.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(ne,{className:"text-muted-foreground size-3.5"}),t(le,{checked:c.enabled,disabled:s,"aria-label":`${m(c.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${c.interface?.displayName??c.name}`,onCheckedChange:(o)=>void u(c,o)})]})}function lt({query:c,ready:m,onOpenPlugin:u}){let{t:s}=l(),o=i((e)=>e.skills),b=i((e)=>e.skillErrors),j=i((e)=>e.loading)||!m,z=i((e)=>e.installed),M=i((e)=>e.skillProjects),[B,H]=v(null),[k,G]=v(!1),[O,C]=v(null),x=_(c.trim().toLowerCase()),r=o.find((e)=>e.path===O),N=z.find(({plugin:e})=>e.id===r?.pluginId),p=o.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(x)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),d=[...["user","system","admin"].flatMap((e)=>{let a=o.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(M).flatMap(([e,a])=>{if(!o.some((T)=>T.scope==="repo"&&a.includes(T.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],q=d.map((e)=>e.label);for(let e of d)if(e.path&&q.filter((a)=>a===e.label).length>1)e.label=e.path;let g=d.find((e)=>e.id===B)??d[0],w=g?p.filter((e)=>g.paths.has(e.path)):[],A=k||x?p:p.slice(0,6),I=(e)=>t(F,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(ae,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(y,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(R,{className:"pointer-events-none relative translate-none! self-center!",children:t(P,{skill:a})}),n(E,{className:"pointer-events-none relative min-w-0",children:[t(te,{className:"block truncate",children:a.interface?.displayName??a.name}),t(Y,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(L,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(U,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(h,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${D} space-y-8 pt-6`,children:[b.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),j?t(re,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:p.length})})]}),p.length?I(A):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(x?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!x&&p.length>6&&t(y,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":k,onClick:()=>G((e)=>!e),children:k?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:p.length-6})})]}),g&&n(ie,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")H(e)},className:"gap-6",children:[t(pe,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:d.map((e)=>t(me,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),d.map((e)=>t(oe,{value:e.id,children:e.id===g.id&&(w.length?I(w):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(J,{open:!!r,onOpenChange:(e)=>{if(!e)C(null)},children:t(Q,{showCloseButton:!1,className:se,children:r&&n(S,{children:[t(ce,{path:r.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(P,{skill:r}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(de,{skill:r}),e,t(K,{render:t(y,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(X,{})})]})]}),n(Z,{className:"gap-3",children:[t(ee,{className:"text-2xl leading-8 font-semibold break-words",children:r.interface?.displayName??r.name}),t(W,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:r.description})]})]})},r.path),r.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),N?t(y,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(N)},children:N.plugin.interface?.displayName??N.plugin.name}):r.pluginId]})]})})})]})}
2
+ export{lt};
@@ -1,2 +1,2 @@
1
- var N="collection-default";function K(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Ie(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function Pt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function or(o,e=Ie()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
2
- export{N,K,Ie,Pt,or};
1
+ var N="collection-default";function K(o,e){return o.id==="collection-default"?e("collection.defaultFavorites"):o.name}function Ie(){return{collections:{["collection-default"]:{id:"collection-default",name:"",nameIsCustom:!1,collapsed:!1,sessionIds:[]}},order:["collection-default"],sessionMeta:{}}}function Tt(o,e){let i={...o.collections},l=(s,n)=>{if(!i[s])throw Error(`Collection missing: ${s}`);i[s]={...i[s],...n}},r=(s,n)=>l(s,{sessionIds:i[s].sessionIds.filter((d)=>d!==n)}),t=(s,n)=>{let d=i[s];if(!d)throw Error(`Collection missing: ${s}`);for(let c of o.order)if(c!==s&&i[c].sessionIds.includes(n))r(c,n);if(!d.sessionIds.includes(n))l(s,{sessionIds:[...d.sessionIds,n],collapsed:!1})};switch(e.type){case"create":{if(!e.name.trim())throw Error("Collection name is empty");if(i[e.id]={id:e.id,name:e.name.trim(),...e.emoji===void 0?{}:{emoji:e.emoji},collapsed:!1,sessionIds:[]},e.sessionId!==void 0){if(e.sourceCollectionId!==void 0)r(e.sourceCollectionId,e.sessionId);t(e.id,e.sessionId)}return{...o,collections:i,order:[...o.order,e.id]}}case"rename":if(e.id==="collection-default")throw Error("Default collection cannot be renamed");if(!e.name.trim())throw Error("Collection name is empty");l(e.id,{name:e.name.trim(),nameIsCustom:!0,...e.emoji===void 0?{}:{emoji:e.emoji}});break;case"collapse":l(e.id,{collapsed:e.collapsed});break;case"emoji":l(e.id,{emoji:e.emoji});break;case"clear":l(e.id,{sessionIds:[]});break;case"delete":if(e.id==="collection-default")throw Error("Default collection cannot be deleted");return delete i[e.id],{...o,collections:i,order:o.order.filter((s)=>s!==e.id)};case"add":t(e.collectionId,e.sessionId);break;case"materialize":return t(e.collectionId,e.sessionId),{...o,collections:i,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],cwd:e.cwd}}};case"move":{r(e.sourceCollectionId,e.sessionId),t(e.collectionId,e.sessionId);let n=i[e.collectionId].sessionIds.filter((d)=>d!==e.sessionId);n.splice(e.index??n.length,0,e.sessionId),l(e.collectionId,{sessionIds:n,collapsed:!1});break}case"reorder":{if(e.id==="collection-default")throw Error("Default collection cannot be reordered");let s=o.order.filter((n)=>n!==e.id);return s.splice(e.index,0,e.id),{...o,order:s}}case"forget":{for(let n of o.order)r(n,e.sessionId);let s={...o.sessionMeta};return delete s[e.sessionId],{...o,collections:i,sessionMeta:s}}case"remove":for(let s of e.collectionId===void 0?o.order:[e.collectionId])r(s,e.sessionId);break;case"favorite":if(o.order.some((s)=>i[s].sessionIds.includes(e.sessionId)))for(let s of o.order)r(s,e.sessionId);else t("collection-default",e.sessionId);break;case"meta":{let s=o.sessionMeta[e.sessionId],n={...s};if(e.meta.cwd!==void 0)n.cwd=e.meta.cwd;if(e.meta.title!==void 0&&!s?.titleOverride)n.title=e.meta.title;if(s?.cwd===n.cwd&&s?.title===n.title)return o;return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:n}}}case"renameSession":{let s=e.title.trim();return{...o,sessionMeta:{...o.sessionMeta,[e.sessionId]:{...o.sessionMeta[e.sessionId],title:s||void 0,titleOverride:s.length>0}}}}}return{...o,collections:i}}function or(o,e=Ie()){let i={collections:{...e.collections},order:[...e.order],sessionMeta:{...e.sessionMeta}};for(let l of o){for(let[r,t]of Object.entries(l.sessionMeta??{})){let s=i.sessionMeta[r];i.sessionMeta[r]=s?.titleOverride?{...t,...s}:{...s,...t}}for(let r of l.order){if(r==="collection-default")continue;let t=l.collections[r];if(!t)throw Error(`Persisted collection missing: ${r}`);let s=i.collections[r];if(i.collections[r]={...t,...e.collections[r],sessionIds:[...new Set([...s?.sessionIds??[],...t.sessionIds??[]])]},!i.order.includes(r))i.order.push(r)}}return i}
2
+ export{N,K,Ie,Tt,or};
@@ -0,0 +1,2 @@
1
+ import{S}from"./chunk-wpn4rdwv.js";import{codexMessageError as v,nativeTurnId as m,textOf as A,turns as _}from"@nyssance/codex-acp-v2/client";function Xr(t){return t.kind==="tool"&&t.name==="mcp_startup"}function E(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let n=e.phase;return typeof n==="string"?n:null}function T(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function Ci(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&T(e))}function g(t,e,n){let o=t.work.at(-1);if(o?.kind==="activity"&&o.items.at(-1)===n){o.items.push(e);return}t.work.push({kind:"activity",key:`activity:${e.kind}:${e.id}`,items:[e]})}function w(t,e,n){if(t.kind!=="tool"){e.push(t);return}let o=n.get(t.id);if(o===void 0)throw Error(`Grouped tool is missing from the session: ${t.id}`);e.push(o);for(let s of t.children)w(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(v(e)!==null){let u=m(e),f=t.errors.findIndex((p)=>u!==null&&m(p)===u);if(f===-1)t.errors.push(e);else t.errors[f]=e;break}let s=E(e),i=e._meta?.codex,d=S(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(S(e._meta).length>0)t.final.push(e);else if(d)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else if(s==="final_answer")t.final.push(e);else if(s==="commentary"||T(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":g(t,e,o);break;case"tool":if(g(t,e,o),e.toolKind==="edit")t.edits.push(e);break;case"plan":t.work.push({kind:"plan",key:`plan:${e.id}`,item:e});break;case"compaction":t.work.push({kind:"compaction",key:`compaction:${e.id}`,item:e});break}}function wi(t,e=[],n=[]){let o=new Map(e.map((r)=>[r.key,r])),s=new Map(t.items.filter((r)=>r.kind==="tool").map((r)=>[r.id,r])),i={...t,items:t.items.filter((r)=>!Xr(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)w(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&K(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(Sn),items:a},M=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,b)=>j(x,c,b<M,a[b-1])),x})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function Sn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function ie(t){return A(t.content)}function it(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function _n(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function ki(t){let e=(s)=>{for(let i of t.items){let d=i._meta?.codex;if(typeof d!=="object"||d===null)continue;let u=d[s];if(typeof u==="number"&&Number.isFinite(u)&&u>=0)return u}return},n=e("workDurationMs"),o=e("turnDurationMs");return{durationMs:n??o,durationKind:n===void 0&&o!==void 0?"total":"work",startedAt:e("workStartedAt")}}function Si(t,e,n){if(n?.user==null)return!1;let o=e.items.map(m).find((i)=>i!==null),s=m(n.user);if(o!==void 0&&s!==null)return o===s;return!e.items.some((i)=>{let d=i._meta?.codex;return typeof d==="object"&&d!==null&&"turnCompletedAt"in d&&typeof d.turnCompletedAt==="number"})&&t.state!=="idle"&&(n.user.echo==="pending"||n.user.echo==="acknowledged")&&e.user!==null&&t.turnEndedAt[e.user.id]===void 0&&e.errors.length===0}function _i(t,e){if(t.state==="idle")return;let n=e.length-1;while(n>0){let o=e[n];if(o.items.some((s)=>s.kind!=="user"))break;if(!Si(t,e[n-1],o))break;n--}return e[n]?.key}function Pi(t,e,n){let o=n,s=n;while(o>0&&Si(t,e[o-1],e[o]))o--;while(s+1<e.length&&Si(t,e[s],e[s+1]))s++;let i=e.slice(o,s+1),d=i.findLast((u)=>u.items.some((f)=>f.kind!=="user"))??i[0];return{continued:e[n]!==d,items:i.flatMap((u)=>u.items),edits:i.flatMap((u)=>u.edits),startedAt:i[0].startedAt}}
2
+ export{Xr,Ci,wi,Sn,ie,it,_n,ki,Si,_i,Pi};
@@ -1,2 +1,2 @@
1
- import{si}from"./chunk-6g7btgsr.js";import{CheckIcon as N,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function y(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function M({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[l,u]=f(!1),[d,x]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=()=>{if(r.scrollHeight===0){u(!1);return}let b=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(b))throw Error("Codex user message line height is invalid");u(r.scrollHeight>A*b+1)};t();let m=new ResizeObserver(t);return m.observe(r),()=>m.disconnect()},[]),k(()=>{if(!l||d)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=new Map,m=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let v=g.target;if(!t.has(v))continue;y(v,g.isIntersecting&&g.intersectionRatio>=1,t.get(v))}},{root:r,rootMargin:"0px",threshold:1}),b=()=>{for(let i of t.keys()){if(r.contains(i))continue;m?.unobserve(i),t.delete(i)}for(let i of r.querySelectorAll(L)){if(t.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");t.set(i,g),y(i,m===null&&R(i,r),g),m?.observe(i)}};b();let C=new MutationObserver(b);return C.observe(r,{childList:!0,subtree:!0}),()=>{m?.disconnect(),C.disconnect();for(let[i,g]of t)y(i,!0,g)}},[l,d]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:l&&!d?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),l&&!d&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),l&&p("button",{type:"button","aria-expanded":d,className:"codex-user-message-collapse-trigger",onClick:()=>{x((r)=>!r)},children:[e("span",{children:d?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:d?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function xn({text:n,label:o,host:s}){let[a,c]=f(!1),[l,u]=f(null),d=async()=>{c(!1),u(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(x){u(String(x)),s?.onCopyError?.(x)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:l??o,onClick:()=>void d(),children:a?e(N,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(si,{src:c,alt:"",onClose:()=>a(!1)})]})}function ai({message:n,text:o,textParts:s,mentions:a,images:c,messageTime:l,host:u,bubbleStyle:d}){let{t:x,openImage:r}=u;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[a.length>0&&e("div",{className:"codex-user-mentions",children:a.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),c.length>0&&e("div",{className:"codex-user-images",children:c.map((t)=>e(S,{image:t,openImage:r},`${t.mimeType}:${t.data}`))}),o.length>0&&e(h,{children:e("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:d,children:s?s.map((t,m)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(M,{text:t.text,host:u}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},m)):e(M,{text:o,host:u})})}),p("div",{className:"codex-user-actions",children:[e(xn,{text:o,label:x("actions.copy"),host:u}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
2
- export{xn,ai};
1
+ import{li}from"./chunk-5b19mbh6.js";import{CheckIcon as N,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function y(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function M({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[l,u]=f(!1),[d,x]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=()=>{if(r.scrollHeight===0){u(!1);return}let b=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(b))throw Error("Codex user message line height is invalid");u(r.scrollHeight>A*b+1)};t();let m=new ResizeObserver(t);return m.observe(r),()=>m.disconnect()},[]),k(()=>{if(!l||d)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let t=new Map,m=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let v=g.target;if(!t.has(v))continue;y(v,g.isIntersecting&&g.intersectionRatio>=1,t.get(v))}},{root:r,rootMargin:"0px",threshold:1}),b=()=>{for(let i of t.keys()){if(r.contains(i))continue;m?.unobserve(i),t.delete(i)}for(let i of r.querySelectorAll(L)){if(t.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");t.set(i,g),y(i,m===null&&R(i,r),g),m?.observe(i)}};b();let C=new MutationObserver(b);return C.observe(r,{childList:!0,subtree:!0}),()=>{m?.disconnect(),C.disconnect();for(let[i,g]of t)y(i,!0,g)}},[l,d]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:l&&!d?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),l&&!d&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),l&&p("button",{type:"button","aria-expanded":d,className:"codex-user-message-collapse-trigger",onClick:()=>{x((r)=>!r)},children:[e("span",{children:d?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:d?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function Cn({text:n,label:o,host:s}){let[a,c]=f(!1),[l,u]=f(null),d=async()=>{c(!1),u(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(x){u(String(x)),s?.onCopyError?.(x)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:l??o,onClick:()=>void d(),children:a?e(N,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(li,{src:c,alt:"",onClose:()=>a(!1)})]})}function si({message:n,text:o,textParts:s,mentions:a,images:c,messageTime:l,host:u,bubbleStyle:d}){let{t:x,openImage:r}=u;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[a.length>0&&e("div",{className:"codex-user-mentions",children:a.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),c.length>0&&e("div",{className:"codex-user-images",children:c.map((t)=>e(S,{image:t,openImage:r},`${t.mimeType}:${t.data}`))}),o.length>0&&e(h,{children:e("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:d,children:s?s.map((t,m)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(M,{text:t.text,host:u}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},m)):e(M,{text:o,host:u})})}),p("div",{className:"codex-user-actions",children:[e(Cn,{text:o,label:x("actions.copy"),host:u}),l&&e("span",{className:"codex-user-time",title:l.full,children:l.short})]})]})})}
2
+ export{Cn,si};
@@ -1,3 +1,3 @@
1
1
  import{html as n}from"diff2html";import{ColorSchemeType as r}from"diff2html/lib/types";import{useMemo as s}from"react";import{jsx as a}from"react/jsx-runtime";function zo(e){let t=0,i=0;for(let o of e.split(`
2
- `)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function Xe({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
3
- export{zo,Xe};
2
+ `)){if(o.startsWith("+++")||o.startsWith("---"))continue;if(o.startsWith("+"))t+=1;else if(o.startsWith("-"))i+=1}return{additions:t,deletions:i}}function Je({patch:e,theme:t}){let i=s(()=>n(e,{drawFileList:!1,outputFormat:"line-by-line",matching:"lines",colorScheme:t==="dark"?r.DARK:r.LIGHT}),[e,t]);return a("div",{className:"codex-patch-view",dangerouslySetInnerHTML:{__html:i}})}
3
+ export{zo,Je};
@@ -1,2 +1,2 @@
1
- import{hasAccount as x}from"@nyssance/codex-acp-v2/client";import{useEffect as R,useState as S}from"react";var f="main",p="settings",y="settings:request-agent",w="settings:agent",E="settings:auth-request",A="settings:auth-result",T="settings:request-account",h="settings:account",P="settings:account-error",v=(t)=>t instanceof Error?t.message:String(t);function Vi(t){return{agent:()=>{let n=t.state.agent;if(t.state.connection!=="ready"||!n?.info)return null;return{name:n.info.title??n.info.name,version:n.info.version,authMethods:n.authMethods??[],actions:t.state.actions.filter((o)=>o.sessionId===null)}},subscribe:(n)=>t.store.subscribe(n),logout:()=>t.logout(),login:(n,o)=>t.login(n,o),respond:(n,o)=>t.respond(n,o),account:async()=>{if(t.state.connection!=="ready"||!x(t.state.agent))return null;let[n,o]=await Promise.all([t.readAccount(),t.readRateLimits().catch(()=>null)]);return{account:n,rateLimits:o}},onRateLimits:(n)=>t.onRateLimits(n)}}function ji(t,n){let{listen:o,emitTo:u}=n,g=t.agent(),l=()=>{let s=t.agent();if(u(p,w,s),g===null!==(s===null))c();g=s},i=null,r=0,a=!1,c=async()=>{let s=++r;try{let d=await t.account();if(a||s!==r)return;i=d,await u(p,h,i)}catch(d){if(a||s!==r)return;await u(p,P,v(d))}},e=t.subscribe(l),m=t.onRateLimits((s)=>{if(i===null)return;i={...i,rateLimits:s},u(p,h,i)}),b=Promise.all([o(y,l),o(T,()=>void c()),o(E,({payload:s})=>void(async()=>{try{switch(s.action){case"login":await t.login(s.methodId,s.extra),await c();break;case"logout":await t.logout(),await c();break;case"respond":t.respond(s.actionId,s.answer);break}await u(p,A,{id:s.id,error:null})}catch(d){await u(p,A,{id:s.id,error:v(d)})}})())]);return()=>{a=!0,r++,e(),m(),b.then((s)=>{for(let d of s)d()})}}function $i(t,n=console.error){let{listen:o,emitTo:u}=t,g;async function l(i){let r,a=new Promise((e)=>{r=e}),c=await o(A,(e)=>{if(e.payload.id===i.id)r(e.payload)});try{await u(f,E,i);let{error:e}=await a;if(e!==null)throw Error(e)}finally{c()}}return{useSettingsAccount(){let[i,r]=S(()=>g);return R(()=>{let a=!1,c=Promise.all([o(h,(e)=>{if(a)return;g=e.payload,r(e.payload)}),o(P,(e)=>{if(a)return;if(g===void 0)r(null),n(e.payload);else console.error("Account refresh failed",e.payload)})]);return c.then(()=>{if(!a)return u(f,T)}),()=>{a=!0,c.then((e)=>{for(let m of e)m()})}},[]),i},useSettingsAgent(){let[i,r]=S(void 0);return R(()=>{let a=!1,c=o(w,(e)=>{if(!a)r(e.payload)});return c.then(()=>{if(!a)return u(f,y)}),()=>{a=!0,c.then((e)=>e())}},[]),i},requestSignOut:()=>l({id:crypto.randomUUID(),action:"logout"}),requestSignIn:(i,r)=>l({id:crypto.randomUUID(),action:"login",methodId:i,extra:r}),requestActionResponse:(i,r)=>l({id:crypto.randomUUID(),action:"respond",actionId:i,answer:r})}}
2
- export{Vi,ji,$i};
1
+ import{hasAccount as x}from"@nyssance/codex-acp-v2/client";import{useEffect as R,useState as S}from"react";var f="main",p="settings",y="settings:request-agent",w="settings:agent",E="settings:auth-request",A="settings:auth-result",T="settings:request-account",h="settings:account",P="settings:account-error",v=(t)=>t instanceof Error?t.message:String(t);function ji(t){return{agent:()=>{let n=t.state.agent;if(t.state.connection!=="ready"||!n?.info)return null;return{name:n.info.title??n.info.name,version:n.info.version,authMethods:n.authMethods??[],actions:t.state.actions.filter((o)=>o.sessionId===null)}},subscribe:(n)=>t.store.subscribe(n),logout:()=>t.logout(),login:(n,o)=>t.login(n,o),respond:(n,o)=>t.respond(n,o),account:async()=>{if(t.state.connection!=="ready"||!x(t.state.agent))return null;let[n,o]=await Promise.all([t.readAccount(),t.readRateLimits().catch(()=>null)]);return{account:n,rateLimits:o}},onRateLimits:(n)=>t.onRateLimits(n)}}function $i(t,n){let{listen:o,emitTo:u}=n,g=t.agent(),l=()=>{let s=t.agent();if(u(p,w,s),g===null!==(s===null))c();g=s},i=null,r=0,a=!1,c=async()=>{let s=++r;try{let d=await t.account();if(a||s!==r)return;i=d,await u(p,h,i)}catch(d){if(a||s!==r)return;await u(p,P,v(d))}},e=t.subscribe(l),m=t.onRateLimits((s)=>{if(i===null)return;i={...i,rateLimits:s},u(p,h,i)}),b=Promise.all([o(y,l),o(T,()=>void c()),o(E,({payload:s})=>void(async()=>{try{switch(s.action){case"login":await t.login(s.methodId,s.extra),await c();break;case"logout":await t.logout(),await c();break;case"respond":t.respond(s.actionId,s.answer);break}await u(p,A,{id:s.id,error:null})}catch(d){await u(p,A,{id:s.id,error:v(d)})}})())]);return()=>{a=!0,r++,e(),m(),b.then((s)=>{for(let d of s)d()})}}function Ki(t,n=console.error){let{listen:o,emitTo:u}=t,g;async function l(i){let r,a=new Promise((e)=>{r=e}),c=await o(A,(e)=>{if(e.payload.id===i.id)r(e.payload)});try{await u(f,E,i);let{error:e}=await a;if(e!==null)throw Error(e)}finally{c()}}return{useSettingsAccount(){let[i,r]=S(()=>g);return R(()=>{let a=!1,c=Promise.all([o(h,(e)=>{if(a)return;g=e.payload,r(e.payload)}),o(P,(e)=>{if(a)return;if(g===void 0)r(null),n(e.payload);else console.error("Account refresh failed",e.payload)})]);return c.then(()=>{if(!a)return u(f,T)}),()=>{a=!0,c.then((e)=>{for(let m of e)m()})}},[]),i},useSettingsAgent(){let[i,r]=S(void 0);return R(()=>{let a=!1,c=o(w,(e)=>{if(!a)r(e.payload)});return c.then(()=>{if(!a)return u(f,y)}),()=>{a=!0,c.then((e)=>e())}},[]),i},requestSignOut:()=>l({id:crypto.randomUUID(),action:"logout"}),requestSignIn:(i,r)=>l({id:crypto.randomUUID(),action:"login",methodId:i,extra:r}),requestActionResponse:(i,r)=>l({id:crypto.randomUUID(),action:"respond",actionId:i,answer:r})}}
2
+ export{ji,$i,Ki};
@@ -0,0 +1,2 @@
1
+ var x={ar:{untitled:"دردشة جديدة",signOut:"تسجيل الخروج",help:"مساعدة",language:"اللغة",foreground:"المقدمة",background:"الخلفية",chats:"الدردشات",activity:"نشاط",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة",filter:"تصفية",collapseAllGroups:"طي كل المجموعات",openLeading:"فتح الشاشة ‎-1",backToMain:"العودة إلى الشاشة الرئيسية"},de:{untitled:"Neuer Chat",signOut:"Abmelden",help:"Hilfe",language:"Sprache",foreground:"Vordergrund",background:"Hintergrund",chats:"Chats",activity:"Aktivität",quickChats:"Schnelle Chats",retry:"Wiederholen",stop:"Stopp",rename:"Umbenennen",fork:"Verzweigen",archive:"Archivieren",unarchive:"Wiederherstellen",delete:"Löschen",deleteTitle:"Diesen Chat löschen?",deleteDescription:"Dieser Chat wird dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",archived:"Archiviert",filter:"Filtern",collapseAllGroups:"Alle Gruppen einklappen",openLeading:"Bildschirm -1 öffnen",backToMain:"Zurück zum Hauptbildschirm"},en:{states:{title:"Session status",requires_action:"Needs attention",running:"Running",done:"Unread",idle:"Idle",empty:"No sessions"},untitled:"New chat",signOut:"Sign out",help:"Help",language:"Language",foreground:"Foreground",background:"Background",chats:"Chats",activity:"Activity",quickChats:"Quick chats",showAll:"Show all",retry:"Retry",stop:"Stop",rename:"Rename",fork:"Fork",archive:"Archive",unarchive:"Restore",delete:"Delete",deleteTitle:"Delete this chat?",deleteDescription:"This chat will be permanently deleted. This cannot be undone.",cancel:"Cancel",archived:"Archived",archives:{title:"Archived chats",deleteAll:"Delete all",search:"Search archived chats",chatType:"Chat type",allChats:"All chats",quickChats:"Quick chats",projectChats:"Project chats",project:"Project",allProjects:"All projects",noProject:"No project",count:"{{count}} chats",updatedAt:"Last updated",connecting:"Connect to Codex to view archived chats.",loading:"Loading archived chats…",retry:"Retry",empty:"No archived chats",noResults:"No matching archived chats",deleteTitle:"Delete archived chats?",deleteAllDescription:"Permanently delete these {{count}} archived chats? This cannot be undone. Deleting all includes chats hidden by the current filters.",deleteDescription:"Permanently delete this archived chat? This cannot be undone.",unarchive:"Unarchive",confirmDelete:"Delete permanently"},filter:"Filter",collapseAllGroups:"Collapse all groups",openLeading:"Open -1 screen",backToMain:"Back to main screen"},es:{untitled:"Nuevo chat",signOut:"Cerrar sesión",help:"Ayuda",language:"Idioma",foreground:"Primer plano",background:"Fondo",chats:"Chats",activity:"Actividad",quickChats:"Chats rápidos",retry:"Reintentar",stop:"Detener",rename:"Renombrar",fork:"Crear rama",archive:"Archivar",unarchive:"Restaurar",delete:"Eliminar",deleteTitle:"¿Eliminar este chat?",deleteDescription:"Este chat se eliminará permanentemente. Esta acción no se puede deshacer.",cancel:"Cancelar",archived:"Archivados",filter:"Filtrar",collapseAllGroups:"Contraer todos los grupos",openLeading:"Abrir la pantalla -1",backToMain:"Volver a la pantalla principal"},fr:{untitled:"Nouveau chat",signOut:"Se déconnecter",help:"Aide",language:"Langue",foreground:"Premier plan",background:"Arrière-plan",chats:"Discussions",activity:"Activité",quickChats:"Discussions rapides",retry:"Réessayer",stop:"Arrêter",rename:"Renommer",fork:"Créer une branche",archive:"Archiver",unarchive:"Restaurer",delete:"Supprimer",deleteTitle:"Supprimer cette discussion ?",deleteDescription:"Cette discussion sera définitivement supprimée. Cette action est irréversible.",cancel:"Annuler",archived:"Archivées",filter:"Filtrer",collapseAllGroups:"Réduire tous les groupes",openLeading:"Ouvrir l’écran -1",backToMain:"Revenir à l’écran principal"},hi:{untitled:"नई चैट",signOut:"साइन आउट",help:"सहायता",language:"भाषा",foreground:"अग्रभूमि",background:"पृष्ठभूमि",chats:"चैट",activity:"गतिविधि",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत",filter:"फ़िल्टर",collapseAllGroups:"सभी समूह संक्षिप्त करें",openLeading:"-1 स्क्रीन खोलें",backToMain:"मुख्य स्क्रीन पर लौटें"},id:{untitled:"Obrolan baru",signOut:"Keluar",help:"Bantuan",language:"Bahasa",foreground:"Depan",background:"Latar",chats:"Obrolan",activity:"Aktivitas",quickChats:"Chat cepat",retry:"Coba lagi",stop:"Hentikan",rename:"Ganti nama",fork:"Buat cabang",archive:"Arsipkan",unarchive:"Pulihkan",delete:"Hapus",deleteTitle:"Hapus obrolan ini?",deleteDescription:"Obrolan ini akan dihapus permanen. Tindakan ini tidak dapat dibatalkan.",cancel:"Batal",archived:"Diarsipkan",filter:"Filter",collapseAllGroups:"Ciutkan semua grup",openLeading:"Buka layar -1",backToMain:"Kembali ke layar utama"},it:{untitled:"Nuova chat",signOut:"Esci",help:"Aiuto",language:"Lingua",foreground:"Primo piano",background:"Sfondo",chats:"Chat",activity:"Attività",quickChats:"Chat rapide",retry:"Riprova",stop:"Interrompi",rename:"Rinomina",fork:"Crea un ramo",archive:"Archivia",unarchive:"Ripristina",delete:"Elimina",deleteTitle:"Eliminare questa chat?",deleteDescription:"Questa chat verrà eliminata definitivamente. L’azione non può essere annullata.",cancel:"Annulla",archived:"Archiviate",filter:"Filtra",collapseAllGroups:"Comprimi tutti i gruppi",openLeading:"Apri la schermata -1",backToMain:"Torna alla schermata principale"},ja:{untitled:"新しいチャット",signOut:"サインアウト",help:"ヘルプ",language:"言語",foreground:"フォアグラウンド",background:"背景",chats:"チャット",activity:"アクティビティ",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み",filter:"フィルター",collapseAllGroups:"すべてのグループを折りたたむ",openLeading:"-1 画面を開く",backToMain:"メイン画面に戻る"},ko:{untitled:"새 채팅",signOut:"로그아웃",help:"도움말",language:"언어",foreground:"포그라운드",background:"배경",chats:"채팅",activity:"활동",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨",filter:"필터",collapseAllGroups:"모든 그룹 접기",openLeading:"-1 화면 열기",backToMain:"메인 화면으로 돌아가기"},"pt-BR":{untitled:"Novo chat",signOut:"Sair",help:"Ajuda",language:"Idioma",foreground:"Primeiro plano",background:"Fundo",chats:"Chats",activity:"Atividade",quickChats:"Chats rápidos",retry:"Tentar novamente",stop:"Parar",rename:"Renomear",fork:"Criar ramificação",archive:"Arquivar",unarchive:"Restaurar",delete:"Excluir",deleteTitle:"Excluir esta conversa?",deleteDescription:"Esta conversa será excluída permanentemente. Esta ação não pode ser desfeita.",cancel:"Cancelar",archived:"Arquivadas",filter:"Filtrar",collapseAllGroups:"Recolher todos os grupos",openLeading:"Abrir a tela -1",backToMain:"Voltar à tela principal"},ru:{untitled:"Новый чат",signOut:"Выйти",help:"Справка",language:"Язык",foreground:"Передний план",background:"Фон",chats:"Чаты",activity:"Активность",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве",filter:"Фильтр",collapseAllGroups:"Свернуть все группы",openLeading:"Открыть экран -1",backToMain:"На главный экран"},"zh-CN":{states:{title:"会话状态",requires_action:"待处理",running:"运行中",done:"完成未读",idle:"空闲",empty:"暂无会话"},untitled:"新聊天",signOut:"退出登录",help:"帮助",language:"语言",foreground:"前台",background:"后台",chats:"聊天",activity:"活动",quickChats:"随聊",showAll:"展开显示",retry:"重试",stop:"停止",rename:"重命名",fork:"分叉",archive:"归档",unarchive:"恢复",delete:"删除",deleteTitle:"删除这个聊天?",deleteDescription:"该聊天将被永久删除。此操作不可撤销。",cancel:"取消",archived:"已归档",archives:{title:"已归档的聊天",deleteAll:"全部删除",search:"搜索已归档的聊天",chatType:"聊天类型",allChats:"全部聊天",quickChats:"快捷聊天",projectChats:"项目聊天",project:"项目",allProjects:"所有项目",noProject:"无项目",count:"{{count}} 个聊天",updatedAt:"最后更新时间",connecting:"连接 Codex 后查看已归档的聊天。",loading:"正在加载已归档的聊天…",retry:"重试",empty:"暂无已归档的聊天",noResults:"没有符合条件的已归档聊天",deleteTitle:"删除已归档的聊天?",deleteAllDescription:"永久删除这 {{count}} 个已归档的聊天?此操作无法撤销。全部删除包含被当前筛选条件隐藏的聊天。",deleteDescription:"永久删除这个已归档的聊天?此操作无法撤销。",unarchive:"取消归档",confirmDelete:"永久删除"},filter:"筛选",collapseAllGroups:"折叠全部分组",openLeading:"进入 -1 屏",backToMain:"返回主屏"}};
2
+ export{x};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-k1vkc88d.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function Fr({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
2
- export{Fr};
1
+ import{e}from"./chunk-epg5w48v.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function Hr({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
2
+ export{Hr};
@@ -0,0 +1,2 @@
1
+ import{s,U,zt}from"./chunk-1sxf2rqx.js";var Lo=5000;function Le(t){return"pastedText"in t}function Br(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function qe(t,e,o){let i=(r,n)=>{for(let[a,x]of s){if(!x.attachments.some((p)=>p.id===e.id))continue;U(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:n===void 0?"":Br(n),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!s.get(t)?.attachments.some((r)=>r.id===e.id))return;i("pending"),zt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>i("ready",r)).catch(()=>i("error")))}function Bt(t,e,o,i){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((a)=>a.kind==="file"&&a.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Lo)return;t.preventDefault(),t.stopPropagation();let n={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};U(e,(a)=>[...a,n]),qe(e,n,i)}
2
+ export{Lo,Le,Br,qe,Bt};
@@ -1,2 +1,2 @@
1
- import{ne}from"./chunk-dwn6bx69.js";import{t}from"./chunk-zyvvk8b2.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function Co({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(ne,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
1
+ import{ne}from"./chunk-d0cb9bks.js";import{t}from"./chunk-z8njjc2c.js";import{SquareSlashIcon as s}from"lucide-react";import{useRef as l}from"react";import{jsx as r}from"react/jsx-runtime";function Co({textareaRef:a,onOpenChange:p,menuOpen:e,disabled:m}){let{t:o}=t(),n=l(!1);return r(ne,{"aria-label":o("composer.commands"),title:o("composer.commands"),disabled:m,"aria-pressed":e,onPointerDown:()=>{n.current=e},onClick:()=>{p(!n.current),a.current?.getTextarea()?.focus()},children:r(s,{className:"size-4"})})}
2
2
  export{Co};
@@ -1,2 +1,2 @@
1
- import{n}from"./chunk-zyvvk8b2.js";import{e}from"./chunk-k1vkc88d.js";import{m,G}from"./chunk-v5mzxjzc.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var p=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function g(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let o=Math.min(100,a/t*100),f=o>=90?"text-destructive":o>=70?"text-foreground":"text-muted-foreground";return{pct:o,className:f}}function P(a){let t=m(a.configOptions,"model");return t===void 0?void 0:G(t)}function Ae(a,t){let o=a.windowDurationMins;if(o===null)return t("usage.usage");if(o%1440===0)return t("usage.windowDays",{count:o/1440});return t("usage.windowHours",{count:Math.round(o/60)})}function _(a){let{client:t}=e(),o=n((s)=>a&&s.connection==="ready"&&D(s.agent)),[f,c]=F(null);return T(()=>{if(!o){c(null);return}let s=!0;t.readRateLimits().then((d)=>{if(s)c(d)},()=>{return});let l=t.onRateLimits((d)=>{if(s)c(d)});return()=>{s=!1,l()}},[o,t]),o?f:null}function B({session:a}){let{t}=e().host,o=m(a.configOptions,"model"),f=o!==void 0&&(L(o.options)?o.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((y)=>y.value===o.currentValue)):!o.currentValue.startsWith("gateway:")&&o.options.some((i)=>i.value===o.currentValue)),c=_(f),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let d=s&&s.size>0?V(s.used,s.size):null,h=7,b=2*Math.PI*h,N=g(l?.inputTokens),k=g(l?.outputTokens),x=g(l?.cachedReadTokens),w=g(l?.cachedWriteTokens),S=g(l?.totalTokens)||N+k+x+w,R=N+x,C=R>0?A.format(x/R):t("tokens.notAvailable"),M=[[t("tokens.input"),p.format(N)],[t("tokens.output"),p.format(k)],[t("tokens.cachedRead"),p.format(x)],[t("tokens.cachedWrite"),p.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),p.format(S)]],v=P(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",d?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),d!==null&&r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-d.pct/100),transform:"rotate(-90 9 9)"})]}),d!==null&&u("span",{children:[Math.round(d.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[v!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:v,children:v})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,y])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:y})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:p.format(s.used),limit:p.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:Ae(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var Ot=W(B);
2
- export{Ae,Ot};
1
+ import{n}from"./chunk-z8njjc2c.js";import{e}from"./chunk-epg5w48v.js";import{g,G}from"./chunk-6vntcyv6.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var d=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function f(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let o=Math.min(100,a/t*100),p=o>=90?"text-destructive":o>=70?"text-foreground":"text-muted-foreground";return{pct:o,className:p}}function P(a){let t=g(a.configOptions,"model");return t===void 0?void 0:G(t)}function Ae(a,t){let o=a.windowDurationMins;if(o===null)return t("usage.usage");if(o%1440===0)return t("usage.windowDays",{count:o/1440});return t("usage.windowHours",{count:Math.round(o/60)})}function _(a){let{client:t}=e(),o=n((s)=>a&&s.connection==="ready"&&D(s.agent)),[p,c]=F(null);return T(()=>{if(!o){c(null);return}let s=!0;t.readRateLimits().then((m)=>{if(s)c(m)},()=>{return});let l=t.onRateLimits((m)=>{if(s)c(m)});return()=>{s=!1,l()}},[o,t]),o?p:null}function B({session:a}){let{t}=e().host,o=g(a.configOptions,"model"),p=o!==void 0&&(L(o.options)?o.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((y)=>y.value===o.currentValue)):!o.currentValue.startsWith("gateway:")&&o.options.some((i)=>i.value===o.currentValue)),c=_(p),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let m=s&&s.size>0?V(s.used,s.size):null,h=7,b=2*Math.PI*h,N=f(l?.inputTokens),k=f(l?.outputTokens),x=f(l?.cachedReadTokens),w=f(l?.cachedWriteTokens),S=f(l?.totalTokens)||N+k+x+w,R=N+x,C=R>0?A.format(x/R):t("tokens.notAvailable"),M=[[t("tokens.input"),d.format(N)],[t("tokens.output"),d.format(k)],[t("tokens.cachedRead"),d.format(x)],[t("tokens.cachedWrite"),d.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),d.format(S)]],v=P(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&r("circle",{cx:"9",cy:"9",r:h,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&u("span",{children:[Math.round(m.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[v!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:v,children:v})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,y])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:y})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:d.format(s.used),limit:d.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:Ae(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var Ut=W(B);
2
+ export{Ae,Ut};
@@ -1,2 +1,2 @@
1
- var ye="chrome-hover hover:bg-foreground/8 data-[active=true]:bg-foreground/5",d="chrome-hover hover:bg-foreground/8 data-active:bg-foreground/5";
2
- export{ye,d};
1
+ var ye="chrome-hover hover:bg-foreground/8 data-[active=true]:bg-foreground/5",c="chrome-hover hover:bg-foreground/8 data-active:bg-foreground/5";
2
+ export{ye,c};
@@ -1,2 +1,2 @@
1
- import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function Pi(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
2
- export{Pi};
1
+ import{nativeTurnId as a}from"@nyssance/codex-acp-v2/client";function Ti(o,i){let u=new Set,s=(e)=>{let t=e.items.map(a).find((r)=>r!==null),n=e.items.every((r)=>r.replayed);if(t===void 0||u.has(t))return{turnKey:e.key,turn:e,deferUntilReady:n};return u.add(t),{turnKey:`history:${t}`,aliases:[e.key],turn:e,deferUntilReady:n}};if(!i?.complete)return o.map(s);let d=new Map;for(let e of o){let t=e.items.map(a).find((r)=>r!==null);if(t===void 0)continue;let n=d.get(t)??[];n.push(e),d.set(t,n)}let l=new Set(i.turns.map((e)=>e.turnId)),y=new Set(i.loadedTurnIds);return[...i.turns.flatMap((e)=>{let t=d.get(e.turnId);if(t)return t.map(s);return y.has(e.turnId)?[]:[{turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,estimatedHeightPx:320,placeholder:!0}]}),...o.filter((e)=>!e.items.some((t)=>l.has(a(t)??""))).map(s)]}
2
+ export{Ti};
@@ -0,0 +1,2 @@
1
+ function jt(n){return`file://${encodeURI(n.absPath).replaceAll(/[?#]/g,encodeURIComponent)}`}function $t(n){return n.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)??n}function Kt(n){return $t(n.absPath)}
2
+ export{jt,$t,Kt};
@@ -1,4 +1,4 @@
1
- var Ln=`<svg xmlns="http://www.w3.org/2000/svg">
1
+ var Rn=`<svg xmlns="http://www.w3.org/2000/svg">
2
2
  <defs>
3
3
  <linearGradient id="plugin-agent-mode-paint0_linear_1_1034" x1="30.0398" y1="40.0728" x2="11.3112" y2="-1.39757" gradientUnits="userSpaceOnUse">
4
4
  <stop stop-color="#2BBFFF"/>
@@ -1286,4 +1286,4 @@ var Ln=`<svg xmlns="http://www.w3.org/2000/svg">
1286
1286
  </symbol>
1287
1287
  </svg>
1288
1288
  `;
1289
- export{Ln};
1289
+ export{Rn};
@@ -1,2 +1,2 @@
1
- import{dt}from"./chunk-a5htm58g.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Se(e){let t=r.get(e);if(!t)t=dt(e),r.set(e,t);return t}function Gi({host:e,client:t,children:n}){let s=Se(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function _e(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Oe(e){let t=_e();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Se(_e());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Pe(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
1
+ import{pt}from"./chunk-v7rtfzg4.js";import{createContext as a,useContext as u,useEffect as d,useSyncExternalStore as g}from"react";import{jsx as o}from"react/jsx-runtime";var P=a(null),p=a(null),r=new WeakMap;function Se(e){let t=r.get(e);if(!t)t=pt(e),r.set(e,t);return t}function Gi({host:e,client:t,children:n}){let s=Se(t);return s.bindHost(e),d(()=>s.bindHost(e),[s,e]),o(P,{value:e,children:o(p,{value:t,children:n})})}function l(){let e=u(P);if(e===null)throw Error("Plugins host is missing");return e}function _e(){let e=u(p);if(e===null)throw Error("Plugins client is missing");return e}function Oe(e){let t=_e();return g((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=Se(_e());return g((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Pe(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
2
2
  export{Se,Gi,l,_e,Oe,i,Pe};
@@ -1,4 +1,4 @@
1
- import{ai}from"./chunk-46phvpzh.js";import{t}from"./chunk-zyvvk8b2.js";import{li,ci}from"./chunk-4qp43adx.js";import{Z}from"./chunk-b6nbarjg.js";import{ie}from"./chunk-qn2jfxff.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var ri=p(function({item:s,messageTime:c}){let l=t(),o=ci(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
1
+ import{si}from"./chunk-84yjrafh.js";import{t}from"./chunk-z8njjc2c.js";import{ci,di}from"./chunk-sp39pqt6.js";import{Z}from"./chunk-hcwgc3r7.js";import{ie}from"./chunk-7zryea1b.js";import{isEmbeddedResource as g,isImage as d,isResourceLink as f,isText as x}from"@nyssance/codex-acp-v2/client";import{memo as p}from"react";import{jsx as r,jsxs as h}from"react/jsx-runtime";var ai=p(function({item:s,messageTime:c}){let l=t(),o=di(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
2
2
  ${e.text}`).join(`
3
- `):ie(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=li(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(Z,{block:e},`${s.id}:${n}`))}),r(ai,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
4
- export{ri};
3
+ `):ie(s),a=s.content.filter(d),i=s.content.filter((e)=>f(e)||g(e)),u=o??s.content.filter(x).map((e)=>{let n=ci(e._meta);return n?{question:n.question,text:n.answer}:{text:e.text}});if(m.length===0&&a.length===0&&i.length===0)return null;return h("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":s.id,children:[i.length>0&&r("div",{className:"codex-user-mentions",children:i.map((e,n)=>r(Z,{block:e},`${s.id}:${n}`))}),r(si,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
4
+ export{ai};
@@ -1,2 +1,2 @@
1
- import{A}from"./chunk-2f9vjmxz.js";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as d,DropdownMenuContent as m,DropdownMenuGroup as w,DropdownMenuItem as i,DropdownMenuLabel as S,DropdownMenuTrigger as c}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as a}from"react/jsx-runtime";var M=["requires_action","running","done","idle"];function br({sessions:l,onSelect:p,t:n}){return e("div",{className:"flex shrink-0 items-center gap-0.5",role:"group","aria-label":n("sessionList.states.title"),children:M.map((o)=>{let s=l.filter((t)=>t.state===o),r=n(`sessionList.states.${o}`);return a(d,{children:[a(c,{render:e(u,{variant:"ghost",size:"xs"}),"aria-label":`${r}: ${s.length}`,children:[e(A,{state:o,pulse:!1}),e("span",{className:"tabular-nums",children:s.length})]}),e(m,{"aria-label":r,className:"w-72 max-w-[calc(100vw-1rem)]",children:a(w,{children:[e(S,{children:r}),s.length===0?e(i,{disabled:!0,children:n("sessionList.states.empty")}):s.map((t)=>a(i,{onClick:()=>p(t),children:[e(A,{state:t.state,pulse:!1}),e("span",{className:"min-w-0 flex-1 truncate",children:t.title||n("sessionList.untitled")})]},t.sessionId))]})})]},o)})})}
2
- export{br};
1
+ import{A}from"./chunk-2f9vjmxz.js";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as d,DropdownMenuContent as m,DropdownMenuGroup as w,DropdownMenuItem as i,DropdownMenuLabel as S,DropdownMenuTrigger as c}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as a}from"react/jsx-runtime";var M=["requires_action","running","done","idle"];function wr({sessions:l,onSelect:p,t:n}){return e("div",{className:"flex shrink-0 items-center gap-0.5",role:"group","aria-label":n("sessionList.states.title"),children:M.map((o)=>{let s=l.filter((t)=>t.state===o),r=n(`sessionList.states.${o}`);return a(d,{children:[a(c,{render:e(u,{variant:"ghost",size:"xs"}),"aria-label":`${r}: ${s.length}`,children:[e(A,{state:o,pulse:!1}),e("span",{className:"tabular-nums",children:s.length})]}),e(m,{"aria-label":r,className:"w-72 max-w-[calc(100vw-1rem)]",children:a(w,{children:[e(S,{children:r}),s.length===0?e(i,{disabled:!0,children:n("sessionList.states.empty")}):s.map((t)=>a(i,{onClick:()=>p(t),children:[e(A,{state:t.state,pulse:!1}),e("span",{className:"min-w-0 flex-1 truncate",children:t.title||n("sessionList.untitled")})]},t.sessionId))]})})]},o)})})}
2
+ export{wr};
@@ -1,2 +1,2 @@
1
- import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as u}from"react";import{jsx as e,jsxs as g}from"react/jsx-runtime";function f({nativeScroll:p=!1,className:t,viewportClassName:n,viewportRef:i,onScroll:s,viewportProps:a,children:c,...m}){let[d,l]=u(!1);if(p)return e("div",{className:o("relative flex min-h-0 flex-1",t),...m,children:e("div",{ref:i,onScroll:s,...a,className:o("min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",n,a?.className),children:c})});return g(r.Root,{"data-slot":"scroll-area",className:o("relative min-h-0 flex-1 pe-[var(--app-scrollbar-track-size)]",t),...m,children:[e(r.Viewport,{ref:i,onScroll:s,"data-slot":"scroll-area-viewport",...a,className:o("size-full rounded-[inherit] pe-2 outline-none",n,a?.className),children:c}),e(r.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":"vertical",orientation:"vertical","data-dragging":d?"":void 0,onPointerDownCapture:(v)=>{if(v.button===0)l(!0)},onPointerUpCapture:()=>l(!1),onPointerCancelCapture:()=>l(!1),onLostPointerCapture:()=>l(!1),className:"flex h-full w-[var(--app-scrollbar-track-size)] touch-none px-[var(--app-scrollbar-edge-gap)] select-none",children:e(r.Thumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}),e(r.Corner,{})]})}
2
- export{f};
1
+ import{ScrollArea as r}from"@base-ui/react/scroll-area";import{cn as o}from"cn";import{useState as v}from"react";import{jsx as e,jsxs as u}from"react/jsx-runtime";function h({nativeScroll:f=!1,className:t,viewportClassName:n,viewportRef:i,onScroll:s,viewportProps:a,children:c,...m}){let[p,l]=v(!1);if(f)return e("div",{className:o("relative flex min-h-0 flex-1",t),...m,children:e("div",{ref:i,onScroll:s,...a,className:o("min-h-0 min-w-0 flex-1 overflow-y-auto outline-none",n,a?.className),children:c})});return u(r.Root,{"data-slot":"scroll-area",className:o("relative min-h-0 flex-1 pe-[var(--app-scrollbar-track-size)]",t),...m,children:[e(r.Viewport,{ref:i,onScroll:s,"data-slot":"scroll-area-viewport",...a,className:o("size-full rounded-[inherit] pe-2 outline-none",n,a?.className),children:c}),e(r.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":"vertical",orientation:"vertical","data-dragging":p?"":void 0,onPointerDownCapture:(d)=>{if(d.button===0)l(!0)},onPointerUpCapture:()=>l(!1),onPointerCancelCapture:()=>l(!1),onLostPointerCapture:()=>l(!1),className:"flex h-full w-[var(--app-scrollbar-track-size)] touch-none px-[var(--app-scrollbar-edge-gap)] select-none",children:e(r.Thumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})}),e(r.Corner,{})]})}
2
+ export{h};
@@ -0,0 +1,2 @@
1
+ import{ye,c}from"./chunk-90r8y97z.js";import{P}from"./chunk-42atrgm1.js";import{A}from"./chunk-2f9vjmxz.js";import{w}from"./chunk-spfbykq8.js";import{$e,Me,Ke}from"./chunk-kd87rt80.js";import{PreviewCard as b}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as L,useContext as _,useLayoutEffect as D,useState as T}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as j}from"react/jsx-runtime";function C(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function m({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:p("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function u({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:p("group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",t),...n})}function W({open:o,onOpenChange:t,tooltip:n,leading:r,label:i,count:s,countLabel:a,active:l=!1,actions:y,headerChildren:g,wrapHeader:f,onHeaderClick:R,children:S}){let k=()=>{R?.(),t(!o)},x=p($e,"relative flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),H=d(j,{children:[r!=null&&e(m,{children:r}),g??e(P,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Ke,{content:s!==void 0?e(Me,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:y})})]}),O=g==null?d("div",{"data-active":l?"":void 0,title:n,className:p(x,c),onClick:k,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),k()},children:[e("button",{type:"button","aria-expanded":o,"aria-label":typeof i==="string"?i:n,className:"focus-visible:outline-ring absolute inset-0 rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]"}),H]}):e("div",{"data-active":l?"":void 0,className:x,children:H});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[f===void 0?O:f(O),o&&e(C,{className:"mt-0.5",children:S})]})}var E=L(()=>{}),G=L(()=>{});function At(){return _(G)}function he(){return _(E)}function ve({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:y,preview:g,listeningPorts:f,onOpenPort:R,accessory:S,meta:k,hint:x,actions:H,className:O,...v}){let I=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p($e,ye,"group/navigation-row focus-visible:outline-ring flex h-[var(--navigation-row-height,30px)] w-full items-center gap-1 overflow-hidden rounded-[10px] ps-1 pe-1.5 text-start text-sm outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-[-2px]",(g||f!=null&&f.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",O),...v,children:[e(m,{children:t!=null?e(A,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(P,{className:p("leading-none",t==="done"&&"font-semibold"),children:s}),y!=null&&e(P,{className:"text-muted-foreground text-xs",children:y}),g&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:g}),f!=null&&f.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:f.map((N)=>R?d("button",{type:"button",className:"underline",onPointerDown:(h)=>h.stopPropagation(),onKeyDown:(h)=>h.stopPropagation(),onClick:(h)=>{h.stopPropagation(),R(N)},children:[":",N]},N):d("span",{children:[":",N]},N))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e(Ke,{content:S!=null?e(Me,{children:S}):k??e(Me,{}),actions:H}),x!=null&&e("span",{className:"pointer-events-none absolute end-1 top-1/2 flex h-5 min-w-5 -translate-y-1/2 items-center justify-center",children:x})]})]});if(a==null)return I;return e(M,{row:I,onOpenChange:l,children:a})}function M({row:o,children:t,onOpenChange:n}){let[r,i]=T(!1),[s,a]=T(!1),l=r||s;return D(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(E.Provider,{value:a,children:e(G.Provider,{value:()=>{i(!1),a(!1)},children:e(q,{open:l,onOpenChange:i,trigger:o,children:t})})})}function q({open:o,onOpenChange:t,trigger:n,children:r,side:i="inline-end",sideOffset:s=2,align:a="start",alignOffset:l}){return w(o),d(b.Root,{open:o,onOpenChange:t,children:[e(b.Trigger,{render:n,delay:700,closeDelay:100}),e(b.Portal,{children:e(b.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(b.Popup,{"data-slot":"codex-hover-card",className:"bg-popover text-popover-foreground ring-foreground/10 m-px flex w-80 max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-md text-sm shadow-md ring-1 outline-hidden select-none",children:e("div",{className:"flex w-full min-w-0 flex-col px-0 py-1 break-words whitespace-normal",children:r})})})})]})}
2
+ export{C,m,u,W,At,he,ve};
@@ -1,2 +1,2 @@
1
- import{T}from"./chunk-7a668qzy.js";import{e}from"./chunk-k1vkc88d.js";import{Ke}from"./chunk-2djv6s3a.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Ao({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=T(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>Ke(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
1
+ import{T}from"./chunk-famkkndg.js";import{e}from"./chunk-epg5w48v.js";import{qe}from"./chunk-8kwxqckk.js";import{FileText as l,RotateCcw as x,X as d}from"lucide-react";import{Button as r}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as i}from"react/jsx-runtime";function Ao({data:s,sessionId:m}){let{host:a}=e(),{t:o}=a,p=T(),{text:c,status:n}=s.pastedText;return i("div",{className:"bg-muted flex max-w-64 min-w-0 items-center gap-1 rounded-lg px-2 py-1",children:[i(r,{type:"button",variant:"ghost",disabled:n!=="ready",onClick:()=>a.openLink(s.url),className:"h-auto min-w-0 flex-1 shrink gap-2 overflow-hidden px-0 py-1",children:[t(l,{className:"size-4 shrink-0"}),i("span",{className:"min-w-0 flex-1 text-start",children:[t("span",{className:"block truncate text-xs",children:s.filename}),t("span",{className:"text-muted-foreground block text-xs",children:n==="ready"?o("composer.pastedTextCharacters",{count:c.length}):o(n==="pending"?"composer.pastedTextPending":"composer.pastedTextError")})]})]}),n==="error"&&a.writeTextAttachment&&t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRetry"),onClick:()=>qe(m,s,a.writeTextAttachment),children:t(x,{className:"size-3"})}),t(r,{type:"button",variant:"ghost",size:"icon-xs","aria-label":o("composer.pastedTextRemove"),onClick:()=>p.remove(s.id),children:t(d,{className:"size-3"})})]})}
2
2
  export{Ao};
@@ -0,0 +1,2 @@
1
+ import{a,o}from"./chunk-eg86g265.js";import{QUICK_CHATS_GROUP as m,sessionGroup as l}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function hr(i){let t=a(),e=o((s)=>s.projectContext),c=i===null?m:e?l(e,{cwd:t.projectPath(i)}).id:null,u=o((s)=>s.sessionList),d=o((s)=>s.connection),r=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(d==="ready"&&!r&&n===null)t.listSessions().catch(()=>{return})},[t,d,r,n]),{result:L(()=>{if(r&&e)return{status:"ready",sessionRows:u.filter((s)=>l(e,{...s,cwd:t.projectPath(s.cwd)}).id===c).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,u,r,n,c,e]),retry:f}}
2
+ export{hr};
@@ -1,2 +1,2 @@
1
- import{x}from"./chunk-tpwdaz8k.js";import{EmojiPicker as t}from"frimousse";import{BoxIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Popover as f,PopoverContent as b,PopoverTrigger as j}from"@nyssance/shadcn/vega/components/ui/popover";import{jsx as o,jsxs as n}from"react/jsx-runtime";function ze({emoji:s,onChange:l}){let[m,r]=d(!1),{t:a,i18n:c,emojibaseUrl:p}=x();return n(f,{open:m,onOpenChange:r,children:[o(j,{onClick:(e)=>e.stopPropagation(),onPointerDown:(e)=>e.stopPropagation(),render:o(g,{variant:"ghost",size:"icon-xs",className:"relative z-10","aria-label":a("collection.emoji"),children:s||o(u,{className:"size-3.5"})})}),o(b,{align:"start",className:"w-auto p-0",children:n(t.Root,{emojibaseUrl:p,locale:c.language==="zh-CN"?"zh":"en",className:"bg-popover flex h-80 w-72 flex-col",onEmojiSelect:({emoji:e})=>{l(e),r(!1)},children:[o(t.Search,{"aria-label":a("collection.emoji"),className:"focus-visible:border-ring mx-2 mt-2 flex h-8 rounded-md border bg-transparent px-2 text-sm outline-none"}),n(t.Viewport,{className:"relative flex-1 outline-none",children:[o(t.Loading,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs",children:"…"}),o(t.Empty,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs"}),o(t.List,{className:"pb-1.5 select-none",components:{CategoryHeader:({category:e,...i})=>o("div",{className:"bg-popover text-muted-foreground px-3 pt-3 pb-1.5 text-xs",...i,children:e.label}),Row:({children:e,...i})=>o("div",{className:"scroll-my-1.5 px-1.5",...i,children:e}),Emoji:({emoji:e,...i})=>o("button",{type:"button",className:"data-[active]:bg-accent flex size-8 items-center justify-center rounded-md text-lg",...i,children:e.emoji})}})]})]})})]})}
1
+ import{b}from"./chunk-jrnfqqfc.js";import{EmojiPicker as t}from"frimousse";import{BoxIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Popover as x,PopoverContent as f,PopoverTrigger as j}from"@nyssance/shadcn/vega/components/ui/popover";import{jsx as o,jsxs as n}from"react/jsx-runtime";function ze({emoji:s,onChange:l}){let[m,r]=d(!1),{t:a,i18n:c,emojibaseUrl:p}=b();return n(x,{open:m,onOpenChange:r,children:[o(j,{onClick:(e)=>e.stopPropagation(),onPointerDown:(e)=>e.stopPropagation(),render:o(g,{variant:"ghost",size:"icon-xs",className:"relative z-10","aria-label":a("collection.emoji"),children:s||o(u,{className:"size-3.5"})})}),o(f,{align:"start",className:"w-auto p-0",children:n(t.Root,{emojibaseUrl:p,locale:c.language==="zh-CN"?"zh":"en",className:"bg-popover flex h-80 w-72 flex-col",onEmojiSelect:({emoji:e})=>{l(e),r(!1)},children:[o(t.Search,{"aria-label":a("collection.emoji"),className:"focus-visible:border-ring mx-2 mt-2 flex h-8 rounded-md border bg-transparent px-2 text-sm outline-none"}),n(t.Viewport,{className:"relative flex-1 outline-none",children:[o(t.Loading,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs",children:"…"}),o(t.Empty,{className:"text-muted-foreground absolute inset-0 flex items-center justify-center text-xs"}),o(t.List,{className:"pb-1.5 select-none",components:{CategoryHeader:({category:e,...i})=>o("div",{className:"bg-popover text-muted-foreground px-3 pt-3 pb-1.5 text-xs",...i,children:e.label}),Row:({children:e,...i})=>o("div",{className:"scroll-my-1.5 px-1.5",...i,children:e}),Emoji:({emoji:e,...i})=>o("button",{type:"button",className:"data-[active]:bg-accent flex size-8 items-center justify-center rounded-md text-lg",...i,children:e.emoji})}})]})]})})]})}
2
2
  export{ze};
@@ -0,0 +1,2 @@
1
+ function ge(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function no(a){if(a.shiftKey||a.altKey)return!1;return ge()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
2
+ export{ge,no};
@@ -1,2 +1,2 @@
1
- import{Fi}from"./chunk-zacep5bq.js";import{isText as s,terminalOf as i}from"@nyssance/codex-acp-v2/client";function n(t){if(typeof t==="string")return[t];if(Array.isArray(t))return t.flatMap(n);if(typeof t!=="object"||t===null)return[];return Object.entries(t).flatMap(([r,e])=>r==="data"||r==="blob"?[]:n(e))}function u(t){return s(t)?[t.text]:[]}function p(t,r){switch(t.kind){case"user":case"assistant":case"thought":return t.content.flatMap(u);case"tool":return[t.title??"",...n(t.rawInput),...n(i(t,r)?.output||t.rawOutput),...n(t.content)];case"plan":return n(t.plan);case"compaction":return[t.error??""]}}function Mn(t,r,e={}){let o=r.trim();if(o.length===0)return[];return Fi(t.map((a)=>({turnKey:a.key,segments:a.items.flatMap((c)=>p(c,e))})),o)}
2
- export{Mn};
1
+ import{Ri}from"./chunk-4phhhm7t.js";import{isText as s,terminalOf as i}from"@nyssance/codex-acp-v2/client";function n(t){if(typeof t==="string")return[t];if(Array.isArray(t))return t.flatMap(n);if(typeof t!=="object"||t===null)return[];return Object.entries(t).flatMap(([r,e])=>r==="data"||r==="blob"?[]:n(e))}function u(t){return s(t)?[t.text]:[]}function p(t,r){switch(t.kind){case"user":case"assistant":case"thought":return t.content.flatMap(u);case"tool":return[t.title??"",...n(t.rawInput),...n(i(t,r)?.output||t.rawOutput),...n(t.content)];case"plan":return n(t.plan);case"compaction":return[t.error??""]}}function An(t,r,e={}){let o=r.trim();if(o.length===0)return[];return Ri(t.map((a)=>({turnKey:a.key,segments:a.items.flatMap((c)=>p(c,e))})),o)}
2
+ export{An};
@@ -1,2 +1,2 @@
1
- import{Ln}from"./chunk-10emnq39.js";import{jsx as o}from"react/jsx-runtime";function ct(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:Ln}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function En(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function I({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:En(t)})})}
2
- export{ct,En,I};
1
+ import{Rn}from"./chunk-95mynf7q.js";import{jsx as o}from"react/jsx-runtime";function ut(){return o("svg",{"aria-hidden":"true",focusable:"false",width:0,height:0,className:"pointer-events-none absolute",dangerouslySetInnerHTML:{__html:Rn}})}var n=["agent-mode","application-window","audiowave","bar-chart","block-stack-skills","book-open","briefcase","bubble-on-bubble","checkmark-circle","code","compass","components-window","credit-card","csv","document","docx","exclamationmark-bubble","figma-document","figure-text-document","file-video","flash","folder","game-controller","globe","heart","heart-bubble","heart-text-clipboard","hierarchy","jpg-document","kettlebell","ladybug","lightbulb","lightning-bolt","magnifingglass","map","mappin","microphone","ms-word-document","newspaper","paperclip","pdf-document","pencil","phone","photo","png-document","pointer","ppt-document","pptx","puzzle","radar","shield","shopping-bag","skill-creator","skill-installer","star-app","star-bookmark","template-creator","terminal","text-bubble-figure","text-document","text-document-lock","text-note-pointer","triangle-vercel","xls-document-excel","xlsx"];function En(t){let e=0;for(let r of t)e=(e*31+r.charCodeAt(0))%997;return`#plugin-${n[e%n.length]}`}function I({name:t,className:e="size-6 shrink-0"}){return o("svg",{"aria-hidden":"true",focusable:"false",width:36,height:36,viewBox:"0 0 36 36",className:e,children:o("use",{href:En(t)})})}
2
+ export{ut,En,I};
@@ -0,0 +1,2 @@
1
+ import{It}from"./chunk-0wr12bg8.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 rr({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(It,{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{rr};
@@ -0,0 +1,2 @@
1
+ var ea=1e6,ta=5000000;function Io(_,e){return _+e>5000000}function na(_){return(_/1e6).toFixed(1)}var xe=5;
2
+ export{ea,ta,Io,na,xe};
@@ -1,2 +1,2 @@
1
- import{Io,xe}from"./chunk-s2w7e9pg.js";import{No}from"./chunk-z1aqmqgc.js";import{cn,dn,qe,Ze,un}from"./chunk-7a668qzy.js";import{cn as P}from"cn";import{ArrowUpIcon as ge,Loader2Icon as be,SquareIcon as ve,XIcon as he}from"lucide-react";import{Children as V,useCallback as h,useEffect as F,useMemo as Pe,useRef as M,useState as Ie}from"react";import{flushSync as ye}from"react-dom";import{InputGroup as Le,InputGroupAddon as Z,InputGroupButton as ee}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as a,jsxs as Te}from"react/jsx-runtime";function Y(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var wo=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:te,globalDrop:C,syncHiddenInput:R,maxFiles:z,maxFileSize:H,onError:b,onSubmit:re,children:oe,...se})=>{let s=Ze(),l=!!s,ie=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),k=M(!1),[ae,D]=Ie([]),c=l?s.attachments.files:ae,U=M(c);U.current=c;let ue=h(()=>{x.current?.click()},[]),B=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),O=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""},[]),le=h((e)=>{let r=[...e],t=r.filter((i)=>B(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>H?i.size<=H:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof z==="number"?Math.max(0,z-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let K=[];for(let T of _){let Q=I?.sourcePath(T);K.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:O(T),filename:T.name,size:T.size,lastModified:T.lastModified,...Q===void 0?{}:{sourcePath:Q}})}return[...i,...K]})},[I,O,B,z,H,b]),pe=h((e)=>D((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),me=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),W=l?s.attachments.add:le,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(Io(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${xe}MB.`});return}}W(r)},[c,W,b]),G=l?s.attachments.remove:pe,N=l?s.attachments.clear:me,j=l?s.attachments.openFileDialog:ue;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(R&&x.current&&c.length===0)x.current.value=""},[c,R]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)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)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of U.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let ce=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},q=Pe(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:G,clear:N,openFileDialog:j,fileInputRef:x}),[c,L,G,N,j]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let X=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Y(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Y(t)===n)t.reset();N()};k.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await No(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await re({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{k.current=!1}},de=(e)=>{e.preventDefault(),X(e).catch(y)},fe=h((e)=>{if(!e.trim())return;if(l&&s)ye(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),J=a(dn.Provider,{value:()=>X(null),children:Te(cn.Provider,{value:fe,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:te,onChange:ce,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:de,ref:A,"data-tour":"chat-input",...se,children:a(Le,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ie&&"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:oe})})]})});return l?a(qe.Provider,{value:q,children:J}):a(un.Provider,{value:q,children:J})};function ko({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function So({className:u,...o}){return a(Z,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function _o({className:u,...o}){return a(Z,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function Po({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var ne=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||V.count(y.children)<=1?"icon-xs":"xs";return a(ee,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||V.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},To=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(ge,{className:"size-4"});if(d==="submitted")g=a(be,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(ve,{className:"size-3 fill-current"});else if(d==="error")g=a(he,{className:"size-4"});return a(ee,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
1
+ import{Io,xe}from"./chunk-cd4v63j8.js";import{No}from"./chunk-z1aqmqgc.js";import{dn,un,We,Qe,pn}from"./chunk-famkkndg.js";import{cn as P}from"cn";import{ArrowUpIcon as ge,Loader2Icon as be,SquareIcon as ve,XIcon as he}from"lucide-react";import{Children as V,useCallback as h,useEffect as F,useMemo as Pe,useRef as M,useState as Ie}from"react";import{flushSync as ye}from"react-dom";import{InputGroup as Le,InputGroupAddon as Z,InputGroupButton as ee}from"@nyssance/shadcn/vega/components/ui/input-group";import{jsx as a,jsxs as Te}from"react/jsx-runtime";function Y(u){let o=new FormData(u).get("message");return typeof o==="string"?o:""}var wo=({className:u,bashMode:o=!1,attachmentPolicy:I,onCommand:d,onSubmitError:y,canSubmit:f,onSubmitAsync:g,accept:E,multiple:te,globalDrop:C,syncHiddenInput:R,maxFiles:z,maxFileSize:H,onError:b,onSubmit:re,children:oe,...se})=>{let s=Qe(),l=!!s,ie=o&&l&&s.textInput.value.startsWith("!"),x=M(null),A=M(null),k=M(!1),[ae,D]=Ie([]),c=l?s.attachments.files:ae,U=M(c);U.current=c;let ue=h(()=>{x.current?.click()},[]),B=h((e)=>{if(!E||E.trim()==="")return!0;return E.split(",").map((t)=>t.trim()).filter(Boolean).some((t)=>{if(t.endsWith("/*")){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t})},[E]),O=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""},[]),le=h((e)=>{let r=[...e],t=r.filter((i)=>B(i));if(r.length&&t.length===0){b?.({code:"accept",message:"No files match the accepted types."});return}let n=(i)=>H?i.size<=H:!0,m=t.filter(n);if(t.length>0&&m.length===0){b?.({code:"max_file_size",message:"All files exceed the maximum size."});return}D((i)=>{let v=I?I.uniqueFiles(m,i):m,p=typeof z==="number"?Math.max(0,z-i.length):void 0,_=typeof p==="number"?v.slice(0,p):v;if(typeof p==="number"&&v.length>p)b?.({code:"max_files",message:"Too many files. Some were not added."});let K=[];for(let T of _){let Q=I?.sourcePath(T);K.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(T),mediaType:O(T),filename:T.name,size:T.size,lastModified:T.lastModified,...Q===void 0?{}:{sourcePath:Q}})}return[...i,...K]})},[I,O,B,z,H,b]),pe=h((e)=>D((r)=>{let t=r.find((n)=>n.id===e);if(t?.url)URL.revokeObjectURL(t.url);return r.filter((n)=>n.id!==e)}),[]),me=h(()=>D((e)=>{for(let r of e)if(r.url)URL.revokeObjectURL(r.url);return[]}),[]),W=l?s.attachments.add:le,L=h((e)=>{let r=[...e],t=r.filter((m)=>!(m.type??"").toLowerCase().startsWith("image/"));if(t.length>0){b?.({code:"unsupported_type",message:`Only image attachments are supported. ${t.length} non-image file(s) were ignored.`});return}let n=r.reduce((m,i)=>m+i.size,0);if(n>0){let m=c.filter((i)=>(i.mediaType??"").toLowerCase().startsWith("image/")).reduce((i,v)=>i+(v.size??0),0);if(Io(m,n)){b?.({code:"max_total_size",message:`Total image size must not exceed ${xe}MB.`});return}}W(r)},[c,W,b]),G=l?s.attachments.remove:pe,N=l?s.attachments.clear:me,j=l?s.attachments.openFileDialog:ue;F(()=>{if(!l)return;s.__registerFileInput(x,()=>x.current?.click())},[l,s]),F(()=>{if(R&&x.current&&c.length===0)x.current.value=""},[c,R]),F(()=>{let e=A.current;if(!e)return;if(C)return;let r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)L(n.dataTransfer.files)};return e.addEventListener("dragover",r),e.addEventListener("drop",t),()=>{e.removeEventListener("dragover",r),e.removeEventListener("drop",t)}},[L,C]),F(()=>{if(!C)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)L(t.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",r),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",r)}},[L,C]),F(()=>()=>{if(!l){for(let e of U.current)if(e.url)URL.revokeObjectURL(e.url)}},[l]);let ce=(e)=>{if(e.currentTarget.files)L(e.currentTarget.files);e.currentTarget.value=""},q=Pe(()=>({files:c.map((e)=>({...e,id:e.id})),add:L,remove:G,clear:N,openFileDialog:j,fileInputRef:x}),[c,L,G,N,j]),w=M({controller:s,files:c,canSubmit:f});w.current={controller:s,files:c,canSubmit:f};let S=M(!0);F(()=>(S.current=!0,()=>{S.current=!1}),[]);let X=async(e)=>{let r=f===void 0?!0:f();if(r!==!0)return{status:"blocked",reason:r};if(k.current)return{status:"blocked",reason:"submission_pending"};if(e===null&&g===void 0)throw Error("Awaitable submission requires onSubmitAsync");let t=A.current;if(t===null)return{status:"blocked",reason:"form_unmounted"};let n=l?s.textInput.value:Y(t),m=s?.textInput.getRevision?.(),i=c,v=()=>{if(!S.current)return;let p=w.current;if(p.files!==i)return;if(l){if(m===void 0||p.controller===null||p.controller.textInput.getRevision?.()!==m)return;if(p.controller.textInput.clearSubmitted===void 0)p.controller.textInput.clear();else p.controller.textInput.clearSubmitted()}else if(Y(t)===n)t.reset();N()};k.current=!0;try{if(d?.(n.trim()))return v(),{status:"accepted"};let p=await No(i),_=w.current.canSubmit===void 0?!0:w.current.canSubmit();if(_!==!0)return{status:"blocked",reason:_};if(!S.current)return{status:"blocked",reason:"form_unmounted"};if(p.rejectedCount>0)b?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(g!==void 0)await g({text:n,files:p.files});else if(e!==null)await re({text:n,files:p.files},e);return v(),{status:"accepted"}}finally{k.current=!1}},de=(e)=>{e.preventDefault(),X(e).catch(y)},fe=h((e)=>{if(!e.trim())return;if(l&&s)ye(()=>{s.textInput.setInput(e)});A.current?.requestSubmit()},[s,l]),J=a(un.Provider,{value:()=>X(null),children:Te(dn.Provider,{value:fe,children:[a("input",{accept:E,"aria-label":"Upload files",className:"hidden",multiple:te,onChange:ce,ref:x,title:"Upload files",type:"file"}),a("form",{className:P("w-full",u),onSubmit:de,ref:A,"data-tour":"chat-input",...se,children:a(Le,{className:P("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",ie&&"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:oe})})]})});return l?a(We.Provider,{value:q,children:J}):a(pn.Provider,{value:q,children:J})};function ko({className:u,...o}){return a("div",{className:P("flex w-full min-w-0 flex-row items-end gap-2",u),...o})}function So({className:u,...o}){return a(Z,{align:"block-end",className:P("order-first flex-wrap gap-1 p-2 pb-1.5",u),...o})}function _o({className:u,...o}){return a(Z,{align:"block-end",className:P("mt-3.5 justify-between gap-1 p-0",u),...o})}function Po({className:u,...o}){return a("div",{className:P("flex items-center gap-1",u),...o})}var ne=({variant:u="ghost",className:o,size:I,collapsed:d=!1,...y})=>{let f=d||V.count(y.children)<=1?"icon-xs":"xs";return a(ee,{className:P("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(d||V.count(y.children)<=1)&&"size-7",o),size:f,type:"button",variant:u,...y})},To=({className:u,variant:o="ghost",size:I="icon-xs",status:d,children:y,...f})=>{let g=a(ge,{className:"size-4"});if(d==="submitted")g=a(be,{className:"size-4 animate-spin"});else if(d==="streaming")g=a(ve,{className:"size-3 fill-current"});else if(d==="error")g=a(he,{className:"size-4"});return a(ee,{"aria-label":"Submit",className:P("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",u),size:I,type:"submit",variant:o,...f,children:y??g})};
2
2
  export{wo,ko,So,_o,Po,ne,To};
@@ -1,2 +1,2 @@
1
- var a=(e)=>String(e).padStart(2,"0");function ot(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
2
- export{ot};
1
+ var a=(e)=>String(e).padStart(2,"0");function nt(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
2
+ export{nt};
@@ -0,0 +1,2 @@
1
+ import{w}from"./chunk-spfbykq8.js";import{r,p}from"./chunk-eg86g265.js";import{m,u}from"./chunk-9gt81b51.js";import{GlobeIcon as G,LogOutIcon as R}from"lucide-react";import{useRef as k,useState as l}from"react";import{Avatar as T,AvatarFallback as B,AvatarImage as E}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as H,DropdownMenuContent as U,DropdownMenuGroup as g,DropdownMenuItem as F,DropdownMenuLabel as j,DropdownMenuRadioGroup as z,DropdownMenuRadioItem as V,DropdownMenuSeparator as f,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 vr(e){return o(g,{...e})}function yr(e){return o(f,{...e})}function oo({className:e,...a}){return o(F,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...a})}function xr({languages:e,value:a,onChange:c}){let s=r();return n(W,{children:[n(q,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(G,{className:"text-muted-foreground"}),s.t("sessionList.language")]}),o(_,{children:o(z,{value:a,onValueChange:(t)=>void p(s,Promise.resolve(c(t))),children:e.map((t)=>o(V,{value:t.code,children:t.label},t.code))})})]})}function br({user:e,children:a,onSignOut:c,busy:s=!1}){let t=r(),{t:C}=t,[M,L]=l(!1),[S,b]=l(!1),v=k(null),[D,O]=l({width:0,offset:0}),P=(y)=>{if(y){let d=v.current,i=d?.closest("[data-sidebar-footer-row]");if(!d||!i)throw Error("AccountMenu must sit in a [data-sidebar-footer-row] row");let A=i.getBoundingClientRect(),N=d.getBoundingClientRect(),I=getComputedStyle(i).direction==="rtl";O({width:i.clientWidth,offset:I?A.right-N.right:N.left-A.left})}L(y)};w(M);let x=s||S,h=n(T,{className:"size-[18px] after:border-0",children:[o(E,{src:e.avatar??void 0,alt:""}),o(B,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(H,{open:M,onOpenChange:P,children:[n(J,{ref:v,render:o(u,{disabled:x,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(m,{children:h}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(U,{side:"top",align:"start",alignOffset:-D.offset,sideOffset:8,style:{width:D.width},children:[n(g,{children:[n(j,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[o(m,{children:h}),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(f,{})]}),a,a!=null&&o(f,{}),o(g,{children:n(oo,{disabled:x,onClick:()=>{b(!0),p(t,c()).finally(()=>b(!1))},children:[o(R,{}),C("sessionList.signOut")]})})]})]})}
2
+ export{vr,yr,oo,xr,br};
@@ -1,2 +1,2 @@
1
- import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function w({value:i,onValueChange:n,options:o,itemClassName:d}){return t(r,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(s,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:l("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
2
- export{w};
1
+ import{cn as l}from"cn";import{DropdownMenuRadioGroup as r,DropdownMenuRadioItem as s}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as t,jsxs as a}from"react/jsx-runtime";function k({value:i,onValueChange:n,options:o,itemClassName:d}){return t(r,{value:i,onValueChange:(e)=>n(String(e)),children:o.map((e)=>a(s,{value:e.value,disabled:e.disabled,title:e.title,closeOnClick:!0,className:l("gap-2",e.description?"items-start":"items-center",d),children:[e.icon,e.description?a("div",{className:"min-w-0 flex-1",children:[t("div",{className:"text-xs font-medium",children:e.label}),t("div",{className:"text-muted-foreground text-[11px] font-normal",children:e.description})]}):t("span",{className:"min-w-0 flex-1 truncate text-start",children:e.label})]},e.value))})}
2
+ export{k};
@@ -1,2 +1,2 @@
1
- import{n}from"./chunk-zyvvk8b2.js";import{Je}from"./chunk-gjvpthp9.js";import{m,G}from"./chunk-v5mzxjzc.js";import{e}from"./chunk-k1vkc88d.js";import{inSessionTree as z}from"@nyssance/codex-acp-v2/client";import{ChevronDownIcon as B,ChevronRightIcon as q,GitBranchIcon as E,Loader2Icon as O,SquareIcon as R}from"lucide-react";import{useId as T,useState as p}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as s,jsxs as o}from"react/jsx-runtime";function Qe({sessionId:t}){let r=n((a)=>a.sessions),c=Object.values(r).filter((a)=>a.subagent?.parentId===t);if(c.length===0)return null;return s("div",{"data-subagent-sessions":!0,className:"min-w-0",children:c.map((a)=>s(j,{session:a},a.id))})}function j({session:t}){let{client:r,host:c}=e(),{t:a}=c,v=n((i)=>i.actions),w=n((i)=>i.sessions),I=n((i)=>i.connection==="ready"),d=v.filter((i)=>z(w,t.id,i.sessionId)).length,[l,S]=p(!1),[g,f]=p(!1),[x,h]=p(null),b=T(),u=m(t.configOptions,"model"),k=!t.attached?"detached":d>0?"requires_action":t.state==="unknown"?"unknown":t.error?"failed":t.state,y=I&&t.attached&&t.subagent?.capabilities?.cancel!=null&&t.state!=="idle",C=async()=>{f(!0),h(null);try{await r.cancel(t.id)}catch(i){h(i instanceof Error?i.message:String(i))}finally{f(!1)}};return o("section",{"aria-label":t.title??a("subagents.untitled"),className:"min-w-0",children:[o("div",{className:"flex min-w-0 items-center gap-1",children:[o(N,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-expanded":l,"aria-controls":b,onClick:()=>S(!l),children:[l?s(B,{className:"size-3.5 shrink-0"}):s(q,{className:"size-3.5 shrink-0"}),s(E,{className:"text-muted-foreground size-3.5 shrink-0"}),s("span",{className:"truncate",children:t.title??a("subagents.untitled")}),o("span",{className:"text-foreground ms-auto shrink-0 text-xs",role:"status",children:[a(`subagents.${k}`),d>0?` · ${d}`:""]})]}),y&&s(N,{variant:"ghost",size:"icon-sm",disabled:g,"aria-label":a("subagents.cancel",{name:t.title??a("subagents.untitled")}),onClick:()=>{C()},children:g?s(O,{className:"size-3.5 animate-spin"}):s(R,{className:"size-3.5"})})]}),x&&s("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:x}),l&&o("div",{id:b,className:"min-w-0 ps-4",children:[(t.subagent?.description||u)&&o("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:t.subagent?.description??void 0,children:t.subagent?.description}),u&&s("span",{className:"shrink-0",children:G(u)})]}),t.items.length>0?s("div",{className:"flex max-h-72 min-h-0 flex-col",children:s(Je,{session:t,client:r,host:c})}):s("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:a("subagents.noMessages")}),s(Qe,{sessionId:t.id})]})]})}
2
- export{Qe};
1
+ import{n}from"./chunk-z8njjc2c.js";import{et}from"./chunk-k2q7wjp6.js";import{g,G}from"./chunk-6vntcyv6.js";import{e}from"./chunk-epg5w48v.js";import{inSessionTree as z}from"@nyssance/codex-acp-v2/client";import{ChevronDownIcon as B,ChevronRightIcon as q,GitBranchIcon as E,Loader2Icon as O,SquareIcon as R}from"lucide-react";import{useId as T,useState as u}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as s,jsxs as o}from"react/jsx-runtime";function Ye({sessionId:t}){let r=n((a)=>a.sessions),c=Object.values(r).filter((a)=>a.subagent?.parentId===t);if(c.length===0)return null;return s("div",{"data-subagent-sessions":!0,className:"min-w-0",children:c.map((a)=>s(j,{session:a},a.id))})}function j({session:t}){let{client:r,host:c}=e(),{t:a}=c,v=n((i)=>i.actions),w=n((i)=>i.sessions),I=n((i)=>i.connection==="ready"),d=v.filter((i)=>z(w,t.id,i.sessionId)).length,[l,S]=u(!1),[p,f]=u(!1),[x,h]=u(null),b=T(),m=g(t.configOptions,"model"),k=!t.attached?"detached":d>0?"requires_action":t.state==="unknown"?"unknown":t.error?"failed":t.state,y=I&&t.attached&&t.subagent?.capabilities?.cancel!=null&&t.state!=="idle",C=async()=>{f(!0),h(null);try{await r.cancel(t.id)}catch(i){h(i instanceof Error?i.message:String(i))}finally{f(!1)}};return o("section",{"aria-label":t.title??a("subagents.untitled"),className:"min-w-0",children:[o("div",{className:"flex min-w-0 items-center gap-1",children:[o(N,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-expanded":l,"aria-controls":b,onClick:()=>S(!l),children:[l?s(B,{className:"size-3.5 shrink-0"}):s(q,{className:"size-3.5 shrink-0"}),s(E,{className:"text-muted-foreground size-3.5 shrink-0"}),s("span",{className:"truncate",children:t.title??a("subagents.untitled")}),o("span",{className:"text-foreground ms-auto shrink-0 text-xs",role:"status",children:[a(`subagents.${k}`),d>0?` · ${d}`:""]})]}),y&&s(N,{variant:"ghost",size:"icon-sm",disabled:p,"aria-label":a("subagents.cancel",{name:t.title??a("subagents.untitled")}),onClick:()=>{C()},children:p?s(O,{className:"size-3.5 animate-spin"}):s(R,{className:"size-3.5"})})]}),x&&s("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:x}),l&&o("div",{id:b,className:"min-w-0 ps-4",children:[(t.subagent?.description||m)&&o("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:t.subagent?.description??void 0,children:t.subagent?.description}),m&&s("span",{className:"shrink-0",children:G(m)})]}),t.items.length>0?s("div",{className:"flex max-h-72 min-h-0 flex-col",children:s(et,{session:t,client:r,host:c})}):s("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:a("subagents.noMessages")}),s(Ye,{sessionId:t.id})]})]})}
2
+ export{Ye};
@@ -1,2 +1,2 @@
1
- import{We}from"./chunk-7a668qzy.js";import{ne,To}from"./chunk-dwn6bx69.js";import{t}from"./chunk-zyvvk8b2.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function bo({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=We(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(ne,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(To,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
1
+ import{Ze}from"./chunk-famkkndg.js";import{ne,To}from"./chunk-d0cb9bks.js";import{t}from"./chunk-z8njjc2c.js";import{cn as d}from"cn";import{SquareIcon as b}from"lucide-react";import{Kbd as f}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as h,TooltipContent as I,TooltipTrigger as T}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as o,jsxs as n,Fragment as P}from"react/jsx-runtime";var v=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);function bo({active:a,sending:r,ready:p,hasMentions:m=!1,onStop:c}){let{t:e}=t(),s=Ze(),u=m||s.textInput.value.trim().length>0||s.attachments.files.length>0,l=!p||r||!u,i=a?e("composer.steer"):e("composer.send");return n(P,{children:[a&&o(ne,{"aria-label":e("composer.stop"),title:e("composer.stop"),className:"border-border size-7 rounded-full border",onClick:c,children:o(b,{className:"size-3 fill-current"})}),o("div",{className:d(l&&"cursor-not-allowed"),children:n(h,{children:[o(T,{render:o(To,{"aria-label":i,disabled:l,"aria-busy":r,status:r?"submitted":"ready"})}),n(I,{role:"tooltip",children:[o("span",{className:"min-w-0",children:i}),o(f,{className:"shrink-0",children:v?"↩":"Enter"})]})]})})]})}
2
2
  export{bo};
@@ -1,2 +1,2 @@
1
- import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function ge({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
2
- export{ge};
1
+ import{SquareIcon as l}from"lucide-react";import{useRef as u,useState as c}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{Spinner as p}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as r}from"react/jsx-runtime";function fe({title:t,onStop:i}){let[o,a]=c(!1),e=u(!1),s=async()=>{if(e.current)return;e.current=!0,a(!0);try{await i()}finally{e.current=!1,a(!1)}};return r(f,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(n)=>n.stopPropagation(),onClick:(n)=>{n.stopPropagation(),s()},children:o?r(p,{className:"size-3","aria-label":t}):r(l,{className:"size-3 fill-current"})})}
2
+ export{fe};
@@ -0,0 +1,2 @@
1
+ import{w}from"./chunk-spfbykq8.js";import{createContext as S,useContext as c,useState as x,useSyncExternalStore as D}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as L,DialogContent as y,DialogDescription as h,DialogFooter as P,DialogHeader as H,DialogTitle as R}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as d}from"react/jsx-runtime";var m=S(null),C=S(null),v=S(null);function Cr({host:e,client:t,children:n}){let[s,l]=x(null);w(s!==null);let{t:u}=e;return i(m,{value:e,children:i(C,{value:t,children:d(v,{value:l,children:[n,i(L,{open:s!==null,onOpenChange:(f)=>!f&&l(null),children:d(y,{children:[d(H,{children:[i(R,{children:u("sessionList.deleteTitle")}),i(h,{children:u("sessionList.deleteDescription")})]}),d(P,{children:[i(g,{variant:"outline",onClick:()=>l(null),children:u("sessionList.cancel")}),i(g,{onClick:()=>{if(s)p(e,t.delete(s.sessionId));l(null)},children:u("sessionList.delete")})]})]})})]})})})}function r(){let e=c(m);if(e===null)throw Error("Session list host is missing");return e}function io(){return c(m)}function a(){let e=c(C);if(e===null)throw Error("Session list client is missing");return e}function Lt(){let e=c(v);if(e===null)throw Error("Session list provider is missing");return e}function o(e){let t=a();return D((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function p(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
2
+ export{Cr,r,io,a,Lt,o,p};
@@ -1,2 +1,2 @@
1
- function yn(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
2
- export{yn};
1
+ function xn(r){if(!r.trimStart().toLowerCase().startsWith("gpt"))return r;let a=/^gpt-\d/iu.test(r.trimStart())?" ":"-";return r.split(/(\s+)/).map((i)=>i.trim().length===0?i:i.split("-").map((t,o)=>{if(t.toLowerCase()==="gpt")return"GPT";if(t.toLowerCase()==="oai")return"OAI";return o>0&&t.length>0?`${t[0]?.toUpperCase()}${t.slice(1)}`:t}).join(a).replace(/^GPT (?=\d)/u,"GPT-")).join("")}
2
+ export{xn};
@@ -0,0 +1,2 @@
1
+ import{createContext as t,useContext as o}from"react";var mn=t(null);function Ir(){let e=o(mn);if(e===null)throw Error("Composer is missing");return e}
2
+ export{mn,Ir};
@@ -1,2 +1,2 @@
1
- import{we}from"./chunk-zyvvk8b2.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function Yt({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(we,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function g(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
2
- export{Yt,e,g};
1
+ import{we}from"./chunk-z8njjc2c.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 Xt({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(we,{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 f(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
2
+ export{Xt,e,f};
@@ -0,0 +1,2 @@
1
+ import{groupSessions as Ne,projectName as ee,isQuickChatDirectory as lr,QUICK_CHATS_GROUP as q}from"@nyssance/codex-acp-v2/client";
2
+ export{Ne,ee,lr,q};