@alwith/module-chat 0.5.11 → 0.5.13

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 (326) hide show
  1. package/README.md +7 -0
  2. package/dist/activity-host.js +1 -1
  3. package/dist/approval/choice-elicitation-form.js +1 -1
  4. package/dist/approval/choice-schema.js +1 -1
  5. package/dist/approval/permission-options.js +1 -1
  6. package/dist/approval/permission-view.js +1 -1
  7. package/dist/approval/schema-elicitation-form.js +1 -1
  8. package/dist/approval/url-elicitation-card.js +1 -1
  9. package/dist/{chunk-rnzphmk6.js → chunk-0keppemg.js} +2 -2
  10. package/dist/{chunk-sr5rcdza.js → chunk-0mze2qnw.js} +2 -2
  11. package/dist/{chunk-cpk3y6ad.js → chunk-195y00jd.js} +2 -2
  12. package/dist/chunk-19a0ehyy.js +2 -0
  13. package/dist/{chunk-5m4605a3.js → chunk-1ghceftn.js} +1 -1
  14. package/dist/chunk-1gmz5kxh.js +2 -0
  15. package/dist/{chunk-460phps1.js → chunk-1wpdb17m.js} +2 -2
  16. package/dist/{chunk-294gms5s.js → chunk-1z6v9pjq.js} +2 -2
  17. package/dist/{chunk-abwjd5yv.js → chunk-20mzyay7.js} +2 -2
  18. package/dist/{chunk-6amcjhqh.js → chunk-215c1t1e.js} +2 -2
  19. package/dist/{chunk-0d4xsx23.js → chunk-2bkh8cjr.js} +2 -2
  20. package/dist/{chunk-zz734bzf.js → chunk-2pj3pcc7.js} +2 -2
  21. package/dist/{chunk-hxhptw6e.js → chunk-2qhbm5y9.js} +2 -2
  22. package/dist/{chunk-7jdazbzv.js → chunk-2r3sfmyf.js} +2 -2
  23. package/dist/chunk-2wxea30c.js +2 -0
  24. package/dist/{chunk-w43dvzqk.js → chunk-3ccatjcc.js} +3 -3
  25. package/dist/chunk-3fvwqfm2.js +2 -0
  26. package/dist/{chunk-a3krtv66.js → chunk-3wwkzyxs.js} +2 -2
  27. package/dist/{chunk-20svvgj3.js → chunk-40d5the9.js} +2 -2
  28. package/dist/{chunk-qw0jp3wm.js → chunk-4p7yyxq8.js} +2 -2
  29. package/dist/{chunk-kahn24np.js → chunk-4q7rpdzc.js} +2 -2
  30. package/dist/chunk-4r3ch7fk.js +2 -0
  31. package/dist/{chunk-wb3zpzk3.js → chunk-4tst6wwf.js} +1 -1
  32. package/dist/{chunk-tjgq4882.js → chunk-4z4tec0p.js} +2 -2
  33. package/dist/{chunk-cke0v0a7.js → chunk-5cnw6yc7.js} +1 -1
  34. package/dist/{chunk-5w92bzgs.js → chunk-5mpabjpm.js} +2 -2
  35. package/dist/{chunk-vv1ghqq3.js → chunk-5pr21n80.js} +1 -1
  36. package/dist/{chunk-znx2e9e7.js → chunk-5x4an3fb.js} +2 -2
  37. package/dist/chunk-6acs2hzs.js +2 -0
  38. package/dist/{chunk-4hv66fey.js → chunk-6t3tgzps.js} +2 -2
  39. package/dist/chunk-6y5d4j79.js +2 -0
  40. package/dist/chunk-7cm1jptm.js +2 -0
  41. package/dist/{chunk-0gwe31zs.js → chunk-7h1m9nbx.js} +2 -2
  42. package/dist/chunk-7x4dpkzh.js +2 -0
  43. package/dist/{chunk-knsf6jm1.js → chunk-8q0nz9fp.js} +2 -2
  44. package/dist/chunk-8x43r6fk.js +2 -0
  45. package/dist/{chunk-1hy64ewz.js → chunk-9mxxxkzq.js} +1 -1
  46. package/dist/{chunk-fe3c678p.js → chunk-9v7x6sqy.js} +2 -2
  47. package/dist/chunk-9wgngtx8.js +2 -0
  48. package/dist/{chunk-91x8etvh.js → chunk-a4j8mjg1.js} +2 -2
  49. package/dist/{chunk-17zegmxa.js → chunk-aac5y6xt.js} +1 -1
  50. package/dist/chunk-afd3bq7v.js +2 -0
  51. package/dist/{chunk-magaaqab.js → chunk-ajmyr2zy.js} +1 -1
  52. package/dist/{chunk-7h8pv9eg.js → chunk-apqdf6y3.js} +1 -1
  53. package/dist/chunk-b0zk92wd.js +2 -0
  54. package/dist/chunk-b7afpbwn.js +3 -0
  55. package/dist/chunk-b9hjn4a5.js +2 -0
  56. package/dist/{chunk-qah4fs3d.js → chunk-bk0ezksw.js} +1 -1
  57. package/dist/chunk-bm68x7xa.js +3 -0
  58. package/dist/chunk-bx2rafbd.js +3 -0
  59. package/dist/{chunk-syffw61b.js → chunk-c2bkhrcc.js} +4 -4
  60. package/dist/{chunk-hjnf5kvc.js → chunk-c4t2a146.js} +2 -2
  61. package/dist/{chunk-b65vdzz3.js → chunk-can1xpx6.js} +1 -1
  62. package/dist/chunk-cc0tan75.js +2 -0
  63. package/dist/chunk-cj9htyem.js +2 -0
  64. package/dist/chunk-d0q5kbq8.js +2 -0
  65. package/dist/{chunk-6d7ppje3.js → chunk-d1z2ns5m.js} +2 -2
  66. package/dist/chunk-de85vphg.js +2 -0
  67. package/dist/{chunk-jn0q0b7k.js → chunk-dnsmr5nf.js} +2 -2
  68. package/dist/{chunk-r79zqx0t.js → chunk-e4a1cf50.js} +5 -5
  69. package/dist/{chunk-k5c82xk9.js → chunk-e8ngg07w.js} +2 -2
  70. package/dist/{chunk-ksv9pjc2.js → chunk-emdw6cpb.js} +1 -1
  71. package/dist/chunk-ey5vrsya.js +2 -0
  72. package/dist/{chunk-4svcj9c6.js → chunk-fexvhys2.js} +2 -2
  73. package/dist/chunk-fsyc5ybt.js +2 -0
  74. package/dist/{chunk-p8nx34zm.js → chunk-ftcydsbs.js} +2 -2
  75. package/dist/{chunk-ynw0f8h2.js → chunk-gqxjp1xf.js} +2 -2
  76. package/dist/chunk-gtyab797.js +2 -0
  77. package/dist/{chunk-88xay4pa.js → chunk-hfaarm10.js} +2 -2
  78. package/dist/{chunk-5kpcpjrb.js → chunk-hhwdk46d.js} +3 -3
  79. package/dist/{chunk-6kn920c5.js → chunk-htnp024d.js} +1 -1
  80. package/dist/{chunk-t3ew92b3.js → chunk-j3tka93v.js} +2 -2
  81. package/dist/{chunk-rszktjdw.js → chunk-j5047dxn.js} +3 -3
  82. package/dist/{chunk-7a6t282a.js → chunk-jgvbf3sx.js} +1 -1
  83. package/dist/{chunk-0yvbqccv.js → chunk-jkwf97cs.js} +2 -2
  84. package/dist/{chunk-sex6d2c2.js → chunk-k7gn0faf.js} +2 -2
  85. package/dist/{chunk-ek06eyp4.js → chunk-kjtd3wc3.js} +1 -1
  86. package/dist/{chunk-t6t6hgzx.js → chunk-ksb110ef.js} +2 -2
  87. package/dist/{chunk-6edz9f7j.js → chunk-kv0tnq8g.js} +2 -2
  88. package/dist/chunk-kzcrcs7q.js +2 -0
  89. package/dist/{chunk-c0ac9k7h.js → chunk-m4dgha79.js} +2 -2
  90. package/dist/{chunk-g7p46jq1.js → chunk-m5k1xtjr.js} +2 -2
  91. package/dist/{chunk-qnk5jk1b.js → chunk-mbjv33a2.js} +2 -2
  92. package/dist/chunk-mqxg6cgm.js +4 -0
  93. package/dist/{chunk-krmz8t4p.js → chunk-mrfy48hg.js} +2 -2
  94. package/dist/{chunk-1drkvxzk.js → chunk-ms49ecg4.js} +1 -1
  95. package/dist/chunk-mst2ng40.js +7 -0
  96. package/dist/{chunk-svt0t387.js → chunk-mzh48e09.js} +2 -2
  97. package/dist/{chunk-tv89wh8b.js → chunk-n9f80j0a.js} +2 -2
  98. package/dist/chunk-ns6yd5s6.js +3 -0
  99. package/dist/{chunk-cjztkcsm.js → chunk-nt59nkbj.js} +2 -2
  100. package/dist/chunk-ntegv7av.js +2 -0
  101. package/dist/{chunk-gzff19t3.js → chunk-nvqy2rd1.js} +2 -2
  102. package/dist/{chunk-7k0wvvy0.js → chunk-p12g8enf.js} +1 -1
  103. package/dist/{chunk-mt965yn0.js → chunk-phq6b35v.js} +2 -2
  104. package/dist/{chunk-xxkdv1zf.js → chunk-pv35kspb.js} +1 -1
  105. package/dist/chunk-q6km9nha.js +2 -0
  106. package/dist/chunk-qa6kb660.js +2 -0
  107. package/dist/{chunk-0n240acr.js → chunk-qp7aywgn.js} +2 -2
  108. package/dist/{chunk-50qyant6.js → chunk-qpdgh554.js} +3 -3
  109. package/dist/{chunk-nkypxxjk.js → chunk-qx9j4bnh.js} +1 -1
  110. package/dist/{chunk-ryz4c13z.js → chunk-qxabrz98.js} +2 -2
  111. package/dist/{chunk-m99k3e5h.js → chunk-qz8gpb9j.js} +2 -2
  112. package/dist/{chunk-5hsmhj1g.js → chunk-r8mszb32.js} +3 -3
  113. package/dist/{chunk-30wqrz8v.js → chunk-rf9yxbes.js} +2 -2
  114. package/dist/{chunk-qj63fv6w.js → chunk-rwczpvta.js} +2 -2
  115. package/dist/{chunk-qpc4ca5y.js → chunk-rxwqvya2.js} +2 -2
  116. package/dist/{chunk-w8qmh6he.js → chunk-s0ef3h7b.js} +2 -2
  117. package/dist/chunk-s55n9cby.js +2 -0
  118. package/dist/chunk-t1j88bvm.js +2 -0
  119. package/dist/chunk-t1m9ysv5.js +2 -0
  120. package/dist/{chunk-2pha46d9.js → chunk-tc7qxw3f.js} +1 -1
  121. package/dist/{chunk-ak0k5vg6.js → chunk-tc85dd04.js} +1 -1
  122. package/dist/chunk-tq6ekz3s.js +2 -0
  123. package/dist/chunk-tv74s60m.js +2 -0
  124. package/dist/chunk-vbgfrh23.js +2 -0
  125. package/dist/{chunk-jhk2chpp.js → chunk-wdy20cvh.js} +2 -2
  126. package/dist/chunk-wf9bna6z.js +2 -0
  127. package/dist/{chunk-728v2as1.js → chunk-wmeebq8x.js} +2 -2
  128. package/dist/{chunk-f4h7yb7d.js → chunk-wmp3w889.js} +2 -2
  129. package/dist/{chunk-zbtas7pt.js → chunk-wtkn1jej.js} +2 -2
  130. package/dist/chunk-x2wg6e97.js +2 -0
  131. package/dist/chunk-x8kxqtva.js +2 -0
  132. package/dist/{chunk-cgqhz23q.js → chunk-xpdv1aed.js} +2 -2
  133. package/dist/chunk-xqr05vqf.js +2 -0
  134. package/dist/chunk-xw93fypz.js +3 -0
  135. package/dist/{chunk-hrsz92yq.js → chunk-xx4tnhcy.js} +1 -1
  136. package/dist/{chunk-mgtkmbmd.js → chunk-y2z94rrh.js} +2 -2
  137. package/dist/chunk-y6xhz68r.js +2 -0
  138. package/dist/{chunk-377s443r.js → chunk-yh9qdb2k.js} +3 -3
  139. package/dist/{chunk-rnykpmn2.js → chunk-yhxs6266.js} +2 -2
  140. package/dist/{chunk-6ss1981q.js → chunk-ykp85wc1.js} +2 -2
  141. package/dist/{chunk-m6rrt94g.js → chunk-zrx7qt5g.js} +2 -2
  142. package/dist/codex/activity-group.js +1 -1
  143. package/dist/codex/assistant-message.d.ts +2 -1
  144. package/dist/codex/assistant-message.js +1 -1
  145. package/dist/codex/async-question-card.js +1 -1
  146. package/dist/codex/disclosure-state.js +1 -1
  147. package/dist/codex/edited-files-card.js +1 -1
  148. package/dist/codex/image-view-activity.js +1 -1
  149. package/dist/codex/markdown-renderer.js +1 -1
  150. package/dist/codex/navigation-audio.js +1 -1
  151. package/dist/codex/navigation-preview.js +1 -1
  152. package/dist/codex/navigation-rail.js +1 -1
  153. package/dist/codex/patch-view.js +1 -1
  154. package/dist/codex/plan.js +1 -1
  155. package/dist/codex/timeline-virtualizer.js +1 -1
  156. package/dist/codex/turn-activity.d.ts +1 -1
  157. package/dist/codex/turn-activity.js +1 -1
  158. package/dist/codex/user-message.js +1 -1
  159. package/dist/codex/virtualized-turn-list.js +1 -1
  160. package/dist/composer/completion-filter.js +1 -1
  161. package/dist/composer/completion-menu.js +1 -1
  162. package/dist/composer/completion-trigger.js +1 -1
  163. package/dist/composer/effort-slider.js +1 -1
  164. package/dist/composer/menu-radio.js +1 -1
  165. package/dist/composer/model-select.js +1 -1
  166. package/dist/composer/permission-mode-select.js +1 -1
  167. package/dist/composer/prompt-input-attachments.js +1 -1
  168. package/dist/composer/prompt-input-clipboard.js +1 -1
  169. package/dist/composer/prompt-input-context.js +1 -1
  170. package/dist/composer/prompt-input-textarea.js +1 -1
  171. package/dist/composer/prompt-input.js +1 -1
  172. package/dist/conversation/action-card.js +1 -1
  173. package/dist/conversation/composer/composer.d.ts +2 -1
  174. package/dist/conversation/composer/composer.js +1 -1
  175. package/dist/conversation/composer/config-options.js +1 -1
  176. package/dist/conversation/composer/context.d.ts +1 -0
  177. package/dist/conversation/composer/context.js +1 -1
  178. package/dist/conversation/composer/drafts.js +1 -1
  179. package/dist/conversation/composer/file-items.js +1 -1
  180. package/dist/conversation/composer/long-text.js +1 -1
  181. package/dist/conversation/composer/mention-chips.js +1 -1
  182. package/dist/conversation/composer/mention-uri.js +1 -1
  183. package/dist/conversation/composer/model-menu.d.ts +1 -1
  184. package/dist/conversation/composer/model-menu.js +1 -1
  185. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  186. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  187. package/dist/conversation/composer/prediction.js +1 -1
  188. package/dist/conversation/composer/slash-command-button.js +1 -1
  189. package/dist/conversation/composer/submit-button.js +1 -1
  190. package/dist/conversation/composer/usage-meter.js +1 -1
  191. package/dist/conversation/context.js +1 -1
  192. package/dist/conversation/conversation-body.js +1 -1
  193. package/dist/conversation/conversation-view.js +1 -1
  194. package/dist/conversation/conversation.d.ts +1 -0
  195. package/dist/conversation/conversation.js +1 -1
  196. package/dist/conversation/diff-modal.js +1 -1
  197. package/dist/conversation/session-actions.js +1 -1
  198. package/dist/conversation/subagent-sessions.d.ts +3 -0
  199. package/dist/conversation/subagent-sessions.js +1 -0
  200. package/dist/image-lightbox.js +1 -1
  201. package/dist/image-preview-dialog.js +1 -1
  202. package/dist/lib/code-highlighter.js +1 -1
  203. package/dist/lib/fuzzy.js +1 -1
  204. package/dist/lib/group-blocks.js +1 -1
  205. package/dist/lib/image-encode.js +1 -1
  206. package/dist/lib/limits.js +1 -1
  207. package/dist/lib/markdown-parser.js +1 -1
  208. package/dist/lib/markdown-rules.js +1 -1
  209. package/dist/lib/model-name.js +1 -1
  210. package/dist/lib/pointer-centered-zoom.js +1 -1
  211. package/dist/lib/prepare-prompt-files.js +1 -1
  212. package/dist/lib/stream-style.js +1 -1
  213. package/dist/lib/streaming-markdown.js +1 -1
  214. package/dist/locales.d.ts +156 -0
  215. package/dist/locales.js +1 -1
  216. package/dist/search/chat-search.js +1 -1
  217. package/dist/search/dom-matches.js +1 -1
  218. package/dist/search/find-bar.js +1 -1
  219. package/dist/search/literal-matches.js +1 -1
  220. package/dist/session-list/archived-sessions.js +1 -1
  221. package/dist/session-list/highlight.js +1 -1
  222. package/dist/session-list/host.js +1 -1
  223. package/dist/session-list/hover-info-card.js +1 -1
  224. package/dist/session-list/locales.js +1 -1
  225. package/dist/session-list/navigation.js +1 -1
  226. package/dist/session-list/overflow-marquee.js +1 -1
  227. package/dist/session-list/row-stop-button.js +1 -1
  228. package/dist/session-list/session-groups.js +1 -1
  229. package/dist/session-list/session-info-card.js +1 -1
  230. package/dist/session-list/session-list.js +1 -1
  231. package/dist/session-list/session-row.js +1 -1
  232. package/dist/session-list/session-state-dot.js +1 -1
  233. package/dist/session-list/session-state-menu.js +1 -1
  234. package/dist/session-list/sidebar-overlay.js +1 -1
  235. package/dist/session-list/trailing-swap.js +1 -1
  236. package/dist/session-list/use-activity-preview.js +1 -1
  237. package/dist/session-list/use-project-sessions.js +1 -1
  238. package/dist/session-list/virtual-session-rows.js +1 -1
  239. package/dist/session-timeline/activity-group.js +1 -1
  240. package/dist/session-timeline/activity-projection.d.ts +2 -1
  241. package/dist/session-timeline/activity-projection.js +1 -1
  242. package/dist/session-timeline/assistant-content.js +1 -1
  243. package/dist/session-timeline/assistant-turn.js +1 -1
  244. package/dist/session-timeline/async-questions.js +1 -1
  245. package/dist/session-timeline/edited-files-card.js +1 -1
  246. package/dist/session-timeline/history-timeline.js +1 -1
  247. package/dist/session-timeline/host.js +1 -1
  248. package/dist/session-timeline/navigation-rail.js +1 -1
  249. package/dist/session-timeline/plan.js +1 -1
  250. package/dist/session-timeline/question-reply.js +1 -1
  251. package/dist/session-timeline/resource-content.js +1 -1
  252. package/dist/session-timeline/session-timeline.js +1 -1
  253. package/dist/session-timeline/timeline-registry.js +1 -1
  254. package/dist/session-timeline/turn-activity.js +1 -1
  255. package/dist/session-timeline/turn-error.js +1 -1
  256. package/dist/session-timeline/turn-retry.js +1 -1
  257. package/dist/session-timeline/turn-time.js +1 -1
  258. package/dist/session-timeline/turns.js +1 -1
  259. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  260. package/dist/session-timeline/user-message.js +1 -1
  261. package/dist/types.d.ts +1 -0
  262. package/dist/ui/alert.js +1 -1
  263. package/dist/ui/badge.js +1 -1
  264. package/dist/ui/button.js +1 -1
  265. package/dist/ui/card.js +1 -1
  266. package/dist/ui/checkbox.js +1 -1
  267. package/dist/ui/dialog.js +1 -1
  268. package/dist/ui/dropdown-menu.js +1 -1
  269. package/dist/ui/empty.js +1 -1
  270. package/dist/ui/field.js +1 -1
  271. package/dist/ui/hover-card.js +1 -1
  272. package/dist/ui/input-group-textarea.js +1 -1
  273. package/dist/ui/input-group.js +1 -1
  274. package/dist/ui/input.js +1 -1
  275. package/dist/ui/kbd.js +1 -1
  276. package/dist/ui/label.js +1 -1
  277. package/dist/ui/radio-group.js +1 -1
  278. package/dist/ui/select.js +1 -1
  279. package/dist/ui/separator.js +1 -1
  280. package/dist/ui/skeleton.js +1 -1
  281. package/dist/ui/spinner.js +1 -1
  282. package/dist/ui/switch.js +1 -1
  283. package/dist/ui/tooltip.js +1 -1
  284. package/package.json +3 -3
  285. package/dist/chunk-0kwfy29d.js +0 -2
  286. package/dist/chunk-133f0wed.js +0 -2
  287. package/dist/chunk-31x6chk8.js +0 -2
  288. package/dist/chunk-3e0mfcj6.js +0 -2
  289. package/dist/chunk-3vrtepy0.js +0 -3
  290. package/dist/chunk-443z7mve.js +0 -2
  291. package/dist/chunk-4b3s7gyc.js +0 -3
  292. package/dist/chunk-4nh3xzrm.js +0 -2
  293. package/dist/chunk-51sbmqdk.js +0 -2
  294. package/dist/chunk-5ev4qvsp.js +0 -2
  295. package/dist/chunk-5fgakrmr.js +0 -2
  296. package/dist/chunk-64whvkk0.js +0 -2
  297. package/dist/chunk-6pmc9283.js +0 -2
  298. package/dist/chunk-7drq0g9b.js +0 -2
  299. package/dist/chunk-7dzq2t68.js +0 -2
  300. package/dist/chunk-93x6b2qa.js +0 -3
  301. package/dist/chunk-96xwaa2t.js +0 -2
  302. package/dist/chunk-9a4kjze3.js +0 -7
  303. package/dist/chunk-9tdzg6e6.js +0 -2
  304. package/dist/chunk-aprxk7c2.js +0 -2
  305. package/dist/chunk-b4dsjhkq.js +0 -2
  306. package/dist/chunk-bhze2sjv.js +0 -2
  307. package/dist/chunk-d84cxw1v.js +0 -2
  308. package/dist/chunk-dp8pjv6r.js +0 -2
  309. package/dist/chunk-e11qjnb4.js +0 -2
  310. package/dist/chunk-e55zxnda.js +0 -2
  311. package/dist/chunk-f1zvbkak.js +0 -2
  312. package/dist/chunk-gj3j9zh5.js +0 -3
  313. package/dist/chunk-ha5jfz6r.js +0 -4
  314. package/dist/chunk-j2wtwb37.js +0 -3
  315. package/dist/chunk-j2wty8a3.js +0 -2
  316. package/dist/chunk-k3375qqd.js +0 -2
  317. package/dist/chunk-m28hdj8j.js +0 -2
  318. package/dist/chunk-m8djwdd5.js +0 -2
  319. package/dist/chunk-p1ydsj54.js +0 -2
  320. package/dist/chunk-p8qgqtkc.js +0 -2
  321. package/dist/chunk-q905xt4v.js +0 -2
  322. package/dist/chunk-w6hhyjcn.js +0 -2
  323. package/dist/chunk-xh8wth6z.js +0 -2
  324. package/dist/chunk-y3qgsj79.js +0 -2
  325. package/dist/chunk-ysc51tpb.js +0 -2
  326. package/dist/chunk-zt8qaqbz.js +0 -2
@@ -1,2 +0,0 @@
1
- import{isGroupedSelect as i,isSelectOption as o}from"@nyssance/codex-acp-v2/client";function R(e){return i(e.options)?e.options.flatMap((t)=>t.options):e.options}function x(e,t){return e.find((n)=>n.category===t&&o(n))}function ne(e){return R(e).find((t)=>t.value===e.currentValue)?.name??e.currentValue}
2
- export{R,x,ne};
@@ -1,2 +0,0 @@
1
- import{groupSessions as le,projectName as U,isQuickChatDirectory as mr,QUICK_CHATS_GROUP as L}from"@nyssance/codex-acp-v2/client";
2
- export{le,U,mr,L};
@@ -1,2 +0,0 @@
1
- import{sr}from"./chunk-ryz4c13z.js";import{createContext as s,useContext as l,useSyncExternalStore as m}from"react";import{jsx as r}from"react/jsx-runtime";var c=s(null),u=s(null);function re({host:e,client:n,children:i}){return r(sr,{host:e,children:r(c,{value:e,children:r(u,{value:n,children:i})})})}function t(){let e=l(c);if(e===null)throw Error("Timeline host is missing");return e}function ie(){let e=l(u);if(e===null)throw Error("Timeline client is missing");return e}function ke(e,n){return m((i)=>e.subscribe(i),()=>n(e.getState()),()=>n(e.getState()))}function o(e){let n=ie();return ke(n.store,e)}function Ve(e,n){if(e.reportError)e.reportError(n);else console.error(n)}
2
- export{re,t,ie,ke,o,Ve};
@@ -1,2 +0,0 @@
1
- import{cn as S}from"cn";import{useRef as y,useState as k}from"react";import{jsx as m,jsxs as u}from"react/jsx-runtime";function tn({name:p,value:P,levels:h,disabled:c,onChange:v}){if(h.length===0)throw Error("EffortSlider requires at least one level");let o=h,g=Math.max(0,o.findIndex((t)=>t.value===P)),[M,d]=k(null),l=y(null),[I,b]=k(null),x=y(0),s=M??I??g,w=(t)=>{let n=++x.current;b(t);let e=()=>{if(x.current===n)b(null)};try{Promise.resolve(v(o[t].value)).then(e,e)}catch(N){throw e(),N}},f=76,r=14,a=2,i=o.length,C=a+s/Math.max(1,i-1)*(f-r-a*2);return u("div",{className:S("flex items-center justify-between px-2 py-2.5",c&&"opacity-50"),children:[u("span",{className:"grid shrink-0 text-sm whitespace-nowrap",children:[o.map((t)=>u("span",{"aria-hidden":!0,className:"invisible col-start-1 row-start-1",children:[p," ",u("span",{style:{fontSize:12},children:["(",t.name,")"]})]},t.value)),u("span",{className:"col-start-1 row-start-1",children:[p," ",u("span",{"data-effort-value":"",style:{fontSize:12},children:["(",o[s].name,")"]})]})]}),u("button",{type:"button",disabled:c,role:"slider","aria-label":p,"aria-valuemin":0,"aria-valuemax":i-1,"aria-valuenow":s,"aria-valuetext":o[s].name,onKeyDown:(t)=>{let n;if(t.key==="ArrowRight"||t.key==="ArrowUp")n=Math.min(i-1,s+1);else if(t.key==="ArrowLeft"||t.key==="ArrowDown")n=Math.max(0,s-1);else if(t.key==="Home")n=0;else if(t.key==="End")n=i-1;else return;if(t.preventDefault(),t.stopPropagation(),!c&&n!==s)w(n)},className:"relative shrink-0 cursor-pointer touch-none overflow-hidden rounded-full border-none p-0 disabled:cursor-default",style:{width:f,height:18,background:"var(--input)"},onPointerDown:(t)=>{if(c||t.button!==0)return;t.preventDefault(),t.stopPropagation(),t.currentTarget.focus(),t.currentTarget.setPointerCapture(t.pointerId);let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerMove:(t)=>{if(l.current===null)return;let n=t.currentTarget.getBoundingClientRect(),e=Math.round(Math.max(0,Math.min(1,(t.clientX-n.left-a-r/2)/(n.width-r-a*2)))*(i-1));l.current=e,d(e)},onPointerUp:(t)=>{let n=l.current;if(l.current=null,d(null),t.currentTarget.hasPointerCapture(t.pointerId))t.currentTarget.releasePointerCapture(t.pointerId);if(!c&&n!==null&&n!==g)w(n)},onLostPointerCapture:()=>{l.current=null,d(null)},onPointerCancel:()=>{l.current=null,d(null)},onClick:(t)=>{t.preventDefault(),t.stopPropagation()},children:[m("span",{className:"absolute inset-y-0 left-0 w-full rounded-full",style:{background:"var(--input)"}}),o.map((t,n)=>{let e=a+r/2+n/Math.max(1,i-1)*(f-r-a*2)-2;return m("span",{className:"absolute top-1/2 size-1 -translate-y-1/2 rounded-full",style:{left:e,background:"color-mix(in srgb, var(--muted-foreground) 40%, transparent)"}},t.value)}),m("span",{className:"absolute rounded-full transition-all duration-150",style:{width:r,height:r,top:a,left:C,background:"var(--foreground)",boxShadow:"0 1px 2px #0003"}})]})]})}
2
- export{tn};
@@ -1,2 +0,0 @@
1
- import{t}from"./chunk-dp8pjv6r.js";import{qe}from"./chunk-nkypxxjk.js";import{e}from"./chunk-6kn920c5.js";import{bt}from"./chunk-31x6chk8.js";import{FileIcon as m,XIcon as r}from"lucide-react";import{jsx as a,jsxs as l}from"react/jsx-runtime";function ar({mentions:n,onRemove:s}){let{t:i}=t();if(n.length===0)return null;return a("div",{className:"mb-1.5 flex flex-wrap items-center gap-1.5",children:n.map((o)=>l(qe,{variant:"secondary",className:"gap-1 pe-0.5",title:o,children:[a(m,{className:"size-3"}),a("span",{className:"max-w-40 truncate",children:bt(o)}),a(e,{type:"button",variant:"ghost",size:"icon-xs",className:"size-4","aria-label":i("composer.removeMention",{name:bt(o)}),onClick:()=>s(o),children:a(r,{className:"size-3"})})]},o))})}
2
- export{ar};
@@ -1,2 +0,0 @@
1
- import{l}from"./chunk-1hy64ewz.js";import{Q}from"./chunk-ksv9pjc2.js";import{p}from"./chunk-5fgakrmr.js";import{Ke}from"./chunk-6ss1981q.js";import{A}from"./chunk-zz734bzf.js";import{Ye,Ze}from"./chunk-j2wty8a3.js";import{formatDistanceToNowStrict as H}from"date-fns";import{enUS as L,zhCN as z}from"date-fns/locale";import{ClockIcon as E,MessageSquareIcon as D}from"lucide-react";import{useEffect as S,useState as w}from"react";import{jsx as o,jsxs as C,Fragment as M}from"react/jsx-runtime";var h={en:L,"zh-CN":z};function Ce(t,a){let r=a==="zh-CN"?h["zh-CN"]:h.en;return H(new Date(t),{locale:r})}function je({sessionRow:t,actions:a,shortcut:r,renaming:n=!1,onRename:m}){let{t:i,i18n:y,PathAction:u}=p(),f=Ze(),I=Ye();S(()=>{f(n)},[n,f]);let[x,d]=w(t.title??"");S(()=>{if(n)d(t.title??"")},[n,t.title]);let N=(e)=>{let c=e.trim();m?.(c!==""&&c!==t.title?c:null)},v=t.archived?i("sessionList.archived"):t.updatedAt!==null?Ce(t.updatedAt,y.language):null,g=[];if(v!==null)g.push({icon:o(E,{className:"size-3.5"}),text:v});let s=u&&o(u,{cwd:t.cwd,onOpened:I});return o(Ke,{title:n?o(l,{autoFocus:!0,value:x,className:"h-7 text-sm","aria-label":i("sessionList.rename"),onChange:(e)=>d(e.target.value),onKeyDown:(e)=>{if(e.stopPropagation(),e.key==="Enter")N(e.target.value);if(e.key==="Escape")m?.(null)},onBlur:(e)=>N(e.target.value)}):C("span",{className:"flex items-center gap-2",children:[o("span",{className:"min-w-0",children:o(A,{className:"min-w-0 flex-1",children:t.title??i("sessionList.untitled")})}),r]}),titleIcon:o(D,{className:"size-3.5"}),details:g,actions:s||a!==void 0?C(M,{children:[s,s&&a!==void 0&&o(Q,{}),a]}):void 0})}
2
- export{Ce,je};
@@ -1,3 +0,0 @@
1
- import{An,Ne}from"./chunk-377s443r.js";import{t,ke}from"./chunk-dp8pjv6r.js";import{d,u,b,m,w}from"./chunk-17zegmxa.js";import{createStore as f}from"@alwith/api/client";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=f({request:null});function nt(e){c.setState({request:{path:e.path,patch:xn(e.patch,e.path)}})}function xn(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
2
- `,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function ot(){let{t:e,theme:a}=t(),n=ke(c,(o)=>o.request),s=n===null?null:An(n.patch);return i(d,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(u,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(b,{children:[i(m,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(w,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(Ne,{patch:n.patch,theme:a})})]})})}
3
- export{nt,xn,ot};
@@ -1,4 +0,0 @@
1
- import{po}from"./chunk-sr5rcdza.js";import{t}from"./chunk-dp8pjv6r.js";import{qn,Vn}from"./chunk-460phps1.js";import{_}from"./chunk-g7p46jq1.js";import{G}from"./chunk-m6rrt94g.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 $n=p(function({item:s,messageTime:c}){let l=t(),o=Vn(s._meta),m=o?o.map((e)=>e.question===void 0?e.text:`${e.question}
2
- ${e.text}`).join(`
3
- `):G(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=qn(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(_,{block:e},`${s.id}:${n}`))}),r(po,{host:l,message:s,text:m,textParts:u.some((e)=>("question"in e))?u:void 0,images:a,mentions:[],messageTime:c})]})});
4
- export{$n};
@@ -1,3 +0,0 @@
1
- import{yn}from"./chunk-cgqhz23q.js";import{bn}from"./chunk-443z7mve.js";import{wn}from"./chunk-krmz8t4p.js";import{Ne}from"./chunk-377s443r.js";import{n}from"./chunk-ysc51tpb.js";import{isContentEntry as d,isDiffEntry as f,isFormElicitation as x,isText as g,isToolCallSubject as h,isUrlElicitation as w}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as u}from"react/jsx-runtime";function de(t){return t.kind==="elicitation"&&x(t.params)}function y(t){let e=t._meta?.codex;if(typeof e!=="object"||e===null)return null;let o=e.description;return typeof o==="string"?o:null}function b(t){let e=t.rawInput;if(typeof e!=="object"||e===null)return null;let o=e.command;if(typeof o==="string")return o;if(Array.isArray(o))return o.map(String).join(" ");return null}function A(t){for(let e of t.content??[])if(f(e)&&e.patch&&e.patch.text.length>0)return e.patch.text;return null}function v(t){return(t.content??[]).filter(d).map((e)=>g(e.content)?e.content.text:"").filter((e)=>e.length>0).join(`
2
- `)}function R({subject:t,requestTitle:e}){let{host:o}=n();if(!h(t))return null;let r=t.toolCall,s=b(r),i=A(r),c=v(r),a=o.toolTitle?.(r)??r.title;return u("div",{className:"flex flex-col gap-2",children:[a&&a!==e&&s===null&&l("div",{className:"text-sm font-medium",children:a}),s!==null&&u("pre",{className:"bg-muted overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:[l("span",{className:"text-muted-foreground select-none",children:"$ "}),s]}),i!==null&&l("div",{className:"max-h-80 overflow-auto rounded-lg border","data-stream-style":"codexUI",children:l(Ne,{patch:i,theme:o.theme})}),i===null&&s===null&&c.length>0&&l("pre",{className:"bg-muted max-h-60 overflow-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:c}),(r.locations??[]).length>0&&l("ul",{className:"text-muted-foreground flex flex-col gap-0.5 text-xs",children:(r.locations??[]).map((p)=>l("li",{className:"truncate font-mono",children:p.path},`${p.path}:${p.line??""}`))})]})}function m(t,e){let{host:o,client:r}=n();return(s)=>{try{if(e)e(t.id,s);else r.respond(t.id,s)}catch(i){if(o.reportError)o.reportError(i);else console.error(i)}}}function T({action:t,total:e,onRespond:o}){let{host:r}=n(),s=m(t,o),i=t.params,c=r.permissionTitle?.(i)??i.title;return u(yn,{requestId:t.id,title:c,alwaysLabel:r.t("approval.always"),autoFocus:"if-idle",total:e,options:i.options.map((a)=>({...a,description:y(a)??void 0})),onRespond:(a)=>s({outcome:a===null?{outcome:"cancelled"}:{outcome:"selected",optionId:a}}),children:[i.description&&l("div",{className:"text-muted-foreground mt-0.5 text-xs",children:i.description}),i.subject&&l(R,{subject:i.subject,requestTitle:c})]})}function Pe({action:t,total:e,onRespond:o}){let{host:r}=n(),s=m(t,o);return l(bn,{requestId:t.id,schema:t.params.requestedSchema,message:t.params.message,total:e,t:r.t,onRespond:s})}function it({action:t,total:e,onRespond:o}){let{host:r}=n(),s=m(t,o);if(t.kind==="permission")return l(T,{action:t,total:e,onRespond:o});if(de(t))return l(Pe,{action:t,total:e??1,onRespond:o});let i=t.params;if(!w(i))throw Error("Unsupported elicitation mode");return l(wn,{message:i.message,url:i.url,t:r.t,onOpen:r.openLink,onRespond:(c)=>s(c==="cancel"?{action:"cancel"}:{action:"decline"})})}
3
- export{de,Pe,it};
@@ -1,2 +0,0 @@
1
- import{et,Y}from"./chunk-aprxk7c2.js";import{A}from"./chunk-zz734bzf.js";import{z}from"./chunk-hjnf5kvc.js";import{J}from"./chunk-m8djwdd5.js";import{Se,se,Ie}from"./chunk-7jdazbzv.js";import{PreviewCard as x}from"@base-ui/react/preview-card";import{cn as p}from"cn";import{LockIcon as I}from"lucide-react";import{createContext as S,useContext as k,useLayoutEffect as T,useState as R}from"react";import"@alwith/module-chat/session-list.css";import{jsx as e,jsxs as d,Fragment as E}from"react/jsx-runtime";function pn(o){if(o.as==="ul"){let{as:i,className:r,...a}=o;return e("ul",{className:p("flex w-full min-w-0 flex-col gap-0.5",r),...a})}let{as:t,className:n,...s}=o;return e("div",{className:p("flex w-full min-w-0 flex-col gap-0.5",n),...s})}function Te({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 Xe({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-[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 Pt({open:o,onOpenChange:t,tooltip:n,leading:s,label:i,count:r,countLabel:a,active:l=!1,actions:N,headerChildren:f,wrapHeader:u,onHeaderClick:w,children:C}){let b=()=>{w?.(),t(!o)},m=p(Se,"relative flex h-[30px] w-full items-center gap-1 rounded-[10px] ps-1 pe-1.5 text-start [corner-shape:superellipse(1.5)]"),h=d(E,{children:[s!=null&&e(Te,{children:s}),f??e(A,{className:"flex-1 text-sm opacity-70",children:i}),e("span",{className:"relative z-10 ms-auto",children:e(Ie,{content:r!==void 0?e(se,{className:p("text-muted-foreground justify-end text-xs opacity-70",a&&"w-auto"),children:e("span",{dir:"ltr",children:a??r})}):void 0,actions:N})})]}),P=f==null?d("div",{"data-active":l?"":void 0,title:n,className:p(m,Y),onClick:b,onKeyDown:(c)=>{if(c.target!==c.currentTarget)return;if(c.key!=="Enter"&&c.key!==" ")return;c.preventDefault(),b()},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:m,children:h});return d("div",{className:"text-[#1a1c1f] dark:text-white",children:[u===void 0?P:u(P),o&&e(pn,{className:"mt-0.5",children:C})]})}var H=S(()=>{}),O=S(()=>{});function Ye(){return k(O)}function Ze(){return k(H)}function Je({active:o=!1,state:t,interruption:n=null,leased:s=!1,media:i,title:r,hoverCard:a,onHoverCardOpenChange:l,subtitle:N,preview:f,listeningPorts:u,onOpenPort:w,accessory:C,meta:b,hint:m,actions:h,className:P,...c}){let y=d("div",{"data-slot":"navigation-session-item","data-active":o,className:p(Se,et,"group/navigation-row focus-visible:outline-ring flex h-[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]",(f||u!=null&&u.length>0)&&"h-auto min-h-[30px] py-2.5",P),...c,children:[e(Te,{children:t!=null?e(z,{state:t,title:n??void 0}):i}),d("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(A,{className:p("leading-none",t==="done"&&"font-semibold"),children:r}),N!=null&&e(A,{className:"text-muted-foreground text-xs",children:N}),f&&e("span",{className:"text-muted-foreground mt-1.5 line-clamp-2 text-xs leading-[18px] [overflow-wrap:anywhere] break-words",children:f}),u!=null&&u.length>0&&e("span",{className:"text-muted-foreground mt-1.5 flex flex-wrap items-center gap-2 font-mono text-xs",children:u.map((v)=>w?d("button",{type:"button",className:"underline",onPointerDown:(g)=>g.stopPropagation(),onKeyDown:(g)=>g.stopPropagation(),onClick:(g)=>{g.stopPropagation(),w(v)},children:[":",v]},v):d("span",{children:[":",v]},v))})]}),d("span",{className:"relative ms-auto flex shrink-0 items-center gap-1",children:[s&&e(I,{className:"text-muted-foreground size-3"}),e(Ie,{content:C!=null?e(se,{children:C}):b??e(se,{}),actions:h}),m!=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:m})]})]});if(a==null)return y;return e(L,{row:y,onOpenChange:l,children:a})}function L({row:o,children:t,onOpenChange:n}){let[s,i]=R(!1),[r,a]=R(!1),l=s||r;return T(()=>(n?.(l),()=>n?.(!1)),[l,n]),e(H.Provider,{value:a,children:e(O.Provider,{value:()=>{i(!1),a(!1)},children:e(_,{open:l,onOpenChange:i,trigger:o,children:t})})})}function _({open:o,onOpenChange:t,trigger:n,children:s,side:i="inline-end",sideOffset:r=2,align:a="start",alignOffset:l}){return J(o),d(x.Root,{open:o,onOpenChange:t,children:[e(x.Trigger,{render:n,delay:700,closeDelay:100}),e(x.Portal,{children:e(x.Positioner,{side:i,sideOffset:r,align:a,alignOffset:l,className:"isolate z-50",children:e(x.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:s})})})})]})}
2
- export{pn,Te,Xe,Pt,Ye,Ze,Je};
@@ -1,2 +0,0 @@
1
- import{terminalOf as u,textOf as g}from"@nyssance/codex-acp-v2/client";function To(n,o,r){if(n.kind!=="tool"){let t=g(n.content),c=/^\s*\*\*([^\n]*?)\*\*\s*$/.exec(t);return{type:"thinking",id:n.id,thinking:c?c[1]:t,isComplete:!r}}if(n.name==="subagent"){let t=s(n.rawInput,n.id);return{type:"subagent",id:n.id,name:p(t.agentPath,n.id),threadId:f(t.agentThreadId,"agentThreadId",n.id),activity:y(t.activity,n.id),model:l(t.model,"model",n.id),reasoningEffort:l(t.reasoningEffort,"reasoningEffort",n.id),status:n.status??"pending",blocks:[]}}if(n.name==="collab"){let t=s(s(s(n._meta,n.id).codex,n.id).collaboration,n.id);if(typeof t.tool!=="string"||!Array.isArray(t.agents))throw Error(`Collaboration call ${n.id} lacks codex-acp-v2 agent metadata`);return{type:"collab",id:n.id,tool:t.tool,status:n.status??"pending",prompt:l(s(n.rawInput,n.id).prompt,"prompt",n.id),agents:t.agents}}let i=typeof n.rawInput==="object"&&n.rawInput!==null&&!Array.isArray(n.rawInput)?{...n.rawInput}:{},e=u(n,o);if(Array.isArray(i.command))i.command=i.command.map(String).join(" ");if(n.toolKind==="execute"&&n.name!=="mcp"&&n.name!=="dynamic_tool"&&typeof i.command!=="string"){let t=e?.command??n.title;if(t!==null)i.command=t}let a=n.rawOutput;if(typeof a==="object"&&a!==null&&"output"in a&&typeof a.output==="string")a=a.output;if(e!==null&&e.output.length>0)a=e.output;let d=e?.exitStatus?.exitCode;return{type:"tool_use",id:n.id,name:n.name??"",title:n.title??n.name??"",kind:n.toolKind??"other",status:n.status??"pending",content:n.content,locations:n.locations,rawInput:i,rawOutput:a,...typeof d==="number"?{exitCode:d}:{}}}function s(n,o){if(typeof n!=="object"||n===null||Array.isArray(n))throw Error(`Tool call ${o} is missing an object codex-acp-v2 always sends`);return n}function l(n,o,r){if(n===null||typeof n==="string")return n;throw Error(`Tool call ${r} has a non-string ${o}`)}function p(n,o){let r=typeof n==="string"?n.split("/").findLast(Boolean):void 0;if(r===void 0)throw Error(`Subagent ${o} has no agent path`);return r}function f(n,o,r){if(typeof n==="string")return n;throw Error(`Tool call ${r} has no ${o}`)}function y(n,o){if(n==="started"||n==="interacted"||n==="interrupted"||n==="completed")return n;throw Error(`Subagent ${o} has an unknown activity ${String(n)}`)}
2
- export{To};
@@ -1,2 +0,0 @@
1
- import{i,E,vt}from"./chunk-20svvgj3.js";var qo=5000;function xe(t){return"pastedText"in t}function Ur(t){return`file://${encodeURI(t).replaceAll("#","%23").replaceAll("?","%3F")}`}function Fe(t,e,o){let n=(r,s)=>{for(let[a,x]of i){if(!x.attachments.some((p)=>p.id===e.id))continue;E(a,(p)=>p.map((d)=>d.id===e.id?{...e,url:s===void 0?"":Ur(s),pastedText:{text:e.pastedText.text,status:r}}:d))}};if(!i.get(t)?.attachments.some((r)=>r.id===e.id))return;n("pending"),vt(e.id,o("pasted-text.txt",e.pastedText.text).then((r)=>n("ready",r)).catch(()=>n("error")))}function ft(t,e,o,n){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<qo)return;t.preventDefault(),t.stopPropagation();let s={id:crypto.randomUUID(),type:"file",mediaType:"text/plain",filename:o,url:"",pastedText:{text:r,status:"pending"}};E(e,(a)=>[...a,s]),Fe(e,s,n)}
2
- export{qo,xe,Ur,Fe,ft};
@@ -1,2 +0,0 @@
1
- import{createContext as o,useContext as n,useEffect as r}from"react";var vn=o(null);function J(t){let e=n(vn);r(()=>{if(t&&e!==null)return e()},[t,e])}
2
- export{vn,J};
@@ -1,2 +0,0 @@
1
- import{Dn}from"./chunk-7dzq2t68.js";import{e}from"./chunk-6kn920c5.js";import{re,t,ie,o,Ve}from"./chunk-dp8pjv6r.js";import{ho,Ee,Vt,yo,bo}from"./chunk-m6rrt94g.js";import{Re}from"./chunk-c0ac9k7h.js";import{ro}from"./chunk-4b3s7gyc.js";import{no}from"./chunk-rnzphmk6.js";import{Gn,Wn}from"./chunk-a3krtv66.js";import{zn,Un}from"./chunk-6d7ppje3.js";import{Bn}from"./chunk-hxhptw6e.js";import{oo}from"./chunk-0yvbqccv.js";import{$n}from"./chunk-ha5jfz6r.js";import{codexExtensionCapabilities as ze,codexMessageError as Be,codexRetryNotice as qe,codexTurnError as Oe,nativeTurnId as ge}from"@nyssance/codex-acp-v2/client";import{ArrowDownIcon as Fe}from"lucide-react";import{useCallback as V,useEffect as A,useLayoutEffect as ve,useMemo as Q,useRef as b,useState as _}from"react";import{flushSync as Te}from"react-dom";import{jsx as l,jsxs as L}from"react/jsx-runtime";var ye=24;function Ke(n){let m=Math.max(0,n.turnTopPx-ye),v=Math.max(0,n.scrollHeightPx-n.viewportHeightPx),c=m-v;return{scrollTopPx:m,spacerPx:c>0?n.spacerPx+c:n.spacerPx}}function Ue({viewportRef:n,viewportProps:m,children:v}){return l("div",{ref:n,...m,className:"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain outline-none",children:v})}function _e({sessionId:n,turnId:m,root:v,error:c,connected:S}){let C=b(null),w=ie(),{t:N}=t(),R=V(()=>{w.loadHistoryTurn(n,m).catch(()=>{})},[w,n,m]);return A(()=>{if(!v||!C.current||!S||c)return;let B=new IntersectionObserver((T)=>{if(T.some((P)=>P.isIntersecting))B.disconnect(),R()},{root:v,rootMargin:"800px 0px"});return B.observe(C.current),()=>B.disconnect()},[v,S,c,R]),l("div",{ref:C,className:"flex min-h-80 flex-col justify-center gap-3 py-8","data-history-turn":m,"data-markdown-pending":!0,children:c?L("div",{className:"flex flex-col items-center gap-2",children:[l("p",{role:"alert",className:"text-destructive text-xs",children:c}),l(e,{variant:"outline",size:"sm",onClick:R,disabled:!S,children:N("timeline.navigationRetry")})]}):L("div",{role:"status","aria-label":N("timeline.navigationLoading"),className:"space-y-3",children:[l("div",{className:"bg-muted ml-auto h-5 w-1/3 rounded"}),l("div",{className:"bg-muted h-3 w-4/5 rounded"}),l("div",{className:"bg-muted h-3 w-3/5 rounded"})]})})}function $e(n,m){let v=b([]),c=b(null);if(c.current?.items!==n.items||c.current.state!==n.state||c.current.ended!==n.turnEndedAt||c.current.usage!==n.turnUsage||c.current.historyOrder!==m)c.current={state:n.state,items:n.items,ended:n.turnEndedAt,usage:n.turnUsage,historyOrder:m,turns:ho(n,v.current,m)};let S=c.current.turns;return v.current=S,S}function Ln(n){return l(re,{host:n.host,client:n.client,children:l(De,{...n})})}function De({session:n,leading:m,afterTurn:v,answerActions:c,turnFooter:S,renderUserMessage:C,insert:w,navigation:N,anchorNewTurn:R=!1,Viewport:B=Ue}){let T=ie(),P=t(),y=o((r)=>r.historyNavigation[n.id]),d=$e(n,y?.turns),M=d.at(-1)?.key,xe=yo(n,d),x=n.state!=="idle",D=Q(()=>no(d,y),[d,y]),Y=Q(()=>D.flatMap((r)=>r.turn===void 0?[]:[{...r.turn,key:r.turnKey}]),[D]),he=Q(()=>N===void 0?[]:Gn(d,n.turnUsage,y),[N,d,n.turnUsage,y]),Z=w&&w.afterItemId!==null?d.findIndex((r)=>r.items.some((u)=>u.id===w.afterItemId)):-1,j=b(d);j.current=d;let[a,be]=_(null),h=o((r)=>r.historyPages[n.id]),I=o((r)=>r.connection==="ready"),we=o((r)=>ze(r.agent).sessionRetry),ee=h!==void 0;A(()=>{if(I&&ee&&!n.restoring)T.loadHistoryNavigation(n.id).catch(()=>{})},[T,I,ee,n.id,n.restoring]);let[Se,Pe]=_(!1),F=b(null),[Ie,te]=_(!1),ne=b(0),W=b({key:M,running:x});W.current={key:M,running:x};let[oe,K]=_(0),k=b(0),E=b(null);k.current=oe;let He=V(()=>{if(E.current!==null)E.current.keepTop=!1},[]),{isFollowing:z,scrollToBottom:X,stopFollowing:q,schedulePin:le,contentResized:ae,beginLocate:ue,cancelLocation:se}=oo(a,x,He),ce=V(()=>{if(a===null||!x)return;let r=d.at(-1)?.key;if(r===void 0)return;let u=ue(!0),s=()=>u.isCurrent()&&W.current.running&&W.current.key===r,i=()=>requestAnimationFrame(()=>requestAnimationFrame(()=>{if(!s())return;let g=a.querySelector(`[data-codex-turn="${CSS.escape(r)}"]`);if(g===null)return;let f=a.scrollTop+g.getBoundingClientRect().top-a.getBoundingClientRect().top,H=Ke({turnTopPx:f,scrollHeightPx:a.scrollHeight,viewportHeightPx:a.clientHeight,spacerPx:k.current});E.current=H.spacerPx>0?{element:g,heightPx:g.getBoundingClientRect().height+H.spacerPx,keepTop:!0}:null,Te(()=>K(H.spacerPx)),requestAnimationFrame(()=>{if(s())u.finish(H.scrollTopPx)})})),p=F.current;if(p===null)return;p.scrollToKey(r,void 0,{align:"top"}).then(()=>{if(s())i()})},[ue,x,a,d]);ve(()=>{if(!R||x)return;se(),E.current=null,k.current=0,K(0)},[R,se,x]);let G=V(()=>{q(),T.loadOlderHistory(n.id).catch(()=>{})},[T,n.id,q]);A(()=>{if(a===null)return;let r=()=>{let u=a.scrollTop<600;if(Pe(u),u&&!y?.complete&&I&&!n.restoring&&!z&&h?.cursor&&!h.loading&&!h.error)G()};return r(),a.addEventListener("scroll",r,{passive:!0}),()=>a.removeEventListener("scroll",r)},[I,h,z,G,a,n.restoring,y?.complete]),A(()=>{zn({sessionId:n.id,turns:Y,api:F.current,beforeReveal:q,terminals:n.terminals})},[n.id,n.terminals,Y,q]),A(()=>()=>Un(n.id),[n.id]);let Ne=V(async(r,u)=>{let s=++ne.current;te(!0);try{if(r.isLoaded===!1&&r.nativeTurnId!==void 0)await T.loadHistoryTurn(n.id,r.nativeTurnId),await new Promise((f)=>requestAnimationFrame(()=>f()));if(!u())return null;let i=j.current.find((f)=>f.user?.id===(r.messageId??r.id))??j.current.find((f)=>f.user!==null&&r.nativeTurnId!==void 0&&f.items.some((H)=>ge(H)===r.nativeTurnId));if(!i?.user)return null;let p=i.user.id,g=F.current;if(g===null)throw Error("Virtual timeline is not mounted");return await g.scrollToKey(i.key,(f)=>f.querySelector(`[data-content-search-unit-key="${CSS.escape(p)}"]`),{align:"top"}),document.querySelector(`[data-chat-scroll] [data-content-search-unit-key="${CSS.escape(p)}"]`)}finally{if(ne.current===s)te(!1)}},[T,n.id]),ke=V(async(r)=>{if(r.nativeTurnId!==void 0)await T.previewHistoryTurn(n.id,r.nativeTurnId)},[T,n.id]);A(()=>{if(a===null)return;let r=a.querySelector("[data-codex-timeline]");if(r===null)throw Error("Timeline content element is missing");let u=new ResizeObserver(()=>{let s=E.current,i=null;if(s!==null){let p=Math.max(0,s.heightPx-s.element.getBoundingClientRect().height);if(p!==k.current&&(p<k.current||s.keepTop)){if(k.current=p,Te(()=>K(p)),p===0)E.current=null}if(p>0&&s.keepTop)i=a.scrollTop+s.element.getBoundingClientRect().top-a.getBoundingClientRect().top-ye}ae(i)});if(u.observe(r),u.observe(a),M!==void 0){let s=a.querySelector(`[data-codex-turn="${CSS.escape(M)}"]`);if(s===null)throw Error("Latest turn is not mounted");u.observe(s)}return()=>u.disconnect()},[ae,M,a]),A(()=>{if(n.items.length===0)return;le()},[le,n.items]);let de=b(null);ve(()=>{if(a===null)return;let r=d.at(-1),u=de.current;if(de.current=r===void 0?null:{key:r.key,running:x},r===void 0||u===null||r.user===null||r.replayed)return;if(R){if(x&&n.turnEndedAt[r.user.id]===void 0&&(r.key!==u.key||!u.running))E.current=null,k.current=0,K(0),ce()}else if(r.key!==u.key)X()},[ce,R,x,X,a,n.turnEndedAt,d]);let Ae=(r,u)=>{let s=r,i=s.turn;if(i===void 0){if(s.nativeTurnId===void 0)throw Error(`Turn is missing at index ${u}`);return l(_e,{sessionId:n.id,turnId:s.nativeTurnId,root:a,error:y?.turnErrors[s.nativeTurnId],connected:I&&!z&&!Ie})}let p=d.indexOf(i),g=i.key===xe,f=bo(n,d,p),H=!g&&f.continued,U=i.key===M,O=i.errors.at(-1),me=O===void 0?null:Be(O),J=O===void 0?null:ge(O),Le=U&&!g&&I&&we&&n.attached&&!n.readOnly&&!n.restoring&&O===n.items.at(-1)&&me!==null&&Oe(me).category==="overloaded"&&J!==null&&n.lastStopReason!=="end_turn"&&n.lastStopReason!=="cancelled",fe=S?.(i)??null,Ce=i.work.length>0||i.final.length>0||i.errors.length>0||g||fe!==null||Ee(i)||Vt(i)||U&&(n.error!==null||n.lastStopReason==="cancelled"),pe=i.user===null?null:Re(i);return L("div",{"data-virtualized-turn-content":!0,"data-codex-turn":i.key,className:"flex flex-col gap-1.5",children:[i.user!==null&&(C===void 0?l($n,{item:i.user,messageTime:pe}):C(i.user,pe)),Ce&&l(ro,{sessionId:n.id,turn:i,terminals:n.terminals,active:g,blocked:n.state==="requires_action",continued:H,edits:f.edits,activityItems:f.items,workStartedAt:f.startedAt,isLast:U,error:n.error,retrying:g?qe(n._meta)??void 0:void 0,retry:Le?{turnId:J,delaySeconds:Bn(d),run:(Me)=>T.retrySession(n.id,J,Me)}:void 0,interrupted:Vt(i)||!g&&U&&n.lastStopReason==="cancelled",answerActions:c?.(i),footer:fe}),u===Z&&w?.node,v?.(i)]})};return L("div",{className:"relative flex min-h-0 flex-1 flex-col","data-stream-style":"codexUI",children:[l(B,{viewportRef:be,viewportProps:{"data-chat-scroll":"",style:{overflowAnchor:"none"},tabIndex:0,role:"log","aria-label":P.t("timeline.label")},children:l("div",{className:"codex-timeline-content flex min-h-full w-full flex-col",children:L("div",{"data-timeline-user-message-navigation-content":!0,className:"mx-auto flex w-full max-w-3xl shrink-0 flex-col",children:[w&&Z===-1&&w.node,l(Dn,{ref:F,entries:D,renderTurn:Ae,scrollElement:a,sessionKey:n.id,preserveViewport:!z,leadingInsetPx:12,leadingContent:m===void 0?void 0:l("div",{className:"pt-3",children:m})}),R&&l("div",{"aria-hidden":"true","data-turn-anchor-spacer":!0,className:"shrink-0",style:{height:oe}}),l("div",{"aria-hidden":"true",className:"h-6 shrink-0"})]})})}),l("div",{"aria-hidden":"true",className:"codex-timeline-bottom-fade"}),y?.error&&l("div",{className:"absolute inset-x-0 top-2 z-10 flex justify-center",children:l(e,{variant:"outline",size:"sm",disabled:!I,title:y.error,onClick:()=>{T.loadHistoryNavigation(n.id).catch(()=>{})},children:P.t("timeline.navigationRetry")})}),Se&&h?.cursor&&!y?.complete&&L("div",{className:"absolute inset-x-0 top-2 z-10 flex flex-col items-center gap-1","data-history-loader":!0,children:[l(e,{variant:"outline",size:"sm",disabled:!I||n.restoring||h.loading,onClick:G,children:h.loading?P.t("timeline.loadingEarlier"):P.t("timeline.loadEarlier")}),h.error&&l("p",{role:"alert",className:"bg-background text-destructive max-w-md rounded px-2 py-1 text-xs",children:h.error})]}),N!==void 0&&l(Wn,{items:he,audio:N.audio,scrollRoot:a,beforeReveal:q,ensureItemMounted:Ne,onPreviewItem:ke,onRevealError:(r)=>Ve(P,r),targetTopMarginPx:16},n.id),l("button",{type:"button",className:z?"codex-scroll-to-bottom codex-scroll-to-bottom-hidden":"codex-scroll-to-bottom",tabIndex:z?-1:void 0,onClick:X,"aria-label":P.t("timeline.scrollToBottom"),children:x?L("span",{className:"codex-scroll-to-bottom-dots","aria-hidden":"true",children:[l("span",{className:"codex-wave-dot"}),l("span",{className:"codex-wave-dot"}),l("span",{className:"codex-wave-dot"})]}):l(Fe,{})})]})}
2
- export{Ln};
@@ -1,2 +0,0 @@
1
- var hr={allow_once:0,allow_always:1,reject_once:2,reject_always:3};function kn(e){return[...e].toSorted((o,n)=>(hr[o.kind]??99)-(hr[n.kind]??99))}function Yr(e){return e==="allow_once"||e==="allow_always"}function Zr(e){return e==="allow_always"||e==="reject_always"}
2
- export{hr,kn,Yr,Zr};
@@ -1,2 +0,0 @@
1
- import{g,Kt,wo,Qt,ko,Xt,Co}from"./chunk-5kpcpjrb.js";import{t,ie,ke,o}from"./chunk-dp8pjv6r.js";import{ee}from"./chunk-jhk2chpp.js";import{createStore as E}from"@alwith/api/client";import{isText as k,nativeTurnId as v}from"@nyssance/codex-acp-v2/client";import{jsx as m}from"react/jsx-runtime";var x=E({entries:{}});function p(i,e){x.setState((n)=>({entries:{...n.entries,[i]:e}}))}function q(i,e){let n=v(e),a=i.items.findLast((s)=>v(s)!==null);return!e.replayed&&n!==null&&a!==void 0&&v(a)===n}function M(i,e){for(let n of i.items){if(n.kind!=="user"||n.echo==="pending")continue;for(let a of[...Xt(n._meta),...n.content.filter(k).flatMap((s)=>Xt(s._meta))])if(a.questionItemId===e)return a.answer}return}function O({sessionId:i,item:e,question:n,index:a}){let s=ie(),{t:l}=t(),S=Kt(e.id,a),d=JSON.stringify([i,S]),u=ke(x,(r)=>r.entries[d]),c=o((r)=>r.sessions[i]),A=o((r)=>r.connection==="ready"),f=u?.draft??wo(n),b=c===void 0?u?.accepted:M(c,S)??u?.accepted,h=c!==void 0&&q(c,e),D=A&&c?.attached&&!c.restoring&&!c.readOnly,y=b!==void 0?"answered":u?.skipped?"skipped":u?.pending?"submitting":!h?"closed":!D?"unavailable":"pending",C=async()=>{if(x.getState().entries[d]?.pending||y!=="pending")return;let r=s.state.sessions[i];if(r===void 0||!q(r,e)||!r.attached||r.readOnly||r.restoring)return;let I=Qt(n,f);if(!I.trim())return;let w={questionItemId:S,question:n.title,answer:I};p(d,{draft:f,pending:!0});try{await s.prompt(i,[{type:"text",text:ko(w),_meta:{codex:{questionReply:w}}}]),p(d,{draft:f,accepted:I})}catch(Q){p(d,{draft:f,error:Q instanceof Error?Q.message:String(Q)})}};if(y==="closed")return null;return m(Co,{question:n,draft:f,status:y,answer:b,error:y==="pending"?u?.error:void 0,t:l,onChange:(r)=>p(d,{draft:r}),onSkip:()=>p(d,{draft:f,skipped:!0}),onSubmit:()=>{C()}})}function jt({sessionId:i,item:e}){let n=o((s)=>s.sessions[i]),a=g(e._meta);if(n===void 0||n.readOnly||!q(n,e))return m(ee,{content:e.content.some((s)=>!k(s)||s.text.trim().length>0)?e.content:a.map((s)=>({type:"text",text:s.title})),messageId:e.id,streaming:!1});return m("div",{className:"flex min-w-0 flex-col gap-3","data-async-questions":e.id,children:a.map((s,l)=>m(O,{sessionId:i,item:e,question:s,index:l},Kt(e.id,l)))})}
2
- export{jt};
@@ -1,2 +0,0 @@
1
- import{zo}from"./chunk-zt8qaqbz.js";import{o}from"./chunk-dp8pjv6r.js";import{n,C}from"./chunk-ysc51tpb.js";import{R,x,ne}from"./chunk-bhze2sjv.js";import{isBooleanOption as E,isGroupedSelect as U,isSelectOption as q}from"@nyssance/codex-acp-v2/client";import{Zap as A}from"lucide-react";import{jsx as y}from"react/jsx-runtime";function gt({sessionId:p,options:f,disabled:w,onModelChange:g,onConfigChange:M,defaultGroup:I={id:"models",name:"Models"},catalog:B=(s)=>s,headerAction:G}){let{host:s,client:L}=n(),{t:r}=s,h=o((e)=>Boolean(e.configPending[p])),N=o((e)=>{let a=e.sessions[p];return a?.state==="running"||a?.state==="requires_action"}),t=x(f,"model"),l=x(f,"thought_level"),b=f.filter((e)=>e.configId!=="collaboration_mode"&&(e.category==="model_config"||e.category!=="mode"&&e!==t&&e!==l)),O=b.filter(q),d=b.filter(E);if(!t&&!l&&O.length===0&&d.length===0)return null;let c=(e,a)=>{if(a===e.currentValue)return;C(s,M?M(e.configId,a):L.setConfig(p,e.configId,a))},m=l?R(l):[],k=m.reduce((e,a)=>a.name.length>=e.length?a.name:e,""),z=t?ne(t):r("composer.model"),_=(e)=>({api_id:e.value,label:e.name}),v=B(t&&U(t.options)?t.options.map((e)=>({id:e.groupId,name:e.name,models:e.options.map(_)})):[{...I,models:t?R(t).map(_):[]}]),S=v.flatMap((e)=>e.models),u=S.find((e)=>e.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:z},i=d.find((e)=>e.configId==="fast-mode");return y(zo,{disabled:w||h||N,switching:h,value:{...u,label:u.shortLabel??u.label},compactCatalog:!0,models:S,showModelList:Boolean(t),onChange:(e)=>{if(e.api_id===t?.currentValue)return;if(g)g(e.api_id);else if(t)c(t,e.api_id)},header:{name:t?.name??r("composer.model"),action:G},modelGroups:v,t:r,effortConfig:l&&m.length>0?{name:"Effort",value:l.currentValue,levels:m,sizer:k,onChange:(e)=>c(l,e)}:void 0,selectOptions:O.map((e)=>({id:e.configId,name:e.name,value:e.currentValue,options:R(e).map((a)=>({value:a.value,label:a.name})),onChange:(a)=>c(e,a)})),booleanOptions:[{id:"fast_mode",name:r("composer.fastMode"),currentValue:i?.currentValue??!1,disabled:!i,title:!i?r("composer.fastModeUnsupported"):void 0,icon:y(A,{className:"size-4","aria-hidden":"true"})},...d.filter((e)=>e!==i).map((e)=>({id:e.configId,name:e.name,currentValue:e.currentValue}))],onBooleanChange:(e,a)=>{let V=e==="fast_mode"?i:d.find((P)=>P.configId===e);if(!V)throw Error(`Unknown boolean config: ${e}`);c(V,a)}})}
2
- export{gt};
@@ -1,2 +0,0 @@
1
- import{p,s,tt,r,T}from"./chunk-5fgakrmr.js";import{B}from"./chunk-6ss1981q.js";import{Je}from"./chunk-j2wty8a3.js";import{Qe}from"./chunk-qnk5jk1b.js";import{Ce,je}from"./chunk-f1zvbkak.js";import{hasRename as L}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as F,ArchiveRestoreIcon as D,GitForkIcon as x,PencilIcon as A,Trash2Icon as H}from"lucide-react";import{useRef as N,useState as g}from"react";import{jsx as n,jsxs as C,Fragment as y}from"react/jsx-runtime";function It({sessionRow:e,active:f,onSelect:u,onForked:v=u,onHoverCardOpenChange:a,actions:c}){let i=p(),{t:m,i18n:S}=i,k=s(),l=r((o)=>o.runStates[e.sessionId]),h=tt(),d=()=>u(e);return n(Je,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:f,onClick:d,onKeyDown:(o)=>{if(o.key==="Enter"||o.key===" ")o.preventDefault(),d()},state:l?.state,interruption:l?.interruption??null,title:e.title??m("sessionList.untitled"),onHoverCardOpenChange:a,hoverCard:n(R,{sessionRow:e,onDelete:()=>h(e),onForked:v,actions:c}),meta:e.updatedAt!==null?n("span",{className:"text-muted-foreground shrink-0 text-xs",children:Ce(e.updatedAt,S.language)}):void 0,actions:l!=null?n(Qe,{title:m("sessionList.stop"),onStop:()=>T(i,k.stopSession(e.sessionId))}):void 0})}function R({sessionRow:e,onDelete:f,onForked:u,actions:v}){let a=p(),{t:c}=a,i=s(),m=r((t)=>L(t.agent)),S=r((t)=>t.connection==="ready"&&t.agent?.capabilities?.session?.fork!=null),[k,l]=g(!1),[h,d]=g(!1),o=N(!1);return n(je,{sessionRow:e,renaming:k,onRename:(t)=>{if(l(!1),t!==null)T(a,i.renameSession(e.sessionId,t))},actions:C(y,{children:[m&&n(B,{icon:n(A,{}),label:c("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?n(B,{icon:n(D,{}),label:c("sessionList.unarchive"),onClick:()=>void T(a,i.unarchive(e.sessionId))}):C(y,{children:[n(B,{icon:n(x,{}),label:c("sessionList.fork"),disabled:!S||h,onClick:()=>{if(o.current)return;o.current=!0,d(!0),T(a,i.fork(e.sessionId,e.cwd).then((t)=>{let I=i.state.sessionList.find((b)=>b.sessionId===t);if(!I)throw Error("Forked chat is missing from the session list");u(I)}).finally(()=>{o.current=!1,d(!1)}))}}),n(B,{icon:n(F,{}),label:c("sessionList.archive"),onClick:()=>void T(a,i.archive(e.sessionId))})]}),n(B,{variant:"destructive",icon:n(H,{}),label:c("sessionList.delete"),onClick:f})]})})}
2
- export{It};
@@ -1,2 +0,0 @@
1
- import{o}from"./chunk-dp8pjv6r.js";import{de,Pe,it}from"./chunk-j2wtwb37.js";import{jsx as t,jsxs as d,Fragment as r}from"react/jsx-runtime";var a=[];function rt({sessionId:s}){let e=o((n)=>n.actions),c=e.some((n)=>n.sessionId===s)?e.filter((n)=>n.sessionId===s):a,i=c.filter(de),l=c.filter((n)=>!de(n));return d(r,{children:[l.length>0&&t("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:l.map((n)=>t(it,{action:n},n.id))}),i[0]!==void 0&&t(Pe,{action:i[0],total:i.length},i[0].id)]})}
2
- export{rt};
@@ -1,2 +0,0 @@
1
- import{re}from"./chunk-dp8pjv6r.js";import{createContext as v,useContext as a,useMemo as l}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function ht({host:o,client:e,children:t}){let s=l(()=>({host:o,client:e}),[o,e]);return r(re,{host:o,client:e,children:r(i,{value:s,children:t})})}function n(){let o=a(i);if(o===null)throw Error("Conversation host is missing");return o}function C(o,e){e.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
2
- export{ht,n,C};
@@ -1,2 +0,0 @@
1
- import{e}from"./chunk-6kn920c5.js";import{H,O,P,F,te,N,_e,He,Oe,nn,M}from"./chunk-qah4fs3d.js";import{$e}from"./chunk-ak0k5vg6.js";import{ye,be,we}from"./chunk-wb3zpzk3.js";import{tn}from"./chunk-e11qjnb4.js";import{h}from"./chunk-rnykpmn2.js";import{cn as m}from"cn";import{ArrowUpRight as se,ChevronUp as G,Loader2Icon as U,Zap as W}from"lucide-react";import{Fragment as ie,useState as Z}from"react";import{jsx as n,jsxs as s,Fragment as p}from"react/jsx-runtime";function zo({value:c,onChange:q,models:v,modelGroups:C,compactCatalog:l,effortPresentation:R="slider",unavailableEffort:D,providerMenu:w,header:g,className:I,condensed:T,stripLabelPrefix:V,showDescription:J,showModelList:K=!0,loading:Q,switching:A,isLoading:X,effortConfig:i,booleanOptions:f,onBooleanChange:z,selectOptions:Y=[],t:u,...r}){let[E,ee]=Z(!1),[ne,ae]=Z(!1),d=f?.find((a)=>a.id==="fast_mode"),_=l?f?.filter((a)=>a!==d):f,L=(a)=>V&&a.startsWith(V)?a.slice(V.length):a;if(Q)return n("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:s(e,{variant:"ghost",disabled:!0,className:m("h-7 min-w-0 shrink gap-1.5 rounded-md px-2 text-xs font-normal",I),children:[n(U,{className:"size-3 animate-spin"}),n("span",{className:"text-muted-foreground truncate",children:u("model.loadingModels")})]})});return s("div",{className:"inline-flex min-w-0 items-center gap-1.5",children:[w&&s(H,{open:E,onOpenChange:ee,children:[s(ye,{children:[n(be,{render:n(O,{render:s(e,{"data-testid":"provider-trigger",variant:"ghost",disabled:r.disabled,className:m("h-7 shrink-0 gap-1 rounded-md px-1.5","hover:bg-accent"),children:[w.icon,n(G,{className:"size-2.5 shrink-0 opacity-60"})]})})}),n(we,{children:u("model.switchProvider")})]}),s(P,{side:"top",align:"end",sideOffset:4,className:"z-100 min-w-[10rem]",children:[w.groups.map((a,t)=>s(ie,{children:[t>0&&a.length>0&&n(M,{}),n(h,{value:w.value,onValueChange:w.onChange,options:a})]},t)),w.moreAction&&s(p,{children:[n(M,{}),s(N,{onClick:w.moreAction,className:"whitespace-nowrap",children:[n("span",{className:"min-w-0 flex-1 truncate",children:u("model.moreModels")}),n(se,{className:"size-4"})]})]})]})]}),s(H,{open:ne,onOpenChange:ae,children:[s(ye,{children:[n(be,{render:n(O,{render:s(e,{"data-testid":"model-trigger","aria-busy":A,variant:"ghost",className:m("h-7 gap-1.5 rounded-md px-2 text-xs font-normal","hover:bg-accent","max-w-full min-w-0 shrink",T&&"h-7 gap-1 px-1.5 text-[11px]",I),...r,children:[c.icon,f?.some((a)=>a.id==="fast_mode"&&a.currentValue&&!a.disabled)&&n(W,{"aria-hidden":"true",className:"size-3 shrink-0 fill-current"}),n("span",{className:m("min-w-0 flex-1 truncate text-start",T&&"text-[11px]"),children:L(c.label)||u("model.selectModel")}),i&&s("span",{className:"text-muted-foreground grid shrink-0 justify-items-center",children:[n("span",{className:"invisible col-start-1 row-start-1",children:i.sizer??i.levels.reduce((a,t)=>t.name.length>a.length?t.name:a,"")}),n("span",{className:"col-start-1 row-start-1",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),A?n(U,{"data-testid":"model-switch-loading",className:"size-3 shrink-0 animate-spin"}):n(G,{className:m("size-3 shrink-0",T&&"size-2.5")})]})})}),n(we,{children:u("model.switchModel")})]}),s(P,{side:"top",align:"end",sideOffset:4,className:m("z-100 w-auto max-w-[min(24rem,calc(100vw-1rem))] min-w-[14rem]",l&&"flex h-[350px] w-80 min-w-0 flex-col overflow-hidden rounded-xl p-1.5"),children:[l&&s(p,{children:[s(F,{"data-model-menu-header":!0,className:"flex shrink-0 items-center justify-between gap-2 px-1 py-1",children:[i?R==="slider"?n("div",{role:"menuitem","aria-label":i.name,className:"min-w-0 [&>div]:justify-start [&>div]:gap-3 [&>div]:px-2 [&>div]:py-1.5",children:n(tn,{...i,disabled:r.disabled})}):s(_e,{children:[s(He,{disabled:r.disabled,className:"h-8 min-w-0 flex-1 gap-2 rounded-md",children:[n("span",{children:i.name}),n("span",{className:"text-muted-foreground min-w-0 truncate text-xs",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(Oe,{children:n(h,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):D?s(N,{disabled:!0,className:"h-8 min-w-0 flex-1 gap-2",children:[n("span",{children:D.name}),n("span",{className:"text-muted-foreground truncate text-xs",children:D.label})]}):n(te,{className:"min-w-0 flex-1 truncate",children:g?.name}),d&&n(nn,{"aria-label":d.name,title:d.title??d.name,disabled:r.disabled||d.disabled,checked:d.currentValue,closeOnClick:!1,onCheckedChange:(a)=>z?.(d.id,a),className:m("hover:bg-accent focus:hover:bg-accent focus-visible:bg-accent ml-auto size-8 shrink-0 justify-center rounded-md p-0 focus:bg-transparent [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",d.currentValue&&!d.disabled?"text-foreground [&_svg]:fill-current":"text-muted-foreground"),children:d.icon??n(W,{className:"size-4","aria-hidden":"true"})})]}),n(M,{className:"shrink-0"})]}),g&&!l&&s(p,{children:[s("div",{className:"flex items-center gap-2 px-2 py-2",children:[g.icon,n("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:g.name}),g.action]}),n(M,{})]}),s(F,{"data-model-menu-list":l?"":void 0,className:l?"min-h-0 min-w-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain":void 0,children:[K&&(X?n(N,{disabled:!0,className:"text-muted-foreground",children:u("model.loadingModels")}):v.length===0?n(N,{disabled:!0,className:"text-muted-foreground",children:u("model.noModelsAvailable")}):(()=>{let a=v.filter((o)=>!o.more),t=v.filter((o)=>o.more),j=a.length>0&&t.length>0,y=(o,b)=>({disabled:r.disabled,icon:o.icon,value:o.api_id,label:L(o.label),description:b?.noDescription?void 0:J?o.description:void 0}),k=(o)=>{let b=v.find((S)=>S.api_id===o);if(b)q(b)};if(l)return n(h,{value:c.api_id,onValueChange:k,itemClassName:"min-w-0 max-w-full font-normal whitespace-nowrap",options:v.map((o)=>y(o))});return s(p,{children:[C?C.map((o)=>{let b=o.models.filter((x)=>!x.more),S=o.models.filter((x)=>x.more),B=b.length>0&&S.length>0;return s(F,{children:[n(te,{className:"text-muted-foreground text-xs font-normal",children:o.name}),n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:(B?b:o.models).map((x)=>y(x))}),B&&s(_e,{children:[n(He,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(Oe,{children:n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:S.map((x)=>y(x,{noDescription:!0}))})})]})]},o.id)}):n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:(j?a:v).map((o)=>y(o))}),!C&&j&&s(_e,{children:[n(He,{className:"font-medium whitespace-nowrap",children:u("model.moreModels")}),n(Oe,{children:n(h,{value:c.api_id,onValueChange:k,itemClassName:"font-medium whitespace-nowrap",options:t.map((o)=>y(o,{noDescription:!0}))})})]})]})})()),!l&&i&&s(p,{children:[n(M,{}),R==="menu"?s(_e,{children:[s(He,{disabled:r.disabled,children:[n("span",{className:"flex-1",children:i.name}),n("span",{className:"text-muted-foreground",children:i.levels.find((a)=>a.value===i.value)?.name??i.value})]}),n(Oe,{children:n(h,{value:i.value,onValueChange:i.onChange,options:i.levels.map((a)=>({value:a.value,label:a.name}))})})]}):n(tn,{...i,disabled:r.disabled})]}),!l&&!i&&D&&s(p,{children:[n(M,{}),s(N,{disabled:!0,children:[n("span",{className:"flex-1",children:D.name}),n("span",{children:D.label})]})]}),Y.map((a)=>s(F,{children:[n(M,{}),n(te,{children:a.name}),n(h,{value:a.value,onValueChange:a.onChange,options:a.options,itemClassName:"whitespace-nowrap"})]},a.id)),_&&_.length>0&&s(p,{children:[!i&&n(M,{}),_.map((a)=>l?s(nn,{"aria-label":a.name,title:a.title,disabled:r.disabled||a.disabled,checked:a.currentValue,closeOnClick:!1,onCheckedChange:(t)=>z?.(a.id,t),className:"justify-between gap-3 py-2.5 pr-2 [&_[data-slot=dropdown-menu-checkbox-item-indicator]]:hidden",children:[s("span",{className:"flex items-center gap-2",children:[a.icon,a.name]}),n("span",{"aria-hidden":"true",className:m("flex h-[18px] w-8 shrink-0 items-center rounded-full p-0.5",a.currentValue?"bg-primary":"bg-input"),children:n("span",{className:m("bg-background size-3.5 rounded-full shadow-xs transition-transform",a.currentValue&&"translate-x-3.5")})})]},a.id):s("div",{title:a.title,className:m("flex items-center justify-between gap-3 px-2 py-2.5",a.disabled&&"opacity-50"),children:[s("span",{className:"flex items-center gap-2 text-sm font-medium",children:[a.icon,a.name]}),n($e,{"aria-label":a.name,disabled:r.disabled||a.disabled,checked:a.currentValue,onCheckedChange:(t)=>z?.(a.id,t)})]},a.id))]})]}),l&&g?.action&&s(p,{children:[n(M,{className:"shrink-0"}),n(F,{"data-model-menu-footer":!0,className:"shrink-0",children:g.action})]})]})]})]})}
2
- export{zo};