@alwith/module-chat 0.5.6 → 0.5.7

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 (338) hide show
  1. package/README.md +5 -1
  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-scddkjv8.js → chunk-01ekhzvd.js} +1 -1
  10. package/dist/{chunk-gsq8mzr7.js → chunk-0geh5prw.js} +2 -2
  11. package/dist/{chunk-v5wwv2t9.js → chunk-0nda3snj.js} +3 -3
  12. package/dist/chunk-11kwcp8b.js +2 -0
  13. package/dist/chunk-19em37f4.js +2 -0
  14. package/dist/chunk-1yz914xx.js +2 -0
  15. package/dist/{chunk-py1t2v6e.js → chunk-2407f23n.js} +2 -2
  16. package/dist/{chunk-2s4y2v50.js → chunk-294gms5s.js} +2 -2
  17. package/dist/{chunk-6j4g51ff.js → chunk-2mj3yh2z.js} +3 -3
  18. package/dist/{chunk-wf4tq3fn.js → chunk-2pha46d9.js} +1 -1
  19. package/dist/chunk-2rjt5w9p.js +2 -0
  20. package/dist/chunk-31x6chk8.js +2 -0
  21. package/dist/chunk-356na0ca.js +2 -0
  22. package/dist/{chunk-5s2wpbdt.js → chunk-3dhdh7jh.js} +1 -1
  23. package/dist/chunk-3g3n0djp.js +2 -0
  24. package/dist/{chunk-gmhbqxcg.js → chunk-3pk47npz.js} +2 -2
  25. package/dist/chunk-465zxxrf.js +2 -0
  26. package/dist/{chunk-q3hdevem.js → chunk-4ar9qjya.js} +2 -2
  27. package/dist/{chunk-hjm26kwf.js → chunk-4vb2e17y.js} +1 -1
  28. package/dist/{chunk-xp0nfvxg.js → chunk-4xt6bccx.js} +2 -2
  29. package/dist/{chunk-hmze7f10.js → chunk-4y0yjee1.js} +2 -2
  30. package/dist/{chunk-0mf7yh69.js → chunk-4y87qc0q.js} +2 -2
  31. package/dist/chunk-5640ga6m.js +2 -0
  32. package/dist/{chunk-tpx841s3.js → chunk-58t2kkh8.js} +2 -2
  33. package/dist/chunk-5hdcwxmh.js +2 -0
  34. package/dist/chunk-5tsvqfej.js +2 -0
  35. package/dist/chunk-602snzpa.js +2 -0
  36. package/dist/{chunk-zc2hdmk1.js → chunk-60tc6jmp.js} +2 -2
  37. package/dist/{chunk-61vxy6yd.js → chunk-62sp80d0.js} +1 -1
  38. package/dist/{chunk-fzetrkvd.js → chunk-6amcjhqh.js} +2 -2
  39. package/dist/{chunk-a2ftkzak.js → chunk-6xhjta3v.js} +1 -1
  40. package/dist/{chunk-sqh158m4.js → chunk-71zed0rt.js} +1 -1
  41. package/dist/{chunk-s44rx1sz.js → chunk-7az2575k.js} +3 -3
  42. package/dist/{chunk-hrexfky6.js → chunk-82m8q66f.js} +2 -2
  43. package/dist/{chunk-1drkvxzk.js → chunk-862r6ajk.js} +1 -1
  44. package/dist/chunk-8jhsjq8f.js +2 -0
  45. package/dist/chunk-8pktp9pc.js +2 -0
  46. package/dist/chunk-90av8aeq.js +2 -0
  47. package/dist/{chunk-rkqe8p8n.js → chunk-9mknagqd.js} +2 -2
  48. package/dist/{chunk-bwas6kp2.js → chunk-9y31b3sw.js} +2 -2
  49. package/dist/chunk-9yha9cvq.js +2 -0
  50. package/dist/{chunk-3nj26hhf.js → chunk-aaqk0jrt.js} +2 -2
  51. package/dist/chunk-appwebh3.js +2 -0
  52. package/dist/chunk-atv1r122.js +2 -0
  53. package/dist/chunk-awawx7sp.js +2 -0
  54. package/dist/{chunk-gtddnhdy.js → chunk-b826jevt.js} +2 -2
  55. package/dist/chunk-b91ggk46.js +2 -0
  56. package/dist/{chunk-z75zbdq8.js → chunk-bkyjy7tp.js} +1 -1
  57. package/dist/chunk-bztgv33r.js +2 -0
  58. package/dist/chunk-cc8f9yvh.js +2 -0
  59. package/dist/{chunk-acrrwrzy.js → chunk-ckft9abb.js} +2 -2
  60. package/dist/{chunk-0d8k5bmd.js → chunk-d1ckpc56.js} +2 -2
  61. package/dist/{chunk-2ysnmwx1.js → chunk-d7h2n049.js} +2 -2
  62. package/dist/{chunk-17wjmyj7.js → chunk-d9xm18sy.js} +2 -2
  63. package/dist/chunk-dsxw7qvm.js +2 -0
  64. package/dist/chunk-dx176sdf.js +2 -0
  65. package/dist/{chunk-rdtj6bad.js → chunk-e11qjnb4.js} +2 -2
  66. package/dist/{chunk-m4mfw5s4.js → chunk-eftxa7tx.js} +5 -5
  67. package/dist/chunk-eg2ts8sp.js +2 -0
  68. package/dist/{chunk-yg42bpjr.js → chunk-ehrfhhfw.js} +3 -3
  69. package/dist/{chunk-nx91ewps.js → chunk-ek06eyp4.js} +1 -1
  70. package/dist/{chunk-qbdqh38y.js → chunk-eq1azzrt.js} +1 -1
  71. package/dist/{chunk-r7c0tca8.js → chunk-f09gwfr3.js} +2 -2
  72. package/dist/chunk-f5z2f54v.js +2 -0
  73. package/dist/chunk-f7tp22k1.js +4 -0
  74. package/dist/{chunk-rgkhm4s4.js → chunk-fvgebjsz.js} +2 -2
  75. package/dist/{chunk-8fn5n4yv.js → chunk-g5ke7686.js} +2 -2
  76. package/dist/{chunk-jd61cfkk.js → chunk-gjh9py8j.js} +2 -2
  77. package/dist/{chunk-epqjzw63.js → chunk-gxmrync5.js} +2 -2
  78. package/dist/chunk-gyt0xsmh.js +2 -0
  79. package/dist/{chunk-m5jhw1e6.js → chunk-gzff19t3.js} +2 -2
  80. package/dist/{chunk-q98941j2.js → chunk-h6354tmm.js} +2 -2
  81. package/dist/chunk-hf0nha31.js +2 -0
  82. package/dist/{chunk-syv6gady.js → chunk-hxhptw6e.js} +2 -2
  83. package/dist/{chunk-z4zm74ge.js → chunk-hz1pgnqp.js} +2 -2
  84. package/dist/{chunk-jwb3723b.js → chunk-jce1mkfh.js} +2 -2
  85. package/dist/{chunk-sj7jdb7m.js → chunk-jn90tdhn.js} +1 -1
  86. package/dist/{chunk-rd94eyan.js → chunk-jrmdbkae.js} +2 -2
  87. package/dist/{chunk-1txn4b0v.js → chunk-k6tqy9x5.js} +1 -1
  88. package/dist/{chunk-xw0gvwh5.js → chunk-kh32nepy.js} +2 -2
  89. package/dist/{chunk-ehh31hzz.js → chunk-kmt7fjdq.js} +1 -1
  90. package/dist/{chunk-yf2p44mq.js → chunk-krn4yh36.js} +2 -2
  91. package/dist/chunk-kywzvmjx.js +2 -0
  92. package/dist/chunk-m5xngq9n.js +2 -0
  93. package/dist/{chunk-cywx4qmv.js → chunk-m8dbspj3.js} +2 -2
  94. package/dist/{chunk-n4cseazv.js → chunk-mdg2na3p.js} +3 -3
  95. package/dist/chunk-mgtkmbmd.js +2 -0
  96. package/dist/chunk-msredq8h.js +2 -0
  97. package/dist/{chunk-yegh80h4.js → chunk-mzh48e09.js} +2 -2
  98. package/dist/chunk-n7yk45mr.js +2 -0
  99. package/dist/chunk-na21awb6.js +2 -0
  100. package/dist/{chunk-hhw1pjz6.js → chunk-nc724yjk.js} +2 -2
  101. package/dist/{chunk-xjtqdp82.js → chunk-ncekagm6.js} +1 -1
  102. package/dist/chunk-nkjfa05y.js +2 -0
  103. package/dist/chunk-nnfnwj9n.js +2 -0
  104. package/dist/chunk-nyvzyy9q.js +3 -0
  105. package/dist/{chunk-69yx37pv.js → chunk-p0bvkpwq.js} +3 -3
  106. package/dist/{chunk-8bzk9e4v.js → chunk-qb09vn5h.js} +2 -2
  107. package/dist/chunk-qpc4ca5y.js +2 -0
  108. package/dist/{chunk-xfjcwypy.js → chunk-qrar3eh8.js} +3 -3
  109. package/dist/{chunk-xf14bg2v.js → chunk-qsvd61ce.js} +3 -3
  110. package/dist/chunk-qtwmcw8y.js +2 -0
  111. package/dist/chunk-r3tfwy7k.js +2 -0
  112. package/dist/chunk-rj4z8zrk.js +2 -0
  113. package/dist/chunk-rwpr6j34.js +2 -0
  114. package/dist/{chunk-y6r6tzfh.js → chunk-ryz4c13z.js} +2 -2
  115. package/dist/{chunk-mgt5j803.js → chunk-sc57jf2x.js} +1 -1
  116. package/dist/chunk-sgy0gbar.js +2 -0
  117. package/dist/{chunk-q4y1q1na.js → chunk-sppn6v56.js} +2 -2
  118. package/dist/chunk-sw9pw2vx.js +2 -0
  119. package/dist/{chunk-0grd0g0x.js → chunk-t177dfb8.js} +2 -2
  120. package/dist/{chunk-an03g9e8.js → chunk-t3ew92b3.js} +2 -2
  121. package/dist/{chunk-5wyxvpgt.js → chunk-tc85dd04.js} +1 -1
  122. package/dist/chunk-tmc05znj.js +3 -0
  123. package/dist/{chunk-4jagfjhm.js → chunk-tsexf956.js} +2 -2
  124. package/dist/{chunk-wjs8bwpk.js → chunk-tv89wh8b.js} +2 -2
  125. package/dist/{chunk-pkgrt90z.js → chunk-tx1tn5kr.js} +2 -2
  126. package/dist/chunk-v7581vjx.js +2 -0
  127. package/dist/{chunk-twwqgd8e.js → chunk-v86a2qjp.js} +2 -2
  128. package/dist/{chunk-ttdxc6mg.js → chunk-vmw815b1.js} +4 -4
  129. package/dist/{chunk-z3e38981.js → chunk-wbkj0ea6.js} +2 -2
  130. package/dist/{chunk-0rxpyf0k.js → chunk-x55qtpsa.js} +2 -2
  131. package/dist/{chunk-y438yezf.js → chunk-xcfde6w5.js} +3 -3
  132. package/dist/{chunk-0k654tyt.js → chunk-ya03j791.js} +2 -2
  133. package/dist/{chunk-c6w4bp15.js → chunk-yx7f12tc.js} +1 -1
  134. package/dist/{chunk-qgfq5vrz.js → chunk-z33zakbw.js} +1 -1
  135. package/dist/{chunk-93q2dm10.js → chunk-zb8cdt79.js} +1 -1
  136. package/dist/{chunk-3ryhmzsq.js → chunk-ze7v4hpt.js} +2 -2
  137. package/dist/{chunk-78ew0821.js → chunk-zk6d3k70.js} +5 -5
  138. package/dist/codex/activity-group.js +1 -1
  139. package/dist/codex/assistant-message.js +1 -1
  140. package/dist/codex/async-question-card.js +1 -1
  141. package/dist/codex/disclosure-state.js +1 -1
  142. package/dist/codex/edited-files-card.js +1 -1
  143. package/dist/codex/image-view-activity.js +1 -1
  144. package/dist/codex/markdown-renderer.js +1 -1
  145. package/dist/codex/navigation-audio.js +1 -1
  146. package/dist/codex/navigation-preview.js +1 -1
  147. package/dist/codex/navigation-rail.js +1 -1
  148. package/dist/codex/patch-view.js +1 -1
  149. package/dist/codex/plan.js +1 -1
  150. package/dist/codex/timeline-virtualizer.js +1 -1
  151. package/dist/codex/turn-activity.js +1 -1
  152. package/dist/codex/user-message.js +1 -1
  153. package/dist/codex/virtualized-turn-list.js +1 -1
  154. package/dist/composer/completion-filter.js +1 -1
  155. package/dist/composer/completion-menu.js +1 -1
  156. package/dist/composer/completion-trigger.js +1 -1
  157. package/dist/composer/effort-slider.js +1 -1
  158. package/dist/composer/menu-radio.js +1 -1
  159. package/dist/composer/model-select.js +1 -1
  160. package/dist/composer/permission-mode-select.js +1 -1
  161. package/dist/composer/prompt-input-attachments.js +1 -1
  162. package/dist/composer/prompt-input-clipboard.js +1 -1
  163. package/dist/composer/prompt-input-context.js +1 -1
  164. package/dist/composer/prompt-input-textarea.js +1 -1
  165. package/dist/composer/prompt-input.js +1 -1
  166. package/dist/conversation/action-card.d.ts +2 -2
  167. package/dist/conversation/action-card.js +1 -1
  168. package/dist/conversation/composer/composer.d.ts +1 -1
  169. package/dist/conversation/composer/composer.js +1 -1
  170. package/dist/conversation/composer/config-options.d.ts +1 -1
  171. package/dist/conversation/composer/config-options.js +1 -1
  172. package/dist/conversation/composer/context.d.ts +1 -1
  173. package/dist/conversation/composer/context.js +1 -1
  174. package/dist/conversation/composer/drafts.js +1 -1
  175. package/dist/conversation/composer/file-items.js +1 -1
  176. package/dist/conversation/composer/long-text.js +1 -1
  177. package/dist/conversation/composer/mention-chips.js +1 -1
  178. package/dist/conversation/composer/mention-uri.js +1 -1
  179. package/dist/conversation/composer/model-menu.js +1 -1
  180. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  181. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  182. package/dist/conversation/composer/prediction.d.ts +1 -1
  183. package/dist/conversation/composer/prediction.js +1 -1
  184. package/dist/conversation/composer/slash-command-button.js +1 -1
  185. package/dist/conversation/composer/submit-button.js +1 -1
  186. package/dist/conversation/composer/usage-meter.d.ts +1 -1
  187. package/dist/conversation/composer/usage-meter.js +1 -1
  188. package/dist/conversation/context.js +1 -1
  189. package/dist/conversation/conversation-body.d.ts +1 -1
  190. package/dist/conversation/conversation-body.js +1 -1
  191. package/dist/conversation/conversation-view.d.ts +1 -1
  192. package/dist/conversation/conversation-view.js +1 -1
  193. package/dist/conversation/conversation.js +1 -1
  194. package/dist/conversation/diff-modal.js +1 -1
  195. package/dist/conversation/session-actions.js +1 -1
  196. package/dist/image-lightbox.js +1 -1
  197. package/dist/image-preview-dialog.js +1 -1
  198. package/dist/lib/code-highlighter.js +1 -1
  199. package/dist/lib/fuzzy.js +1 -1
  200. package/dist/lib/group-blocks.js +1 -1
  201. package/dist/lib/image-encode.js +1 -1
  202. package/dist/lib/limits.js +1 -1
  203. package/dist/lib/markdown-parser.js +1 -1
  204. package/dist/lib/markdown-rules.js +1 -1
  205. package/dist/lib/model-name.js +1 -1
  206. package/dist/lib/pointer-centered-zoom.js +1 -1
  207. package/dist/lib/prepare-prompt-files.js +1 -1
  208. package/dist/lib/stream-style.js +1 -1
  209. package/dist/lib/streaming-markdown.js +1 -1
  210. package/dist/search/chat-search.js +1 -1
  211. package/dist/search/dom-matches.js +1 -1
  212. package/dist/search/find-bar.js +1 -1
  213. package/dist/search/literal-matches.js +1 -1
  214. package/dist/session-list/archived-sessions.js +1 -1
  215. package/dist/session-list/highlight.js +1 -1
  216. package/dist/session-list/host.d.ts +2 -2
  217. package/dist/session-list/host.js +1 -1
  218. package/dist/session-list/hover-info-card.js +1 -1
  219. package/dist/session-list/navigation.js +1 -1
  220. package/dist/session-list/overflow-marquee.js +1 -1
  221. package/dist/session-list/row-stop-button.js +1 -1
  222. package/dist/session-list/session-groups.d.ts +1 -5
  223. package/dist/session-list/session-groups.js +1 -1
  224. package/dist/session-list/session-info-card.d.ts +1 -1
  225. package/dist/session-list/session-info-card.js +1 -1
  226. package/dist/session-list/session-list.d.ts +1 -1
  227. package/dist/session-list/session-list.js +1 -1
  228. package/dist/session-list/session-row.d.ts +1 -1
  229. package/dist/session-list/session-row.js +1 -1
  230. package/dist/session-list/session-state-dot.js +1 -1
  231. package/dist/session-list/sidebar-overlay.js +1 -1
  232. package/dist/session-list/trailing-swap.js +1 -1
  233. package/dist/session-list/use-activity-preview.js +1 -1
  234. package/dist/session-list/use-project-sessions.d.ts +1 -1
  235. package/dist/session-list/use-project-sessions.js +1 -1
  236. package/dist/session-list/virtual-session-rows.d.ts +1 -1
  237. package/dist/session-list/virtual-session-rows.js +1 -1
  238. package/dist/session-timeline/activity-group.d.ts +1 -1
  239. package/dist/session-timeline/activity-group.js +1 -1
  240. package/dist/session-timeline/activity-projection.d.ts +1 -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.d.ts +1 -1
  244. package/dist/session-timeline/assistant-turn.js +1 -1
  245. package/dist/session-timeline/async-questions.d.ts +1 -1
  246. package/dist/session-timeline/async-questions.js +1 -1
  247. package/dist/session-timeline/edited-files-card.d.ts +1 -1
  248. package/dist/session-timeline/edited-files-card.js +1 -1
  249. package/dist/session-timeline/history-timeline.js +1 -1
  250. package/dist/session-timeline/host.js +1 -1
  251. package/dist/session-timeline/navigation-rail.js +1 -1
  252. package/dist/session-timeline/plan.js +1 -1
  253. package/dist/session-timeline/question-reply.js +1 -1
  254. package/dist/session-timeline/resource-content.js +1 -1
  255. package/dist/session-timeline/session-timeline.d.ts +1 -1
  256. package/dist/session-timeline/session-timeline.js +1 -1
  257. package/dist/session-timeline/timeline-registry.d.ts +1 -1
  258. package/dist/session-timeline/timeline-registry.js +1 -1
  259. package/dist/session-timeline/turn-activity.js +1 -1
  260. package/dist/session-timeline/turn-error.d.ts +1 -1
  261. package/dist/session-timeline/turn-error.js +1 -1
  262. package/dist/session-timeline/turn-retry.js +1 -1
  263. package/dist/session-timeline/turn-time.js +1 -1
  264. package/dist/session-timeline/turns.d.ts +2 -3
  265. package/dist/session-timeline/turns.js +1 -1
  266. package/dist/session-timeline/types.d.ts +1 -2
  267. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  268. package/dist/session-timeline/user-message.d.ts +1 -1
  269. package/dist/session-timeline/user-message.js +1 -1
  270. package/dist/ui/alert.js +1 -1
  271. package/dist/ui/badge.js +1 -1
  272. package/dist/ui/card.js +1 -1
  273. package/dist/ui/checkbox.js +1 -1
  274. package/dist/ui/dialog.js +1 -1
  275. package/dist/ui/dropdown-menu.js +1 -1
  276. package/dist/ui/empty.js +1 -1
  277. package/dist/ui/field.js +1 -1
  278. package/dist/ui/hover-card.js +1 -1
  279. package/dist/ui/input-group-textarea.js +1 -1
  280. package/dist/ui/input-group.js +1 -1
  281. package/dist/ui/kbd.js +1 -1
  282. package/dist/ui/label.js +1 -1
  283. package/dist/ui/radio-group.js +1 -1
  284. package/dist/ui/select.js +1 -1
  285. package/dist/ui/separator.js +1 -1
  286. package/dist/ui/skeleton.js +1 -1
  287. package/dist/ui/spinner.js +1 -1
  288. package/dist/ui/switch.js +1 -1
  289. package/dist/ui/textarea.js +1 -1
  290. package/dist/ui/tooltip.js +1 -1
  291. package/package.json +5 -5
  292. package/dist/chunk-0fvpmcps.js +0 -2
  293. package/dist/chunk-0hpww4x3.js +0 -2
  294. package/dist/chunk-3wsg6710.js +0 -2
  295. package/dist/chunk-3x1eq95a.js +0 -2
  296. package/dist/chunk-470vq7d1.js +0 -2
  297. package/dist/chunk-4pbh3fph.js +0 -2
  298. package/dist/chunk-5t3rrnfd.js +0 -2
  299. package/dist/chunk-65ajc856.js +0 -2
  300. package/dist/chunk-65jedxc3.js +0 -4
  301. package/dist/chunk-68y66m3v.js +0 -2
  302. package/dist/chunk-6d38ff76.js +0 -2
  303. package/dist/chunk-6pq1xmwg.js +0 -2
  304. package/dist/chunk-6vqnsdgc.js +0 -2
  305. package/dist/chunk-6ym3w4kf.js +0 -2
  306. package/dist/chunk-76tkqx9n.js +0 -2
  307. package/dist/chunk-7e1m1d9x.js +0 -2
  308. package/dist/chunk-88vkk9s3.js +0 -2
  309. package/dist/chunk-8p0074ye.js +0 -2
  310. package/dist/chunk-91trh8rj.js +0 -2
  311. package/dist/chunk-94k9byb1.js +0 -2
  312. package/dist/chunk-9c41y5hw.js +0 -2
  313. package/dist/chunk-9eh80kxk.js +0 -2
  314. package/dist/chunk-d2rrvka6.js +0 -2
  315. package/dist/chunk-dcxprfnp.js +0 -2
  316. package/dist/chunk-dsdxw9s8.js +0 -2
  317. package/dist/chunk-gb2dmt6b.js +0 -2
  318. package/dist/chunk-gwav4k8b.js +0 -2
  319. package/dist/chunk-gy63n5pz.js +0 -2
  320. package/dist/chunk-h05s12jn.js +0 -3
  321. package/dist/chunk-hf65xscb.js +0 -2
  322. package/dist/chunk-hmj7yqyb.js +0 -3
  323. package/dist/chunk-k2zg8xva.js +0 -2
  324. package/dist/chunk-kg1gk77d.js +0 -2
  325. package/dist/chunk-kh1tc15g.js +0 -2
  326. package/dist/chunk-mj5720c4.js +0 -2
  327. package/dist/chunk-mv8jmv1e.js +0 -2
  328. package/dist/chunk-n3m7t85x.js +0 -2
  329. package/dist/chunk-nb5wjv92.js +0 -2
  330. package/dist/chunk-p2s04v76.js +0 -2
  331. package/dist/chunk-qbj5s8qa.js +0 -2
  332. package/dist/chunk-qqdca2rm.js +0 -2
  333. package/dist/chunk-r8z8f31m.js +0 -2
  334. package/dist/chunk-spt7tnqx.js +0 -2
  335. package/dist/chunk-ttk21631.js +0 -2
  336. package/dist/chunk-tzjk7zkc.js +0 -2
  337. package/dist/chunk-x053g6f2.js +0 -2
  338. package/dist/chunk-zjg9n6zj.js +0 -2
@@ -1 +1 @@
1
- import{e}from"./chunk-cg97byvk.js";import{cva as i}from"class-variance-authority";import{cn as r}from"cn";import{jsx as o}from"react/jsx-runtime";function Zn({className:a,...t}){return o("div",{"data-slot":"input-group",role:"group",className:r("group/input-group border-input has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-9 w-full min-w-0 items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",a),...t})}var p=i("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function Dt({className:a,align:t="inline-start",...s}){return o("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:r(p({align:t}),a),onClick:(n)=>{if(n.target.closest("button"))return;n.currentTarget.parentElement?.querySelector("input")?.focus()},...s})}var l=i("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function _t({className:a,type:t="button",variant:s="ghost",size:n="xs",...u}){return o(e,{type:t,"data-size":n,variant:s,className:r(l({size:n}),a),...u})}function si({className:a,...t}){return o("span",{className:r("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...t})}export{Zn,Dt,_t,si};
1
+ import{e}from"./chunk-cg97byvk.js";import{cva as i}from"class-variance-authority";import{cn as r}from"cn";import{jsx as o}from"react/jsx-runtime";function nr({className:a,...t}){return o("div",{"data-slot":"input-group",role:"group",className:r("group/input-group border-input has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-9 w-full min-w-0 items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",a),...t})}var p=i("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function on({className:a,align:t="inline-start",...s}){return o("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:r(p({align:t}),a),onClick:(n)=>{if(n.target.closest("button"))return;n.currentTarget.parentElement?.querySelector("input")?.focus()},...s})}var l=i("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function rn({className:a,type:t="button",variant:s="ghost",size:n="xs",...u}){return o(e,{type:t,"data-size":n,variant:s,className:r(l({size:n}),a),...u})}function Ci({className:a,...t}){return o("span",{className:r("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...t})}export{nr,on,rn,Ci};
@@ -0,0 +1,2 @@
1
+ import{createContext as t,useContext as o}from"react";var en=t(null);function br(){let e=o(en);if(e===null)throw Error("Composer is missing");return e}
2
+ export{en,br};
@@ -1,2 +1,2 @@
1
- function Fo(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"thinking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"thinking",ownerKey:n?.key}}
2
- export{Fo};
1
+ function po(r,e){if(!e.running)return{kind:"idle"};if(e.blocked)return{kind:"waiting"};if(e.retrying)return{kind:"retrying"};let t=r.findLast((i)=>i.kind==="tool"&&i.active);if(t)return{kind:"tool",ownerKey:t.key};let n=r.findLast((i)=>i.kind!=="user");if(n?.active){if(n.kind==="answer")return{kind:"speaking",ownerKey:n.key};if(n.kind==="text")return{kind:"thinking",ownerKey:n.key};if(n.kind==="reasoning")return{kind:"reasoning",ownerKey:n.key};if(n.kind==="plan")return{kind:"planning",ownerKey:n.key};if(n.kind==="compaction")return{kind:"tool",ownerKey:n.key}}if(n?.kind==="answer")return{kind:"idle"};return{kind:"thinking",ownerKey:n?.key}}
2
+ export{po};
@@ -0,0 +1,2 @@
1
+ import{e}from"./chunk-cg97byvk.js";import{t}from"./chunk-hf0nha31.js";import{codexTurnError as h}from"@nyssance/codex-acp-v2/client";import{AlertCircleIcon as R}from"lucide-react";import{useEffect as C,useRef as u,useState as i}from"react";import{jsx as o,jsxs as m}from"react/jsx-runtime";function $t({children:c}){return m("div",{className:"codex-error-message",role:"alert",children:[o(R,{"aria-hidden":"true"}),o("div",{className:"min-w-0 flex-1",children:c})]})}function qt({error:c,retry:r}){let{t:f}=t(),p=h(c),[l]=i(()=>r?.delaySeconds==null?null:Date.now()+r.delaySeconds*1000),[v,y]=i(r?.delaySeconds??null),[T,x]=i(!1),[g,w]=i(null),a=u(!1),E=u(!1),S=u(r?.run);S.current=r?.run;let b=u((N)=>{let s=S.current;if(a.current||s===void 0)return;a.current=!0,x(!0),w(null),s(N).catch((n)=>{E.current=!0,a.current=!1,y(null),x(!1),w(n instanceof Error?n.message:String(n))})}),d=r!==void 0&&p.retryable;return C(()=>{if(!d||l===null)return;let s=setInterval(()=>{if(E.current||a.current)return;let n=Math.max(0,Math.ceil((l-Date.now())/1000));if(y(n),n===0)b.current("automatic")},1000);return()=>clearInterval(s)},[l,d]),m($t,{children:[m("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o("div",{className:"min-w-0 flex-1 whitespace-pre-wrap",children:p.message}),d&&o(e,{variant:"outline",size:"sm",disabled:T,onClick:()=>b.current("manual"),children:v===null?f("timeline.retry"):f("timeline.retryCountdown",{seconds:v})})]}),g!==null&&o("div",{className:"text-muted-foreground mt-2 text-sm",children:g})]})}
2
+ export{$t,qt};
@@ -1,2 +1,2 @@
1
- class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function Yo(i,e){return n??=new s,n.connect(i,e)}
2
- export{Yo};
1
+ class s{worker=new Worker(new URL("@alwith/module-chat/code-highlighter.worker",import.meta.url),{type:"module"});clients=new Map;pending=new Map;active=null;failure=null;nextClientId=0;constructor(){this.worker.onmessage=(i)=>{let e=this.active,t=i.data;if(t.clientId!==e?.clientId||t.revision!==e.revision){this.fail(Error("Code highlighting worker returned an unexpected request"));return}if(this.active=null,!t.ok){this.fail(Error(t.error));return}let r=this.clients.get(e.clientId);if(r?.revision===e.revision)r.onResult({code:e.code,language:e.language,html:t.html});this.dispatch()},this.worker.onerror=(i)=>this.fail(Error(i.message)),this.worker.onmessageerror=()=>this.fail(Error("Cannot deserialize code highlighting result"))}fail(i){this.failure=i,this.worker.terminate(),this.pending.clear(),this.active=null;for(let e of this.clients.values())e.onError(i)}dispatch(){if(this.active!==null||this.pending.size===0)return;let i=this.pending.values().next().value;this.pending.delete(i.clientId),this.active=i;try{this.worker.postMessage(i)}catch(e){this.fail(e instanceof Error?e:Error(String(e)))}}connect(i,e){if(this.failure!==null)throw this.failure;let t=++this.nextClientId,r={revision:0,onResult:i,onError:e};return this.clients.set(t,r),{update:(o,l)=>{if(this.failure!==null)throw this.failure;r.revision+=1,this.pending.set(t,{clientId:t,revision:r.revision,code:o,language:l}),this.dispatch()},dispose:()=>{if(this.clients.delete(t),this.pending.delete(t),this.clients.size===0)this.worker.terminate(),n=void 0}}}}var n;function Zn(i,e){return n??=new s,n.connect(i,e)}
2
+ export{Zn};
@@ -1,2 +1,2 @@
1
- function uo({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
2
- export{uo};
1
+ function Ho({container:i,target:f,clientX:e,clientY:n,currentScale:r,nextScale:s}){if(r<=0||s<=0)return null;let o=i.getBoundingClientRect(),t=f.getBoundingClientRect();if(t.width===0||t.height===0)return null;let h=e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom,l=h?(e-t.left)/t.width:0.5,a=h?(n-t.top)/t.height:0.5,c=t.width/r,g=t.height/r,m=c*s,u=g*s,d=e-o.left,p=n-o.top,P=i.scrollLeft+(t.left-o.left)+t.width/2,b=i.scrollTop+(t.top-o.top)+t.height/2,C=(l-0.5)*m,x=(a-0.5)*u;return{left:Math.max(0,P+C-d),top:Math.max(0,b+x-p)}}
2
+ export{Ho};
@@ -1 +1 @@
1
- import{Switch as a}from"@base-ui/react/switch";import{cn as d}from"cn";import{jsx as e}from"react/jsx-runtime";function Ne({className:i,size:t="default",...r}){return e(a.Root,{"data-slot":"switch","data-size":t,className:d("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]",i),...r,children:e(a.Thumb,{"data-slot":"switch-thumb",className:"bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0"})})}export{Ne};
1
+ import{Switch as a}from"@base-ui/react/switch";import{cn as d}from"cn";import{jsx as e}from"react/jsx-runtime";function ze({className:i,size:t="default",...r}){return e(a.Root,{"data-slot":"switch","data-size":t,className:d("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 relative inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 aria-invalid:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px]",i),...r,children:e(a.Thumb,{"data-slot":"switch-thumb",className:"bg-background dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0"})})}export{ze};
@@ -0,0 +1,3 @@
1
+ import{H,O}from"./chunk-6xhjta3v.js";import{e}from"./chunk-cg97byvk.js";import{d,u,b,V,m,w}from"./chunk-k6tqy9x5.js";import{l}from"./chunk-1hy64ewz.js";import{Nt,Mt,Rt,hn,j}from"./chunk-yx7f12tc.js";import{oe}from"./chunk-62sp80d0.js";import{p,s,r}from"./chunk-2rjt5w9p.js";import{ne,_,E}from"./chunk-msredq8h.js";import{sessionGroup as z}from"@nyssance/codex-acp-v2/client";import{cn as fe}from"cn";import{ArchiveIcon as ve,FolderIcon as Z,ListFilterIcon as ge,SearchIcon as xe,Trash2Icon as ee}from"lucide-react";import{useEffect as Se,useRef as ye,useState as f}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function te({className:v,...n}){return i(hn,{align:"start",alignItemWithTrigger:!1,sideOffset:6,...n,className:fe("max-w-(--available-width) min-w-0 p-1",v)})}function G(v){return v instanceof Error?v.message:String(v)}function Le({children:v}){return i("div",{className:"min-h-0 flex-1 overflow-y-auto",children:i("div",{className:"flex flex-col gap-8",children:v})})}function dr({Scroll:v=Le}){let{t:n,i18n:q}=p(),g=s(),N=r((t)=>t.archivedSessions),D=r((t)=>t.connection),[K,se]=f(""),[C,ie]=f("all"),[x,re]=f("all"),[ae,le]=f(0),[Q,U]=f(!0),[F,R]=f(null),[W,J]=f(null),[A,I]=f(!1),S=ye(!1),[P,y]=f(null),[M,T]=f(null),[ce,X]=f(!1);Se(()=>{if(D!=="ready")return;let t=!1;U(!0),R(null);async function h(){try{await g.listArchived({reset:!0});let o=new Set;while(!t&&g.state.archivedCursor!==null){let L=g.state.archivedCursor;if(o.has(L))throw Error("Archive pagination returned a repeated cursor");o.add(L),await g.listArchived()}}catch(o){if(!t)R(G(o))}finally{if(!t)U(!1)}}return h(),()=>{t=!0}},[g,D,ae]);let c=r((t)=>t.projectContext),B=!(c!==null&&D==="ready"&&!Q&&F===null)||A,k=(t)=>t.title??n("sessionList.untitled"),de=[...new Set(N.filter((t)=>c&&z(c,t).id!==E).map((t)=>c?z(c,t).id:t.cwd))].toSorted(),ue=K.trim().toLocaleLowerCase(q.language),Y=N.filter((t)=>{let h=c?z(c,t).id:null,o=h===E;return k(t).toLocaleLowerCase(q.language).includes(ue)&&(C==="all"||(C==="quick"?o:!o))&&(x==="all"||(x==="quick"?o:h===x))}),me=new Intl.DateTimeFormat(q.language,{dateStyle:"medium",timeStyle:"short"});async function pe(t){if(S.current)return;S.current=!0,I(!0),J(null);try{await g.unarchive(t.sessionId)}catch(h){J(G(h))}finally{S.current=!1,I(!1)}}async function he(){if(S.current||!P)return;S.current=!0,I(!0),T(null);let t=[],h=[];try{for(let o of P){if(!g.state.archivedSessions.some((L)=>L.sessionId===o.sessionId))continue;try{await g.delete(o.sessionId)}catch(L){t.push(o),h.push(`${k(o)}: ${G(L)}`)}}if(t.length)y(t),T(h.join(`
2
+ `));else y(null)}finally{S.current=!1,I(!1)}}return a("section",{className:"flex min-h-0 flex-1 flex-col overflow-hidden","aria-label":n("sessionList.archives.title"),children:[a("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:[a("header",{className:"flex min-h-9 shrink-0 flex-wrap items-center justify-between gap-3",children:[i("h1",{className:"text-2xl leading-9 font-semibold tracking-tight",children:n("sessionList.archives.title")}),a(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:B||N.length===0,onClick:()=>{T(null),X(!0),y([...N])},children:[i(ee,{"aria-hidden":"true"}),n("sessionList.archives.deleteAll")]})]}),a("div",{className:"flex shrink-0 flex-wrap gap-3",children:[a("div",{className:"relative min-w-48 flex-1",children:[i(xe,{"aria-hidden":"true",className:"text-muted-foreground pointer-events-none absolute start-3 top-2.5 size-4"}),i(l,{"aria-label":n("sessionList.archives.search"),placeholder:n("sessionList.archives.search"),value:K,onChange:(t)=>se(t.target.value),className:"rounded-md ps-9"})]}),a(Nt,{value:C,onValueChange:(t)=>{if(t===null)throw Error("Archive chat type cannot be empty");ie(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.chatType"),className:"w-40 rounded-md",children:[i(ge,{"aria-hidden":"true"}),i(Mt,{children:n(`sessionList.archives.${C==="all"?"allChats":C==="quick"?"quickChats":"projectChats"}`)})]}),a(te,{children:[i(j,{value:"all",children:n("sessionList.archives.allChats")}),i(j,{value:"quick",children:n("sessionList.archives.quickChats")}),i(j,{value:"project",children:n("sessionList.archives.projectChats")})]})]}),a(Nt,{value:x,onValueChange:(t)=>{if(t===null)throw Error("Archive project filter cannot be empty");re(t)},children:[a(Rt,{"aria-label":n("sessionList.archives.project"),className:"w-48 rounded-md",children:[i(Z,{"aria-hidden":"true"}),i(Mt,{className:"truncate",children:x==="all"?n("sessionList.archives.allProjects"):x==="quick"?n("sessionList.archives.noProject"):_(x,c??void 0)})]}),a(te,{children:[i(j,{value:"all",children:n("sessionList.archives.allProjects")}),i(j,{value:"quick",children:n("sessionList.archives.noProject")}),de.map((t)=>i(j,{value:t,title:t,children:_(t,c??void 0)},t))]})]})]}),a(v,{children:[D!=="ready"?i("p",{role:"status",className:"text-muted-foreground",children:n("sessionList.archives.connecting")}):Q?a("div",{role:"status",className:"text-muted-foreground flex items-center gap-2",children:[i(oe,{}),n("sessionList.archives.loading")]}):F?i(H,{variant:"destructive",children:a(O,{className:"flex items-center justify-between gap-4",children:[i("span",{children:F}),i(e,{variant:"outline",onClick:()=>le((t)=>t+1),children:n("sessionList.archives.retry")})]})}):N.length===0?a("div",{className:"text-muted-foreground flex flex-col items-center gap-3 py-16",children:[i(ve,{"aria-hidden":"true",className:"size-8"}),i("p",{children:n("sessionList.archives.empty")})]}):Y.length===0?i("p",{className:"text-muted-foreground py-12 text-center",children:n("sessionList.archives.noResults")}):(c?ne(Y,c):[]).filter(([,t])=>t.length>0).map(([t,h])=>a("section",{className:"flex flex-col gap-3",children:[a("div",{className:"flex items-center justify-between gap-3",children:[a("h2",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",title:t===E?void 0:t,children:[i(Z,{"aria-hidden":"true",className:"size-4 shrink-0"}),i("span",{className:"truncate",children:t===E?n("sessionList.archives.noProject"):_(t,c??void 0)})]}),i("span",{className:"text-muted-foreground shrink-0 text-sm",children:n("sessionList.archives.count",{count:h.length})})]}),i("div",{className:"divide-border divide-y overflow-hidden rounded-lg border",children:h.map((o)=>a("article",{"aria-label":k(o),className:"flex flex-wrap items-center gap-4 px-4 py-3",children:[a("div",{className:"min-w-0 flex-1 basis-40",children:[i("h3",{className:"truncate text-sm font-medium",title:k(o),children:k(o)}),o.updatedAt!==null&&i("time",{dateTime:o.updatedAt,title:n("sessionList.archives.updatedAt"),className:"text-muted-foreground text-xs",children:me.format(new Date(o.updatedAt))})]}),a("div",{className:"flex shrink-0 items-center gap-2",children:[i(e,{variant:"ghost",size:"icon-sm","aria-label":n("sessionList.delete"),title:n("sessionList.delete"),disabled:B,className:"text-muted-foreground hover:text-destructive",onClick:()=>{T(null),X(!1),y([o])},children:i(ee,{"aria-hidden":"true"})}),i(e,{variant:"secondary",size:"sm",disabled:B,onClick:()=>void pe(o),children:n("sessionList.archives.unarchive")})]})]},o.sessionId))})]},t)),W&&i(H,{variant:"destructive",children:i(O,{children:W})})]})]}),i(d,{open:P!==null,onOpenChange:(t)=>{if(!t&&!S.current)y(null)},children:a(u,{showCloseButton:!A,children:[a(b,{children:[i(m,{children:n("sessionList.archives.deleteTitle")}),i(w,{children:n(ce?"sessionList.archives.deleteAllDescription":"sessionList.archives.deleteDescription",{count:P?.length??0})})]}),M&&i(H,{variant:"destructive",children:i(O,{className:"max-h-40 overflow-auto whitespace-pre-wrap",children:M})}),a(V,{children:[i(e,{variant:"outline",disabled:A,onClick:()=>y(null),children:n("sessionList.cancel")}),a(e,{variant:"destructive",className:"text-[color-mix(in_oklab,var(--destructive)_80%,var(--foreground))]",disabled:B,onClick:()=>void he(),children:[A&&i(oe,{}),n("sessionList.archives.confirmDelete")]})]})]})})]})}
3
+ export{dr};
@@ -1,2 +1,2 @@
1
- var a=(e)=>String(e).padStart(2,"0");function Ue(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
2
- export{Ue};
1
+ var a=(e)=>String(e).padStart(2,"0");function Ne(e,l="user"){let r=e.replayed||e.items.some((t)=>t._meta?.codex&&typeof t._meta.codex==="object"&&("historyReplay"in t._meta.codex)&&t._meta.codex.historyReplay===!0),n=l==="user"?s(e.user?._meta,"messageSentAt")??(!r?e.user?.at??null:null):s(e.final.at(-1)?._meta,"messageCompletedAt")??e.items.map((t)=>s(t._meta,"turnCompletedAt")).find((t)=>t!==null)??(!r&&e.final.length>0?e.endedAt:null);if(n===null)return null;let o=new Date(n),u=o.toDateString()===new Date().toDateString();return{short:new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit",...u?{}:{month:"short",day:"numeric"}}).format(o),full:`${o.getFullYear()}-${a(o.getMonth()+1)}-${a(o.getDate())} ${a(o.getHours())}:${a(o.getMinutes())}`}}function s(e,l){let r=e?.codex;if(typeof r!=="object"||r===null)return null;let n=r[l];return typeof n==="number"&&Number.isFinite(n)&&Math.abs(n)<=8640000000000000?n:null}
2
+ export{Ne};
@@ -1,2 +1,2 @@
1
- async function po(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
2
- export{po};
1
+ async function tr(g,u){try{let a=await(await fetch(g)).blob(),s=u??a.type??"";if(!s.startsWith("image/"))return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(a)});let w=s.includes("svg"),n,r,o;if(w){let e=new Image,t=URL.createObjectURL(a);e.src=t;try{await new Promise((h,f)=>{e.onload=()=>h(),e.onerror=()=>f(Error("svg load failed"))})}finally{URL.revokeObjectURL(t)}r=e.naturalWidth||1024,o=e.naturalHeight||1024,n=e}else{let e=await createImageBitmap(a);r=e.width,o=e.height,n=e}let i=Math.min(1,2000/Math.max(r,o)),c=Math.round(r*i),l=Math.round(o*i),d=new OffscreenCanvas(c,l),m=d.getContext("2d");if(!m)throw Error("image-encode: OffscreenCanvas 2d context 不可用");if(m.drawImage(n,0,0,c,l),n instanceof ImageBitmap)n.close();let b=await d.convertToBlob({type:"image/webp",quality:0.85});return new Promise((e)=>{let t=new FileReader;t.onloadend=()=>e(t.result),t.onerror=()=>e(null),t.readAsDataURL(b)})}catch{return null}}
2
+ export{tr};
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-cg97byvk.js";import{ve}from"./chunk-61vxy6yd.js";import{SquareIcon as u}from"lucide-react";import{useRef as c,useState as f}from"react";import{jsx as a}from"react/jsx-runtime";function pt({title:t,onStop:s}){let[o,i]=f(!1),n=c(!1),l=async()=>{if(n.current)return;n.current=!0,i(!0);try{await s()}finally{n.current=!1,i(!1)}};return a(e,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(r)=>r.stopPropagation(),onClick:(r)=>{r.stopPropagation(),l()},children:o?a(ve,{className:"size-3","aria-label":t}):a(u,{className:"size-3 fill-current"})})}
2
- export{pt};
1
+ import{e}from"./chunk-cg97byvk.js";import{oe}from"./chunk-62sp80d0.js";import{SquareIcon as u}from"lucide-react";import{useRef as c,useState as f}from"react";import{jsx as a}from"react/jsx-runtime";function We({title:t,onStop:s}){let[o,i]=f(!1),n=c(!1),l=async()=>{if(n.current)return;n.current=!0,i(!0);try{await s()}finally{n.current=!1,i(!1)}};return a(e,{variant:"ghost",size:"icon",className:"size-5",title:t,"aria-label":t,"aria-busy":o,disabled:o,onKeyDown:(r)=>r.stopPropagation(),onClick:(r)=>{r.stopPropagation(),l()},children:o?a(oe,{className:"size-3","aria-label":t}):a(u,{className:"size-3 fill-current"})})}
2
+ export{We};
@@ -0,0 +1,2 @@
1
+ import{g}from"./chunk-qsvd61ce.js";import{codexMessageError as A,nativeTurnId as m,textOf as S,turns as _}from"@nyssance/codex-acp-v2/client";function Or(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 vo(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=g(e._meta).length>0||typeof i==="object"&&i!==null&&"delivery"in i&&i.delivery==="async";if(g(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 xo(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)=>!Or(r))},d=new Map(n.map((r,a)=>[r.turnId,a])),u=[],f=[u],p,k=null;for(let r of i.items){let a=m(r),l=d.get(a??"");if(a!==null&&k!==null&&a!==k||l!==void 0&&p!==void 0&&l>p+1)u=[],f.push(u);if(u.push(r),a!==null||r.kind==="user")k=a;if(l!==void 0)p=l}return f.flatMap((r)=>_({...i,items:r})).map((r)=>{let a=r.prompt===null?[]:[r.prompt];for(let c of r.entries)M(c,a,s);let l=a[0];if(l===void 0)throw Error("A turn without items");let I=`turn:${l.kind}:${l.id}`,h=r.endedAt??Math.max(...a.map((c)=>c.at)),y=o.get(I);if(y!==void 0&&K(y.items,a)&&y.endedAt===h)return y;let x={key:I,user:r.prompt,work:[],final:[],errors:[],edits:[],startedAt:r.startedAt??l.at,endedAt:h,replayed:a.every(jt),items:a},v=a.findLastIndex((c)=>c.kind!=="user"&&c.kind!=="compaction");return a.forEach((c,b)=>j(x,c,b<v,a[b-1])),x})}function K(t,e){return t.length===e.length&&t.every((n,o)=>n===e[o])}function jt(t){let e=t._meta?.codex;return t.replayed||typeof e==="object"&&e!==null&&"historyReplay"in e&&e.historyReplay===!0}function B(t){return S(t.content)}function Me(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"historyInterrupted"in n&&n.historyInterrupted===!0})}function Wt(t){return t.items.some((e)=>{let n=e._meta?.codex;return typeof n==="object"&&n!==null&&"turnInterrupted"in n&&n.turnInterrupted===!0})}function yo(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 bo(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 wo(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(!bo(t,e[n-1],o))break;n--}return e[n]?.key}function ko(t,e,n){let o=n,s=n;while(o>0&&bo(t,e[o-1],e[o]))o--;while(s+1<e.length&&bo(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{Or,vo,xo,jt,B,Me,Wt,yo,bo,wo,ko};
@@ -1,2 +1,2 @@
1
- import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as r}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var ro={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-success",idle:"bg-success"},io={requires_action:"text-red-500",running:"text-yellow-500",done:"text-success",idle:"text-success"};function bt({state:n,className:t,pulse:i=!0,title:s}){if(n===void 0)return null;let o=ro[n];if(n==="running"&&i)return u("span",{title:s,className:r("relative inline-flex size-1.5 shrink-0 items-center justify-center",io.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:s,className:r("size-2 shrink-0 rounded-full",o,t)})}
2
- export{ro,io,bt};
1
+ import{Ping as l}from"ldrs/react";import"ldrs/react/Ping.css";import{cn as r}from"cn";import{jsx as e,jsxs as u}from"react/jsx-runtime";var gn={requires_action:"bg-red-500",running:"bg-yellow-500",done:"bg-success",idle:"bg-success"},fn={requires_action:"text-red-500",running:"text-yellow-500",done:"text-success",idle:"text-success"};function Je({state:n,className:t,pulse:i=!0,title:s}){if(n===void 0)return null;let o=gn[n];if(n==="running"&&i)return u("span",{title:s,className:r("relative inline-flex size-1.5 shrink-0 items-center justify-center",fn.running,t),children:[e("span",{className:"absolute inset-0 flex items-center justify-center",children:e(l,{size:"26",speed:"2",color:"currentColor"})}),e("span",{className:"relative size-1.5 rounded-full bg-current"})]});return e("span",{title:s,className:r("size-2 shrink-0 rounded-full",o,t)})}
2
+ export{gn,fn,Je};
@@ -1,7 +1,7 @@
1
- import{Yo}from"./chunk-0grd0g0x.js";import{on,Xo}from"./chunk-rd94eyan.js";import{rn}from"./chunk-rgkhm4s4.js";import{decodeHTMLAttribute as C,decodeHTMLStrict as R}from"entities";import oe from"katex";import{CheckIcon as z,ChevronLeftIcon as ae,ChevronRightIcon as se,CopyIcon as ie,DownloadIcon as ce,FileIcon as de,LinkIcon as le,MailIcon as ue,XIcon as me}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as ge,createElement as U,memo as B,startTransition as fe,useContext as he,useEffect as p,useLayoutEffect as D,useMemo as X,useRef as b,useState as h}from"react";import{jsx as a,jsxs as f,Fragment as te}from"react/jsx-runtime";var G=ge(null);function y(){let e=he(G);if(e===null)throw Error("Markdown host is missing");return e}var pe=80,A=/\[([^\]\n]+)\]\(([^)\n]+)$/,ke=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,we=/\uE200[^\uE201]*$/,be=4,xe=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function N(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function J(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Te(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)&&!J(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function ve(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!N(e,t)&&!J(e,t,n))return t;return-1}function Ce(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function ye(e){return Ce(e,"```")%2===1}function V(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!N(e,t))n+=1;t+=1}return n%2===1}function Ne(e){return e.endsWith(`
1
+ import{Zn}from"./chunk-t177dfb8.js";import{Ot,Yn}from"./chunk-jrmdbkae.js";import{Ht}from"./chunk-fvgebjsz.js";import{decodeHTMLAttribute as C,decodeHTMLStrict as R}from"entities";import oe from"katex";import{CheckIcon as z,ChevronLeftIcon as ae,ChevronRightIcon as se,CopyIcon as ie,DownloadIcon as ce,FileIcon as de,LinkIcon as le,MailIcon as ue,XIcon as me}from"lucide-react";import"katex/dist/katex.min.css";import{createContext as ge,createElement as U,memo as B,startTransition as fe,useContext as he,useEffect as p,useLayoutEffect as D,useMemo as X,useRef as b,useState as h}from"react";import{jsx as a,jsxs as f,Fragment as te}from"react/jsx-runtime";var G=ge(null);function y(){let e=he(G);if(e===null)throw Error("Markdown host is missing");return e}var pe=80,A=/\[([^\]\n]+)\]\(([^)\n]+)$/,ke=/(^|\n)[^\S\n]*!\[[^\]\n]*(?:\](?:\([^\n]*)?)?\s*$/,we=/\uE200[^\uE201]*$/,be=4,xe=new Set("7zipx.accdb.asarpack.asciidoc.backup.backupdb.bundle.ccproj.cdrdao.code-workspace.config.debugin.deploy.design.docbook.dockerfile.dockerignore.editorconfig.eslintignore.gitattributes.gitignore.gitignore.gitkeep.gradle.graphqls.ignore.ipynb.keychain.keynote.licensee.lockfile.lockfile.markdown.markup.matlab.mkdocs.models.module.msstyle.notebook.npmignore.output.packageinfo.parquet.pickle.plistx.policy.postcssrc.prettierignore.projectfile.python.readme.review.robots.schema.search.series.settingsjson.shader.sqlite.sqlite3.storyboard.styles.system.target.terraform.update.vertex.webapp.webdoc.webpackrc.widget.workspace.xcodeproj.yarnlock".split("."));function N(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function J(e,n,t){if(t.length!==1)return!1;return e[n-1]===t||e[n+1]===t}function Te(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)&&!J(e,r,n)){t+=1,r+=n.length;continue}r+=1}return t}function ve(e,n){for(let t=e.length-n.length;t>=0;t-=1)if(e.startsWith(n,t)&&!N(e,t)&&!J(e,t,n))return t;return-1}function Ce(e,n){let t=0;for(let r=0;r<=e.length-n.length;){if(e.startsWith(n,r)&&!N(e,r)){t+=1,r+=n.length;continue}r+=1}return t}function ye(e){return Ce(e,"```")%2===1}function V(e){let n=0;for(let t=0;t<e.length;){if(e.startsWith("```",t)){for(t+=3;t<e.length&&!e.startsWith("```",t);)t+=1;if(t<e.length)t+=3;continue}if(e[t]==="`"&&!N(e,t))n+=1;t+=1}return n%2===1}function Ne(e){return e.endsWith(`
2
2
  `)?`${e}\`\`\``:`${e}
3
3
  \`\`\``}function H(e,n){if(!e.includes(n)||Te(e,n)%2===0)return e;let t=ve(e,n);if(t<0)return e;let r=e.slice(t+n.length);if(r.length===0||/^\s/.test(r)||r.includes(`
4
4
  `)||V(r))return e;return`${e}${n}`}function Me(e){return e.startsWith("/")&&!e.startsWith("//")||/^[A-Za-z]:[\\/]/.test(e)||/^\\\\[^\\]+\\[^\\]+/.test(e)||/^\/\/[^/]+\/[^/]+/.test(e)}function Z(e){let n=e.replaceAll("`","").trim(),t=n.match(/^(.*?):(\d+)(?::(\d+))?(?:[-–](\d+)(?::(\d+))?)?$/);if(t!==null){let[,o,s,i,c,d]=t;if(o===void 0||s===void 0)throw Error("Codex file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}let r=n.match(/^(.*?)#L(\d+)(?:C(\d+))?(?:-L(\d+)(?:C(\d+))?)?$/);if(r!==null){let[,o,s,i,c,d]=r;if(o===void 0||s===void 0)throw Error("Codex hash file location is incomplete");return{path:o,line:Number.parseInt(s,10),column:i===void 0?void 0:Number.parseInt(i,10),endLine:c===void 0?void 0:Number.parseInt(c,10),endColumn:d===void 0?void 0:Number.parseInt(d,10)}}return{path:n}}function Ee(e){let{path:n,line:t,column:r,endLine:o,endColumn:s}=Z(e);if(/^[a-z][a-z0-9+.-]*:\/\//i.test(n)||/^www\./i.test(n)||/^(mailto|tel):/i.test(n))return!1;if(t!==void 0||r!==void 0||o!==void 0||s!==void 0)return!0;if(!/(?:^|[\\/])[^\\/]+\.(?!\d+$)[^\\/.]+$/i.test(n))return!1;let i=/[\\/]/.test(n),c=n.split(/[\\/]/).at(-1);if(c===void 0)throw Error("Codex streaming link target has no file name");let d=c.split(".").at(-1);if(d===void 0||d.length===0)return!1;if(!i&&/[a-z]/.test(d)&&/[A-Z]/.test(d.slice(1)))return!1;if(!i){let u=d.toLowerCase();if(u.length>be&&!xe.has(u))return!1}return!0}function Le(e){let{path:n}=Z(e);if(Me(n))return!0;try{return new URL(n).protocol==="file:"}catch{return!1}}function Ie(e){let n=e.match(A);if(n===null)return e;let t=n[2];if(t===void 0)throw Error("Codex streaming link target is missing");return Ee(t)||Le(t)?e.replace(A,"$1"):`${e})`}function $e(e){let n=e.replace(we,"");if(n.length===0||n.includes("`")&&V(n))return{isCodeFenceOpen:!1,markdown:n};if(n.includes("```")&&ye(n))return{isCodeFenceOpen:!0,markdown:Ne(n)};if(n.includes("!["))n=n.replace(ke,(t,r)=>r);if(n.includes("]("))n=Ie(n);return n=H(n,"**"),n=H(n,"*"),{isCodeFenceOpen:!1,markdown:n}}function Re(e){return e?.type==="paragraph"&&"tokens"in e&&Array.isArray(e.tokens)}function _(e){return Re(e)&&e.tokens.length===1&&e.tokens[0]?.type==="image"}function Y(e){for(let n=0;n<e.length;n+=1){let t=e[n];if(t===void 0)throw Error(`Codex Markdown token is missing at index ${n}`);if("tokens"in t&&Array.isArray(t.tokens))Y(t.tokens);if(!_(t))continue;let r=[...t.tokens],o=n+1,s=o;for(;;){while(e[o]?.type==="space")o+=1;let i=e[o];if(!_(i))break;r.push(...i.tokens),o+=1,s=o}if(s===n+1)continue;t.tokens=r,t.text=r.map((i)=>i.raw).join(`
5
- `),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function O(e){return{type:"text",raw:e,text:e}}function Pe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function I(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[O(s)]:[O(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Pe(o):o);I(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))I(n.tokens)}}function Se(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function Fe(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function Ae(e){let n=Fe(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function He({href:e}){let n=X(()=>Ae(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ue:o?de:le;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function _e({children:e,href:n,title:t}){let r=y();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Se(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(He,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function Oe({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=y(),i=b(null),[c,d]=h(null),[u,T]=h(null),[M,k]=h(!1);if(p(()=>{let g=Yo(d,T);return i.current=g,()=>{g.dispose(),i.current=null}},[]),p(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let w=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{k(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),k(!0),window.setTimeout(()=>k(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:M?a(z,{}):a(ie,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...w===null?{children:e}:{dangerouslySetInnerHTML:{__html:w}}})})]})}function je({code:e,language:n}){return y().preview?a("span",{children:e}):a(We,{code:e,language:n})}function We({code:e,language:n}){let t=b(null),[r,o]=h(!1);if(p(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(Oe,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function qe(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ke({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(ae,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(ce,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(se,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(me,{})})]})]})}function ze(e){return y().preview?a(te,{children:e.alt}):a(Ue,{...e})}function Ue({src:e,alt:n,title:t,allowWide:r}){let o=b(null),[s,i]=h();p(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(te,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(qe(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ke,{preview:s,setPreview:i})})]})}function Be({value:e,display:n}){let t=b(null);return D(()=>{if(t.current===null)throw Error("Codex math root is not mounted");oe.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var De=150,v=null;function j(e,n){let t=v;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function Q(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function W(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
6
- `,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,pe)}function Xe(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${W(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return W(e.text);default:return""}}function ee(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${Q(Xe(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ee(r),s=t.get(o)??0;return t.set(o,s+1),ne(r,`${n}-${o}-${s}`)})}function Ge(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(z,{}):null]}):null,m(t,n)]},n)}function Je(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function q(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return U(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ve(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>q(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=Q(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>q(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function K(e,n,t){let r=C(e.href);if(!rn(r))return null;return a(ze,{src:r,alt:R(e.text),title:e.title==null?void 0:C(e.title),allowWide:t},n)}function ne(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return U(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((i)=>i.type!=="space"&&i.type!=="br"),o=r.length>0&&r.every((i)=>i.type==="image"),s=o&&r.length>1;return a("p",{className:`codex-markdown-paragraph${o?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${s?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":s?"true":void 0,"data-wide-markdown-block":o?"true":void 0,"data-wide-markdown-block-kind":o?"image":void 0,children:o?r.map((i,c)=>K(i,`${n}-image-${c}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?j(R(t.text),n):m(t.tokens,n)}case"escape":return j(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=C(t.href);return rn(o)?a(_e,{href:o,title:t.title==null?void 0:C(t.title),children:r},n):a("span",{children:r},n)}case"image":return K(e,n,!1);case"code":{let t=e;return a(je,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return Je(e,n);case"list_item":return Ge(e,n);case"table":return Ve(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Be,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function x(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?R(n.text):n.tokens.map(x).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(x).join("");case"list":return e.items.map(x).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(x).join("")).join("")).join("")}default:return""}}function Ze({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=v;try{return v={cursor:t,runs:r,generation:o},ne(e,n)}finally{v=s}}var Ye=B(function({result:n}){let{text:t,isStreaming:r}=n,o=X(()=>{let l=n.tokens;if(n.source.includes("!["))Y(l);I(l);let g=new Map,P=0;return l.map((E)=>{let L=ee(E),S=g.get(L)??0;g.set(L,S+1);let F=x(E),re={token:E,tokenKey:`root-${L}-${S}`,offset:P,visibleText:F};return P+=F.length,re})},[n]),s=o.map((l)=>l.visibleText).join(""),i=b({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,T=performance.now(),M=r&&d?c.runs.filter((l)=>T-l.firstSeenAtMs<De):[],k=c.generation+(d?0:1),w={text:t,visibleText:s,runs:M.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:k};if(r&&s.length>u)w.runs.push({start:u,end:s.length,firstSeenAtMs:T});return D(()=>{i.current=w}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(Ze,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:w.runs,generation:k},l.tokenKey))})}),Qe=B(function({text:n,isStreaming:t}){let r=b(null),[o,s]=h(()=>on(n,t)),[i,c]=h(null);if(p(()=>{let d=Xo((u)=>{fe(()=>s(u))},c);return r.current=d,()=>{d.dispose(),r.current=null}},[]),p(()=>{let d=r.current;if(d===null)throw Error("Markdown parser is not mounted");let u=t?$e(n).markdown:n;d.update({source:u,text:n,isStreaming:t})},[t,n]),i!==null)throw i;return o===null?a("div",{"data-markdown-pending":!0}):a(Ye,{result:o})});function jo({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=h(e);return p(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(G.Provider,{value:t,children:a(Qe,{text:r?o:e,isStreaming:r})})}
7
- export{jo};
5
+ `),t.raw=e.slice(n,s).map((i)=>i.raw).join(""),e.splice(n+1,s-n-1)}}function O(e){return{type:"text",raw:e,text:e}}function Pe(e){return{type:"paragraph",raw:e.raw,text:e.text,tokens:e.tokens??[e]}}function I(e){for(let n of e){if(n.type==="list")for(let t of n.items){let r=t.tokens[0];if(r?.type==="heading"){let o=r,s=o.raw.trimEnd(),i=s.match(/^#{1,6}\s+/)?.[0];if(i!==void 0)t.tokens[0]={type:"paragraph",raw:o.raw,text:s,tokens:o.tokens===void 0?[O(s)]:[O(i),...o.tokens]}}if(t.loose)t.tokens=t.tokens.map((o)=>o.type==="text"?Pe(o):o);I(t.tokens)}if("tokens"in n&&Array.isArray(n.tokens))I(n.tokens)}}function Se(e,n,t){e.preventDefault(),e.stopPropagation(),t.openLink(n)}function Fe(e){try{let n=new URL(e);return n.protocol!=="http:"&&n.protocol!=="https:"?null:`${n.origin}/favicon.ico`}catch{return null}}function Ae(e){let n=Fe(e);return n===null?[]:[n,`https://www.google.com/s2/favicons?domain=${new URL(e).origin}&sz=32`]}function He({href:e}){let n=X(()=>Ae(e),[e]),[t,r]=h(),o=n.length===0&&!/^[a-z][a-z0-9+.-]*:/i.test(e),s=e.toLowerCase().startsWith("mailto:")?ue:o?de:le;return f("span",{className:"codex-markdown-favicon",children:[t===void 0?a("span",{className:"codex-markdown-favicon-fallback",children:a(s,{"aria-hidden":!0})}):null,n.map((i)=>a("img",{alt:"",className:t===i?"codex-markdown-favicon-image-loaded":void 0,decoding:"async",draggable:!1,referrerPolicy:"no-referrer",src:i,onLoad:()=>r((c)=>c!==void 0&&n.includes(c)?c:i)},i))]})}function _e({children:e,href:n,title:t}){let r=y();if(r.preview)return a("span",{children:e});return a("a",{className:"codex-markdown-link","data-inline-mention-interactive":"",href:n,title:t,onClick:(o)=>Se(o,n,r),children:f("span",{className:"codex-markdown-link-mention","data-layout":"inline-flow","data-interactive":"","data-underline-on-hover":"",children:[a("span",{className:"codex-markdown-link-icon-container","data-markdown-copy":"exclude",children:a(He,{href:n})}),a("span",{className:"codex-markdown-link-label",children:e})]})})}function Oe({code:e,language:n}){let{theme:t,copyLabel:r,copyText:o,onCopyError:s}=y(),i=b(null),[c,d]=h(null),[u,T]=h(null),[M,k]=h(!1);if(p(()=>{let g=Zn(d,T);return i.current=g,()=>{g.dispose(),i.current=null}},[]),p(()=>{let g=i.current;if(g===null)throw Error("Code highlighter is not mounted");g.update(e,n)},[e,n]),u!==null)throw u;let w=c!==null&&c.code===e&&c.language===n?c.html:null,l=async()=>{k(!1);try{await(o?o(e):navigator.clipboard.writeText(e)),k(!0),window.setTimeout(()=>k(!1),2000)}catch(g){s?.(g)}};return f("div",{className:"codex-markdown-code-block","data-markdown-copy":"code-block","data-markdown-copy-text":e,"data-theme":t==="dark"?"dark":"light",children:[f("div",{className:"codex-markdown-code-header","data-markdown-copy":"exclude",children:[a("div",{className:"codex-markdown-code-title",children:n}),a("div",{className:"codex-markdown-code-actions",children:a("button",{type:"button",className:"codex-markdown-code-copy",title:r,onClick:()=>void l(),children:M?a(z,{}):a(ie,{})})})]}),a("div",{className:"codex-markdown-code-container",dir:"ltr",children:a("code",{className:"codex-markdown-code-content hljs",...w===null?{children:e}:{dangerouslySetInnerHTML:{__html:w}}})})]})}function je({code:e,language:n}){return y().preview?a("span",{children:e}):a(We,{code:e,language:n})}function We({code:e,language:n}){let t=b(null),[r,o]=h(!1);if(p(()=>{if(r)return;let s=t.current;if(s===null)throw Error("Codex code block placeholder is not mounted");if(typeof IntersectionObserver>"u"){let c=window.setTimeout(()=>o(!0),0);return()=>window.clearTimeout(c)}let i=new IntersectionObserver((c)=>{if(!c.some((d)=>d.isIntersecting))return;o(!0),i.disconnect()},{rootMargin:"600px 0px"});return i.observe(s),()=>i.disconnect()},[r]),r)return a(Oe,{code:e,language:n});return a("div",{ref:t,className:"codex-markdown-code-block",children:a("pre",{className:"codex-markdown-code-placeholder",children:a("code",{children:e})})})}function qe(e){let n=[...document.body.querySelectorAll('[data-markdown-image-preview-trigger="true"]')],t=n.map((o)=>{let s=o.querySelector("img");if(s===null)throw Error("Codex image preview trigger has no image");return{src:s.currentSrc||s.src,alt:s.alt}}),r=n.indexOf(e);if(r===-1)throw Error("Codex image preview trigger is outside the document");return{images:t,index:r}}function Ke({preview:e,setPreview:n}){let t=e.images[e.index];if(t===void 0)throw Error(`Codex image preview index is out of range: ${e.index}`);return f("div",{className:"codex-markdown-image-preview",children:[a("img",{src:t.src,alt:t.alt}),f("div",{className:"codex-markdown-image-preview-actions",children:[a("button",{type:"button","aria-label":"Previous image",disabled:e.index===0,onClick:()=>n({...e,index:e.index-1}),children:a(ae,{})}),a("a",{href:t.src,download:!0,"aria-label":"Download image",children:a(ce,{})}),a("button",{type:"button","aria-label":"Next image",disabled:e.index===e.images.length-1,onClick:()=>n({...e,index:e.index+1}),children:a(se,{})}),a("button",{type:"button","aria-label":"Close image preview",onClick:()=>n(void 0),children:a(me,{})})]})]})}function ze(e){return y().preview?a(te,{children:e.alt}):a(Ue,{...e})}function Ue({src:e,alt:n,title:t,allowWide:r}){let o=b(null),[s,i]=h();p(()=>{let d=o.current;if(d===null)throw Error("Codex image preview dialog is not mounted");if(s===void 0){if(d.open)d.close();return}if(!d.open)d.showModal()},[s]);let c=n.length===0?"Open image preview":n;return f(te,{children:[a("button",{type:"button",className:`codex-markdown-image-trigger${r?"codex-markdown-image-trigger-wide":""}`,"aria-label":c,"data-markdown-image-preview-trigger":"true",onClick:(d)=>i(qe(d.currentTarget)),children:a("img",{className:`codex-markdown-image${r?"codex-markdown-image-wide":""}`,src:e,alt:n,title:t,loading:"lazy"})}),a("dialog",{ref:o,className:"codex-markdown-image-dialog","aria-label":c,onClose:()=>i(void 0),children:s===void 0?null:a(Ke,{preview:s,setPreview:i})})]})}function Be({value:e,display:n}){let t=b(null);return D(()=>{if(t.current===null)throw Error("Codex math root is not mounted");oe.render(e,t.current,{displayMode:n,throwOnError:!1})},[n,e]),a("span",{ref:t,className:n?"codex-markdown-math-block":"codex-markdown-inline-math"})}var De=150,v=null;function j(e,n){let t=v;if(t===null)return e;let r=t.cursor,o=r+e.length;t.cursor=o;let s=[],i=r;for(let c of t.runs){if(c.end<=r)continue;if(c.start>=o)break;let d=Math.max(r,c.start),u=Math.min(o,c.end);if(i<d)s.push(e.slice(i-r,d-r));s.push(a("span",{className:"codex-markdown-fade",children:e.slice(d-r,u-r)},`${n}:${t.generation}:${c.start}`)),i=u}if(i<o)s.push(e.slice(i-r));return s}function Q(e){let n=5381;for(let t=0;t<e.length;t+=1)n=(n*33+e.charCodeAt(t))%4294967296;return n.toString(36)}function W(e){let n=e.trim();if(n.length===0)return"";let t=n.split(`
6
+ `,1)[0];if(t===void 0)throw Error("Codex Markdown token has no first line");return(t.match(/\S+/)?.[0]??t).slice(0,pe)}function Xe(e){switch(e.type){case"code":return e.raw.trimStart().match(/^(```|~~~)/)?.[1]??"";case"link":return e.href;case"image":{let n=e;return`${n.href}:${W(n.text)}`}case"html":case"space":case"br":case"hr":case"def":return e.raw;case"math":return W(e.text);default:return""}}function ee(e){return`${e.type==="math"?`math-${e.display?"block":"inline"}`:e.type}-${Q(Xe(e))}`}function m(e,n){let t=new Map;return e.map((r)=>{let o=ee(r),s=t.get(o)??0;return t.set(o,s+1),ne(r,`${n}-${o}-${s}`)})}function Ge(e,n){let t=e.task?e.tokens.filter((r)=>r.type!=="checkbox"):e.tokens;return f("li",{className:`codex-markdown-list-item${e.task?"codex-markdown-task-list-item":""}`,children:[e.task?f("div",{className:"codex-markdown-task-checkbox",children:[a("input",{type:"checkbox",className:"codex-markdown-checkbox",checked:e.checked,"data-state":e.checked?"checked":"unchecked",readOnly:!0,disabled:!0}),e.checked?a(z,{}):null]}):null,m(t,n)]},n)}function Je(e,n){let r=`codex-markdown-list ${e.items.some((s)=>s.task)?"codex-markdown-task-list":e.ordered?"codex-markdown-ordered-list":"codex-markdown-unordered-list"}`,o=m(e.items,n);return e.ordered?a("ol",{className:r,start:e.start===""?void 0:e.start,children:o},n):a("ul",{className:r,children:o},n)}function q(e,n,t){let r=t?"th":"td",o=/^\d+$/.test(e.text);return U(r,{key:n,className:`${t?"codex-markdown-table-header":"codex-markdown-table-cell"}${o?" codex-markdown-numeric-table-cell":""}`,align:e.align??void 0},...m(e.tokens,n))}function Ve(e,n){let t=new Map;return a("div",{className:"codex-markdown-table-container","data-markdown-table":!0,tabIndex:-1,children:a("div",{className:"codex-markdown-table-scroller",children:a("div",{className:"codex-markdown-table-wrapper",children:f("table",{className:"codex-markdown-table",children:[a("thead",{children:a("tr",{className:"codex-markdown-table-row",children:e.header.map((r,o)=>q(r,`${n}-header-${o}`,!0))})}),a("tbody",{className:"codex-markdown-table-body",children:e.rows.map((r)=>{let o=Q(r.map((c)=>c.text).join("\x00")),s=t.get(o)??0;t.set(o,s+1);let i=`${n}-row-${o}-${s}`;return a("tr",{className:"codex-markdown-table-row",children:r.map((c,d)=>q(c,`${i}-cell-${d}`,!1))},i)})})]})})})},n)}function K(e,n,t){let r=C(e.href);if(!Ht(r))return null;return a(ze,{src:r,alt:R(e.text),title:e.title==null?void 0:C(e.title),allowWide:t},n)}function ne(e,n){switch(e.type){case"space":case"def":case"internalMessage":return null;case"hr":return a("hr",{className:"codex-markdown-horizontal-rule"},n);case"heading":{let t=e,o={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"}[t.depth];if(o===void 0)throw Error(`Unsupported Codex Markdown heading depth: ${t.depth}`);return U(o,{key:n,className:`codex-markdown-heading codex-markdown-heading-${t.depth}`},...m(t.tokens,n))}case"paragraph":{let t=e,r=t.tokens.filter((i)=>i.type!=="space"&&i.type!=="br"),o=r.length>0&&r.every((i)=>i.type==="image"),s=o&&r.length>1;return a("p",{className:`codex-markdown-paragraph${o?"codex-markdown-media-paragraph codex-markdown-media-wide-block":""}${s?"codex-markdown-media-grid-paragraph":""}`,"data-markdown-image-grid":s?"true":void 0,"data-wide-markdown-block":o?"true":void 0,"data-wide-markdown-block-kind":o?"image":void 0,children:o?r.map((i,c)=>K(i,`${n}-image-${c}`,!0)):m(t.tokens,n)},n)}case"text":{let t=e;return t.tokens===void 0?j(R(t.text),n):m(t.tokens,n)}case"escape":return j(e.text,n);case"strong":return a("strong",{className:"codex-markdown-strong",children:m(e.tokens,n)},n);case"em":return a("em",{children:m(e.tokens,n)},n);case"del":return a("del",{children:m(e.tokens,n)},n);case"codespan":return a("span",{className:"codex-markdown-inline-code",dir:"ltr","data-markdown-copy":"inline-code",children:e.text},n);case"br":return a("br",{},n);case"link":{let t=e,r=m(t.tokens,n),o=C(t.href);return Ht(o)?a(_e,{href:o,title:t.title==null?void 0:C(t.title),children:r},n):a("span",{children:r},n)}case"image":return K(e,n,!1);case"code":{let t=e;return a(je,{code:t.text,language:t.lang},n)}case"blockquote":return a("blockquote",{className:"codex-markdown-blockquote",children:m(e.tokens,n)},n);case"list":return Je(e,n);case"list_item":return Ge(e,n);case"table":return Ve(e,n);case"html":{let t=e;return/^<br\s*\/?>$/i.test(t.raw.trim())?a("br",{},n):t.raw}case"math":{let t=e;return a(Be,{value:t.text,display:t.display},n)}default:throw Error(`Unsupported Codex Markdown token: ${JSON.stringify(e)}`)}}function x(e){switch(e.type){case"text":{let n=e;return n.tokens===void 0?R(n.text):n.tokens.map(x).join("")}case"escape":return e.text;case"paragraph":case"heading":case"strong":case"em":case"del":case"link":case"blockquote":case"list_item":return e.tokens.map(x).join("");case"list":return e.items.map(x).join("");case"table":{let n=e;return[n.header,...n.rows].map((t)=>t.map((r)=>r.tokens.map(x).join("")).join("")).join("")}default:return""}}function Ze({token:e,tokenKey:n,offset:t,runs:r,generation:o}){let s=v;try{return v={cursor:t,runs:r,generation:o},ne(e,n)}finally{v=s}}var Ye=B(function({result:n}){let{text:t,isStreaming:r}=n,o=X(()=>{let l=n.tokens;if(n.source.includes("!["))Y(l);I(l);let g=new Map,P=0;return l.map((E)=>{let L=ee(E),S=g.get(L)??0;g.set(L,S+1);let F=x(E),re={token:E,tokenKey:`root-${L}-${S}`,offset:P,visibleText:F};return P+=F.length,re})},[n]),s=o.map((l)=>l.visibleText).join(""),i=b({text:"",visibleText:"",runs:[],generation:0}),c=i.current,d=t.startsWith(c.text)||s.startsWith(c.visibleText),u=d?c.visibleText.length:0,T=performance.now(),M=r&&d?c.runs.filter((l)=>T-l.firstSeenAtMs<De):[],k=c.generation+(d?0:1),w={text:t,visibleText:s,runs:M.filter((l)=>l.start<s.length).map((l)=>({...l,end:Math.min(l.end,s.length)})),generation:k};if(r&&s.length>u)w.runs.push({start:u,end:s.length,firstSeenAtMs:T});return D(()=>{i.current=w}),a("div",{dir:"auto",className:"codex-markdown-content codex-markdown-root","data-streaming":r?"true":void 0,children:o.map((l)=>a(Ze,{token:l.token,tokenKey:l.tokenKey,offset:l.offset,runs:w.runs,generation:k},l.tokenKey))})}),Qe=B(function({text:n,isStreaming:t}){let r=b(null),[o,s]=h(()=>Ot(n,t)),[i,c]=h(null);if(p(()=>{let d=Yn((u)=>{fe(()=>s(u))},c);return r.current=d,()=>{d.dispose(),r.current=null}},[]),p(()=>{let d=r.current;if(d===null)throw Error("Markdown parser is not mounted");let u=t?$e(n).markdown:n;d.update({source:u,text:n,isStreaming:t})},[t,n]),i!==null)throw i;return o===null?a("div",{"data-markdown-pending":!0}):a(Ye,{result:o})});function Qn({text:e,streaming:n,host:t}){let r=n===!0,[o,s]=h(e);return p(()=>{if(o===e)return;if(!r){s(e);return}let i=requestAnimationFrame(()=>s(e));return()=>cancelAnimationFrame(i)},[o,r,e]),a(G.Provider,{value:t,children:a(Qe,{text:r?o:e,isStreaming:r})})}
7
+ export{Qn};
@@ -1,2 +1,2 @@
1
- var i=new Map,a=new Map,f=new Map;function An(t,r){if(a.has(t))throw Error("An attachment writer is already registered for this session");return a.set(t,r),()=>{if(a.get(t)===r)a.delete(t)}}function T(t,r){let n=i.get(t);if(!n)return;let e=r(n.attachments);i.set(t,{...n,attachments:e}),a.get(t)?.(e)}function Je(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function mr(t){for(;;){let e=i.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=i.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 pr(t,r){if(r===null)i.delete(t);else i.set(t,r)}var s=new Map;function et(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 gr(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=i.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),i.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
2
- export{i,An,T,Je,mr,pr,et,gr};
1
+ var i=new Map,a=new Map,f=new Map;function ir(t,r){if(a.has(t))throw Error("An attachment writer is already registered for this session");return a.set(t,r),()=>{if(a.get(t)===r)a.delete(t)}}function M(t,r){let n=i.get(t);if(!n)return;let e=r(n.attachments);i.set(t,{...n,attachments:e}),a.get(t)?.(e)}function vt(t,r){f.set(t,r),r.finally(()=>{if(f.get(t)===r)f.delete(t)})}async function wr(t){for(;;){let e=i.get(t)?.attachments.flatMap((c)=>{let m=f.get(c.id);return m?[m]:[]})??[];if(!e.length)break;await Promise.all(e)}let r=i.get(t);if(!r)return null;let n=await Promise.all(r.attachments.map(async(e)=>{if(!e.url.startsWith("blob:"))return e;let c=await fetch(e.url);if(!c.ok)throw Error("Cannot read draft image");let m=await c.blob(),l=await new Promise((g,p)=>{let o=new FileReader;o.onload=()=>g(o.result),o.onerror=()=>p(o.error),o.readAsDataURL(m)});return{...e,url:l}}));return{text:r.text,mentions:[...r.mentions],attachments:n,modelId:r.modelId}}function kr(t,r){if(r===null)i.delete(t);else i.set(t,r)}var s=new Map;function xt(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 Cr(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=i.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),i.set(t,{text:r,attachments:[],mentions:[],modelId:e?.modelId??null})}
2
+ export{i,ir,M,vt,wr,kr,xt,Cr};
@@ -1,2 +1,2 @@
1
- import{vn}from"./chunk-hf65xscb.js";import{n,b}from"./chunk-76tkqx9n.js";import{I,y}from"./chunk-9c41y5hw.js";import{createLucideIcon as k,HandIcon as w,ShieldAlertIcon as S,ShieldCheckIcon as c}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var O=k("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":w,"workspace-write":c,agent:O,"agent-full-access":S},A={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function je({sessionId:u,options:g,disabled:m,onConfigChange:r}){let{host:l,client:f}=n(),{t:a}=l,o=y(g,"mode");if(!o)return null;let s=o.currentValue,p=I(o).map((e)=>{let i=A[e.value];return i?{...e,name:a(`permissionModes.${i}.name`),description:a(`permissionModes.${i}.description`)}:e}),h=p.find((e)=>e.value===s),M=d[s]??c,v=(e)=>{if(e===s)return;b(l,r?r(o.configId,e):f.setConfig(u,o.configId,e))};return t(vn,{value:s,warning:s==="agent-full-access",currentName:h?.name??s,icon:t(M,{className:"size-3.5 shrink-0"}),header:a("permissionModes.heading"),disabled:m,label:a("composer.switchPermissionMode"),onValueChange:v,options:p.map((e)=>{let i=d[e.value]??c,C=e.value==="agent-full-access";return{value:e.value,label:t("span",{"data-permission-warning":C?"":void 0,children:e.name}),description:e.description?t("span",{className:"whitespace-normal",children:e.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}
2
- export{je};
1
+ import{Bo}from"./chunk-602snzpa.js";import{n,C}from"./chunk-r3tfwy7k.js";import{N,y}from"./chunk-rwpr6j34.js";import{createLucideIcon as k,HandIcon as w,ShieldAlertIcon as S,ShieldCheckIcon as c}from"lucide-react";import{jsx as t}from"react/jsx-runtime";var O=k("ApprovalShield",[["path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11",key:"shield"}],["path",{d:"m8 8 3 3-3 3M13 15h3",key:"terminal"}]]),d={"read-only":w,"workspace-write":c,agent:O,"agent-full-access":S},b={"read-only":"readOnly","workspace-write":"workspaceAccess",agent:"agent","agent-full-access":"fullAccess"};function ut({sessionId:u,options:g,disabled:m,onConfigChange:r}){let{host:l,client:f}=n(),{t:a}=l,o=y(g,"mode");if(!o)return null;let s=o.currentValue,p=N(o).map((e)=>{let i=b[e.value];return i?{...e,name:a(`permissionModes.${i}.name`),description:a(`permissionModes.${i}.description`)}:e}),h=p.find((e)=>e.value===s),I=d[s]??c,M=(e)=>{if(e===s)return;C(l,r?r(o.configId,e):f.setConfig(u,o.configId,e))};return t(Bo,{value:s,warning:s==="agent-full-access",currentName:h?.name??s,icon:t(I,{className:"size-3.5 shrink-0"}),header:a("permissionModes.heading"),disabled:m,label:a("composer.switchPermissionMode"),onValueChange:M,options:p.map((e)=>{let i=d[e.value]??c,v=e.value==="agent-full-access";return{value:e.value,label:t("span",{"data-permission-warning":v?"":void 0,children:e.name}),description:e.description?t("span",{className:"whitespace-normal",children:e.description}):void 0,icon:t(i,{className:"size-3.5 shrink-0"})}})})}
2
+ export{ut};
@@ -1,3 +1,3 @@
1
- var wi=["full","compact","codexUI"];function Do(t){return t==="compact"||t==="codexUI"}var Fr=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function A(t){let o=Fr.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
2
- `)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function ki(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
3
- export{wi,Do,Fr,A,ki};
1
+ var ui=["full","compact","codexUI"];function lo(t){return t==="compact"||t==="codexUI"}var Hr=["read","edit","delete","move","search","execute","think","fetch","switch_mode","other"];function c(t){let o=t.split(/[/\\]/).at(-1)??"";return o===""?t:o}function A(t){let o=Hr.includes(t.kind)?t.kind:"other",i=t.rawInput,e=(a)=>{let r=i[a];return typeof r==="string"&&r.length>0?r:void 0},n=t.locations?.[0]?.path??e("file_path")??e("notebook_path"),s=n!==void 0?c(n):e("command")?.split(`
2
+ `)[0]??e("pattern")??e("url")??e("query")??e("description");return{category:o,...s===void 0?{}:{target:s},...n===void 0?{}:{filePath:n}}}function mi(t,o){if(o)return"dot-permission";switch(t){case"completed":return"dot-success";case"failed":return"dot-error";case"in_progress":return"dot-in-progress";case"pending":return"dot-pending";case"interrupted":return"dot-interrupted";default:return console.warn("[acp] unknown tool call status:",t),"dot-pending"}}
3
+ export{ui,lo,Hr,A,mi};
@@ -1,2 +1,2 @@
1
- import{uo}from"./chunk-an03g9e8.js";import{d,lo,u,m}from"./chunk-1txn4b0v.js";import{cn as M}from"cn";import{XIcon as L}from"lucide-react";import{useCallback as O,useEffect as z,useMemo as j,useRef as H,useState as S}from"react";import{jsx as i,jsxs as A}from"react/jsx-runtime";function no({open:l,onOpenChange:P,url:h,filename:x,scale:v,onScaleChange:p,containerRef:T,containerClassName:I,dialogContentClassName:R,imageClassName:W}){let g=O((e)=>Math.min(4,Math.max(0.25,e)),[]),[Z,C]=S(1),o=g(v??Z),k=H(null),s=T??k,D=H(null),[f,N]=S({width:0,height:0}),[y,E]=S({width:0,height:0}),b=O((e)=>{let n=g(e);if(typeof p==="function"){p(n);return}C(n)},[p,g]);z(()=>{if(!l)return;if(!h)return;if(typeof v==="number")return;C(1)},[l,h,v]),z(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{N({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let X=O(()=>{b(1)},[b]),r=j(()=>{let{width:e,height:n}=y,{width:t,height:a}=f;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),w=e*c,_=n*c;return{width:w*o,height:_*o}},[o,y,f]);if(!h)return null;return i(d,{open:l,onOpenChange:P,children:A(u,{className:M("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",R),showCloseButton:!1,children:[i(m,{className:"sr-only",children:x||"Image preview"}),i(lo,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(L,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=D.current,w=a&&c?uo({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(b(t),a&&w)requestAnimationFrame(()=>{a.scrollTo(w)})},className:M("h-full w-full scrollbar-thin overflow-auto",I),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(f.width,r.width),height:Math.max(f.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:x||"image preview",className:M("block object-contain select-none",W),decoding:"async",draggable:!1,ref:D,onDoubleClick:X,onLoad:(e)=>{let n=e.currentTarget;E({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))N({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
2
- export{no};
1
+ import{Ho}from"./chunk-t3ew92b3.js";import{d,rr,u,m}from"./chunk-k6tqy9x5.js";import{cn as M}from"cn";import{XIcon as L}from"lucide-react";import{useCallback as O,useEffect as z,useMemo as j,useRef as H,useState as S}from"react";import{jsx as i,jsxs as A}from"react/jsx-runtime";function Do({open:l,onOpenChange:P,url:h,filename:x,scale:v,onScaleChange:p,containerRef:T,containerClassName:I,dialogContentClassName:R,imageClassName:W}){let g=O((e)=>Math.min(4,Math.max(0.25,e)),[]),[Z,C]=S(1),o=g(v??Z),k=H(null),s=T??k,D=H(null),[f,N]=S({width:0,height:0}),[y,E]=S({width:0,height:0}),b=O((e)=>{let n=g(e);if(typeof p==="function"){p(n);return}C(n)},[p,g]);z(()=>{if(!l)return;if(!h)return;if(typeof v==="number")return;C(1)},[l,h,v]),z(()=>{if(!l)return;let e=s.current;if(!e)return;let n=()=>{N({width:e.clientWidth,height:e.clientHeight})};n();let t=new ResizeObserver(n);return t.observe(e),()=>{t.disconnect()}},[s,l]);let X=O(()=>{b(1)},[b]),r=j(()=>{let{width:e,height:n}=y,{width:t,height:a}=f;if(e===0||n===0)return{width:0,height:0};if(t===0||a===0)return{width:0,height:0};let c=Math.min(t/e,a/n,1),w=e*c,_=n*c;return{width:w*o,height:_*o}},[o,y,f]);if(!h)return null;return i(d,{open:l,onOpenChange:P,children:A(u,{className:M("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",R),showCloseButton:!1,children:[i(m,{className:"sr-only",children:x||"Image preview"}),i(rr,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:i(L,{className:"size-5"})}),i("div",{ref:s,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=e.deltaY>0?o-0.2:o+0.2,t=g(Number.parseFloat(n.toFixed(2)));if(t===o)return;let a=s.current,c=D.current,w=a&&c?Ho({container:a,target:c,clientX:e.clientX,clientY:e.clientY,currentScale:o,nextScale:t}):null;if(b(t),a&&w)requestAnimationFrame(()=>{a.scrollTo(w)})},className:M("h-full w-full scrollbar-thin overflow-auto",I),children:i("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(f.width,r.width),height:Math.max(f.height,r.height)},children:i("div",{className:"shrink-0",children:i("img",{alt:x||"image preview",className:M("block object-contain select-none",W),decoding:"async",draggable:!1,ref:D,onDoubleClick:X,onLoad:(e)=>{let n=e.currentTarget;E({width:n.naturalWidth,height:n.naturalHeight});let t=s.current;if(t&&(t.clientWidth||t.clientHeight))N({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:r.width||void 0,height:r.height||void 0,maxWidth:r.width?"none":"90vw",maxHeight:r.height?"none":"90vh"},src:h})})})})]})})}
2
+ export{Do};
@@ -1 +1 @@
1
- import{Select as r}from"@base-ui/react/select";import{cn as o}from"cn";import{CheckIcon as u,ChevronDownIcon as c,ChevronUpIcon as f}from"lucide-react";import{jsx as e,jsxs as n}from"react/jsx-runtime";var qt=r.Root;function ui({className:t,...i}){return e(r.Group,{"data-slot":"select-group",className:o("scroll-my-1 p-1",t),...i})}function Vt({className:t,...i}){return e(r.Value,{"data-slot":"select-value",className:o("flex flex-1 text-start",t),...i})}function Gt({className:t,size:i="default",children:a,...s}){return n(r.Trigger,{"data-slot":"select-trigger","data-size":i,className:o("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...s,children:[a,e(r.Icon,{render:e(c,{className:"text-muted-foreground pointer-events-none size-4"})})]})}function ao({className:t,children:i,side:a="bottom",sideOffset:s=4,align:d="center",alignOffset:p=0,alignItemWithTrigger:l=!0,...m}){return e(r.Portal,{children:e(r.Positioner,{side:a,sideOffset:s,align:d,alignOffset:p,alignItemWithTrigger:l,className:"isolate z-50",children:n(r.Popup,{"data-slot":"select-content","data-align-trigger":l,className:o("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none",t),...m,children:[e(Mr,{}),e(r.List,{children:i}),e(Er,{})]})})})}function mi({className:t,...i}){return e(r.GroupLabel,{"data-slot":"select-label",className:o("text-muted-foreground px-2 py-1.5 text-xs",t),...i})}function K({className:t,children:i,...a}){return n(r.Item,{"data-slot":"select-item",className:o("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[e(r.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:i}),e(r.ItemIndicator,{render:e("span",{className:"pointer-events-none absolute end-2 flex size-4 items-center justify-center"}),children:e(u,{className:"pointer-events-none"})})]})}function pi({className:t,...i}){return e(r.Separator,{"data-slot":"select-separator",className:o("bg-border pointer-events-none -mx-1 my-1 h-px",t),...i})}function Mr({className:t,...i}){return e(r.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:o("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...i,children:e(f,{})})}function Er({className:t,...i}){return e(r.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:o("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...i,children:e(c,{})})}export{qt,ui,Vt,Gt,ao,mi,K,pi,Mr,Er};
1
+ import{Select as r}from"@base-ui/react/select";import{cn as o}from"cn";import{CheckIcon as u,ChevronDownIcon as c,ChevronUpIcon as f}from"lucide-react";import{jsx as e,jsxs as n}from"react/jsx-runtime";var Nt=r.Root;function jr({className:t,...i}){return e(r.Group,{"data-slot":"select-group",className:o("scroll-my-1 p-1",t),...i})}function Mt({className:t,...i}){return e(r.Value,{"data-slot":"select-value",className:o("flex flex-1 text-start",t),...i})}function Rt({className:t,size:i="default",children:a,...s}){return n(r.Trigger,{"data-slot":"select-trigger","data-size":i,className:o("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 ps-2.5 pe-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...s,children:[a,e(r.Icon,{render:e(c,{className:"text-muted-foreground pointer-events-none size-4"})})]})}function hn({className:t,children:i,side:a="bottom",sideOffset:s=4,align:d="center",alignOffset:p=0,alignItemWithTrigger:l=!0,...m}){return e(r.Portal,{children:e(r.Positioner,{side:a,sideOffset:s,align:d,alignOffset:p,alignItemWithTrigger:l,className:"isolate z-50",children:n(r.Popup,{"data-slot":"select-content","data-align-trigger":l,className:o("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none",t),...m,children:[e(Tr,{}),e(r.List,{children:i}),e(Ir,{})]})})})}function Wr({className:t,...i}){return e(r.GroupLabel,{"data-slot":"select-label",className:o("text-muted-foreground px-2 py-1.5 text-xs",t),...i})}function j({className:t,children:i,...a}){return n(r.Item,{"data-slot":"select-item",className:o("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...a,children:[e(r.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:i}),e(r.ItemIndicator,{render:e("span",{className:"pointer-events-none absolute end-2 flex size-4 items-center justify-center"}),children:e(u,{className:"pointer-events-none"})})]})}function Kr({className:t,...i}){return e(r.Separator,{"data-slot":"select-separator",className:o("bg-border pointer-events-none -mx-1 my-1 h-px",t),...i})}function Tr({className:t,...i}){return e(r.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:o("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...i,children:e(f,{})})}function Ir({className:t,...i}){return e(r.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:o("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...i,children:e(c,{})})}export{Nt,jr,Mt,Rt,hn,Wr,j,Kr,Tr,Ir};
@@ -1 +1 @@
1
- import{cva as o}from"class-variance-authority";import{cn as n}from"cn";import{jsx as a}from"react/jsx-runtime";function oe({className:e,...t}){return a("div",{"data-slot":"empty",className:n("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance",e),...t})}function re({className:e,...t}){return a("div",{"data-slot":"empty-header",className:n("flex max-w-sm flex-col items-center gap-2",e),...t})}var i=o("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function Zr({className:e,variant:t="default",...r}){return a("div",{"data-slot":"empty-icon","data-variant":t,className:n(i({variant:t,className:e})),...r})}function ie({className:e,...t}){return a("div",{"data-slot":"empty-title",className:n("font-heading text-lg font-medium tracking-tight",e),...t})}function ae({className:e,...t}){return a("div",{"data-slot":"empty-description",className:n("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function Jr({className:e,...t}){return a("div",{"data-slot":"empty-content",className:n("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",e),...t})}export{oe,re,Zr,ie,ae,Jr};
1
+ import{cva as o}from"class-variance-authority";import{cn as n}from"cn";import{jsx as a}from"react/jsx-runtime";function le({className:e,...t}){return a("div",{"data-slot":"empty",className:n("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance",e),...t})}function ce({className:e,...t}){return a("div",{"data-slot":"empty-header",className:n("flex max-w-sm flex-col items-center gap-2",e),...t})}var i=o("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function pi({className:e,variant:t="default",...r}){return a("div",{"data-slot":"empty-icon","data-variant":t,className:n(i({variant:t,className:e})),...r})}function de({className:e,...t}){return a("div",{"data-slot":"empty-title",className:n("font-heading text-lg font-medium tracking-tight",e),...t})}function ue({className:e,...t}){return a("div",{"data-slot":"empty-description",className:n("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...t})}function gi({className:e,...t}){return a("div",{"data-slot":"empty-content",className:n("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",e),...t})}export{le,ce,pi,de,ue,gi};
@@ -1 +1 @@
1
- import{cn as e}from"cn";import{jsx as o}from"react/jsx-runtime";function Un({className:t,...n}){return o("kbd",{"data-slot":"kbd",className:e("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",t),...n})}function ei({className:t,...n}){return o("kbd",{"data-slot":"kbd-group",className:e("inline-flex items-center gap-1",t),...n})}export{Un,ei};
1
+ import{cn as e}from"cn";import{jsx as o}from"react/jsx-runtime";function Go({className:t,...n}){return o("kbd",{"data-slot":"kbd",className:e("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",t),...n})}function xi({className:t,...n}){return o("kbd",{"data-slot":"kbd-group",className:e("inline-flex items-center gap-1",t),...n})}export{Go,xi};
@@ -1,2 +1,2 @@
1
- function Bo(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function zo(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
2
- export{Bo,zo};
1
+ function Co(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReply"in o))return null;let n=o.questionReply;if(!n||typeof n!=="object"||!("question"in n)||!("answer"in n))return null;return typeof n.question==="string"&&typeof n.answer==="string"?{question:n.question,answer:n.answer}:null}function To(t){if(!t||typeof t!=="object"||!("codex"in t))return null;let o=t.codex;if(!o||typeof o!=="object"||!("questionReplyParts"in o))return null;let n=o.questionReplyParts;if(!Array.isArray(n)||n.length===0)return null;let i=n;if(!i.every((e)=>!!e&&typeof e==="object"&&("text"in e)&&typeof e.text==="string"&&(!("question"in e)||e.question===void 0||typeof e.question==="string")))return null;return i.map((e)=>({text:e.text,...e.question===void 0?{}:{question:e.question}}))}
2
+ export{Co,To};
@@ -1,5 +1,5 @@
1
- import{Zt}from"./chunk-yg42bpjr.js";import{t}from"./chunk-6d38ff76.js";import{isDiffEntry as p}from"@alwith/api";import{jsx as f,jsxs as g,Fragment as h}from"react/jsx-runtime";function Dr(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
- `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function _r(o){let s=new Map,e=null;for(let n of o.split(`
3
- `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Hr(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?_r(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let c=u(i,r),d=n.patch?Dr(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=c.additions,l.deletions+=c.deletions,l.patch=l.patch?`${l.patch}
4
- ${d}`:d;else s.set(r,{path:r,patch:d,...c})}}return[...s.values()]}function Io({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return f(Zt,{files:Hr(o),onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[f(n,{path:i.path,className:"codex-edited-file-icon"}),f("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
- export{Dr,_r,Hr,Io};
1
+ import{zt}from"./chunk-ehrfhhfw.js";import{t}from"./chunk-hf0nha31.js";import{isDiffEntry as p}from"@nyssance/codex-acp-v2/client";import{jsx as f,jsxs as g,Fragment as h}from"react/jsx-runtime";function Ar(o,s){let e=o.split(/^(?=diff --git )/m).filter((i)=>i.length>0);if(e.length<=1)return o;return e.find((i)=>{let a=i.split(`
2
+ `,1)[0]??"";return a.endsWith(` b/${s}`)||a.endsWith(` ${s}`)||a.includes(`/${s} `)})??o}function Lr(o){let s=new Map,e=null;for(let n of o.split(`
3
+ `)){if(n.startsWith("diff --git ")){e=null;continue}if(n.startsWith("+++ ")){let i=n.slice(4).trim(),a=i==="/dev/null"?null:i.replace(/^b\//,"");if(a!==null)e={additions:0,deletions:0},s.set(a,e);continue}if(n.startsWith("--- ")){let i=n.slice(4).trim();if(i!=="/dev/null"&&e===null)e={additions:0,deletions:0},s.set(i.replace(/^a\//,""),e);continue}if(e===null)continue;if(n.startsWith("+"))e.additions+=1;else if(n.startsWith("-"))e.deletions+=1}return s}function u(o,s){let e=s.replaceAll("\\","/");for(let[n,i]of o)if(e===n||e.endsWith(`/${n}`))return i;return{additions:0,deletions:0}}function Dr(o){let s=new Map;for(let e of o)for(let n of e.content){if(!p(n))continue;let i=n.patch?Lr(n.patch.text):new Map;for(let a of n.changes){let r=typeof a.path==="string"?a.path:null;if(r===null)continue;let c=u(i,r),d=n.patch?Ar(n.patch.text,r):"",l=s.get(r);if(l)l.additions+=c.additions,l.deletions+=c.deletions,l.patch=l.patch?`${l.patch}
4
+ ${d}`:d;else s.set(r,{path:r,patch:d,...c})}}return[...s.values()]}function oo({items:o}){let s=t(),{openDiff:e,FileIcon:n}=s;return f(zt,{files:Dr(o),onOpen:e===void 0?void 0:(i)=>e({path:i.path,patch:i.patch}),renderPath:n===void 0?void 0:(i)=>g(h,{children:[f(n,{path:i.path,className:"codex-edited-file-icon"}),f("span",{className:"codex-edited-file-name",children:i.path})]})})}
5
+ export{Ar,Lr,Dr,oo};
@@ -1 +1 @@
1
- import{Ao,ze}from"../chunk-m4mfw5s4.js";import"../chunk-ttk21631.js";import"../chunk-acrrwrzy.js";import"../chunk-y438yezf.js";import"../chunk-z4zm74ge.js";import"../chunk-rkqe8p8n.js";import"../chunk-y6r6tzfh.js";export{ze as CodexActivityGroup,Ao as CodexWorkSection};
1
+ import{ao,Se}from"../chunk-eftxa7tx.js";import"../chunk-8jhsjq8f.js";import"../chunk-ckft9abb.js";import"../chunk-xcfde6w5.js";import"../chunk-hz1pgnqp.js";import"../chunk-9mknagqd.js";import"../chunk-ryz4c13z.js";export{Se as CodexActivityGroup,ao as CodexWorkSection};
@@ -1 +1 @@
1
- import{yi,Kt,Qt}from"../chunk-s44rx1sz.js";import"../chunk-zc2hdmk1.js";import"../chunk-yg42bpjr.js";import"../chunk-gsq8mzr7.js";import"../chunk-q98941j2.js";import"../chunk-m4mfw5s4.js";import"../chunk-ttk21631.js";import"../chunk-acrrwrzy.js";import"../chunk-y438yezf.js";import"../chunk-z4zm74ge.js";import"../chunk-rkqe8p8n.js";import"../chunk-y6r6tzfh.js";export{yi as CodexAssistantMessage,Qt as CodexAssistantTurn,Kt as CodexMessageActions};
1
+ import{di,Ft,Bt}from"../chunk-7az2575k.js";import"../chunk-60tc6jmp.js";import"../chunk-ehrfhhfw.js";import"../chunk-eftxa7tx.js";import"../chunk-8jhsjq8f.js";import"../chunk-ckft9abb.js";import"../chunk-xcfde6w5.js";import"../chunk-hz1pgnqp.js";import"../chunk-9mknagqd.js";import"../chunk-0geh5prw.js";import"../chunk-h6354tmm.js";import"../chunk-ryz4c13z.js";export{di as CodexAssistantMessage,Bt as CodexAssistantTurn,Ft as CodexMessageActions};
@@ -1 +1 @@
1
- import{f,ln,ir,cn,ar,dn,sr}from"../chunk-xf14bg2v.js";import"../chunk-nx91ewps.js";import"../chunk-ehh31hzz.js";import"../chunk-xjtqdp82.js";import"../chunk-cg97byvk.js";export{sr as AsyncQuestionCard,ln as asyncQuestionId,f as asyncQuestions,ir as initialQuestionDraft,cn as questionAnswer,dn as questionReplies,ar as questionReplyEnvelope};
1
+ import{g,Kt,Io,Qt,Po,Xt,So}from"../chunk-qsvd61ce.js";import"../chunk-kmt7fjdq.js";import"../chunk-ek06eyp4.js";import"../chunk-ncekagm6.js";import"../chunk-cg97byvk.js";export{So as AsyncQuestionCard,Kt as asyncQuestionId,g as asyncQuestions,Io as initialQuestionDraft,Qt as questionAnswer,Xt as questionReplies,Po as questionReplyEnvelope};
@@ -1 +1 @@
1
- import{N}from"../chunk-acrrwrzy.js";export{N as useCodexDisclosureState};
1
+ import{I}from"../chunk-ckft9abb.js";export{I as useCodexDisclosureState};
@@ -1 +1 @@
1
- import{Or,Po,Zt}from"../chunk-yg42bpjr.js";import"../chunk-y6r6tzfh.js";export{Po as CodexEditedFilesCard,Zt as EditedFilesCard,Or as fileChanges};
1
+ import{_r,ro,zt}from"../chunk-ehrfhhfw.js";import"../chunk-ryz4c13z.js";export{ro as CodexEditedFilesCard,zt as EditedFilesCard,_r as fileChanges};
@@ -1 +1 @@
1
- import{be,Lo}from"../chunk-ttk21631.js";import"../chunk-acrrwrzy.js";import"../chunk-y6r6tzfh.js";export{Lo as ImageViewActivity,be as isImageView};
1
+ import{se,so}from"../chunk-8jhsjq8f.js";import"../chunk-ckft9abb.js";import"../chunk-ryz4c13z.js";export{so as ImageViewActivity,se as isImageView};
@@ -1 +1 @@
1
- import{jo}from"../chunk-ttdxc6mg.js";import"../chunk-rd94eyan.js";import"../chunk-0grd0g0x.js";import"../chunk-rgkhm4s4.js";export{jo as CodexMarkdownRenderer};
1
+ import{Qn}from"../chunk-vmw815b1.js";import"../chunk-fvgebjsz.js";import"../chunk-jrmdbkae.js";import"../chunk-t177dfb8.js";export{Qn as CodexMarkdownRenderer};
@@ -1 +1 @@
1
- import{Vo,Ci,Go,Wo,Ti,kr,zr,Cr,Ii,Ur,$r,Pi,Si}from"../chunk-gtddnhdy.js";export{Ci as armTimelineUserMessageNavigationAudio,zr as automaticNavigationMidiNote,Pi as getNavigationAudioContextState,Si as getNavigationInstrumentReady,Go as installTimelineUserMessageNavigationAudioUnlock,Ur as itemPianoKeyIndex,kr as navigationMidiNote,$r as navigationPianoKeyIndexes,Ii as pianoKeyFrequency,Cr as pianoKeyMidiNote,Ti as playTimelineUserMessageNavigationNote,Wo as playTimelineUserMessageNavigationSequence,Vo as preloadTimelineUserMessageNavigationInstrument};
1
+ import{jn,ii,Wn,Kn,ai,hr,Mr,vr,si,Rr,Er,li,ci}from"../chunk-b826jevt.js";export{ii as armTimelineUserMessageNavigationAudio,Mr as automaticNavigationMidiNote,li as getNavigationAudioContextState,ci as getNavigationInstrumentReady,Wn as installTimelineUserMessageNavigationAudioUnlock,Rr as itemPianoKeyIndex,hr as navigationMidiNote,Er as navigationPianoKeyIndexes,si as pianoKeyFrequency,vr as pianoKeyMidiNote,ai as playTimelineUserMessageNavigationNote,Kn as playTimelineUserMessageNavigationSequence,jn as preloadTimelineUserMessageNavigationInstrument};
@@ -1 +1 @@
1
- import{Qo}from"../chunk-17wjmyj7.js";export{Qo as NavigationPreview};
1
+ import{Gn}from"../chunk-d9xm18sy.js";export{Gn as NavigationPreview};
@@ -1 +1 @@
1
- import{Ko}from"../chunk-0mf7yh69.js";import"../chunk-17wjmyj7.js";export{Ko as TimelineUserMessageNavigationRail};
1
+ import{Vn}from"../chunk-4y87qc0q.js";import"../chunk-d9xm18sy.js";export{Vn as TimelineUserMessageNavigationRail};
@@ -1 +1 @@
1
- import{Dn,Se}from"../chunk-6j4g51ff.js";export{Se as PatchView,Dn as patchStats};
1
+ import{An,Pe}from"../chunk-2mj3yh2z.js";export{Pe as PatchView,An as patchStats};
@@ -1 +1 @@
1
- import{U}from"../chunk-rkqe8p8n.js";export{U as CodexPlan};
1
+ import{F}from"../chunk-9mknagqd.js";export{F as CodexPlan};
@@ -1 +1 @@
1
- import{xi,ho,ye,jt,vo,xo,yo}from"../chunk-hhw1pjz6.js";export{xi as CODEX_UNKNOWN_TURN_HEIGHT,ye as calculateCodexThreadVirtualRange,xo as calculateCodexTurnCenterDistanceFromBottom,yo as calculateCodexTurnTargetDistanceFromBottom,ho as createCodexThreadVirtualLayout,vo as preserveCodexThreadDistanceFromBottom,jt as preserveCodexThreadRenderedWindow};
1
+ import{oi,_n,ae,Dt,Hn,On,Fn}from"../chunk-nc724yjk.js";export{oi as CODEX_UNKNOWN_TURN_HEIGHT,ae as calculateCodexThreadVirtualRange,On as calculateCodexTurnCenterDistanceFromBottom,Fn as calculateCodexTurnTargetDistanceFromBottom,_n as createCodexThreadVirtualLayout,Hn as preserveCodexThreadDistanceFromBottom,Dt as preserveCodexThreadRenderedWindow};
@@ -1 +1 @@
1
- import{Fo}from"../chunk-q4y1q1na.js";export{Fo as selectTurnActivity};
1
+ import{po}from"../chunk-sppn6v56.js";export{po as selectTurnActivity};
@@ -1 +1 @@
1
- import{Jt,No}from"../chunk-gsq8mzr7.js";import"../chunk-q98941j2.js";export{No as CodexUserMessage,Jt as CopyAction};
1
+ import{Gt,fo}from"../chunk-0geh5prw.js";import"../chunk-h6354tmm.js";export{fo as CodexUserMessage,Gt as CopyAction};
@@ -1 +1 @@
1
- import{fo}from"../chunk-0d8k5bmd.js";import"../chunk-hhw1pjz6.js";export{fo as VirtualizedTurnList};
1
+ import{Dn}from"../chunk-d1ckpc56.js";import"../chunk-nc724yjk.js";export{Dn as VirtualizedTurnList};
@@ -1 +1 @@
1
- import{Tt,Gr}from"../chunk-xp0nfvxg.js";import"../chunk-m5jhw1e6.js";export{Gr as filterFiles,Tt as filterSlashCommands};
1
+ import{Yt,fi}from"../chunk-4xt6bccx.js";import"../chunk-gzff19t3.js";export{fi as filterFiles,Yt as filterSlashCommands};
@@ -1 +1 @@
1
- import{un}from"../chunk-v5wwv2t9.js";import"../chunk-2s4y2v50.js";import"../chunk-xp0nfvxg.js";import"../chunk-tpx841s3.js";import"../chunk-qbdqh38y.js";import"../chunk-m5jhw1e6.js";import"../chunk-cg97byvk.js";export{un as CompletionMenu};
1
+ import{Ro}from"../chunk-0nda3snj.js";import"../chunk-4xt6bccx.js";import"../chunk-294gms5s.js";import"../chunk-gzff19t3.js";import"../chunk-58t2kkh8.js";import"../chunk-eq1azzrt.js";import"../chunk-cg97byvk.js";export{Ro as CompletionMenu};
@@ -1 +1 @@
1
- import{mn}from"../chunk-2s4y2v50.js";export{mn as detectTrigger};
1
+ import{Eo}from"../chunk-294gms5s.js";export{Eo as detectTrigger};
@@ -1 +1 @@
1
- import{Pt}from"../chunk-rdtj6bad.js";export{Pt as EffortSlider};
1
+ import{tn}from"../chunk-e11qjnb4.js";export{tn as EffortSlider};
@@ -1 +1 @@
1
- import{p}from"../chunk-cywx4qmv.js";import"../chunk-5s2wpbdt.js";export{p as MenuRadioSelect};
1
+ import{h}from"../chunk-m8dbspj3.js";import"../chunk-3dhdh7jh.js";export{h as MenuRadioSelect};
@@ -1 +1 @@
1
- import{kn}from"../chunk-4pbh3fph.js";import"../chunk-rdtj6bad.js";import"../chunk-cywx4qmv.js";import"../chunk-z75zbdq8.js";import"../chunk-5wyxvpgt.js";import"../chunk-5s2wpbdt.js";import"../chunk-cg97byvk.js";export{kn as ModelSelect};
1
+ import{zo}from"../chunk-5640ga6m.js";import"../chunk-e11qjnb4.js";import"../chunk-m8dbspj3.js";import"../chunk-3dhdh7jh.js";import"../chunk-bkyjy7tp.js";import"../chunk-tc85dd04.js";import"../chunk-cg97byvk.js";export{zo as ModelSelect};
@@ -1 +1 @@
1
- import{vn}from"../chunk-hf65xscb.js";import"../chunk-cywx4qmv.js";import"../chunk-5s2wpbdt.js";import"../chunk-cg97byvk.js";export{vn as PermissionModeSelect};
1
+ import{Bo}from"../chunk-602snzpa.js";import"../chunk-m8dbspj3.js";import"../chunk-3dhdh7jh.js";import"../chunk-cg97byvk.js";export{Bo as PermissionModeSelect};
@@ -1 +1 @@
1
- import{fn,hn}from"../chunk-2ysnmwx1.js";import"../chunk-tpx841s3.js";import"../chunk-sqh158m4.js";import"../chunk-0k654tyt.js";import"../chunk-1txn4b0v.js";import"../chunk-an03g9e8.js";import"../chunk-cg97byvk.js";export{fn as PromptInputAttachment,hn as PromptInputAttachments};
1
+ import{No,Mo}from"../chunk-d7h2n049.js";import"../chunk-ya03j791.js";import"../chunk-t3ew92b3.js";import"../chunk-71zed0rt.js";import"../chunk-58t2kkh8.js";import"../chunk-k6tqy9x5.js";import"../chunk-cg97byvk.js";export{No as PromptInputAttachment,Mo as PromptInputAttachments};
@@ -1 +1 @@
1
- import{Tr,pn,gn,Ir,dr,We}from"../chunk-0hpww4x3.js";export{gn as clipboardHasStringItem,dr as countControlCharsBeforeIndex,Tr as normalizePastedImageFile,We as sanitizeTextareaTargetValue,Ir as sanitizeTextareaValue,pn as scanClipboardForImageFiles};
1
+ import{Fr,Ao,Lo,Br,yr,lt}from"../chunk-f5z2f54v.js";export{Lo as clipboardHasStringItem,yr as countControlCharsBeforeIndex,Fr as normalizePastedImageFile,lt as sanitizeTextareaTargetValue,Br as sanitizeTextareaValue,Ao as scanClipboardForImageFiles};
@@ -1 +1 @@
1
- import{St,Wr,Nt,jr,ke,Ce,Te,Kr,Mn,Rt,x}from"../chunk-tpx841s3.js";export{Rt as LocalAttachmentsContext,Mn as PromptInputProvider,Nt as PromptInputSubmissionContext,St as PromptInputSubmitContext,ke as ProviderAttachmentsContext,Te as useOptionalPromptInputController,x as usePromptInputAttachments,Ce as usePromptInputController,jr as usePromptInputSubmission,Wr as usePromptInputSubmit,Kr as useProviderAttachments};
1
+ import{sn,Ti,ln,Ii,Oe,Fe,Be,Pi,or,cn,x}from"../chunk-58t2kkh8.js";export{cn as LocalAttachmentsContext,or as PromptInputProvider,ln as PromptInputSubmissionContext,sn as PromptInputSubmitContext,Oe as ProviderAttachmentsContext,Be as useOptionalPromptInputController,x as usePromptInputAttachments,Fe as usePromptInputController,Ii as usePromptInputSubmission,Ti as usePromptInputSubmit,Pi as useProviderAttachments};
@@ -1 +1 @@
1
- import{Ct}from"../chunk-xfjcwypy.js";import"../chunk-0hpww4x3.js";import"../chunk-tpx841s3.js";import"../chunk-gy63n5pz.js";import"../chunk-xjtqdp82.js";export{Ct as PromptInputTextarea};
1
+ import{Zt}from"../chunk-qrar3eh8.js";import"../chunk-f5z2f54v.js";import"../chunk-qpc4ca5y.js";import"../chunk-58t2kkh8.js";import"../chunk-ncekagm6.js";export{Zt as PromptInputTextarea};
@@ -1 +1 @@
1
- import{Tn,In,Pn,Sn,Nn,D,Rn}from"../chunk-hrexfky6.js";import"../chunk-tpx841s3.js";import"../chunk-mgt5j803.js";import"../chunk-gy63n5pz.js";import"../chunk-fzetrkvd.js";import{Y}from"../chunk-d2rrvka6.js";import"../chunk-wjs8bwpk.js";import"../chunk-xjtqdp82.js";import"../chunk-cg97byvk.js";export{Y as MAX_TOTAL_IMAGE_MB,Tn as PromptInput,In as PromptInputBody,D as PromptInputButton,Sn as PromptInputFooter,Pn as PromptInputHeader,Rn as PromptInputSubmit,Nn as PromptInputTools};
1
+ import{Wo,Ko,Qo,Xo,Yo,U,Zo}from"../chunk-82m8q66f.js";import{Y}from"../chunk-5tsvqfej.js";import"../chunk-6amcjhqh.js";import"../chunk-tv89wh8b.js";import"../chunk-sc57jf2x.js";import"../chunk-qpc4ca5y.js";import"../chunk-58t2kkh8.js";import"../chunk-ncekagm6.js";import"../chunk-cg97byvk.js";export{Y as MAX_TOTAL_IMAGE_MB,Wo as PromptInput,Ko as PromptInputBody,U as PromptInputButton,Xo as PromptInputFooter,Qo as PromptInputHeader,Zo as PromptInputSubmit,Yo as PromptInputTools};
@@ -1,6 +1,6 @@
1
1
  import type * as acp from "@agentclientprotocol/sdk/experimental/v2/unstable";
2
- import { type FormElicitation } from "@alwith/api";
3
- import type { PendingAction } from "@alwith/api/client";
2
+ import { type FormElicitation } from "@nyssance/codex-acp-v2/client";
3
+ import type { PendingAction } from "@nyssance/codex-acp-v2/client";
4
4
  export type FormAction = PendingAction & {
5
5
  kind: "elicitation";
6
6
  params: FormElicitation;