@alwith/module-chat 0.6.17 → 0.6.18

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 (552) hide show
  1. package/dist/activity-host.js +1 -1
  2. package/dist/agent/application-client.d.ts +30 -0
  3. package/dist/agent/application-client.js +1 -0
  4. package/dist/agent/client.d.ts +125 -0
  5. package/dist/agent/client.js +1 -0
  6. package/dist/agent/custom-model-effort.d.ts +4 -0
  7. package/dist/agent/custom-model-effort.js +1 -0
  8. package/dist/agent/fork-title.d.ts +1 -0
  9. package/dist/agent/fork-title.js +1 -0
  10. package/dist/agent/image-request.d.ts +6 -0
  11. package/dist/agent/image-request.js +1 -0
  12. package/dist/agent/image-tools.d.ts +9 -0
  13. package/dist/agent/image-tools.js +1 -0
  14. package/dist/agent/input-config.d.ts +17 -0
  15. package/dist/agent/input-config.js +1 -0
  16. package/dist/agent/input-modes/chat.d.ts +10 -0
  17. package/dist/agent/input-modes/chat.js +1 -0
  18. package/dist/agent/input-modes/execution-meta.d.ts +1 -0
  19. package/dist/agent/input-modes/execution-meta.js +1 -0
  20. package/dist/agent/input-modes/image-context.d.ts +1 -0
  21. package/dist/agent/input-modes/image-context.js +1 -0
  22. package/dist/agent/input-modes/image.d.ts +14 -0
  23. package/dist/agent/input-modes/image.js +1 -0
  24. package/dist/agent/input-modes/index.d.ts +46 -0
  25. package/dist/agent/input-modes/index.js +1 -0
  26. package/dist/agent/project-path.d.ts +2 -0
  27. package/dist/agent/project-path.js +1 -0
  28. package/dist/agent/request-error.d.ts +3 -0
  29. package/dist/agent/request-error.js +1 -0
  30. package/dist/agent/session-list-refresh.d.ts +2 -0
  31. package/dist/agent/session-list-refresh.js +1 -0
  32. package/dist/app-reference.js +1 -1
  33. package/dist/application-tools.d.ts +1 -1
  34. package/dist/application-tools.js +1 -1
  35. package/dist/approval/choice-elicitation-form.js +1 -1
  36. package/dist/approval/choice-schema.js +1 -1
  37. package/dist/approval/permission-options.js +1 -1
  38. package/dist/approval/permission-view.js +1 -1
  39. package/dist/approval/schema-elicitation-form.js +1 -1
  40. package/dist/approval/url-elicitation-card.js +1 -1
  41. package/dist/{chunk-zq18ffn0.js → chunk-04c5k3qr.js} +2 -2
  42. package/dist/chunk-04frqm59.js +2 -0
  43. package/dist/chunk-0rnh8mhs.js +2 -0
  44. package/dist/chunk-0rte5dh6.js +2 -0
  45. package/dist/{chunk-11cbk1je.js → chunk-16db8fh2.js} +2 -2
  46. package/dist/chunk-1a56svgj.js +2 -0
  47. package/dist/{chunk-2ss8m0ja.js → chunk-1gv49jt9.js} +4 -4
  48. package/dist/chunk-1hmt6w4w.js +2 -0
  49. package/dist/chunk-1qjhvkg0.js +2 -0
  50. package/dist/{chunk-4qghztvg.js → chunk-1r4y3pfg.js} +2 -2
  51. package/dist/{chunk-11z072sz.js → chunk-1vtvcar6.js} +2 -2
  52. package/dist/{chunk-veb90k24.js → chunk-1ycyexae.js} +2 -2
  53. package/dist/{chunk-bnpwhf5c.js → chunk-23r426sm.js} +2 -2
  54. package/dist/{chunk-97tgc9ym.js → chunk-26w51q10.js} +2 -2
  55. package/dist/chunk-29s4mnfw.js +2 -0
  56. package/dist/{chunk-y1fpm5r2.js → chunk-2a4pq98d.js} +2 -2
  57. package/dist/chunk-2c2a1wvg.js +2 -0
  58. package/dist/{chunk-pvd09dx5.js → chunk-2cfhvb3k.js} +2 -2
  59. package/dist/{chunk-9xhw5zmq.js → chunk-2dm51ksz.js} +2 -2
  60. package/dist/{chunk-x0h0g1ma.js → chunk-2easwd1n.js} +2 -2
  61. package/dist/chunk-2ee48v0d.js +3 -0
  62. package/dist/{chunk-0yqb54zg.js → chunk-2nb1475h.js} +2 -2
  63. package/dist/{chunk-qtft8hnb.js → chunk-2zy75522.js} +2 -2
  64. package/dist/{chunk-t96rf4pg.js → chunk-38bpmgjd.js} +2 -2
  65. package/dist/chunk-38hvm5ca.js +2 -0
  66. package/dist/{chunk-9eme3n5c.js → chunk-3a3ecayr.js} +2 -2
  67. package/dist/{chunk-tz8wmvs9.js → chunk-3chhwwwy.js} +2 -2
  68. package/dist/chunk-3g9qb7vq.js +2 -0
  69. package/dist/chunk-3gnn1v68.js +2 -0
  70. package/dist/{chunk-sct2h2dm.js → chunk-3hjcpcnv.js} +2 -2
  71. package/dist/{chunk-ehmdmfs5.js → chunk-3rmwcar7.js} +2 -2
  72. package/dist/chunk-41yz7txv.js +2 -0
  73. package/dist/{chunk-hqykt9hr.js → chunk-4p0zk3mj.js} +2 -2
  74. package/dist/{chunk-620q6hmz.js → chunk-56rx2rmj.js} +2 -2
  75. package/dist/{chunk-9072bnjm.js → chunk-5aqqqsa3.js} +2 -2
  76. package/dist/chunk-5bmxngnx.js +2 -0
  77. package/dist/chunk-5hk3k14h.js +2 -0
  78. package/dist/{chunk-7919s3et.js → chunk-5s85tvas.js} +2 -2
  79. package/dist/chunk-61awcdaq.js +7 -0
  80. package/dist/{chunk-4gq7ye1a.js → chunk-62qtrk0p.js} +2 -2
  81. package/dist/chunk-6c18ag8t.js +2 -0
  82. package/dist/chunk-6dnb0t84.js +2 -0
  83. package/dist/chunk-6ehhap9k.js +2 -0
  84. package/dist/{chunk-5ymq8y72.js → chunk-6my4ybpw.js} +3 -3
  85. package/dist/chunk-6tj5e7fc.js +2 -0
  86. package/dist/chunk-6w5gfh01.js +2 -0
  87. package/dist/chunk-6wkcqhkk.js +2 -0
  88. package/dist/{chunk-8weq6t3q.js → chunk-6xap6hvz.js} +2 -2
  89. package/dist/{chunk-hn6f6yrp.js → chunk-78vckhxt.js} +2 -2
  90. package/dist/chunk-7ac4g54f.js +3 -0
  91. package/dist/chunk-7jk8s061.js +2 -0
  92. package/dist/chunk-7sp1yqfg.js +2 -0
  93. package/dist/chunk-814h2ja2.js +3 -0
  94. package/dist/chunk-81jejgvs.js +2 -0
  95. package/dist/{chunk-7cv512vy.js → chunk-85tzkdsj.js} +2 -2
  96. package/dist/{chunk-5ygdb72w.js → chunk-86821qec.js} +2 -2
  97. package/dist/{chunk-vextf7ba.js → chunk-86r89vrt.js} +2 -2
  98. package/dist/{chunk-aaqk0jrt.js → chunk-8hygfx41.js} +2 -2
  99. package/dist/{chunk-3yq0a0f1.js → chunk-8kd74ng1.js} +2 -2
  100. package/dist/chunk-8ngg5vs4.js +4 -0
  101. package/dist/{chunk-4hz2ax5w.js → chunk-8q9hq3mg.js} +2 -2
  102. package/dist/{chunk-82xjggwn.js → chunk-8v53bkyr.js} +2 -2
  103. package/dist/{chunk-m2x1s408.js → chunk-8y60kexq.js} +2 -2
  104. package/dist/{chunk-5wsyenq9.js → chunk-8y706gz3.js} +2 -2
  105. package/dist/{chunk-dcevaazr.js → chunk-933h9gnv.js} +2 -2
  106. package/dist/{chunk-bsra0akd.js → chunk-9q6hz47j.js} +2 -2
  107. package/dist/chunk-a71j2n86.js +2 -0
  108. package/dist/chunk-abgdqy92.js +2 -0
  109. package/dist/{chunk-adc8e01w.js → chunk-ase4ejxz.js} +2 -2
  110. package/dist/{chunk-gbc31gbf.js → chunk-at75m9hq.js} +2 -2
  111. package/dist/chunk-ayademz2.js +2 -0
  112. package/dist/{chunk-x6f51rt2.js → chunk-ayhxrzsq.js} +2 -2
  113. package/dist/chunk-b42vv8f2.js +2 -0
  114. package/dist/{chunk-2pahy4hs.js → chunk-b4kh5nns.js} +2 -2
  115. package/dist/{chunk-trh02gwn.js → chunk-bane0xc8.js} +2 -2
  116. package/dist/{chunk-ha5xrc0a.js → chunk-bej9z041.js} +2 -2
  117. package/dist/chunk-bfwft1b8.js +2 -0
  118. package/dist/chunk-bv14x0e8.js +6 -0
  119. package/dist/chunk-bydxp3zj.js +7 -0
  120. package/dist/chunk-c0mpr4dh.js +2 -0
  121. package/dist/{chunk-y7n8m9st.js → chunk-c1pvvk0x.js} +2 -2
  122. package/dist/chunk-c8wdf20g.js +2 -0
  123. package/dist/chunk-ckjq6690.js +4 -0
  124. package/dist/{chunk-4dabfz24.js → chunk-csfqkzmr.js} +3 -3
  125. package/dist/{chunk-segftqt4.js → chunk-cvx7r35k.js} +2 -2
  126. package/dist/chunk-d2m4xmt4.js +2 -0
  127. package/dist/{chunk-vkc8ssbv.js → chunk-d8f6avcz.js} +2 -2
  128. package/dist/{chunk-wv127h6d.js → chunk-df9aqj1m.js} +2 -2
  129. package/dist/chunk-djd3sjp9.js +2 -0
  130. package/dist/{chunk-3174p320.js → chunk-dtgbgwby.js} +2 -2
  131. package/dist/{chunk-00z352ph.js → chunk-dxsjz3re.js} +2 -2
  132. package/dist/{chunk-qnbr2cmg.js → chunk-e04g26qm.js} +2 -2
  133. package/dist/chunk-e2qjbqq2.js +2 -0
  134. package/dist/{chunk-3karja82.js → chunk-e7ndpy02.js} +2 -2
  135. package/dist/{chunk-tjfjvzv5.js → chunk-easm0z49.js} +2 -2
  136. package/dist/chunk-ecaedwda.js +2 -0
  137. package/dist/{chunk-9hmqa3cs.js → chunk-ecdjjnbb.js} +2 -2
  138. package/dist/chunk-een4e2tr.js +2 -0
  139. package/dist/chunk-ehpaw624.js +4 -0
  140. package/dist/chunk-evygj5ka.js +2 -0
  141. package/dist/{chunk-netp71kb.js → chunk-f4h84pav.js} +2 -2
  142. package/dist/{chunk-05eg5p11.js → chunk-f6zpqrg3.js} +2 -2
  143. package/dist/{chunk-1e7gk302.js → chunk-f73x23f9.js} +2 -2
  144. package/dist/chunk-f7m5zdkp.js +2 -0
  145. package/dist/chunk-f89s462k.js +3 -0
  146. package/dist/{chunk-7nehhgej.js → chunk-ffs5nkt0.js} +2 -2
  147. package/dist/chunk-fhjk81r9.js +2 -0
  148. package/dist/{chunk-3h3cmjh2.js → chunk-g61xf0ma.js} +2 -2
  149. package/dist/{chunk-2ptyqcf3.js → chunk-g7cc7gdn.js} +2 -2
  150. package/dist/chunk-g8w06bdx.js +2 -0
  151. package/dist/{chunk-fvz27k62.js → chunk-gawrkkbf.js} +2 -2
  152. package/dist/{chunk-41v0g6sw.js → chunk-gdavg2hq.js} +2 -2
  153. package/dist/{chunk-gxjg94y5.js → chunk-gea1q14z.js} +2 -2
  154. package/dist/chunk-ggddhx5x.js +2 -0
  155. package/dist/chunk-gnctm097.js +2 -0
  156. package/dist/{chunk-kcra1mgf.js → chunk-gvqvw7ms.js} +2 -2
  157. package/dist/{chunk-twx75z08.js → chunk-gy4h86mw.js} +2 -2
  158. package/dist/chunk-gyw21vnb.js +2 -0
  159. package/dist/{chunk-ex20n22v.js → chunk-heqa4swe.js} +2 -2
  160. package/dist/{chunk-b9q9d2jh.js → chunk-hygvdjq6.js} +3 -3
  161. package/dist/{chunk-c05dxz9x.js → chunk-hzhcajx1.js} +2 -2
  162. package/dist/{chunk-vqkwvrxc.js → chunk-jca8s47n.js} +2 -2
  163. package/dist/{chunk-fzze5xcw.js → chunk-jg4c3zg4.js} +2 -2
  164. package/dist/{chunk-hwvr7b0j.js → chunk-jm6y0edw.js} +2 -2
  165. package/dist/chunk-jq6qs3s6.js +2 -0
  166. package/dist/{chunk-qdgsg6v4.js → chunk-k4xsxxy7.js} +2 -2
  167. package/dist/chunk-k99r1r38.js +2 -0
  168. package/dist/{chunk-64wzvf7k.js → chunk-kh3af9mq.js} +2 -2
  169. package/dist/{chunk-k86843av.js → chunk-kj3a1k2q.js} +2 -2
  170. package/dist/chunk-kj3t4mqf.js +2 -0
  171. package/dist/{chunk-8djjctdj.js → chunk-kk9dbwd1.js} +2 -2
  172. package/dist/chunk-kv1w4jx4.js +2 -0
  173. package/dist/chunk-kztrgv9y.js +2 -0
  174. package/dist/{chunk-6es8tgxc.js → chunk-m8pkmbtf.js} +2 -2
  175. package/dist/{chunk-tkbs5ev1.js → chunk-m944rgn9.js} +2 -2
  176. package/dist/{chunk-9pcx42v8.js → chunk-mg7kraha.js} +2 -2
  177. package/dist/chunk-mhv75thj.js +0 -0
  178. package/dist/chunk-mqpkm974.js +2 -0
  179. package/dist/chunk-mr2wcd24.js +2 -0
  180. package/dist/{chunk-nszq1xrj.js → chunk-ms0h8x63.js} +2 -2
  181. package/dist/{chunk-a1k3ffay.js → chunk-n0q8e6sq.js} +2 -2
  182. package/dist/{chunk-fd72zzqm.js → chunk-n3sm0834.js} +3 -3
  183. package/dist/chunk-n6dqwdg5.js +2 -0
  184. package/dist/{chunk-p0d6rr6q.js → chunk-n8v6cdq3.js} +2 -2
  185. package/dist/chunk-nh56sb8e.js +4 -0
  186. package/dist/{chunk-twbeapwa.js → chunk-nmd5x501.js} +2 -2
  187. package/dist/chunk-npvcy4tw.js +2 -0
  188. package/dist/{chunk-j6r44m9g.js → chunk-nrzkzvr0.js} +2 -2
  189. package/dist/{chunk-ct0xqakr.js → chunk-p14j9ckg.js} +2 -2
  190. package/dist/chunk-p2tm6tv8.js +1 -0
  191. package/dist/chunk-p781sb6h.js +2 -0
  192. package/dist/chunk-pdmayjan.js +2 -0
  193. package/dist/chunk-pk931bpm.js +2 -0
  194. package/dist/{chunk-1xaskqdj.js → chunk-pxv38ttf.js} +2 -2
  195. package/dist/{chunk-yaxsff9s.js → chunk-q01vmp9m.js} +2 -2
  196. package/dist/{chunk-wyndwb68.js → chunk-q46z21zs.js} +2 -2
  197. package/dist/{chunk-qwtmwj5m.js → chunk-q5qqhqw4.js} +2 -2
  198. package/dist/chunk-q9mh8x4r.js +2 -0
  199. package/dist/chunk-q9y0wjwp.js +2 -0
  200. package/dist/{chunk-gk0tq3n9.js → chunk-qdcznn2t.js} +2 -2
  201. package/dist/chunk-qejm75d7.js +2 -0
  202. package/dist/{chunk-d924by6g.js → chunk-qk1yqepm.js} +2 -2
  203. package/dist/chunk-r6c9r5yy.js +2 -0
  204. package/dist/chunk-r6ns1457.js +2 -0
  205. package/dist/chunk-r8expjyy.js +4 -0
  206. package/dist/{chunk-mgsxsaj1.js → chunk-r8pm74zf.js} +2 -2
  207. package/dist/{chunk-f2jc13bq.js → chunk-rb4p3h5b.js} +2 -2
  208. package/dist/{chunk-j5njgy7p.js → chunk-rh2yx0xq.js} +2 -2
  209. package/dist/{chunk-n13y99dj.js → chunk-rkejggyx.js} +2 -2
  210. package/dist/{chunk-t94rfs41.js → chunk-rr9kc3n8.js} +2 -2
  211. package/dist/{chunk-q2z9w661.js → chunk-rtbpfasb.js} +2 -2
  212. package/dist/chunk-rx84h0c2.js +2 -0
  213. package/dist/chunk-s2706gae.js +2 -0
  214. package/dist/chunk-s6b28p84.js +2 -0
  215. package/dist/{chunk-qm1z1zcw.js → chunk-s6y31dcb.js} +2 -2
  216. package/dist/{chunk-wdacgfwp.js → chunk-s88eyv24.js} +2 -2
  217. package/dist/{chunk-ev9tkjgy.js → chunk-s8djv2dy.js} +3 -3
  218. package/dist/chunk-sgbn37kz.js +2 -0
  219. package/dist/{chunk-vypkwd0x.js → chunk-swt6dntp.js} +2 -2
  220. package/dist/{chunk-xtwpbvdx.js → chunk-t9xkg3pk.js} +2 -2
  221. package/dist/{chunk-xbp4r3n4.js → chunk-tc3t2sgb.js} +3 -3
  222. package/dist/chunk-tcs1a1hk.js +2 -0
  223. package/dist/{chunk-9z9jffth.js → chunk-tec9yhsm.js} +2 -2
  224. package/dist/{chunk-csgkwny6.js → chunk-tj4b0s68.js} +2 -2
  225. package/dist/{chunk-mhxgws9c.js → chunk-tzczzqde.js} +2 -2
  226. package/dist/chunk-v8x5atmn.js +2 -0
  227. package/dist/chunk-vbbndjfd.js +2 -0
  228. package/dist/{chunk-7h3f7s97.js → chunk-vgscp6dr.js} +5 -5
  229. package/dist/{chunk-bqbpded2.js → chunk-vhxr0c4c.js} +2 -2
  230. package/dist/chunk-vvkp0jqa.js +2 -0
  231. package/dist/{chunk-gee5kh24.js → chunk-w1yrsbw1.js} +2 -2
  232. package/dist/chunk-wf7kfk3p.js +2 -0
  233. package/dist/{chunk-h3xn4d48.js → chunk-wjd2hpnd.js} +2 -2
  234. package/dist/chunk-wkrnbk0p.js +2 -0
  235. package/dist/chunk-wnydsth6.js +2 -0
  236. package/dist/{chunk-rvmbvv03.js → chunk-wxh1m3gg.js} +2 -2
  237. package/dist/chunk-x1mzrhtd.js +2 -0
  238. package/dist/{chunk-sg681jnt.js → chunk-x20dy83s.js} +4 -4
  239. package/dist/{chunk-9rf3qecr.js → chunk-xykmskka.js} +2 -2
  240. package/dist/chunk-y6p8xspr.js +2 -0
  241. package/dist/{chunk-vnr9rqs6.js → chunk-y8fmawc6.js} +3 -3
  242. package/dist/chunk-yc4cdg65.js +2 -0
  243. package/dist/{chunk-7eqtvqrn.js → chunk-ykz0h1r0.js} +2 -2
  244. package/dist/chunk-ymgc4317.js +2 -0
  245. package/dist/{chunk-z38xf1rw.js → chunk-z1qcgb6b.js} +3 -3
  246. package/dist/{chunk-d1n4w7hn.js → chunk-z6e4ydvm.js} +2 -2
  247. package/dist/chunk-ztrfygh5.js +2 -0
  248. package/dist/client.d.ts +9 -30
  249. package/dist/client.js +1 -1
  250. package/dist/codex/activity-group.js +1 -1
  251. package/dist/codex/artifact-links.d.ts +9 -0
  252. package/dist/codex/artifact-links.js +1 -0
  253. package/dist/codex/assistant-message.js +1 -1
  254. package/dist/codex/async-question-card.js +1 -1
  255. package/dist/codex/disclosure-state.js +1 -1
  256. package/dist/codex/edited-files-card.js +1 -1
  257. package/dist/codex/image-view-activity.js +1 -1
  258. package/dist/codex/markdown-renderer.js +1 -1
  259. package/dist/codex/navigation-audio.js +1 -1
  260. package/dist/codex/navigation-preview.js +1 -1
  261. package/dist/codex/navigation-rail.js +1 -1
  262. package/dist/codex/patch-view.js +1 -1
  263. package/dist/codex/plan.js +1 -1
  264. package/dist/codex/timeline-virtualizer.js +1 -1
  265. package/dist/codex/turn-activity.js +1 -1
  266. package/dist/codex/user-message.js +1 -1
  267. package/dist/codex/virtualized-turn-list.js +1 -1
  268. package/dist/collections/collection-emoji.js +1 -1
  269. package/dist/collections/collection-menu.js +1 -1
  270. package/dist/collections/collection-panel.js +1 -1
  271. package/dist/collections/collections.js +1 -1
  272. package/dist/collections/host.js +1 -1
  273. package/dist/collections/locales.js +1 -1
  274. package/dist/collections/model.js +1 -1
  275. package/dist/collections/store.js +1 -1
  276. package/dist/composer/completion-filter.js +1 -1
  277. package/dist/composer/completion-menu.js +1 -1
  278. package/dist/composer/completion-trigger.js +1 -1
  279. package/dist/composer/effort-slider.js +1 -1
  280. package/dist/composer/inline-document.js +1 -1
  281. package/dist/composer/inline-dom.js +1 -1
  282. package/dist/composer/menu-radio.js +1 -1
  283. package/dist/composer/model-select.js +1 -1
  284. package/dist/composer/permission-mode-select.js +1 -1
  285. package/dist/composer/prompt-input-attachments.js +1 -1
  286. package/dist/composer/prompt-input-clipboard.js +1 -1
  287. package/dist/composer/prompt-input-context.js +1 -1
  288. package/dist/composer/prompt-input-inline.js +1 -1
  289. package/dist/composer/prompt-input-textarea.js +1 -1
  290. package/dist/composer/prompt-input.js +1 -1
  291. package/dist/conversation/action-card.js +1 -1
  292. package/dist/conversation/composer/app-mentions.js +1 -1
  293. package/dist/conversation/composer/apps-menu.js +1 -1
  294. package/dist/conversation/composer/composer-menu.js +1 -1
  295. package/dist/conversation/composer/composer.js +1 -1
  296. package/dist/conversation/composer/config-options.js +1 -1
  297. package/dist/conversation/composer/context.js +1 -1
  298. package/dist/conversation/composer/drafts.js +1 -1
  299. package/dist/conversation/composer/file-items.js +1 -1
  300. package/dist/conversation/composer/long-text.js +1 -1
  301. package/dist/conversation/composer/mention-chips.js +1 -1
  302. package/dist/conversation/composer/mention-uri.js +1 -1
  303. package/dist/conversation/composer/model-menu.js +1 -1
  304. package/dist/conversation/composer/pasted-text-attachment.js +1 -1
  305. package/dist/conversation/composer/permission-mode-menu.js +1 -1
  306. package/dist/conversation/composer/prediction.js +1 -1
  307. package/dist/conversation/composer/prompt-history.js +1 -1
  308. package/dist/conversation/composer/slash-command-button.js +1 -1
  309. package/dist/conversation/composer/submit-button.js +1 -1
  310. package/dist/conversation/composer/usage-meter.js +1 -1
  311. package/dist/conversation/connection-notice.js +1 -1
  312. package/dist/conversation/context.js +1 -1
  313. package/dist/conversation/conversation-body.js +1 -1
  314. package/dist/conversation/conversation-search.js +1 -1
  315. package/dist/conversation/conversation-view.js +1 -1
  316. package/dist/conversation/conversation.js +1 -1
  317. package/dist/conversation/diff-modal.js +1 -1
  318. package/dist/conversation/draft-project-picker.js +1 -1
  319. package/dist/conversation/session-actions.js +1 -1
  320. package/dist/conversation/subagent-sessions.js +1 -1
  321. package/dist/conversation/subagent-tasks.js +1 -1
  322. package/dist/conversation/types.d.ts +1 -0
  323. package/dist/desktop/desktop-composer.d.ts +13 -0
  324. package/dist/desktop/desktop-composer.js +1 -0
  325. package/dist/desktop/desktop.d.ts +7 -0
  326. package/dist/desktop/desktop.js +1 -0
  327. package/dist/desktop/draft-model-select.d.ts +10 -0
  328. package/dist/desktop/draft-model-select.js +1 -0
  329. package/dist/desktop/load-image.d.ts +1 -0
  330. package/dist/desktop/load-image.js +1 -0
  331. package/dist/desktop/model-catalog.d.ts +10 -0
  332. package/dist/desktop/model-catalog.js +1 -0
  333. package/dist/desktop/model-recovery.d.ts +10 -0
  334. package/dist/desktop/model-recovery.js +1 -0
  335. package/dist/desktop/model-settings-action.d.ts +2 -0
  336. package/dist/desktop/model-settings-action.js +1 -0
  337. package/dist/desktop/native-file-drop.d.ts +8 -0
  338. package/dist/desktop/native-file-drop.js +1 -0
  339. package/dist/generated/commands.d.ts +103 -48
  340. package/dist/generated/commands.js +1 -1
  341. package/dist/image-lightbox.js +1 -1
  342. package/dist/image-preview-dialog.js +1 -1
  343. package/dist/image.js +1 -1
  344. package/dist/lib/app-reference.js +1 -1
  345. package/dist/lib/application-metadata.js +1 -1
  346. package/dist/lib/chat-path.d.ts +4 -0
  347. package/dist/lib/chat-path.js +1 -0
  348. package/dist/lib/code-highlighter.js +1 -1
  349. package/dist/lib/file-url.js +1 -1
  350. package/dist/lib/fuzzy.js +1 -1
  351. package/dist/lib/group-blocks.js +1 -1
  352. package/dist/lib/image-encode.js +1 -1
  353. package/dist/lib/limits.js +1 -1
  354. package/dist/lib/markdown-parser.js +1 -1
  355. package/dist/lib/markdown-rules.js +1 -1
  356. package/dist/lib/model-name.js +1 -1
  357. package/dist/lib/pointer-centered-zoom.js +1 -1
  358. package/dist/lib/prepare-prompt-files.js +1 -1
  359. package/dist/lib/reference-presentation.js +1 -1
  360. package/dist/lib/stream-style.js +1 -1
  361. package/dist/lib/streaming-markdown.js +1 -1
  362. package/dist/lib/tool-artifacts.js +1 -1
  363. package/dist/locales.d.ts +210 -0
  364. package/dist/locales.js +1 -1
  365. package/dist/mermaid/diagram.d.ts +3 -0
  366. package/dist/mermaid/diagram.js +1 -0
  367. package/dist/mermaid/export.d.ts +6 -0
  368. package/dist/mermaid/export.js +1 -0
  369. package/dist/mermaid/index.d.ts +1 -0
  370. package/dist/mermaid/index.js +1 -0
  371. package/dist/mermaid/preview.d.ts +11 -0
  372. package/dist/mermaid/preview.js +1 -0
  373. package/dist/oauth/claude-login.js +1 -1
  374. package/dist/oauth.js +1 -1
  375. package/dist/plugins/catalog-header.js +1 -1
  376. package/dist/plugins/catalog-skeleton.js +1 -1
  377. package/dist/plugins/host.js +1 -1
  378. package/dist/plugins/locales.js +1 -1
  379. package/dist/plugins/new-chat-directory.js +1 -1
  380. package/dist/plugins/pane.js +1 -1
  381. package/dist/plugins/panel-item.js +1 -1
  382. package/dist/plugins/plugin-detail-page.js +1 -1
  383. package/dist/plugins/plugin-icon.js +1 -1
  384. package/dist/plugins/plugin-icons.js +1 -1
  385. package/dist/plugins/plugins-page.js +1 -1
  386. package/dist/plugins/plugins.js +1 -1
  387. package/dist/plugins/read-skill-document.js +1 -1
  388. package/dist/plugins/skill-document.js +1 -1
  389. package/dist/plugins/skills-tab.js +1 -1
  390. package/dist/plugins/store.js +1 -1
  391. package/dist/plugins/toolbox-layout.js +1 -1
  392. package/dist/reference-projection.js +1 -1
  393. package/dist/search/chat-search.js +1 -1
  394. package/dist/search/codex-source-matches.js +1 -1
  395. package/dist/search/dom-matches.js +1 -1
  396. package/dist/search/find-bar.js +1 -1
  397. package/dist/search/literal-matches.js +1 -1
  398. package/dist/session-list/account-menu.js +1 -1
  399. package/dist/session-list/activity-list.js +1 -1
  400. package/dist/session-list/archived-sessions.js +1 -1
  401. package/dist/session-list/help-menu.js +1 -1
  402. package/dist/session-list/highlight.js +1 -1
  403. package/dist/session-list/host.js +1 -1
  404. package/dist/session-list/hover-info-card.js +1 -1
  405. package/dist/session-list/locales.js +1 -1
  406. package/dist/session-list/navigation-controls.js +1 -1
  407. package/dist/session-list/navigation-header.js +1 -1
  408. package/dist/session-list/navigation-store.js +1 -1
  409. package/dist/session-list/navigation-tabs.js +1 -1
  410. package/dist/session-list/navigation.js +1 -1
  411. package/dist/session-list/overflow-marquee.js +1 -1
  412. package/dist/session-list/platform.js +1 -1
  413. package/dist/session-list/row-stop-button.js +1 -1
  414. package/dist/session-list/session-groups.js +1 -1
  415. package/dist/session-list/session-info-card.js +1 -1
  416. package/dist/session-list/session-list.js +1 -1
  417. package/dist/session-list/session-row.js +1 -1
  418. package/dist/session-list/session-state-dot.js +1 -1
  419. package/dist/session-list/session-state-menu.js +1 -1
  420. package/dist/session-list/shortcut-hint.js +1 -1
  421. package/dist/session-list/shortcut.js +1 -1
  422. package/dist/session-list/sidebar-overlay.js +1 -1
  423. package/dist/session-list/trailing-swap.js +1 -1
  424. package/dist/session-list/use-activity-notification.js +1 -1
  425. package/dist/session-list/use-activity-preview.js +1 -1
  426. package/dist/session-list/use-cmd-held.js +1 -1
  427. package/dist/session-list/use-project-sessions.js +1 -1
  428. package/dist/session-list/virtual-session-rows.js +1 -1
  429. package/dist/session-timeline/activity-group.js +1 -1
  430. package/dist/session-timeline/activity-projection.js +1 -1
  431. package/dist/session-timeline/assistant-content.js +1 -1
  432. package/dist/session-timeline/assistant-image-references.js +1 -1
  433. package/dist/session-timeline/assistant-turn.js +1 -1
  434. package/dist/session-timeline/async-questions.js +1 -1
  435. package/dist/session-timeline/edited-files-card.js +1 -1
  436. package/dist/session-timeline/history-timeline.js +1 -1
  437. package/dist/session-timeline/host.d.ts +3 -0
  438. package/dist/session-timeline/host.js +1 -1
  439. package/dist/session-timeline/image-generation-progress.js +1 -1
  440. package/dist/session-timeline/navigation-rail.js +1 -1
  441. package/dist/session-timeline/plan.js +1 -1
  442. package/dist/session-timeline/question-reply.js +1 -1
  443. package/dist/session-timeline/resource-content.d.ts +1 -0
  444. package/dist/session-timeline/resource-content.js +1 -1
  445. package/dist/session-timeline/session-timeline.js +1 -1
  446. package/dist/session-timeline/timeline-registry.js +1 -1
  447. package/dist/session-timeline/turn-activity.js +1 -1
  448. package/dist/session-timeline/turn-error.js +1 -1
  449. package/dist/session-timeline/turn-retry.js +1 -1
  450. package/dist/session-timeline/turn-time.js +1 -1
  451. package/dist/session-timeline/turns.js +1 -1
  452. package/dist/session-timeline/use-timeline-scroll.js +1 -1
  453. package/dist/session-timeline/user-message.js +1 -1
  454. package/dist/settings/codex-account-card.js +1 -1
  455. package/dist/settings/login-card.js +1 -1
  456. package/dist/settings/model-alias-settings.js +1 -1
  457. package/dist/settings/model-aliases.js +1 -1
  458. package/dist/settings/provider-logos.d.ts +4 -0
  459. package/dist/settings/provider-logos.js +1 -1
  460. package/dist/settings/provider-section.js +1 -1
  461. package/dist/settings/providers-port.js +1 -1
  462. package/dist/settings/providers.d.ts +1 -1
  463. package/dist/settings/providers.js +1 -1
  464. package/dist/settings/settings-bridge.js +1 -1
  465. package/dist/settings/settings.js +1 -1
  466. package/native/darwin-arm64/THIRD_PARTY_NOTICES.md +8 -8
  467. package/native/darwin-arm64/artifact.json +1 -1
  468. package/native/darwin-arm64/libalwith_native_chat.dylib +0 -0
  469. package/native/win32-x64/THIRD_PARTY_NOTICES.md +7 -7
  470. package/native/win32-x64/alwith_native_chat.dll +0 -0
  471. package/native/win32-x64/artifact.json +1 -1
  472. package/package.json +10 -4
  473. package/dist/chunk-0307kp7e.js +0 -2
  474. package/dist/chunk-04vnhbvc.js +0 -2
  475. package/dist/chunk-1renytb3.js +0 -3
  476. package/dist/chunk-2drcx544.js +0 -2
  477. package/dist/chunk-2sxxr6j8.js +0 -2
  478. package/dist/chunk-2tc9kn50.js +0 -2
  479. package/dist/chunk-3t5cksae.js +0 -2
  480. package/dist/chunk-4h07zyxp.js +0 -2
  481. package/dist/chunk-4jy404m1.js +0 -2
  482. package/dist/chunk-4n4gap45.js +0 -2
  483. package/dist/chunk-4zz6dnqa.js +0 -2
  484. package/dist/chunk-5m45z6qm.js +0 -4
  485. package/dist/chunk-6xds0dkq.js +0 -2
  486. package/dist/chunk-7hwg9r4y.js +0 -2
  487. package/dist/chunk-856bck34.js +0 -2
  488. package/dist/chunk-95n1cpnj.js +0 -2
  489. package/dist/chunk-9h77fcpn.js +0 -2
  490. package/dist/chunk-9rvf1am9.js +0 -2
  491. package/dist/chunk-f0kgxjp1.js +0 -2
  492. package/dist/chunk-fjk1g303.js +0 -2
  493. package/dist/chunk-fjseqvmx.js +0 -1
  494. package/dist/chunk-gez0k8zs.js +0 -7
  495. package/dist/chunk-gjfhvaxn.js +0 -2
  496. package/dist/chunk-h4xxyhpn.js +0 -4
  497. package/dist/chunk-hmet2d96.js +0 -2
  498. package/dist/chunk-hwmpcj3y.js +0 -2
  499. package/dist/chunk-j9snfndd.js +0 -2
  500. package/dist/chunk-jz6zecb7.js +0 -2
  501. package/dist/chunk-kp7qa98m.js +0 -2
  502. package/dist/chunk-ncwf6pjj.js +0 -3
  503. package/dist/chunk-nh9gk065.js +0 -2
  504. package/dist/chunk-nxj8m5bm.js +0 -2
  505. package/dist/chunk-pn5ghg65.js +0 -2
  506. package/dist/chunk-pwcw4zp2.js +0 -2
  507. package/dist/chunk-q3vvg0de.js +0 -2
  508. package/dist/chunk-qkw2nhsr.js +0 -4
  509. package/dist/chunk-rncx5gxz.js +0 -2
  510. package/dist/chunk-s5c2ha8t.js +0 -2
  511. package/dist/chunk-sp411z4y.js +0 -7
  512. package/dist/chunk-sqm2vsf5.js +0 -2
  513. package/dist/chunk-t4dsmqdq.js +0 -2
  514. package/dist/chunk-thhtbvj1.js +0 -2
  515. package/dist/chunk-tvbgjmtw.js +0 -3
  516. package/dist/chunk-v0y5fepf.js +0 -3
  517. package/dist/chunk-vctq22tq.js +0 -2
  518. package/dist/chunk-vepv6ktb.js +0 -2
  519. package/dist/chunk-vet6snkp.js +0 -4
  520. package/dist/chunk-vjmgh1q9.js +0 -2
  521. package/dist/chunk-vmg3evhm.js +0 -2
  522. package/dist/chunk-w22ch68s.js +0 -2
  523. package/dist/chunk-xmks1g9y.js +0 -2
  524. package/dist/chunk-xmpaqxer.js +0 -2
  525. package/dist/chunk-xqwbn2ph.js +0 -2
  526. package/dist/chunk-y6kxhkjm.js +0 -2
  527. package/dist/chunk-yy1pm240.js +0 -2
  528. package/dist/chunk-z7ehwkcq.js +0 -2
  529. package/dist/chunk-zah0npdy.js +0 -2
  530. package/dist/chunk-zah37d5q.js +0 -2
  531. package/dist/chunk-zcwsc0gx.js +0 -2
  532. /package/native/darwin-arm64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-APACHE +0 -0
  533. /package/native/darwin-arm64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-MIT +0 -0
  534. /package/native/darwin-arm64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-APACHE +0 -0
  535. /package/native/darwin-arm64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-MIT +0 -0
  536. /package/native/darwin-arm64/licenses/{mio-1.2.4 → mio-1.2.5}/LICENSE +0 -0
  537. /package/native/darwin-arm64/licenses/{nix-0.31.3 → nix-0.32.0}/LICENSE +0 -0
  538. /package/native/darwin-arm64/licenses/{opencode-ai-models-0.0.124 → opencode-ai-models-0.0.136}/LICENSE +0 -0
  539. /package/native/darwin-arm64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-APACHE +0 -0
  540. /package/native/darwin-arm64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-MIT +0 -0
  541. /package/native/darwin-arm64/licenses/{rustls-webpki-0.103.16 → rustls-webpki-0.103.17}/LICENSE +0 -0
  542. /package/native/darwin-arm64/licenses/{zip-9.5.1 → zip-9.6.0}/LICENSE +0 -0
  543. /package/native/win32-x64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-APACHE +0 -0
  544. /package/native/win32-x64/licenses/{bumpalo-3.20.3 → bumpalo-3.20.4}/LICENSE-MIT +0 -0
  545. /package/native/win32-x64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-APACHE +0 -0
  546. /package/native/win32-x64/licenses/{cc-1.11.1 → cc-1.11.2}/LICENSE-MIT +0 -0
  547. /package/native/win32-x64/licenses/{mio-1.2.4 → mio-1.2.5}/LICENSE +0 -0
  548. /package/native/win32-x64/licenses/{opencode-ai-models-0.0.124 → opencode-ai-models-0.0.136}/LICENSE +0 -0
  549. /package/native/win32-x64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-APACHE +0 -0
  550. /package/native/win32-x64/licenses/{rand-0.10.3 → rand-0.10.4}/LICENSE-MIT +0 -0
  551. /package/native/win32-x64/licenses/{rustls-webpki-0.103.16 → rustls-webpki-0.103.17}/LICENSE +0 -0
  552. /package/native/win32-x64/licenses/{zip-9.5.1 → zip-9.6.0}/LICENSE +0 -0
@@ -1 +1 @@
1
- import{kr,p,E}from"./chunk-f0kgxjp1.js";export{kr as ActivityHostProvider,E as ActivityMarkdown,p as useActivityHost};
1
+ import{ys,c,O}from"./chunk-wf7kfk3p.js";export{ys as ActivityHostProvider,O as ActivityMarkdown,c as useActivityHost};
@@ -0,0 +1,30 @@
1
+ import { type Agent, type AgentRequest, type AppsInstalledParams, type ClientOptions as AdapterOptions, CodexClient as AdapterClient, type CodexClientState, type SessionOperation, type SessionRequestOptions } from "@nyssance/codex-acp-v2/client";
2
+ import { type ApplicationTools, type ApplicationToolSelection } from "../application-tools";
3
+ export type ClientOptions = AdapterOptions & {
4
+ applicationTools?: ApplicationTools;
5
+ };
6
+ export declare class ApplicationClient<State extends CodexClientState = CodexClientState> extends AdapterClient<State> {
7
+ private readonly applicationRegistry;
8
+ private readonly toolSelection;
9
+ constructor(openPort: ConstructorParameters<typeof AdapterClient>[0], options: ClientOptions, extraState?: Omit<State, keyof CodexClientState>);
10
+ protected applicationToolsFor(selection: ApplicationToolSelection): Promise<readonly import("../application-tools").ApplicationTool[]> | readonly import("../application-tools").ApplicationTool[];
11
+ protected requestContext(cwd: string, operation: SessionOperation, options: SessionRequestOptions): ReturnType<AdapterClient<State>["requestContext"]>;
12
+ protected acceptsPendingRequest(request: AgentRequest): boolean;
13
+ protected handleNotification(method: string, params: unknown): boolean;
14
+ protected handleAgentRequest(agent: Agent, request: AgentRequest): boolean;
15
+ protected onDisconnected(): void;
16
+ protected onSessionDropped(id: string): void;
17
+ cancel(id: string): Promise<void>;
18
+ close(id: string): Promise<void>;
19
+ stopSession(id: string): Promise<void>;
20
+ installedApps(params?: AppsInstalledParams): Promise<{
21
+ apps: {
22
+ id: string;
23
+ runtimeName: string | null;
24
+ enabled: boolean;
25
+ callable: boolean;
26
+ iconUrl?: string | null | undefined;
27
+ iconUrlDark?: string | null | undefined;
28
+ }[];
29
+ }>;
30
+ }
@@ -0,0 +1 @@
1
+ import{Co}from"../chunk-ecaedwda.js";import"../chunk-3chhwwwy.js";import"../chunk-cvx7r35k.js";export{Co as ApplicationClient};
@@ -0,0 +1,125 @@
1
+ import type * as acp from "@agentclientprotocol/sdk/experimental/v2/unstable";
2
+ import { type RuntimeClient, type SessionRunState } from "@alwith/api";
3
+ import { type CodexClientState, type ForkOptions, type ForkOrigin, type NewSessionOptions, type PendingAction, type PromptOptions, type ReplayScope, type Session, type SessionOperation, type SessionRequestOptions, type SessionSummary } from "@nyssance/codex-acp-v2/client";
4
+ import type { ApplicationTool, ApplicationToolSelection } from "../application-tools";
5
+ import { type ImageSelection } from "../image";
6
+ import { ApplicationClient as CodexAcpClient, type ClientOptions as BaseClientOptions } from "./application-client";
7
+ import { type SessionInputConfig, type SessionInputConfigSnapshot } from "./input-config";
8
+ import { type InputMode } from "./input-modes";
9
+ export type { ForkOrigin, PendingAction };
10
+ export declare const NATIVE_MODEL_GROUP: {
11
+ readonly id: "chatgpt";
12
+ readonly name: "ChatGPT";
13
+ };
14
+ export type GatewayModel = {
15
+ id: string;
16
+ label?: string;
17
+ description?: string;
18
+ };
19
+ export type SessionModelListener = (sessionId: string, modelId: string, isGateway: boolean) => void;
20
+ export type Launch = {
21
+ engine: string;
22
+ [key: string]: unknown;
23
+ };
24
+ export type ClientOptions = BaseClientOptions & {
25
+ resolveModel?: (model: string | null, purpose: "session" | "draft") => Promise<string | null>;
26
+ imageService?: {
27
+ inputMode: (sessionId: string) => Promise<InputMode>;
28
+ selection: () => ImageSelection;
29
+ generateExternal: (selection: ImageSelection, prompt: string, images: string[], signal?: AbortSignal) => Promise<{
30
+ images: {
31
+ mimeType: string;
32
+ data: string;
33
+ }[];
34
+ }>;
35
+ };
36
+ };
37
+ export type DraftOwner = "main" | "chat";
38
+ export type AppState = CodexClientState & {
39
+ modelRecovery: Record<string, boolean>;
40
+ nativeModels: GatewayModel[];
41
+ sessionWindows: Record<string, DraftOwner>;
42
+ draftSessions: Record<string, DraftOwner>;
43
+ };
44
+ export declare class CodexClient extends CodexAcpClient<AppState> {
45
+ executeShell(sessionId: string, command: string): Promise<void>;
46
+ private readonly modelListeners;
47
+ private readonly confirmedModelListeners;
48
+ private savedModels;
49
+ private slotModels;
50
+ private slotTargets;
51
+ private slotVersions;
52
+ private readonly draftDirectoryIntents;
53
+ private readonly draftOperations;
54
+ private readonly gatewayModels;
55
+ private readonly configOwners;
56
+ private readonly openingOwners;
57
+ private readonly schedulingConfig;
58
+ private readonly replayRepairs;
59
+ private readonly accountRevocations;
60
+ private readonly accountRecoveries;
61
+ private readonly resolveModelOption;
62
+ constructor(openPort: () => Promise<RuntimeClient<Launch>>, options: ClientOptions);
63
+ private readonly imageTool;
64
+ private readonly imageService;
65
+ private readonly inputModes;
66
+ private readonly inputSelections;
67
+ readInputConfig(sessionId: string): Promise<SessionInputConfigSnapshot>;
68
+ writeInputConfig(sessionId: string, inputConfig: SessionInputConfig): Promise<SessionInputConfigSnapshot>;
69
+ private acceptInputConfig;
70
+ private readonly imageRequests;
71
+ prompt(id: string, prompt: acp.ContentBlock[], options?: PromptOptions): Promise<string>;
72
+ private promptImage;
73
+ protected promptMeta(id: string, options: PromptOptions): Record<string, unknown> | undefined;
74
+ private readonly promptImages;
75
+ promptWithImages(id: string, prompt: acp.ContentBlock[], options?: PromptOptions): Promise<string>;
76
+ protected applicationToolsFor(selection: ApplicationToolSelection): Promise<ApplicationTool[]>;
77
+ private releaseImages;
78
+ protected onDisconnected(): void;
79
+ cancel(id: string): Promise<void>;
80
+ close(id: string): Promise<void>;
81
+ stopSession(id: string): Promise<void>;
82
+ private setApp;
83
+ applyRunStates(sessions: SessionRunState[], source?: "snapshot" | "event"): void;
84
+ protected enqueueSession<T>(id: string, operation: () => Promise<T>, continueAfterFailure?: boolean): Promise<T>;
85
+ private customEffortChange;
86
+ private normalizeCustomEffort;
87
+ private writeCustomEffort;
88
+ protected afterSessionCreated(id: string): Promise<void>;
89
+ protected replay(id: string, cwd: string, options?: SessionRequestOptions): Promise<void>;
90
+ private replayWithEffort;
91
+ connect(): Promise<void>;
92
+ listProjectSessions(cwd: string): Promise<SessionSummary[]>;
93
+ newSession(cwd?: string, model?: string | null | NewSessionOptions, owner?: DraftOwner): Promise<string>;
94
+ private createNativeSession;
95
+ open(id: string, cwd: string, owner?: DraftOwner | SessionRequestOptions): Promise<void>;
96
+ private replayForOwner;
97
+ protected requestContext(cwd: string, operation: SessionOperation, options: SessionRequestOptions): ReturnType<CodexAcpClient<AppState>["requestContext"]>;
98
+ private requestModelContext;
99
+ protected recoverReplay(id: string, cwd: string, error: unknown, scope: ReplayScope): Promise<boolean>;
100
+ markAccountModelsUnavailable(ids: readonly string[]): void;
101
+ resumeModel(id: string, model: string): Promise<void>;
102
+ setConfig(id: string, configId: string, value: string | boolean, owner?: DraftOwner): Promise<void>;
103
+ protected onConfigChanged(id: string, configId: string, response: acp.SetSessionConfigOptionResponse): void;
104
+ private changeDraft;
105
+ prepareDraft(owner: DraftOwner, cwd: string | undefined, model?: string | null, nativeDefault?: boolean, inputMode?: InputMode): Promise<string>;
106
+ discardDraft(owner: string): Promise<void>;
107
+ transferDraft(id: string, owner: DraftOwner): Promise<void>;
108
+ private deleteEmptyDraft;
109
+ protected onDraftMaterialized(id: string): void;
110
+ protected onSessionDropped(id: string): void;
111
+ fork(id: string, cwd: string, lastTurnId?: string | ForkOptions): Promise<string>;
112
+ protected forkInternal(id: string, cwd: string, options: ForkOptions): Promise<string>;
113
+ protected onForked(id: string, response: acp.ForkSessionResponse): void;
114
+ protected onReplayed(id: string, response: acp.ResumeSessionResponse): void;
115
+ setModelSelections(models: Record<DraftOwner, string | null>): void;
116
+ onConfirmedModel(listener: (owner: DraftOwner, model: string) => void): () => void;
117
+ protected onSessionChanged(session: Session): void;
118
+ private followModel;
119
+ private activateSlot;
120
+ private bindSlot;
121
+ private confirmModel;
122
+ private resolveModel;
123
+ onSessionModel(listener: SessionModelListener): () => void;
124
+ private noteModel;
125
+ }
@@ -0,0 +1 @@
1
+ import{b,dr}from"../chunk-3g9qb7vq.js";import"../chunk-29s4mnfw.js";import"../chunk-ecaedwda.js";import"../chunk-6wkcqhkk.js";import"../chunk-kztrgv9y.js";import"../chunk-q9mh8x4r.js";import"../chunk-bv14x0e8.js";import"../chunk-r6c9r5yy.js";import"../chunk-bfwft1b8.js";import"../chunk-q9y0wjwp.js";import"../chunk-nh56sb8e.js";import"../chunk-e2qjbqq2.js";import"../chunk-r6ns1457.js";import"../chunk-3chhwwwy.js";import"../chunk-cvx7r35k.js";import"../chunk-fhjk81r9.js";import"../chunk-b42vv8f2.js";export{dr as CodexClient,b as NATIVE_MODEL_GROUP};
@@ -0,0 +1,4 @@
1
+ export declare function customModelEffort(model: string | null): {
2
+ value: string;
3
+ hidden: boolean;
4
+ } | null;
@@ -0,0 +1 @@
1
+ import{So}from"../chunk-r6ns1457.js";export{So as customModelEffort};
@@ -0,0 +1 @@
1
+ export declare function forkTitle(source: string, occupied: Iterable<string>): string;
@@ -0,0 +1 @@
1
+ import{Fn}from"../chunk-6wkcqhkk.js";export{Fn as forkTitle};
@@ -0,0 +1,6 @@
1
+ declare const IMAGE_REQUEST_ASPECTS: readonly ["auto", "1:1", "3:4", "9:16", "4:3", "16:9"];
2
+ export type ImageRequestAspect = (typeof IMAGE_REQUEST_ASPECTS)[number];
3
+ export declare const IMAGE_WORKFLOW_INSTRUCTIONS: string;
4
+ export declare function imageRequestAspect(value: unknown): ImageRequestAspect | undefined;
5
+ export declare function imageGenerationPrompt(prompt: string, aspect: ImageRequestAspect | undefined): string;
6
+ export {};
@@ -0,0 +1 @@
1
+ import{mr,wo,gr}from"../chunk-bv14x0e8.js";export{mr as IMAGE_WORKFLOW_INSTRUCTIONS,gr as imageGenerationPrompt,wo as imageRequestAspect};
@@ -0,0 +1,9 @@
1
+ import { type ImageSelection } from "../image";
2
+ import type { ClientOptions } from "./client";
3
+ import { type ImageRequestAspect } from "./image-request";
4
+ export type ImageToolRequest = {
5
+ selection: ImageSelection;
6
+ references: Map<string, string>;
7
+ aspect?: ImageRequestAspect;
8
+ };
9
+ export declare function createImageTool(service: NonNullable<ClientOptions["imageService"]>, request: (id: string) => ImageToolRequest | undefined): import("../application-tools").ApplicationTool;
@@ -0,0 +1 @@
1
+ import{pr}from"../chunk-q9mh8x4r.js";import"../chunk-bv14x0e8.js";import"../chunk-cvx7r35k.js";import"../chunk-fhjk81r9.js";import"../chunk-b42vv8f2.js";export{pr as createImageTool};
@@ -0,0 +1,17 @@
1
+ type InputJson = null | string | number | boolean | InputJson[] | {
2
+ [key: string]: InputJson;
3
+ };
4
+ export type SessionInputConfig = {
5
+ mode: string;
6
+ config: {
7
+ [key: string]: InputJson;
8
+ };
9
+ };
10
+ export type SessionInputConfigSnapshot = {
11
+ sessionId: string;
12
+ revision: number;
13
+ inputConfig: SessionInputConfig | null;
14
+ };
15
+ export declare function parseInputConfig(value: unknown): SessionInputConfig;
16
+ export declare function parseInputSnapshot(value: unknown, sessionId: string): SessionInputConfigSnapshot;
17
+ export {};
@@ -0,0 +1 @@
1
+ import{ur,On}from"../chunk-kztrgv9y.js";export{ur as parseInputConfig,On as parseInputSnapshot};
@@ -0,0 +1,10 @@
1
+ import type { SessionInputConfig } from "../input-config";
2
+ export declare const chatInputMode: {
3
+ persistConfig: boolean;
4
+ nativeTools: {};
5
+ applicationContext: () => Record<string, string>;
6
+ parseConfig(config: SessionInputConfig["config"]): Record<string, never>;
7
+ routePrompt<T>(routes: {
8
+ native: () => T;
9
+ }): T;
10
+ };
@@ -0,0 +1 @@
1
+ import{fr}from"../../chunk-bfwft1b8.js";import"../../chunk-nh56sb8e.js";export{fr as chatInputMode};
@@ -0,0 +1 @@
1
+ export declare function executionMeta(meta: Record<string, unknown> | undefined): Record<string, unknown> | undefined;
@@ -0,0 +1 @@
1
+ import{ko}from"../../chunk-e2qjbqq2.js";export{ko as executionMeta};
@@ -0,0 +1 @@
1
+ export declare function imageApplicationContext(intent: unknown, instructions?: string): Record<string, string>;
@@ -0,0 +1 @@
1
+ import{_t}from"../../chunk-nh56sb8e.js";export{_t as imageApplicationContext};
@@ -0,0 +1,14 @@
1
+ import { type ImageSelection } from "../../image";
2
+ import type { SessionInputConfig } from "../input-config";
3
+ import { imageApplicationContext } from "./image-context";
4
+ export declare const imageInputMode: {
5
+ persistConfig: boolean;
6
+ nativeTools: {
7
+ imageGeneration: boolean;
8
+ };
9
+ applicationContext: typeof imageApplicationContext;
10
+ parseConfig(config: SessionInputConfig["config"]): ImageSelection;
11
+ routePrompt<T>(routes: {
12
+ image: () => T;
13
+ }): T;
14
+ };
@@ -0,0 +1 @@
1
+ import{ge}from"../../chunk-q9y0wjwp.js";import"../../chunk-nh56sb8e.js";import"../../chunk-fhjk81r9.js";import"../../chunk-b42vv8f2.js";export{ge as imageInputMode};
@@ -0,0 +1,46 @@
1
+ import type { SessionInputConfig } from "../input-config";
2
+ declare const inputModeDefinitions: {
3
+ chat: {
4
+ persistConfig: boolean;
5
+ nativeTools: {};
6
+ applicationContext: () => Record<string, string>;
7
+ parseConfig(config: SessionInputConfig["config"]): Record<string, never>;
8
+ routePrompt<T>(routes: {
9
+ native: () => T;
10
+ }): T;
11
+ };
12
+ image: {
13
+ persistConfig: boolean;
14
+ nativeTools: {
15
+ imageGeneration: boolean;
16
+ };
17
+ applicationContext: typeof import("./image-context").imageApplicationContext;
18
+ parseConfig(config: SessionInputConfig["config"]): import("../../image").ImageSelection;
19
+ routePrompt<T>(routes: {
20
+ image: () => T;
21
+ }): T;
22
+ };
23
+ };
24
+ export type InputMode = keyof typeof inputModeDefinitions;
25
+ export declare function isInputMode(mode: string): mode is InputMode;
26
+ export declare function inputModeDefinition(mode: string): {
27
+ persistConfig: boolean;
28
+ nativeTools: {};
29
+ applicationContext: () => Record<string, string>;
30
+ parseConfig(config: SessionInputConfig["config"]): Record<string, never>;
31
+ routePrompt<T>(routes: {
32
+ native: () => T;
33
+ }): T;
34
+ } | {
35
+ persistConfig: boolean;
36
+ nativeTools: {
37
+ imageGeneration: boolean;
38
+ };
39
+ applicationContext: typeof import("./image-context").imageApplicationContext;
40
+ parseConfig(config: SessionInputConfig["config"]): import("../../image").ImageSelection;
41
+ routePrompt<T>(routes: {
42
+ image: () => T;
43
+ }): T;
44
+ };
45
+ export declare function resolveInputMode(inputConfig: SessionInputConfig | null): InputMode;
46
+ export {};
@@ -0,0 +1 @@
1
+ import{nt,De,ia}from"../../chunk-r6c9r5yy.js";import"../../chunk-bfwft1b8.js";import"../../chunk-q9y0wjwp.js";import"../../chunk-nh56sb8e.js";import"../../chunk-fhjk81r9.js";import"../../chunk-b42vv8f2.js";export{De as inputModeDefinition,nt as isInputMode,ia as resolveInputMode};
@@ -0,0 +1,2 @@
1
+ export type ProjectPaths = (cwd: string) => readonly [string, ...string[]];
2
+ export declare const macProjectPaths: ProjectPaths;
@@ -0,0 +1 @@
1
+ import{ta}from"../chunk-vbbndjfd.js";export{ta as macProjectPaths};
@@ -0,0 +1,3 @@
1
+ export declare function isAuthenticationRequired(error: unknown): boolean;
2
+ export declare function isModelSelectionRequired(error: unknown): boolean;
3
+ export declare function explainRequestError(error: unknown, method: string): unknown;
@@ -0,0 +1 @@
1
+ import{me,Dn,oa}from"../chunk-29s4mnfw.js";export{oa as explainRequestError,me as isAuthenticationRequired,Dn as isModelSelectionRequired};
@@ -0,0 +1,2 @@
1
+ import type { CodexClient } from "./client";
2
+ export declare function watchSessionList(client: CodexClient): () => void;
@@ -0,0 +1 @@
1
+ import{na}from"../chunk-ymgc4317.js";export{na as watchSessionList};
@@ -1 +1 @@
1
- import{pe}from"./chunk-1e7gk302.js";import"./chunk-veb90k24.js";import"./chunk-pvd09dx5.js";export{pe as AppReferenceBadge};
1
+ import{xe}from"./chunk-f73x23f9.js";import"./chunk-1ycyexae.js";import"./chunk-2cfhvb3k.js";export{xe as AppReferenceBadge};
@@ -28,9 +28,9 @@ export declare function defineApplicationTool<T>(tool: Omit<ApplicationTool, "ex
28
28
  }): ApplicationTool;
29
29
  export declare function applicationToolSet(tools: readonly ApplicationTool[]): ClientToolSet;
30
30
  export declare class ApplicationToolRegistry {
31
- private readonly session;
32
31
  private readonly sessions;
33
32
  private readonly calls;
33
+ private readonly session;
34
34
  constructor(session: (id: string) => Session | undefined);
35
35
  bind(id: string, tools: readonly ApplicationTool[], revision: string): void;
36
36
  cancel(id: string): void;
@@ -1 +1 @@
1
- import{Ir,xn,bn}from"./chunk-segftqt4.js";export{bn as ApplicationToolRegistry,xn as applicationToolSet,Ir as defineApplicationTool};
1
+ import{Un,Bn,_o}from"./chunk-cvx7r35k.js";export{_o as ApplicationToolRegistry,Bn as applicationToolSet,Un as defineApplicationTool};
@@ -1 +1 @@
1
- import{ei,An,Ve,mn}from"../chunk-9rvf1am9.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?ei(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!Ve(i)){let c=mn(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(Ve(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(Ve(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=mn(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=mn(r),m=Ve(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:An(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:An(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
1
+ import{ar,go,tt,An}from"../chunk-yc4cdg65.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?ar(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!tt(i)){let c=An(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(tt(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(tt(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=An(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=An(r),m=tt(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:go(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:go(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
@@ -1 +1 @@
1
- import{ei,An,Ve,mn}from"../chunk-9rvf1am9.js";export{ei as elicitationFields,An as elicitationLabels,mn as elicitationOptions,Ve as isMultiSelect};
1
+ import{ar,go,tt,An}from"../chunk-yc4cdg65.js";export{ar as elicitationFields,go as elicitationLabels,An as elicitationOptions,tt as isMultiSelect};
@@ -1 +1 @@
1
- import{va,Xo,za,Va}from"../chunk-vjmgh1q9.js";export{va as PERMISSION_KIND_GROUP_ORDER,za as isAllowKind,Va as isAlwaysKind,Xo as sortPermissionOptions};
1
+ import{Zs,Ji,qa,Ka}from"../chunk-6ehhap9k.js";export{Zs as PERMISSION_KIND_GROUP_ORDER,qa as isAllowKind,Ka as isAlwaysKind,Ji as sortPermissionOptions};
@@ -1 +1 @@
1
- import{Jo}from"../chunk-qdgsg6v4.js";import"../chunk-vjmgh1q9.js";export{Jo as PermissionView};
1
+ import{Qi}from"../chunk-k4xsxxy7.js";import"../chunk-6ehhap9k.js";export{Qi as PermissionView};
@@ -1 +1 @@
1
- import{Pa,fa,Ia,Qo}from"../chunk-vypkwd0x.js";export{Qo as SchemaElicitationForm,Pa as elicitationFields,fa as initialValues,Ia as isAnswered};
1
+ import{Ra,Ws,La,Zi}from"../chunk-swt6dntp.js";export{Zi as SchemaElicitationForm,Ra as elicitationFields,Ws as initialValues,La as isAnswered};
@@ -1 +1 @@
1
- import{Yo}from"../chunk-tjfjvzv5.js";export{Yo as UrlElicitationCard};
1
+ import{Wi}from"../chunk-easm0z49.js";export{Wi as UrlElicitationCard};
@@ -1,2 +1,2 @@
1
- import{o}from"./chunk-xqwbn2ph.js";import{e}from"./chunk-pwcw4zp2.js";import{Ge,rt,Ne}from"./chunk-xbp4r3n4.js";import{inSessionTree as m}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as f,Fragment as x}from"react/jsx-runtime";var p=[];function Qt({sessionId:s}){let n=o((t)=>t.sessions),{host:u}=e(),d=o((t)=>t.actions),a=d.some((t)=>m(n,s,t.sessionId))?d.filter((t)=>m(n,s,t.sessionId)):p,i=a.filter(Ge).filter((t)=>{if(t.sessionId!==s||n[s]?.subagent!==void 0)return!0;let r=t.params._meta?.codex;return!(typeof r==="object"&&r!==null&&("delivery"in r)&&r.delivery==="async")}),c=a.filter((t)=>!Ge(t));return f(x,{children:[c.length>0&&l("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:c.map((t)=>f("div",{children:[t.sessionId!==s&&l("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:t.sessionId===null?"":n[t.sessionId]?.title??u.t("subagents.untitled")}),l(Ne,{action:t})]},t.id))}),i[0]!==void 0&&l(rt,{action:i[0],total:i.length},i[0].id)]})}
2
- export{Qt};
1
+ import{o}from"./chunk-pdmayjan.js";import{e}from"./chunk-abgdqy92.js";import{Ke,dt,we}from"./chunk-tc3t2sgb.js";import{inSessionTree as m}from"@nyssance/codex-acp-v2/client";import{jsx as l,jsxs as f,Fragment as x}from"react/jsx-runtime";var p=[];function jt({sessionId:s}){let n=o((t)=>t.sessions),{host:u}=e(),d=o((t)=>t.actions),a=d.some((t)=>m(n,s,t.sessionId))?d.filter((t)=>m(n,s,t.sessionId)):p,i=a.filter(Ke).filter((t)=>{if(t.sessionId!==s||n[s]?.subagent!==void 0)return!0;let r=t.params._meta?.codex;return!(typeof r==="object"&&r!==null&&("delivery"in r)&&r.delivery==="async")}),c=a.filter((t)=>!Ke(t));return f(x,{children:[c.length>0&&l("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3 px-6 pb-3","data-session-actions":!0,children:c.map((t)=>f("div",{children:[t.sessionId!==s&&l("p",{className:"text-muted-foreground mb-1 truncate text-xs",children:t.sessionId===null?"":n[t.sessionId]?.title??u.t("subagents.untitled")}),l(we,{action:t})]},t.id))}),i[0]!==void 0&&l(dt,{action:i[0],total:i.length},i[0].id)]})}
2
+ export{jt};
@@ -0,0 +1,2 @@
1
+ import{Qn}from"./chunk-rh2yx0xq.js";import{Xo}from"./chunk-b4kh5nns.js";import{w}from"./chunk-pdmayjan.js";import{Je,Si}from"./chunk-rr9kc3n8.js";import{e}from"./chunk-abgdqy92.js";import{useCallback as s}from"react";import"@alwith/module-chat/search.css";import{jsx as m}from"react/jsx-runtime";var h="alwith-chat:find";function Ps(t){window.dispatchEvent(new CustomEvent(h,{detail:t}))}function Gt({sessionId:t,rootRef:p}){let{host:v,client:a}=e(),{t:l}=v,u=w(Je,(r)=>r),y=s(()=>p.current?.querySelector("[data-chat-scroll]")??null,[p]),S=s((r)=>u.sessionId===t?Qn(u.turns,r,u.terminals):[],[u,t]),b=s((r,i)=>Si(t,r,i),[t]),g=s(async(r)=>{await a.loadHistoryNavigation(t);let i=a.state.historyNavigation[t];for(let n of i?.turns??[]){if(r.aborted)return;if(!a.state.historyNavigation[t]?.loadedTurnIds.includes(n.turnId))await a.loadHistoryTurn(t,n.turnId)}let c=new Set;while(!r.aborted){let n=a.state.historyPages[t]?.cursor;if(n==null)return;if(c.has(n))throw Error("Chat history pagination returned a repeated cursor");c.add(n),await a.loadOlderHistory(t)}},[a,t]),{subscribeSearch:f,shouldOpenSearch:d}=v,E=s((r)=>{let i=(o)=>{if((o.metaKey||o.ctrlKey)&&!o.altKey&&!o.shiftKey&&o.key.toLowerCase()==="f"){if(d&&!d(o))return;o.preventDefault(),r()}},c=(o)=>{if(o.detail===t)r()};window.addEventListener("keydown",i),window.addEventListener(h,c);let n=f?.(r);return()=>{window.removeEventListener("keydown",i),window.removeEventListener(h,c),n?.()}},[f,d,t]);return m("div",{className:"absolute inset-x-0 top-0 z-30",children:m(Xo,{placement:"body",getViewport:y,findSourceMatches:S,revealTurn:b,prepareSource:g,subscribeOpen:E,labels:{search:l("conversation.search.label"),placeholder:l("conversation.search.placeholder"),previous:l("conversation.search.previous"),next:l("conversation.search.next")}},t)})}
2
+ export{Ps,Gt};
@@ -0,0 +1,2 @@
1
+ import{s,a,$n,n,h}from"./chunk-6c18ag8t.js";import{j}from"./chunk-gvqvw7ms.js";import{Ge}from"./chunk-6tj5e7fc.js";import{Ve}from"./chunk-heqa4swe.js";import{At,Ue}from"./chunk-a71j2n86.js";import{hasRename as F}from"@nyssance/codex-acp-v2/client";import{ArchiveIcon as D,ArchiveRestoreIcon as x,GitForkIcon as A,PencilIcon as H,Trash2Icon as N}from"lucide-react";import{useRef as R,useState as y}from"react";import{jsx as o,jsxs as b,Fragment as C}from"react/jsx-runtime";function Ao({sessionRow:e,active:p,onSelect:m,onForked:v=m,onHoverCardOpenChange:c,actions:d}){let t=s(),{t:f,i18n:S}=t,k=a(),l=n((i)=>i.runStates[e.sessionId]),I=$n(),u=()=>m(e);return o(Ge,{"data-session-id":e.sessionId,role:"button",tabIndex:0,active:p,onClick:u,onKeyDown:(i)=>{if(i.key==="Enter"||i.key===" ")i.preventDefault(),u()},media:t.SessionMedia?o(t.SessionMedia,{sessionId:e.sessionId,state:l?.state}):void 0,state:l?.state,interruption:l?.interruption??null,title:e.title??f("sessionList.untitled"),onHoverCardOpenChange:c,hoverCard:o(B,{sessionRow:e,onDelete:()=>I(e),onForked:v,actions:d}),meta:e.updatedAt!==null?o("span",{className:"text-muted-foreground shrink-0 text-xs",children:At(e.updatedAt,S.language)}):void 0,actions:l!=null?o(Ve,{title:f("sessionList.stop"),onStop:()=>h(t,k.stopSession(e.sessionId))}):void 0})}function B({sessionRow:e,onDelete:p,onForked:m,actions:v}){let c=s(),{t:d}=c,t=a(),f=n((r)=>F(r.agent)),S=n((r)=>r.connection==="ready"&&r.agent?.capabilities?.session?.fork!=null),[k,l]=y(!1),[I,u]=y(!1),i=R(!1);return o(Ue,{sessionRow:e,renaming:k,onRename:(r)=>{if(l(!1),r!==null)h(c,t.renameSession(e.sessionId,r))},actions:b(C,{children:[f&&o(j,{icon:o(H,{}),label:d("sessionList.rename"),onClick:()=>l(!0)}),v,e.archived?o(j,{icon:o(x,{}),label:d("sessionList.unarchive"),onClick:()=>void h(c,t.unarchive(e.sessionId))}):b(C,{children:[o(j,{icon:o(A,{}),label:d("sessionList.fork"),disabled:!S||I,onClick:()=>{if(i.current)return;i.current=!0,u(!0),h(c,t.fork(e.sessionId,e.cwd).then((r)=>{let g=t.state.sessionList.find((L)=>L.sessionId===r);if(!g)throw Error("Forked chat is missing from the session list");m(g)}).finally(()=>{i.current=!1,u(!1)}))}}),o(j,{icon:o(D,{}),label:d("sessionList.archive"),onClick:()=>void h(c,t.archive(e.sessionId))})]}),o(j,{variant:"destructive",icon:o(N,{}),label:d("sessionList.delete"),onClick:p})]})})}
2
+ export{Ao};
@@ -0,0 +1,2 @@
1
+ import{tn}from"./chunk-mg7kraha.js";import{createContext as l,useContext as a,useEffect as p,useSyncExternalStore as u}from"react";import{jsx as o}from"react/jsx-runtime";var g=l(null),P=l(null),r=new WeakMap;function We(e){let t=r.get(e);if(!t)t=tn(e),r.set(e,t);return t}function Ds({host:e,client:t,children:n}){let s=We(t);return s.bindHost(e),p(()=>s.bindHost(e),[s,e]),o(g,{value:e,children:o(P,{value:t,children:n})})}function d(){let e=a(g);if(e===null)throw Error("Plugins host is missing");return e}function Ze(){let e=a(P);if(e===null)throw Error("Plugins client is missing");return e}function ut(e){let t=Ze();return u((n)=>t.store.subscribe(n),()=>e(t.store.getState()),()=>e(t.store.getState()))}function i(e){let t=We(Ze());return u((n)=>t.subscribe(n),()=>e(t.getState()),()=>e(t.getState()))}function Qe(e,t){return t.then(()=>{},(n)=>{if(e.reportError)e.reportError(n);else console.error(n)})}
2
+ export{We,Ds,d,Ze,ut,i,Qe};
@@ -1,2 +1,2 @@
1
- import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function ji(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
2
- export{ji};
1
+ import{useCallback as f,useEffect as U,useRef as s,useState as X}from"react";var S=24,q=160,z=45,j=()=>{};function _i(e,Y,u=j){let r=s("following"),[A,b]=X(!0),D=s(Y);D.current=Y;let a=s(null),y=s(0),P=s(0),k=s(0),p=s(0),m=s(0),h=s(0),_=s(!1),g=s(null),o=f(()=>{if(a.current!==null)cancelAnimationFrame(a.current);a.current=null},[]),v=f(()=>{u(),o(),h.current++,g.current=null,m.current=0,r.current="reading",b(!1)},[o,u]),T=f(()=>{if(e===null||r.current!=="following"||a.current!==null)return;if(e.scrollTop>=Math.max(0,e.scrollHeight-e.clientHeight))return;y.current=performance.now(),P.current=e.scrollTop,k.current=0;let l=(c)=>{if(a.current=null,r.current!=="following")return;let i=Math.max(0,e.scrollHeight-e.clientHeight),w=i-e.scrollTop;if(w<=0)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||w<=1)e.scrollTop=i;else{let E=Math.max(0,c-y.current),H=e.scrollTop===P.current?k.current:0,L=e.scrollTop+H+(w-H)*(1-Math.exp(-E/z));e.scrollTop=L,P.current=e.scrollTop,k.current=L-e.scrollTop,a.current=requestAnimationFrame(l)}y.current=c,p.current=e.scrollTop};a.current=requestAnimationFrame(l)},[e]),d=f(()=>{u(),h.current++,g.current=null,m.current=0,r.current="following",b(!0),T()},[u,T]),B=f((l)=>{u(),o();let c=++h.current;return r.current="locating",_.current=l,g.current=null,m.current=0,b(l),{isCurrent:()=>h.current===c,finish:(i)=>{if(h.current!==c||e===null)return;e.scrollTo({top:i,behavior:"instant"}),p.current=e.scrollTop,r.current=l?"following":"reading"}}},[o,u,e]),x=f(()=>{if(h.current++,r.current==="locating")r.current=_.current?"following":"reading"},[]),G=f((l=null)=>{if(e===null)return;let c=g.current;if(c!==null&&e.scrollHeight!==c){if(g.current=null,e.scrollHeight<c&&e.scrollHeight-e.clientHeight-e.scrollTop<=S)d()}if(r.current==="following"&&l!==null)o(),e.scrollTo({top:l,behavior:"instant"}),p.current=e.scrollTop;else T()},[o,e,T,d]);return U(()=>{if(e===null)return;p.current=e.scrollTop,r.current=e.scrollHeight-e.clientHeight-e.scrollTop<=S?"following":"reading",b(r.current==="following");let l=!1,c=!1,i=null,w=e.closest('[data-slot="scroll-area"]'),F=w??e,E=(n)=>{if(g.current=null,(n<0||r.current==="locating")&&e.scrollHeight>e.clientHeight)v();else u();if(m.current=n,r.current==="reading"&&n>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1)d()},H=()=>{let n=e.scrollTop>p.current;p.current=e.scrollTop;let t=n&&m.current>0;if(m.current=0,l){c=n;return}if(r.current!=="reading"||!t)return;let M=D.current?q:S;if(e.scrollHeight-e.clientHeight-e.scrollTop<=M)d()},L=(n)=>{if(n.ctrlKey||n.deltaY===0)return;let t=n.target instanceof Element?n.target:null;while(t!==null&&t!==e){if(t.scrollHeight>t.clientHeight&&/auto|scroll/.test(getComputedStyle(t).overflowY)){if(n.deltaY<0?t.scrollTop>0:t.scrollTop+t.clientHeight<t.scrollHeight)return}t=t.parentElement}E(Math.sign(n.deltaY))},C=(n)=>{i=n.touches[0].clientY},O=(n)=>{let t=n.touches[0].clientY;if(i!==null&&t!==i)E(Math.sign(i-t));i=t},I=(n)=>{if(n.defaultPrevented||!(n.target instanceof Element))return;if(n.target.closest("input, textarea, select, button, a, [contenteditable='true']"))return;if(["ArrowUp","PageUp","Home"].includes(n.key)||n.key===" "&&n.shiftKey)E(-1);else if(["ArrowDown","PageDown","End"," "].includes(n.key))E(1)},N=(n)=>{let t=n.target instanceof Element?n.target.closest('[data-slot="scroll-area-scrollbar"][data-orientation="vertical"]'):null,M=t!==null&&t.closest('[data-slot="scroll-area"]')===w;if(l=(n.target===e||M)&&n.button===0&&e.scrollHeight>e.clientHeight,c=!1,l)v()},R=()=>{let n=D.current?q:S;if(l&&c&&e.scrollHeight-e.clientHeight-e.scrollTop<=n)d();l=!1},K=()=>{l=!1},W=(n)=>{if(!(n.target instanceof Element)||n.target.closest("[data-codex-disclosure]")===null)return;v(),g.current=e.scrollHeight};return e.addEventListener("scroll",H,{passive:!0}),e.addEventListener("wheel",L,{passive:!0}),e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchmove",O,{passive:!0}),e.addEventListener("keydown",I),F.addEventListener("pointerdown",N,{capture:!0}),window.addEventListener("pointerup",R),window.addEventListener("pointercancel",K),e.addEventListener("click",W,{capture:!0}),()=>{o(),x(),e.removeEventListener("scroll",H),e.removeEventListener("wheel",L),e.removeEventListener("touchstart",C),e.removeEventListener("touchmove",O),e.removeEventListener("keydown",I),F.removeEventListener("pointerdown",N,{capture:!0}),window.removeEventListener("pointerup",R),window.removeEventListener("pointercancel",K),e.removeEventListener("click",W,{capture:!0})}},[e,o,x,u,d,v]),{isFollowing:A,scrollToBottom:d,stopFollowing:v,schedulePin:T,contentResized:G,beginLocate:B,cancelLocation:x}}
2
+ export{_i};
@@ -0,0 +1,2 @@
1
+ function He(){if(typeof navigator>"u")return!1;let a=navigator.userAgentData?.platform;return/mac/i.test(a??navigator.platform)}function Or(a){if(a.shiftKey||a.altKey)return!1;return He()?a.metaKey&&!a.ctrlKey:a.ctrlKey&&!a.metaKey}
2
+ export{He,Or};
@@ -1,4 +1,4 @@
1
- import{ct,dt,hn}from"./chunk-vmg3evhm.js";import{pt,h}from"./chunk-5ygdb72w.js";import{InputGroupTextarea as R}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as M}from"cn";import{forwardRef as F,useCallback as K,useEffect as T,useImperativeHandle as L,useRef as d}from"react";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,N=()=>!1,En=F(({onChange:c,onKeyDown:b,onCompositionStart:y,onCompositionEnd:I,className:E,placeholder:C,bashMode:S=!1,isSendShortcut:H=z,isNewlineShortcut:P=N,...v},k)=>{let n=pt(),p=h(),i=d(!1),s=d(!1),a=d(null),l=d(null),o=K(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||i.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);T(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([u])=>{if(u&&u.contentRect.width!==t)t=u.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),T(o,[o,n?.textInput.value,v.value]);let m=S&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(i.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||s.current)return;if(b?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
2
- `&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(P(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:u,value:f}=t,g=`${f.slice(0,r)}
3
- ${f.slice(u)}`;if(n)n.textInput.setInput(g);else t.value=g;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:u}=ct(t),f=dt(t);if(r.length>0)e.preventDefault(),p.add(r);else if(u&&!f)e.preventDefault()},D=n?{value:i.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=i.current?e.currentTarget.value:hn(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!i.current)hn(e.currentTarget);o(),c?.(e)}};return L(k,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>i.current||s.current,getTextarea:()=>a.current}),[]),q(R,{"data-chat-input":!0,ref:a,rows:3,className:M("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",E),name:"message",onCompositionEnd:(e)=>{i.current=!1;let t=hn(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),I?.(e),s.current=!0,requestAnimationFrame(()=>{s.current=!1})},onCompositionStart:(e)=>{s.current=!1,i.current=!0,y?.(e)},onKeyDown:w,onPaste:A,placeholder:C,...v,...D})});En.displayName="PromptInputTextarea";
4
- export{En};
1
+ import{kt,St,Ln}from"./chunk-41yz7txv.js";import{Mt,g}from"./chunk-86821qec.js";import{InputGroupTextarea as R}from"@nyssance/shadcn/vega/components/ui/input-group";import{cn as M}from"cn";import{forwardRef as F,useCallback as K,useEffect as T,useImperativeHandle as L,useRef as d}from"react";import{jsx as q}from"react/jsx-runtime";var z=(c)=>!c.shiftKey,N=()=>!1,fo=F(({onChange:c,onKeyDown:b,onCompositionStart:y,onCompositionEnd:I,className:E,placeholder:C,bashMode:S=!1,isSendShortcut:H=z,isNewlineShortcut:P=N,...h},k)=>{let n=Mt(),p=g(),i=d(!1),s=d(!1),a=d(null),l=d(null),o=K(()=>{if(globalThis.CSS?.supports?.("field-sizing","content")||l.current!==null)return;l.current=requestAnimationFrame(()=>{l.current=null;let e=a.current;if(!e||i.current)return;e.style.height="auto",e.style.height=`${e.scrollHeight}px`})},[]);T(()=>{let e=a.current;if(!e||globalThis.CSS?.supports?.("field-sizing","content"))return;let t,r=new ResizeObserver(([u])=>{if(u&&u.contentRect.width!==t)t=u.contentRect.width,o()});return r.observe(e),o(),()=>{if(r.disconnect(),l.current!==null)cancelAnimationFrame(l.current);l.current=null}},[o]),T(o,[o,n?.textInput.value,h.value]);let m=S&&(n?.textInput.value??"").startsWith("!"),w=(e)=>{if(i.current||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||s.current)return;if(b?.(e),e.defaultPrevented)return;if(e.key.length===1&&e.key.charCodeAt(0)<32&&e.key!==`
2
+ `&&e.key!=="\r"&&e.key!=="\t"){e.preventDefault();return}if(m&&n){let t=e.currentTarget.selectionStart===0&&e.currentTarget.selectionEnd===0;if(e.key==="Escape"||(e.key==="Backspace"||e.key==="Delete")&&t){e.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(e.key==="Enter"){if(P(e.nativeEvent)){e.preventDefault();let t=e.currentTarget,{selectionStart:r,selectionEnd:u,value:f}=t,v=`${f.slice(0,r)}
3
+ ${f.slice(u)}`;if(n)n.textInput.setInput(v);else t.value=v;let x=r+1;t.setSelectionRange(x,x),o();return}if(H(e.nativeEvent)){e.preventDefault();let t=e.currentTarget.form;if(!t)return;let r=t.querySelector('button[type="submit"]');if(!r||r.disabled)return;t.requestSubmit(r)}}if(e.key==="Backspace"&&e.currentTarget.value===""&&p.files.length>0){e.preventDefault();let t=p.files.at(-1);if(t)p.remove(t.id)}},A=(e)=>{let t=e.clipboardData?.items;if(!t)return;let{imageFiles:r,sawNonImageFile:u}=kt(t),f=St(t);if(r.length>0)e.preventDefault(),p.add(r);else if(u&&!f)e.preventDefault()},D=n?{value:i.current&&a.current?a.current.value:m?n.textInput.value.slice(1):n.textInput.value,onChange:(e)=>{let t=i.current?e.currentTarget.value:Ln(e.currentTarget);n.textInput.setInput(m?`!${t}`:t),o(),c?.(e)}}:{onChange:(e)=>{if(!i.current)Ln(e.currentTarget);o(),c?.(e)}};return L(k,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},isComposing:()=>i.current||s.current,getTextarea:()=>a.current}),[]),q(R,{"data-chat-input":!0,ref:a,rows:3,className:M("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",E),name:"message",onCompositionEnd:(e)=>{i.current=!1;let t=Ln(e.currentTarget);n?.textInput.setInput(m?`!${t}`:t),o(),I?.(e),s.current=!0,requestAnimationFrame(()=>{s.current=!1})},onCompositionStart:(e)=>{s.current=!1,i.current=!0,y?.(e)},onKeyDown:w,onPaste:A,placeholder:C,...h,...D})});fo.displayName="PromptInputTextarea";
4
+ export{fo};
@@ -0,0 +1,2 @@
1
+ import{wt}from"./chunk-pk931bpm.js";import{o}from"./chunk-pdmayjan.js";import{e,x}from"./chunk-abgdqy92.js";import{X,y,Y}from"./chunk-p781sb6h.js";import{isBooleanOption as U,isGroupedSelect as q,isSelectOption as A}from"@nyssance/codex-acp-v2/client";import{Zap as Z}from"lucide-react";import{memo as D,useRef as F}from"react";import{jsx as w}from"react/jsx-runtime";function H({sessionId:l,options:u,disabled:B,onModelChange:h,onConfigChange:C,defaultGroup:G={id:"models",name:"Models"},catalog:I=(c)=>c,headerAction:L}){let{host:c,client:N}=e(),{t:i}=c,P=o((n)=>Boolean(n.configPending[l])),p=F({sessionId:l,model:!0}),b=P&&(p.current.sessionId!==l||p.current.model),k=o((n)=>{let r=n.sessions[l];return r?.state==="running"||r?.state==="requires_action"}),t=y(u,"model"),a=y(u,"thought_level"),O=u.filter((n)=>n.configId!=="collaboration_mode"&&(n.category==="model_config"||n.category!=="mode"&&n!==t&&n!==a)),v=O.filter(A),m=O.filter(U);if(!t&&!a&&v.length===0&&m.length===0)return null;let f=(n,r)=>{if(r===n.currentValue)return Promise.resolve();p.current={sessionId:l,model:n===t};let d=C?C(n.configId,r):N.setConfig(l,n.configId,r);return x(c,d),d},g=a?X(a):[],z=g.reduce((n,r)=>r.name.length>=n.length?r.name:n,""),R=t?Y(t):i("composer.model"),_=(n)=>({api_id:n.value,label:n.name}),S=I(t&&q(t.options)?t.options.map((n)=>({id:n.groupId,name:n.name,models:n.options.map(_)})):[{...G,models:t?X(t).map(_):[]}]),V=S.flatMap((n)=>n.models),M=V.find((n)=>n.api_id===t?.currentValue)??{api_id:t?.currentValue??"",label:R},s=m.find((n)=>n.configId==="fast_mode"||n.configId==="fast-mode");return w(wt,{disabled:B||b||k,switching:b,value:{...M,label:M.shortLabel??M.label},compactCatalog:!0,models:V,showModelList:Boolean(t),onChange:(n)=>{if(n.api_id===t?.currentValue)return;if(h)h(n.api_id);else if(t)f(t,n.api_id)},header:{name:t?.name??i("composer.model"),action:L},modelGroups:S,t:i,effortConfig:a&&g.length>0?{name:"Effort",value:a.currentValue,levels:g,sizer:z,onChange:(n)=>f(a,n)}:void 0,selectOptions:v.map((n)=>({id:n.configId,name:n.name,value:n.currentValue,options:X(n).map((r)=>({value:r.value,label:r.name})),onChange:(r)=>f(n,r)})),booleanOptions:[{id:"fast_mode",name:i("composer.fastMode"),currentValue:s?.currentValue??!1,disabled:!s,title:!s?i("composer.fastModeUnsupported"):void 0,icon:w(Z,{className:"size-4","aria-hidden":"true"})},...m.filter((n)=>n!==s).map((n)=>({id:n.configId,name:n.name,currentValue:n.currentValue}))],onBooleanChange:(n,r)=>{let d=n==="fast_mode"?s:m.find((E)=>E.configId===n);if(!d)throw Error(`Unknown boolean config: ${n}`);f(d,r)}})}var gn=D(H);
2
+ export{gn};
@@ -0,0 +1,2 @@
1
+ import{c}from"./chunk-wf7kfk3p.js";import{fs,hs}from"./chunk-g8w06bdx.js";import{Ce}from"./chunk-pdmayjan.js";import{Kn,F}from"./chunk-s6b28p84.js";import{useEffect as g,useState as d}from"react";import{jsx as o,jsxs as y}from"react/jsx-runtime";var l=/\.(?:png|jpe?g|gif|webp|bmp|svg|pdf|docx?|xlsx?|pptx?|csv|tsv|zip|tar|gz|mp[34]|wav|ogg|webm|mov)(?:[?#].*)?$/i,u=/\.(?:png|jpe?g|gif|webp|bmp|svg)(?:[?#].*)?$/i;function es(e){if(e.type!=="link"&&e.type!=="image"||e.href===void 0)return!1;let r=e.href;return!/^www\.|^\/\//i.test(r)&&!/^[a-z][a-z\d+.-]*:/i.test(r.replace(/^file:/i,""))&&l.test(r)}function h({uri:e,directory:r}){let t=c(),[i,s]=d(),n=fs(e,r),p=n!==null&&t.loadImage!==void 0&&hs(r,n);if(g(()=>{if(!p||n===null||t.loadImage===void 0)return;let m=!1;return t.loadImage(n).then((a)=>{let f=/^data:([^;,]+);base64,(.*)$/s.exec(a);if(!f)throw Error("The image preview is not a data URL");if(!m)s({uri:e,mimeType:f[1],data:f[2]})},(a)=>{if(!m)s({uri:e,error:a instanceof Error?a.message:String(a)})}),()=>{m=!0}},[t,n,p,e]),i?.uri!==e)return null;if("error"in i)return o("div",{role:"alert",className:"text-muted-foreground text-xs",children:i.error});return o(F,{block:{type:"image",uri:e,data:i.data,mimeType:i.mimeType}})}function ts({links:e}){let r=Ce();return o("div",{className:"flex min-w-0 flex-col gap-2","data-wide-markdown-block":"true",children:e.map((t,i)=>{let s=t.text||Kn(t.href);return y("div",{className:"min-w-0",children:[r!==null&&u.test(t.href)&&o(h,{uri:t.href,directory:r}),o(F,{block:{type:"resource_link",uri:t.href,name:s}})]},`${i}-${t.href}`)})})}
2
+ export{es,ts};
@@ -1,2 +1,2 @@
1
- import{sr}from"./chunk-csgkwny6.js";import{CheckIcon as M,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function v(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function N({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[u,m]=f(!1),[l,b]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=()=>{if(r.scrollHeight===0){m(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");m(r.scrollHeight>A*x+1)};d();let t=new ResizeObserver(d);return t.observe(r),()=>t.disconnect()},[]),k(()=>{if(!u||l)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=new Map,t=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let y=g.target;if(!d.has(y))continue;v(y,g.isIntersecting&&g.intersectionRatio>=1,d.get(y))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let i of d.keys()){if(r.contains(i))continue;t?.unobserve(i),d.delete(i)}for(let i of r.querySelectorAll(L)){if(d.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");d.set(i,g),v(i,t===null&&R(i,r),g),t?.observe(i)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{t?.disconnect(),C.disconnect();for(let[i,g]of d)v(i,!0,g)}},[u,l]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:u&&!l?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),u&&!l&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),u&&p("button",{type:"button","aria-expanded":l,className:"codex-user-message-collapse-trigger",onClick:()=>{b((r)=>!r)},children:[e("span",{children:l?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:l?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function oo({text:n,label:o,host:s}){let[a,c]=f(!1),[u,m]=f(null),l=async()=>{c(!1),m(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(b){m(String(b)),s?.onCopyError?.(b)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:u??o,onClick:()=>void l(),children:a?e(M,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(sr,{src:c,alt:"",onClose:()=>a(!1)})]})}function ar({message:n,text:o,textParts:s,applicationReferences:a,mentions:c,images:u,messageTime:m,host:l,bubbleStyle:b}){let{t:r,openImage:d}=l;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[c.length>0&&e("div",{className:"codex-user-mentions",children:c.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),u.length>0&&e("div",{className:"codex-user-images",children:u.map((t)=>e(S,{image:t,openImage:d},`${t.mimeType}:${t.data}`))}),(o.length>0||a)&&e(h,{children:p("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:b,children:[a,s?s.map((t,x)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(N,{text:t.text,host:l}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},x)):e(N,{text:o,host:l})]})}),p("div",{className:"codex-user-actions",children:[e(oo,{text:o,label:r("actions.copy"),host:l}),m&&e("span",{className:"codex-user-time",title:m.full,children:m.short})]})]})})}
2
- export{oo,ar};
1
+ import{us}from"./chunk-tj4b0s68.js";import{CheckIcon as M,ChevronDownIcon as E,CopyIcon as T,FileIcon as w}from"lucide-react";import{useEffect as k,useLayoutEffect as H,useRef as I,useState as f}from"react";import{jsx as e,jsxs as p,Fragment as h}from"react/jsx-runtime";var A=20,L='a[href], area[href], button, input, select, textarea, summary, audio[controls], video[controls], iframe, [contenteditable]:not([contenteditable="false"]), [tabindex]:not([tabindex="-1"])';function v(n,o,s){if(n.toggleAttribute("inert",!o),!o){n.setAttribute("aria-hidden","true");return}if(s===null)n.removeAttribute("aria-hidden");else n.setAttribute("aria-hidden",s)}function R(n,o){let s=n.getBoundingClientRect(),a=o.getBoundingClientRect();return s.top>=a.top&&s.right<=a.right&&s.bottom<=a.bottom&&s.left>=a.left}function N({text:n,host:o}){let{t:s,Markdown:a}=o,c=I(null),[u,m]=f(!1),[l,b]=f(!1);return H(()=>{let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=()=>{if(r.scrollHeight===0){m(!1);return}let x=Number.parseFloat(getComputedStyle(r).lineHeight);if(!Number.isFinite(x))throw Error("Codex user message line height is invalid");m(r.scrollHeight>A*x+1)};d();let t=new ResizeObserver(d);return t.observe(r),()=>t.disconnect()},[]),k(()=>{if(!u||l)return;let r=c.current;if(!r)throw Error("Codex user message content is missing");let d=new Map,t=typeof IntersectionObserver>"u"?null:new IntersectionObserver((i)=>{for(let g of i){let y=g.target;if(!d.has(y))continue;v(y,g.isIntersecting&&g.intersectionRatio>=1,d.get(y))}},{root:r,rootMargin:"0px",threshold:1}),x=()=>{for(let i of d.keys()){if(r.contains(i))continue;t?.unobserve(i),d.delete(i)}for(let i of r.querySelectorAll(L)){if(d.has(i)||i.hasAttribute("inert"))continue;let g=i.getAttribute("aria-hidden");d.set(i,g),v(i,t===null&&R(i,r),g),t?.observe(i)}};x();let C=new MutationObserver(x);return C.observe(r,{childList:!0,subtree:!0}),()=>{t?.disconnect(),C.disconnect();for(let[i,g]of d)v(i,!0,g)}},[u,l]),p("div",{className:"codex-user-message-content",children:[e("div",{ref:c,className:u&&!l?"codex-user-message-text codex-user-message-text-collapsed":"codex-user-message-text",children:e(a,{text:n,streaming:!1})}),u&&!l&&e("span",{className:"codex-user-message-ellipsis","aria-hidden":"true",children:"…"}),u&&p("button",{type:"button","aria-expanded":l,className:"codex-user-message-collapse-trigger",onClick:()=>{b((r)=>!r)},children:[e("span",{children:l?s("stream.codex.showLess"):s("stream.codex.showMore")}),e(E,{className:l?"codex-user-message-collapse-chevron codex-user-message-collapse-chevron-expanded":"codex-user-message-collapse-chevron","aria-hidden":"true"})]})]})}function $o({text:n,label:o,host:s}){let[a,c]=f(!1),[u,m]=f(null),l=async()=>{c(!1),m(null);try{await(s?.copyText?s.copyText(n):navigator.clipboard.writeText(n)),c(!0),setTimeout(()=>c(!1),2000)}catch(b){m(String(b)),s?.onCopyError?.(b)}};return e("button",{type:"button",className:"codex-message-action","aria-label":o,title:u??o,onClick:()=>void l(),children:a?e(M,{className:"codex-message-action-confirmed"}):e(T,{})})}function S({image:n,openImage:o}){let[s,a]=f(!1),c=`data:${n.mimeType};base64,${n.data}`;return p(h,{children:[e("button",{type:"button",className:"codex-user-image",onClick:()=>o===void 0?a(!0):o(c),children:e("img",{src:c,alt:""})}),s&&e(us,{src:c,alt:"",onClose:()=>a(!1)})]})}function ds({message:n,text:o,textParts:s,applicationReferences:a,mentions:c,images:u,messageTime:m,host:l,bubbleStyle:b}){let{t:r,openImage:d}=l;return e("div",{"data-content-search-unit-key":n.id,"data-message-id":n.id,className:"timeline-break codex-user-message scroll-mt-4",children:p("div",{className:"group/codex-user codex-user-message-group",children:[c.length>0&&e("div",{className:"codex-user-mentions",children:c.map((t)=>p("span",{className:"codex-user-mention",title:t.title,children:[e(w,{"aria-hidden":"true"}),e("span",{className:"codex-user-mention-label",children:t.label})]},t.key))}),u.length>0&&e("div",{className:"codex-user-images",children:u.map((t)=>e(S,{image:t,openImage:d},`${t.mimeType}:${t.data}`))}),(o.length>0||a)&&e(h,{children:p("div",{"data-user-message-bubble":!0,tabIndex:0,className:"codex-user-bubble",style:b,children:[a,s?s.map((t,x)=>e("div",{className:"codex-user-text-part",children:t.question===void 0?e(N,{text:t.text,host:l}):p(h,{children:[e("div",{className:"codex-user-question-summary",title:t.question,children:t.question}),e("div",{className:"codex-user-question-answer",children:t.text})]})},x)):e(N,{text:o,host:l})]})}),p("div",{className:"codex-user-actions",children:[e($o,{text:o,label:r("actions.copy"),host:l}),m&&e("span",{className:"codex-user-time",title:m.full,children:m.short})]})]})})}
2
+ export{$o,ds};