@qitqode/qitqode-android-arm64 0.1.35 → 0.1.36

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 (451) hide show
  1. package/bundle/{chunk-7311jry1.js → chunk-00sr2gwz.js} +2 -2
  2. package/bundle/{chunk-azhw650z.js → chunk-02xcb52z.js} +2 -2
  3. package/bundle/{chunk-gws1rn1v.js → chunk-08q55ya0.js} +1 -1
  4. package/bundle/chunk-092bx2yw.js +2 -0
  5. package/bundle/{chunk-xgr6jnd6.js → chunk-0g25z230.js} +1 -1
  6. package/bundle/chunk-0j6dhrew.js +2 -0
  7. package/bundle/chunk-0jrgk6vk.js +2 -0
  8. package/bundle/chunk-0qn52zsd.js +2 -0
  9. package/bundle/chunk-10accb7b.js +2 -0
  10. package/bundle/{chunk-t3eymzg1.js → chunk-132tcp2j.js} +2 -2
  11. package/bundle/chunk-13kpdfr7.js +2 -0
  12. package/bundle/chunk-15s8zwgf.js +2 -0
  13. package/bundle/{chunk-nj4d554m.js → chunk-1bx2sjn6.js} +1 -1
  14. package/bundle/chunk-1kgyfja6.js +2 -0
  15. package/bundle/{chunk-bv29k2pf.js → chunk-1mcsf4yb.js} +2 -2
  16. package/bundle/{chunk-kwx9ewe0.js → chunk-1wpjmwnh.js} +1 -1
  17. package/bundle/chunk-1yv5h8k4.js +2 -0
  18. package/bundle/chunk-24rw1br0.js +3 -0
  19. package/bundle/{chunk-snr44en9.js → chunk-25bp7pcm.js} +2 -2
  20. package/bundle/{chunk-kmcsz8yv.js → chunk-2dkrfc1s.js} +1 -1
  21. package/bundle/chunk-364ccew0.js +3 -0
  22. package/bundle/{chunk-aa8hymcv.js → chunk-37dvnent.js} +2 -2
  23. package/bundle/chunk-3bkdbqjj.js +2 -0
  24. package/bundle/chunk-3bnqw3xp.js +3 -0
  25. package/bundle/{chunk-08m0hkdz.js → chunk-3dr4469n.js} +1 -1
  26. package/bundle/{chunk-hv6eccx1.js → chunk-3gw6r3hf.js} +179 -179
  27. package/bundle/{chunk-n96tvjgj.js → chunk-3mepk08v.js} +2 -2
  28. package/bundle/chunk-3sz6gw10.js +3 -0
  29. package/bundle/chunk-41x11r2s.js +3 -0
  30. package/bundle/{chunk-xqdrr7xg.js → chunk-45mjcxqk.js} +1 -1
  31. package/bundle/{chunk-qrtc3etn.js → chunk-4fa390yr.js} +2 -2
  32. package/bundle/chunk-4gs87ghj.js +3 -0
  33. package/bundle/chunk-4kqdzdv5.js +3 -0
  34. package/bundle/{chunk-3k2b05fv.js → chunk-4sazy0nq.js} +1 -1
  35. package/bundle/chunk-4tbqsrsn.js +2 -0
  36. package/bundle/{chunk-ngccf7ga.js → chunk-52b1v7mn.js} +1 -1
  37. package/bundle/chunk-53kns5wy.js +2 -0
  38. package/bundle/{chunk-11v7vz3y.js → chunk-549ptbaj.js} +1 -1
  39. package/bundle/chunk-559ek1ym.js +2 -0
  40. package/bundle/{chunk-34p46th6.js → chunk-5bate758.js} +1 -1
  41. package/bundle/{chunk-kdcnder5.js → chunk-5kmfnkzv.js} +1 -1
  42. package/bundle/{chunk-w1n4rf6n.js → chunk-5pkg052s.js} +2 -2
  43. package/bundle/chunk-5yfzzmv0.js +2 -0
  44. package/bundle/{chunk-rsszcqxd.js → chunk-60qyqqxx.js} +1 -1
  45. package/bundle/{chunk-94pcpztx.js → chunk-64s7vfj7.js} +2 -2
  46. package/bundle/{chunk-bzgj60w4.js → chunk-6sfhbckv.js} +1 -1
  47. package/bundle/{chunk-8762ty72.js → chunk-70pb4kcm.js} +2 -2
  48. package/bundle/{chunk-04hvaaje.js → chunk-72zxassf.js} +1 -1
  49. package/bundle/{chunk-yz6898wy.js → chunk-73ckx171.js} +1 -1
  50. package/bundle/chunk-7cbj28fp.js +2 -0
  51. package/bundle/chunk-7dep7g7c.js +2 -0
  52. package/bundle/{chunk-gj0wt0cy.js → chunk-7fawtcnn.js} +1 -1
  53. package/bundle/{chunk-zfn0z4sh.js → chunk-7gbytqkn.js} +2 -2
  54. package/bundle/{chunk-x66ycpfs.js → chunk-7jhrxzjx.js} +2 -2
  55. package/bundle/{chunk-09pkckr1.js → chunk-7vftsy04.js} +1 -1
  56. package/bundle/{chunk-zfd70p01.js → chunk-8dxdeksr.js} +1 -1
  57. package/bundle/{chunk-6styp5dn.js → chunk-8fgamz4y.js} +1 -1
  58. package/bundle/{chunk-9qdr9t8c.js → chunk-8q6z6emx.js} +1 -1
  59. package/bundle/{chunk-4ttf9rjd.js → chunk-8r3410c2.js} +1 -1
  60. package/bundle/{chunk-3mzcr3fw.js → chunk-8tp4whyw.js} +1 -1
  61. package/bundle/chunk-8yn64y27.js +2 -0
  62. package/bundle/{chunk-41v0x1jk.js → chunk-8yr682pv.js} +2 -2
  63. package/bundle/chunk-8ywa7az5.js +2 -0
  64. package/bundle/chunk-8ywdddts.js +2 -0
  65. package/bundle/chunk-8zmreqxx.js +2 -0
  66. package/bundle/chunk-92zjark4.js +2 -0
  67. package/bundle/chunk-983rqajz.js +7 -0
  68. package/bundle/{chunk-kjyw00jp.js → chunk-9cw4cnz0.js} +1 -1
  69. package/bundle/{chunk-2swch6mx.js → chunk-9dh9bc9d.js} +1 -1
  70. package/bundle/{chunk-y437vyza.js → chunk-9fkmhmh6.js} +1 -1
  71. package/bundle/{chunk-7vd91wsd.js → chunk-9nk0ts0s.js} +1 -1
  72. package/bundle/{chunk-p9cnzxb8.js → chunk-9s4whpg1.js} +2 -2
  73. package/bundle/{chunk-yajd975f.js → chunk-9xvctnjr.js} +1 -1
  74. package/bundle/chunk-9yakc5yv.js +28 -0
  75. package/bundle/{chunk-4wxxyrxn.js → chunk-9zre5e54.js} +1 -1
  76. package/bundle/chunk-a42q5mx4.js +3 -0
  77. package/bundle/{chunk-yt3f3j35.js → chunk-a9y27zd2.js} +1 -1
  78. package/bundle/{chunk-mex0fe9s.js → chunk-acyj91wq.js} +1 -1
  79. package/bundle/chunk-aq28ejhv.js +2 -0
  80. package/bundle/{chunk-pkc4ddw1.js → chunk-atpzz901.js} +1 -1
  81. package/bundle/chunk-ax1y4699.js +2 -0
  82. package/bundle/{chunk-dctj3c22.js → chunk-b0jh0rby.js} +2 -2
  83. package/bundle/chunk-b0x888w9.js +2 -0
  84. package/bundle/chunk-b10px5g4.js +2 -0
  85. package/bundle/chunk-b1qhpxee.js +2 -0
  86. package/bundle/chunk-b4ysd5b4.js +9 -0
  87. package/bundle/chunk-bcs2gvmp.js +2 -0
  88. package/bundle/{chunk-7mxt5b0h.js → chunk-bjcb9kt0.js} +1 -1
  89. package/bundle/{chunk-67d5d8mr.js → chunk-bnz0mxak.js} +1 -1
  90. package/bundle/{chunk-er38zew1.js → chunk-brh35yt5.js} +2 -2
  91. package/bundle/chunk-bs020a3x.js +2 -0
  92. package/bundle/{chunk-7eexey82.js → chunk-c72jajx9.js} +1 -1
  93. package/bundle/{chunk-81trveht.js → chunk-cagk1sjd.js} +1 -1
  94. package/bundle/{chunk-1byd3wma.js → chunk-cdh26622.js} +2 -2
  95. package/bundle/chunk-cjxcnhmq.js +14 -0
  96. package/bundle/{chunk-zddknkw7.js → chunk-cx0j6mpq.js} +1 -1
  97. package/bundle/{chunk-zh3fny3z.js → chunk-cx7p4ezk.js} +2 -2
  98. package/bundle/chunk-d0xs3j5h.js +2 -0
  99. package/bundle/{chunk-pxmhe36r.js → chunk-d1rn44wz.js} +1 -1
  100. package/bundle/chunk-d72rty3t.js +2 -0
  101. package/bundle/{chunk-0c6ep9mc.js → chunk-d93z6hrn.js} +1 -1
  102. package/bundle/{chunk-seghf5fc.js → chunk-dgx4rq86.js} +1 -1
  103. package/bundle/{chunk-qzj6027k.js → chunk-dh1h513y.js} +1 -1
  104. package/bundle/chunk-dj951pms.js +2 -0
  105. package/bundle/chunk-dp6zktka.js +2 -0
  106. package/bundle/{chunk-ba3h1pzs.js → chunk-dshnn54c.js} +1 -1
  107. package/bundle/{chunk-73myw3bj.js → chunk-dt899wbf.js} +2 -2
  108. package/bundle/chunk-dvqdtdza.js +2 -0
  109. package/bundle/{chunk-6ynxf3q7.js → chunk-dvxk6mr6.js} +2 -2
  110. package/bundle/chunk-dx7h5r8j.js +2 -0
  111. package/bundle/{chunk-bnss5dkk.js → chunk-dykqn0nj.js} +2 -2
  112. package/bundle/chunk-e03tgfpb.js +8 -0
  113. package/bundle/chunk-e07dbha4.js +2 -0
  114. package/bundle/chunk-e88wd9ex.js +2 -0
  115. package/bundle/{chunk-y9zstzed.js → chunk-eaqfnwdj.js} +1 -1
  116. package/bundle/chunk-ebabnv33.js +3 -0
  117. package/bundle/chunk-ebdpg3cn.js +2 -0
  118. package/bundle/{chunk-8vg4fmg2.js → chunk-ebkztnpf.js} +180 -178
  119. package/bundle/chunk-ec7pznsp.js +2 -0
  120. package/bundle/chunk-et7kz7kx.js +2 -0
  121. package/bundle/{chunk-kfmz2p27.js → chunk-ev3a2sxv.js} +2 -2
  122. package/bundle/{chunk-d00c1k9w.js → chunk-ewpzqnj4.js} +1 -1
  123. package/bundle/chunk-eyc6tb5h.js +2 -0
  124. package/bundle/chunk-eywryd3k.js +2 -0
  125. package/bundle/chunk-eze57bty.js +2 -0
  126. package/bundle/{chunk-qddt2gcs.js → chunk-ezrskm25.js} +1 -1
  127. package/bundle/chunk-f36ctnbp.js +3 -0
  128. package/bundle/{chunk-9ayxg9mq.js → chunk-f77nxt23.js} +2 -2
  129. package/bundle/chunk-fa47vzfc.js +2 -0
  130. package/bundle/chunk-fe397ph0.js +2 -0
  131. package/bundle/chunk-fjm9kstr.js +5 -0
  132. package/bundle/{chunk-exmw8jfa.js → chunk-fmxm4kaj.js} +2 -2
  133. package/bundle/chunk-fr75ytdr.js +2 -0
  134. package/bundle/chunk-fw2tnbt6.js +2 -0
  135. package/bundle/chunk-fwr2qgqb.js +2 -0
  136. package/bundle/chunk-g204pt98.js +2 -0
  137. package/bundle/chunk-g5prcvq2.js +14 -0
  138. package/bundle/{chunk-ggydr1ze.js → chunk-g794ey6w.js} +1 -1
  139. package/bundle/chunk-gcgmwqhh.js +2 -0
  140. package/bundle/{chunk-rmve21dh.js → chunk-gg7bg3ek.js} +1 -1
  141. package/bundle/{chunk-9x25d115.js → chunk-gkj4a27z.js} +1 -1
  142. package/bundle/chunk-gvtjxg0d.js +2 -0
  143. package/bundle/chunk-gw36mrg4.js +2 -0
  144. package/bundle/{chunk-z8gdmvgg.js → chunk-gwfx7tx7.js} +2 -2
  145. package/bundle/{chunk-q8hd01j7.js → chunk-gxmxx8jb.js} +1 -1
  146. package/bundle/{chunk-tge53d52.js → chunk-h1kg35mn.js} +1 -1
  147. package/bundle/chunk-h36qec67.js +2 -0
  148. package/bundle/{chunk-0msqaywp.js → chunk-h7w35n7w.js} +1 -1
  149. package/bundle/chunk-h9gtymfm.js +2 -0
  150. package/bundle/chunk-h9qn35pn.js +2 -0
  151. package/bundle/{chunk-mr8j7rc6.js → chunk-hb9mc5f9.js} +1 -1
  152. package/bundle/{chunk-5a7fs1hg.js → chunk-hbh2034m.js} +1 -1
  153. package/bundle/{chunk-df2aswz3.js → chunk-hcy77w6t.js} +1 -1
  154. package/bundle/{chunk-6a7c7wnf.js → chunk-hgsykghj.js} +2 -2
  155. package/bundle/chunk-hhjkezfz.js +2 -0
  156. package/bundle/chunk-hnz570f9.js +3 -0
  157. package/bundle/{chunk-tbgczapt.js → chunk-htkwc2se.js} +2 -2
  158. package/bundle/chunk-j21dnncc.js +4 -0
  159. package/bundle/{chunk-1yt5rsew.js → chunk-j63fkt6n.js} +1 -1
  160. package/bundle/chunk-ja18tvc7.js +2 -0
  161. package/bundle/{chunk-03xppy47.js → chunk-jcjaw7tk.js} +2 -2
  162. package/bundle/{chunk-jkh6eg7d.js → chunk-jf6ry79j.js} +4 -4
  163. package/bundle/{chunk-ke7n9t5p.js → chunk-jgz1a29w.js} +3 -3
  164. package/bundle/{chunk-ebcdxmdd.js → chunk-jngchw38.js} +1 -1
  165. package/bundle/{chunk-j5ymkhry.js → chunk-jqn27885.js} +1 -1
  166. package/bundle/chunk-jr2q5295.js +3 -0
  167. package/bundle/{chunk-hj3ddt53.js → chunk-jts0dma5.js} +2 -2
  168. package/bundle/chunk-jw16f6t0.js +4 -0
  169. package/bundle/chunk-jxg15t11.js +2 -0
  170. package/bundle/{chunk-7hm0c2yg.js → chunk-kqhh2pm9.js} +1 -1
  171. package/bundle/{chunk-0h8wdch6.js → chunk-kt0ej3nq.js} +1 -1
  172. package/bundle/chunk-kwzawx7r.js +2 -0
  173. package/bundle/{chunk-n6msxne8.js → chunk-kx2dp8ch.js} +1 -1
  174. package/bundle/chunk-m0mek3es.js +2 -0
  175. package/bundle/chunk-m31d2n6h.js +2 -0
  176. package/bundle/{chunk-egn55fa2.js → chunk-mcc5ynma.js} +3 -3
  177. package/bundle/{chunk-md8161zd.js → chunk-mdzzcrf9.js} +2 -2
  178. package/bundle/{chunk-gckgaqqr.js → chunk-mqtqcc10.js} +2 -2
  179. package/bundle/{chunk-ynwkr3yh.js → chunk-mvnxwwe7.js} +2 -2
  180. package/bundle/{chunk-6a77w77q.js → chunk-mvsrzvc4.js} +4 -4
  181. package/bundle/{chunk-b4knxpqh.js → chunk-mw2hr4pd.js} +1 -1
  182. package/bundle/{chunk-vszbqv24.js → chunk-mzbr0m2v.js} +1 -1
  183. package/bundle/{chunk-bj00xk8k.js → chunk-n0trgp1c.js} +2 -2
  184. package/bundle/chunk-n14qktbg.js +2 -0
  185. package/bundle/{chunk-yjk6zv2z.js → chunk-n2ygpy76.js} +1 -1
  186. package/bundle/{chunk-54wh8b12.js → chunk-n7xgfm5x.js} +2 -2
  187. package/bundle/{chunk-06k6egt2.js → chunk-neqy8j4n.js} +1 -1
  188. package/bundle/{chunk-nj61v4n7.js → chunk-njkserae.js} +1 -1
  189. package/bundle/{chunk-n6gtdx5h.js → chunk-nq495be3.js} +1 -1
  190. package/bundle/chunk-nr4q9fv7.js +2 -0
  191. package/bundle/{chunk-p3qkexpk.js → chunk-nsjp44fp.js} +1 -1
  192. package/bundle/chunk-nzzsj54n.js +2 -0
  193. package/bundle/chunk-p19qfw59.js +2 -0
  194. package/bundle/chunk-p2yxj9s4.js +2 -0
  195. package/bundle/{chunk-1dtzxt2w.js → chunk-p3rp99na.js} +1 -1
  196. package/bundle/chunk-p8czsxp0.js +3 -0
  197. package/bundle/chunk-p8k48st6.js +5 -0
  198. package/bundle/{chunk-79agp7v3.js → chunk-p8kpqyxb.js} +2 -2
  199. package/bundle/{chunk-9fxkh84w.js → chunk-p9zrk16q.js} +1 -1
  200. package/bundle/{chunk-6ged58yw.js → chunk-pmv8yr8c.js} +2 -2
  201. package/bundle/{chunk-ee23d2nz.js → chunk-pnq1h5az.js} +2 -2
  202. package/bundle/chunk-pq3qwxa8.js +2 -0
  203. package/bundle/{chunk-wfd5h6ax.js → chunk-pqnbdygz.js} +2 -2
  204. package/bundle/chunk-ps9p14y6.js +2 -0
  205. package/bundle/{chunk-zfcp509b.js → chunk-pxx2hz0g.js} +2 -2
  206. package/bundle/{chunk-txbwmwxj.js → chunk-q7rt76qw.js} +1 -1
  207. package/bundle/{chunk-rq4w0by4.js → chunk-q81m4m9z.js} +1 -1
  208. package/bundle/chunk-qagc6v17.js +2 -0
  209. package/bundle/{chunk-mq6jn47r.js → chunk-qb35hqm4.js} +1 -1
  210. package/bundle/chunk-qc0zhbhm.js +2 -0
  211. package/bundle/{chunk-keveg5gx.js → chunk-qdcf1ay5.js} +2 -2
  212. package/bundle/chunk-qp9y0g73.js +3 -0
  213. package/bundle/chunk-qpd0gab8.js +2 -0
  214. package/bundle/{chunk-axdzm75h.js → chunk-qqne79vp.js} +2 -2
  215. package/bundle/{chunk-g4gjz7sq.js → chunk-qs4wef8c.js} +1 -1
  216. package/bundle/chunk-r0ewmh6f.js +2 -0
  217. package/bundle/chunk-r3df289z.js +2 -0
  218. package/bundle/{chunk-by855es0.js → chunk-r58gzg6m.js} +1 -1
  219. package/bundle/{chunk-fmq0m4k5.js → chunk-r6ndvzd0.js} +1 -1
  220. package/bundle/chunk-r78kfhvz.js +2 -0
  221. package/bundle/{chunk-dyv2hqvc.js → chunk-rcyhqkv5.js} +1 -1
  222. package/bundle/{chunk-t2vm08v6.js → chunk-rd4x4tsv.js} +1 -1
  223. package/bundle/chunk-rebsz3bj.js +2 -0
  224. package/bundle/{chunk-yp5bypsp.js → chunk-rexdr63q.js} +2 -2
  225. package/bundle/{chunk-1me21qdc.js → chunk-rgxy4ngt.js} +1 -1
  226. package/bundle/chunk-rph5xswc.js +2 -0
  227. package/bundle/{chunk-dcndy4sr.js → chunk-rph9zj24.js} +1 -1
  228. package/bundle/chunk-rqmvj7f4.js +3 -0
  229. package/bundle/{chunk-ryfqwsft.js → chunk-rrd0jf5m.js} +1 -1
  230. package/bundle/{chunk-mpygdb5a.js → chunk-s8mghr5a.js} +2 -2
  231. package/bundle/chunk-schtpyjs.js +2 -0
  232. package/bundle/{chunk-nmehsm3w.js → chunk-shwjjrj8.js} +1 -1
  233. package/bundle/{chunk-08f4khsw.js → chunk-snt1kefv.js} +3 -3
  234. package/bundle/{chunk-s8hq6trz.js → chunk-srxx88nb.js} +1 -1
  235. package/bundle/{chunk-gy0wm7e1.js → chunk-std2bgv7.js} +2 -2
  236. package/bundle/{chunk-dffhkd30.js → chunk-swcgsrbj.js} +1 -1
  237. package/bundle/chunk-sy3n0qhc.js +800 -0
  238. package/bundle/{chunk-wgk7ynt3.js → chunk-t01bhw5h.js} +3 -3
  239. package/bundle/chunk-t0jjes17.js +2 -0
  240. package/bundle/{chunk-yprmd5b7.js → chunk-t5tfppwv.js} +2 -2
  241. package/bundle/chunk-t8rke5fr.js +8 -0
  242. package/bundle/chunk-tabcpx7t.js +4 -0
  243. package/bundle/{chunk-gmzrvxnv.js → chunk-tdmn21z0.js} +2 -2
  244. package/bundle/{chunk-71zw0qhf.js → chunk-tdxbm1nd.js} +1 -1
  245. package/bundle/{chunk-p825vsjy.js → chunk-te5tfq79.js} +1 -1
  246. package/bundle/chunk-tf4xwqz7.js +2 -0
  247. package/bundle/{chunk-fg35hwa0.js → chunk-tgd5ctnt.js} +2 -2
  248. package/bundle/chunk-tqazneg6.js +2 -0
  249. package/bundle/{chunk-qa2j0qmy.js → chunk-txqc7543.js} +2 -2
  250. package/bundle/chunk-tzg4z74d.js +2 -0
  251. package/bundle/{chunk-a3a1trap.js → chunk-v3x5nrc4.js} +2 -2
  252. package/bundle/chunk-v8dd6tyn.js +2 -0
  253. package/bundle/chunk-v8ksjgc3.js +2 -0
  254. package/bundle/chunk-v8vcwx23.js +2 -0
  255. package/bundle/chunk-vc4e6xc4.js +10 -0
  256. package/bundle/chunk-vcrakhgy.js +3 -0
  257. package/bundle/{chunk-a1hzeejj.js → chunk-vdpd4akk.js} +2 -2
  258. package/bundle/{chunk-6p7yg5sr.js → chunk-vftqwdpg.js} +1 -1
  259. package/bundle/chunk-vg41rtdy.js +2 -0
  260. package/bundle/{chunk-r0k21apr.js → chunk-vgaxv70x.js} +2 -2
  261. package/bundle/{chunk-nkk4fyqf.js → chunk-vgnddhdj.js} +1 -1
  262. package/bundle/{chunk-xd3xc1vv.js → chunk-vm58fkrv.js} +1 -1
  263. package/bundle/{chunk-qg2vk5fw.js → chunk-vsys768k.js} +1 -1
  264. package/bundle/{chunk-s4qtphwx.js → chunk-w03fdrxe.js} +1 -1
  265. package/bundle/chunk-w1ypf53m.js +3 -0
  266. package/bundle/chunk-w24660y4.js +3 -0
  267. package/bundle/{chunk-z1ay3qd0.js → chunk-w3bmf3zz.js} +1 -1
  268. package/bundle/{chunk-5e4fxy99.js → chunk-w57j3pgz.js} +82 -82
  269. package/bundle/{chunk-vsr8mnj6.js → chunk-w5940jxm.js} +1 -1
  270. package/bundle/chunk-w6rf2knb.js +2 -0
  271. package/bundle/chunk-w9pdvcf9.js +3 -0
  272. package/bundle/{chunk-yk97q51d.js → chunk-wev34grp.js} +2 -2
  273. package/bundle/chunk-wh7r96t3.js +2 -0
  274. package/bundle/{chunk-1pg6pv0m.js → chunk-wm77svwm.js} +1 -1
  275. package/bundle/chunk-wnjqaxze.js +2 -0
  276. package/bundle/{chunk-qkjdr337.js → chunk-x6rr6ss1.js} +1 -1
  277. package/bundle/{chunk-bbzztav6.js → chunk-xdacgfba.js} +1 -1
  278. package/bundle/{chunk-6p94fpbn.js → chunk-xdjwapwy.js} +2 -2
  279. package/bundle/chunk-xfz698bh.js +2 -0
  280. package/bundle/{chunk-zwnhf4z1.js → chunk-xhbb8b5g.js} +1 -1
  281. package/bundle/chunk-xqwvx3qq.js +2 -0
  282. package/bundle/chunk-xxj3sgd5.js +2 -0
  283. package/bundle/chunk-xyjehgzm.js +3 -0
  284. package/bundle/{chunk-cs38g1bx.js → chunk-y0ydzdfc.js} +1 -1
  285. package/bundle/{chunk-wvf5q2hz.js → chunk-y1b2h15z.js} +1 -1
  286. package/bundle/{chunk-1gf116rg.js → chunk-yacccwf6.js} +1 -1
  287. package/bundle/chunk-ydc6ypjt.js +77 -0
  288. package/bundle/{chunk-dhqaqeq6.js → chunk-yeq7b87a.js} +1 -1
  289. package/bundle/chunk-yfp9y71y.js +2 -0
  290. package/bundle/chunk-yg9c1v8v.js +2 -0
  291. package/bundle/{chunk-e6xnynaz.js → chunk-yha554nm.js} +2 -2
  292. package/bundle/{chunk-rv1stdvb.js → chunk-yj6rbe9p.js} +2 -2
  293. package/bundle/chunk-yjjh339w.js +2 -0
  294. package/bundle/{chunk-sjw56r2n.js → chunk-yjp0btmq.js} +3 -3
  295. package/bundle/{chunk-c5pb87yf.js → chunk-ymtcm4xd.js} +1 -1
  296. package/bundle/chunk-yt6vd7a5.js +2 -0
  297. package/bundle/{chunk-ssk8tkwd.js → chunk-yw9pfqxt.js} +1 -1
  298. package/bundle/{chunk-g6cyhxwg.js → chunk-yykjvt7f.js} +2 -2
  299. package/bundle/{chunk-sfes6pp1.js → chunk-yzh4rmrt.js} +1 -1
  300. package/bundle/chunk-yzq3c3dq.js +2 -0
  301. package/bundle/{chunk-prh3c44x.js → chunk-yzwgvjzd.js} +1 -1
  302. package/bundle/chunk-z1j25911.js +2 -0
  303. package/bundle/{chunk-rkwrjphh.js → chunk-z1rshv6g.js} +1 -1
  304. package/bundle/chunk-z29ahthm.js +2 -0
  305. package/bundle/{chunk-jgjnz82k.js → chunk-zaan8jk6.js} +1 -1
  306. package/bundle/{chunk-6gb65bv1.js → chunk-zbqzm65q.js} +1 -1
  307. package/bundle/{chunk-bk4phk66.js → chunk-zesbm9k1.js} +1 -1
  308. package/bundle/{chunk-c6vfwjg4.js → chunk-zfcfyagt.js} +1 -1
  309. package/bundle/{chunk-ywkvq7zb.js → chunk-zfnbk5gy.js} +1 -1
  310. package/bundle/chunk-zgre4gc2.js +2 -0
  311. package/bundle/{chunk-z7430qxg.js → chunk-zrmx397j.js} +1 -1
  312. package/bundle/chunk-zthkjx33.js +2 -0
  313. package/bundle/chunk-zxddasg8.js +2 -0
  314. package/bundle/index.js +3 -3
  315. package/bundle/parser.worker.js +2 -2
  316. package/bundle/worker.js +1 -1
  317. package/package.json +1 -1
  318. package/bundle/chunk-0442cmw2.js +0 -2
  319. package/bundle/chunk-085pvqr4.js +0 -2
  320. package/bundle/chunk-0x5jn813.js +0 -2
  321. package/bundle/chunk-11g2rpv8.js +0 -3
  322. package/bundle/chunk-28t9akfn.js +0 -2
  323. package/bundle/chunk-2h1fcqvf.js +0 -2
  324. package/bundle/chunk-2kens6wh.js +0 -2
  325. package/bundle/chunk-2scyp9ns.js +0 -2
  326. package/bundle/chunk-2tw58kwb.js +0 -2
  327. package/bundle/chunk-2vxx0tax.js +0 -2
  328. package/bundle/chunk-2ybt3p5z.js +0 -2
  329. package/bundle/chunk-2zpkw3ge.js +0 -2
  330. package/bundle/chunk-31g86yn6.js +0 -2
  331. package/bundle/chunk-397be2x0.js +0 -2
  332. package/bundle/chunk-3c78nkgn.js +0 -2
  333. package/bundle/chunk-3d91q2qd.js +0 -2
  334. package/bundle/chunk-43yv7tz1.js +0 -2
  335. package/bundle/chunk-496ajawz.js +0 -2
  336. package/bundle/chunk-499gp5g5.js +0 -2
  337. package/bundle/chunk-4hzm14xt.js +0 -3
  338. package/bundle/chunk-4xw14sed.js +0 -2
  339. package/bundle/chunk-536naqqv.js +0 -2
  340. package/bundle/chunk-57nvmhjq.js +0 -2
  341. package/bundle/chunk-5he3d7cy.js +0 -2
  342. package/bundle/chunk-5qr286w8.js +0 -2
  343. package/bundle/chunk-606vpgc4.js +0 -4
  344. package/bundle/chunk-6a1skxcj.js +0 -3
  345. package/bundle/chunk-6cj7cn5x.js +0 -2
  346. package/bundle/chunk-6hybp2mt.js +0 -2
  347. package/bundle/chunk-6y423jax.js +0 -3
  348. package/bundle/chunk-72ghkgcn.js +0 -2
  349. package/bundle/chunk-741teh8k.js +0 -2
  350. package/bundle/chunk-7b3wx6kn.js +0 -2
  351. package/bundle/chunk-891yevv2.js +0 -2
  352. package/bundle/chunk-8c1ypgw5.js +0 -3
  353. package/bundle/chunk-8ktgy41r.js +0 -2
  354. package/bundle/chunk-8q73cjyj.js +0 -2
  355. package/bundle/chunk-8rt63jbm.js +0 -2
  356. package/bundle/chunk-8y623qdx.js +0 -2
  357. package/bundle/chunk-921vn745.js +0 -2
  358. package/bundle/chunk-945ebhte.js +0 -2
  359. package/bundle/chunk-9548cc0c.js +0 -2
  360. package/bundle/chunk-9yrypq1r.js +0 -14
  361. package/bundle/chunk-a0rp7gh4.js +0 -77
  362. package/bundle/chunk-a48t0g95.js +0 -3
  363. package/bundle/chunk-a949at1c.js +0 -3
  364. package/bundle/chunk-akk84fnc.js +0 -2
  365. package/bundle/chunk-aw7j7brm.js +0 -2
  366. package/bundle/chunk-b6cybdj3.js +0 -2
  367. package/bundle/chunk-c5fa8cb1.js +0 -2
  368. package/bundle/chunk-ca4r31we.js +0 -2
  369. package/bundle/chunk-ckbwdrm3.js +0 -2
  370. package/bundle/chunk-cqj21rfj.js +0 -3
  371. package/bundle/chunk-cz3h5n1v.js +0 -3
  372. package/bundle/chunk-dhc6e1t7.js +0 -2
  373. package/bundle/chunk-dk6rbqvp.js +0 -2
  374. package/bundle/chunk-dk975etf.js +0 -3
  375. package/bundle/chunk-dwajajaq.js +0 -2
  376. package/bundle/chunk-dxcrggvq.js +0 -2
  377. package/bundle/chunk-dyt3n3fe.js +0 -2
  378. package/bundle/chunk-e74efvj2.js +0 -800
  379. package/bundle/chunk-e7ah0e61.js +0 -2
  380. package/bundle/chunk-e7v9trve.js +0 -11
  381. package/bundle/chunk-e8ws454m.js +0 -2
  382. package/bundle/chunk-efndtzby.js +0 -2
  383. package/bundle/chunk-eq2pepce.js +0 -2
  384. package/bundle/chunk-eva3nqqb.js +0 -14
  385. package/bundle/chunk-f3bnn9rf.js +0 -8
  386. package/bundle/chunk-f693s9vn.js +0 -2
  387. package/bundle/chunk-ftepqwyq.js +0 -2
  388. package/bundle/chunk-g18ax6yp.js +0 -2
  389. package/bundle/chunk-gadyp6mb.js +0 -2
  390. package/bundle/chunk-ge8315te.js +0 -5
  391. package/bundle/chunk-gk28ffhg.js +0 -2
  392. package/bundle/chunk-gpfc4z4v.js +0 -2
  393. package/bundle/chunk-gqvg02zp.js +0 -2
  394. package/bundle/chunk-gsyt2sv7.js +0 -2
  395. package/bundle/chunk-h3k1dk9m.js +0 -2
  396. package/bundle/chunk-h8c3dcqt.js +0 -2
  397. package/bundle/chunk-hfq11w4h.js +0 -2
  398. package/bundle/chunk-hw5qyht3.js +0 -3
  399. package/bundle/chunk-hwf58w1k.js +0 -2
  400. package/bundle/chunk-jyczz3yh.js +0 -8
  401. package/bundle/chunk-k8k8z6b7.js +0 -3
  402. package/bundle/chunk-kk3ve911.js +0 -2
  403. package/bundle/chunk-kv72hxkp.js +0 -3
  404. package/bundle/chunk-m4j7jyrd.js +0 -3
  405. package/bundle/chunk-mf3sm0pk.js +0 -2
  406. package/bundle/chunk-mkng9ykt.js +0 -2
  407. package/bundle/chunk-mxvypy3s.js +0 -2
  408. package/bundle/chunk-n5ypgxrn.js +0 -28
  409. package/bundle/chunk-n9xw9kqc.js +0 -2
  410. package/bundle/chunk-nc4wbc89.js +0 -2
  411. package/bundle/chunk-ngk67rt3.js +0 -3
  412. package/bundle/chunk-nj2bbtmx.js +0 -2
  413. package/bundle/chunk-nr1g57b2.js +0 -2
  414. package/bundle/chunk-p0ahbpxv.js +0 -2
  415. package/bundle/chunk-p7y8z5rd.js +0 -2
  416. package/bundle/chunk-pt26gerr.js +0 -2
  417. package/bundle/chunk-qkk1as5n.js +0 -2
  418. package/bundle/chunk-qsm9xw87.js +0 -2
  419. package/bundle/chunk-qw980y8h.js +0 -2
  420. package/bundle/chunk-r2w3gr8d.js +0 -2
  421. package/bundle/chunk-r5bqcpkz.js +0 -2
  422. package/bundle/chunk-r67c858b.js +0 -2
  423. package/bundle/chunk-r9fvfkee.js +0 -2
  424. package/bundle/chunk-rcn0dhbj.js +0 -2
  425. package/bundle/chunk-rq47pn3r.js +0 -2
  426. package/bundle/chunk-rvt1tdy8.js +0 -2
  427. package/bundle/chunk-ry7q8xn6.js +0 -2
  428. package/bundle/chunk-s27xvrft.js +0 -2
  429. package/bundle/chunk-s5nde2kd.js +0 -5
  430. package/bundle/chunk-scy39p6q.js +0 -2
  431. package/bundle/chunk-srpe3v8e.js +0 -9
  432. package/bundle/chunk-st5jaszz.js +0 -3
  433. package/bundle/chunk-t5qamf96.js +0 -2
  434. package/bundle/chunk-t9mz17gb.js +0 -3
  435. package/bundle/chunk-tns5x4w0.js +0 -3
  436. package/bundle/chunk-ttevj0pj.js +0 -2
  437. package/bundle/chunk-v7c54cyj.js +0 -2
  438. package/bundle/chunk-vgefaens.js +0 -2
  439. package/bundle/chunk-vv59b4re.js +0 -2
  440. package/bundle/chunk-vwqy7n3g.js +0 -2
  441. package/bundle/chunk-vysa9hp4.js +0 -7
  442. package/bundle/chunk-wn076jwj.js +0 -2
  443. package/bundle/chunk-x0m1qye9.js +0 -2
  444. package/bundle/chunk-xvntsbb1.js +0 -3
  445. package/bundle/chunk-y70aachh.js +0 -2
  446. package/bundle/chunk-yqk58hf6.js +0 -3
  447. package/bundle/chunk-ysgxt83y.js +0 -2
  448. package/bundle/chunk-ze9e6nt3.js +0 -3
  449. package/bundle/chunk-znzan00b.js +0 -3
  450. package/bundle/chunk-zrp55k47.js +0 -2
  451. package/bundle/chunk-zwdnh860.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$q as k,Eq as A,Jq as O3,Zq as l,ar as O,er as s,fr as S,hr as c,ir as u,jr as i,nr as I3,oq as T,vq as m}from"./chunk-z8gdmvgg.js";import{Cr as y,qr as q3,vr as v}from"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import{pv as j}from"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-3k2b05fv.js";function h(Q){switch(Q.type){case"text":case"error-text":return Q.value;case"execution-denied":return Q.reason??"Tool execution denied.";case"content":case"json":case"error-json":return JSON.stringify(Q.value)}}function C(Q){return Q?.providerOptions?.copilot??{}}function Z3(Q){let G=[];for(let{role:W,content:N,...q}of Q){let L=C({...q});switch(W){case"system":{G.push({role:"system",content:N,...L});break}case"user":{if(N.length===1&&N[0].type==="text"){G.push({role:"user",content:N[0].text,...C(N[0])});break}G.push({role:"user",content:N.map((Z)=>{let Y=C(Z);switch(Z.type){case"text":return{type:"text",text:Z.text,...Y};case"file":if(Z.mediaType.startsWith("image/")){let $=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${$};base64,${m(Z.data)}`},...Y}}else throw new y({functionality:`file part media type ${Z.mediaType}`})}}),...L});break}case"assistant":{let Z="",Y,$,J=[];for(let E of N){let _=C(E),X=E.providerOptions?.copilot?.reasoningOpaque;if(X&&!$)$=X;switch(E.type){case"text":{Z+=E.text;break}case"reasoning":{if(E.text)Y=E.text;break}case"tool-call":{J.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)},..._});break}}}G.push({role:"assistant",content:Z||null,tool_calls:J.length>0?J:void 0,reasoning_text:$?Y:void 0,reasoning_opaque:$,...L});break}case"tool":{for(let Z of N){if(Z.type==="tool-approval-response")continue;let Y=Z.output,$=C(Z);G.push({role:"tool",tool_call_id:Z.toolCallId,content:h(Y),...$})}break}default:throw Error(`Unsupported role: ${W}`)}}return G}function n({id:Q,model:G,created:W}){return{id:Q??void 0,modelId:G??void 0,timestamp:W!=null?new Date(W*1000):void 0}}function r(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=j.object({user:j.string().optional(),reasoningEffort:j.string().optional(),textVerbosity:j.string().optional(),thinking_budget:j.number().optional()});var t=j.object({error:j.object({message:j.string(),type:j.string().nullish(),param:j.any().nullish(),code:j.union([j.string(),j.number()]).nullish()})}),$3={errorSchema:t,errorToMessage:(Q)=>Q.error.message};function d(Q){return new TransformStream({start(G){G.enqueue({type:"stream-start",warnings:Q.warnings})},transform(G,W){if(Q.includeRawChunks)W.enqueue({type:"raw",rawValue:G.rawValue});if(!G.success){Q.onParseError(),W.enqueue({type:"error",error:G.error});return}Q.transformValue(G.value,W,G.rawValue)},flush:Q.flush})}function E3({tools:Q,toolChoice:G}){Q=Q?.length?Q:void 0;let W=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let N=[];for(let L of Q)if(L.type==="provider")W.push({type:"unsupported",feature:`tool type: ${L.type}`});else N.push({type:"function",function:{name:L.name,description:L.description,parameters:L.inputSchema}});if(G==null)return{tools:N,toolChoice:void 0,toolWarnings:W};let q=G.type;switch(q){case"auto":case"none":case"required":return{tools:N,toolChoice:q,toolWarnings:W};case"tool":return{tools:N,toolChoice:{type:"function",function:{name:G.toolName}},toolWarnings:W};default:throw new y({functionality:`tool choice type: ${q}`})}}class a{specificationVersion="v3";supportsStructuredOutputs;modelId;config;failedResponseHandler;chunkSchema;constructor(Q,G){this.modelId=Q,this.config=G;let W=G.errorStructure??$3;this.chunkSchema=h3(W.errorSchema),this.failedResponseHandler=c(W),this.supportsStructuredOutputs=G.supportsStructuredOutputs??!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){return this.config.supportedUrls?.()??{}}async getArgs({prompt:Q,maxOutputTokens:G,temperature:W,topP:N,topK:q,frequencyPenalty:L,presencePenalty:Z,providerOptions:Y,stopSequences:$,responseFormat:J,seed:E,toolChoice:_,tools:X}){let K=[],B=Object.assign(await k({provider:"copilot",providerOptions:Y,schema:g})??{},await k({provider:this.providerOptionsName,providerOptions:Y,schema:g})??{});if(q!=null)K.push({type:"unsupported",feature:"topK"});if(J?.type==="json"&&J.schema!=null&&!this.supportsStructuredOutputs)K.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:U,toolChoice:M,toolWarnings:V}=E3({tools:X,toolChoice:_});return{args:{model:this.modelId,user:B.user,max_tokens:G,temperature:W,top_p:N,frequency_penalty:L,presence_penalty:Z,response_format:J?.type==="json"?this.supportsStructuredOutputs===!0&&J.schema!=null?{type:"json_schema",json_schema:{schema:J.schema,name:J.name??"response",description:J.description}}:{type:"json_object"}:void 0,stop:$,seed:E,...Object.fromEntries(Object.entries(Y?.[this.providerOptionsName]??{}).filter(([H])=>!Object.keys(g.shape).includes(H))),reasoning_effort:B.reasoningEffort,verbosity:B.textVerbosity,messages:Z3(Q),tools:U,tool_choice:M,thinking_budget:B.thinking_budget},warnings:[...K,...V]}}async doGenerate(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N=JSON.stringify(G),{responseHeaders:q,value:L,rawValue:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(m3),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=L.choices[0],$=[],J=Y.message.content;if(J!=null&&J.length>0)$.push({type:"text",text:J,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let E=Y.message.reasoning_text;if(E!=null&&E.length>0)$.push({type:"reasoning",text:E,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});if(Y.message.tool_calls!=null)for(let K of Y.message.tool_calls)$.push({type:"tool-call",toolCallId:K.id??A(),toolName:K.function.name,input:K.function.arguments,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let _={[this.providerOptionsName]:{},...await this.config.metadataExtractor?.extractMetadata?.({parsedBody:Z})},X=L.usage?.completion_tokens_details;if(X?.accepted_prediction_tokens!=null)_[this.providerOptionsName].acceptedPredictionTokens=X?.accepted_prediction_tokens;if(X?.rejected_prediction_tokens!=null)_[this.providerOptionsName].rejectedPredictionTokens=X?.rejected_prediction_tokens;return{content:$,finishReason:{unified:r(Y.finish_reason),raw:Y.finish_reason??void 0},usage:{inputTokens:{total:L.usage?.prompt_tokens??void 0,noCache:void 0,cacheRead:L.usage?.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:L.usage?.completion_tokens??void 0,text:void 0,reasoning:L.usage?.completion_tokens_details?.reasoning_tokens??void 0},raw:L.usage??void 0},providerMetadata:_,request:{body:N},response:{...n(L),headers:q,body:Z},warnings:W}}async doStream(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N={...G,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},q=this.config.metadataExtractor?.createStreamExtractor(),{responseHeaders:L,value:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:N,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:u(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=[],$={unified:"other",raw:void 0},J={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},E=!0,_=this.providerOptionsName,X=!1,K=!1,B,U=(M,V)=>{V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:M.id??A(),toolName:M.function.name,input:M.function.arguments,providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),M.hasFinished=!0};return{stream:Z.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{$={unified:"error",raw:void 0}},transformValue:(M,V,H)=>{if(q?.processChunk(H),"error"in M){$={unified:"error",raw:void 0},V.enqueue({type:"error",error:M.error.message});return}if(E)E=!1,V.enqueue({type:"response-metadata",...n(M)});if(M.usage!=null){let{prompt_tokens:P,completion_tokens:b,total_tokens:f,prompt_tokens_details:R,completion_tokens_details:w}=M.usage;if(J.promptTokens=P??void 0,J.completionTokens=b??void 0,J.totalTokens=f??void 0,w?.reasoning_tokens!=null)J.completionTokensDetails.reasoningTokens=w?.reasoning_tokens;if(w?.accepted_prediction_tokens!=null)J.completionTokensDetails.acceptedPredictionTokens=w?.accepted_prediction_tokens;if(w?.rejected_prediction_tokens!=null)J.completionTokensDetails.rejectedPredictionTokens=w?.rejected_prediction_tokens;if(R?.cached_tokens!=null)J.promptTokensDetails.cachedTokens=R?.cached_tokens}let D=M.choices[0];if(D?.finish_reason!=null)$={unified:r(D.finish_reason),raw:D.finish_reason??void 0};if(D?.delta==null)return;let x=D.delta;if(x.reasoning_opaque){if(B!=null)throw new v({data:x,message:"Multiple reasoning_opaque values received in a single response. Only one thinking part per response is supported."});B=x.reasoning_opaque}let z=x.reasoning_text;if(z){if(!X)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),X=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:z})}if(x.content){if(X&&!K)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;if(!K)V.enqueue({type:"text-start",id:"txt-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),K=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:x.content})}if(x.tool_calls!=null){if(X)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;for(let P of x.tool_calls){let b=P.index;if(Y[b]==null){if(P.id==null)throw new v({data:P,message:"Expected 'id' to be a string."});if(P.function?.name==null)throw new v({data:P,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:P.id,toolName:P.function.name}),Y[b]={id:P.id,type:"function",function:{name:P.function.name,arguments:P.function.arguments??""},hasFinished:!1};let R=Y[b];if(R.function?.name!=null&&R.function?.arguments!=null){if(R.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:R.id,delta:R.function.arguments});if(l(R.function.arguments))U(R,V)}continue}let f=Y[b];if(f.hasFinished)continue;if(P.function?.arguments!=null)f.function.arguments+=P.function?.arguments??"";if(V.enqueue({type:"tool-input-delta",id:f.id,delta:P.function.arguments??""}),f.function?.name!=null&&f.function?.arguments!=null&&l(f.function.arguments))U(f,V)}}},flush:(M)=>{if(X)M.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0});if(K)M.enqueue({type:"text-end",id:"txt-0"});for(let H of Y.filter((D)=>!D.hasFinished))M.enqueue({type:"tool-input-end",id:H.id}),M.enqueue({type:"tool-call",toolCallId:H.id??A(),toolName:H.function.name,input:H.function.arguments});let V={[_]:{},...B?{copilot:{reasoningOpaque:B}}:{},...q?.buildMetadata()};if(J.completionTokensDetails.acceptedPredictionTokens!=null)V[_].acceptedPredictionTokens=J.completionTokensDetails.acceptedPredictionTokens;if(J.completionTokensDetails.rejectedPredictionTokens!=null)V[_].rejectedPredictionTokens=J.completionTokensDetails.rejectedPredictionTokens;M.enqueue({type:"finish",finishReason:$,usage:{inputTokens:{total:J.promptTokens,noCache:J.promptTokens!=null&&J.promptTokensDetails.cachedTokens!=null?J.promptTokens-J.promptTokensDetails.cachedTokens:void 0,cacheRead:J.promptTokensDetails.cachedTokens,cacheWrite:void 0},outputTokens:{total:J.completionTokens,text:void 0,reasoning:J.completionTokensDetails.reasoningTokens},raw:{prompt_tokens:J.promptTokens??null,completion_tokens:J.completionTokens??null,total_tokens:J.totalTokens??null}},providerMetadata:V})}})),request:{body:N},response:{headers:L}}}}var G3=j.object({prompt_tokens:j.number().nullish(),completion_tokens:j.number().nullish(),total_tokens:j.number().nullish(),prompt_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),completion_tokens_details:j.object({reasoning_tokens:j.number().nullish(),accepted_prediction_tokens:j.number().nullish(),rejected_prediction_tokens:j.number().nullish()}).nullish()}).nullish(),m3=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant").nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({id:j.string().nullish(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish()})),usage:G3}),h3=(Q)=>j.union([j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({index:j.number(),id:j.string().nullish(),function:j.object({name:j.string().nullish(),arguments:j.string().nullish()})})).nullish()}).nullish(),finish_reason:j.string().nullish()})),usage:G3}),Q]);var g3=t,e=c({errorSchema:g3,errorToMessage:(Q)=>Q.error.message});var o=j.object({action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeoutMs:j.number().optional(),user:j.string().optional(),workingDirectory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),j3=j.object({output:j.string()}),o0=S({id:"openai.local_shell",inputSchema:o,outputSchema:j3});function J3(Q,G){if(!G)return!1;return G.some((W)=>Q.startsWith(W))}async function K3({prompt:Q,systemMessageMode:G,fileIdPrefixes:W,store:N,hasLocalShellTool:q=!1}){let L=[],Z=[],Y=new Set;for(let{role:$,content:J}of Q)switch($){case"system":{switch(G){case"system":{L.push({role:"system",content:J});break}case"developer":{L.push({role:"developer",content:J});break}case"remove":{Z.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${G}`)}break}case"user":{L.push({role:"user",content:J.map((E,_)=>{switch(E.type){case"text":return{type:"input_text",text:E.text};case"file":if(E.mediaType.startsWith("image/")){let X=E.mediaType==="image/*"?"image/jpeg":E.mediaType;return{type:"input_image",...E.data instanceof URL?{image_url:E.data.toString()}:typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{image_url:`data:${X};base64,${m(E.data)}`},detail:E.providerOptions?.openai?.imageDetail}}else if(E.mediaType==="application/pdf"){if(E.data instanceof URL)return{type:"input_file",file_url:E.data.toString()};return{type:"input_file",...typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{filename:E.filename??`part-${_}.pdf`,file_data:`data:application/pdf;base64,${m(E.data)}`}}}else throw new y({functionality:`file part media type ${E.mediaType}`})}})});break}case"assistant":{let E={},_={};for(let X of J)switch(X.type){case"text":{L.push({role:"assistant",content:[{type:"output_text",text:X.text}],id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-call":{if(_[X.toolCallId]=X,X.providerExecuted)break;if(q&&X.toolName==="local_shell"){let K=o.parse(X.input);L.push({type:"local_shell_call",call_id:X.toolCallId,id:X.providerOptions?.openai?.itemId??void 0,action:{type:"exec",command:K.action.command,timeout_ms:K.action.timeoutMs,user:K.action.user,working_directory:K.action.workingDirectory,env:K.action.env}});break}L.push({type:"function_call",call_id:X.toolCallId,name:X.toolName,arguments:JSON.stringify(X.input),id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-result":{if(N)L.push({type:"item_reference",id:X.toolCallId});else Z.push({type:"other",message:`Results for OpenAI tool ${X.toolName} are not sent to the API when store is false`});break}case"reasoning":{let K=await k({provider:"copilot",providerOptions:X.providerOptions,schema:d3}),B=K?.itemId;if(B!=null){let U=E[B];if(N){if(U===void 0)L.push({type:"item_reference",id:B}),E[B]={type:"reasoning",id:B,summary:[]}}else{let M=[];if(X.text.length>0)M.push({type:"summary_text",text:X.text});else if(U!==void 0)Z.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(X)}.`});if(U===void 0)E[B]={type:"reasoning",id:B,encrypted_content:K?.reasoningEncryptedContent,summary:M},L.push(E[B]);else U.summary.push(...M)}}else Z.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(X)}.`});break}}break}case"tool":{for(let E of J){if(E.type==="tool-approval-response"){if(Y.has(E.approvalId))continue;if(Y.add(E.approvalId),N)L.push({type:"item_reference",id:E.approvalId});L.push({type:"mcp_approval_response",approval_request_id:E.approvalId,approve:E.approved});continue}let _=E.output;if(_.type==="execution-denied"){if(_.providerOptions?.openai?.approvalId)continue}if(q&&E.toolName==="local_shell"&&_.type==="json"){L.push({type:"local_shell_call_output",call_id:E.toolCallId,output:j3.parse(_.value).output});break}L.push({type:"function_call_output",call_id:E.toolCallId,output:h(_)})}break}default:throw Error(`Unsupported role: ${$}`)}return{input:L,warnings:Z}}var d3=j.object({itemId:j.string().nullish(),reasoningEncryptedContent:j.string().nullish()});function V3({finishReason:Q,hasFunctionCall:G}){switch(Q){case void 0:case null:return G?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return G?"tool-calls":"other"}}var v3=j.object({code:j.string().nullish(),containerId:j.string()}),c3=j.object({outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullish()}),H3=j.object({container:j.union([j.string(),j.object({fileIds:j.array(j.string()).optional()})]).optional()}),Kj=S({id:"openai.code_interpreter",inputSchema:v3,outputSchema:c3});var B3=j.object({key:j.string(),type:j.enum(["eq","ne","gt","gte","lt","lte"]),value:j.union([j.string(),j.number(),j.boolean()])}),L3=j.object({type:j.enum(["and","or"]),filters:j.array(j.union([B3,j.lazy(()=>L3)]))}),U3=j.object({vectorStoreIds:j.array(j.string()),maxNumResults:j.number().optional(),ranking:j.object({ranker:j.string().optional(),scoreThreshold:j.number().optional()}).optional(),filters:j.union([B3,L3]).optional()}),u3=j.object({queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),fileId:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullable()}),Uj=S({id:"openai.file_search",inputSchema:j.object({}),outputSchema:u3});var I=j.discriminatedUnion("type",[j.object({type:j.literal("search"),query:j.string().nullish()}),j.object({type:j.literal("open_page"),url:j.string()}),j.object({type:j.literal("find"),url:j.string(),pattern:j.string()})]),p=j.object({type:j.literal("approximate"),country:j.string().optional(),city:j.string().optional(),region:j.string().optional(),timezone:j.string().optional()});var N3=j.object({filters:j.object({allowedDomains:j.array(j.string()).optional()}).optional(),searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Pj=s({id:"openai.web_search",inputSchema:j.object({action:I.nullish()})});var D3=j.object({searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Aj=s({id:"openai.web_search_preview",inputSchema:j.object({action:I.nullish()})});var W3=j.object({background:j.enum(["auto","opaque","transparent"]).optional(),inputFidelity:j.enum(["low","high"]).optional(),inputImageMask:j.object({fileId:j.string().optional(),imageUrl:j.string().optional()}).optional(),model:j.string().optional(),moderation:j.enum(["auto"]).optional(),outputCompression:j.number().int().min(0).max(100).optional(),outputFormat:j.enum(["png","jpeg","webp"]).optional(),partialImages:j.number().int().min(0).max(3).optional(),quality:j.enum(["auto","low","medium","high"]).optional(),size:j.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict(),i3=j.object({result:j.string()}),Sj=S({id:"openai.image_generation",inputSchema:j.object({}),outputSchema:i3});function _3({tools:Q,toolChoice:G,strictJsonSchema:W}){Q=Q?.length?Q:void 0;let N=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:N};let q=[];for(let Z of Q)switch(Z.type){case"function":q.push({type:"function",name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:W});break;case"provider":{switch(Z.id){case"openai.file_search":{let Y=U3.parse(Z.args);q.push({type:"file_search",vector_store_ids:Y.vectorStoreIds,max_num_results:Y.maxNumResults,ranking_options:Y.ranking?{ranker:Y.ranking.ranker,score_threshold:Y.ranking.scoreThreshold}:void 0,filters:Y.filters});break}case"openai.local_shell":{q.push({type:"local_shell"});break}case"openai.web_search_preview":{let Y=D3.parse(Z.args);q.push({type:"web_search_preview",search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.web_search":{let Y=N3.parse(Z.args);q.push({type:"web_search",filters:Y.filters!=null?{allowed_domains:Y.filters.allowedDomains}:void 0,search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.code_interpreter":{let Y=H3.parse(Z.args);q.push({type:"code_interpreter",container:Y.container==null?{type:"auto",file_ids:void 0}:typeof Y.container==="string"?Y.container:{type:"auto",file_ids:Y.container.fileIds}});break}case"openai.image_generation":{let Y=W3.parse(Z.args);q.push({type:"image_generation",background:Y.background,input_fidelity:Y.inputFidelity,input_image_mask:Y.inputImageMask?{file_id:Y.inputImageMask.fileId,image_url:Y.inputImageMask.imageUrl}:void 0,model:Y.model,moderation:Y.moderation,partial_images:Y.partialImages,quality:Y.quality,output_compression:Y.outputCompression,output_format:Y.outputFormat,size:Y.size});break}}break}default:N.push({type:"unsupported",feature:"tool type"});break}if(G==null)return{tools:q,toolChoice:void 0,toolWarnings:N};let L=G.type;switch(L){case"auto":case"none":case"required":return{tools:q,toolChoice:L,toolWarnings:N};case"tool":return{tools:q,toolChoice:G.toolName==="code_interpreter"||G.toolName==="file_search"||G.toolName==="image_generation"||G.toolName==="web_search_preview"||G.toolName==="web_search"?{type:G.toolName}:{type:"function",name:G.toolName},toolWarnings:N};default:throw new y({functionality:`tool choice type: ${L}`})}}var M3=j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:I.nullish()}),P3=j.object({type:j.literal("file_search_call"),id:j.string(),queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),file_id:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullish()}),Q3=j.object({type:j.literal("code_interpreter_call"),id:j.string(),code:j.string().nullable(),container_id:j.string(),outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullable()}),f3=j.object({type:j.literal("local_shell_call"),id:j.string(),call_id:j.string(),action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeout_ms:j.number().optional(),user:j.string().optional(),working_directory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),x3=j.object({type:j.literal("image_generation_call"),id:j.string(),result:j.string()}),R3=j.object({type:j.literal("file_citation"),file_id:j.string(),filename:j.string().nullish(),index:j.number().nullish(),start_index:j.number().nullish(),end_index:j.number().nullish(),quote:j.string().nullish()}),b3=j.object({type:j.literal("message"),id:j.string()}),A3=j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish()}),w3=j.object({type:j.literal("function_call"),id:j.string(),call_id:j.string(),name:j.string(),arguments:j.string()}),F3=20,y3=j.array(j.object({token:j.string(),logprob:j.number(),top_logprobs:j.array(j.object({token:j.string(),logprob:j.number()}))}));class X3{specificationVersion="v3";modelId;config;constructor(Q,G){this.modelId=Q,this.config=G}supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]};get provider(){return this.config.provider}async getArgs({maxOutputTokens:Q,temperature:G,stopSequences:W,topP:N,topK:q,presencePenalty:L,frequencyPenalty:Z,seed:Y,prompt:$,providerOptions:J,tools:E,toolChoice:_,responseFormat:X}){let K=[],B=_0(this.modelId);if(q!=null)K.push({type:"unsupported",feature:"topK"});if(Y!=null)K.push({type:"unsupported",feature:"seed"});if(L!=null)K.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)K.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)K.push({type:"unsupported",feature:"stopSequences"});let U=await k({provider:"copilot",providerOptions:J,schema:q0}),{input:M,warnings:V}=await K3({prompt:$,systemMessageMode:B.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:U?.store??!0,hasLocalShellTool:z("openai.local_shell")});K.push(...V);let H=U?.strictJsonSchema??!1,D=U?.include;function x(F){D=D!=null?[...D,F]:[F]}function z(F){return E?.find((Y3)=>Y3.type==="provider"&&Y3.id===F)!=null}let P=typeof U?.logprobs==="number"?U?.logprobs:U?.logprobs===!0?F3:void 0;if(P)x("message.output_text.logprobs");let b=E?.find((F)=>F.type==="provider"&&(F.id==="openai.web_search"||F.id==="openai.web_search_preview"))?.name;if(b)x("web_search_call.action.sources");if(z("openai.code_interpreter"))x("code_interpreter_call.outputs");let f={model:this.modelId,input:M,temperature:G,top_p:N,max_output_tokens:Q,...(X?.type==="json"||U?.textVerbosity)&&{text:{...X?.type==="json"&&{format:X.schema!=null?{type:"json_schema",strict:H,name:X.name??"response",description:X.description,schema:X.schema}:{type:"json_object"}},...U?.textVerbosity&&{verbosity:U.textVerbosity}}},max_tool_calls:U?.maxToolCalls,metadata:U?.metadata,parallel_tool_calls:U?.parallelToolCalls,previous_response_id:U?.previousResponseId,store:U?.store,user:U?.user,instructions:U?.instructions,service_tier:U?.serviceTier,include:D,prompt_cache_key:U?.promptCacheKey,safety_identifier:U?.safetyIdentifier,top_logprobs:P,...B.isReasoningModel&&(U?.reasoningEffort!=null||U?.reasoningSummary!=null)&&{reasoning:{...U?.reasoningEffort!=null&&{effort:U.reasoningEffort},...U?.reasoningSummary!=null&&{summary:U.reasoningSummary}}},...B.requiredAutoTruncation&&{truncation:"auto"}};if(B.isReasoningModel){if(f.temperature!=null)f.temperature=void 0,K.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(f.top_p!=null)f.top_p=void 0,K.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}else{if(U?.reasoningEffort!=null)K.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if(U?.reasoningSummary!=null)K.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if(U?.serviceTier==="flex"&&!B.supportsFlexProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),f.service_tier=void 0;if(U?.serviceTier==="priority"&&!B.supportsPriorityProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),f.service_tier=void 0;let{tools:R,toolChoice:w,toolWarnings:C3}=_3({tools:E,toolChoice:_,strictJsonSchema:H});return{webSearchToolName:b,args:{...f,tools:R,tool_choice:w},warnings:[...K,...C3]}}async doGenerate(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),q=this.config.url({path:"/responses",modelId:this.modelId}),{responseHeaders:L,value:Z,rawValue:Y}=await O({url:q,headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:e,successfulResponseHandler:i(j.object({id:j.string(),created_at:j.number(),error:j.object({code:j.string(),message:j.string()}).nullish(),model:j.string(),output:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("message"),role:j.literal("assistant"),id:j.string(),content:j.array(j.object({type:j.literal("output_text"),text:j.string(),logprobs:y3.nullish(),annotations:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),start_index:j.number(),end_index:j.number(),url:j.string(),title:j.string()}),R3,j.object({type:j.literal("container_file_citation")})]))}))}),M3,P3,Q3,x3,f3,j.object({type:j.literal("function_call"),call_id:j.string(),name:j.string(),arguments:j.string(),id:j.string()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string().optional()}),j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish(),summary:j.array(j.object({type:j.literal("summary_text"),text:j.string()}))})])),service_tier:j.string().nullish(),incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3})),abortSignal:Q.abortSignal,fetch:this.config.fetch});if(Z.error)throw new q3({message:Z.error.message,url:q,requestBodyValues:G,statusCode:400,responseHeaders:L,responseBody:Y,isRetryable:!1});let $=[],J=[],E=!1;for(let X of Z.output)switch(X.type){case"reasoning":{if(X.summary.length===0)X.summary.push({type:"summary_text",text:""});for(let K of X.summary)$.push({type:"reasoning",text:K.text,providerMetadata:{openai:{itemId:X.id,reasoningEncryptedContent:X.encrypted_content??null}}});break}case"image_generation_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"image_generation",result:{result:X.result}});break}case"local_shell_call":{$.push({type:"tool-call",toolCallId:X.call_id,toolName:"local_shell",input:JSON.stringify({action:X.action}),providerMetadata:{openai:{itemId:X.id}}});break}case"message":{for(let K of X.content){if(Q.providerOptions?.openai?.logprobs&&K.logprobs)J.push(K.logprobs);$.push({type:"text",text:K.text,providerMetadata:{openai:{itemId:X.id}}});for(let B of K.annotations)if(B.type==="url_citation")$.push({type:"source",sourceType:"url",id:this.config.generateId?.()??A(),url:B.url,title:B.title});else if(B.type==="file_citation")$.push({type:"source",sourceType:"document",id:this.config.generateId?.()??A(),mediaType:"text/plain",title:B.quote??B.filename??"Document",filename:B.filename??B.file_id})}break}case"function_call":{E=!0,$.push({type:"tool-call",toolCallId:X.call_id,toolName:X.name,input:X.arguments,providerMetadata:{openai:{itemId:X.id}}});break}case"web_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:N??"web_search",input:JSON.stringify({action:X.action}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:N??"web_search",result:{status:X.status}});break}case"computer_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"computer_use",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:X.status||"completed"}});break}case"file_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"file_search",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"file_search",result:{queries:X.queries,results:X.results?.map((K)=>({attributes:K.attributes,fileId:K.file_id,filename:K.filename,score:K.score,text:K.text}))??null}});break}case"code_interpreter_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"code_interpreter",input:JSON.stringify({code:X.code,containerId:X.container_id}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"code_interpreter",result:{outputs:X.outputs}});break}}let _={openai:{responseId:Z.id}};if(J.length>0)_.openai.logprobs=J;if(typeof Z.service_tier==="string")_.openai.serviceTier=Z.service_tier;return{content:$,finishReason:{unified:V3({finishReason:Z.incomplete_details?.reason,hasFunctionCall:E}),raw:Z.incomplete_details?.reason},usage:{inputTokens:{total:Z.usage.input_tokens,noCache:Z.usage.input_tokens_details?.cached_tokens!=null?Z.usage.input_tokens-Z.usage.input_tokens_details.cached_tokens:void 0,cacheRead:Z.usage.input_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:Z.usage.output_tokens,text:void 0,reasoning:Z.usage.output_tokens_details?.reasoning_tokens??void 0},raw:Z.usage},request:{body:G},response:{id:Z.id,timestamp:new Date(Z.created_at*1000),modelId:Z.model,headers:L,body:Y},providerMetadata:_,warnings:W}}async doStream(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),{responseHeaders:q,value:L}=await O({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:{...G,stream:!0},failedResponseHandler:e,successfulResponseHandler:u(Y0),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Z=this,Y={unified:"other",raw:void 0},$={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0},J=[],E=null,_={},X=!1,K={},B=null,U=null,M;return{stream:L.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{Y={unified:"error",raw:void 0}},transformValue:(V,H)=>{if(T3(V)){if(V.item.type==="function_call")_[V.output_index]={toolName:V.item.name,toolCallId:V.item.call_id},H.enqueue({type:"tool-input-start",id:V.item.call_id,toolName:V.item.name});else if(V.item.type==="web_search_call")_[V.output_index]={toolName:N??"web_search",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:N??"web_search"});else if(V.item.type==="computer_call")_[V.output_index]={toolName:"computer_use",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"computer_use"});else if(V.item.type==="code_interpreter_call")_[V.output_index]={toolName:"code_interpreter",toolCallId:V.item.id,codeInterpreter:{containerId:V.item.container_id}},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"code_interpreter"}),H.enqueue({type:"tool-input-delta",id:V.item.id,delta:`{"containerId":"${V.item.container_id}","code":"`});else if(V.item.type==="file_search_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(V.item.type==="message")U=V.item.id,H.enqueue({type:"text-start",id:V.item.id,providerMetadata:{openai:{itemId:V.item.id}}});else if(L0(V))K[V.output_index]={canonicalId:V.item.id,encryptedContent:V.item.encrypted_content,summaryParts:[0]},B=V.output_index,H.enqueue({type:"reasoning-start",id:`${V.item.id}:0`,providerMetadata:{openai:{itemId:V.item.id,reasoningEncryptedContent:V.item.encrypted_content??null}}})}else if(k3(V)){if(V.item.type==="function_call")_[V.output_index]=void 0,X=!0,H.enqueue({type:"tool-input-end",id:V.item.call_id}),H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:V.item.name,input:V.item.arguments,providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="web_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"web_search",input:JSON.stringify({action:V.item.action}),providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"web_search",result:{status:V.item.status}});else if(V.item.type==="computer_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:V.item.status||"completed"}});else if(V.item.type==="file_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"file_search",result:{queries:V.item.queries,results:V.item.results?.map((D)=>({attributes:D.attributes,fileId:D.file_id,filename:D.filename,score:D.score,text:D.text}))??null}});else if(V.item.type==="code_interpreter_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"code_interpreter",result:{outputs:V.item.outputs}});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"image_generation",result:{result:V.item.result}});else if(V.item.type==="local_shell_call")_[V.output_index]=void 0,H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:V.item.action.command,timeoutMs:V.item.action.timeout_ms,user:V.item.action.user,workingDirectory:V.item.action.working_directory,env:V.item.action.env}}),providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="message"){if(U)H.enqueue({type:"text-end",id:U}),U=null}else if($0(V)){let D=K[V.output_index];if(D){for(let x of D.summaryParts)H.enqueue({type:"reasoning-end",id:`${D.canonicalId}:${x}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:V.item.encrypted_content??null}}});if(delete K[V.output_index],B===V.output_index)B=null}}}else if(J0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:V.delta})}else if(K0(V))H.enqueue({type:"tool-result",toolCallId:V.item_id,toolName:"image_generation",result:{result:V.partial_image_b64}});else if(H0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:JSON.stringify(V.delta).slice(1,-1)})}else if(B0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:'"}'}),H.enqueue({type:"tool-input-end",id:D.toolCallId}),H.enqueue({type:"tool-call",toolCallId:D.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:V.code,containerId:D.codeInterpreter.containerId}),providerExecuted:!0})}else if(G0(V))E=V.response.id,H.enqueue({type:"response-metadata",id:V.response.id,timestamp:new Date(V.response.created_at*1000),modelId:V.response.model});else if(Z0(V)){if(!U)U=V.item_id,H.enqueue({type:"text-start",id:U,providerMetadata:{openai:{itemId:V.item_id}}});if(H.enqueue({type:"text-delta",id:U,delta:V.delta}),Q.providerOptions?.openai?.logprobs&&V.logprobs)J.push(V.logprobs)}else if(N0(V)){let D=B!==null?K[B]:null;if(D&&V.summary_index>0)D.summaryParts.push(V.summary_index),H.enqueue({type:"reasoning-start",id:`${D.canonicalId}:${V.summary_index}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:D.encryptedContent??null}}})}else if(D0(V)){let D=B!==null?K[B]:null;if(D)H.enqueue({type:"reasoning-delta",id:`${D.canonicalId}:${V.summary_index}`,delta:V.delta,providerMetadata:{openai:{itemId:D.canonicalId}}})}else if(E0(V)){if(Y={unified:V3({finishReason:V.response.incomplete_details?.reason,hasFunctionCall:X}),raw:V.response.incomplete_details?.reason??void 0},$.inputTokens=V.response.usage.input_tokens,$.outputTokens=V.response.usage.output_tokens,$.totalTokens=V.response.usage.input_tokens+V.response.usage.output_tokens,$.reasoningTokens=V.response.usage.output_tokens_details?.reasoning_tokens??void 0,$.cachedInputTokens=V.response.usage.input_tokens_details?.cached_tokens??void 0,typeof V.response.service_tier==="string")M=V.response.service_tier}else if(U0(V)){if(V.annotation.type==="url_citation")H.enqueue({type:"source",sourceType:"url",id:Z.config.generateId?.()??A(),url:V.annotation.url,title:V.annotation.title});else if(V.annotation.type==="file_citation")H.enqueue({type:"source",sourceType:"document",id:Z.config.generateId?.()??A(),mediaType:"text/plain",title:V.annotation.quote??V.annotation.filename??"Document",filename:V.annotation.filename??V.annotation.file_id})}else if(W0(V))H.enqueue({type:"error",error:V})},flush:(V)=>{if(U)V.enqueue({type:"text-end",id:U}),U=null;let H={openai:{responseId:E}};if(J.length>0)H.openai.logprobs=J;if(M!==void 0)H.openai.serviceTier=M;V.enqueue({type:"finish",finishReason:Y,usage:{inputTokens:{total:$.inputTokens,noCache:$.inputTokens!=null&&$.cachedInputTokens!=null?$.inputTokens-$.cachedInputTokens:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens},raw:{input_tokens:$.inputTokens,output_tokens:$.outputTokens,total_tokens:$.totalTokens}},providerMetadata:H})}})),request:{body:G},response:{headers:q}}}}var S3=j.object({input_tokens:j.number(),input_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),output_tokens:j.number(),output_tokens_details:j.object({reasoning_tokens:j.number().nullish()}).nullish()}),p3=j.object({type:j.literal("response.output_text.delta"),item_id:j.string(),delta:j.string(),logprobs:y3.nullish()}),s3=j.object({type:j.literal("error"),code:j.string(),message:j.string(),param:j.string().nullish(),sequence_number:j.number()}),n3=j.object({type:j.enum(["response.completed","response.incomplete"]),response:j.object({incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3,service_tier:j.string().nullish()})}),r3=j.object({type:j.literal("response.created"),response:j.object({id:j.string(),created_at:j.number(),model:j.string(),service_tier:j.string().nullish()})}),t3=j.object({type:j.literal("response.output_item.added"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3,j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:j.object({type:j.literal("search"),query:j.string().optional()}).nullish()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string()}),j.object({type:j.literal("file_search_call"),id:j.string()}),j.object({type:j.literal("image_generation_call"),id:j.string()}),Q3.extend({status:j.string()})])}),l3=j.object({type:j.literal("response.output_item.done"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3.extend({status:j.literal("completed")}),Q3,x3,M3,P3,f3,j.object({type:j.literal("computer_call"),id:j.string(),status:j.literal("completed")})])}),a3=j.object({type:j.literal("response.function_call_arguments.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),e3=j.object({type:j.literal("response.image_generation_call.partial_image"),item_id:j.string(),output_index:j.number(),partial_image_b64:j.string()}),o3=j.object({type:j.literal("response.code_interpreter_call_code.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),j0=j.object({type:j.literal("response.code_interpreter_call_code.done"),item_id:j.string(),output_index:j.number(),code:j.string()}),V0=j.object({type:j.literal("response.output_text.annotation.added"),annotation:j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),url:j.string(),title:j.string()}),R3])}),Q0=j.object({type:j.literal("response.reasoning_summary_part.added"),item_id:j.string(),summary_index:j.number()}),X0=j.object({type:j.literal("response.reasoning_summary_text.delta"),item_id:j.string(),summary_index:j.number(),delta:j.string()}),Y0=j.union([p3,n3,r3,t3,l3,a3,e3,o3,j0,V0,Q0,X0,s3,j.object({type:j.string()}).loose()]);function Z0(Q){return Q.type==="response.output_text.delta"}function k3(Q){return Q.type==="response.output_item.done"}function $0(Q){return k3(Q)&&Q.item.type==="reasoning"}function E0(Q){return Q.type==="response.completed"||Q.type==="response.incomplete"}function G0(Q){return Q.type==="response.created"}function J0(Q){return Q.type==="response.function_call_arguments.delta"}function K0(Q){return Q.type==="response.image_generation_call.partial_image"}function H0(Q){return Q.type==="response.code_interpreter_call_code.delta"}function B0(Q){return Q.type==="response.code_interpreter_call_code.done"}function T3(Q){return Q.type==="response.output_item.added"}function L0(Q){return T3(Q)&&Q.item.type==="reasoning"}function U0(Q){return Q.type==="response.output_text.annotation.added"}function N0(Q){return Q.type==="response.reasoning_summary_part.added"}function D0(Q){return Q.type==="response.reasoning_summary_text.delta"}function W0(Q){return Q.type==="error"}function _0(Q){let G=Q.startsWith("o3")||Q.startsWith("o4-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-chat"),W=Q.startsWith("gpt-4")||Q.startsWith("gpt-5-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-nano")&&!Q.startsWith("gpt-5-chat")||Q.startsWith("o3")||Q.startsWith("o4-mini"),N={requiredAutoTruncation:!1,systemMessageMode:"system",supportsFlexProcessing:G,supportsPriorityProcessing:W};if(Q.startsWith("gpt-5-chat"))return{...N,isReasoningModel:!1};if(Q.startsWith("o")||Q.startsWith("gpt-5")||Q.startsWith("codex-")||Q.startsWith("computer-use")){if(Q.startsWith("o1-mini")||Q.startsWith("o1-preview"))return{...N,isReasoningModel:!0,systemMessageMode:"remove"};return{...N,isReasoningModel:!0,systemMessageMode:"developer"}}return{...N,isReasoningModel:!1}}var q0=j.object({include:j.array(j.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:j.string().nullish(),logprobs:j.union([j.boolean(),j.number().min(1).max(F3)]).optional(),maxToolCalls:j.number().nullish(),metadata:j.any().nullish(),parallelToolCalls:j.boolean().nullish(),previousResponseId:j.string().nullish(),promptCacheKey:j.string().nullish(),reasoningEffort:j.string().nullish(),reasoningSummary:j.string().nullish(),safetyIdentifier:j.string().nullish(),serviceTier:j.enum(["auto","flex","priority"]).nullish(),store:j.boolean().nullish(),strictJsonSchema:j.boolean().nullish(),textVerbosity:j.enum(["low","medium","high"]).nullish(),user:j.string().nullish()});var M0="0.1.0";function z3(Q={}){let G=I3(Q.baseURL??"https://api.openai.com/v1");if(!G)throw Error("baseURL is required");let W={...Q.apiKey&&{Authorization:`Bearer ${Q.apiKey}`},...Q.headers},N=()=>O3(W,`ai-sdk/openai-compatible/${M0}`),q=($)=>{return new a($,{provider:`${Q.name??"openai-compatible"}.chat`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},L=($)=>{return new X3($,{provider:`${Q.name??"openai-compatible"}.responses`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},Z=($)=>q($),Y=function($){return q($)};return Y.languageModel=Z,Y.chat=q,Y.responses=L,Y}var P0=z3();export{P0 as openaiCompatible,z3 as createOpenaiCompatible};
2
+ import{Aq as m,Jq as A,Oq as O3,cr as l,er as k,fr as O,jr as s,kr as S,mr as c,nr as u,or as i,sr as I3,tq as T}from"./chunk-gwfx7tx7.js";import{Ar as v,Hr as y,vr as q3}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import{xv as j}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";function h(Q){switch(Q.type){case"text":case"error-text":return Q.value;case"execution-denied":return Q.reason??"Tool execution denied.";case"content":case"json":case"error-json":return JSON.stringify(Q.value)}}function C(Q){return Q?.providerOptions?.copilot??{}}function Z3(Q){let G=[];for(let{role:W,content:N,...q}of Q){let L=C({...q});switch(W){case"system":{G.push({role:"system",content:N,...L});break}case"user":{if(N.length===1&&N[0].type==="text"){G.push({role:"user",content:N[0].text,...C(N[0])});break}G.push({role:"user",content:N.map((Z)=>{let Y=C(Z);switch(Z.type){case"text":return{type:"text",text:Z.text,...Y};case"file":if(Z.mediaType.startsWith("image/")){let $=Z.mediaType==="image/*"?"image/jpeg":Z.mediaType;return{type:"image_url",image_url:{url:Z.data instanceof URL?Z.data.toString():`data:${$};base64,${m(Z.data)}`},...Y}}else throw new y({functionality:`file part media type ${Z.mediaType}`})}}),...L});break}case"assistant":{let Z="",Y,$,J=[];for(let E of N){let _=C(E),X=E.providerOptions?.copilot?.reasoningOpaque;if(X&&!$)$=X;switch(E.type){case"text":{Z+=E.text;break}case"reasoning":{if(E.text)Y=E.text;break}case"tool-call":{J.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)},..._});break}}}G.push({role:"assistant",content:Z||null,tool_calls:J.length>0?J:void 0,reasoning_text:$?Y:void 0,reasoning_opaque:$,...L});break}case"tool":{for(let Z of N){if(Z.type==="tool-approval-response")continue;let Y=Z.output,$=C(Z);G.push({role:"tool",tool_call_id:Z.toolCallId,content:h(Y),...$})}break}default:throw Error(`Unsupported role: ${W}`)}}return G}function n({id:Q,model:G,created:W}){return{id:Q??void 0,modelId:G??void 0,timestamp:W!=null?new Date(W*1000):void 0}}function r(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=j.object({user:j.string().optional(),reasoningEffort:j.string().optional(),textVerbosity:j.string().optional(),thinking_budget:j.number().optional()});var t=j.object({error:j.object({message:j.string(),type:j.string().nullish(),param:j.any().nullish(),code:j.union([j.string(),j.number()]).nullish()})}),$3={errorSchema:t,errorToMessage:(Q)=>Q.error.message};function d(Q){return new TransformStream({start(G){G.enqueue({type:"stream-start",warnings:Q.warnings})},transform(G,W){if(Q.includeRawChunks)W.enqueue({type:"raw",rawValue:G.rawValue});if(!G.success){Q.onParseError(),W.enqueue({type:"error",error:G.error});return}Q.transformValue(G.value,W,G.rawValue)},flush:Q.flush})}function E3({tools:Q,toolChoice:G}){Q=Q?.length?Q:void 0;let W=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:W};let N=[];for(let L of Q)if(L.type==="provider")W.push({type:"unsupported",feature:`tool type: ${L.type}`});else N.push({type:"function",function:{name:L.name,description:L.description,parameters:L.inputSchema}});if(G==null)return{tools:N,toolChoice:void 0,toolWarnings:W};let q=G.type;switch(q){case"auto":case"none":case"required":return{tools:N,toolChoice:q,toolWarnings:W};case"tool":return{tools:N,toolChoice:{type:"function",function:{name:G.toolName}},toolWarnings:W};default:throw new y({functionality:`tool choice type: ${q}`})}}class a{specificationVersion="v3";supportsStructuredOutputs;modelId;config;failedResponseHandler;chunkSchema;constructor(Q,G){this.modelId=Q,this.config=G;let W=G.errorStructure??$3;this.chunkSchema=h3(W.errorSchema),this.failedResponseHandler=c(W),this.supportsStructuredOutputs=G.supportsStructuredOutputs??!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){return this.config.supportedUrls?.()??{}}async getArgs({prompt:Q,maxOutputTokens:G,temperature:W,topP:N,topK:q,frequencyPenalty:L,presencePenalty:Z,providerOptions:Y,stopSequences:$,responseFormat:J,seed:E,toolChoice:_,tools:X}){let K=[],B=Object.assign(await k({provider:"copilot",providerOptions:Y,schema:g})??{},await k({provider:this.providerOptionsName,providerOptions:Y,schema:g})??{});if(q!=null)K.push({type:"unsupported",feature:"topK"});if(J?.type==="json"&&J.schema!=null&&!this.supportsStructuredOutputs)K.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:U,toolChoice:M,toolWarnings:V}=E3({tools:X,toolChoice:_});return{args:{model:this.modelId,user:B.user,max_tokens:G,temperature:W,top_p:N,frequency_penalty:L,presence_penalty:Z,response_format:J?.type==="json"?this.supportsStructuredOutputs===!0&&J.schema!=null?{type:"json_schema",json_schema:{schema:J.schema,name:J.name??"response",description:J.description}}:{type:"json_object"}:void 0,stop:$,seed:E,...Object.fromEntries(Object.entries(Y?.[this.providerOptionsName]??{}).filter(([H])=>!Object.keys(g.shape).includes(H))),reasoning_effort:B.reasoningEffort,verbosity:B.textVerbosity,messages:Z3(Q),tools:U,tool_choice:M,thinking_budget:B.thinking_budget},warnings:[...K,...V]}}async doGenerate(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N=JSON.stringify(G),{responseHeaders:q,value:L,rawValue:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(m3),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=L.choices[0],$=[],J=Y.message.content;if(J!=null&&J.length>0)$.push({type:"text",text:J,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let E=Y.message.reasoning_text;if(E!=null&&E.length>0)$.push({type:"reasoning",text:E,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});if(Y.message.tool_calls!=null)for(let K of Y.message.tool_calls)$.push({type:"tool-call",toolCallId:K.id??A(),toolName:K.function.name,input:K.function.arguments,providerMetadata:Y.message.reasoning_opaque?{copilot:{reasoningOpaque:Y.message.reasoning_opaque}}:void 0});let _={[this.providerOptionsName]:{},...await this.config.metadataExtractor?.extractMetadata?.({parsedBody:Z})},X=L.usage?.completion_tokens_details;if(X?.accepted_prediction_tokens!=null)_[this.providerOptionsName].acceptedPredictionTokens=X?.accepted_prediction_tokens;if(X?.rejected_prediction_tokens!=null)_[this.providerOptionsName].rejectedPredictionTokens=X?.rejected_prediction_tokens;return{content:$,finishReason:{unified:r(Y.finish_reason),raw:Y.finish_reason??void 0},usage:{inputTokens:{total:L.usage?.prompt_tokens??void 0,noCache:void 0,cacheRead:L.usage?.prompt_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:L.usage?.completion_tokens??void 0,text:void 0,reasoning:L.usage?.completion_tokens_details?.reasoning_tokens??void 0},raw:L.usage??void 0},providerMetadata:_,request:{body:N},response:{...n(L),headers:q,body:Z},warnings:W}}async doStream(Q){let{args:G,warnings:W}=await this.getArgs({...Q}),N={...G,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},q=this.config.metadataExtractor?.createStreamExtractor(),{responseHeaders:L,value:Z}=await O({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:N,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:u(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Y=[],$={unified:"other",raw:void 0},J={completionTokens:void 0,completionTokensDetails:{reasoningTokens:void 0,acceptedPredictionTokens:void 0,rejectedPredictionTokens:void 0},promptTokens:void 0,promptTokensDetails:{cachedTokens:void 0},totalTokens:void 0},E=!0,_=this.providerOptionsName,X=!1,K=!1,B,U=(M,V)=>{V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:M.id??A(),toolName:M.function.name,input:M.function.arguments,providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),M.hasFinished=!0};return{stream:Z.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{$={unified:"error",raw:void 0}},transformValue:(M,V,H)=>{if(q?.processChunk(H),"error"in M){$={unified:"error",raw:void 0},V.enqueue({type:"error",error:M.error.message});return}if(E)E=!1,V.enqueue({type:"response-metadata",...n(M)});if(M.usage!=null){let{prompt_tokens:P,completion_tokens:b,total_tokens:f,prompt_tokens_details:R,completion_tokens_details:w}=M.usage;if(J.promptTokens=P??void 0,J.completionTokens=b??void 0,J.totalTokens=f??void 0,w?.reasoning_tokens!=null)J.completionTokensDetails.reasoningTokens=w?.reasoning_tokens;if(w?.accepted_prediction_tokens!=null)J.completionTokensDetails.acceptedPredictionTokens=w?.accepted_prediction_tokens;if(w?.rejected_prediction_tokens!=null)J.completionTokensDetails.rejectedPredictionTokens=w?.rejected_prediction_tokens;if(R?.cached_tokens!=null)J.promptTokensDetails.cachedTokens=R?.cached_tokens}let D=M.choices[0];if(D?.finish_reason!=null)$={unified:r(D.finish_reason),raw:D.finish_reason??void 0};if(D?.delta==null)return;let x=D.delta;if(x.reasoning_opaque){if(B!=null)throw new v({data:x,message:"Multiple reasoning_opaque values received in a single response. Only one thinking part per response is supported."});B=x.reasoning_opaque}let z=x.reasoning_text;if(z){if(!X)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),X=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:z})}if(x.content){if(X&&!K)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;if(!K)V.enqueue({type:"text-start",id:"txt-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),K=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:x.content})}if(x.tool_calls!=null){if(X)V.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0}),X=!1;for(let P of x.tool_calls){let b=P.index;if(Y[b]==null){if(P.id==null)throw new v({data:P,message:"Expected 'id' to be a string."});if(P.function?.name==null)throw new v({data:P,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:P.id,toolName:P.function.name}),Y[b]={id:P.id,type:"function",function:{name:P.function.name,arguments:P.function.arguments??""},hasFinished:!1};let R=Y[b];if(R.function?.name!=null&&R.function?.arguments!=null){if(R.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:R.id,delta:R.function.arguments});if(l(R.function.arguments))U(R,V)}continue}let f=Y[b];if(f.hasFinished)continue;if(P.function?.arguments!=null)f.function.arguments+=P.function?.arguments??"";if(V.enqueue({type:"tool-input-delta",id:f.id,delta:P.function.arguments??""}),f.function?.name!=null&&f.function?.arguments!=null&&l(f.function.arguments))U(f,V)}}},flush:(M)=>{if(X)M.enqueue({type:"reasoning-end",id:"reasoning-0",providerMetadata:B?{copilot:{reasoningOpaque:B}}:void 0});if(K)M.enqueue({type:"text-end",id:"txt-0"});for(let H of Y.filter((D)=>!D.hasFinished))M.enqueue({type:"tool-input-end",id:H.id}),M.enqueue({type:"tool-call",toolCallId:H.id??A(),toolName:H.function.name,input:H.function.arguments});let V={[_]:{},...B?{copilot:{reasoningOpaque:B}}:{},...q?.buildMetadata()};if(J.completionTokensDetails.acceptedPredictionTokens!=null)V[_].acceptedPredictionTokens=J.completionTokensDetails.acceptedPredictionTokens;if(J.completionTokensDetails.rejectedPredictionTokens!=null)V[_].rejectedPredictionTokens=J.completionTokensDetails.rejectedPredictionTokens;M.enqueue({type:"finish",finishReason:$,usage:{inputTokens:{total:J.promptTokens,noCache:J.promptTokens!=null&&J.promptTokensDetails.cachedTokens!=null?J.promptTokens-J.promptTokensDetails.cachedTokens:void 0,cacheRead:J.promptTokensDetails.cachedTokens,cacheWrite:void 0},outputTokens:{total:J.completionTokens,text:void 0,reasoning:J.completionTokensDetails.reasoningTokens},raw:{prompt_tokens:J.promptTokens??null,completion_tokens:J.completionTokens??null,total_tokens:J.totalTokens??null}},providerMetadata:V})}})),request:{body:N},response:{headers:L}}}}var G3=j.object({prompt_tokens:j.number().nullish(),completion_tokens:j.number().nullish(),total_tokens:j.number().nullish(),prompt_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),completion_tokens_details:j.object({reasoning_tokens:j.number().nullish(),accepted_prediction_tokens:j.number().nullish(),rejected_prediction_tokens:j.number().nullish()}).nullish()}).nullish(),m3=j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({message:j.object({role:j.literal("assistant").nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({id:j.string().nullish(),function:j.object({name:j.string(),arguments:j.string()})})).nullish()}),finish_reason:j.string().nullish()})),usage:G3}),h3=(Q)=>j.union([j.object({id:j.string().nullish(),created:j.number().nullish(),model:j.string().nullish(),choices:j.array(j.object({delta:j.object({role:j.enum(["assistant"]).nullish(),content:j.string().nullish(),reasoning_text:j.string().nullish(),reasoning_opaque:j.string().nullish(),tool_calls:j.array(j.object({index:j.number(),id:j.string().nullish(),function:j.object({name:j.string().nullish(),arguments:j.string().nullish()})})).nullish()}).nullish(),finish_reason:j.string().nullish()})),usage:G3}),Q]);var g3=t,e=c({errorSchema:g3,errorToMessage:(Q)=>Q.error.message});var o=j.object({action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeoutMs:j.number().optional(),user:j.string().optional(),workingDirectory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),j3=j.object({output:j.string()}),o0=S({id:"openai.local_shell",inputSchema:o,outputSchema:j3});function J3(Q,G){if(!G)return!1;return G.some((W)=>Q.startsWith(W))}async function K3({prompt:Q,systemMessageMode:G,fileIdPrefixes:W,store:N,hasLocalShellTool:q=!1}){let L=[],Z=[],Y=new Set;for(let{role:$,content:J}of Q)switch($){case"system":{switch(G){case"system":{L.push({role:"system",content:J});break}case"developer":{L.push({role:"developer",content:J});break}case"remove":{Z.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${G}`)}break}case"user":{L.push({role:"user",content:J.map((E,_)=>{switch(E.type){case"text":return{type:"input_text",text:E.text};case"file":if(E.mediaType.startsWith("image/")){let X=E.mediaType==="image/*"?"image/jpeg":E.mediaType;return{type:"input_image",...E.data instanceof URL?{image_url:E.data.toString()}:typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{image_url:`data:${X};base64,${m(E.data)}`},detail:E.providerOptions?.openai?.imageDetail}}else if(E.mediaType==="application/pdf"){if(E.data instanceof URL)return{type:"input_file",file_url:E.data.toString()};return{type:"input_file",...typeof E.data==="string"&&J3(E.data,W)?{file_id:E.data}:{filename:E.filename??`part-${_}.pdf`,file_data:`data:application/pdf;base64,${m(E.data)}`}}}else throw new y({functionality:`file part media type ${E.mediaType}`})}})});break}case"assistant":{let E={},_={};for(let X of J)switch(X.type){case"text":{L.push({role:"assistant",content:[{type:"output_text",text:X.text}],id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-call":{if(_[X.toolCallId]=X,X.providerExecuted)break;if(q&&X.toolName==="local_shell"){let K=o.parse(X.input);L.push({type:"local_shell_call",call_id:X.toolCallId,id:X.providerOptions?.openai?.itemId??void 0,action:{type:"exec",command:K.action.command,timeout_ms:K.action.timeoutMs,user:K.action.user,working_directory:K.action.workingDirectory,env:K.action.env}});break}L.push({type:"function_call",call_id:X.toolCallId,name:X.toolName,arguments:JSON.stringify(X.input),id:X.providerOptions?.openai?.itemId??void 0});break}case"tool-result":{if(N)L.push({type:"item_reference",id:X.toolCallId});else Z.push({type:"other",message:`Results for OpenAI tool ${X.toolName} are not sent to the API when store is false`});break}case"reasoning":{let K=await k({provider:"copilot",providerOptions:X.providerOptions,schema:d3}),B=K?.itemId;if(B!=null){let U=E[B];if(N){if(U===void 0)L.push({type:"item_reference",id:B}),E[B]={type:"reasoning",id:B,summary:[]}}else{let M=[];if(X.text.length>0)M.push({type:"summary_text",text:X.text});else if(U!==void 0)Z.push({type:"other",message:`Cannot append empty reasoning part to existing reasoning sequence. Skipping reasoning part: ${JSON.stringify(X)}.`});if(U===void 0)E[B]={type:"reasoning",id:B,encrypted_content:K?.reasoningEncryptedContent,summary:M},L.push(E[B]);else U.summary.push(...M)}}else Z.push({type:"other",message:`Non-OpenAI reasoning parts are not supported. Skipping reasoning part: ${JSON.stringify(X)}.`});break}}break}case"tool":{for(let E of J){if(E.type==="tool-approval-response"){if(Y.has(E.approvalId))continue;if(Y.add(E.approvalId),N)L.push({type:"item_reference",id:E.approvalId});L.push({type:"mcp_approval_response",approval_request_id:E.approvalId,approve:E.approved});continue}let _=E.output;if(_.type==="execution-denied"){if(_.providerOptions?.openai?.approvalId)continue}if(q&&E.toolName==="local_shell"&&_.type==="json"){L.push({type:"local_shell_call_output",call_id:E.toolCallId,output:j3.parse(_.value).output});break}L.push({type:"function_call_output",call_id:E.toolCallId,output:h(_)})}break}default:throw Error(`Unsupported role: ${$}`)}return{input:L,warnings:Z}}var d3=j.object({itemId:j.string().nullish(),reasoningEncryptedContent:j.string().nullish()});function V3({finishReason:Q,hasFunctionCall:G}){switch(Q){case void 0:case null:return G?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return G?"tool-calls":"other"}}var v3=j.object({code:j.string().nullish(),containerId:j.string()}),c3=j.object({outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullish()}),H3=j.object({container:j.union([j.string(),j.object({fileIds:j.array(j.string()).optional()})]).optional()}),Kj=S({id:"openai.code_interpreter",inputSchema:v3,outputSchema:c3});var B3=j.object({key:j.string(),type:j.enum(["eq","ne","gt","gte","lt","lte"]),value:j.union([j.string(),j.number(),j.boolean()])}),L3=j.object({type:j.enum(["and","or"]),filters:j.array(j.union([B3,j.lazy(()=>L3)]))}),U3=j.object({vectorStoreIds:j.array(j.string()),maxNumResults:j.number().optional(),ranking:j.object({ranker:j.string().optional(),scoreThreshold:j.number().optional()}).optional(),filters:j.union([B3,L3]).optional()}),u3=j.object({queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),fileId:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullable()}),Uj=S({id:"openai.file_search",inputSchema:j.object({}),outputSchema:u3});var I=j.discriminatedUnion("type",[j.object({type:j.literal("search"),query:j.string().nullish()}),j.object({type:j.literal("open_page"),url:j.string()}),j.object({type:j.literal("find"),url:j.string(),pattern:j.string()})]),p=j.object({type:j.literal("approximate"),country:j.string().optional(),city:j.string().optional(),region:j.string().optional(),timezone:j.string().optional()});var N3=j.object({filters:j.object({allowedDomains:j.array(j.string()).optional()}).optional(),searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Pj=s({id:"openai.web_search",inputSchema:j.object({action:I.nullish()})});var D3=j.object({searchContextSize:j.enum(["low","medium","high"]).optional(),userLocation:p.optional()}),Aj=s({id:"openai.web_search_preview",inputSchema:j.object({action:I.nullish()})});var W3=j.object({background:j.enum(["auto","opaque","transparent"]).optional(),inputFidelity:j.enum(["low","high"]).optional(),inputImageMask:j.object({fileId:j.string().optional(),imageUrl:j.string().optional()}).optional(),model:j.string().optional(),moderation:j.enum(["auto"]).optional(),outputCompression:j.number().int().min(0).max(100).optional(),outputFormat:j.enum(["png","jpeg","webp"]).optional(),partialImages:j.number().int().min(0).max(3).optional(),quality:j.enum(["auto","low","medium","high"]).optional(),size:j.enum(["1024x1024","1024x1536","1536x1024","auto"]).optional()}).strict(),i3=j.object({result:j.string()}),Sj=S({id:"openai.image_generation",inputSchema:j.object({}),outputSchema:i3});function _3({tools:Q,toolChoice:G,strictJsonSchema:W}){Q=Q?.length?Q:void 0;let N=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:N};let q=[];for(let Z of Q)switch(Z.type){case"function":q.push({type:"function",name:Z.name,description:Z.description,parameters:Z.inputSchema,strict:W});break;case"provider":{switch(Z.id){case"openai.file_search":{let Y=U3.parse(Z.args);q.push({type:"file_search",vector_store_ids:Y.vectorStoreIds,max_num_results:Y.maxNumResults,ranking_options:Y.ranking?{ranker:Y.ranking.ranker,score_threshold:Y.ranking.scoreThreshold}:void 0,filters:Y.filters});break}case"openai.local_shell":{q.push({type:"local_shell"});break}case"openai.web_search_preview":{let Y=D3.parse(Z.args);q.push({type:"web_search_preview",search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.web_search":{let Y=N3.parse(Z.args);q.push({type:"web_search",filters:Y.filters!=null?{allowed_domains:Y.filters.allowedDomains}:void 0,search_context_size:Y.searchContextSize,user_location:Y.userLocation});break}case"openai.code_interpreter":{let Y=H3.parse(Z.args);q.push({type:"code_interpreter",container:Y.container==null?{type:"auto",file_ids:void 0}:typeof Y.container==="string"?Y.container:{type:"auto",file_ids:Y.container.fileIds}});break}case"openai.image_generation":{let Y=W3.parse(Z.args);q.push({type:"image_generation",background:Y.background,input_fidelity:Y.inputFidelity,input_image_mask:Y.inputImageMask?{file_id:Y.inputImageMask.fileId,image_url:Y.inputImageMask.imageUrl}:void 0,model:Y.model,moderation:Y.moderation,partial_images:Y.partialImages,quality:Y.quality,output_compression:Y.outputCompression,output_format:Y.outputFormat,size:Y.size});break}}break}default:N.push({type:"unsupported",feature:"tool type"});break}if(G==null)return{tools:q,toolChoice:void 0,toolWarnings:N};let L=G.type;switch(L){case"auto":case"none":case"required":return{tools:q,toolChoice:L,toolWarnings:N};case"tool":return{tools:q,toolChoice:G.toolName==="code_interpreter"||G.toolName==="file_search"||G.toolName==="image_generation"||G.toolName==="web_search_preview"||G.toolName==="web_search"?{type:G.toolName}:{type:"function",name:G.toolName},toolWarnings:N};default:throw new y({functionality:`tool choice type: ${L}`})}}var M3=j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:I.nullish()}),P3=j.object({type:j.literal("file_search_call"),id:j.string(),queries:j.array(j.string()),results:j.array(j.object({attributes:j.record(j.string(),j.unknown()),file_id:j.string(),filename:j.string(),score:j.number(),text:j.string()})).nullish()}),Q3=j.object({type:j.literal("code_interpreter_call"),id:j.string(),code:j.string().nullable(),container_id:j.string(),outputs:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("logs"),logs:j.string()}),j.object({type:j.literal("image"),url:j.string()})])).nullable()}),f3=j.object({type:j.literal("local_shell_call"),id:j.string(),call_id:j.string(),action:j.object({type:j.literal("exec"),command:j.array(j.string()),timeout_ms:j.number().optional(),user:j.string().optional(),working_directory:j.string().optional(),env:j.record(j.string(),j.string()).optional()})}),x3=j.object({type:j.literal("image_generation_call"),id:j.string(),result:j.string()}),R3=j.object({type:j.literal("file_citation"),file_id:j.string(),filename:j.string().nullish(),index:j.number().nullish(),start_index:j.number().nullish(),end_index:j.number().nullish(),quote:j.string().nullish()}),b3=j.object({type:j.literal("message"),id:j.string()}),A3=j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish()}),w3=j.object({type:j.literal("function_call"),id:j.string(),call_id:j.string(),name:j.string(),arguments:j.string()}),F3=20,y3=j.array(j.object({token:j.string(),logprob:j.number(),top_logprobs:j.array(j.object({token:j.string(),logprob:j.number()}))}));class X3{specificationVersion="v3";modelId;config;constructor(Q,G){this.modelId=Q,this.config=G}supportedUrls={"image/*":[/^https?:\/\/.*$/],"application/pdf":[/^https?:\/\/.*$/]};get provider(){return this.config.provider}async getArgs({maxOutputTokens:Q,temperature:G,stopSequences:W,topP:N,topK:q,presencePenalty:L,frequencyPenalty:Z,seed:Y,prompt:$,providerOptions:J,tools:E,toolChoice:_,responseFormat:X}){let K=[],B=_0(this.modelId);if(q!=null)K.push({type:"unsupported",feature:"topK"});if(Y!=null)K.push({type:"unsupported",feature:"seed"});if(L!=null)K.push({type:"unsupported",feature:"presencePenalty"});if(Z!=null)K.push({type:"unsupported",feature:"frequencyPenalty"});if(W!=null)K.push({type:"unsupported",feature:"stopSequences"});let U=await k({provider:"copilot",providerOptions:J,schema:q0}),{input:M,warnings:V}=await K3({prompt:$,systemMessageMode:B.systemMessageMode,fileIdPrefixes:this.config.fileIdPrefixes,store:U?.store??!0,hasLocalShellTool:z("openai.local_shell")});K.push(...V);let H=U?.strictJsonSchema??!1,D=U?.include;function x(F){D=D!=null?[...D,F]:[F]}function z(F){return E?.find((Y3)=>Y3.type==="provider"&&Y3.id===F)!=null}let P=typeof U?.logprobs==="number"?U?.logprobs:U?.logprobs===!0?F3:void 0;if(P)x("message.output_text.logprobs");let b=E?.find((F)=>F.type==="provider"&&(F.id==="openai.web_search"||F.id==="openai.web_search_preview"))?.name;if(b)x("web_search_call.action.sources");if(z("openai.code_interpreter"))x("code_interpreter_call.outputs");let f={model:this.modelId,input:M,temperature:G,top_p:N,max_output_tokens:Q,...(X?.type==="json"||U?.textVerbosity)&&{text:{...X?.type==="json"&&{format:X.schema!=null?{type:"json_schema",strict:H,name:X.name??"response",description:X.description,schema:X.schema}:{type:"json_object"}},...U?.textVerbosity&&{verbosity:U.textVerbosity}}},max_tool_calls:U?.maxToolCalls,metadata:U?.metadata,parallel_tool_calls:U?.parallelToolCalls,previous_response_id:U?.previousResponseId,store:U?.store,user:U?.user,instructions:U?.instructions,service_tier:U?.serviceTier,include:D,prompt_cache_key:U?.promptCacheKey,safety_identifier:U?.safetyIdentifier,top_logprobs:P,...B.isReasoningModel&&(U?.reasoningEffort!=null||U?.reasoningSummary!=null)&&{reasoning:{...U?.reasoningEffort!=null&&{effort:U.reasoningEffort},...U?.reasoningSummary!=null&&{summary:U.reasoningSummary}}},...B.requiredAutoTruncation&&{truncation:"auto"}};if(B.isReasoningModel){if(f.temperature!=null)f.temperature=void 0,K.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(f.top_p!=null)f.top_p=void 0,K.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"})}else{if(U?.reasoningEffort!=null)K.push({type:"unsupported",feature:"reasoningEffort",details:"reasoningEffort is not supported for non-reasoning models"});if(U?.reasoningSummary!=null)K.push({type:"unsupported",feature:"reasoningSummary",details:"reasoningSummary is not supported for non-reasoning models"})}if(U?.serviceTier==="flex"&&!B.supportsFlexProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),f.service_tier=void 0;if(U?.serviceTier==="priority"&&!B.supportsPriorityProcessing)K.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),f.service_tier=void 0;let{tools:R,toolChoice:w,toolWarnings:C3}=_3({tools:E,toolChoice:_,strictJsonSchema:H});return{webSearchToolName:b,args:{...f,tools:R,tool_choice:w},warnings:[...K,...C3]}}async doGenerate(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),q=this.config.url({path:"/responses",modelId:this.modelId}),{responseHeaders:L,value:Z,rawValue:Y}=await O({url:q,headers:T(this.config.headers(),Q.headers),body:G,failedResponseHandler:e,successfulResponseHandler:i(j.object({id:j.string(),created_at:j.number(),error:j.object({code:j.string(),message:j.string()}).nullish(),model:j.string(),output:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("message"),role:j.literal("assistant"),id:j.string(),content:j.array(j.object({type:j.literal("output_text"),text:j.string(),logprobs:y3.nullish(),annotations:j.array(j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),start_index:j.number(),end_index:j.number(),url:j.string(),title:j.string()}),R3,j.object({type:j.literal("container_file_citation")})]))}))}),M3,P3,Q3,x3,f3,j.object({type:j.literal("function_call"),call_id:j.string(),name:j.string(),arguments:j.string(),id:j.string()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string().optional()}),j.object({type:j.literal("reasoning"),id:j.string(),encrypted_content:j.string().nullish(),summary:j.array(j.object({type:j.literal("summary_text"),text:j.string()}))})])),service_tier:j.string().nullish(),incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3})),abortSignal:Q.abortSignal,fetch:this.config.fetch});if(Z.error)throw new q3({message:Z.error.message,url:q,requestBodyValues:G,statusCode:400,responseHeaders:L,responseBody:Y,isRetryable:!1});let $=[],J=[],E=!1;for(let X of Z.output)switch(X.type){case"reasoning":{if(X.summary.length===0)X.summary.push({type:"summary_text",text:""});for(let K of X.summary)$.push({type:"reasoning",text:K.text,providerMetadata:{openai:{itemId:X.id,reasoningEncryptedContent:X.encrypted_content??null}}});break}case"image_generation_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"image_generation",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"image_generation",result:{result:X.result}});break}case"local_shell_call":{$.push({type:"tool-call",toolCallId:X.call_id,toolName:"local_shell",input:JSON.stringify({action:X.action}),providerMetadata:{openai:{itemId:X.id}}});break}case"message":{for(let K of X.content){if(Q.providerOptions?.openai?.logprobs&&K.logprobs)J.push(K.logprobs);$.push({type:"text",text:K.text,providerMetadata:{openai:{itemId:X.id}}});for(let B of K.annotations)if(B.type==="url_citation")$.push({type:"source",sourceType:"url",id:this.config.generateId?.()??A(),url:B.url,title:B.title});else if(B.type==="file_citation")$.push({type:"source",sourceType:"document",id:this.config.generateId?.()??A(),mediaType:"text/plain",title:B.quote??B.filename??"Document",filename:B.filename??B.file_id})}break}case"function_call":{E=!0,$.push({type:"tool-call",toolCallId:X.call_id,toolName:X.name,input:X.arguments,providerMetadata:{openai:{itemId:X.id}}});break}case"web_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:N??"web_search",input:JSON.stringify({action:X.action}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:N??"web_search",result:{status:X.status}});break}case"computer_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"computer_use",input:"",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:X.status||"completed"}});break}case"file_search_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"file_search",input:"{}",providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"file_search",result:{queries:X.queries,results:X.results?.map((K)=>({attributes:K.attributes,fileId:K.file_id,filename:K.filename,score:K.score,text:K.text}))??null}});break}case"code_interpreter_call":{$.push({type:"tool-call",toolCallId:X.id,toolName:"code_interpreter",input:JSON.stringify({code:X.code,containerId:X.container_id}),providerExecuted:!0}),$.push({type:"tool-result",toolCallId:X.id,toolName:"code_interpreter",result:{outputs:X.outputs}});break}}let _={openai:{responseId:Z.id}};if(J.length>0)_.openai.logprobs=J;if(typeof Z.service_tier==="string")_.openai.serviceTier=Z.service_tier;return{content:$,finishReason:{unified:V3({finishReason:Z.incomplete_details?.reason,hasFunctionCall:E}),raw:Z.incomplete_details?.reason},usage:{inputTokens:{total:Z.usage.input_tokens,noCache:Z.usage.input_tokens_details?.cached_tokens!=null?Z.usage.input_tokens-Z.usage.input_tokens_details.cached_tokens:void 0,cacheRead:Z.usage.input_tokens_details?.cached_tokens??void 0,cacheWrite:void 0},outputTokens:{total:Z.usage.output_tokens,text:void 0,reasoning:Z.usage.output_tokens_details?.reasoning_tokens??void 0},raw:Z.usage},request:{body:G},response:{id:Z.id,timestamp:new Date(Z.created_at*1000),modelId:Z.model,headers:L,body:Y},providerMetadata:_,warnings:W}}async doStream(Q){let{args:G,warnings:W,webSearchToolName:N}=await this.getArgs(Q),{responseHeaders:q,value:L}=await O({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:{...G,stream:!0},failedResponseHandler:e,successfulResponseHandler:u(Y0),abortSignal:Q.abortSignal,fetch:this.config.fetch}),Z=this,Y={unified:"other",raw:void 0},$={inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0},J=[],E=null,_={},X=!1,K={},B=null,U=null,M;return{stream:L.pipeThrough(d({warnings:W,includeRawChunks:Q.includeRawChunks,onParseError:()=>{Y={unified:"error",raw:void 0}},transformValue:(V,H)=>{if(T3(V)){if(V.item.type==="function_call")_[V.output_index]={toolName:V.item.name,toolCallId:V.item.call_id},H.enqueue({type:"tool-input-start",id:V.item.call_id,toolName:V.item.name});else if(V.item.type==="web_search_call")_[V.output_index]={toolName:N??"web_search",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:N??"web_search"});else if(V.item.type==="computer_call")_[V.output_index]={toolName:"computer_use",toolCallId:V.item.id},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"computer_use"});else if(V.item.type==="code_interpreter_call")_[V.output_index]={toolName:"code_interpreter",toolCallId:V.item.id,codeInterpreter:{containerId:V.item.container_id}},H.enqueue({type:"tool-input-start",id:V.item.id,toolName:"code_interpreter"}),H.enqueue({type:"tool-input-delta",id:V.item.id,delta:`{"containerId":"${V.item.container_id}","code":"`});else if(V.item.type==="file_search_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"file_search",input:"{}",providerExecuted:!0});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"image_generation",input:"{}",providerExecuted:!0});else if(V.item.type==="message")U=V.item.id,H.enqueue({type:"text-start",id:V.item.id,providerMetadata:{openai:{itemId:V.item.id}}});else if(L0(V))K[V.output_index]={canonicalId:V.item.id,encryptedContent:V.item.encrypted_content,summaryParts:[0]},B=V.output_index,H.enqueue({type:"reasoning-start",id:`${V.item.id}:0`,providerMetadata:{openai:{itemId:V.item.id,reasoningEncryptedContent:V.item.encrypted_content??null}}})}else if(k3(V)){if(V.item.type==="function_call")_[V.output_index]=void 0,X=!0,H.enqueue({type:"tool-input-end",id:V.item.call_id}),H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:V.item.name,input:V.item.arguments,providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="web_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"web_search",input:JSON.stringify({action:V.item.action}),providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"web_search",result:{status:V.item.status}});else if(V.item.type==="computer_call")_[V.output_index]=void 0,H.enqueue({type:"tool-input-end",id:V.item.id}),H.enqueue({type:"tool-call",toolCallId:V.item.id,toolName:"computer_use",input:"",providerExecuted:!0}),H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"computer_use",result:{type:"computer_use_tool_result",status:V.item.status||"completed"}});else if(V.item.type==="file_search_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"file_search",result:{queries:V.item.queries,results:V.item.results?.map((D)=>({attributes:D.attributes,fileId:D.file_id,filename:D.filename,score:D.score,text:D.text}))??null}});else if(V.item.type==="code_interpreter_call")_[V.output_index]=void 0,H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"code_interpreter",result:{outputs:V.item.outputs}});else if(V.item.type==="image_generation_call")H.enqueue({type:"tool-result",toolCallId:V.item.id,toolName:"image_generation",result:{result:V.item.result}});else if(V.item.type==="local_shell_call")_[V.output_index]=void 0,H.enqueue({type:"tool-call",toolCallId:V.item.call_id,toolName:"local_shell",input:JSON.stringify({action:{type:"exec",command:V.item.action.command,timeoutMs:V.item.action.timeout_ms,user:V.item.action.user,workingDirectory:V.item.action.working_directory,env:V.item.action.env}}),providerMetadata:{openai:{itemId:V.item.id}}});else if(V.item.type==="message"){if(U)H.enqueue({type:"text-end",id:U}),U=null}else if($0(V)){let D=K[V.output_index];if(D){for(let x of D.summaryParts)H.enqueue({type:"reasoning-end",id:`${D.canonicalId}:${x}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:V.item.encrypted_content??null}}});if(delete K[V.output_index],B===V.output_index)B=null}}}else if(J0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:V.delta})}else if(K0(V))H.enqueue({type:"tool-result",toolCallId:V.item_id,toolName:"image_generation",result:{result:V.partial_image_b64}});else if(H0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:JSON.stringify(V.delta).slice(1,-1)})}else if(B0(V)){let D=_[V.output_index];if(D!=null)H.enqueue({type:"tool-input-delta",id:D.toolCallId,delta:'"}'}),H.enqueue({type:"tool-input-end",id:D.toolCallId}),H.enqueue({type:"tool-call",toolCallId:D.toolCallId,toolName:"code_interpreter",input:JSON.stringify({code:V.code,containerId:D.codeInterpreter.containerId}),providerExecuted:!0})}else if(G0(V))E=V.response.id,H.enqueue({type:"response-metadata",id:V.response.id,timestamp:new Date(V.response.created_at*1000),modelId:V.response.model});else if(Z0(V)){if(!U)U=V.item_id,H.enqueue({type:"text-start",id:U,providerMetadata:{openai:{itemId:V.item_id}}});if(H.enqueue({type:"text-delta",id:U,delta:V.delta}),Q.providerOptions?.openai?.logprobs&&V.logprobs)J.push(V.logprobs)}else if(N0(V)){let D=B!==null?K[B]:null;if(D&&V.summary_index>0)D.summaryParts.push(V.summary_index),H.enqueue({type:"reasoning-start",id:`${D.canonicalId}:${V.summary_index}`,providerMetadata:{openai:{itemId:D.canonicalId,reasoningEncryptedContent:D.encryptedContent??null}}})}else if(D0(V)){let D=B!==null?K[B]:null;if(D)H.enqueue({type:"reasoning-delta",id:`${D.canonicalId}:${V.summary_index}`,delta:V.delta,providerMetadata:{openai:{itemId:D.canonicalId}}})}else if(E0(V)){if(Y={unified:V3({finishReason:V.response.incomplete_details?.reason,hasFunctionCall:X}),raw:V.response.incomplete_details?.reason??void 0},$.inputTokens=V.response.usage.input_tokens,$.outputTokens=V.response.usage.output_tokens,$.totalTokens=V.response.usage.input_tokens+V.response.usage.output_tokens,$.reasoningTokens=V.response.usage.output_tokens_details?.reasoning_tokens??void 0,$.cachedInputTokens=V.response.usage.input_tokens_details?.cached_tokens??void 0,typeof V.response.service_tier==="string")M=V.response.service_tier}else if(U0(V)){if(V.annotation.type==="url_citation")H.enqueue({type:"source",sourceType:"url",id:Z.config.generateId?.()??A(),url:V.annotation.url,title:V.annotation.title});else if(V.annotation.type==="file_citation")H.enqueue({type:"source",sourceType:"document",id:Z.config.generateId?.()??A(),mediaType:"text/plain",title:V.annotation.quote??V.annotation.filename??"Document",filename:V.annotation.filename??V.annotation.file_id})}else if(W0(V))H.enqueue({type:"error",error:V})},flush:(V)=>{if(U)V.enqueue({type:"text-end",id:U}),U=null;let H={openai:{responseId:E}};if(J.length>0)H.openai.logprobs=J;if(M!==void 0)H.openai.serviceTier=M;V.enqueue({type:"finish",finishReason:Y,usage:{inputTokens:{total:$.inputTokens,noCache:$.inputTokens!=null&&$.cachedInputTokens!=null?$.inputTokens-$.cachedInputTokens:void 0,cacheRead:$.cachedInputTokens,cacheWrite:void 0},outputTokens:{total:$.outputTokens,text:void 0,reasoning:$.reasoningTokens},raw:{input_tokens:$.inputTokens,output_tokens:$.outputTokens,total_tokens:$.totalTokens}},providerMetadata:H})}})),request:{body:G},response:{headers:q}}}}var S3=j.object({input_tokens:j.number(),input_tokens_details:j.object({cached_tokens:j.number().nullish()}).nullish(),output_tokens:j.number(),output_tokens_details:j.object({reasoning_tokens:j.number().nullish()}).nullish()}),p3=j.object({type:j.literal("response.output_text.delta"),item_id:j.string(),delta:j.string(),logprobs:y3.nullish()}),s3=j.object({type:j.literal("error"),code:j.string(),message:j.string(),param:j.string().nullish(),sequence_number:j.number()}),n3=j.object({type:j.enum(["response.completed","response.incomplete"]),response:j.object({incomplete_details:j.object({reason:j.string()}).nullish(),usage:S3,service_tier:j.string().nullish()})}),r3=j.object({type:j.literal("response.created"),response:j.object({id:j.string(),created_at:j.number(),model:j.string(),service_tier:j.string().nullish()})}),t3=j.object({type:j.literal("response.output_item.added"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3,j.object({type:j.literal("web_search_call"),id:j.string(),status:j.string(),action:j.object({type:j.literal("search"),query:j.string().optional()}).nullish()}),j.object({type:j.literal("computer_call"),id:j.string(),status:j.string()}),j.object({type:j.literal("file_search_call"),id:j.string()}),j.object({type:j.literal("image_generation_call"),id:j.string()}),Q3.extend({status:j.string()})])}),l3=j.object({type:j.literal("response.output_item.done"),output_index:j.number(),item:j.discriminatedUnion("type",[b3,A3,w3.extend({status:j.literal("completed")}),Q3,x3,M3,P3,f3,j.object({type:j.literal("computer_call"),id:j.string(),status:j.literal("completed")})])}),a3=j.object({type:j.literal("response.function_call_arguments.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),e3=j.object({type:j.literal("response.image_generation_call.partial_image"),item_id:j.string(),output_index:j.number(),partial_image_b64:j.string()}),o3=j.object({type:j.literal("response.code_interpreter_call_code.delta"),item_id:j.string(),output_index:j.number(),delta:j.string()}),j0=j.object({type:j.literal("response.code_interpreter_call_code.done"),item_id:j.string(),output_index:j.number(),code:j.string()}),V0=j.object({type:j.literal("response.output_text.annotation.added"),annotation:j.discriminatedUnion("type",[j.object({type:j.literal("url_citation"),url:j.string(),title:j.string()}),R3])}),Q0=j.object({type:j.literal("response.reasoning_summary_part.added"),item_id:j.string(),summary_index:j.number()}),X0=j.object({type:j.literal("response.reasoning_summary_text.delta"),item_id:j.string(),summary_index:j.number(),delta:j.string()}),Y0=j.union([p3,n3,r3,t3,l3,a3,e3,o3,j0,V0,Q0,X0,s3,j.object({type:j.string()}).loose()]);function Z0(Q){return Q.type==="response.output_text.delta"}function k3(Q){return Q.type==="response.output_item.done"}function $0(Q){return k3(Q)&&Q.item.type==="reasoning"}function E0(Q){return Q.type==="response.completed"||Q.type==="response.incomplete"}function G0(Q){return Q.type==="response.created"}function J0(Q){return Q.type==="response.function_call_arguments.delta"}function K0(Q){return Q.type==="response.image_generation_call.partial_image"}function H0(Q){return Q.type==="response.code_interpreter_call_code.delta"}function B0(Q){return Q.type==="response.code_interpreter_call_code.done"}function T3(Q){return Q.type==="response.output_item.added"}function L0(Q){return T3(Q)&&Q.item.type==="reasoning"}function U0(Q){return Q.type==="response.output_text.annotation.added"}function N0(Q){return Q.type==="response.reasoning_summary_part.added"}function D0(Q){return Q.type==="response.reasoning_summary_text.delta"}function W0(Q){return Q.type==="error"}function _0(Q){let G=Q.startsWith("o3")||Q.startsWith("o4-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-chat"),W=Q.startsWith("gpt-4")||Q.startsWith("gpt-5-mini")||Q.startsWith("gpt-5")&&!Q.startsWith("gpt-5-nano")&&!Q.startsWith("gpt-5-chat")||Q.startsWith("o3")||Q.startsWith("o4-mini"),N={requiredAutoTruncation:!1,systemMessageMode:"system",supportsFlexProcessing:G,supportsPriorityProcessing:W};if(Q.startsWith("gpt-5-chat"))return{...N,isReasoningModel:!1};if(Q.startsWith("o")||Q.startsWith("gpt-5")||Q.startsWith("codex-")||Q.startsWith("computer-use")){if(Q.startsWith("o1-mini")||Q.startsWith("o1-preview"))return{...N,isReasoningModel:!0,systemMessageMode:"remove"};return{...N,isReasoningModel:!0,systemMessageMode:"developer"}}return{...N,isReasoningModel:!1}}var q0=j.object({include:j.array(j.enum(["reasoning.encrypted_content","file_search_call.results","message.output_text.logprobs"])).nullish(),instructions:j.string().nullish(),logprobs:j.union([j.boolean(),j.number().min(1).max(F3)]).optional(),maxToolCalls:j.number().nullish(),metadata:j.any().nullish(),parallelToolCalls:j.boolean().nullish(),previousResponseId:j.string().nullish(),promptCacheKey:j.string().nullish(),reasoningEffort:j.string().nullish(),reasoningSummary:j.string().nullish(),safetyIdentifier:j.string().nullish(),serviceTier:j.enum(["auto","flex","priority"]).nullish(),store:j.boolean().nullish(),strictJsonSchema:j.boolean().nullish(),textVerbosity:j.enum(["low","medium","high"]).nullish(),user:j.string().nullish()});var M0="0.1.0";function z3(Q={}){let G=I3(Q.baseURL??"https://api.openai.com/v1");if(!G)throw Error("baseURL is required");let W={...Q.apiKey&&{Authorization:`Bearer ${Q.apiKey}`},...Q.headers},N=()=>O3(W,`ai-sdk/openai-compatible/${M0}`),q=($)=>{return new a($,{provider:`${Q.name??"openai-compatible"}.chat`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},L=($)=>{return new X3($,{provider:`${Q.name??"openai-compatible"}.responses`,headers:N,url:({path:J})=>`${G}${J}`,fetch:Q.fetch})},Z=($)=>q($),Y=function($){return q($)};return Y.languageModel=Z,Y.chat=q,Y.responses=L,Y}var P0=z3();export{P0 as openaiCompatible,z3 as createOpenaiCompatible};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-3k2b05fv.js";var e={"ui.sessionReview.title":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0627\u0644\u062C\u0644\u0633\u0629","ui.sessionReview.title.lastTurn":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0622\u062E\u0631 \u062F\u0648\u0631","ui.sessionReview.diffStyle.unified":"\u0645\u0648\u062D\u062F","ui.sessionReview.diffStyle.split":"\u0645\u0646\u0642\u0633\u0645","ui.sessionReview.openFile":"\u0641\u062A\u062D \u0645\u0644\u0641","ui.sessionReview.selection.line":"\u0633\u0637\u0631 {{line}}","ui.sessionReview.selection.lines":"\u0627\u0644\u0623\u0633\u0637\u0631 {{start}}-{{end}}","ui.sessionReview.expandAll":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0643\u0644","ui.sessionReview.collapseAll":"\u0637\u064A \u0627\u0644\u0643\u0644","ui.sessionReview.change.added":"\u0645\u0636\u0627\u0641","ui.sessionReview.change.removed":"\u0645\u062D\u0630\u0648\u0641","ui.sessionReview.change.modified":"\u0645\u0639\u062F\u0644","ui.sessionReview.image.loading":"\u062C\u0627\u0631 \u0627\u0644\u062A\u062D\u0645\u064A\u0644...","ui.sessionReview.image.placeholder":"\u0635\u0648\u0631\u0629","ui.sessionReview.largeDiff.title":"Diff \u0643\u0628\u064A\u0631 \u062C\u062F\u0627 \u0644\u0639\u0631\u0636\u0647","ui.sessionReview.largeDiff.meta":"\u0627\u0644\u062D\u062F: {{limit}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627. \u0627\u0644\u062D\u0627\u0644\u064A: {{current}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627.","ui.sessionReview.largeDiff.renderAnyway":"\u0627\u0639\u0631\u0636 \u0639\u0644\u0649 \u0623\u064A \u062D\u0627\u0644","ui.fileMedia.kind.image":"\u0635\u0648\u0631\u0629","ui.fileMedia.kind.audio":"\u0635\u0648\u062A","ui.fileMedia.state.removed":"\u062A\u0645\u062A \u0625\u0632\u0627\u0644\u0629 {{kind}}","ui.fileMedia.state.loading":"\u062C\u0627\u0631\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}...","ui.fileMedia.state.error":"\u062E\u0637\u0623 \u0641\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} \u063A\u064A\u0631 \u0645\u062A\u0648\u0641\u0631","ui.fileMedia.binary.title":"\u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A","ui.fileMedia.binary.description.path":"{{path}} \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.fileMedia.binary.description.default":"\u0647\u0630\u0627 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.lineComment.label.prefix":"\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u0623\u0636\u0641 \u062A\u0639\u0644\u064A\u0642\u064B\u0627","ui.lineComment.submit":"\u062A\u0639\u0644\u064A\u0642","ui.sessionTurn.steps.show":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.steps.hide":"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.summary.response":"\u0627\u0633\u062A\u062C\u0627\u0628\u0629","ui.sessionTurn.diff.showMore":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A ({{count}})","ui.sessionTurn.retry.retrying":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","ui.sessionTurn.retry.inSeconds":"\u062E\u0644\u0627\u0644 {{seconds}} \u062B\u0648\u0627\u0646\u064A","ui.sessionTurn.retry.attempt":"\u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u0645\u0632\u062F\u062D\u0645 \u062D\u0627\u0644\u064A\u0627","ui.sessionTurn.error.freeUsageExceeded":"\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u062D\u062F \u0627\u0644\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0645\u062C\u0627\u0646\u064A","ui.sessionTurn.error.addQredits":"\u0625\u0636\u0627\u0641\u0629 \u0631\u0635\u064A\u062F","ui.sessionTurn.status.delegating":"\u062A\u0641\u0648\u064A\u0636 \u0627\u0644\u0639\u0645\u0644","ui.sessionTurn.status.planning":"\u062A\u062E\u0637\u064A\u0637 \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.sessionTurn.status.gatheringContext":"\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.gatheredContext":"\u062A\u0645 \u0627\u0644\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.searchingCodebase":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0642\u0627\u0639\u062F\u0629 \u0627\u0644\u062A\u0639\u0644\u064A\u0645\u0627\u062A \u0627\u0644\u0628\u0631\u0645\u062C\u064A\u0629","ui.sessionTurn.status.searchingWeb":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0627\u0644\u0648\u064A\u0628","ui.sessionTurn.status.makingEdits":"\u0625\u062C\u0631\u0627\u0621 \u062A\u0639\u062F\u064A\u0644\u0627\u062A","ui.sessionTurn.status.runningCommands":"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0623\u0648\u0627\u0645\u0631","ui.sessionTurn.status.thinking":"\u062A\u0641\u0643\u064A\u0631","ui.sessionTurn.status.thinkingWithTopic":"\u062A\u0641\u0643\u064A\u0631 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u062C\u0645\u0639 \u0627\u0644\u0623\u0641\u0643\u0627\u0631","ui.sessionTurn.status.consideringNextSteps":"\u0627\u0644\u0646\u0638\u0631 \u0641\u064A \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.messagePart.questions.dismissed":"\u062A\u0645 \u0631\u0641\u0636 \u0627\u0644\u0623\u0633\u0626\u0644\u0629","ui.messagePart.compaction":"\u062A\u0645 \u0636\u063A\u0637 \u0627\u0644\u062C\u0644\u0633\u0629","ui.messagePart.context.read.one":"{{count}} \u0642\u0631\u0627\u0621\u0629","ui.messagePart.context.read.other":"{{count}} \u0642\u0631\u0627\u0621\u0627\u062A","ui.messagePart.context.search.one":"{{count}} \u0628\u062D\u062B","ui.messagePart.context.search.other":"{{count}} \u0639\u0645\u0644\u064A\u0627\u062A \u0628\u062D\u062B","ui.messagePart.context.list.one":"{{count}} \u0642\u0627\u0626\u0645\u0629","ui.messagePart.context.list.other":"{{count}} \u0642\u0648\u0627\u0626\u0645","ui.messagePart.diagnostic.error":"\u062E\u0637\u0623","ui.messagePart.title.edit":"\u062A\u062D\u0631\u064A\u0631","ui.messagePart.title.write":"\u0643\u062A\u0627\u0628\u0629","ui.messagePart.option.typeOwnAnswer":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0627\u0644\u062E\u0627\u0635\u0629","ui.messagePart.review.title":"\u0645\u0631\u0627\u062C\u0639\u0629 \u0625\u062C\u0627\u0628\u0627\u062A\u0643","ui.list.loading":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.list.empty":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C","ui.list.clearFilter":"\u0645\u0633\u062D \u0639\u0627\u0645\u0644 \u0627\u0644\u062A\u0635\u0641\u064A\u0629","ui.list.emptyWithFilter.prefix":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644\u0640","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u0631\u0633\u0627\u0644\u0629 \u062C\u062F\u064A\u062F\u0629","ui.textField.copyToClipboard":"\u0646\u0633\u062E \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","ui.textField.copyLink":"\u0646\u0633\u062E \u0627\u0644\u0631\u0627\u0628\u0637","ui.textField.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E","ui.imagePreview.alt":"\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0635\u0648\u0631\u0629","ui.scrollView.ariaLabel":"\u0645\u062D\u062A\u0648\u0649 \u0642\u0627\u0628\u0644 \u0644\u0644\u062A\u0645\u0631\u064A\u0631","ui.tool.read":"\u0642\u0631\u0627\u0621\u0629","ui.tool.loaded":"\u062A\u0645 \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.tool.list":"\u0642\u0627\u0626\u0645\u0629","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"\u062C\u0644\u0628 \u0627\u0644\u0648\u064A\u0628","ui.tool.websearch":"\u0628\u062D\u062B \u0627\u0644\u0648\u064A\u0628","ui.tool.codesearch":"\u0628\u062D\u062B \u0627\u0644\u0643\u0648\u062F","ui.tool.shell":"Shell","ui.tool.patch":"\u062A\u0635\u062D\u064A\u062D","ui.tool.todos":"\u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.todos.read":"\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.questions":"\u0623\u0633\u0626\u0644\u0629","ui.tool.agent":"\u0648\u0643\u064A\u0644 {{type}}","ui.tool.agent.default":"\u0648\u0643\u064A\u0644","ui.common.file.one":"\u0645\u0644\u0641","ui.common.file.other":"\u0645\u0644\u0641\u0627\u062A","ui.common.question.one":"\u0633\u0624\u0627\u0644","ui.common.question.other":"\u0623\u0633\u0626\u0644\u0629","ui.common.add":"\u0625\u0636\u0627\u0641\u0629","ui.common.back":"\u0631\u062C\u0648\u0639","ui.common.cancel":"\u0625\u0644\u063A\u0627\u0621","ui.common.confirm":"\u062A\u0623\u0643\u064A\u062F","ui.common.dismiss":"\u0631\u0641\u0636","ui.common.close":"\u0625\u063A\u0644\u0627\u0642","ui.common.next":"\u0627\u0644\u062A\u0627\u0644\u064A","ui.common.submit":"\u0625\u0631\u0633\u0627\u0644","ui.permission.deny":"\u0631\u0641\u0636","ui.permission.allowAlways":"\u0627\u0644\u0633\u0645\u0627\u062D \u062F\u0627\u0626\u0645\u064B\u0627","ui.permission.allowOnce":"\u0627\u0644\u0633\u0645\u0627\u062D \u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629","ui.message.expand":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.collapse":"\u0637\u064A \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.copy":"\u0646\u0633\u062E","ui.message.copyMessage":"\u0646\u0633\u062E \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.forkMessage":"\u062A\u0634\u0639\u0628 \u0625\u0644\u0649 \u062C\u0644\u0633\u0629 \u062C\u062F\u064A\u062F\u0629","ui.message.revertMessage":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0639\u064A\u064A\u0646 \u0625\u0644\u0649 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629","ui.message.copyResponse":"\u0646\u0633\u062E \u0627\u0644\u0631\u062F","ui.message.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E!","ui.message.interrupted":"\u062A\u0645\u062A \u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629","ui.message.queued":"\u0641\u064A \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631","ui.message.attachment.alt":"\u0645\u0631\u0641\u0642","ui.patch.action.deleted":"\u0645\u062D\u0630\u0648\u0641","ui.patch.action.created":"\u062A\u0645 \u0627\u0644\u0625\u0646\u0634\u0627\u0621","ui.patch.action.moved":"\u0645\u0646\u0642\u0648\u0644","ui.patch.action.patched":"\u0645\u0635\u062D\u062D","ui.question.subtitle.answered":"{{count}} \u0623\u062C\u064A\u0628","ui.question.answer.none":"(\u0644\u0627 \u062A\u0648\u062C\u062F \u0625\u062C\u0627\u0628\u0629)","ui.question.review.notAnswered":"(\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0631\u062F)","ui.question.multiHint":"\u062D\u062F\u062F \u0643\u0644 \u0645\u0627 \u064A\u0646\u0637\u0628\u0642","ui.question.singleHint":"\u062D\u062F\u062F \u0625\u062C\u0627\u0628\u0629 \u0648\u0627\u062D\u062F\u0629","ui.question.custom.placeholder":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643...","ui.fileSearch.placeholder":"\u0628\u062D\u062B","ui.fileSearch.previousMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629","ui.fileSearch.nextMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.fileSearch.close":"\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0628\u062D\u062B","ui.tool.task":"\u0645\u0647\u0645\u0629","ui.tool.skill":"\u0645\u0647\u0627\u0631\u0629","ui.basicTool.called":"\u062A\u0645 \u0627\u0633\u062A\u062F\u0639\u0627\u0621 `{{tool}}`","ui.toolErrorCard.failed":"\u0641\u0634\u0644","ui.toolErrorCard.copyError":"\u0646\u0633\u062E \u0627\u0644\u062E\u0637\u0623","ui.message.duration.seconds":"{{count}}\u062B","ui.message.duration.minutesSeconds":"{{minutes}}\u062F {{seconds}}\u062B"};export{e as dict};
2
+ import"./chunk-4sazy0nq.js";var e={"ui.sessionReview.title":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0627\u0644\u062C\u0644\u0633\u0629","ui.sessionReview.title.lastTurn":"\u062A\u063A\u064A\u064A\u0631\u0627\u062A \u0622\u062E\u0631 \u062F\u0648\u0631","ui.sessionReview.diffStyle.unified":"\u0645\u0648\u062D\u062F","ui.sessionReview.diffStyle.split":"\u0645\u0646\u0642\u0633\u0645","ui.sessionReview.openFile":"\u0641\u062A\u062D \u0645\u0644\u0641","ui.sessionReview.selection.line":"\u0633\u0637\u0631 {{line}}","ui.sessionReview.selection.lines":"\u0627\u0644\u0623\u0633\u0637\u0631 {{start}}-{{end}}","ui.sessionReview.expandAll":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0643\u0644","ui.sessionReview.collapseAll":"\u0637\u064A \u0627\u0644\u0643\u0644","ui.sessionReview.change.added":"\u0645\u0636\u0627\u0641","ui.sessionReview.change.removed":"\u0645\u062D\u0630\u0648\u0641","ui.sessionReview.change.modified":"\u0645\u0639\u062F\u0644","ui.sessionReview.image.loading":"\u062C\u0627\u0631 \u0627\u0644\u062A\u062D\u0645\u064A\u0644...","ui.sessionReview.image.placeholder":"\u0635\u0648\u0631\u0629","ui.sessionReview.largeDiff.title":"Diff \u0643\u0628\u064A\u0631 \u062C\u062F\u0627 \u0644\u0639\u0631\u0636\u0647","ui.sessionReview.largeDiff.meta":"\u0627\u0644\u062D\u062F: {{limit}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627. \u0627\u0644\u062D\u0627\u0644\u064A: {{current}} \u0633\u0637\u0631\u064B\u0627 \u0645\u062A\u063A\u064A\u0631\u064B\u0627.","ui.sessionReview.largeDiff.renderAnyway":"\u0627\u0639\u0631\u0636 \u0639\u0644\u0649 \u0623\u064A \u062D\u0627\u0644","ui.fileMedia.kind.image":"\u0635\u0648\u0631\u0629","ui.fileMedia.kind.audio":"\u0635\u0648\u062A","ui.fileMedia.state.removed":"\u062A\u0645\u062A \u0625\u0632\u0627\u0644\u0629 {{kind}}","ui.fileMedia.state.loading":"\u062C\u0627\u0631\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}...","ui.fileMedia.state.error":"\u062E\u0637\u0623 \u0641\u064A \u062A\u062D\u0645\u064A\u0644 {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} \u063A\u064A\u0631 \u0645\u062A\u0648\u0641\u0631","ui.fileMedia.binary.title":"\u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A","ui.fileMedia.binary.description.path":"{{path}} \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.fileMedia.binary.description.default":"\u0647\u0630\u0627 \u0645\u0644\u0641 \u062B\u0646\u0627\u0626\u064A \u0648\u0644\u0627 \u064A\u0645\u0643\u0646 \u0639\u0631\u0636\u0647.","ui.lineComment.label.prefix":"\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u0639\u0644\u064A\u0642 \u0639\u0644\u0649 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u0623\u0636\u0641 \u062A\u0639\u0644\u064A\u0642\u064B\u0627","ui.lineComment.submit":"\u062A\u0639\u0644\u064A\u0642","ui.sessionTurn.steps.show":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.steps.hide":"\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u0637\u0648\u0627\u062A","ui.sessionTurn.summary.response":"\u0627\u0633\u062A\u062C\u0627\u0628\u0629","ui.sessionTurn.diff.showMore":"\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u0645\u0632\u064A\u062F \u0645\u0646 \u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A ({{count}})","ui.sessionTurn.retry.retrying":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629","ui.sessionTurn.retry.inSeconds":"\u062E\u0644\u0627\u0644 {{seconds}} \u062B\u0648\u0627\u0646\u064A","ui.sessionTurn.retry.attempt":"\u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0631\u0642\u0645 {{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u0645\u0632\u062F\u062D\u0645 \u062D\u0627\u0644\u064A\u0627","ui.sessionTurn.error.freeUsageExceeded":"\u062A\u0645 \u062A\u062C\u0627\u0648\u0632 \u062D\u062F \u0627\u0644\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0645\u062C\u0627\u0646\u064A","ui.sessionTurn.error.addQredits":"\u0625\u0636\u0627\u0641\u0629 \u0631\u0635\u064A\u062F","ui.sessionTurn.status.delegating":"\u062A\u0641\u0648\u064A\u0636 \u0627\u0644\u0639\u0645\u0644","ui.sessionTurn.status.planning":"\u062A\u062E\u0637\u064A\u0637 \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.sessionTurn.status.gatheringContext":"\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.gatheredContext":"\u062A\u0645 \u0627\u0644\u0627\u0633\u062A\u0643\u0634\u0627\u0641","ui.sessionTurn.status.searchingCodebase":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0642\u0627\u0639\u062F\u0629 \u0627\u0644\u062A\u0639\u0644\u064A\u0645\u0627\u062A \u0627\u0644\u0628\u0631\u0645\u062C\u064A\u0629","ui.sessionTurn.status.searchingWeb":"\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0627\u0644\u0648\u064A\u0628","ui.sessionTurn.status.makingEdits":"\u0625\u062C\u0631\u0627\u0621 \u062A\u0639\u062F\u064A\u0644\u0627\u062A","ui.sessionTurn.status.runningCommands":"\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0623\u0648\u0627\u0645\u0631","ui.sessionTurn.status.thinking":"\u062A\u0641\u0643\u064A\u0631","ui.sessionTurn.status.thinkingWithTopic":"\u062A\u0641\u0643\u064A\u0631 - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u062C\u0645\u0639 \u0627\u0644\u0623\u0641\u0643\u0627\u0631","ui.sessionTurn.status.consideringNextSteps":"\u0627\u0644\u0646\u0638\u0631 \u0641\u064A \u0627\u0644\u062E\u0637\u0648\u0627\u062A \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.messagePart.questions.dismissed":"\u062A\u0645 \u0631\u0641\u0636 \u0627\u0644\u0623\u0633\u0626\u0644\u0629","ui.messagePart.compaction":"\u062A\u0645 \u0636\u063A\u0637 \u0627\u0644\u062C\u0644\u0633\u0629","ui.messagePart.context.read.one":"{{count}} \u0642\u0631\u0627\u0621\u0629","ui.messagePart.context.read.other":"{{count}} \u0642\u0631\u0627\u0621\u0627\u062A","ui.messagePart.context.search.one":"{{count}} \u0628\u062D\u062B","ui.messagePart.context.search.other":"{{count}} \u0639\u0645\u0644\u064A\u0627\u062A \u0628\u062D\u062B","ui.messagePart.context.list.one":"{{count}} \u0642\u0627\u0626\u0645\u0629","ui.messagePart.context.list.other":"{{count}} \u0642\u0648\u0627\u0626\u0645","ui.messagePart.diagnostic.error":"\u062E\u0637\u0623","ui.messagePart.title.edit":"\u062A\u062D\u0631\u064A\u0631","ui.messagePart.title.write":"\u0643\u062A\u0627\u0628\u0629","ui.messagePart.option.typeOwnAnswer":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0627\u0644\u062E\u0627\u0635\u0629","ui.messagePart.review.title":"\u0645\u0631\u0627\u062C\u0639\u0629 \u0625\u062C\u0627\u0628\u0627\u062A\u0643","ui.list.loading":"\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.list.empty":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C","ui.list.clearFilter":"\u0645\u0633\u062D \u0639\u0627\u0645\u0644 \u0627\u0644\u062A\u0635\u0641\u064A\u0629","ui.list.emptyWithFilter.prefix":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0644\u0640","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"\u0631\u0633\u0627\u0644\u0629 \u062C\u062F\u064A\u062F\u0629","ui.textField.copyToClipboard":"\u0646\u0633\u062E \u0625\u0644\u0649 \u0627\u0644\u062D\u0627\u0641\u0638\u0629","ui.textField.copyLink":"\u0646\u0633\u062E \u0627\u0644\u0631\u0627\u0628\u0637","ui.textField.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E","ui.imagePreview.alt":"\u0645\u0639\u0627\u064A\u0646\u0629 \u0627\u0644\u0635\u0648\u0631\u0629","ui.scrollView.ariaLabel":"\u0645\u062D\u062A\u0648\u0649 \u0642\u0627\u0628\u0644 \u0644\u0644\u062A\u0645\u0631\u064A\u0631","ui.tool.read":"\u0642\u0631\u0627\u0621\u0629","ui.tool.loaded":"\u062A\u0645 \u0627\u0644\u062A\u062D\u0645\u064A\u0644","ui.tool.list":"\u0642\u0627\u0626\u0645\u0629","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"\u062C\u0644\u0628 \u0627\u0644\u0648\u064A\u0628","ui.tool.websearch":"\u0628\u062D\u062B \u0627\u0644\u0648\u064A\u0628","ui.tool.codesearch":"\u0628\u062D\u062B \u0627\u0644\u0643\u0648\u062F","ui.tool.shell":"Shell","ui.tool.patch":"\u062A\u0635\u062D\u064A\u062D","ui.tool.todos":"\u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.todos.read":"\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u0647\u0627\u0645","ui.tool.questions":"\u0623\u0633\u0626\u0644\u0629","ui.tool.agent":"\u0648\u0643\u064A\u0644 {{type}}","ui.tool.agent.default":"\u0648\u0643\u064A\u0644","ui.common.file.one":"\u0645\u0644\u0641","ui.common.file.other":"\u0645\u0644\u0641\u0627\u062A","ui.common.question.one":"\u0633\u0624\u0627\u0644","ui.common.question.other":"\u0623\u0633\u0626\u0644\u0629","ui.common.add":"\u0625\u0636\u0627\u0641\u0629","ui.common.back":"\u0631\u062C\u0648\u0639","ui.common.cancel":"\u0625\u0644\u063A\u0627\u0621","ui.common.confirm":"\u062A\u0623\u0643\u064A\u062F","ui.common.dismiss":"\u0631\u0641\u0636","ui.common.close":"\u0625\u063A\u0644\u0627\u0642","ui.common.next":"\u0627\u0644\u062A\u0627\u0644\u064A","ui.common.submit":"\u0625\u0631\u0633\u0627\u0644","ui.permission.deny":"\u0631\u0641\u0636","ui.permission.allowAlways":"\u0627\u0644\u0633\u0645\u0627\u062D \u062F\u0627\u0626\u0645\u064B\u0627","ui.permission.allowOnce":"\u0627\u0644\u0633\u0645\u0627\u062D \u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629","ui.message.expand":"\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.collapse":"\u0637\u064A \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.copy":"\u0646\u0633\u062E","ui.message.copyMessage":"\u0646\u0633\u062E \u0627\u0644\u0631\u0633\u0627\u0644\u0629","ui.message.forkMessage":"\u062A\u0634\u0639\u0628 \u0625\u0644\u0649 \u062C\u0644\u0633\u0629 \u062C\u062F\u064A\u062F\u0629","ui.message.revertMessage":"\u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u062A\u0639\u064A\u064A\u0646 \u0625\u0644\u0649 \u0647\u0630\u0647 \u0627\u0644\u0646\u0642\u0637\u0629","ui.message.copyResponse":"\u0646\u0633\u062E \u0627\u0644\u0631\u062F","ui.message.copied":"\u062A\u0645 \u0627\u0644\u0646\u0633\u062E!","ui.message.interrupted":"\u062A\u0645\u062A \u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629","ui.message.queued":"\u0641\u064A \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631","ui.message.attachment.alt":"\u0645\u0631\u0641\u0642","ui.patch.action.deleted":"\u0645\u062D\u0630\u0648\u0641","ui.patch.action.created":"\u062A\u0645 \u0627\u0644\u0625\u0646\u0634\u0627\u0621","ui.patch.action.moved":"\u0645\u0646\u0642\u0648\u0644","ui.patch.action.patched":"\u0645\u0635\u062D\u062D","ui.question.subtitle.answered":"{{count}} \u0623\u062C\u064A\u0628","ui.question.answer.none":"(\u0644\u0627 \u062A\u0648\u062C\u062F \u0625\u062C\u0627\u0628\u0629)","ui.question.review.notAnswered":"(\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0631\u062F)","ui.question.multiHint":"\u062D\u062F\u062F \u0643\u0644 \u0645\u0627 \u064A\u0646\u0637\u0628\u0642","ui.question.singleHint":"\u062D\u062F\u062F \u0625\u062C\u0627\u0628\u0629 \u0648\u0627\u062D\u062F\u0629","ui.question.custom.placeholder":"\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643...","ui.fileSearch.placeholder":"\u0628\u062D\u062B","ui.fileSearch.previousMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629","ui.fileSearch.nextMatch":"\u0627\u0644\u0645\u0637\u0627\u0628\u0642\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629","ui.fileSearch.close":"\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0628\u062D\u062B","ui.tool.task":"\u0645\u0647\u0645\u0629","ui.tool.skill":"\u0645\u0647\u0627\u0631\u0629","ui.basicTool.called":"\u062A\u0645 \u0627\u0633\u062A\u062F\u0639\u0627\u0621 `{{tool}}`","ui.toolErrorCard.failed":"\u0641\u0634\u0644","ui.toolErrorCard.copyError":"\u0646\u0633\u062E \u0627\u0644\u062E\u0637\u0623","ui.message.duration.seconds":"{{count}}\u062B","ui.message.duration.minutesSeconds":"{{minutes}}\u062F {{seconds}}\u062B"};export{e as dict};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Pd as q}from"./chunk-9xvctnjr.js";import{Sf as v}from"./chunk-9s4whpg1.js";import{Xg as S}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import{Tl as Q,am as H}from"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import{zt as K}from"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var P=q({command:"pr <number>",describe:"fetch and checkout a GitHub PR branch, then run qitqode",builder:(Y)=>Y.positional("number",{type:"number",describe:"PR number to checkout",demandOption:!0}),async handler(Y){await H.provide({directory:process.cwd(),async fn(){if(H.project.vcs!=="git")v.error("Could not find git repository. Please run this command from a git repository."),process.exit(1);let J=Y.number,Z=`pr/${J}`;if(v.println(`Fetching and checking out PR #${J}...`),(await K.run(["gh","pr","checkout",`${J}`,"--branch",Z,"--force"],{nothrow:!0})).code!==0)v.error(`Failed to checkout PR #${J}. Make sure you have gh CLI installed and authenticated.`),process.exit(1);let _=await K.text(["gh","pr","view",`${J}`,"--json","headRepository,headRepositoryOwner,isCrossRepository,headRefName,body"],{nothrow:!0}),V;if(_.code===0){let j=_.text;if(j.trim()){let z=JSON.parse(j);if(z&&z.isCrossRepository&&z.headRepository&&z.headRepositoryOwner){let L=z.headRepositoryOwner.login,W=z.headRepository.name,C=L;if(!(await S.runPromise(Q.Service.use((F)=>F.run(["remote"],{cwd:H.worktree}))).then((F)=>F.text().trim())).split(`
3
+ `).includes(C))await S.runPromise(Q.Service.use((F)=>F.run(["remote","add",C,`https://github.com/${L}/${W}.git`],{cwd:H.worktree}))),v.println(`Added fork remote: ${C}`);let X=z.headRefName;await S.runPromise(Q.Service.use((F)=>F.run(["branch",`--set-upstream-to=${C}/${X}`,Z],{cwd:H.worktree})))}if(z&&z.body){let L=z.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/);if(L){let W=L[0];v.println(`Found qitqode session: ${W}`),v.println("Importing session...");let C=await K.text(["qitqode","import",W],{nothrow:!0});if(C.code===0){let X=C.text.trim().match(/Imported session: ([a-zA-Z0-9_-]+)/);if(X)V=X[1],v.println(`Session imported: ${V}`)}}}}}v.println(`Successfully checked out PR #${J} as branch '${Z}'`),v.println(),v.println("Starting qitqode..."),v.println();let D=V?["-s",V]:[],$=await K.spawn(["qitqode",...D],{stdin:"inherit",stdout:"inherit",stderr:"inherit",cwd:process.cwd()}).exited;if($!==0)throw Error(`qitqode exited with code ${$}`)}})}});export{P as PrCommand};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{tu as B}from"./chunk-xyjehgzm.js";import{Eu as A,Hu as K}from"./chunk-j21dnncc.js";var C=new Set,O=!1;function Y(q){return C.add(q),()=>{C.delete(q)}}function Z(){return O}function _(q){let D=!1,F=(z,J)=>{if(D)return;D=!0,O=!0,process.exitCode=1,A.error(z,{error:B(J),process_role:q});let Q=setTimeout(()=>process.exit(1),5000),S=[...C].map((U)=>Promise.resolve().then(()=>U(J)).catch((V)=>{A.error("fatal teardown failed",{error:B(V),process_role:q})}));Promise.all([K(),...S]).finally(()=>{clearTimeout(Q),process.exit(1)})},G=(z)=>F("unhandled rejection",z),H=(z)=>F("uncaught exception",z);return process.on("unhandledRejection",G),process.on("uncaughtException",H),()=>{process.off("unhandledRejection",G),process.off("uncaughtException",H)}}
3
+ export{Y as Lt,Z as Mt,_ as Nt};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{bQ as w}from"./chunk-3k2b05fv.js";async function M(z,Z,{concurrency:q=Number.POSITIVE_INFINITY,stopOnError:A=!0,signal:J}={}){return new Promise((B,Q)=>{if(z[Symbol.iterator]===void 0&&z[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof z})`);if(typeof Z!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(q)&&q>=1||q===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${q}\` (${typeof q})`);let X=[],$=[],K=new Map,N=!1,F=!1,T=!1,G=0,f=0,_=z[Symbol.iterator]===void 0?z[Symbol.asyncIterator]():z[Symbol.iterator](),D=()=>{Y(J.reason)},E=()=>{J?.removeEventListener("abort",D)},O=(H)=>{B(H),E()},Y=(H)=>{N=!0,F=!0,Q(H),E()};if(J){if(J.aborted)Y(J.reason);J.addEventListener("abort",D,{once:!0})}let V=async()=>{if(F)return;let H=await _.next(),h=f;if(f++,H.done){if(T=!0,G===0&&!F){if(!A&&$.length>0){Y(AggregateError($));return}if(F=!0,K.size===0){O(X);return}let U=[];for(let[W,P]of X.entries()){if(K.get(W)===L)continue;U.push(P)}O(U)}return}G++,(async()=>{try{let U=await H.value;if(F)return;let W=await Z(U,h);if(W===L)K.set(h,W);X[h]=W,G--,await V()}catch(U){if(A)Y(U);else{$.push(U),G--;try{await V()}catch(W){Y(W)}}}})()};(async()=>{for(let H=0;H<q;H++){try{await V()}catch(h){Y(h);break}if(T||N)break}})()})}function I(z,Z,{concurrency:q=Number.POSITIVE_INFINITY,backpressure:A=q}={}){if(z[Symbol.iterator]===void 0&&z[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof z})`);if(typeof Z!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(q)&&q>=1||q===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${q}\` (${typeof q})`);if(!(Number.isSafeInteger(A)&&A>=q||A===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${q}) and up or \`Infinity\`, got \`${A}\` (${typeof A})`);return{async*[Symbol.asyncIterator](){let J=z[Symbol.asyncIterator]===void 0?z[Symbol.iterator]():z[Symbol.asyncIterator](),B=[],Q=0,X=!1,$=0;function K(){if(X||!(Q<q&&B.length<A))return;Q++;let N=(async()=>{let{done:F,value:T}=await J.next();if(F)return Q--,{done:!0};K();try{let G=await Z(await T,$++);if(Q--,G===L){let f=B.indexOf(N);if(f>0)B.splice(f,1)}return K(),{done:!1,value:G}}catch(G){return Q--,X=!0,{error:G}}})();B.push(N)}K();while(B.length>0){let{error:N,done:F,value:T}=await B[0];if(B.shift(),N)throw N;if(F)return;if(K(),T===L)continue;yield T}}}}var L;var C=w(()=>{L=Symbol("skip")});C();export{L as pMapSkip,I as pMapIterable,M as default};
2
+ import{jQ as w}from"./chunk-4sazy0nq.js";async function M(z,Z,{concurrency:q=Number.POSITIVE_INFINITY,stopOnError:A=!0,signal:J}={}){return new Promise((B,Q)=>{if(z[Symbol.iterator]===void 0&&z[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof z})`);if(typeof Z!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(q)&&q>=1||q===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${q}\` (${typeof q})`);let X=[],$=[],K=new Map,N=!1,F=!1,T=!1,G=0,f=0,_=z[Symbol.iterator]===void 0?z[Symbol.asyncIterator]():z[Symbol.iterator](),D=()=>{Y(J.reason)},E=()=>{J?.removeEventListener("abort",D)},O=(H)=>{B(H),E()},Y=(H)=>{N=!0,F=!0,Q(H),E()};if(J){if(J.aborted)Y(J.reason);J.addEventListener("abort",D,{once:!0})}let V=async()=>{if(F)return;let H=await _.next(),h=f;if(f++,H.done){if(T=!0,G===0&&!F){if(!A&&$.length>0){Y(AggregateError($));return}if(F=!0,K.size===0){O(X);return}let U=[];for(let[W,P]of X.entries()){if(K.get(W)===L)continue;U.push(P)}O(U)}return}G++,(async()=>{try{let U=await H.value;if(F)return;let W=await Z(U,h);if(W===L)K.set(h,W);X[h]=W,G--,await V()}catch(U){if(A)Y(U);else{$.push(U),G--;try{await V()}catch(W){Y(W)}}}})()};(async()=>{for(let H=0;H<q;H++){try{await V()}catch(h){Y(h);break}if(T||N)break}})()})}function I(z,Z,{concurrency:q=Number.POSITIVE_INFINITY,backpressure:A=q}={}){if(z[Symbol.iterator]===void 0&&z[Symbol.asyncIterator]===void 0)throw TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof z})`);if(typeof Z!=="function")throw TypeError("Mapper function is required");if(!(Number.isSafeInteger(q)&&q>=1||q===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${q}\` (${typeof q})`);if(!(Number.isSafeInteger(A)&&A>=q||A===Number.POSITIVE_INFINITY))throw TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${q}) and up or \`Infinity\`, got \`${A}\` (${typeof A})`);return{async*[Symbol.asyncIterator](){let J=z[Symbol.asyncIterator]===void 0?z[Symbol.iterator]():z[Symbol.asyncIterator](),B=[],Q=0,X=!1,$=0;function K(){if(X||!(Q<q&&B.length<A))return;Q++;let N=(async()=>{let{done:F,value:T}=await J.next();if(F)return Q--,{done:!0};K();try{let G=await Z(await T,$++);if(Q--,G===L){let f=B.indexOf(N);if(f>0)B.splice(f,1)}return K(),{done:!1,value:G}}catch(G){return Q--,X=!0,{error:G}}})();B.push(N)}K();while(B.length>0){let{error:N,done:F,value:T}=await B[0];if(B.shift(),N)throw N;if(F)return;if(K(),T===L)continue;yield T}}}}var L;var C=w(()=>{L=Symbol("skip")});C();export{L as pMapSkip,I as pMapIterable,M as default};