@alwith/module-chat 0.5.26 → 0.5.28

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-8em7tfgz.js +2 -0
  55. package/dist/chunk-8fnjpx11.js +2 -0
  56. package/dist/{chunk-awfvvmjt.js → chunk-8gztbvxt.js} +2 -2
  57. package/dist/chunk-8kwxqckk.js +2 -0
  58. package/dist/{chunk-3xh0e0ya.js → chunk-8qyb69g5.js} +1 -1
  59. package/dist/{chunk-qn4zvgc9.js → chunk-8xb3b71p.js} +2 -2
  60. package/dist/{chunk-92xxp77d.js → chunk-90r8y97z.js} +2 -2
  61. package/dist/{chunk-vr0dfq9w.js → chunk-91zvyqnt.js} +2 -2
  62. package/dist/chunk-93y78gn4.js +2 -0
  63. package/dist/{chunk-10emnq39.js → chunk-95mynf7q.js} +2 -2
  64. package/dist/{chunk-wtf1eyzy.js → chunk-95qfzbmx.js} +1 -1
  65. package/dist/{chunk-nh0s0y35.js → chunk-98cbjkvk.js} +3 -3
  66. package/dist/{chunk-bfcswk98.js → chunk-99w9jq4v.js} +2 -2
  67. package/dist/{chunk-1k21j77z.js → chunk-9cqpn67f.js} +2 -2
  68. package/dist/chunk-9gt81b51.js +2 -0
  69. package/dist/{chunk-ch5v5zsw.js → chunk-9x0qmswv.js} +1 -1
  70. package/dist/chunk-az5ayr2d.js +2 -0
  71. package/dist/{chunk-pqphdgp6.js → chunk-b67h7yss.js} +1 -1
  72. package/dist/chunk-bfqqsv6a.js +2 -0
  73. package/dist/{chunk-nsb0d92p.js → chunk-br9wsczn.js} +2 -2
  74. package/dist/{chunk-vgrjqwbq.js → chunk-c0b3zze8.js} +2 -2
  75. package/dist/chunk-c26xgmyr.js +2 -0
  76. package/dist/chunk-cd4v63j8.js +2 -0
  77. package/dist/{chunk-dwn6bx69.js → chunk-d0cb9bks.js} +1 -1
  78. package/dist/{chunk-gha517v4.js → chunk-d0w04ydg.js} +2 -2
  79. package/dist/chunk-dtsybj2a.js +2 -0
  80. package/dist/{chunk-btdrvsgy.js → chunk-dxgha4a2.js} +2 -2
  81. package/dist/{chunk-2x9mxyxr.js → chunk-e2q5znh5.js} +2 -2
  82. package/dist/{chunk-rnrs0cqn.js → chunk-e43x30mv.js} +1 -1
  83. package/dist/{chunk-y1mqx60y.js → chunk-ee0krzt0.js} +2 -2
  84. package/dist/chunk-eg86g265.js +2 -0
  85. package/dist/{chunk-crx8p5zx.js → chunk-ehdqspxk.js} +2 -2
  86. package/dist/chunk-ek4acj2p.js +2 -0
  87. package/dist/{chunk-k1vkc88d.js → chunk-epg5w48v.js} +2 -2
  88. package/dist/chunk-eqwga6j5.js +2 -0
  89. package/dist/chunk-f7mgf43p.js +2 -0
  90. package/dist/{chunk-7a668qzy.js → chunk-famkkndg.js} +2 -2
  91. package/dist/{chunk-tv0fwt2g.js → chunk-fpmspg92.js} +2 -2
  92. package/dist/{chunk-htzd730z.js → chunk-frbakxev.js} +2 -2
  93. package/dist/chunk-g7by9ta9.js +2 -0
  94. package/dist/{chunk-0kdemqjf.js → chunk-ggehtpkh.js} +2 -2
  95. package/dist/{chunk-fbq107z8.js → chunk-gsnqwd84.js} +2 -2
  96. package/dist/{chunk-5c5z2b48.js → chunk-h2ewgw0x.js} +2 -2
  97. package/dist/chunk-h6jkgcw1.js +2 -0
  98. package/dist/{chunk-e7j7mnmz.js → chunk-hck587pb.js} +2 -2
  99. package/dist/{chunk-b6nbarjg.js → chunk-hcwgc3r7.js} +2 -2
  100. package/dist/{chunk-2ac213n3.js → chunk-hs91aaaz.js} +2 -2
  101. package/dist/{chunk-w8qn76a1.js → chunk-htjpckp6.js} +5 -5
  102. package/dist/{chunk-4vk86bbk.js → chunk-jan870w7.js} +3 -3
  103. package/dist/{chunk-77cd8tev.js → chunk-jgwrjncj.js} +2 -2
  104. package/dist/{chunk-99ftqpgg.js → chunk-jkvqtwe6.js} +1 -1
  105. package/dist/{chunk-04kcmpnb.js → chunk-jrmygc4p.js} +1 -1
  106. package/dist/{chunk-tpwdaz8k.js → chunk-jrnfqqfc.js} +2 -2
  107. package/dist/{chunk-gjvpthp9.js → chunk-k2q7wjp6.js} +2 -2
  108. package/dist/{chunk-ymy8d3hp.js → chunk-k3e8wper.js} +3 -3
  109. package/dist/{chunk-t7drk9ja.js → chunk-kd87rt80.js} +2 -2
  110. package/dist/{chunk-3p9g44yz.js → chunk-m4eqmf0x.js} +5 -5
  111. package/dist/{chunk-j2y4wx1h.js → chunk-m9rgwr0p.js} +2 -2
  112. package/dist/{chunk-pp2qkwk7.js → chunk-n368fh3r.js} +3 -3
  113. package/dist/{chunk-y7ngqt59.js → chunk-ngqr3n0s.js} +2 -2
  114. package/dist/{chunk-hk66xnxp.js → chunk-pgqsw2sh.js} +2 -2
  115. package/dist/{chunk-xdvbb3av.js → chunk-pym8eb5y.js} +2 -2
  116. package/dist/{chunk-jst7n5r4.js → chunk-q0z9jq6p.js} +1 -1
  117. package/dist/{chunk-f7ggbprz.js → chunk-q70h5z14.js} +2 -2
  118. package/dist/{chunk-mttcvwhx.js → chunk-qd7jqtqr.js} +2 -2
  119. package/dist/{chunk-d3j5904d.js → chunk-qnc6w06c.js} +2 -2
  120. package/dist/{chunk-bvgqsaey.js → chunk-qxgmjjh2.js} +2 -2
  121. package/dist/{chunk-nr3spt0n.js → chunk-qy06pvy8.js} +2 -2
  122. package/dist/{chunk-09zfz3ap.js → chunk-r7svwjdg.js} +2 -2
  123. package/dist/{chunk-708232f3.js → chunk-rf5g26qv.js} +1 -1
  124. package/dist/chunk-rfn9vecr.js +2 -0
  125. package/dist/{chunk-667z0pac.js → chunk-s3h496tf.js} +2 -2
  126. package/dist/{chunk-03x33m2h.js → chunk-s56e2286.js} +2 -2
  127. package/dist/{chunk-dfcks9g4.js → chunk-s6m0ske7.js} +2 -2
  128. package/dist/{chunk-yez26qfc.js → chunk-scxhc46w.js} +2 -2
  129. package/dist/{chunk-hza92pfj.js → chunk-secfh4re.js} +2 -2
  130. package/dist/{chunk-nn72eqzh.js → chunk-shwnd0ta.js} +2 -2
  131. package/dist/{chunk-4qp43adx.js → chunk-sp39pqt6.js} +2 -2
  132. package/dist/{chunk-heyqzkxq.js → chunk-spfbykq8.js} +2 -2
  133. package/dist/{chunk-b1rvs016.js → chunk-srpsc10y.js} +1 -1
  134. package/dist/{chunk-jkbss7sb.js → chunk-szwq5b69.js} +1 -1
  135. package/dist/{chunk-730x182s.js → chunk-t3s1ydnq.js} +2 -2
  136. package/dist/{chunk-2apyrry0.js → chunk-thzq3tfa.js} +2 -2
  137. package/dist/chunk-tjkftq6f.js +2 -0
  138. package/dist/{chunk-pzmeeawh.js → chunk-tk2471ny.js} +1 -1
  139. package/dist/{chunk-epq42kf9.js → chunk-tk4t9h7r.js} +1 -1
  140. package/dist/{chunk-p58e9z34.js → chunk-v3etjs4w.js} +2 -2
  141. package/dist/{chunk-a5htm58g.js → chunk-v7rtfzg4.js} +2 -2
  142. package/dist/{chunk-wnn9r2r6.js → chunk-vm2qb3ns.js} +2 -2
  143. package/dist/chunk-wc53vqaw.js +2 -0
  144. package/dist/chunk-wcgwtn6h.js +2 -0
  145. package/dist/{chunk-chq163r8.js → chunk-wdrzhaxf.js} +2 -2
  146. package/dist/{chunk-sdf73s05.js → chunk-wpn4rdwv.js} +3 -3
  147. package/dist/{chunk-ce3wg766.js → chunk-x52rbm87.js} +2 -2
  148. package/dist/chunk-x54538jy.js +1 -0
  149. package/dist/{chunk-sjg8df4m.js → chunk-xhrs52gv.js} +2 -2
  150. package/dist/{chunk-g9gktxv9.js → chunk-xz6pb64j.js} +2 -2
  151. package/dist/{chunk-7appp9ad.js → chunk-z3dwf54f.js} +1 -1
  152. package/dist/{chunk-zyvvk8b2.js → chunk-z8njjc2c.js} +2 -2
  153. package/dist/{chunk-8xdak312.js → chunk-zfxwm1g9.js} +2 -2
  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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwith/module-chat",
3
- "version": "0.5.26",
3
+ "version": "0.5.28",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -374,7 +374,7 @@
374
374
  "@alwith/api": "^0.5.4",
375
375
  "@happy-dom/global-registrator": "^21.0.4",
376
376
  "@testing-library/dom": "^10.4.2",
377
- "@testing-library/jest-dom": "^6.9.1",
377
+ "@testing-library/jest-dom": "^7.0.1",
378
378
  "@testing-library/react": "^16.3.3",
379
379
  "@types/react": "^19.3.0",
380
380
  "@types/react-dom": "^19.3.0",
@@ -1,2 +0,0 @@
1
- function Vt(n){return`file://${encodeURI(n.absPath).replaceAll(/[?#]/g,encodeURIComponent)}`}function jt(n){return n.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)??n}function $t(n){return jt(n.absPath)}
2
- export{Vt,jt,$t};
@@ -1,2 +0,0 @@
1
- import{r,o}from"./chunk-3f3y9t21.js";import{QUICK_CHATS_GROUP as m,sessionGroup as a}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useMemo as L}from"react";function pr(c){let t=r(),e=o((s)=>s.projectContext),u=c===null?m:e?a(e,{cwd:t.projectPath(c)}).id:null,d=o((s)=>s.sessionList),l=o((s)=>s.connection),i=o((s)=>s.sessionListLoaded),n=o((s)=>s.sessionListError),f=()=>t.listSessions({reset:!0}).catch(()=>{return});return S(()=>{if(l==="ready"&&!i&&n===null)t.listSessions().catch(()=>{return})},[t,l,i,n]),{result:L(()=>{if(i&&e)return{status:"ready",sessionRows:d.filter((s)=>a(e,{...s,cwd:t.projectPath(s.cwd)}).id===u).toSorted((s,p)=>(p.updatedAt??"").localeCompare(s.updatedAt??""))};if(n!==null)return{status:"failed",error:n};return{status:"loading"}},[t,d,i,n,u,e]),retry:f}}
2
- export{pr};
@@ -1,2 +0,0 @@
1
- import{a,U,Gt}from"./chunk-2dvryx1q.js";var Eo=5000;function Ee(t){return"pastedText"in t}function Or(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Ke(t,e,o){let n=(r,s)=>{for(let[i,x]of a){if(!x.attachments.some((p)=>p.id===e.id))continue;U(i,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Or(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!a.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),Gt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function Ut(t,e,o,n){if(t.defaultPrevented||t.currentTarget.disabled)return;if([...t.clipboardData.items].some((i)=>i.kind==="file"&&i.type.startsWith("image/")))return;let r=t.clipboardData.getData("text/plain");if(r.length<Eo)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};U(e,(i)=>[...i,s]),Ke(e,s,n)}
2
- export{Eo,Ee,Or,Ke,Ut};
@@ -1,2 +0,0 @@
1
- var a=new Map,i=new Map,f=new Map;function Ro(t,r){if(i.has(t))throw Error("An attachment writer is already registered for this session");return i.set(t,r),()=>{if(i.get(t)===r)i.delete(t)}}function U(t,r){let n=a.get(t);if(!n)return;let e=r(n.attachments);a.set(t,{...n,attachments:e}),i.get(t)?.(e)}function Gt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function kr(t){for(;;){let e=a.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=a.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function Sr(t,r){if(r===null)a.delete(t);else a.set(t,r)}var s=new Map;function zt(t,r){if(s.has(t))throw Error("A composer is already registered for this session");return s.set(t,r),()=>{if(s.get(t)===r)s.delete(t)}}function _r(t,r){if(typeof r!=="string"||!r.trim())throw Error("The draft is empty");let n=s.get(t);if(!n)throw Error("The session's composer is not open; open the session first");let e=a.get(t);if(e&&(e.text.length||e.attachments.length||e.mentions.length))throw Error("The composer already has a draft; send or clear it first");n(r),a.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
2
- export{a,Ro,U,Gt,kr,Sr,zt,_r};
@@ -1,2 +0,0 @@
1
- import{s,r,o,u}from"./chunk-3f3y9t21.js";import{A}from"./chunk-2f9vjmxz.js";import{b,W,ve}from"./chunk-py0zbgaj.js";import{pe,O,ee}from"./chunk-6t98jn94.js";import{to}from"./chunk-fprj3wy4.js";import{ge}from"./chunk-y1mqx60y.js";import{ue}from"./chunk-pzmeeawh.js";import{me}from"./chunk-8xdak312.js";import{Nt}from"./chunk-mahpnk66.js";import{eo}from"./chunk-jst7n5r4.js";import{ActivityIcon as G}from"lucide-react";import{useEffect as K,useMemo as P}from"react";import{Kbd as M}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as D,Fragment as q}from"react/jsx-runtime";function H(i,d){return i.find((m)=>m.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function lr({selectedId:i,onSelect:d,isForeground:m,onOpen:k,accessory:R,rowActions:h}){let N=s(),{t:L}=N,p=o((t)=>t.runStates),v=o((t)=>t.drafts),l=o((t)=>t.sessionList),g=O((t)=>t.activityOrder),f=P(()=>g.flatMap((t)=>{let e=p[t];return e&&pe({runStates:p,drafts:v},t)?[{sid:t,record:e,sessionRow:H(l,e)}]:[]}),[g,p,v,l]),w=P(()=>{let t=new Map;for(let e of f){let a=e.sid===i||m?.(e.sid)?"foreground":"background",S=t.get(a)??[];S.push(e),t.set(a,S)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[f,i,m]),y=O((t)=>t.activityCollapsedGroups),n=ee(),x=w.flatMap((t)=>t.key==="foreground"||!y.has(t.key)?t.rows:[]),I=(t)=>{if(k?.(t))return;d(t)},E=eo();K(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!to(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let a=Number(e.key);if(!Number.isInteger(a)||a<1||a>9)return;let S=x[a-1];if(!S)return;e.preventDefault(),I(S.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let C=(t)=>{let e=x.indexOf(t);return c(T,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>I(t.sessionRow),accessory:R?.(t.sid),actions:h?.(t.sessionRow),hint:e<9&&E?c(M,{children:me(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(b,{children:w.map((t)=>t.key==="foreground"?c(b,{children:t.rows.map(C)},t.key):c(W,{open:!y.has(t.key),onOpenChange:(e)=>{let a=new Set(y);if(e)a.delete(t.key);else a.add(t.key);n({activityCollapsedGroups:a})},leading:c(G,{className:"text-muted-foreground size-3.5 shrink-0"}),label:L("sessionList.background"),count:t.rows.length,children:t.rows.map(C)},t.key))})}function T({sessionRow:i,state:d,interruption:m,active:k,tasks:R,listeningPorts:h,accessory:N,actions:L,onOpen:p,hint:v}){let l=s(),g=r(),{t:f}=l,w=i.title??f("sessionList.untitled"),y=Nt(i.sessionId,d);return D(q,{children:[c(ve,{"data-session-id":i.sessionId,active:k,role:"button",tabIndex:0,hoverCard:c(ue,{sessionRow:i,actions:L}),onClick:p,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),p()},state:d,interruption:m,title:w,preview:y,listeningPorts:h,onOpenPort:l.openLink&&((n)=>l.openLink?.(`http://localhost:${n}`)),accessory:N,hint:v,actions:c(ge,{title:f("sessionList.stop"),onStop:()=>u(l,g.stopSession(i.sessionId))})}),R.map((n)=>D("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(A,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
2
- export{lr};
@@ -1,2 +0,0 @@
1
- import{C}from"./chunk-heyqzkxq.js";import{createContext as S,useContext as p,useState as D,useSyncExternalStore as L}from"react";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as y,DialogContent as h,DialogDescription as w,DialogFooter as P,DialogHeader as H,DialogTitle as R}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as c}from"react/jsx-runtime";var m=S(null),v=S(null),f=S(null);function xr({host:e,client:t,children:n}){let[l,a]=D(null);C(l!==null);let{t:d}=e;return i(m,{value:e,children:i(v,{value:t,children:c(f,{value:a,children:[n,i(y,{open:l!==null,onOpenChange:(x)=>!x&&a(null),children:c(h,{children:[c(H,{children:[i(R,{children:d("sessionList.deleteTitle")}),i(w,{children:d("sessionList.deleteDescription")})]}),c(P,{children:[i(g,{variant:"outline",onClick:()=>a(null),children:d("sessionList.cancel")}),i(g,{onClick:()=>{if(l)u(e,t.delete(l.sessionId));a(null)},children:d("sessionList.delete")})]})]})})]})})})}function s(){let e=p(m);if(e===null)throw Error("Session list host is missing");return e}function io(){return p(m)}function r(){let e=p(v);if(e===null)throw Error("Session list client is missing");return e}function At(){let e=p(f);if(e===null)throw Error("Session list provider is missing");return e}function o(e){let t=r();return L((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function u(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
2
- export{xr,s,io,r,At,o,u};
@@ -1,2 +0,0 @@
1
- import{n}from"./chunk-zyvvk8b2.js";import{Yt,e,g}from"./chunk-k1vkc88d.js";import{Ft}from"./chunk-a90z5e8w.js";import{Wt}from"./chunk-hk66xnxp.js";import{Qt}from"./chunk-81paw5rb.js";import{Et,Lt}from"./chunk-4vk86bbk.js";import{Rt}from"./chunk-e7j7mnmz.js";import{LockIcon as H,UnplugIcon as k}from"lucide-react";import{useMemo as O,useRef as S}from"react";import{Alert as x,AlertDescription as C,AlertTitle as N}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as h}from"@nyssance/shadcn/vega/components/ui/button";import{Empty as M,EmptyDescription as P,EmptyHeader as z,EmptyTitle as B}from"@nyssance/shadcn/vega/components/ui/empty";import{jsx as o,jsxs as r}from"react/jsx-runtime";function Cr({host:t,client:c,...s}){let m=O(()=>t.openDiff?t:{...t,openDiff:Et},[t]);return r(Yt,{host:m,client:c,children:[o(I,{...s}),!t.openDiff&&o(Lt,{})]})}function I({session:t,header:c,overlay:s,timeline:m,composer:w,readOnlyActions:D,welcome:E,children:T,rootRef:l,search:A=!0}){let{host:d,client:R}=e(),p=S(null),b=(a)=>{if(p.current=a,typeof l==="function")l(a);else if(l)l.current=a},{t:i}=d,f=n((a)=>a.connection==="ready"),v=n((a)=>a.historyPages[t.id]?.error),y=()=>g(d,R.open(t.id,t.cwd)),u=t.items.length===0&&t.attached&&!t.restoring&&t.state==="idle";return r("div",{"data-chat-drop-zone":!0,ref:b,className:"flex h-full min-h-0 flex-col",children:[c,r("div",{className:"relative flex min-h-0 flex-1 flex-col","data-chat-content":!0,children:[A&&!u&&o(Qt,{sessionId:t.id,rootRef:p}),s,f&&!t.attached&&!t.restoring&&!t.readOnly&&o("div",{className:"mx-auto my-3 w-full max-w-4xl px-4",children:r(x,{children:[o(k,{}),o(N,{children:i("conversation.stopped")}),o(C,{children:o(h,{size:"sm",variant:"outline",onClick:y,children:i("conversation.reconnect")})})]})}),u?E??o(M,{className:"flex-1",children:r(z,{children:[o(B,{className:"text-[28px] font-normal",children:i("conversation.welcomeTitle")}),o(P,{children:i("conversation.welcomeDescription")})]})}):o(Wt,{session:t,timeline:m}),o(Rt,{sessionId:t.id}),t.readOnly?o("div",{className:"mx-auto w-full max-w-3xl shrink-0 px-6 pb-5","data-readonly-composer":!0,children:r(x,{className:"flex items-center justify-between gap-4 rounded-3xl px-5 py-4",children:[r("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[o(H,{"aria-hidden":"true",className:"size-4 shrink-0"}),r("div",{className:"min-w-0 space-y-1",children:[o(N,{children:i("conversation.readOnlyTitle")}),o(C,{children:i("conversation.readOnlyDescription")}),v&&o("p",{role:"alert",className:"text-destructive break-words",children:v})]})]}),r("div",{className:"border-border flex shrink-0 items-center gap-1 border-s ps-3","data-readonly-actions":!0,children:[o(h,{size:"sm",variant:"outline",className:"text-foreground cursor-pointer disabled:cursor-not-allowed",onClick:y,disabled:!f||t.restoring,children:i(t.restoring?"conversation.restoring":"conversation.readOnlyRetry")}),D]})]})}):w??o(Ft,{session:t})]}),T]})}
2
- export{Cr};
@@ -1,2 +0,0 @@
1
- import{me}from"./chunk-8xdak312.js";import{Kbd as i}from"@nyssance/shadcn/vega/components/ui/kbd";import{Tooltip as p,TooltipContent as l,TooltipTrigger as a}from"@nyssance/shadcn/vega/components/ui/tooltip";import{jsx as r,jsxs as e,Fragment as c}from"react/jsx-runtime";function Yn({shortcut:t,...o}){return t?r(i,{"aria-hidden":"true",...o,children:me(t)}):null}function Xn({label:t,shortcut:o}){return e(c,{children:[r("span",{className:"min-w-0",children:t}),r(Yn,{className:"shrink-0",shortcut:o,"aria-hidden":"false"})]})}function Tt({label:t,shortcut:o,children:n}){return e(p,{children:[r(a,{render:n}),r(l,{role:"tooltip",children:o?r(Xn,{label:t,shortcut:o}):t})]})}
2
- export{Yn,Xn,Tt};
@@ -1,2 +0,0 @@
1
- import{r}from"./chunk-3f3y9t21.js";import{runStateSource as l}from"@nyssance/codex-acp-v2/client";import{useSyncExternalStore as f}from"react";function pe(t,n){let e=t.runStates[n];return e!==void 0&&(!e.reusableDraft||t.drafts[n]!==void 0)}function d(t,n,e){let a=t.filter((s)=>pe(e,s)),S=new Set(a),c=e.runStates!==n.runStates&&l(e.runStates)==="event";for(let[s,i]of Object.entries(e.runStates)){if(S.has(s)||!pe(e,s))continue;let o=n.runStates[s],g=!o||i.state!==o.state||i.since!==o.since||i.lastActivityAt!==o.lastActivityAt||i.interruption!==o.interruption;if(i.reusableDraft&&e.drafts[s]!==void 0||c&&g&&(!o||i.state!=="idle")&&i.interruption!=="runtime restarted")a.push(s)}return a.length===t.length&&a.every((s,i)=>s===t[i])?t:a}var u=new WeakMap;function v(t){return{view:"sessions",activityOrder:d([],t.state,t.state),activitySeen:new Map,activityCollapsedGroups:new Set}}function on(t){let n=u.get(t);if(n)return n;let e=v(t),a=new Set,S=(i)=>{e={...e,...i};for(let o of a)o()},c=t.state;t.store.subscribe(()=>{let i=t.store.getState(),o=d(e.activityOrder,c,i);if(c=i,o!==e.activityOrder)S({activityOrder:o})});let s={get:()=>e,set:S,subscribe:(i)=>(a.add(i),()=>a.delete(i))};return u.set(t,s),s}function cr(t){u.get(t)?.set(v(t))}function O(t){let n=on(r());return f(n.subscribe,()=>t(n.get()),()=>t(n.get()))}function ee(){return on(r()).set}function dr(){let t=O((e)=>e.view),n=ee();return[t,(e)=>n({view:e})]}
2
- export{pe,on,cr,O,ee,dr};
@@ -1,3 +0,0 @@
1
- import{s,r,o}from"./chunk-3f3y9t21.js";import{Ne,te,q}from"./chunk-v0p94epn.js";import{sessionGroup as j}from"@nyssance/codex-acp-v2/client";import{cn as de}from"cn";import{ArchiveIcon as ue,FolderIcon as U,ListFilterIcon as me,SearchIcon as pe,Trash2Icon as _}from"lucide-react";import{useEffect as he,useRef as fe,useState as d}from"react";import{Alert as P,AlertDescription as T}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as g}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as ve,DialogContent as ge,DialogDescription as xe,DialogFooter as Se,DialogHeader as ye,DialogTitle as Le}from"@nyssance/shadcn/vega/components/ui/dialog";import{Input as Ce}from"@nyssance/shadcn/vega/components/ui/input";import{Select as R,SelectContent as we,SelectItem as x,SelectTrigger as W,SelectValue as J}from"@nyssance/shadcn/vega/components/ui/select";import{Spinner as M}from"@nyssance/shadcn/vega/components/ui/spinner";import{jsx as t,jsxs as n}from"react/jsx-runtime";function X({className:u,...i}){return t(we,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...i,className:de("max-w-(--available-width) min-w-0 p-1",u)})}function E(u){return u instanceof Error?u.message:String(u)}function De({children:u}){return t("div",{className:"min-h-0 flex-1 overflow-y-auto",children:t("div",{className:"flex flex-col gap-8",children:u})})}function mr({Scroll:u=De}){let{t:i,i18n:A}=s(),m=r(),S=o((e)=>e.archivedSessions),N=o((e)=>e.connection),[B,Y]=d(""),[y,Z]=d("all"),[p,ee]=d("all"),[se,ie]=d(0),[z,F]=d(!0),[I,V]=d(null),[H,O]=d(null),[C,w]=d(!1),h=fe(!1),[D,f]=d(null),[G,b]=d(null),[ne,K]=d(!1);he(()=>{if(N!=="ready")return;let e=!1;F(!0),V(null);async function c(){try{await m.listArchived({reset:!0});let a=new Set;while(!e&&m.state.archivedCursor!==null){let v=m.state.archivedCursor;if(a.has(v))throw Error("Archive pagination returned a repeated cursor");a.add(v),await m.listArchived()}}catch(a){if(!e)V(E(a))}finally{if(!e)F(!1)}}return c(),()=>{e=!0}},[m,N,se]);let l=o((e)=>e.projectContext),k=!(l!==null&&N==="ready"&&!z&&I===null)||C,L=(e)=>e.title??i("sessionList.untitled"),ae=[...new Set(S.filter((e)=>l&&j(l,e).id!==q).map((e)=>l?j(l,e).id:e.cwd))].toSorted(),re=B.trim().toLocaleLowerCase(A.language),Q=S.filter((e)=>{let c=l?j(l,e).id:null,a=c===q;return L(e).toLocaleLowerCase(A.language).includes(re)&&(y==="all"||(y==="quick"?a:!a))&&(p==="all"||(p==="quick"?a:c===p))}),le=new Intl.DateTimeFormat(A.language,{dateStyle:"medium",timeStyle:"short"});async function oe(e){if(h.current)return;h.current=!0,w(!0),O(null);try{await m.unarchive(e.sessionId)}catch(c){O(E(c))}finally{h.current=!1,w(!1)}}async function ce(){if(h.current||!D)return;h.current=!0,w(!0),b(null);let e=[],c=[];try{for(let a of D){if(!m.state.archivedSessions.some((v)=>v.sessionId===a.sessionId))continue;try{await m.delete(a.sessionId)}catch(v){e.push(a),c.push(`${L(a)}: ${E(v)}`)}}if(e.length)f(e),b(c.join(`
2
- `));else f(null)}finally{h.current=!1,w(!1)}}return n("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":i("sessionList.archives.title"),children:[n("div",{className:"mx-auto flex min-h-0 w-full max-w-5xl flex-1 flex-col gap-8 px-6 pt-8 pb-10 lg:pb-14",children:[n("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[t("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:i("sessionList.archives.title")}),n(g,{size:"sm",variant:"destructive",className:"h-[30px] text-sm font-normal",disabled:k||S.length===0,onClick:()=>{b(null),K(!0),f([...S])},children:[t(_,{className:"size-4","aria-hidden":"true"}),i("sessionList.archives.deleteAll")]})]}),n("div",{className:"flex shrink-0 flex-wrap gap-3",children:[n("div",{className:"relative min-w-48 flex-1",children:[t(pe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),t(Ce,{"aria-label":i("sessionList.archives.search"),placeholder:i("sessionList.archives.search"),value:B,onChange:(e)=>Y(e.target.value),className:"rounded-md ps-9"})]}),n(R,{value:y,onValueChange:(e)=>{if(e===null)throw Error("Archive chat type cannot be empty");Z(e)},children:[n(W,{"aria-label":i("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[t(me,{"aria-hidden":"true"}),t(J,{children:i(`sessionList.archives.${y==="all"?"allChats":y==="quick"?"quickChats":"projectChats"}`)})]}),n(X,{children:[t(x,{value:"all",children:i("sessionList.archives.allChats")}),t(x,{value:"quick",children:i("sessionList.archives.quickChats")}),t(x,{value:"project",children:i("sessionList.archives.projectChats")})]})]}),n(R,{value:p,onValueChange:(e)=>{if(e===null)throw Error("Archive project filter cannot be empty");ee(e)},children:[n(W,{"aria-label":i("sessionList.archives.project"),className:"w-48 rounded-md",children:[t(U,{"aria-hidden":"true"}),t(J,{className:"truncate",children:p==="all"?i("sessionList.archives.allProjects"):p==="quick"?i("sessionList.archives.noProject"):te(p,l??void 0)})]}),n(X,{children:[t(x,{value:"all",children:i("sessionList.archives.allProjects")}),t(x,{value:"quick",children:i("sessionList.archives.noProject")}),ae.map((e)=>t(x,{value:e,title:e,children:te(e,l??void 0)},e))]})]})]}),n(u,{children:[N!=="ready"?t("p",{role:"status",className:"text-muted-foreground",children:i("sessionList.archives.connecting")}):z?n("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[t(M,{}),i("sessionList.archives.loading")]}):I?t(P,{variant:"destructive",children:n(T,{className:"flex items-center justify-between gap-4",children:[t("span",{children:I}),t(g,{variant:"outline",onClick:()=>ie((e)=>e+1),children:i("sessionList.archives.retry")})]})}):S.length===0?n("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[t(ue,{"aria-hidden":"true",className:"size-8"}),t("p",{children:i("sessionList.archives.empty")})]}):Q.length===0?t("p",{className:"text-muted-foreground py-12 text-center",children:i("sessionList.archives.noResults")}):(l?Ne(Q,l):[]).filter(([,e])=>e.length>0).map(([e,c])=>n("section",{className:"flex flex-col gap-3",children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:e===q?void 0:e,children:[t(U,{"aria-hidden":"true",className:"size-4 shrink-0"}),t("span",{className:"truncate",children:e===q?i("sessionList.archives.noProject"):te(e,l??void 0)})]}),t("span",{className:"text-muted-foreground shrink-0 text-sm",children:i("sessionList.archives.count",{count:c.length})})]}),t("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:c.map((a)=>n("article",{"aria-label":L(a),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[n("div",{className:"min-w-0 flex-1 basis-40",children:[t("h3",{className:"truncate text-sm font-medium",title:L(a),children:L(a)}),a.updatedAt!==null&&t("time",{dateTime:a.updatedAt,title:i("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:le.format(new Date(a.updatedAt))})]}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(g,{variant:"ghost",size:"icon-sm","aria-label":i("sessionList.delete"),title:i("sessionList.delete"),disabled:k,className:"text-muted-foreground hover:text-destructive",onClick:()=>{b(null),K(!1),f([a])},children:t(_,{"aria-hidden":"true"})}),t(g,{variant:"secondary",size:"sm",disabled:k,onClick:()=>void oe(a),children:i("sessionList.archives.unarchive")})]})]},a.sessionId))})]},e)),H&&t(P,{variant:"destructive",children:t(T,{children:H})})]})]}),t(ve,{open:D!==null,onOpenChange:(e)=>{if(!e&&!h.current)f(null)},children:n(ge,{showCloseButton:!C,children:[n(ye,{children:[t(Le,{children:i("sessionList.archives.deleteTitle")}),t(xe,{children:i(ne?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:D?.length??0})})]}),G&&t(P,{variant:"destructive",children:t(T,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:G})}),n(Se,{children:[t(g,{variant:"outline",disabled:C,onClick:()=>f(null),children:i("sessionList.cancel")}),n(g,{variant:"destructive",className:"text-sm font-normal",disabled:k,onClick:()=>void ce(),children:[C&&t(M,{}),i("sessionList.archives.confirmDelete")]})]})]})})]})}
3
- export{mr};
@@ -1,2 +0,0 @@
1
- var y={ar:{untitled:"دردشة جديدة",signOut:"تسجيل الخروج",help:"مساعدة",language:"اللغة",foreground:"المقدمة",background:"الخلفية",chats:"الدردشات",activity:"نشاط",quickChats:"دردشات سريعة",retry:"إعادة المحاولة",stop:"إيقاف",rename:"إعادة تسمية",fork:"إنشاء فرع",archive:"أرشفة",unarchive:"استعادة",delete:"حذف",deleteTitle:"حذف هذه الدردشة؟",deleteDescription:"ستُحذف هذه الدردشة نهائيًا. لا يمكن التراجع عن هذا الإجراء.",cancel:"إلغاء",archived:"مؤرشفة"},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"},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"}},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"},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"},hi:{untitled:"नई चैट",signOut:"साइन आउट",help:"सहायता",language:"भाषा",foreground:"अग्रभूमि",background:"पृष्ठभूमि",chats:"चैट",activity:"गतिविधि",quickChats:"त्वरित चैट",retry:"फिर से कोशिश करें",stop:"रोकें",rename:"नाम बदलें",fork:"शाखा बनाएँ",archive:"संग्रहित करें",unarchive:"रीस्टोर करें",delete:"हटाएं",deleteTitle:"यह चैट हटाएँ?",deleteDescription:"यह चैट स्थायी रूप से हटा दी जाएगी। इसे पूर्ववत नहीं किया जा सकता।",cancel:"रद्द करें",archived:"संग्रहीत"},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"},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"},ja:{untitled:"新しいチャット",signOut:"サインアウト",help:"ヘルプ",language:"言語",foreground:"フォアグラウンド",background:"背景",chats:"チャット",activity:"アクティビティ",quickChats:"クイックチャット",retry:"再試行",stop:"停止",rename:"名前を変更",fork:"分岐を作成",archive:"アーカイブ",unarchive:"復元",delete:"削除",deleteTitle:"このチャットを削除しますか?",deleteDescription:"このチャットは完全に削除されます。この操作は取り消せません。",cancel:"キャンセル",archived:"アーカイブ済み"},ko:{untitled:"새 채팅",signOut:"로그아웃",help:"도움말",language:"언어",foreground:"포그라운드",background:"배경",chats:"채팅",activity:"활동",quickChats:"빠른 채팅",retry:"다시 시도",stop:"중지",rename:"이름 바꾸기",fork:"분기 만들기",archive:"보관",unarchive:"복원",delete:"삭제",deleteTitle:"이 채팅을 삭제할까요?",deleteDescription:"이 채팅은 영구적으로 삭제됩니다. 이 작업은 되돌릴 수 없습니다.",cancel:"취소",archived:"보관됨"},"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"},ru:{untitled:"Новый чат",signOut:"Выйти",help:"Справка",language:"Язык",foreground:"Передний план",background:"Фон",chats:"Чаты",activity:"Активность",quickChats:"Быстрые чаты",retry:"Повторить",stop:"Остановить",rename:"Переименовать",fork:"Создать ветку",archive:"Архивировать",unarchive:"Восстановить",delete:"Удалить",deleteTitle:"Удалить этот чат?",deleteDescription:"Этот чат будет удалён навсегда. Это действие нельзя отменить.",cancel:"Отмена",archived:"В архиве"},"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:"永久删除"}}};
2
- export{y};
@@ -1,2 +0,0 @@
1
- import{d}from"./chunk-92xxp77d.js";import{cn as a}from"cn";import{motion as g}from"motion/react";import{jsx as i,jsxs as u}from"react/jsx-runtime";function no({active:t,expanded:r=!1,highlight:s=!0,className:o,...l}){return i("button",{type:"button","data-active":t?"":void 0,"aria-current":t?"page":void 0,className:a(s&&d,"focus-visible:outline-foreground/10 flex shrink-0 items-center justify-center rounded-[10px] outline-hidden [corner-shape:superellipse(1.5)] focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4",r?"h-[var(--navigation-row-height)] min-w-[var(--navigation-row-height)]":"size-[var(--navigation-row-height)]",o),...l})}function ur({tabs:t,view:r,onViewChange:s,onReset:o,notifications:l,className:p}){return i("div",{className:a("relative mb-2 flex h-[var(--navigation-row-height,30px)] shrink-0 items-center gap-0.5",p),children:i("div",{role:"tablist",className:`${d} bg-foreground/5 flex h-[var(--navigation-row-height,30px)] w-full flex-none items-center gap-0.5 rounded-[10px] [corner-shape:superellipse(1.5)]`,children:t.map((e)=>{let n=r===e.key;return u(no,{role:"tab",active:n,expanded:n,highlight:!1,"aria-selected":n,title:e.title,onClick:()=>s(e.key),onDoubleClick:o&&(()=>o(e.key)),className:a("relative isolate h-[var(--navigation-row-height,30px)] min-w-[var(--navigation-row-height,30px)] justify-start rounded-[10px] px-[6px] text-sm [corner-shape:superellipse(1.5)] [&_svg]:relative [&_svg]:z-10 [&_svg]:size-4 [&_svg]:shrink-0",n?"grow transition-[flex-grow] duration-200 ease-out":"grow-0 duration-0"),children:[n&&i(g.span,{layoutId:"navigation-selected-pill","aria-hidden":"true",className:"bg-foreground/8 pointer-events-none absolute inset-0 -z-10 rounded-[10px] [corner-shape:superellipse(1.5)]",transition:{duration:0.2,ease:[0.22,1,0.36,1]}}),e.icon,l?.has(e.key)&&i("span",{"data-activity-notification":!0,"aria-hidden":"true",className:"pointer-events-none absolute top-1 right-1 z-20 size-1.5 rounded-full bg-blue-500 motion-safe:animate-[activity-notification-pulse_2s_ease-in-out_infinite]"}),i("span",{className:a("relative z-10 grid",n?"ms-2 grid-cols-[1fr] transition-[grid-template-columns,margin-inline-start] duration-200 ease-out":"ms-0 grid-cols-[0fr] duration-0"),children:i("span",{className:"min-w-0 overflow-hidden whitespace-nowrap",children:e.title})})]},e.key)})})})}
2
- export{no,ur};
@@ -1,2 +0,0 @@
1
- import{Lo,T}from"./chunk-7a668qzy.js";import{po}from"./chunk-99ftqpgg.js";import{xe}from"./chunk-s2w7e9pg.js";import{wo,ko,So,_o,Po,ne}from"./chunk-dwn6bx69.js";import{co,uo}from"./chunk-7appp9ad.js";import{rn}from"./chunk-ymy8d3hp.js";import{t,n}from"./chunk-zyvvk8b2.js";import{e}from"./chunk-k1vkc88d.js";import{pn}from"./chunk-p272qmbv.js";import{a,Ro,U,zt}from"./chunk-2dvryx1q.js";import{Bt}from"./chunk-ce3wg766.js";import{Ee,Ut}from"./chunk-2djv6s3a.js";import{Vt,$t}from"./chunk-04xjj6q3.js";import{Fo}from"./chunk-04kcmpnb.js";import{Ht}from"./chunk-fbq107z8.js";import{Ao}from"./chunk-ch5v5zsw.js";import{Kt}from"./chunk-j2y4wx1h.js";import{qt}from"./chunk-mttcvwhx.js";import{Ho}from"./chunk-5dkj3ntx.js";import{Co}from"./chunk-3xh0e0ya.js";import{bo}from"./chunk-rnrs0cqn.js";import{Ot}from"./chunk-qn4zvgc9.js";import{hasFuzzyFileSearch as Mt}from"@nyssance/codex-acp-v2/client";import{PlusIcon as Ct}from"lucide-react";import{useCallback as O,useEffect as Et,useLayoutEffect as J,useMemo as Q,useRef as Y,useState as S}from"react";import{jsx as c,jsxs as w}from"react/jsx-runtime";var Rt=["image/png","image/jpeg","image/webp","image/gif"],Z=[];async function Nt(r){let d=await(await fetch(r.url)).blob();return new Promise((l,E)=>{let I=new FileReader;I.onerror=()=>E(I.error),I.onload=()=>{let L=I.result;l(L.slice(L.indexOf(",")+1))},I.readAsDataURL(d)})}function St(r){let{t:d}=t(),l=T();return c(ne,{"aria-label":d("composer.attachImage"),title:d("composer.attachImage"),onClick:()=>l.openFileDialog(),...r,children:c(Ct,{className:"size-4"})})}function Ft({session:r,onSubmit:d,onShellCommand:l,onHandOff:E,modelSelector:I,modelMenu:L,inputHeader:tt,actions:dt,children:ut,attachmentPolicy:ft,predictions:ht=!0,disabled:gt=!1,preparing:et=!1,allowPendingInput:xt=!1}){let{host:F,client:R}=e(),{t:p}=F,k=O((o)=>{if(F.reportError)F.reportError(o);else console.error(o)},[F]),[rt,D]=S(()=>({text:a.get(r.id)?.text??"",revision:0})),{text:P}=rt,[A,yt]=S(()=>a.get(r.id)?.attachments??Z),[u,z]=S(()=>a.get(r.id)?.mentions??[]),V=A.some((o)=>Ee(o)&&o.pastedText.status!=="ready"),[M,ot]=S(!1),[H,Pt]=S(!1),[X,nt]=S(!1),f=Y(null),at=Y(null),i=Y(rt),B=O((o)=>{at.current?.(),i.current={text:o,revision:i.current.revision+1},D(i.current)},[]),bt=Ho(r,B),it=Q(()=>({read:()=>{let m=f.current?.getTextarea(),g=m===null||m===void 0?[i.current.text.length,i.current.text.length]:[m.selectionStart,m.selectionEnd];return{target:r.id,...i.current,selection:g}},compareAndSet(m,g,C){if(m.target!==r.id||m.revision!==i.current.revision)return null;i.current={text:g,revision:i.current.revision+1},D(i.current);let x=f.current?.getTextarea();if(x!==null&&x!==void 0)x.value=g,x.setSelectionRange(C[0],C[1]);return{target:r.id,...i.current,selection:C}}}),[r.id]),_=Y(null),ct=O((o)=>(_.current=o,()=>{if(_.current===o)_.current=null}),[]),K=r.state!=="idle",b=l!==void 0&&P.startsWith("!"),h=!gt&&!et&&r.attached&&!r.restoring&&!r.readOnly,N=!r.readOnly&&(xt||h),W=qt(r,h&&!M&&!H&&!V&&!X,P.length>0||A.length>0||u.length>0,ht&&!b),mt=W.invalidate;J(()=>{a.set(r.id,{text:P,attachments:A,mentions:u,modelId:a.get(r.id)?.modelId??null})},[r.id,P,A,u]),J(()=>Ro(r.id,yt),[r.id]),J(()=>zt(r.id,(o)=>{if(!N||M)throw Error("The composer cannot take text now; try again later");if(P.length||A.length||u.length)throw Error("The composer already has a draft; send or clear it first");B(o)}),[r.id,N,M,P,A,u,B]);let st=n((o)=>Mt(o.agent)),vt=Q(()=>st&&h?async(o)=>Bt((await R.fuzzyFileSearch({query:o,roots:[r.cwd]})).files):void 0,[R,st,h,r.cwd]),q=O((o)=>{z((m)=>m.includes(o)?m:[...m,o])},[]);Et(()=>{f.current?.focus()},[]);let pt=O(async({text:o,files:m})=>{let g=l!==void 0&&o.startsWith("!")?o.slice(1):null;if(g!==null){if(g.trim().length===0)return;if(m.length||u.length)throw Error("Shell commands cannot include file references or attachments");if(r.state!=="idle")throw Error("Wait for the current turn before running a shell command")}let C=o.trim();if(C.length===0&&m.length===0&&u.length===0)return;let x=_.current;ot(!0);let v=a.get(r.id),At=i.current.revision,j=null;try{let y=[];for(let s of u){let G={kind:"file",absPath:s};y.push({type:"resource_link",uri:Vt(G),name:$t(G)})}if(C.length>0)y.push({type:"text",text:C});for(let s of m)if(Ee(s)){if(s.pastedText.status!=="ready")throw Error("Text attachment is not ready");y.push({type:"resource_link",uri:s.url,name:s.filename??"pasted-text.txt"})}else y.push({type:"image",data:await Nt(s),mimeType:s.mediaType});if(i.current.revision===At&&a.get(r.id)===v)i.current={text:"",revision:i.current.revision+1},j=i.current.revision,D(i.current),z([]),U(r.id,()=>Z),a.set(r.id,{text:"",attachments:Z,mentions:[],modelId:v?.modelId??null}),f.current?.resetHeight();if(g!==null&&l)await l(g);else if(d)if(x===null)await d(y);else await d(y,(s)=>{if(x.signal.aborted||_.current!==x)return;x.accept(s),E?.(r.id,s)});else if(x===null)await R.prompt(r.id,y);else{let s=await R.prompt(r.id,y);x.accept(s)}mt();for(let s of v?.attachments??[])if(s.url.startsWith("blob:")&&!a.get(r.id)?.attachments.some((G)=>G.id===s.id))URL.revokeObjectURL(s.url)}catch(y){if(v&&j!==null&&i.current.revision===j&&a.get(r.id)?.attachments.length===0&&a.get(r.id)?.mentions.length===0)i.current={text:v.text,revision:j+1},D(i.current),z(v.mentions),a.set(r.id,v),U(r.id,()=>v.attachments);throw y}finally{ot(!1),f.current?.focus()}},[R,r.id,r.state,u,d,l,E,mt]),wt=()=>{R.cancel(r.id).catch(k)},It=O((o)=>{let m=o.code==="max_total_size"?Object.assign(Error(p("composer.imageTooLargeTitle")),{description:p("composer.imageTooLargeDescription",{mb:xe})}):Object.assign(Error(p("composer.unsupportedAttachmentTitle")),{description:p("composer.unsupportedAttachmentDescription")});k(m)},[k,p]),Tt=Q(()=>({session:r,ready:h,inputReady:N,sending:M,textareaRef:f,draft:it,interruptRef:at,observeReceipts:ct,addMention:q,setAdding:Pt,shellMode:b,handsFree:!b&&(d===void 0||E!==void 0)}),[r,h,N,M,it,ct,q,d,E,b]),lt=F.writeTextAttachment;return c(pn,{value:Tt,children:c("div",{"data-chat-drop-zone":!0,className:"mx-auto w-full max-w-3xl px-6 pb-5",children:w("div",{className:"relative",children:[tt&&c("div",{"data-chat-input-header":!0,className:"bg-sidebar dark:bg-foreground/3 relative top-1 z-0 mx-[13px] -mb-[18px] flex min-w-0 items-center gap-2 overflow-hidden rounded-t-2xl px-1.5 pt-1.5 pb-[27px]",children:tt}),w(Lo,{attachmentPolicy:ft,value:P,revision:i.current.revision,onValueChange:B,onSubmittedClear:()=>{i.current={text:"",revision:i.current.revision+1},D(i.current)},attachments:A,onAttachmentsChange:(o)=>U(r.id,()=>o),children:[c(po,{bashMode:l!==void 0,handleRef:f,commands:r.commands,searchFiles:vt,onMention:q,onSearchError:k,forcedOpen:X,onForcedOpenChange:nt,emptyLabel:p("composer.noCommands"),fileStatusLabels:{loading:p("composer.searchingFiles"),empty:p("composer.noMatchingFiles")}}),w(wo,{"data-shell-mode":b||void 0,bashMode:l!==void 0,globalDrop:!0,multiple:!0,accept:Rt.join(","),onError:It,onSubmit:pt,onSubmitAsync:pt,onSubmitError:k,canSubmit:()=>h&&!M&&!H&&!V&&(!b||!K&&P.slice(1).trim().length>0)?!0:"chat_not_ready",className:"relative z-10",children:[ut,w(So,{className:"px-3 pt-3 pb-0 empty:hidden",children:[H&&c("span",{role:"status",className:"text-muted-foreground text-xs",children:p("composer.addingFiles")}),c(Fo,{mentions:u,onRemove:(o)=>z((m)=>m.filter((g)=>g!==o))}),c(uo,{children:(o)=>Ee(o)?c(Ao,{data:o,sessionId:r.id}):c(co,{data:o,t:p})})]}),w(ko,{className:"mb-0 min-h-16 px-3 pt-4 pb-2",onKeyDownCapture:(o)=>{if(!W.text||f.current?.isComposing()||o.nativeEvent.isComposing||o.nativeEvent.keyCode===229||o.shiftKey||o.ctrlKey||o.altKey||o.metaKey||o.target!==f.current?.getTextarea())return;if(o.key==="Tab")o.preventDefault(),o.stopPropagation(),B(W.text)},children:[b&&c("span",{"data-shell-prefix":!0,"aria-hidden":"true",className:"text-destructive self-start pt-0.5 text-sm",children:"❗"}),c(rn,{className:"min-h-10 bg-transparent text-sm font-normal",ref:f,rows:2,onKeyDown:bt,bashMode:l!==void 0,disabled:!N,onPasteCapture:lt?(o)=>Ut(o,r.id,p("composer.pastedTextFilename"),lt):void 0,placeholder:b?"! command":W.text||(K?p("composer.steerPlaceholder"):p("composer.placeholder")),"aria-label":p("composer.placeholder")})]}),c(_o,{className:"chat-composer-toolbar @container/input-footer mt-0 mb-2 w-full min-w-0 p-0",children:w("div",{className:"grid w-full min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-[5px] px-2",children:[w("div",{className:"flex min-w-0 items-center gap-[5px]",children:[c(St,{className:"text-foreground",disabled:!N}),c(Co,{textareaRef:f,menuOpen:X,onOpenChange:nt,disabled:!h||r.commands.length===0}),c(Kt,{sessionId:r.id,options:r.configOptions,disabled:!h})]}),w(Po,{className:"w-full min-w-0 items-center justify-end gap-1",children:[c(Ot,{session:r}),I??c(Ht,{...L,sessionId:r.id,options:r.configOptions,disabled:!h}),dt,c(bo,{active:K,sending:M||et||H,ready:h&&!V&&(!b||!K&&P.slice(1).trim().length>0),hasMentions:u.length>0,onStop:wt})]})]})})]})]})]})})})}
2
- export{Ft};
@@ -1,2 +0,0 @@
1
- import{d}from"./chunk-92xxp77d.js";import{r,o}from"./chunk-3f3y9t21.js";import{b,_,p,W}from"./chunk-py0zbgaj.js";import{x,J,Qn}from"./chunk-tpwdaz8k.js";import{ze}from"./chunk-pqphdgp6.js";import{N,K}from"./chunk-22tg663v.js";import{de,X}from"./chunk-g9gktxv9.js";import{closestCorners as fe,DndContext as Ce,KeyboardSensor as ye,PointerSensor as Se,useSensor as Z,useSensors as De}from"@dnd-kit/core";import{SortableContext as ee,sortableKeyboardCoordinates as we,useSortable as ae,verticalListSortingStrategy as oe}from"@dnd-kit/sortable";import{CSS as ce}from"@dnd-kit/utilities";import{cn as F}from"cn";import{BrushCleaningIcon as ve,MessageSquareIcon as Ne,MoreHorizontalIcon as Ie,PencilIcon as he,PlusIcon as me,StarIcon as be,Trash2Icon as pe}from"lucide-react";import{useEffect as xe,useMemo as Me,useState as R}from"react";import{Button as D}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as te,DialogContent as ne,DialogDescription as ie,DialogFooter as le,DialogHeader as re,DialogTitle as se}from"@nyssance/shadcn/vega/components/ui/dialog";import{DropdownMenu as Ee,DropdownMenuContent as ke,DropdownMenuGroup as Le,DropdownMenuItem as H,DropdownMenuTrigger as Re}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Pe}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a,Fragment as Ke}from"react/jsx-runtime";function Te({collectionId:l,sessionId:C,children:M}){let{attributes:w,listeners:v,setNodeRef:i,transform:u,transition:g,isDragging:E}=ae({id:JSON.stringify([l,C]),data:{type:"session",collectionId:l,sessionId:C}});return e("div",{ref:i,style:{transform:ce.Transform.toString(u),transition:g},className:F("w-full min-w-0",E&&"opacity-50"),...w,...v,role:"group",children:M})}function Be({collection:l,children:C,onEdit:M,onConfirm:w,onNewChat:v}){let{t:i}=x(),u=X(),g=J(),{attributes:E,listeners:m,setNodeRef:I,transform:P,transition:T,isDragging:z}=ae({id:l.id,disabled:{draggable:l.id===N,droppable:!1},data:{type:"collection"}});return e("div",{ref:I,style:{transform:ce.Transform.toString(P),transition:T},className:F("w-full min-w-0",z&&"opacity-50"),children:e(W,{open:!l.collapsed,onOpenChange:(c)=>g(u({type:"collapse",id:l.id,collapsed:!c})),label:K(l,i),count:l.sessionIds.length,leading:l.id===N?e(be,{className:"size-3.5"}):e(ze,{emoji:l.emoji,onChange:(c)=>g(u({type:"emoji",id:l.id,emoji:c}))}),wrapHeader:(c)=>e("div",{...E,...m,role:"group",children:c}),actions:a(Ee,{children:[e(Re,{onClick:(c)=>c.stopPropagation(),onPointerDown:(c)=>c.stopPropagation(),render:e(D,{variant:"ghost",size:"icon",className:"size-5","aria-label":i("collection.more",{name:K(l,i)}),children:e(Ie,{className:"size-3.5"})})}),e(ke,{children:a(Le,{children:[l.id!==N&&a(H,{onClick:M,children:[e(he,{}),i("collection.rename")]}),a(H,{onClick:v,children:[e(me,{}),i("collection.newChat")]}),a(H,{onClick:()=>w("clear"),children:[e(ve,{}),i("collection.clearCollection")]}),l.id!==N&&a(H,{variant:"destructive",onClick:()=>w("delete"),children:[e(pe,{}),i("collection.deleteCollection")]})]})})]}),children:C})})}function He({children:l}){return e("div",{className:"min-h-0 flex-1 overflow-y-auto ps-2 pe-0 pb-1",children:l})}function Ji({renderRow:l,onSelect:C,onNewChat:M,Scroll:w=He}){let v=x(),{t:i}=v,u=X(),g=J(),E=r(),{collections:m,order:I}=de(),P=o((t)=>t.sessionList),T=o((t)=>t.archivedSessions),z=o((t)=>t.sessionListLoaded),c=o((t)=>t.sessionListError),U=Me(()=>new Map([...T,...P].map((t)=>[t.sessionId,t])),[T,P]),q=v.isMac??Qn(),[y,k]=R(null),[L,O]=R(""),[A,j]=R(""),[S,B]=R(null),[f,Q]=R(!1),ue=De(Z(Se,{activationConstraint:{distance:5}}),Z(ye,{coordinateGetter:we})),G=I.flatMap((t)=>m[t].collapsed?[]:m[t].sessionIds.flatMap((n)=>{let s=U.get(n);return s&&!s.archived?[s]:[]}));xe(()=>{let t=(n)=>{if(n.defaultPrevented||n.isComposing||n.repeat||n.shiftKey||n.altKey)return;if(q?!n.metaKey||n.ctrlKey:!n.ctrlKey||n.metaKey)return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;if(n.target instanceof HTMLElement&&(n.target.isContentEditable||n.target.closest("input,textarea,[role=dialog],[role=menu]")))return;let s=Number(n.key)-1;if(!Number.isInteger(s)||s<0||s>8||!G[s])return;n.preventDefault(),C(G[s])};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[G,q,C]);let ge=({active:t,over:n})=>{if(n===null)return;let s=t.data.current,h=n.data.current;if(s?.type==="session"&&h!==void 0){let Y=h.type==="session"?String(h.collectionId):String(n.id);g(u({type:"move",sourceCollectionId:String(s.collectionId),collectionId:Y,sessionId:String(s.sessionId),index:h.type==="session"?m[Y].sessionIds.indexOf(String(h.sessionId)):void 0}))}else if(s?.type==="collection"&&h?.type==="collection"&&String(n.id)!==N)g(u({type:"reorder",id:String(t.id),index:I.indexOf(String(n.id))}))},V=(t,n)=>{Q(!0),g(t.then(n).finally(()=>Q(!1)))};return a(Ke,{children:[e(w,{children:a(b,{children:[a(p,{className:F(d,"font-normal"),onClick:()=>{k("new"),O(""),j("")},children:[e(_,{children:e(me,{})}),e("span",{children:i("collection.newCollection")})]}),c&&a("div",{className:"text-muted-foreground px-2 text-sm",children:[e("p",{role:"alert",children:c}),e(D,{variant:"ghost",onClick:()=>g(E.listSessions({reset:!0})),children:i("collection.retry")})]}),e(Ce,{sensors:ue,collisionDetection:fe,onDragEnd:ge,children:e(ee,{items:I,strategy:oe,children:e(b,{children:I.map((t)=>e(Be,{collection:m[t],onNewChat:()=>M(t),onEdit:()=>{k(t),O(m[t].name),j(m[t].emoji??"")},onConfirm:(n)=>B({id:t,type:n}),children:e(ee,{items:m[t].sessionIds.map((n)=>JSON.stringify([t,n])),strategy:oe,children:m[t].sessionIds.map((n)=>{let s=U.get(n);if(s?.archived)return null;if(!s)return z?a("div",{className:"text-muted-foreground flex h-[var(--navigation-row-height)] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-sm font-normal",children:[e(_,{children:e(Ne,{className:"size-3.5"})}),e("span",{className:"min-w-0 flex-1 truncate",children:i("collection.unavailable")}),e(D,{variant:"ghost",size:"icon",className:"size-5 [&_svg]:size-3.5","aria-label":i("collection.removeFromGroup"),onClick:()=>g(u({type:"remove",sessionId:n,collectionId:t})),children:e(pe,{})})]},n):null;return e(Te,{collectionId:t,sessionId:n,children:l(s,()=>{},t)},n)})})},t))})})})]})}),e(te,{open:y!==null,onOpenChange:(t)=>{if(!t&&!f)k(null)},children:a(ne,{children:[a(re,{children:[e(se,{children:i(y==="new"?"collection.newCollection":"collection.rename")}),e(ie,{children:i("collection.collectionName")})]}),a("form",{onSubmit:(t)=>{if(t.preventDefault(),y===null||!L.trim()||f)return;let n=y==="new"?`collection-${crypto.randomUUID()}`:y;V(u([y==="new"?{type:"create",id:n,name:L}:{type:"rename",id:n,name:L},{type:"emoji",id:n,emoji:A}]),()=>k(null))},className:"flex flex-col gap-3",children:[e(Pe,{autoFocus:!0,"aria-label":i("collection.collectionName"),value:L,onChange:(t)=>O(t.target.value),disabled:f}),y!=="new"&&e(ze,{emoji:A,onChange:j}),a(le,{children:[e(D,{type:"button",variant:"outline",disabled:f,onClick:()=>k(null),children:i("collection.cancel")}),e(D,{type:"submit",disabled:f||!L.trim(),children:i("collection.confirm")})]})]})]})}),e(te,{open:S!==null,onOpenChange:(t)=>{if(!t&&!f)B(null)},children:a(ne,{children:[a(re,{children:[e(se,{children:i(S?.type==="delete"?"collection.deleteCollection":"collection.clearCollection")}),e(ie,{children:i("collection.confirmCollectionChange",{name:S===null?"":K(m[S.id],i)})})]}),a(le,{children:[e(D,{variant:"outline",disabled:f,onClick:()=>B(null),children:i("collection.cancel")}),e(D,{disabled:f,onClick:()=>{if(S!==null)V(u({type:S.type,id:S.id}),()=>B(null))},children:i("collection.confirm")})]})]})})]})}
2
- export{Ji};
@@ -1,2 +0,0 @@
1
- function fe(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function to(a){if(a.shiftKey||a.altKey)return!1;return fe()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
2
- export{fe,to};
@@ -1,2 +0,0 @@
1
- import{C}from"./chunk-heyqzkxq.js";import{s,u}from"./chunk-3f3y9t21.js";import{_,p}from"./chunk-py0zbgaj.js";import{GlobeIcon as b,LogOutIcon as x}from"lucide-react";import{useState as M}from"react";import{Avatar as A,AvatarFallback as N,AvatarImage as y}from"@nyssance/shadcn/vega/components/ui/avatar";import{DropdownMenu as h,DropdownMenuContent as S,DropdownMenuGroup as c,DropdownMenuItem as L,DropdownMenuLabel as P,DropdownMenuRadioGroup as I,DropdownMenuRadioItem as O,DropdownMenuSeparator as d,DropdownMenuSub as G,DropdownMenuSubContent as k,DropdownMenuSubTrigger as R,DropdownMenuTrigger as T}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as n}from"react/jsx-runtime";function fr(e){return o(c,{...e})}function hr(e){return o(d,{...e})}function oo({className:e,...r}){return o(L,{className:["h-[var(--navigation-row-height,30px)] py-0 [&_svg]:text-muted-foreground",e].filter(Boolean).join(" "),...r})}function vr({languages:e,value:r,onChange:i}){let a=s();return n(G,{children:[n(R,{className:"h-[var(--navigation-row-height,30px)] py-0",children:[o(b,{className:"text-muted-foreground"}),a.t("sessionList.language")]}),o(k,{children:o(I,{value:r,onValueChange:(t)=>void u(a,Promise.resolve(i(t))),children:e.map((t)=>o(O,{value:t.code,children:t.label},t.code))})})]})}function yr({user:e,children:r,onSignOut:i,busy:a=!1}){let t=s(),{t:w}=t,[m,v]=M(!1),[D,l]=M(!1);C(m);let g=a||D,f=n(A,{className:"size-[18px] after:border-0",children:[o(y,{src:e.avatar??void 0,alt:""}),o(N,{className:"bg-primary text-primary-foreground text-xs",children:[...e.name].slice(0,2).join("").toLocaleUpperCase()})]});return n(h,{open:m,onOpenChange:v,children:[n(T,{render:o(p,{disabled:g,className:"text-muted-foreground hover:bg-foreground/8 data-popup-open:bg-foreground/5 font-normal"}),children:[o(_,{children:f}),o("span",{className:"min-w-0 truncate",children:e.name})]}),n(S,{side:"top",align:"start",sideOffset:8,className:"w-[calc(var(--anchor-width)+36px)]",children:[n(c,{children:[n(P,{className:"text-popover-foreground flex items-center gap-2 px-2 py-2 text-sm font-medium",children:[f,n("span",{className:"min-w-0 flex-1",children:[o("span",{className:"block truncate",children:e.name}),o("span",{className:"text-muted-foreground mt-0.5 block truncate text-xs font-normal",children:e.email})]})]}),o(d,{})]}),r,r!=null&&o(d,{}),o(c,{children:n(oo,{disabled:g,onClick:()=>{l(!0),u(t,i()).finally(()=>l(!1))},children:[o(x,{}),w("sessionList.signOut")]})})]})]})}
2
- export{fr,hr,oo,vr,yr};
@@ -1,2 +0,0 @@
1
- var Ir={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function Bo(e){return[...e].toSorted((o,n)=>(Ir[o.kind]??99)-(Ir[n.kind]??99))}function ia(e){return e==="allow_once"||e==="allow_always"}function ra(e){return e==="allow_always"||e==="reject_always"}
2
- export{Ir,Bo,ia,ra};
@@ -1 +0,0 @@
1
- import{ye}from"./chunk-92xxp77d.js";import{P}from"./chunk-42atrgm1.js";import{cn as n}from"cn";import{Item as i,ItemActions as L,ItemContent as R,ItemDescription as Y,ItemMedia as F,ItemTitle as a}from"@nyssance/shadcn/vega/components/ui/item";import{jsx as o}from"react/jsx-runtime";function D({className:e,...t}){return o("div",{className:n("flex flex-col px-2",e),...t})}function ce({className:e,size:t="xs",active:m,...r}){return o(i,{size:t,"data-active":m,className:n(ye,"data-[active=true]:font-medium",e),...r})}function ut({className:e,children:t,...m}){return o(a,{className:n("w-full",e),...m,children:o(P,{children:t})})}export{L,R,Y,F,D,ce,ut};
@@ -1,2 +0,0 @@
1
- import{r,o}from"./chunk-3f3y9t21.js";import{latestAssistantReply as v}from"@nyssance/codex-acp-v2/client";import{useEffect as S,useState as g}from"react";function Nt(e,s){let a=r(),c=o((t)=>t.connection),i=o((t)=>Boolean(t.sessions[e]?.attached)&&!t.sessions[e]?.restoring),u=o((t)=>v(t.sessions[e]?.items)),f=o((t)=>Boolean(t.runStates[e]?.reusableDraft)),[p,y]=g();return S(()=>{if(c!=="ready"||f||i)return;let t=!1,l,n=0,m=async()=>{try{let d=await a.activityReply(e);if(n=0,!t)y(d??void 0)}catch{n++}finally{if(!t&&(s==="running"||n>0&&n<3))l=setTimeout(()=>void m(),5000)}};return m(),()=>{t=!0,clearTimeout(l)}},[a,e,c,f,i,s]),i?u:p??u}
2
- export{Nt};
@@ -1,2 +0,0 @@
1
- import{k,Tn,Ii,Zt,Ni,In,Mi}from"./chunk-sdf73s05.js";import{t,ke,Q,n}from"./chunk-zyvvk8b2.js";import{Ce}from"./chunk-jkbss7sb.js";import{createStore as M}from"@alwith/api/client";import{isText as A,nativeTurnId as b}from"@nyssance/codex-acp-v2/client";import{jsx as y}from"react/jsx-runtime";var v=M({entries:{}});function p(r,e){v.setState((s)=>({entries:{...s.entries,[r]:e}}))}function x(r,e){let s=b(e),a=r.items.findLast((i)=>b(i)!==null);return!e.replayed&&s!==null&&a!==void 0&&b(a)===s}function O(r,e){for(let s of r.items){if(s.kind!=="user"||s.echo==="pending")continue;for(let a of[...In(s._meta),...s.content.filter(A).flatMap((i)=>In(i._meta))])if(a.questionItemId===e)return a.answer}return}function R({sessionId:r,item:e,question:s,index:a}){let i=ke(),{t:l}=t(),m=Tn(e.id,a),c=JSON.stringify([r,m]),u=Q(v,(o)=>o.entries[c]),d=n((o)=>o.sessions[r]),h=n((o)=>o.connection==="ready"),f=u?.draft??Ii(s),q=d===void 0?u?.accepted:O(d,m)??u?.accepted,D=d!==void 0&&x(d,e),C=!d?.subagent&&h&&d?.attached&&!d.restoring&&!d.readOnly,g=q!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!D?"closed":!C?"unavailable":"pending",E=async()=>{if(v.getState().entries[c]?.pending||g!=="pending")return;let o=i.state.sessions[r];if(o===void 0||!x(o,e)||!o.attached||o.readOnly||o.restoring)return;let S=Zt(s,f);if(!S.trim())return;let w={questionItemId:m,question:s.title,answer:S};p(c,{draft:f,pending:!0});try{await i.prompt(r,[{type:"text",text:Ni(w),_meta:{codex:{questionReply:w}}}]),p(c,{draft:f,accepted:S})}catch(I){p(c,{draft:f,error:I instanceof Error?I.message:String(I)})}};if(g==="closed")return null;return y(Mi,{question:s,draft:f,status:g,answer:q,error:g==="pending"?u?.error:void 0,t:l,onChange:(o)=>p(c,{draft:o}),onSkip:()=>p(c,{draft:f,skipped:!0}),onSubmit:()=>{E()}})}function Pn({sessionId:r,item:e}){let s=n((i)=>i.sessions[r]),a=k(e._meta);if(s===void 0||s.subagent!==void 0||s.readOnly||!x(s,e))return y(Ce,{content:e.content.some((i)=>!A(i)||i.text.trim().length>0)?e.content:a.map((i)=>({type:"text",text:i.title})),messageId:e.id,streaming:!1});return y("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((i,l)=>y(R,{sessionId:r,item:e,question:i,index:l},Tn(e.id,l)))})}
2
- export{Pn};
@@ -1,2 +0,0 @@
1
- import{s,r,At,o,u}from"./chunk-3f3y9t21.js";import{M}from"./chunk-667z0pac.js";import{ve}from"./chunk-py0zbgaj.js";import{ge}from"./chunk-y1mqx60y.js";import{Ve,ue}from"./chunk-pzmeeawh.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as R,useState as y}from"react";import{jsx as n,jsxs as b,Fragment as C}from"react/jsx-runtime";function nn({sessionRow:e,active:v,onSelect:f,onForked:S=f,onHoverCardOpenChange:c,actions:l}){let a=s(),{t:p,i18n:k}=a,h=r(),d=o((t)=>t.runStates[e.sessionId]),I=At(),m=()=>f(e);return n(ve,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:v,onClick:m,onKeyDown:(t)=>{if(t.key==="Enter"||t.key===" ")t.preventDefault(),m()},state:d?.state,interruption:d?.interruption??null,title:e.title??p("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:n(B,{sessionRow:e,onDelete:()=>I(e),onForked:S,actions:l}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ve(e.updatedAt,k.language)}):void 0,actions:d!=null?n(ge,{title:p("sessionList.stop"),onStop:()=>u(a,h.stopSession(e.sessionId))}):void 0})}function B({sessionRow:e,onDelete:v,onForked:f,actions:S}){let c=s(),{t:l}=c,a=r(),p=o((i)=>F(i.agent)),k=o((i)=>i.connection==="ready"&&i.agent?.capabilities?.session?.fork!=null),[h,d]=y(!1),[I,m]=y(!1),t=R(!1);return n(ue,{sessionRow:e,renaming:h,onRename:(i)=>{if(d(!1),i!==null)u(c,a.renameSession(e.sessionId,i))},actions:b(C,{children:[p&&n(M,{icon:n(H,{}),label:l("sessionList.rename"),onClick:()=>d(!0)}),S,e.archived?n(M,{icon:n(x,{}),label:l("sessionList.unarchive"),onClick:()=>void u(c,a.unarchive(e.sessionId))}):b(C,{children:[n(M,{icon:n(A,{}),label:l("sessionList.fork"),disabled:!k||I,onClick:()=>{if(t.current)return;t.current=!0,m(!0),u(c,a.fork(e.sessionId,e.cwd).then((i)=>{let g=a.state.sessionList.find((L)=>L.sessionId===i);if(!g)throw Error("Forked chat is missing from the session list");f(g)}).finally(()=>{t.current=!1,m(!1)}))}}),n(M,{icon:n(D,{}),label:l("sessionList.archive"),onClick:()=>void u(c,a.archive(e.sessionId))})]}),n(M,{variant:"destructive",icon:n(N,{}),label:l("sessionList.delete"),onClick:v})]})})}
2
- export{nn};
@@ -1,2 +0,0 @@
1
- import{createContext as t,useContext as o}from"react";var pn=t(null);function Pr(){let e=o(pn);if(e===null)throw Error("Composer is missing");return e}
2
- export{pn,Pr};
@@ -1,2 +0,0 @@
1
- import{Tt}from"./chunk-6fefnp6e.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 ps-1","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(Tt,{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};
@@ -1,2 +0,0 @@
1
- import{ye,d}from"./chunk-92xxp77d.js";import{P}from"./chunk-42atrgm1.js";import{A}from"./chunk-2f9vjmxz.js";import{C}from"./chunk-heyqzkxq.js";import{je,Me,$e}from"./chunk-t7drk9ja.js";import{PreviewCard as w}from"@base-ui/react/preview-card";import{cn as c}from"cn";import{LockIcon as z}from"lucide-react";import{createContext as T,useContext as L,useLayoutEffect as D,useState as I}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as u,Fragment as j}from"react/jsx-runtime";function b(o){if(o.as==="ul"){let{as:i,className:s,...a}=o;return e("ul",{className:c("flex w-full min-w-0 flex-col gap-0.5",s),...a})}let{as:t,className:n,...r}=o;return e("div",{className:c("flex w-full min-w-0 flex-col gap-0.5",n),...r})}function _({className:o,...t}){return e("span",{"data-slot":"navigation-leading",className:c("flex size-6 shrink-0 items-center justify-center [&_.lucide]:size-3.5",o),...t})}function p({active:o,className:t,...n}){return e("button",{type:"button","data-active":o?"":void 0,"aria-current":o?"page":void 0,className:c("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:h,headerChildren:m,wrapHeader:f,onHeaderClick:y,children:R}){let S=()=>{y?.(),t(!o)},g=c(je,"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)]"),k=u(j,{children:[r!=null&&e(_,{children:r}),m??e(P,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e($e,{content:s!==void 0?e(Me,{className:c("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??s})}):void 0,actions:h})})]}),H=m==null?u("div",{"data-active":l?"":void 0,title:n,className:c(g,d),onClick:S,onKeyDown:(v)=>{if(v.target!==v.currentTarget)return;if(v.key!=="Enter"&&v.key!==" ")return;v.preventDefault(),S()},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]"}),k]}):e("div",{"data-active":l?"":void 0,className:g,children:k});return u("div",{className:"text-[#1a1c1f] dark:text-white",children:[f===void 0?H:f(H),o&&e(b,{className:"mt-0.5",children:R})]})}var E=T(()=>{}),G=T(()=>{});function Mt(){return L(G)}function he(){return L(E)}function ve({active:o=!1,state:t,interruption:n=null,leased:r=!1,media:i,title:s,hoverCard:a,onHoverCardOpenChange:l,subtitle:h,preview:m,listeningPorts:f,onOpenPort:y,accessory:R,meta:S,hint:g,actions:k,className:H,...v}){let O=u("div",{"data-slot":"navigation-session-item","data-active":o,className:c(je,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]",(m||f!=null&&f.length>0)&&"h-auto min-h-[var(--navigation-row-height,30px)] py-2.5",H),...v,children:[e(_,{children:t!=null?e(A,{state:t,title:n??void 0}):i}),u("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(P,{className:c("leading-none",t==="done"&&"font-semibold"),children:s}),h!=null&&e(P,{className:"text-muted-foreground text-xs",children:h}),m&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:m}),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((x)=>y?u("button",{type:"button",className:"underline",onPointerDown:(N)=>N.stopPropagation(),onKeyDown:(N)=>N.stopPropagation(),onClick:(N)=>{N.stopPropagation(),y(x)},children:[":",x]},x):u("span",{children:[":",x]},x))})]}),u("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[r&&e(z,{className:"text-muted-foreground size-3"}),e($e,{content:R!=null?e(Me,{children:R}):S??e(Me,{}),actions:k}),g!=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:g})]})]});if(a==null)return O;return e(M,{row:O,onOpenChange:l,children:a})}function M({row:o,children:t,onOpenChange:n}){let[r,i]=I(!1),[s,a]=I(!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 C(o),u(w.Root,{open:o,onOpenChange:t,children:[e(w.Trigger,{render:n,delay:700,closeDelay:100}),e(w.Portal,{children:e(w.Positioner,{side:i,sideOffset:s,align:a,alignOffset:l,className:"isolate z-50",children:e(w.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{b,_,p,W,Mt,he,ve};
@@ -1,2 +0,0 @@
1
- import{k}from"./chunk-sdf73s05.js";import{codexMessageError as A,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Qr(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 w(t){let e=t._meta?.codex;return typeof e==="object"&&e!==null&&e.notice===!0}function bi(t){return t.user===null&&t.items.length>0&&t.items.every((e)=>e.kind==="assistant"&&w(e))}function T(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 M(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)M(s,e,n)}function j(t,e,n,o){switch(e.kind){case"user":break;case"assistant":{if(A(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=k(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(k(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"||w(e)||s===null&&n)t.work.push({kind:"text",key:`text:${e.id}`,item:e});else t.final.push(e);break}case"thought":T(t,e,o);break;case"tool":if(T(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 Ci(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)=>!Qr(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,I=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&I!==null&&a!==I||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")I=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)M(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let h=`turn:${l.kind}:${l.id}`,x=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(h);if(y!==void 0&&K(y.items,a)&&y.endedAt===x)return y;let b={key:h,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:x,replayed:a.every(wn),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,g)=>j(b,c,g<v,a[g-1])),b})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function wn(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function ie(t){return S(t.content)}function nt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function kn(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function wi(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 ki(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 Si(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(!ki(t,e[n-1],o))break;n--}return e[n]?.key}function _i(t,e,n){let o=n,s=n;while(o>0&&ki(t,e[o-1],e[o]))o--;while(s+1<e.length&&ki(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{Qr,bi,Ci,wn,ie,nt,kn,wi,ki,Si,_i};
@@ -1,2 +0,0 @@
1
- import{C}from"./chunk-heyqzkxq.js";import{s}from"./chunk-3f3y9t21.js";import{CircleHelpIcon as m}from"lucide-react";import{useRef as c,useState as p}from"react";import{Button as f}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as h,DropdownMenuContent as g,DropdownMenuTrigger as w}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as e,jsxs as M}from"react/jsx-runtime";function sr({children:l}){let{t:n}=s(),[o,u]=p(!1),r=c(null),[a,d]=p();return C(o),M(h,{open:o,onOpenChange:(t)=>{if(t){let i=r.current?.parentElement;if(!i)throw Error("Help trigger must be mounted in its footer row");d(i.clientWidth)}u(t)},children:[e(w,{render:e(f,{ref:r,variant:"ghost",size:"icon-sm",className:"size-[var(--navigation-row-height,30px)] shrink-0 rounded-[10px] p-0 [corner-shape:superellipse(1.5)]","aria-label":n("sessionList.help"),title:n("sessionList.help")}),children:e(m,{className:"size-4 shrink-0"})}),e(g,{side:"top",align:"end",sideOffset:8,style:{width:a},children:l})]})}
2
- export{sr};
@@ -1,2 +0,0 @@
1
- var Xr=1e6,Jr=5000000;function Io(_,e){return _+e>5000000}function ea(_){return(_/1e6).toFixed(1)}var xe=5;
2
- export{Xr,Jr,Io,ea,xe};
@@ -1,2 +0,0 @@
1
- import{groupSessions as Ne,projectName as te,isQuickChatDirectory as gr,QUICK_CHATS_GROUP as q}from"@nyssance/codex-acp-v2/client";
2
- export{Ne,te,gr,q};
@@ -1,2 +0,0 @@
1
- import{S}from"./chunk-rezwwmw7.js";import{oe}from"./chunk-x2nemdjf.js";import{isPlanItems as n,isPlanMarkdown as r}from"@nyssance/codex-acp-v2/client";import{jsx as e}from"react/jsx-runtime";function ni({plan:t}){if(r(t))return e("div",{className:"codex-reasoning-details",children:e(S,{text:t.content,streaming:!1})});if(!n(t))return null;return e(oe,{entries:t.entries})}
2
- export{ni};
@@ -1,2 +0,0 @@
1
- function*An(n,e){if(e.length===0)return;let r=new RegExp(e.replaceAll(/[.*+?^{}()|[\]\\$]/g,String.raw`\$&`),"giu");for(let t of n.matchAll(r))yield{start:t.index,end:t.index+t[0].length}}function Fi(n,e){if(e.length===0)return[];let r=[];for(let{turnKey:t,segments:o}of n){let c=0;for(let s of o)for(let a of An(s,e))r.push({turnKey:t,occurrenceInTurn:c}),c+=1}return r}
2
- export{An,Fi};