@qitqode/qitqode-android-arm64 0.2.8 → 0.2.10
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.
- package/bundle/chunk-062chtrq.js +2 -0
- package/bundle/chunk-062vs7bp.js +2 -0
- package/bundle/chunk-08g14hmz.js +2 -0
- package/bundle/{chunk-wgkcyqn1.js → chunk-0bhzhh7s.js} +2 -2
- package/bundle/{chunk-cfwz1hgr.js → chunk-0mwzxqt5.js} +3 -3
- package/bundle/{chunk-mr17tppa.js → chunk-0sfc21qe.js} +2 -2
- package/bundle/{chunk-7adsab4h.js → chunk-0tkznq75.js} +1 -1
- package/bundle/chunk-0w2v8dfy.js +2 -0
- package/bundle/chunk-10fr7a2y.js +2 -0
- package/bundle/chunk-141p12c4.js +4 -0
- package/bundle/chunk-15bjhfav.js +3 -0
- package/bundle/{chunk-92r1gw2j.js → chunk-1h96bk6p.js} +2 -2
- package/bundle/chunk-1hv61m11.js +2 -0
- package/bundle/{chunk-0z1keh2w.js → chunk-1m78yy4k.js} +1 -1
- package/bundle/chunk-1q10jyka.js +29 -0
- package/bundle/{chunk-g4tyaj0m.js → chunk-1r81q7m3.js} +1 -1
- package/bundle/{chunk-82xrfk5x.js → chunk-2cvwrabw.js} +2 -2
- package/bundle/{chunk-8p0t8qah.js → chunk-2dmcpqak.js} +1 -1
- package/bundle/{chunk-35fj1sfm.js → chunk-2fbkw84y.js} +2 -2
- package/bundle/chunk-2mkvx8b2.js +2 -0
- package/bundle/chunk-2rykfc3a.js +2 -0
- package/bundle/chunk-2w5hx4fs.js +2 -0
- package/bundle/{chunk-t3w43rft.js → chunk-2y5bthrp.js} +1 -1
- package/bundle/chunk-2yy63sxz.js +2 -0
- package/bundle/chunk-2z3fe4qw.js +2 -0
- package/bundle/{chunk-g7v6sp3c.js → chunk-2zjet9tx.js} +2 -2
- package/bundle/{chunk-qgkb6n8k.js → chunk-32xd626h.js} +2 -2
- package/bundle/chunk-361cmmrp.js +2 -0
- package/bundle/{chunk-eg1m81ax.js → chunk-3mtjxmw1.js} +1 -1
- package/bundle/chunk-3r6dq1h3.js +2 -0
- package/bundle/{chunk-wtt5wms9.js → chunk-3sj0jv91.js} +1 -1
- package/bundle/{chunk-hz02vrqs.js → chunk-3vae1s42.js} +1 -1
- package/bundle/{chunk-t18ka1e7.js → chunk-3yfjgks3.js} +1 -1
- package/bundle/{chunk-phf37x1c.js → chunk-3zzrdpsx.js} +1 -1
- package/bundle/chunk-4a12wv2m.js +2 -0
- package/bundle/{chunk-1rgt2vmt.js → chunk-4a9jqe5s.js} +1 -1
- package/bundle/{chunk-wqk1v8t0.js → chunk-4sa9t0vx.js} +2 -2
- package/bundle/{chunk-qbnt4ynd.js → chunk-532fnfmw.js} +2 -2
- package/bundle/chunk-547a55ba.js +2 -0
- package/bundle/{chunk-vr8nwzp0.js → chunk-56yp5v0w.js} +1 -1
- package/bundle/{chunk-ag8wxwwz.js → chunk-5fcyb122.js} +1 -1
- package/bundle/{chunk-4pmvxnkj.js → chunk-5nm5egq0.js} +2 -2
- package/bundle/{chunk-1v0khv7p.js → chunk-5p2r8bxx.js} +1 -1
- package/bundle/{chunk-5bv63rqj.js → chunk-5rqjze1g.js} +1 -1
- package/bundle/{chunk-sy9w1t2y.js → chunk-5w7ebtcd.js} +1 -1
- package/bundle/chunk-5ztmc770.js +2 -0
- package/bundle/{chunk-a1z8rnq7.js → chunk-61t4g8bh.js} +4 -4
- package/bundle/chunk-62x3r2q8.js +2 -0
- package/bundle/chunk-62y6zk9x.js +2 -0
- package/bundle/{chunk-c76cjhn0.js → chunk-6axm2qtj.js} +1 -1
- package/bundle/{chunk-zfrftgcy.js → chunk-6gbdvz6p.js} +1 -1
- package/bundle/{chunk-fa8pwdwv.js → chunk-6mnk5sg3.js} +1 -1
- package/bundle/chunk-6th7vpwm.js +2 -0
- package/bundle/{chunk-8yzghzjq.js → chunk-6wjdhvdf.js} +1 -1
- package/bundle/{chunk-a8bjcvda.js → chunk-6y58jzak.js} +1 -1
- package/bundle/chunk-6ybh5smv.js +2 -0
- package/bundle/chunk-73kprndw.js +2 -0
- package/bundle/chunk-79fr19xf.js +2 -0
- package/bundle/{chunk-3va85mbe.js → chunk-7a3txs9f.js} +2 -2
- package/bundle/chunk-7ezr478e.js +2 -0
- package/bundle/chunk-7gj1vqyj.js +2 -0
- package/bundle/{chunk-eacpc64g.js → chunk-7hdb1fhq.js} +2 -2
- package/bundle/{chunk-t8fjgkp8.js → chunk-7rbg6mg9.js} +2 -2
- package/bundle/{chunk-59csnjc3.js → chunk-7s0nq2aa.js} +2 -2
- package/bundle/chunk-7ywfkwb4.js +2 -0
- package/bundle/chunk-819qr675.js +2 -0
- package/bundle/{chunk-g6y2c5az.js → chunk-81dvy370.js} +1 -1
- package/bundle/chunk-85fnnwm2.js +2 -0
- package/bundle/chunk-89fwh84w.js +2 -0
- package/bundle/chunk-8e724g3k.js +2 -0
- package/bundle/{chunk-6qwk6z87.js → chunk-8gpjmj42.js} +3 -3
- package/bundle/{chunk-wtxh5m6j.js → chunk-8nnajdwf.js} +3 -3
- package/bundle/chunk-8peby2d1.js +2 -0
- package/bundle/{chunk-3zwma68w.js → chunk-8rkszwxq.js} +6 -6
- package/bundle/{chunk-w0nc0gcx.js → chunk-8v60bqm0.js} +1 -1
- package/bundle/chunk-9894a2yn.js +2 -0
- package/bundle/chunk-98ye2nwt.js +2 -0
- package/bundle/{chunk-48gap82w.js → chunk-9bbwxp5d.js} +1 -1
- package/bundle/{chunk-z0kbyr00.js → chunk-9d0exvey.js} +2 -2
- package/bundle/{chunk-8ysp6vf8.js → chunk-9fjcgdea.js} +1 -1
- package/bundle/{chunk-jpn9zfj5.js → chunk-9nf5650d.js} +1 -1
- package/bundle/{chunk-n6tqtk6h.js → chunk-9pj10pgd.js} +2 -2
- package/bundle/chunk-9s4excg8.js +2 -0
- package/bundle/{chunk-t6zz47zk.js → chunk-9s5h0f1y.js} +2 -2
- package/bundle/{chunk-p8ak162p.js → chunk-9tz18e54.js} +1 -1
- package/bundle/{chunk-fs1vb39f.js → chunk-9zy5tsry.js} +3 -3
- package/bundle/{chunk-bc2krtaf.js → chunk-a70m6kyn.js} +1 -1
- package/bundle/{chunk-cr5tknvb.js → chunk-acsqvgdw.js} +1 -1
- package/bundle/chunk-aetgcegz.js +2 -0
- package/bundle/chunk-agas0nay.js +2 -0
- package/bundle/{chunk-vs3s49jw.js → chunk-ajnzv5jt.js} +2 -2
- package/bundle/{chunk-9cf2ktyh.js → chunk-asxmkyz2.js} +1 -1
- package/bundle/{chunk-0ffmwhw7.js → chunk-at4dge22.js} +1 -1
- package/bundle/{chunk-sa0rrreh.js → chunk-atacnspd.js} +2 -2
- package/bundle/chunk-ayknzc4m.js +2 -0
- package/bundle/chunk-azss4acq.js +3 -0
- package/bundle/chunk-b2ybst88.js +2 -0
- package/bundle/{chunk-cghz0855.js → chunk-b8rzn48q.js} +1 -1
- package/bundle/{chunk-dhvx9p54.js → chunk-b9f78x5g.js} +1 -1
- package/bundle/chunk-bd5vtjd7.js +2 -0
- package/bundle/chunk-bjqqk6jt.js +2 -0
- package/bundle/{chunk-mv7q6ach.js → chunk-brk1jca3.js} +1 -1
- package/bundle/{chunk-5r7c6vvx.js → chunk-by1kwg4r.js} +2 -2
- package/bundle/{chunk-he9kpk9r.js → chunk-c1c8ch3g.js} +327 -313
- package/bundle/{chunk-2nheahmq.js → chunk-c2ns2csn.js} +1 -1
- package/bundle/{chunk-qk5vy2pr.js → chunk-c3ey896z.js} +1 -1
- package/bundle/{chunk-b7sr9rn3.js → chunk-c8080519.js} +1 -1
- package/bundle/{chunk-33ebjca6.js → chunk-c8yc8qcd.js} +1 -1
- package/bundle/{chunk-f81kk8ra.js → chunk-c9cngded.js} +1 -1
- package/bundle/{chunk-ejhhrece.js → chunk-ccdjzn2m.js} +3 -3
- package/bundle/{chunk-rk0fnvp5.js → chunk-cdenq7jb.js} +1 -1
- package/bundle/chunk-cpkcdykz.js +2 -0
- package/bundle/{chunk-56wq8cqj.js → chunk-cs825mxr.js} +1 -1
- package/bundle/{chunk-1bxfzd6r.js → chunk-cxtwavyf.js} +4 -4
- package/bundle/chunk-cyafm8d6.js +2 -0
- package/bundle/{chunk-eewe7tx1.js → chunk-d0dsgxk4.js} +2 -2
- package/bundle/{chunk-g3n465ee.js → chunk-d1fv2c7s.js} +2 -2
- package/bundle/{chunk-1p9s5jj1.js → chunk-d1xfv4d3.js} +1 -1
- package/bundle/chunk-d4316r53.js +2 -0
- package/bundle/chunk-d8ym7mcg.js +2 -0
- package/bundle/{chunk-epmc4aht.js → chunk-d9w2bn2e.js} +1 -1
- package/bundle/{chunk-g26redah.js → chunk-dd461rg3.js} +1 -1
- package/bundle/{chunk-e0vrxetq.js → chunk-djfrkbd5.js} +1 -1
- package/bundle/{chunk-ayb3bdb7.js → chunk-dm447tgc.js} +2 -2
- package/bundle/{chunk-qxdpgdfk.js → chunk-dnjyepb2.js} +2 -2
- package/bundle/chunk-dnpjxjkp.js +2 -0
- package/bundle/{chunk-0a4pmkc9.js → chunk-dp6ms01y.js} +2 -2
- package/bundle/{chunk-58f4y4b7.js → chunk-dx7rexx3.js} +3 -3
- package/bundle/{chunk-kre93a89.js → chunk-dz3kcsb6.js} +2 -2
- package/bundle/{chunk-4aajzxm9.js → chunk-dzma8zvf.js} +2 -2
- package/bundle/{chunk-e2wfj86b.js → chunk-e10c0crf.js} +1 -1
- package/bundle/{chunk-wn63q3xp.js → chunk-e1x1mp9m.js} +1 -1
- package/bundle/{chunk-w9qh2479.js → chunk-e3mrw0k7.js} +1 -1
- package/bundle/chunk-e5gjqtby.js +2 -0
- package/bundle/{chunk-3z2zn8rj.js → chunk-e72jwbfc.js} +1 -1
- package/bundle/{chunk-85wh85pk.js → chunk-eabbrt1p.js} +1 -1
- package/bundle/{chunk-jr80q31w.js → chunk-ecz4h0a2.js} +1 -1
- package/bundle/chunk-ee3mqzms.js +2 -0
- package/bundle/chunk-eme9xmh3.js +2 -0
- package/bundle/{chunk-cf9m9m9q.js → chunk-eqpep2m2.js} +1 -1
- package/bundle/chunk-er5f61s5.js +2 -0
- package/bundle/chunk-er716522.js +2 -0
- package/bundle/{chunk-qgek59e6.js → chunk-ev6jwt7q.js} +1 -1
- package/bundle/chunk-ez3gacqe.js +2 -0
- package/bundle/{chunk-ax64ngf2.js → chunk-f0ab2f28.js} +1 -1
- package/bundle/{chunk-ggncq8w8.js → chunk-f17se3hh.js} +1 -1
- package/bundle/chunk-f3y5kr76.js +14 -0
- package/bundle/{chunk-vsqvnxbz.js → chunk-f6btedtt.js} +1 -1
- package/bundle/{chunk-h4hs2rhf.js → chunk-f6vy70p6.js} +2 -2
- package/bundle/{chunk-5f0nhthe.js → chunk-ff8q10gk.js} +2 -2
- package/bundle/chunk-fkc7wf1p.js +2 -0
- package/bundle/chunk-fm6z8nqb.js +2 -0
- package/bundle/{chunk-fw1f47de.js → chunk-fsndgr9a.js} +1 -1
- package/bundle/{chunk-pqg1wjb5.js → chunk-fvv1cret.js} +1 -1
- package/bundle/{chunk-j10a984e.js → chunk-g08qj9z3.js} +2 -2
- package/bundle/chunk-g0qwm23d.js +2 -0
- package/bundle/chunk-g4yn8cj8.js +2 -0
- package/bundle/{chunk-vkjqy92f.js → chunk-g52wmt1v.js} +1 -1
- package/bundle/{chunk-trstb8ee.js → chunk-gb51fn3r.js} +1 -1
- package/bundle/{chunk-kgv68cpb.js → chunk-gbnf7zf9.js} +1 -1
- package/bundle/{chunk-0w19vmd7.js → chunk-ge7csm6m.js} +2 -2
- package/bundle/{chunk-gc5rhnht.js → chunk-gksbv613.js} +2 -2
- package/bundle/{chunk-afr8m0q1.js → chunk-gmq1kwn0.js} +1 -1
- package/bundle/{chunk-9009v4d0.js → chunk-gq3zb4wv.js} +2 -2
- package/bundle/{chunk-tbx741en.js → chunk-gqgjybjc.js} +1 -1
- package/bundle/{chunk-2qm46qvn.js → chunk-gx4v8z64.js} +2 -2
- package/bundle/{chunk-sm1g81cv.js → chunk-h0pvxre5.js} +1 -1
- package/bundle/chunk-h1spsy3y.js +2 -0
- package/bundle/{chunk-sbjymf20.js → chunk-h2p984qb.js} +2 -2
- package/bundle/{chunk-gznt3dv8.js → chunk-h6z86aay.js} +1 -1
- package/bundle/chunk-h8gkv40j.js +2 -0
- package/bundle/{chunk-zsg29gba.js → chunk-h91zmzs5.js} +1 -1
- package/bundle/{chunk-zrhw1szj.js → chunk-hgm8yfcb.js} +1 -1
- package/bundle/chunk-j59kmb49.js +2 -0
- package/bundle/chunk-j5z95b6f.js +3 -0
- package/bundle/{chunk-52xvhxek.js → chunk-j7637cwg.js} +2 -2
- package/bundle/{chunk-rwnwjm82.js → chunk-jbcqhw3x.js} +2 -2
- package/bundle/{chunk-qgfbsmsx.js → chunk-je8fcsa9.js} +1 -1
- package/bundle/{chunk-y0h3jfkj.js → chunk-jt6bvxtr.js} +1 -1
- package/bundle/chunk-jv37ghev.js +2 -0
- package/bundle/chunk-k10rtgsk.js +5 -0
- package/bundle/chunk-k3hcb6qf.js +2 -0
- package/bundle/chunk-k5d822n2.js +3 -0
- package/bundle/{chunk-2vaphpz0.js → chunk-kc8n5cgb.js} +1 -1
- package/bundle/chunk-kcqeh1e5.js +2 -0
- package/bundle/{chunk-5xkp27b1.js → chunk-kds2g7r2.js} +1 -1
- package/bundle/{chunk-scnbt714.js → chunk-kec1xw1n.js} +1 -1
- package/bundle/{chunk-s8z7v1me.js → chunk-kk850sdw.js} +2 -2
- package/bundle/{chunk-3bb4aqh9.js → chunk-m01h6kk1.js} +1 -1
- package/bundle/{chunk-2t5yh25f.js → chunk-m4j6t713.js} +1 -1
- package/bundle/chunk-m8ytbq04.js +2 -0
- package/bundle/chunk-mf9nc4xz.js +2 -0
- package/bundle/{chunk-7thhd7ds.js → chunk-mmqyter3.js} +1 -1
- package/bundle/{chunk-9cn8cmt0.js → chunk-mn0pshpv.js} +1 -1
- package/bundle/{chunk-s2tc3qs0.js → chunk-mn5cacf6.js} +2 -2
- package/bundle/{chunk-0egrckx0.js → chunk-mp1x10t5.js} +2 -2
- package/bundle/chunk-mxby91bj.js +2 -0
- package/bundle/chunk-mzv1gh6f.js +2 -0
- package/bundle/chunk-n0hsvvw8.js +2 -0
- package/bundle/{chunk-az3nss5m.js → chunk-ngyv4fhn.js} +2 -2
- package/bundle/{chunk-g9nwqwqp.js → chunk-nh4zk07t.js} +1 -1
- package/bundle/{chunk-8jmb5bd4.js → chunk-nk5vrenn.js} +2 -2
- package/bundle/chunk-nm1v9z14.js +2 -0
- package/bundle/chunk-nnkfdhh9.js +2 -0
- package/bundle/{chunk-jqj1ay7x.js → chunk-npdgfqaw.js} +1 -1
- package/bundle/{chunk-p2fte9vz.js → chunk-nq4x6792.js} +2 -2
- package/bundle/{chunk-wr6rnxr5.js → chunk-nqk8d62j.js} +1 -1
- package/bundle/{chunk-7jy53zqy.js → chunk-p506eydh.js} +1 -1
- package/bundle/{chunk-phpxxd48.js → chunk-p6jf1fyt.js} +1 -1
- package/bundle/chunk-p7nstcxa.js +2 -0
- package/bundle/{chunk-6ps30qax.js → chunk-pbanj1gk.js} +2 -2
- package/bundle/{chunk-vph4w4yy.js → chunk-pchv413c.js} +2 -2
- package/bundle/{chunk-5nmm1kvx.js → chunk-pf2vq6t1.js} +2 -2
- package/bundle/chunk-pfwkvv7g.js +2 -0
- package/bundle/{chunk-ntr0ezf2.js → chunk-pky8h8rh.js} +1 -1
- package/bundle/chunk-pn1jz8qj.js +2 -0
- package/bundle/chunk-pqvmtfk7.js +2 -0
- package/bundle/chunk-prgw26g3.js +2 -0
- package/bundle/{chunk-kckr30tf.js → chunk-psqtptrs.js} +1 -1
- package/bundle/chunk-pv9ty6v7.js +2 -0
- package/bundle/{chunk-060wbpz4.js → chunk-pwsajn96.js} +1 -1
- package/bundle/{chunk-c3yjbent.js → chunk-pxm0x3e0.js} +1 -1
- package/bundle/chunk-pyf649pz.js +2 -0
- package/bundle/{chunk-wd8f9r4k.js → chunk-q0xgxygw.js} +1 -1
- package/bundle/{chunk-rye1yjnr.js → chunk-q26s0wb5.js} +1 -1
- package/bundle/{chunk-a48mx917.js → chunk-q4mtwv1w.js} +2 -2
- package/bundle/chunk-q4rstre7.js +2 -0
- package/bundle/chunk-q6jk2v6g.js +2 -0
- package/bundle/{chunk-5wx962mw.js → chunk-q7s6z0nz.js} +1 -1
- package/bundle/{chunk-jmmtcr2r.js → chunk-q8fjktv4.js} +1 -1
- package/bundle/{chunk-m7tmgvh6.js → chunk-qbewhcsz.js} +1 -1
- package/bundle/chunk-qd43npx3.js +2 -0
- package/bundle/{chunk-ydgst3h8.js → chunk-qdafm7qg.js} +2 -2
- package/bundle/chunk-qdb21y83.js +2 -0
- package/bundle/{chunk-72crs18f.js → chunk-qdbx1qkr.js} +1 -1
- package/bundle/{chunk-nga216dm.js → chunk-qdh2dm62.js} +1 -1
- package/bundle/chunk-qeksaefy.js +2 -0
- package/bundle/{chunk-qk1jkc0n.js → chunk-qjw2zcq5.js} +1 -1
- package/bundle/{chunk-dt3bsmfe.js → chunk-qm9fm5ja.js} +2 -2
- package/bundle/{chunk-h8mfbbjh.js → chunk-qq9yc2tp.js} +2 -2
- package/bundle/{chunk-0tcggtwv.js → chunk-qtyapmy7.js} +1 -1
- package/bundle/{chunk-4064rbtp.js → chunk-qyan69nb.js} +1 -1
- package/bundle/chunk-r7t9yb9d.js +2 -0
- package/bundle/{chunk-6tqbnxar.js → chunk-r81w6skn.js} +1 -1
- package/bundle/{chunk-f4mnp6xd.js → chunk-rk21wv4k.js} +1 -1
- package/bundle/{chunk-ccf4pgkr.js → chunk-rpdgn9z3.js} +2 -2
- package/bundle/chunk-rxnd79h7.js +7 -0
- package/bundle/chunk-s05hqtx1.js +3 -0
- package/bundle/chunk-s27cz24e.js +808 -0
- package/bundle/chunk-sdv3a4w3.js +2 -0
- package/bundle/{chunk-zwhmg9dj.js → chunk-se8d5xg9.js} +1 -1
- package/bundle/chunk-sk89becn.js +2 -0
- package/bundle/{chunk-sz0favtz.js → chunk-snf6ahg7.js} +1 -1
- package/bundle/{chunk-dgcannw0.js → chunk-t2r51r6v.js} +1 -1
- package/bundle/{chunk-rva2ekrt.js → chunk-t5wdstzv.js} +1 -1
- package/bundle/{chunk-ytyzrqev.js → chunk-t9pq363q.js} +2 -2
- package/bundle/chunk-tc0996xz.js +2 -0
- package/bundle/chunk-td9hm9be.js +2 -0
- package/bundle/{chunk-xy8arehp.js → chunk-tdevq564.js} +1 -1
- package/bundle/chunk-te91d271.js +2 -0
- package/bundle/chunk-tfs50mgj.js +2 -0
- package/bundle/{chunk-5cw8235e.js → chunk-tg1f56s3.js} +1 -1
- package/bundle/chunk-thecq33z.js +3 -0
- package/bundle/{chunk-f2v4g7t1.js → chunk-tjfer79w.js} +1 -1
- package/bundle/chunk-tjvtp9d9.js +2 -0
- package/bundle/chunk-tkm9m3n0.js +2 -0
- package/bundle/{chunk-ynf17943.js → chunk-tm79yrf3.js} +2 -2
- package/bundle/{chunk-tsmj98yf.js → chunk-v03xq38e.js} +2 -2
- package/bundle/chunk-v0hnn7nb.js +2 -0
- package/bundle/{chunk-ftvvm4r5.js → chunk-v16n1fep.js} +2 -2
- package/bundle/chunk-v1s1rcqx.js +2 -0
- package/bundle/chunk-v4dt4062.js +2 -0
- package/bundle/{chunk-makegrxs.js → chunk-v8bxj01h.js} +1 -1
- package/bundle/{chunk-ryrxgn6d.js → chunk-v8rqgt7h.js} +1 -1
- package/bundle/{chunk-m4r8sepw.js → chunk-vbb1jg02.js} +1 -1
- package/bundle/{chunk-2kh0tg92.js → chunk-vbfc0wgv.js} +2 -2
- package/bundle/{chunk-d839fr0w.js → chunk-vjt6mh10.js} +2 -2
- package/bundle/{chunk-gsg6zn7e.js → chunk-vk35g121.js} +2 -2
- package/bundle/{chunk-dwkrqtbc.js → chunk-vsfj16v9.js} +2 -2
- package/bundle/{chunk-zqdjk4rf.js → chunk-vy93mn7d.js} +2 -2
- package/bundle/{chunk-1har4t9a.js → chunk-waa781eh.js} +1 -1
- package/bundle/{chunk-wb47k8ah.js → chunk-wbt31xap.js} +2 -2
- package/bundle/{chunk-0tm6589k.js → chunk-wd2xmkdp.js} +2 -2
- package/bundle/{chunk-fej5x648.js → chunk-wecs14rz.js} +1 -1
- package/bundle/chunk-wgrq86kd.js +2 -0
- package/bundle/chunk-wh2qqhep.js +8 -0
- package/bundle/{chunk-g878zd6e.js → chunk-x0hhw46n.js} +1 -1
- package/bundle/{chunk-w7a33cwa.js → chunk-x308f9j4.js} +2 -2
- package/bundle/{chunk-y3gy62q5.js → chunk-x50adh71.js} +1 -1
- package/bundle/chunk-x8ks2bn7.js +2 -0
- package/bundle/{chunk-f8cae1ap.js → chunk-xcmbxny8.js} +1 -1
- package/bundle/{chunk-rmsqb6r4.js → chunk-xgf4k9q7.js} +1 -1
- package/bundle/{chunk-2caaqmec.js → chunk-xj0zc9za.js} +1 -1
- package/bundle/{chunk-27saej0r.js → chunk-xnxw5zz9.js} +2 -2
- package/bundle/{chunk-fjftb2sz.js → chunk-xqwk2zsx.js} +2 -2
- package/bundle/{chunk-d30k7dpf.js → chunk-xstxdw7v.js} +1 -1
- package/bundle/{chunk-x00hwy3x.js → chunk-xv03hbgj.js} +1 -1
- package/bundle/{chunk-bwadggys.js → chunk-xvvt886p.js} +2 -2
- package/bundle/{chunk-khpfseej.js → chunk-xy2ty5h5.js} +2 -2
- package/bundle/{chunk-wm9nh9nb.js → chunk-yce8ph5b.js} +2 -2
- package/bundle/{chunk-fh3d0wce.js → chunk-yexzxx6f.js} +1 -1
- package/bundle/{chunk-eyr5ymt8.js → chunk-yh1t6jrj.js} +1 -1
- package/bundle/chunk-yspstxkq.js +2 -0
- package/bundle/{chunk-ykpj10nz.js → chunk-yydqavgh.js} +2 -2
- package/bundle/{chunk-bnaj2hh3.js → chunk-yzd6cyep.js} +1 -1
- package/bundle/chunk-z023h7t8.js +2 -0
- package/bundle/chunk-z0383stv.js +2 -0
- package/bundle/{chunk-vbfej8ds.js → chunk-z0m1qm7j.js} +2 -2
- package/bundle/{chunk-bpfq8fz4.js → chunk-z69tt390.js} +1 -1
- package/bundle/chunk-zewrmk8x.js +2 -0
- package/bundle/{chunk-29gwtcey.js → chunk-zfqgh9h7.js} +1 -1
- package/bundle/{chunk-h1bvqstw.js → chunk-zskdxbbh.js} +1 -1
- package/bundle/{chunk-kveztc6k.js → chunk-ztvkzex1.js} +1 -1
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-03zpnwk2.js +0 -2
- package/bundle/chunk-0aqdzyar.js +0 -2
- package/bundle/chunk-26cr51wa.js +0 -28
- package/bundle/chunk-2a5gjgvp.js +0 -2
- package/bundle/chunk-2pkfphgb.js +0 -2
- package/bundle/chunk-37cbrnke.js +0 -8
- package/bundle/chunk-3cx4p07h.js +0 -2
- package/bundle/chunk-3f2cjzb4.js +0 -2
- package/bundle/chunk-3qvap1kv.js +0 -2
- package/bundle/chunk-42hvspe7.js +0 -2
- package/bundle/chunk-452tk6v3.js +0 -2
- package/bundle/chunk-4gqb1hps.js +0 -2
- package/bundle/chunk-50qgz5ka.js +0 -2
- package/bundle/chunk-5b0xyq5z.js +0 -2
- package/bundle/chunk-5j4nxpdy.js +0 -2
- package/bundle/chunk-5nxgk6hw.js +0 -2
- package/bundle/chunk-5qkvhr6y.js +0 -2
- package/bundle/chunk-66qmmmdp.js +0 -2
- package/bundle/chunk-66wv82vf.js +0 -2
- package/bundle/chunk-6dpdkzrk.js +0 -2
- package/bundle/chunk-6p6m5956.js +0 -3
- package/bundle/chunk-6yhn9syz.js +0 -2
- package/bundle/chunk-7b60whxm.js +0 -2
- package/bundle/chunk-7g59hc61.js +0 -2
- package/bundle/chunk-7p88j56s.js +0 -2
- package/bundle/chunk-7trngc9g.js +0 -2
- package/bundle/chunk-8cebbmtf.js +0 -2
- package/bundle/chunk-8csas2jc.js +0 -2
- package/bundle/chunk-8g4jdqq1.js +0 -2
- package/bundle/chunk-8j1xcdmd.js +0 -2
- package/bundle/chunk-90r2z49k.js +0 -2
- package/bundle/chunk-94mjwy22.js +0 -2
- package/bundle/chunk-aenrd7dk.js +0 -2
- package/bundle/chunk-ahmy80vb.js +0 -2
- package/bundle/chunk-avn12jkt.js +0 -2
- package/bundle/chunk-b7ncyat6.js +0 -2
- package/bundle/chunk-bjv1h2dq.js +0 -2
- package/bundle/chunk-brk6bge4.js +0 -3
- package/bundle/chunk-c2a74stf.js +0 -2
- package/bundle/chunk-ce5e7j62.js +0 -2
- package/bundle/chunk-cw1gwjx9.js +0 -2
- package/bundle/chunk-czw30fjs.js +0 -2
- package/bundle/chunk-ddx2pcr4.js +0 -2
- package/bundle/chunk-dmkgjf1v.js +0 -3
- package/bundle/chunk-dwhsvpag.js +0 -2
- package/bundle/chunk-e01jgnnm.js +0 -2
- package/bundle/chunk-e0hfpdje.js +0 -2
- package/bundle/chunk-e5jk67xh.js +0 -2
- package/bundle/chunk-eg4pq4hv.js +0 -2
- package/bundle/chunk-ew3yz97p.js +0 -2
- package/bundle/chunk-ezgfhy4e.js +0 -2
- package/bundle/chunk-f2yfyhh8.js +0 -2
- package/bundle/chunk-f30em1wx.js +0 -2
- package/bundle/chunk-fge37dke.js +0 -2
- package/bundle/chunk-gbvm6dpv.js +0 -2
- package/bundle/chunk-gefx3n08.js +0 -14
- package/bundle/chunk-h5w91zr4.js +0 -2
- package/bundle/chunk-hmpb3c21.js +0 -2
- package/bundle/chunk-j32rr7rt.js +0 -2
- package/bundle/chunk-j871xzr7.js +0 -2
- package/bundle/chunk-k3hgwszx.js +0 -2
- package/bundle/chunk-kwfe4em6.js +0 -7
- package/bundle/chunk-kx88qekb.js +0 -2
- package/bundle/chunk-n61e0znt.js +0 -2
- package/bundle/chunk-n6v36np0.js +0 -2
- package/bundle/chunk-ndd4cn3z.js +0 -2
- package/bundle/chunk-nfafk3ts.js +0 -5
- package/bundle/chunk-njsmma3a.js +0 -2
- package/bundle/chunk-nr2j8ytn.js +0 -3
- package/bundle/chunk-nwj6mcxz.js +0 -2
- package/bundle/chunk-p5b5ekhh.js +0 -2
- package/bundle/chunk-pf23nw4z.js +0 -2
- package/bundle/chunk-pw3cv89g.js +0 -2
- package/bundle/chunk-q3c8mfbq.js +0 -2
- package/bundle/chunk-qc89yj61.js +0 -2
- package/bundle/chunk-qn8tz704.js +0 -2
- package/bundle/chunk-qq9m8fxv.js +0 -808
- package/bundle/chunk-qxre2gqn.js +0 -2
- package/bundle/chunk-rdk62809.js +0 -2
- package/bundle/chunk-rew6r516.js +0 -2
- package/bundle/chunk-rjhvdfn5.js +0 -2
- package/bundle/chunk-skgr9ypq.js +0 -2
- package/bundle/chunk-sv40pwe2.js +0 -2
- package/bundle/chunk-tfhpjmny.js +0 -2
- package/bundle/chunk-tnete6ye.js +0 -2
- package/bundle/chunk-tpyq7ycb.js +0 -2
- package/bundle/chunk-txkdt4ep.js +0 -2
- package/bundle/chunk-v5h5wxw5.js +0 -2
- package/bundle/chunk-v6141yq1.js +0 -2
- package/bundle/chunk-vfd3azkp.js +0 -3
- package/bundle/chunk-vjs69r6x.js +0 -2
- package/bundle/chunk-vmhar83s.js +0 -2
- package/bundle/chunk-vqvnw12p.js +0 -2
- package/bundle/chunk-w0sng8a9.js +0 -2
- package/bundle/chunk-w0sztk4y.js +0 -2
- package/bundle/chunk-w6bb320d.js +0 -2
- package/bundle/chunk-waa1ggtj.js +0 -2
- package/bundle/chunk-wb05bp10.js +0 -3
- package/bundle/chunk-wf41m019.js +0 -2
- package/bundle/chunk-wqw6yjrg.js +0 -2
- package/bundle/chunk-ws08rxge.js +0 -2
- package/bundle/chunk-wz3dvc3g.js +0 -2
- package/bundle/chunk-x2pmqvdc.js +0 -2
- package/bundle/chunk-x4wfq39v.js +0 -2
- package/bundle/chunk-xs6v0r9m.js +0 -3
- package/bundle/chunk-yb6m08zj.js +0 -2
- package/bundle/chunk-ybcqkgs7.js +0 -2
- package/bundle/chunk-zj1jc1xt.js +0 -2
- package/bundle/chunk-zm0m0504.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Bp as yG,Cp as YG,Dp as d,Ep as IG,Fp as RG,Hp as xG,Io as g,Ko as FG,Mo as NG,Oo as wG,Po as QG,Qo as SG,Yo as $G,bp as OG,cp as XG,fp as fG,jp as v,mp as k,np as s,qp as CG,tp as p,up as u,zp as _}from"./chunk-wm9nh9nb.js";import{Jp as l,Kp as GG,Tp as BG,Wp as c}from"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import{Kt as G}from"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-e0vrxetq.js";function vG(J){var D;let L=[],q=[];for(let{role:K,content:z}of J)switch(K){case"system":{L.push({role:"system",content:z});break}case"user":{if(z.length===1&&z[0].type==="text"){L.push({role:"user",content:z[0].text});break}L.push({role:"user",content:z.map((A)=>{switch(A.type){case"text":return{type:"text",text:A.text};case"file":if(A.mediaType.startsWith("image/")){let Y=A.mediaType==="image/*"?"image/jpeg":A.mediaType;return{type:"image_url",image_url:{url:A.data instanceof URL?A.data.toString():`data:${Y};base64,${QG(A.data)}`}}}else throw new c({functionality:`file part media type ${A.mediaType}`})}})});break}case"assistant":{let A="",Y=[];for(let X of z)switch(X.type){case"text":{A+=X.text;break}case"tool-call":{Y.push({id:X.toolCallId,type:"function",function:{name:X.toolName,arguments:JSON.stringify(X.input)}});break}}L.push({role:"assistant",content:A,tool_calls:Y.length>0?Y:void 0});break}case"tool":{for(let A of z){if(A.type==="tool-approval-response")continue;let Y=A.output,X;switch(Y.type){case"text":case"error-text":X=Y.value;break;case"execution-denied":X=(D=Y.reason)!=null?D:"Tool execution denied.";break;case"content":case"json":case"error-json":X=JSON.stringify(Y.value);break}L.push({role:"tool",tool_call_id:A.toolCallId,content:X})}break}default:throw Error(`Unsupported role: ${K}`)}return{messages:L,warnings:q}}function EG(J){var D,L,q,K;let z=(L=(D=J.prompt_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.completion_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.prompt_tokens;return{inputTokens:{total:Y?J.prompt_tokens:J.prompt_tokens+z,noCache:Y?J.prompt_tokens-z:J.prompt_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.completion_tokens+A,text:J.completion_tokens,reasoning:A},raw:J}}function JG({id:J,model:D,created:L,created_at:q}){let K=L!=null?L:q;return{id:J!=null?J:void 0,modelId:D!=null?D:void 0,timestamp:K!=null?new Date(K*1000):void 0}}function WG(J){switch(J){case"stop":return"stop";case"length":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var kG=G.object({type:G.literal("web"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),allowedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),bG=G.object({type:G.literal("x"),excludedXHandles:G.array(G.string()).optional(),includedXHandles:G.array(G.string()).optional(),postFavoriteCount:G.number().int().optional(),postViewCount:G.number().int().optional(),xHandles:G.array(G.string()).optional()}),hG=G.object({type:G.literal("news"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),_G=G.object({type:G.literal("rss"),links:G.array(G.string().url()).max(1)}),mG=G.discriminatedUnion("type",[kG,bG,hG,_G]),gG=G.object({reasoningEffort:G.enum(["low","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),parallel_function_calling:G.boolean().optional(),searchParameters:G.object({mode:G.enum(["off","auto","on"]),returnCitations:G.boolean().optional(),fromDate:G.string().optional(),toDate:G.string().optional(),maxSearchResults:G.number().min(1).max(50).optional(),sources:G.array(mG).optional()}).optional()}),uG=G.object({error:G.object({message:G.string(),type:G.string().nullish(),param:G.any().nullish(),code:G.union([G.string(),G.number()]).nullish()})}),r=yG({errorSchema:uG,errorToMessage:(J)=>J.error.message});function dG({tools:J,toolChoice:D}){J=(J==null?void 0:J.length)?J:void 0;let L=[];if(J==null)return{tools:void 0,toolChoice:void 0,toolWarnings:L};let q=[];for(let z of J)if(z.type==="provider")L.push({type:"unsupported",feature:`provider-defined tool ${z.name}`});else q.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(D==null)return{tools:q,toolChoice:void 0,toolWarnings:L};let K=D.type;switch(K){case"auto":case"none":return{tools:q,toolChoice:K,toolWarnings:L};case"required":return{tools:q,toolChoice:"required",toolWarnings:L};case"tool":return{tools:q,toolChoice:{type:"function",function:{name:D.toolName}},toolWarnings:L};default:throw new c({functionality:`tool choice type: ${K}`})}}var cG=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,topK:K,frequencyPenalty:z,presencePenalty:A,stopSequences:Y,seed:X,responseFormat:Z,providerOptions:M,tools:E,toolChoice:F}){var B,R,N;let $=[],W=(B=await p({provider:"xai",providerOptions:M,schema:gG}))!=null?B:{};if(K!=null)$.push({type:"unsupported",feature:"topK"});if(z!=null)$.push({type:"unsupported",feature:"frequencyPenalty"});if(A!=null)$.push({type:"unsupported",feature:"presencePenalty"});if(Y!=null)$.push({type:"unsupported",feature:"stopSequences"});let{messages:H,warnings:O}=vG(J);$.push(...O);let{tools:C,toolChoice:w,toolWarnings:j}=dG({tools:E,toolChoice:F});return $.push(...j),{args:{model:this.modelId,logprobs:W.logprobs===!0||W.topLogprobs!=null?!0:void 0,top_logprobs:W.topLogprobs,max_completion_tokens:D,temperature:L,top_p:q,seed:X,reasoning_effort:W.reasoningEffort,parallel_function_calling:W.parallel_function_calling,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{name:(R=Z.name)!=null?R:"response",schema:Z.schema,strict:!0}}:{type:"json_object"}:void 0,search_parameters:W.searchParameters?{mode:W.searchParameters.mode,return_citations:W.searchParameters.returnCitations,from_date:W.searchParameters.fromDate,to_date:W.searchParameters.toDate,max_search_results:W.searchParameters.maxSearchResults,sources:(N=W.searchParameters.sources)==null?void 0:N.map((S)=>{var h;return{type:S.type,...S.type==="web"&&{country:S.country,excluded_websites:S.excludedWebsites,allowed_websites:S.allowedWebsites,safe_search:S.safeSearch},...S.type==="x"&&{excluded_x_handles:S.excludedXHandles,included_x_handles:(h=S.includedXHandles)!=null?h:S.xHandles,post_favorite_count:S.postFavoriteCount,post_view_count:S.postViewCount},...S.type==="news"&&{country:S.country,excluded_websites:S.excludedWebsites,safe_search:S.safeSearch},...S.type==="rss"&&{links:S.links}}})}:void 0,messages:H,tools:C,tool_choice:w},warnings:$}}async doGenerate(J){var D,L;let{args:q,warnings:K}=await this.getArgs(J),z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y,rawValue:X}=await u({url:z,headers:g(this.config.headers(),J.headers),body:q,failedResponseHandler:r,successfulResponseHandler:d(pG),abortSignal:J.abortSignal,fetch:this.config.fetch});if(Y.error!=null)throw new GG({message:Y.error,url:z,requestBodyValues:q,statusCode:200,responseHeaders:A,responseBody:JSON.stringify(X),isRetryable:Y.code==="The service is currently unavailable"});let Z=Y.choices[0],M=[];if(Z.message.content!=null&&Z.message.content.length>0){let E=Z.message.content,F=q.messages[q.messages.length-1];if((F==null?void 0:F.role)==="assistant"&&E===F.content)E="";if(E.length>0)M.push({type:"text",text:E})}if(Z.message.reasoning_content!=null&&Z.message.reasoning_content.length>0)M.push({type:"reasoning",text:Z.message.reasoning_content});if(Z.message.tool_calls!=null)for(let E of Z.message.tool_calls)M.push({type:"tool-call",toolCallId:E.id,toolName:E.function.name,input:E.function.arguments});if(Y.citations!=null)for(let E of Y.citations)M.push({type:"source",sourceType:"url",id:this.config.generateId(),url:E});return{content:M,finishReason:{unified:WG(Z.finish_reason),raw:(L=Z.finish_reason)!=null?L:void 0},usage:Y.usage?EG(Y.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:q},response:{...JG(Y),headers:A,body:X},warnings:K}}async doStream(J){var D;let{args:L,warnings:q}=await this.getArgs(J),K={...L,stream:!0,stream_options:{include_usage:!0}},z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y}=await u({url:z,headers:g(this.config.headers(),J.headers),body:K,failedResponseHandler:r,successfulResponseHandler:async({response:N})=>{let $=NG(N),W=N.headers.get("content-type");if(W==null?void 0:W.includes("application/json")){let H=await N.text(),O=await CG({text:H,schema:lG});if(O.success)throw new GG({message:O.value.error,url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H,isRetryable:O.value.code==="The service is currently unavailable"});throw new GG({message:"Invalid JSON response",url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H})}return YG(iG)({response:N,url:z,requestBodyValues:K})},abortSignal:J.abortSignal,fetch:this.config.fetch}),X={unified:"other",raw:void 0},Z=void 0,M=!0,E={},F={},B=void 0,R=this;return{stream:Y.pipeThrough(new TransformStream({start(N){N.enqueue({type:"stream-start",warnings:q})},transform(N,$){if(J.includeRawChunks)$.enqueue({type:"raw",rawValue:N.rawValue});if(!N.success){$.enqueue({type:"error",error:N.error});return}let W=N.value;if(M)$.enqueue({type:"response-metadata",...JG(W)}),M=!1;if(W.citations!=null)for(let w of W.citations)$.enqueue({type:"source",sourceType:"url",id:R.config.generateId(),url:w});if(W.usage!=null)Z=EG(W.usage);let H=W.choices[0];if((H==null?void 0:H.finish_reason)!=null)X={unified:WG(H.finish_reason),raw:H.finish_reason};if((H==null?void 0:H.delta)==null)return;let{delta:O,index:C}=H;if(O.content!=null&&O.content.length>0){let w=O.content;if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;let j=K.messages[K.messages.length-1];if((j==null?void 0:j.role)==="assistant"&&w===j.content)return;let y=`text-${W.id||C}`;if(E[y]==null)E[y]={type:"text",ended:!1},$.enqueue({type:"text-start",id:y});$.enqueue({type:"text-delta",id:y,delta:w})}if(O.reasoning_content!=null&&O.reasoning_content.length>0){let w=`reasoning-${W.id||C}`;if(F[w]===O.reasoning_content)return;if(F[w]=O.reasoning_content,E[w]==null)E[w]={type:"reasoning",ended:!1},B=w,$.enqueue({type:"reasoning-start",id:w});$.enqueue({type:"reasoning-delta",id:w,delta:O.reasoning_content})}if(O.tool_calls!=null){if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;for(let w of O.tool_calls){let j=w.id;$.enqueue({type:"tool-input-start",id:j,toolName:w.function.name}),$.enqueue({type:"tool-input-delta",id:j,delta:w.function.arguments}),$.enqueue({type:"tool-input-end",id:j}),$.enqueue({type:"tool-call",toolCallId:j,toolName:w.function.name,input:w.function.arguments})}}},flush(N){for(let[$,W]of Object.entries(E))if(!W.ended)N.enqueue({type:W.type==="text"?"text-end":"reasoning-end",id:$});N.enqueue({type:"finish",finishReason:X,usage:Z!=null?Z:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:K},response:{headers:A}}}},TG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number(),prompt_tokens_details:G.object({text_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),image_tokens:G.number().nullish(),cached_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),accepted_prediction_tokens:G.number().nullish(),rejected_prediction_tokens:G.number().nullish()}).nullish()}),pG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant"),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),index:G.number(),finish_reason:G.string().nullish()})).nullish(),object:G.literal("chat.completion").nullish(),usage:TG.nullish(),citations:G.array(G.string().url()).nullish(),code:G.string().nullish(),error:G.string().nullish()}),iG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).optional(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:TG.nullish(),citations:G.array(G.string().url()).nullish()}),lG=G.object({code:G.string(),error:G.string()}),rG=G.object({aspect_ratio:G.string().optional(),output_format:G.string().optional(),sync_mode:G.boolean().optional(),resolution:G.enum(["1k","2k"]).optional(),quality:G.enum(["low","medium","high"]).optional(),user:G.string().optional()}),aG=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxImagesPerCall=3}get provider(){return this.config.provider}async doGenerate({prompt:J,n:D,size:L,aspectRatio:q,seed:K,providerOptions:z,headers:A,abortSignal:Y,files:X,mask:Z}){var M,E,F,B,R;let N=[];if(L!=null)N.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(K!=null)N.push({type:"unsupported",feature:"seed"});if(Z!=null)N.push({type:"unsupported",feature:"mask"});let $=await p({provider:"xai",providerOptions:z,schema:rG}),W=X!=null&&X.length>0,H=W?X.map((I)=>SG(I)):[],O=W?"/images/edits":"/images/generations",C={model:this.modelId,prompt:J,n:D,response_format:"b64_json"};if(q!=null)C.aspect_ratio=q;if(($==null?void 0:$.output_format)!=null)C.output_format=$.output_format;if(($==null?void 0:$.sync_mode)!=null)C.sync_mode=$.sync_mode;if(($==null?void 0:$.aspect_ratio)!=null&&q==null)C.aspect_ratio=$.aspect_ratio;if(($==null?void 0:$.resolution)!=null)C.resolution=$.resolution;if(($==null?void 0:$.quality)!=null)C.quality=$.quality;if(($==null?void 0:$.user)!=null)C.user=$.user;if(H.length===1)C.image={url:H[0],type:"image_url"};else if(H.length>1)C.images=H.map((I)=>({url:I,type:"image_url"}));let w=(M=this.config.baseURL)!=null?M:"https://api.x.ai/v1",j=(B=(F=(E=this.config._internal)==null?void 0:E.currentDate)==null?void 0:F.call(E))!=null?B:new Date,{value:y,responseHeaders:S}=await u({url:`${w}${O}`,headers:g(this.config.headers(),A),body:C,failedResponseHandler:r,successfulResponseHandler:d(nG),abortSignal:Y,fetch:this.config.fetch});return{images:y.data.every((I)=>I.b64_json!=null)?y.data.map((I)=>I.b64_json):await Promise.all(y.data.map((I)=>this.downloadImage(I.url,Y))),warnings:N,response:{timestamp:j,modelId:this.modelId,headers:S},providerMetadata:{xai:{images:y.data.map((I)=>({...I.revised_prompt?{revisedPrompt:I.revised_prompt}:{}})),...((R=y.usage)==null?void 0:R.cost_in_usd_ticks)!=null?{costInUsdTicks:y.usage.cost_in_usd_ticks}:{}}}}}async downloadImage(J,D){let{value:L}=await XG({url:J,abortSignal:D,failedResponseHandler:RG(),successfulResponseHandler:IG(),fetch:this.config.fetch});return L}},nG=G.object({data:G.array(G.object({url:G.string().nullish(),b64_json:G.string().nullish(),revised_prompt:G.string().nullish()})),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish()});async function sG({prompt:J}){var D,L,q,K,z;let A=[],Y=[];for(let X of J)switch(X.role){case"system":{A.push({role:"system",content:X.content});break}case"user":{let Z=[];for(let M of X.content)switch(M.type){case"text":{Z.push({type:"input_text",text:M.text});break}case"file":{if(M.mediaType.startsWith("image/")){let E=M.mediaType==="image/*"?"image/jpeg":M.mediaType,F=M.data instanceof URL?M.data.toString():`data:${E};base64,${QG(M.data)}`;Z.push({type:"input_image",image_url:F})}else throw new c({functionality:`file part media type ${M.mediaType}`});break}default:{let E=M;Y.push({type:"other",message:"xAI Responses API does not support this content type in user messages"})}}A.push({role:"user",content:Z});break}case"assistant":{for(let Z of X.content)switch(Z.type){case"text":{let M=typeof((L=(D=Z.providerOptions)==null?void 0:D.xai)==null?void 0:L.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({role:"assistant",content:Z.text,id:M});break}case"tool-call":{if(Z.providerExecuted)break;let M=typeof((K=(q=Z.providerOptions)==null?void 0:q.xai)==null?void 0:K.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({type:"function_call",id:M!=null?M:Z.toolCallId,call_id:Z.toolCallId,name:Z.toolName,arguments:JSON.stringify(Z.input),status:"completed"});break}case"tool-result":break;case"reasoning":case"file":{Y.push({type:"other",message:`xAI Responses API does not support ${Z.type} in assistant messages`});break}default:{let M=Z;Y.push({type:"other",message:"xAI Responses API does not support this content type in assistant messages"})}}break}case"tool":{for(let Z of X.content){if(Z.type==="tool-approval-response")continue;let M=Z.output,E;switch(M.type){case"text":case"error-text":E=M.value;break;case"execution-denied":E=(z=M.reason)!=null?z:"tool execution denied";break;case"json":case"error-json":E=JSON.stringify(M.value);break;case"content":E=M.value.map((F)=>{if(F.type==="text")return F.text;return""}).join("");break;default:{let F=M;E=""}}A.push({type:"function_call_output",call_id:Z.toolCallId,output:E})}break}default:{let Z=X;Y.push({type:"other",message:"unsupported message role"})}}return{input:A,inputWarnings:Y}}function ZG(J){var D,L,q,K;let z=(L=(D=J.input_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.output_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.input_tokens;return{inputTokens:{total:Y?J.input_tokens:J.input_tokens+z,noCache:Y?J.input_tokens-z:J.input_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.output_tokens,text:J.output_tokens-A,reasoning:A},raw:J}}function o(J){switch(J){case"stop":case"completed":return"stop";case"length":case"max_output_tokens":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var KG=G.union([G.object({type:G.literal("url_citation"),url:G.string(),title:G.string().optional()}),G.object({type:G.string()})]),AG=G.object({type:G.string(),text:G.string().optional(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),jG=G.object({type:G.string(),text:G.string()}),i=G.object({name:G.string().optional(),arguments:G.string().optional(),input:G.string().optional(),call_id:G.string().optional(),id:G.string(),status:G.string(),action:G.any().optional()}),tG=G.object({name:G.string().optional(),arguments:G.string().optional(),output:G.string().optional(),error:G.string().optional(),id:G.string(),status:G.string(),server_label:G.string().optional()}),DG=G.discriminatedUnion("type",[G.object({type:G.literal("web_search_call"),...i.shape}),G.object({type:G.literal("x_search_call"),...i.shape}),G.object({type:G.literal("code_interpreter_call"),...i.shape}),G.object({type:G.literal("code_execution_call"),...i.shape}),G.object({type:G.literal("view_image_call"),...i.shape}),G.object({type:G.literal("view_x_video_call"),...i.shape}),G.object({type:G.literal("file_search_call"),id:G.string(),status:G.string(),queries:G.array(G.string()).optional(),results:G.array(G.object({file_id:G.string(),filename:G.string(),score:G.number(),text:G.string()})).nullish()}),G.object({type:G.literal("custom_tool_call"),...i.shape}),G.object({type:G.literal("mcp_call"),...tG.shape}),G.object({type:G.literal("message"),role:G.string(),content:G.array(AG),id:G.string(),status:G.string()}),G.object({type:G.literal("function_call"),name:G.string(),arguments:G.string(),call_id:G.string(),id:G.string()}),G.object({type:G.literal("reasoning"),id:G.string(),summary:G.array(jG),status:G.string(),encrypted_content:G.string().nullish()})]),qG=G.object({input_tokens:G.number(),output_tokens:G.number(),total_tokens:G.number().optional(),input_tokens_details:G.object({cached_tokens:G.number().optional()}).optional(),output_tokens_details:G.object({reasoning_tokens:G.number().optional()}).optional(),num_sources_used:G.number().optional(),num_server_side_tools_used:G.number().optional()}),t=G.object({id:G.string().nullish(),created_at:G.number().nullish(),model:G.string().nullish(),object:G.literal("response"),output:G.array(DG),usage:qG.nullish(),status:G.string()}),eG=G.union([G.object({type:G.literal("response.created"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.in_progress"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.output_item.added"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.output_item.done"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.content_part.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.content_part.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.output_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string(),logprobs:G.array(G.any()).optional()}),G.object({type:G.literal("response.output_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),G.object({type:G.literal("response.output_text.annotation.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),annotation_index:G.number(),annotation:KG}),G.object({type:G.literal("response.reasoning_summary_part.added"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_part.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_text.delta"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_summary_text.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),text:G.string()}),G.object({type:G.literal("response.reasoning_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string()}),G.object({type:G.literal("response.web_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.interpreting"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call_code.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.code_interpreter_call_code.done"),item_id:G.string(),output_index:G.number(),code:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.done"),item_id:G.string(),output_index:G.number(),input:G.string()}),G.object({type:G.literal("response.function_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.function_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string()}),G.object({type:G.literal("response.mcp_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.failed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string().optional()}),G.object({type:G.literal("response.mcp_call_output.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_output.done"),item_id:G.string(),output_index:G.number(),output:G.string().optional()}),G.object({type:G.literal("response.incomplete"),response:G.object({incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("response.failed"),response:G.object({error:G.object({code:G.string().nullish(),message:G.string()}).nullish(),incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("error"),code:G.string().nullish(),message:G.string(),param:G.string().nullish()}),G.object({type:G.literal("response.done"),response:t}),G.object({type:G.literal("response.completed"),response:t})]),oG=G.object({reasoningEffort:G.enum(["low","medium","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),store:G.boolean().optional(),previousResponseId:G.string().optional(),include:G.array(G.enum(["file_search_call.results"])).nullish()}),GJ=v(()=>k(G.object({vectorStoreIds:G.array(G.string()),maxNumResults:G.number().optional()}))),JJ=v(()=>k(G.object({queries:G.array(G.string()),results:G.array(G.object({fileId:G.string(),filename:G.string(),score:G.number().min(0).max(1),text:G.string()})).nullable()}))),QJ=_({id:"xai.file_search",inputSchema:v(()=>k(G.object({}))),outputSchema:JJ}),XJ=(J)=>QJ(J),YJ=v(()=>k(G.object({serverUrl:G.string().describe("The URL of the MCP server"),serverLabel:G.string().optional().describe("A label for the MCP server"),serverDescription:G.string().optional().describe("Description of the MCP server"),allowedTools:G.array(G.string()).optional().describe("List of allowed tool names"),headers:G.record(G.string(),G.string()).optional().describe("Custom headers to send"),authorization:G.string().optional().describe("Authorization header value")}))),ZJ=v(()=>k(G.object({name:G.string(),arguments:G.string(),result:G.unknown()}))),$J=_({id:"xai.mcp",inputSchema:v(()=>k(G.object({}))),outputSchema:ZJ}),KJ=(J)=>$J(J),AJ=v(()=>k(G.object({allowedDomains:G.array(G.string()).max(5).optional(),excludedDomains:G.array(G.string()).max(5).optional(),enableImageUnderstanding:G.boolean().optional()}))),jJ=v(()=>k(G.object({query:G.string(),sources:G.array(G.object({title:G.string(),url:G.string(),snippet:G.string()}))}))),DJ=_({id:"xai.web_search",inputSchema:v(()=>k(G.object({}))),outputSchema:jJ}),qJ=(J={})=>DJ(J),zJ=v(()=>k(G.object({allowedXHandles:G.array(G.string()).max(10).optional(),excludedXHandles:G.array(G.string()).max(10).optional(),fromDate:G.string().optional(),toDate:G.string().optional(),enableImageUnderstanding:G.boolean().optional(),enableVideoUnderstanding:G.boolean().optional()}))),VJ=v(()=>k(G.object({query:G.string(),posts:G.array(G.object({author:G.string(),text:G.string(),url:G.string(),likes:G.number()}))}))),LJ=_({id:"xai.x_search",inputSchema:v(()=>k(G.object({}))),outputSchema:VJ}),UJ=(J={})=>LJ(J);async function HJ({tools:J,toolChoice:D}){let L=(J==null?void 0:J.length)?J:void 0,q=[];if(L==null)return{tools:void 0,toolChoice:void 0,toolWarnings:q};let K=[],z=new Map;for(let Y of L)if(z.set(Y.name,Y),Y.type==="provider")switch(Y.id){case"xai.web_search":{let X=await s({value:Y.args,schema:AJ});K.push({type:"web_search",allowed_domains:X.allowedDomains,excluded_domains:X.excludedDomains,enable_image_understanding:X.enableImageUnderstanding});break}case"xai.x_search":{let X=await s({value:Y.args,schema:zJ});K.push({type:"x_search",allowed_x_handles:X.allowedXHandles,excluded_x_handles:X.excludedXHandles,from_date:X.fromDate,to_date:X.toDate,enable_image_understanding:X.enableImageUnderstanding,enable_video_understanding:X.enableVideoUnderstanding});break}case"xai.code_execution":{K.push({type:"code_interpreter"});break}case"xai.view_image":{K.push({type:"view_image"});break}case"xai.view_x_video":{K.push({type:"view_x_video"});break}case"xai.file_search":{let X=await s({value:Y.args,schema:GJ});K.push({type:"file_search",vector_store_ids:X.vectorStoreIds,max_num_results:X.maxNumResults});break}case"xai.mcp":{let X=await s({value:Y.args,schema:YJ});K.push({type:"mcp",server_url:X.serverUrl,server_label:X.serverLabel,server_description:X.serverDescription,allowed_tools:X.allowedTools,headers:X.headers,authorization:X.authorization});break}default:{q.push({type:"unsupported",feature:`provider-defined tool ${Y.name}`});break}}else K.push({type:"function",name:Y.name,description:Y.description,parameters:Y.inputSchema,...Y.strict!=null?{strict:Y.strict}:{}});if(D==null)return{tools:K,toolChoice:void 0,toolWarnings:q};let A=D.type;switch(A){case"auto":case"none":return{tools:K,toolChoice:A,toolWarnings:q};case"required":return{tools:K,toolChoice:"required",toolWarnings:q};case"tool":{let Y=z.get(D.toolName);if(Y==null)return{tools:K,toolChoice:void 0,toolWarnings:q};if(Y.type==="provider")return q.push({type:"unsupported",feature:`toolChoice for server-side tool "${Y.name}"`}),{tools:K,toolChoice:void 0,toolWarnings:q};return{tools:K,toolChoice:{type:"function",name:Y.name},toolWarnings:q}}default:throw new c({functionality:`tool choice type: ${A}`})}}var MJ=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,stopSequences:K,seed:z,responseFormat:A,providerOptions:Y,tools:X,toolChoice:Z}){var M,E,F,B,R,N,$;let W=[],H=(M=await p({provider:"xai",providerOptions:Y,schema:oG}))!=null?M:{};if(K!=null)W.push({type:"unsupported",feature:"stopSequences"});let O=(E=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.web_search"))==null?void 0:E.name,C=(F=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.x_search"))==null?void 0:F.name,w=(B=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.code_execution"))==null?void 0:B.name,j=(R=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.mcp"))==null?void 0:R.name,y=(N=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.file_search"))==null?void 0:N.name,{input:S,inputWarnings:h}=await sG({prompt:J,store:!0});W.push(...h);let{tools:m,toolChoice:I,toolWarnings:P}=await HJ({tools:X,toolChoice:Z});W.push(...P);let f=H.include?[...H.include]:void 0;if(H.store===!1)if(f==null)f=["reasoning.encrypted_content"];else f=[...f,"reasoning.encrypted_content"];let U={model:this.modelId,input:S,logprobs:H.logprobs===!0||H.topLogprobs!=null?!0:void 0,top_logprobs:H.topLogprobs,max_output_tokens:D,temperature:L,top_p:q,seed:z,...(A==null?void 0:A.type)==="json"&&{text:{format:A.schema!=null?{type:"json_schema",strict:!0,name:($=A.name)!=null?$:"response",description:A.description,schema:A.schema}:{type:"json_object"}}},...H.reasoningEffort!=null&&{reasoning:{effort:H.reasoningEffort}},...H.store===!1&&{store:H.store},...f!=null&&{include:f},...H.previousResponseId!=null&&{previous_response_id:H.previousResponseId}};if(m&&m.length>0)U.tools=m;if(I!=null)U.tool_choice=I;return{args:U,warnings:W,webSearchToolName:O,xSearchToolName:C,codeExecutionToolName:w,mcpToolName:j,fileSearchToolName:y}}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M,E,F,B;let{args:R,warnings:N,webSearchToolName:$,xSearchToolName:W,codeExecutionToolName:H,mcpToolName:O,fileSearchToolName:C}=await this.getArgs(J),{responseHeaders:w,value:j,rawValue:y}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:R,failedResponseHandler:r,successfulResponseHandler:d(t),abortSignal:J.abortSignal,fetch:this.config.fetch}),S=[],h=!1,m=["web_search","web_search_with_snippets","browse_page"],I=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"];for(let P of j.output){if(P.type==="file_search_call"){let f=C!=null?C:"file_search";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:"",providerExecuted:!0}),S.push({type:"tool-result",toolCallId:P.id,toolName:f,result:{queries:(L=P.queries)!=null?L:[],results:(K=(q=P.results)==null?void 0:q.map((U)=>({fileId:U.file_id,filename:U.filename,score:U.score,text:U.text})))!=null?K:null}});continue}if(P.type==="web_search_call"||P.type==="x_search_call"||P.type==="code_interpreter_call"||P.type==="code_execution_call"||P.type==="view_image_call"||P.type==="view_x_video_call"||P.type==="custom_tool_call"||P.type==="mcp_call"){let f=(z=P.name)!=null?z:"";if(m.includes((A=P.name)!=null?A:"")||P.type==="web_search_call")f=$!=null?$:"web_search";else if(I.includes((Y=P.name)!=null?Y:"")||P.type==="x_search_call")f=W!=null?W:"x_search";else if(P.name==="code_execution"||P.type==="code_interpreter_call"||P.type==="code_execution_call")f=H!=null?H:"code_execution";else if(P.type==="mcp_call")f=(X=O!=null?O:P.name)!=null?X:"mcp";let U=P.type==="custom_tool_call"?(Z=P.input)!=null?Z:"":P.type==="mcp_call"?(M=P.arguments)!=null?M:"":(E=P.arguments)!=null?E:"";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:U,providerExecuted:!0});continue}switch(P.type){case"message":{for(let f of P.content){if(f.text)S.push({type:"text",text:f.text});if(f.annotations){for(let U of f.annotations)if(U.type==="url_citation"&&"url"in U)S.push({type:"source",sourceType:"url",id:this.config.generateId(),url:U.url,title:(F=U.title)!=null?F:U.url})}}break}case"function_call":{h=!0,S.push({type:"tool-call",toolCallId:P.call_id,toolName:P.name,input:P.arguments});break}case"reasoning":{let f=P.summary.map((U)=>U.text).filter((U)=>U&&U.length>0);if(f.length>0){let U=f.join("");if(P.encrypted_content||P.id)S.push({type:"reasoning",text:U,providerMetadata:{xai:{...P.encrypted_content&&{reasoningEncryptedContent:P.encrypted_content},...P.id&&{itemId:P.id}}}});else S.push({type:"reasoning",text:U})}break}default:break}}return{content:S,finishReason:{unified:h?"tool-calls":o(j.status),raw:(B=j.status)!=null?B:void 0},usage:j.usage?ZG(j.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:R},response:{...JG(j),headers:w,body:y},warnings:N}}async doStream(J){var D;let{args:L,warnings:q,webSearchToolName:K,xSearchToolName:z,codeExecutionToolName:A,mcpToolName:Y,fileSearchToolName:X}=await this.getArgs(J),Z={...L,stream:!0},{responseHeaders:M,value:E}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:Z,failedResponseHandler:r,successfulResponseHandler:YG(eG),abortSignal:J.abortSignal,fetch:this.config.fetch}),F={unified:"other",raw:void 0},B=!1,R=void 0,N=!0,$={},W=new Set,H={},O={},C=this;return{stream:E.pipeThrough(new TransformStream({start(w){w.enqueue({type:"stream-start",warnings:q})},transform(w,j){var y,S,h,m,I,P,f,U,x,zG,VG,LG,UG,HG,MG;if(J.includeRawChunks)j.enqueue({type:"raw",rawValue:w.rawValue});if(!w.success){j.enqueue({type:"error",error:w.error});return}let V=w.value;if(V.type==="response.created"||V.type==="response.in_progress"){if(N)j.enqueue({type:"response-metadata",...JG(V.response)}),N=!1;return}if(V.type==="response.reasoning_summary_part.added"){let Q=`reasoning-${V.item_id}`;O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}})}if(V.type==="response.reasoning_summary_text.delta"){let Q=`reasoning-${V.item_id}`;j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_summary_text.done")return;if(V.type==="response.reasoning_text.delta"){let Q=`reasoning-${V.item_id}`;if(O[V.item_id]==null)O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}});j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_text.done")return;if(V.type==="response.output_text.delta"){let Q=`text-${V.item_id}`;if($[Q]==null)$[Q]={type:"text"},j.enqueue({type:"text-start",id:Q});j.enqueue({type:"text-delta",id:Q,delta:V.delta});return}if(V.type==="response.output_text.done"){if(V.annotations){for(let Q of V.annotations)if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(y=Q.title)!=null?y:Q.url})}return}if(V.type==="response.output_text.annotation.added"){let Q=V.annotation;if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(S=Q.title)!=null?S:Q.url});return}if(V.type==="response.done"||V.type==="response.completed"||V.type==="response.incomplete"){let Q=V.response;if(Q.usage)R=ZG(Q.usage);if(V.type==="response.incomplete"){let T="incomplete_details"in Q?(h=Q.incomplete_details)==null?void 0:h.reason:void 0;F={unified:T?o(T):"other",raw:T!=null?T:"incomplete"}}else if("status"in Q&&Q.status)F={unified:B?"tool-calls":o(Q.status),raw:Q.status};return}if(V.type==="response.failed"){let Q=(m=V.response.incomplete_details)==null?void 0:m.reason;if(F={unified:Q?o(Q):"error",raw:Q!=null?Q:"error"},V.response.usage)R=ZG(V.response.usage);return}if(V.type==="error"){j.enqueue({type:"error",error:V});return}if(V.type==="response.custom_tool_call_input.delta"||V.type==="response.custom_tool_call_input.done")return;if(V.type==="response.function_call_arguments.delta"){let Q=H[V.output_index];if(Q!=null)j.enqueue({type:"tool-input-delta",id:Q.toolCallId,delta:V.delta});return}if(V.type==="response.function_call_arguments.done")return;if(V.type==="response.output_item.added"||V.type==="response.output_item.done"){let Q=V.item;if(Q.type==="reasoning"){if(V.type==="response.output_item.done"){let T=`reasoning-${Q.id}`;if(!(Q.id in O))O[Q.id]={},j.enqueue({type:"reasoning-start",id:T,providerMetadata:{xai:{...Q.id&&{itemId:Q.id}}}});j.enqueue({type:"reasoning-end",id:T,providerMetadata:{xai:{...Q.encrypted_content&&{reasoningEncryptedContent:Q.encrypted_content},...Q.id&&{itemId:Q.id}}}}),delete O[Q.id]}return}if(Q.type==="file_search_call"){let T=X!=null?X:"file_search";if(!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:T}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:""}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:T,input:"",providerExecuted:!0});if(V.type==="response.output_item.done")j.enqueue({type:"tool-result",toolCallId:Q.id,toolName:T,result:{queries:(I=Q.queries)!=null?I:[],results:(f=(P=Q.results)==null?void 0:P.map((b)=>({fileId:b.file_id,filename:b.filename,score:b.score,text:b.text})))!=null?f:null}});return}if(Q.type==="web_search_call"||Q.type==="x_search_call"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call"||Q.type==="view_image_call"||Q.type==="view_x_video_call"||Q.type==="custom_tool_call"||Q.type==="mcp_call"){let T=["web_search","web_search_with_snippets","browse_page"],b=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"],n=(U=Q.name)!=null?U:"";if(T.includes((x=Q.name)!=null?x:"")||Q.type==="web_search_call")n=K!=null?K:"web_search";else if(b.includes((zG=Q.name)!=null?zG:"")||Q.type==="x_search_call")n=z!=null?z:"x_search";else if(Q.name==="code_execution"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call")n=A!=null?A:"code_execution";else if(Q.type==="mcp_call")n=(VG=Y!=null?Y:Q.name)!=null?VG:"mcp";let PG=Q.type==="custom_tool_call"?(LG=Q.input)!=null?LG:"":Q.type==="mcp_call"?(UG=Q.arguments)!=null?UG:"":(HG=Q.arguments)!=null?HG:"";if((Q.type==="custom_tool_call"?V.type==="response.output_item.done":!W.has(Q.id))&&!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:n}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:PG}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:n,input:PG,providerExecuted:!0});return}if(Q.type==="message")for(let T of Q.content){if(T.text&&T.text.length>0){let b=`text-${Q.id}`;if($[b]==null)$[b]={type:"text"},j.enqueue({type:"text-start",id:b}),j.enqueue({type:"text-delta",id:b,delta:T.text})}if(T.annotations){for(let b of T.annotations)if(b.type==="url_citation"&&"url"in b)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:b.url,title:(MG=b.title)!=null?MG:b.url})}}else if(Q.type==="function_call"){if(V.type==="response.output_item.added")H[V.output_index]={toolName:Q.name,toolCallId:Q.call_id},j.enqueue({type:"tool-input-start",id:Q.call_id,toolName:Q.name});else if(V.type==="response.output_item.done")B=!0,H[V.output_index]=void 0,j.enqueue({type:"tool-input-end",id:Q.call_id}),j.enqueue({type:"tool-call",toolCallId:Q.call_id,toolName:Q.name,input:Q.arguments})}}},flush(w){for(let[j,y]of Object.entries($))if(y.type==="text")w.enqueue({type:"text-end",id:j});w.enqueue({type:"finish",finishReason:F,usage:R!=null?R:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:Z},response:{headers:M}}}},PJ=G.object({output:G.string().describe("the output of the code execution"),error:G.string().optional().describe("any error that occurred")}),EJ=_({id:"xai.code_execution",inputSchema:G.object({}).describe("no input parameters"),outputSchema:PJ}),WJ=(J={})=>EJ(J),BJ=G.object({description:G.string().describe("description of the image"),objects:G.array(G.string()).optional().describe("objects detected in the image")}),FJ=_({id:"xai.view_image",inputSchema:G.object({}).describe("no input parameters"),outputSchema:BJ}),NJ=(J={})=>FJ(J),wJ=G.object({transcript:G.string().optional().describe("transcript of the video"),description:G.string().describe("description of the video content"),duration:G.number().optional().describe("duration in seconds")}),SJ=_({id:"xai.view_x_video",inputSchema:G.object({}).describe("no input parameters"),outputSchema:wJ}),OJ=(J={})=>SJ(J),fJ={codeExecution:WJ,fileSearch:XJ,mcpServer:KJ,viewImage:NJ,viewXVideo:OJ,webSearch:qJ,xSearch:UJ},CJ="3.0.82",a=G.string().min(1),yJ=G.enum(["480p","720p"]),IJ=G.enum(["edit-video","extend-video","reference-to-video"]),e={pollIntervalMs:G.number().positive().nullish(),pollTimeoutMs:G.number().positive().nullish(),resolution:yJ.nullish()},RJ=G.object({...e,mode:G.literal("edit-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),xJ=G.object({...e,mode:G.literal("extend-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),TJ=G.object({...e,mode:G.literal("reference-to-video"),referenceImageUrls:G.array(a).min(1).max(7),videoUrl:G.undefined().optional()}),vJ=G.object({...e,mode:G.undefined().optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional()}),IQ=G.union([RJ,xJ,TJ,vJ]),kJ=G.object({mode:IJ.optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional(),...e}).passthrough(),bJ=v(()=>k(kJ)),hJ={"1280x720":"720p","854x480":"480p","640x480":"480p"};function _J(J){if((J==null?void 0:J.mode)!=null)return J.mode;if((J==null?void 0:J.videoUrl)!=null)return"edit-video";if((J==null?void 0:J.referenceImageUrls)!=null&&J.referenceImageUrls.length>0)return"reference-to-video";return}var mJ=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M;let E=(q=(L=(D=this.config._internal)==null?void 0:D.currentDate)==null?void 0:L.call(D))!=null?q:new Date,F=[],B=await p({provider:"xai",providerOptions:J.providerOptions,schema:bJ}),R=_J(B),N=R==="edit-video",$=R==="extend-video",W=R==="reference-to-video";if(J.fps!=null)F.push({type:"unsupported",feature:"fps",details:"xAI video models do not support custom FPS."});if(J.seed!=null)F.push({type:"unsupported",feature:"seed",details:"xAI video models do not support seed."});if(J.n!=null&&J.n>1)F.push({type:"unsupported",feature:"n",details:"xAI video models do not support generating multiple videos per call. Only 1 video will be generated."});if(N&&J.duration!=null)F.push({type:"unsupported",feature:"duration",details:"xAI video editing does not support custom duration."});if(N&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video editing does not support custom aspect ratio."});if(N&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video editing does not support custom resolution."});if($&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video extension does not support custom aspect ratio."});if($&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video extension does not support custom resolution."});let H={model:this.modelId,prompt:J.prompt},O=!N,C=!N&&!$,w=!N&&!$;if(O&&J.duration!=null)H.duration=J.duration;if(C&&J.aspectRatio!=null)H.aspect_ratio=J.aspectRatio;if(w&&(B==null?void 0:B.resolution)!=null)H.resolution=B.resolution;else if(w&&J.resolution!=null){let U=hJ[J.resolution];if(U!=null)H.resolution=U;else F.push({type:"unsupported",feature:"resolution",details:`Unrecognized resolution "${J.resolution}". Use providerOptions.xai.resolution with "480p" or "720p" instead.`})}if(N)H.video={url:B.videoUrl};if($)H.video={url:B.videoUrl};if(J.image!=null)if(J.image.type==="url")H.image={url:J.image.url};else{let U=typeof J.image.data==="string"?J.image.data:wG(J.image.data);H.image={url:`data:${J.image.mediaType};base64,${U}`}}if(W)H.reference_images=B.referenceImageUrls.map((U)=>({url:U}));if(B!=null){for(let[U,x]of Object.entries(B))if(!["mode","pollIntervalMs","pollTimeoutMs","resolution","videoUrl","referenceImageUrls"].includes(U))H[U]=x}let j=(K=this.config.baseURL)!=null?K:"https://api.x.ai/v1",y;if(N)y=`${j}/videos/edits`;else if($)y=`${j}/videos/extensions`;else y=`${j}/videos/generations`;let{value:S}=await u({url:y,headers:g(this.config.headers(),J.headers),body:H,failedResponseHandler:r,successfulResponseHandler:d(gJ),abortSignal:J.abortSignal,fetch:this.config.fetch}),h=S.request_id;if(!h)throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:`No request_id returned from xAI API. Response: ${JSON.stringify(S)}`});let m=(z=B==null?void 0:B.pollIntervalMs)!=null?z:5000,I=(A=B==null?void 0:B.pollTimeoutMs)!=null?A:600000,P=Date.now(),f;while(!0){if(await FG(m,{abortSignal:J.abortSignal}),Date.now()-P>I)throw new l({name:"XAI_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${I}ms`});let{value:U,responseHeaders:x}=await XG({url:`${j}/videos/${h}`,headers:g(this.config.headers(),J.headers),successfulResponseHandler:d(uJ),failedResponseHandler:r,abortSignal:J.abortSignal,fetch:this.config.fetch});if(f=x,U.status==="done"||U.status==null&&((Y=U.video)==null?void 0:Y.url)){if(((X=U.video)==null?void 0:X.respect_moderation)===!1)throw new l({name:"XAI_VIDEO_MODERATION_ERROR",message:"Video generation was blocked due to a content policy violation."});if(!((Z=U.video)==null?void 0:Z.url))throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:"Video generation completed but no video URL was returned."});return{videos:[{type:"url",url:U.video.url,mediaType:"video/mp4"}],warnings:F,response:{timestamp:E,modelId:this.modelId,headers:f},providerMetadata:{xai:{requestId:h,videoUrl:U.video.url,...U.video.duration!=null?{duration:U.video.duration}:{},...((M=U.usage)==null?void 0:M.cost_in_usd_ticks)!=null?{costInUsdTicks:U.usage.cost_in_usd_ticks}:{},...U.progress!=null?{progress:U.progress}:{}}}}}if(U.status==="expired")throw new l({name:"XAI_VIDEO_GENERATION_EXPIRED",message:"Video generation request expired."});if(U.status==="failed")throw new l({name:"XAI_VIDEO_GENERATION_FAILED",message:"Video generation failed."})}}},gJ=G.object({request_id:G.string().nullish()}),uJ=G.object({status:G.string().nullish(),video:G.object({url:G.string(),duration:G.number().nullish(),respect_moderation:G.boolean().nullish()}).nullish(),model:G.string().nullish(),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish(),progress:G.number().nullish(),error:G.object({code:G.string().nullish(),message:G.string().nullish()}).nullish()});function dJ(J={}){var D;let L=xG((D=J.baseURL)!=null?D:"https://api.x.ai/v1"),q=()=>OG({Authorization:`Bearer ${fG({apiKey:J.apiKey,environmentVariableName:"XAI_API_KEY",description:"xAI API key"})}`,...J.headers},`ai-sdk/xai/${CJ}`),K=(Z)=>{return new cG(Z,{provider:"xai.chat",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},z=(Z)=>{return new MJ(Z,{provider:"xai.responses",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},A=(Z)=>{return new aG(Z,{provider:"xai.image",baseURL:L,headers:q,fetch:J.fetch})},Y=(Z)=>{return new mJ(Z,{provider:"xai.video",baseURL:L,headers:q,fetch:J.fetch})},X=(Z)=>K(Z);return X.specificationVersion="v3",X.languageModel=K,X.chat=K,X.responses=z,X.embeddingModel=(Z)=>{throw new BG({modelId:Z,modelType:"embeddingModel"})},X.textEmbeddingModel=X.embeddingModel,X.imageModel=A,X.image=A,X.videoModel=Y,X.video=Y,X.tools=fJ,X}var RQ=dJ();export{fJ as xaiTools,RQ as xai,UJ as xSearch,qJ as webSearch,OJ as viewXVideo,NJ as viewImage,KJ as mcpServer,dJ as createXai,WJ as codeExecution,CJ as VERSION};
|
|
2
|
+
import{$p as XG,Aq as d,Bq as IG,Cq as RG,Eq as xG,Fp as g,Hp as FG,Jp as NG,Lp as wG,Mp as QG,Np as SG,Vp as $G,_p as OG,cq as fG,gq as v,jq as k,kq as s,nq as CG,qq as p,rq as u,wq as _,yq as yG,zq as YG}from"./chunk-yce8ph5b.js";import{Gq as l,Hq as GG,Qq as BG,Tq as c}from"./chunk-kec1xw1n.js";import"./chunk-cqtkxwd8.js";import"./chunk-x50adh71.js";import{Hu as G}from"./chunk-q4mtwv1w.js";import"./chunk-7a3txs9f.js";import"./chunk-djfrkbd5.js";function vG(J){var D;let L=[],q=[];for(let{role:K,content:z}of J)switch(K){case"system":{L.push({role:"system",content:z});break}case"user":{if(z.length===1&&z[0].type==="text"){L.push({role:"user",content:z[0].text});break}L.push({role:"user",content:z.map((A)=>{switch(A.type){case"text":return{type:"text",text:A.text};case"file":if(A.mediaType.startsWith("image/")){let Y=A.mediaType==="image/*"?"image/jpeg":A.mediaType;return{type:"image_url",image_url:{url:A.data instanceof URL?A.data.toString():`data:${Y};base64,${QG(A.data)}`}}}else throw new c({functionality:`file part media type ${A.mediaType}`})}})});break}case"assistant":{let A="",Y=[];for(let X of z)switch(X.type){case"text":{A+=X.text;break}case"tool-call":{Y.push({id:X.toolCallId,type:"function",function:{name:X.toolName,arguments:JSON.stringify(X.input)}});break}}L.push({role:"assistant",content:A,tool_calls:Y.length>0?Y:void 0});break}case"tool":{for(let A of z){if(A.type==="tool-approval-response")continue;let Y=A.output,X;switch(Y.type){case"text":case"error-text":X=Y.value;break;case"execution-denied":X=(D=Y.reason)!=null?D:"Tool execution denied.";break;case"content":case"json":case"error-json":X=JSON.stringify(Y.value);break}L.push({role:"tool",tool_call_id:A.toolCallId,content:X})}break}default:throw Error(`Unsupported role: ${K}`)}return{messages:L,warnings:q}}function EG(J){var D,L,q,K;let z=(L=(D=J.prompt_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.completion_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.prompt_tokens;return{inputTokens:{total:Y?J.prompt_tokens:J.prompt_tokens+z,noCache:Y?J.prompt_tokens-z:J.prompt_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.completion_tokens+A,text:J.completion_tokens,reasoning:A},raw:J}}function JG({id:J,model:D,created:L,created_at:q}){let K=L!=null?L:q;return{id:J!=null?J:void 0,modelId:D!=null?D:void 0,timestamp:K!=null?new Date(K*1000):void 0}}function WG(J){switch(J){case"stop":return"stop";case"length":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var kG=G.object({type:G.literal("web"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),allowedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),bG=G.object({type:G.literal("x"),excludedXHandles:G.array(G.string()).optional(),includedXHandles:G.array(G.string()).optional(),postFavoriteCount:G.number().int().optional(),postViewCount:G.number().int().optional(),xHandles:G.array(G.string()).optional()}),hG=G.object({type:G.literal("news"),country:G.string().length(2).optional(),excludedWebsites:G.array(G.string()).max(5).optional(),safeSearch:G.boolean().optional()}),_G=G.object({type:G.literal("rss"),links:G.array(G.string().url()).max(1)}),mG=G.discriminatedUnion("type",[kG,bG,hG,_G]),gG=G.object({reasoningEffort:G.enum(["low","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),parallel_function_calling:G.boolean().optional(),searchParameters:G.object({mode:G.enum(["off","auto","on"]),returnCitations:G.boolean().optional(),fromDate:G.string().optional(),toDate:G.string().optional(),maxSearchResults:G.number().min(1).max(50).optional(),sources:G.array(mG).optional()}).optional()}),uG=G.object({error:G.object({message:G.string(),type:G.string().nullish(),param:G.any().nullish(),code:G.union([G.string(),G.number()]).nullish()})}),r=yG({errorSchema:uG,errorToMessage:(J)=>J.error.message});function dG({tools:J,toolChoice:D}){J=(J==null?void 0:J.length)?J:void 0;let L=[];if(J==null)return{tools:void 0,toolChoice:void 0,toolWarnings:L};let q=[];for(let z of J)if(z.type==="provider")L.push({type:"unsupported",feature:`provider-defined tool ${z.name}`});else q.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(D==null)return{tools:q,toolChoice:void 0,toolWarnings:L};let K=D.type;switch(K){case"auto":case"none":return{tools:q,toolChoice:K,toolWarnings:L};case"required":return{tools:q,toolChoice:"required",toolWarnings:L};case"tool":return{tools:q,toolChoice:{type:"function",function:{name:D.toolName}},toolWarnings:L};default:throw new c({functionality:`tool choice type: ${K}`})}}var cG=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,topK:K,frequencyPenalty:z,presencePenalty:A,stopSequences:Y,seed:X,responseFormat:Z,providerOptions:M,tools:E,toolChoice:F}){var B,R,N;let $=[],W=(B=await p({provider:"xai",providerOptions:M,schema:gG}))!=null?B:{};if(K!=null)$.push({type:"unsupported",feature:"topK"});if(z!=null)$.push({type:"unsupported",feature:"frequencyPenalty"});if(A!=null)$.push({type:"unsupported",feature:"presencePenalty"});if(Y!=null)$.push({type:"unsupported",feature:"stopSequences"});let{messages:H,warnings:O}=vG(J);$.push(...O);let{tools:C,toolChoice:w,toolWarnings:j}=dG({tools:E,toolChoice:F});return $.push(...j),{args:{model:this.modelId,logprobs:W.logprobs===!0||W.topLogprobs!=null?!0:void 0,top_logprobs:W.topLogprobs,max_completion_tokens:D,temperature:L,top_p:q,seed:X,reasoning_effort:W.reasoningEffort,parallel_function_calling:W.parallel_function_calling,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{name:(R=Z.name)!=null?R:"response",schema:Z.schema,strict:!0}}:{type:"json_object"}:void 0,search_parameters:W.searchParameters?{mode:W.searchParameters.mode,return_citations:W.searchParameters.returnCitations,from_date:W.searchParameters.fromDate,to_date:W.searchParameters.toDate,max_search_results:W.searchParameters.maxSearchResults,sources:(N=W.searchParameters.sources)==null?void 0:N.map((S)=>{var h;return{type:S.type,...S.type==="web"&&{country:S.country,excluded_websites:S.excludedWebsites,allowed_websites:S.allowedWebsites,safe_search:S.safeSearch},...S.type==="x"&&{excluded_x_handles:S.excludedXHandles,included_x_handles:(h=S.includedXHandles)!=null?h:S.xHandles,post_favorite_count:S.postFavoriteCount,post_view_count:S.postViewCount},...S.type==="news"&&{country:S.country,excluded_websites:S.excludedWebsites,safe_search:S.safeSearch},...S.type==="rss"&&{links:S.links}}})}:void 0,messages:H,tools:C,tool_choice:w},warnings:$}}async doGenerate(J){var D,L;let{args:q,warnings:K}=await this.getArgs(J),z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y,rawValue:X}=await u({url:z,headers:g(this.config.headers(),J.headers),body:q,failedResponseHandler:r,successfulResponseHandler:d(pG),abortSignal:J.abortSignal,fetch:this.config.fetch});if(Y.error!=null)throw new GG({message:Y.error,url:z,requestBodyValues:q,statusCode:200,responseHeaders:A,responseBody:JSON.stringify(X),isRetryable:Y.code==="The service is currently unavailable"});let Z=Y.choices[0],M=[];if(Z.message.content!=null&&Z.message.content.length>0){let E=Z.message.content,F=q.messages[q.messages.length-1];if((F==null?void 0:F.role)==="assistant"&&E===F.content)E="";if(E.length>0)M.push({type:"text",text:E})}if(Z.message.reasoning_content!=null&&Z.message.reasoning_content.length>0)M.push({type:"reasoning",text:Z.message.reasoning_content});if(Z.message.tool_calls!=null)for(let E of Z.message.tool_calls)M.push({type:"tool-call",toolCallId:E.id,toolName:E.function.name,input:E.function.arguments});if(Y.citations!=null)for(let E of Y.citations)M.push({type:"source",sourceType:"url",id:this.config.generateId(),url:E});return{content:M,finishReason:{unified:WG(Z.finish_reason),raw:(L=Z.finish_reason)!=null?L:void 0},usage:Y.usage?EG(Y.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:q},response:{...JG(Y),headers:A,body:X},warnings:K}}async doStream(J){var D;let{args:L,warnings:q}=await this.getArgs(J),K={...L,stream:!0,stream_options:{include_usage:!0}},z=`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/chat/completions`,{responseHeaders:A,value:Y}=await u({url:z,headers:g(this.config.headers(),J.headers),body:K,failedResponseHandler:r,successfulResponseHandler:async({response:N})=>{let $=NG(N),W=N.headers.get("content-type");if(W==null?void 0:W.includes("application/json")){let H=await N.text(),O=await CG({text:H,schema:lG});if(O.success)throw new GG({message:O.value.error,url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H,isRetryable:O.value.code==="The service is currently unavailable"});throw new GG({message:"Invalid JSON response",url:z,requestBodyValues:K,statusCode:200,responseHeaders:$,responseBody:H})}return YG(iG)({response:N,url:z,requestBodyValues:K})},abortSignal:J.abortSignal,fetch:this.config.fetch}),X={unified:"other",raw:void 0},Z=void 0,M=!0,E={},F={},B=void 0,R=this;return{stream:Y.pipeThrough(new TransformStream({start(N){N.enqueue({type:"stream-start",warnings:q})},transform(N,$){if(J.includeRawChunks)$.enqueue({type:"raw",rawValue:N.rawValue});if(!N.success){$.enqueue({type:"error",error:N.error});return}let W=N.value;if(M)$.enqueue({type:"response-metadata",...JG(W)}),M=!1;if(W.citations!=null)for(let w of W.citations)$.enqueue({type:"source",sourceType:"url",id:R.config.generateId(),url:w});if(W.usage!=null)Z=EG(W.usage);let H=W.choices[0];if((H==null?void 0:H.finish_reason)!=null)X={unified:WG(H.finish_reason),raw:H.finish_reason};if((H==null?void 0:H.delta)==null)return;let{delta:O,index:C}=H;if(O.content!=null&&O.content.length>0){let w=O.content;if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;let j=K.messages[K.messages.length-1];if((j==null?void 0:j.role)==="assistant"&&w===j.content)return;let y=`text-${W.id||C}`;if(E[y]==null)E[y]={type:"text",ended:!1},$.enqueue({type:"text-start",id:y});$.enqueue({type:"text-delta",id:y,delta:w})}if(O.reasoning_content!=null&&O.reasoning_content.length>0){let w=`reasoning-${W.id||C}`;if(F[w]===O.reasoning_content)return;if(F[w]=O.reasoning_content,E[w]==null)E[w]={type:"reasoning",ended:!1},B=w,$.enqueue({type:"reasoning-start",id:w});$.enqueue({type:"reasoning-delta",id:w,delta:O.reasoning_content})}if(O.tool_calls!=null){if(B!=null&&!E[B].ended)$.enqueue({type:"reasoning-end",id:B}),E[B].ended=!0,B=void 0;for(let w of O.tool_calls){let j=w.id;$.enqueue({type:"tool-input-start",id:j,toolName:w.function.name}),$.enqueue({type:"tool-input-delta",id:j,delta:w.function.arguments}),$.enqueue({type:"tool-input-end",id:j}),$.enqueue({type:"tool-call",toolCallId:j,toolName:w.function.name,input:w.function.arguments})}}},flush(N){for(let[$,W]of Object.entries(E))if(!W.ended)N.enqueue({type:W.type==="text"?"text-end":"reasoning-end",id:$});N.enqueue({type:"finish",finishReason:X,usage:Z!=null?Z:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:K},response:{headers:A}}}},TG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number(),prompt_tokens_details:G.object({text_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),image_tokens:G.number().nullish(),cached_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish(),audio_tokens:G.number().nullish(),accepted_prediction_tokens:G.number().nullish(),rejected_prediction_tokens:G.number().nullish()}).nullish()}),pG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant"),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),index:G.number(),finish_reason:G.string().nullish()})).nullish(),object:G.literal("chat.completion").nullish(),usage:TG.nullish(),citations:G.array(G.string().url()).nullish(),code:G.string().nullish(),error:G.string().nullish()}),iG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).optional(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:TG.nullish(),citations:G.array(G.string().url()).nullish()}),lG=G.object({code:G.string(),error:G.string()}),rG=G.object({aspect_ratio:G.string().optional(),output_format:G.string().optional(),sync_mode:G.boolean().optional(),resolution:G.enum(["1k","2k"]).optional(),quality:G.enum(["low","medium","high"]).optional(),user:G.string().optional()}),aG=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxImagesPerCall=3}get provider(){return this.config.provider}async doGenerate({prompt:J,n:D,size:L,aspectRatio:q,seed:K,providerOptions:z,headers:A,abortSignal:Y,files:X,mask:Z}){var M,E,F,B,R;let N=[];if(L!=null)N.push({type:"unsupported",feature:"size",details:"This model does not support the `size` option. Use `aspectRatio` instead."});if(K!=null)N.push({type:"unsupported",feature:"seed"});if(Z!=null)N.push({type:"unsupported",feature:"mask"});let $=await p({provider:"xai",providerOptions:z,schema:rG}),W=X!=null&&X.length>0,H=W?X.map((I)=>SG(I)):[],O=W?"/images/edits":"/images/generations",C={model:this.modelId,prompt:J,n:D,response_format:"b64_json"};if(q!=null)C.aspect_ratio=q;if(($==null?void 0:$.output_format)!=null)C.output_format=$.output_format;if(($==null?void 0:$.sync_mode)!=null)C.sync_mode=$.sync_mode;if(($==null?void 0:$.aspect_ratio)!=null&&q==null)C.aspect_ratio=$.aspect_ratio;if(($==null?void 0:$.resolution)!=null)C.resolution=$.resolution;if(($==null?void 0:$.quality)!=null)C.quality=$.quality;if(($==null?void 0:$.user)!=null)C.user=$.user;if(H.length===1)C.image={url:H[0],type:"image_url"};else if(H.length>1)C.images=H.map((I)=>({url:I,type:"image_url"}));let w=(M=this.config.baseURL)!=null?M:"https://api.x.ai/v1",j=(B=(F=(E=this.config._internal)==null?void 0:E.currentDate)==null?void 0:F.call(E))!=null?B:new Date,{value:y,responseHeaders:S}=await u({url:`${w}${O}`,headers:g(this.config.headers(),A),body:C,failedResponseHandler:r,successfulResponseHandler:d(nG),abortSignal:Y,fetch:this.config.fetch});return{images:y.data.every((I)=>I.b64_json!=null)?y.data.map((I)=>I.b64_json):await Promise.all(y.data.map((I)=>this.downloadImage(I.url,Y))),warnings:N,response:{timestamp:j,modelId:this.modelId,headers:S},providerMetadata:{xai:{images:y.data.map((I)=>({...I.revised_prompt?{revisedPrompt:I.revised_prompt}:{}})),...((R=y.usage)==null?void 0:R.cost_in_usd_ticks)!=null?{costInUsdTicks:y.usage.cost_in_usd_ticks}:{}}}}}async downloadImage(J,D){let{value:L}=await XG({url:J,abortSignal:D,failedResponseHandler:RG(),successfulResponseHandler:IG(),fetch:this.config.fetch});return L}},nG=G.object({data:G.array(G.object({url:G.string().nullish(),b64_json:G.string().nullish(),revised_prompt:G.string().nullish()})),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish()});async function sG({prompt:J}){var D,L,q,K,z;let A=[],Y=[];for(let X of J)switch(X.role){case"system":{A.push({role:"system",content:X.content});break}case"user":{let Z=[];for(let M of X.content)switch(M.type){case"text":{Z.push({type:"input_text",text:M.text});break}case"file":{if(M.mediaType.startsWith("image/")){let E=M.mediaType==="image/*"?"image/jpeg":M.mediaType,F=M.data instanceof URL?M.data.toString():`data:${E};base64,${QG(M.data)}`;Z.push({type:"input_image",image_url:F})}else throw new c({functionality:`file part media type ${M.mediaType}`});break}default:{let E=M;Y.push({type:"other",message:"xAI Responses API does not support this content type in user messages"})}}A.push({role:"user",content:Z});break}case"assistant":{for(let Z of X.content)switch(Z.type){case"text":{let M=typeof((L=(D=Z.providerOptions)==null?void 0:D.xai)==null?void 0:L.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({role:"assistant",content:Z.text,id:M});break}case"tool-call":{if(Z.providerExecuted)break;let M=typeof((K=(q=Z.providerOptions)==null?void 0:q.xai)==null?void 0:K.itemId)==="string"?Z.providerOptions.xai.itemId:void 0;A.push({type:"function_call",id:M!=null?M:Z.toolCallId,call_id:Z.toolCallId,name:Z.toolName,arguments:JSON.stringify(Z.input),status:"completed"});break}case"tool-result":break;case"reasoning":case"file":{Y.push({type:"other",message:`xAI Responses API does not support ${Z.type} in assistant messages`});break}default:{let M=Z;Y.push({type:"other",message:"xAI Responses API does not support this content type in assistant messages"})}}break}case"tool":{for(let Z of X.content){if(Z.type==="tool-approval-response")continue;let M=Z.output,E;switch(M.type){case"text":case"error-text":E=M.value;break;case"execution-denied":E=(z=M.reason)!=null?z:"tool execution denied";break;case"json":case"error-json":E=JSON.stringify(M.value);break;case"content":E=M.value.map((F)=>{if(F.type==="text")return F.text;return""}).join("");break;default:{let F=M;E=""}}A.push({type:"function_call_output",call_id:Z.toolCallId,output:E})}break}default:{let Z=X;Y.push({type:"other",message:"unsupported message role"})}}return{input:A,inputWarnings:Y}}function ZG(J){var D,L,q,K;let z=(L=(D=J.input_tokens_details)==null?void 0:D.cached_tokens)!=null?L:0,A=(K=(q=J.output_tokens_details)==null?void 0:q.reasoning_tokens)!=null?K:0,Y=z<=J.input_tokens;return{inputTokens:{total:Y?J.input_tokens:J.input_tokens+z,noCache:Y?J.input_tokens-z:J.input_tokens,cacheRead:z,cacheWrite:void 0},outputTokens:{total:J.output_tokens,text:J.output_tokens-A,reasoning:A},raw:J}}function o(J){switch(J){case"stop":case"completed":return"stop";case"length":case"max_output_tokens":return"length";case"tool_calls":case"function_call":return"tool-calls";case"content_filter":return"content-filter";default:return"other"}}var KG=G.union([G.object({type:G.literal("url_citation"),url:G.string(),title:G.string().optional()}),G.object({type:G.string()})]),AG=G.object({type:G.string(),text:G.string().optional(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),jG=G.object({type:G.string(),text:G.string()}),i=G.object({name:G.string().optional(),arguments:G.string().optional(),input:G.string().optional(),call_id:G.string().optional(),id:G.string(),status:G.string(),action:G.any().optional()}),tG=G.object({name:G.string().optional(),arguments:G.string().optional(),output:G.string().optional(),error:G.string().optional(),id:G.string(),status:G.string(),server_label:G.string().optional()}),DG=G.discriminatedUnion("type",[G.object({type:G.literal("web_search_call"),...i.shape}),G.object({type:G.literal("x_search_call"),...i.shape}),G.object({type:G.literal("code_interpreter_call"),...i.shape}),G.object({type:G.literal("code_execution_call"),...i.shape}),G.object({type:G.literal("view_image_call"),...i.shape}),G.object({type:G.literal("view_x_video_call"),...i.shape}),G.object({type:G.literal("file_search_call"),id:G.string(),status:G.string(),queries:G.array(G.string()).optional(),results:G.array(G.object({file_id:G.string(),filename:G.string(),score:G.number(),text:G.string()})).nullish()}),G.object({type:G.literal("custom_tool_call"),...i.shape}),G.object({type:G.literal("mcp_call"),...tG.shape}),G.object({type:G.literal("message"),role:G.string(),content:G.array(AG),id:G.string(),status:G.string()}),G.object({type:G.literal("function_call"),name:G.string(),arguments:G.string(),call_id:G.string(),id:G.string()}),G.object({type:G.literal("reasoning"),id:G.string(),summary:G.array(jG),status:G.string(),encrypted_content:G.string().nullish()})]),qG=G.object({input_tokens:G.number(),output_tokens:G.number(),total_tokens:G.number().optional(),input_tokens_details:G.object({cached_tokens:G.number().optional()}).optional(),output_tokens_details:G.object({reasoning_tokens:G.number().optional()}).optional(),num_sources_used:G.number().optional(),num_server_side_tools_used:G.number().optional()}),t=G.object({id:G.string().nullish(),created_at:G.number().nullish(),model:G.string().nullish(),object:G.literal("response"),output:G.array(DG),usage:qG.nullish(),status:G.string()}),eG=G.union([G.object({type:G.literal("response.created"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.in_progress"),response:t.partial({usage:!0,status:!0})}),G.object({type:G.literal("response.output_item.added"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.output_item.done"),item:DG,output_index:G.number()}),G.object({type:G.literal("response.content_part.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.content_part.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),part:AG}),G.object({type:G.literal("response.output_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string(),logprobs:G.array(G.any()).optional()}),G.object({type:G.literal("response.output_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string(),logprobs:G.array(G.any()).optional(),annotations:G.array(KG).optional()}),G.object({type:G.literal("response.output_text.annotation.added"),item_id:G.string(),output_index:G.number(),content_index:G.number(),annotation_index:G.number(),annotation:KG}),G.object({type:G.literal("response.reasoning_summary_part.added"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_part.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),part:jG}),G.object({type:G.literal("response.reasoning_summary_text.delta"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_summary_text.done"),item_id:G.string(),output_index:G.number(),summary_index:G.number(),text:G.string()}),G.object({type:G.literal("response.reasoning_text.delta"),item_id:G.string(),output_index:G.number(),content_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.reasoning_text.done"),item_id:G.string(),output_index:G.number(),content_index:G.number(),text:G.string()}),G.object({type:G.literal("response.web_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.web_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.x_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.searching"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.file_search_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_execution_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.interpreting"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.code_interpreter_call_code.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.code_interpreter_call_code.done"),item_id:G.string(),output_index:G.number(),code:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.custom_tool_call_input.done"),item_id:G.string(),output_index:G.number(),input:G.string()}),G.object({type:G.literal("response.function_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.function_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string()}),G.object({type:G.literal("response.mcp_call.in_progress"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.executing"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.completed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call.failed"),item_id:G.string(),output_index:G.number()}),G.object({type:G.literal("response.mcp_call_arguments.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_arguments.done"),item_id:G.string(),output_index:G.number(),arguments:G.string().optional()}),G.object({type:G.literal("response.mcp_call_output.delta"),item_id:G.string(),output_index:G.number(),delta:G.string()}),G.object({type:G.literal("response.mcp_call_output.done"),item_id:G.string(),output_index:G.number(),output:G.string().optional()}),G.object({type:G.literal("response.incomplete"),response:G.object({incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("response.failed"),response:G.object({error:G.object({code:G.string().nullish(),message:G.string()}).nullish(),incomplete_details:G.object({reason:G.string()}).nullish(),usage:qG.nullish()})}),G.object({type:G.literal("error"),code:G.string().nullish(),message:G.string(),param:G.string().nullish()}),G.object({type:G.literal("response.done"),response:t}),G.object({type:G.literal("response.completed"),response:t})]),oG=G.object({reasoningEffort:G.enum(["low","medium","high"]).optional(),logprobs:G.boolean().optional(),topLogprobs:G.number().int().min(0).max(8).optional(),store:G.boolean().optional(),previousResponseId:G.string().optional(),include:G.array(G.enum(["file_search_call.results"])).nullish()}),GJ=v(()=>k(G.object({vectorStoreIds:G.array(G.string()),maxNumResults:G.number().optional()}))),JJ=v(()=>k(G.object({queries:G.array(G.string()),results:G.array(G.object({fileId:G.string(),filename:G.string(),score:G.number().min(0).max(1),text:G.string()})).nullable()}))),QJ=_({id:"xai.file_search",inputSchema:v(()=>k(G.object({}))),outputSchema:JJ}),XJ=(J)=>QJ(J),YJ=v(()=>k(G.object({serverUrl:G.string().describe("The URL of the MCP server"),serverLabel:G.string().optional().describe("A label for the MCP server"),serverDescription:G.string().optional().describe("Description of the MCP server"),allowedTools:G.array(G.string()).optional().describe("List of allowed tool names"),headers:G.record(G.string(),G.string()).optional().describe("Custom headers to send"),authorization:G.string().optional().describe("Authorization header value")}))),ZJ=v(()=>k(G.object({name:G.string(),arguments:G.string(),result:G.unknown()}))),$J=_({id:"xai.mcp",inputSchema:v(()=>k(G.object({}))),outputSchema:ZJ}),KJ=(J)=>$J(J),AJ=v(()=>k(G.object({allowedDomains:G.array(G.string()).max(5).optional(),excludedDomains:G.array(G.string()).max(5).optional(),enableImageUnderstanding:G.boolean().optional()}))),jJ=v(()=>k(G.object({query:G.string(),sources:G.array(G.object({title:G.string(),url:G.string(),snippet:G.string()}))}))),DJ=_({id:"xai.web_search",inputSchema:v(()=>k(G.object({}))),outputSchema:jJ}),qJ=(J={})=>DJ(J),zJ=v(()=>k(G.object({allowedXHandles:G.array(G.string()).max(10).optional(),excludedXHandles:G.array(G.string()).max(10).optional(),fromDate:G.string().optional(),toDate:G.string().optional(),enableImageUnderstanding:G.boolean().optional(),enableVideoUnderstanding:G.boolean().optional()}))),VJ=v(()=>k(G.object({query:G.string(),posts:G.array(G.object({author:G.string(),text:G.string(),url:G.string(),likes:G.number()}))}))),LJ=_({id:"xai.x_search",inputSchema:v(()=>k(G.object({}))),outputSchema:VJ}),UJ=(J={})=>LJ(J);async function HJ({tools:J,toolChoice:D}){let L=(J==null?void 0:J.length)?J:void 0,q=[];if(L==null)return{tools:void 0,toolChoice:void 0,toolWarnings:q};let K=[],z=new Map;for(let Y of L)if(z.set(Y.name,Y),Y.type==="provider")switch(Y.id){case"xai.web_search":{let X=await s({value:Y.args,schema:AJ});K.push({type:"web_search",allowed_domains:X.allowedDomains,excluded_domains:X.excludedDomains,enable_image_understanding:X.enableImageUnderstanding});break}case"xai.x_search":{let X=await s({value:Y.args,schema:zJ});K.push({type:"x_search",allowed_x_handles:X.allowedXHandles,excluded_x_handles:X.excludedXHandles,from_date:X.fromDate,to_date:X.toDate,enable_image_understanding:X.enableImageUnderstanding,enable_video_understanding:X.enableVideoUnderstanding});break}case"xai.code_execution":{K.push({type:"code_interpreter"});break}case"xai.view_image":{K.push({type:"view_image"});break}case"xai.view_x_video":{K.push({type:"view_x_video"});break}case"xai.file_search":{let X=await s({value:Y.args,schema:GJ});K.push({type:"file_search",vector_store_ids:X.vectorStoreIds,max_num_results:X.maxNumResults});break}case"xai.mcp":{let X=await s({value:Y.args,schema:YJ});K.push({type:"mcp",server_url:X.serverUrl,server_label:X.serverLabel,server_description:X.serverDescription,allowed_tools:X.allowedTools,headers:X.headers,authorization:X.authorization});break}default:{q.push({type:"unsupported",feature:`provider-defined tool ${Y.name}`});break}}else K.push({type:"function",name:Y.name,description:Y.description,parameters:Y.inputSchema,...Y.strict!=null?{strict:Y.strict}:{}});if(D==null)return{tools:K,toolChoice:void 0,toolWarnings:q};let A=D.type;switch(A){case"auto":case"none":return{tools:K,toolChoice:A,toolWarnings:q};case"required":return{tools:K,toolChoice:"required",toolWarnings:q};case"tool":{let Y=z.get(D.toolName);if(Y==null)return{tools:K,toolChoice:void 0,toolWarnings:q};if(Y.type==="provider")return q.push({type:"unsupported",feature:`toolChoice for server-side tool "${Y.name}"`}),{tools:K,toolChoice:void 0,toolWarnings:q};return{tools:K,toolChoice:{type:"function",name:Y.name},toolWarnings:q}}default:throw new c({functionality:`tool choice type: ${A}`})}}var MJ=class{constructor(J,D){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=D}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:D,temperature:L,topP:q,stopSequences:K,seed:z,responseFormat:A,providerOptions:Y,tools:X,toolChoice:Z}){var M,E,F,B,R,N,$;let W=[],H=(M=await p({provider:"xai",providerOptions:Y,schema:oG}))!=null?M:{};if(K!=null)W.push({type:"unsupported",feature:"stopSequences"});let O=(E=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.web_search"))==null?void 0:E.name,C=(F=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.x_search"))==null?void 0:F.name,w=(B=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.code_execution"))==null?void 0:B.name,j=(R=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.mcp"))==null?void 0:R.name,y=(N=X==null?void 0:X.find((x)=>x.type==="provider"&&x.id==="xai.file_search"))==null?void 0:N.name,{input:S,inputWarnings:h}=await sG({prompt:J,store:!0});W.push(...h);let{tools:m,toolChoice:I,toolWarnings:P}=await HJ({tools:X,toolChoice:Z});W.push(...P);let f=H.include?[...H.include]:void 0;if(H.store===!1)if(f==null)f=["reasoning.encrypted_content"];else f=[...f,"reasoning.encrypted_content"];let U={model:this.modelId,input:S,logprobs:H.logprobs===!0||H.topLogprobs!=null?!0:void 0,top_logprobs:H.topLogprobs,max_output_tokens:D,temperature:L,top_p:q,seed:z,...(A==null?void 0:A.type)==="json"&&{text:{format:A.schema!=null?{type:"json_schema",strict:!0,name:($=A.name)!=null?$:"response",description:A.description,schema:A.schema}:{type:"json_object"}}},...H.reasoningEffort!=null&&{reasoning:{effort:H.reasoningEffort}},...H.store===!1&&{store:H.store},...f!=null&&{include:f},...H.previousResponseId!=null&&{previous_response_id:H.previousResponseId}};if(m&&m.length>0)U.tools=m;if(I!=null)U.tool_choice=I;return{args:U,warnings:W,webSearchToolName:O,xSearchToolName:C,codeExecutionToolName:w,mcpToolName:j,fileSearchToolName:y}}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M,E,F,B;let{args:R,warnings:N,webSearchToolName:$,xSearchToolName:W,codeExecutionToolName:H,mcpToolName:O,fileSearchToolName:C}=await this.getArgs(J),{responseHeaders:w,value:j,rawValue:y}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:R,failedResponseHandler:r,successfulResponseHandler:d(t),abortSignal:J.abortSignal,fetch:this.config.fetch}),S=[],h=!1,m=["web_search","web_search_with_snippets","browse_page"],I=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"];for(let P of j.output){if(P.type==="file_search_call"){let f=C!=null?C:"file_search";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:"",providerExecuted:!0}),S.push({type:"tool-result",toolCallId:P.id,toolName:f,result:{queries:(L=P.queries)!=null?L:[],results:(K=(q=P.results)==null?void 0:q.map((U)=>({fileId:U.file_id,filename:U.filename,score:U.score,text:U.text})))!=null?K:null}});continue}if(P.type==="web_search_call"||P.type==="x_search_call"||P.type==="code_interpreter_call"||P.type==="code_execution_call"||P.type==="view_image_call"||P.type==="view_x_video_call"||P.type==="custom_tool_call"||P.type==="mcp_call"){let f=(z=P.name)!=null?z:"";if(m.includes((A=P.name)!=null?A:"")||P.type==="web_search_call")f=$!=null?$:"web_search";else if(I.includes((Y=P.name)!=null?Y:"")||P.type==="x_search_call")f=W!=null?W:"x_search";else if(P.name==="code_execution"||P.type==="code_interpreter_call"||P.type==="code_execution_call")f=H!=null?H:"code_execution";else if(P.type==="mcp_call")f=(X=O!=null?O:P.name)!=null?X:"mcp";let U=P.type==="custom_tool_call"?(Z=P.input)!=null?Z:"":P.type==="mcp_call"?(M=P.arguments)!=null?M:"":(E=P.arguments)!=null?E:"";S.push({type:"tool-call",toolCallId:P.id,toolName:f,input:U,providerExecuted:!0});continue}switch(P.type){case"message":{for(let f of P.content){if(f.text)S.push({type:"text",text:f.text});if(f.annotations){for(let U of f.annotations)if(U.type==="url_citation"&&"url"in U)S.push({type:"source",sourceType:"url",id:this.config.generateId(),url:U.url,title:(F=U.title)!=null?F:U.url})}}break}case"function_call":{h=!0,S.push({type:"tool-call",toolCallId:P.call_id,toolName:P.name,input:P.arguments});break}case"reasoning":{let f=P.summary.map((U)=>U.text).filter((U)=>U&&U.length>0);if(f.length>0){let U=f.join("");if(P.encrypted_content||P.id)S.push({type:"reasoning",text:U,providerMetadata:{xai:{...P.encrypted_content&&{reasoningEncryptedContent:P.encrypted_content},...P.id&&{itemId:P.id}}}});else S.push({type:"reasoning",text:U})}break}default:break}}return{content:S,finishReason:{unified:h?"tool-calls":o(j.status),raw:(B=j.status)!=null?B:void 0},usage:j.usage?ZG(j.usage):{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}},request:{body:R},response:{...JG(j),headers:w,body:y},warnings:N}}async doStream(J){var D;let{args:L,warnings:q,webSearchToolName:K,xSearchToolName:z,codeExecutionToolName:A,mcpToolName:Y,fileSearchToolName:X}=await this.getArgs(J),Z={...L,stream:!0},{responseHeaders:M,value:E}=await u({url:`${(D=this.config.baseURL)!=null?D:"https://api.x.ai/v1"}/responses`,headers:g(this.config.headers(),J.headers),body:Z,failedResponseHandler:r,successfulResponseHandler:YG(eG),abortSignal:J.abortSignal,fetch:this.config.fetch}),F={unified:"other",raw:void 0},B=!1,R=void 0,N=!0,$={},W=new Set,H={},O={},C=this;return{stream:E.pipeThrough(new TransformStream({start(w){w.enqueue({type:"stream-start",warnings:q})},transform(w,j){var y,S,h,m,I,P,f,U,x,zG,VG,LG,UG,HG,MG;if(J.includeRawChunks)j.enqueue({type:"raw",rawValue:w.rawValue});if(!w.success){j.enqueue({type:"error",error:w.error});return}let V=w.value;if(V.type==="response.created"||V.type==="response.in_progress"){if(N)j.enqueue({type:"response-metadata",...JG(V.response)}),N=!1;return}if(V.type==="response.reasoning_summary_part.added"){let Q=`reasoning-${V.item_id}`;O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}})}if(V.type==="response.reasoning_summary_text.delta"){let Q=`reasoning-${V.item_id}`;j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_summary_text.done")return;if(V.type==="response.reasoning_text.delta"){let Q=`reasoning-${V.item_id}`;if(O[V.item_id]==null)O[V.item_id]={},j.enqueue({type:"reasoning-start",id:Q,providerMetadata:{xai:{itemId:V.item_id}}});j.enqueue({type:"reasoning-delta",id:Q,delta:V.delta,providerMetadata:{xai:{itemId:V.item_id}}});return}if(V.type==="response.reasoning_text.done")return;if(V.type==="response.output_text.delta"){let Q=`text-${V.item_id}`;if($[Q]==null)$[Q]={type:"text"},j.enqueue({type:"text-start",id:Q});j.enqueue({type:"text-delta",id:Q,delta:V.delta});return}if(V.type==="response.output_text.done"){if(V.annotations){for(let Q of V.annotations)if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(y=Q.title)!=null?y:Q.url})}return}if(V.type==="response.output_text.annotation.added"){let Q=V.annotation;if(Q.type==="url_citation"&&"url"in Q)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:Q.url,title:(S=Q.title)!=null?S:Q.url});return}if(V.type==="response.done"||V.type==="response.completed"||V.type==="response.incomplete"){let Q=V.response;if(Q.usage)R=ZG(Q.usage);if(V.type==="response.incomplete"){let T="incomplete_details"in Q?(h=Q.incomplete_details)==null?void 0:h.reason:void 0;F={unified:T?o(T):"other",raw:T!=null?T:"incomplete"}}else if("status"in Q&&Q.status)F={unified:B?"tool-calls":o(Q.status),raw:Q.status};return}if(V.type==="response.failed"){let Q=(m=V.response.incomplete_details)==null?void 0:m.reason;if(F={unified:Q?o(Q):"error",raw:Q!=null?Q:"error"},V.response.usage)R=ZG(V.response.usage);return}if(V.type==="error"){j.enqueue({type:"error",error:V});return}if(V.type==="response.custom_tool_call_input.delta"||V.type==="response.custom_tool_call_input.done")return;if(V.type==="response.function_call_arguments.delta"){let Q=H[V.output_index];if(Q!=null)j.enqueue({type:"tool-input-delta",id:Q.toolCallId,delta:V.delta});return}if(V.type==="response.function_call_arguments.done")return;if(V.type==="response.output_item.added"||V.type==="response.output_item.done"){let Q=V.item;if(Q.type==="reasoning"){if(V.type==="response.output_item.done"){let T=`reasoning-${Q.id}`;if(!(Q.id in O))O[Q.id]={},j.enqueue({type:"reasoning-start",id:T,providerMetadata:{xai:{...Q.id&&{itemId:Q.id}}}});j.enqueue({type:"reasoning-end",id:T,providerMetadata:{xai:{...Q.encrypted_content&&{reasoningEncryptedContent:Q.encrypted_content},...Q.id&&{itemId:Q.id}}}}),delete O[Q.id]}return}if(Q.type==="file_search_call"){let T=X!=null?X:"file_search";if(!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:T}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:""}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:T,input:"",providerExecuted:!0});if(V.type==="response.output_item.done")j.enqueue({type:"tool-result",toolCallId:Q.id,toolName:T,result:{queries:(I=Q.queries)!=null?I:[],results:(f=(P=Q.results)==null?void 0:P.map((b)=>({fileId:b.file_id,filename:b.filename,score:b.score,text:b.text})))!=null?f:null}});return}if(Q.type==="web_search_call"||Q.type==="x_search_call"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call"||Q.type==="view_image_call"||Q.type==="view_x_video_call"||Q.type==="custom_tool_call"||Q.type==="mcp_call"){let T=["web_search","web_search_with_snippets","browse_page"],b=["x_user_search","x_keyword_search","x_semantic_search","x_thread_fetch"],n=(U=Q.name)!=null?U:"";if(T.includes((x=Q.name)!=null?x:"")||Q.type==="web_search_call")n=K!=null?K:"web_search";else if(b.includes((zG=Q.name)!=null?zG:"")||Q.type==="x_search_call")n=z!=null?z:"x_search";else if(Q.name==="code_execution"||Q.type==="code_interpreter_call"||Q.type==="code_execution_call")n=A!=null?A:"code_execution";else if(Q.type==="mcp_call")n=(VG=Y!=null?Y:Q.name)!=null?VG:"mcp";let PG=Q.type==="custom_tool_call"?(LG=Q.input)!=null?LG:"":Q.type==="mcp_call"?(UG=Q.arguments)!=null?UG:"":(HG=Q.arguments)!=null?HG:"";if((Q.type==="custom_tool_call"?V.type==="response.output_item.done":!W.has(Q.id))&&!W.has(Q.id))W.add(Q.id),j.enqueue({type:"tool-input-start",id:Q.id,toolName:n}),j.enqueue({type:"tool-input-delta",id:Q.id,delta:PG}),j.enqueue({type:"tool-input-end",id:Q.id}),j.enqueue({type:"tool-call",toolCallId:Q.id,toolName:n,input:PG,providerExecuted:!0});return}if(Q.type==="message")for(let T of Q.content){if(T.text&&T.text.length>0){let b=`text-${Q.id}`;if($[b]==null)$[b]={type:"text"},j.enqueue({type:"text-start",id:b}),j.enqueue({type:"text-delta",id:b,delta:T.text})}if(T.annotations){for(let b of T.annotations)if(b.type==="url_citation"&&"url"in b)j.enqueue({type:"source",sourceType:"url",id:C.config.generateId(),url:b.url,title:(MG=b.title)!=null?MG:b.url})}}else if(Q.type==="function_call"){if(V.type==="response.output_item.added")H[V.output_index]={toolName:Q.name,toolCallId:Q.call_id},j.enqueue({type:"tool-input-start",id:Q.call_id,toolName:Q.name});else if(V.type==="response.output_item.done")B=!0,H[V.output_index]=void 0,j.enqueue({type:"tool-input-end",id:Q.call_id}),j.enqueue({type:"tool-call",toolCallId:Q.call_id,toolName:Q.name,input:Q.arguments})}}},flush(w){for(let[j,y]of Object.entries($))if(y.type==="text")w.enqueue({type:"text-end",id:j});w.enqueue({type:"finish",finishReason:F,usage:R!=null?R:{inputTokens:{total:0,noCache:0,cacheRead:0,cacheWrite:0},outputTokens:{total:0,text:0,reasoning:0}}})}})),request:{body:Z},response:{headers:M}}}},PJ=G.object({output:G.string().describe("the output of the code execution"),error:G.string().optional().describe("any error that occurred")}),EJ=_({id:"xai.code_execution",inputSchema:G.object({}).describe("no input parameters"),outputSchema:PJ}),WJ=(J={})=>EJ(J),BJ=G.object({description:G.string().describe("description of the image"),objects:G.array(G.string()).optional().describe("objects detected in the image")}),FJ=_({id:"xai.view_image",inputSchema:G.object({}).describe("no input parameters"),outputSchema:BJ}),NJ=(J={})=>FJ(J),wJ=G.object({transcript:G.string().optional().describe("transcript of the video"),description:G.string().describe("description of the video content"),duration:G.number().optional().describe("duration in seconds")}),SJ=_({id:"xai.view_x_video",inputSchema:G.object({}).describe("no input parameters"),outputSchema:wJ}),OJ=(J={})=>SJ(J),fJ={codeExecution:WJ,fileSearch:XJ,mcpServer:KJ,viewImage:NJ,viewXVideo:OJ,webSearch:qJ,xSearch:UJ},CJ="3.0.82",a=G.string().min(1),yJ=G.enum(["480p","720p"]),IJ=G.enum(["edit-video","extend-video","reference-to-video"]),e={pollIntervalMs:G.number().positive().nullish(),pollTimeoutMs:G.number().positive().nullish(),resolution:yJ.nullish()},RJ=G.object({...e,mode:G.literal("edit-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),xJ=G.object({...e,mode:G.literal("extend-video"),videoUrl:a,referenceImageUrls:G.undefined().optional()}),TJ=G.object({...e,mode:G.literal("reference-to-video"),referenceImageUrls:G.array(a).min(1).max(7),videoUrl:G.undefined().optional()}),vJ=G.object({...e,mode:G.undefined().optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional()}),IQ=G.union([RJ,xJ,TJ,vJ]),kJ=G.object({mode:IJ.optional(),videoUrl:a.optional(),referenceImageUrls:G.array(a).min(1).max(7).optional(),...e}).passthrough(),bJ=v(()=>k(kJ)),hJ={"1280x720":"720p","854x480":"480p","640x480":"480p"};function _J(J){if((J==null?void 0:J.mode)!=null)return J.mode;if((J==null?void 0:J.videoUrl)!=null)return"edit-video";if((J==null?void 0:J.referenceImageUrls)!=null&&J.referenceImageUrls.length>0)return"reference-to-video";return}var mJ=class{constructor(J,D){this.modelId=J,this.config=D,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate(J){var D,L,q,K,z,A,Y,X,Z,M;let E=(q=(L=(D=this.config._internal)==null?void 0:D.currentDate)==null?void 0:L.call(D))!=null?q:new Date,F=[],B=await p({provider:"xai",providerOptions:J.providerOptions,schema:bJ}),R=_J(B),N=R==="edit-video",$=R==="extend-video",W=R==="reference-to-video";if(J.fps!=null)F.push({type:"unsupported",feature:"fps",details:"xAI video models do not support custom FPS."});if(J.seed!=null)F.push({type:"unsupported",feature:"seed",details:"xAI video models do not support seed."});if(J.n!=null&&J.n>1)F.push({type:"unsupported",feature:"n",details:"xAI video models do not support generating multiple videos per call. Only 1 video will be generated."});if(N&&J.duration!=null)F.push({type:"unsupported",feature:"duration",details:"xAI video editing does not support custom duration."});if(N&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video editing does not support custom aspect ratio."});if(N&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video editing does not support custom resolution."});if($&&J.aspectRatio!=null)F.push({type:"unsupported",feature:"aspectRatio",details:"xAI video extension does not support custom aspect ratio."});if($&&((B==null?void 0:B.resolution)!=null||J.resolution!=null))F.push({type:"unsupported",feature:"resolution",details:"xAI video extension does not support custom resolution."});let H={model:this.modelId,prompt:J.prompt},O=!N,C=!N&&!$,w=!N&&!$;if(O&&J.duration!=null)H.duration=J.duration;if(C&&J.aspectRatio!=null)H.aspect_ratio=J.aspectRatio;if(w&&(B==null?void 0:B.resolution)!=null)H.resolution=B.resolution;else if(w&&J.resolution!=null){let U=hJ[J.resolution];if(U!=null)H.resolution=U;else F.push({type:"unsupported",feature:"resolution",details:`Unrecognized resolution "${J.resolution}". Use providerOptions.xai.resolution with "480p" or "720p" instead.`})}if(N)H.video={url:B.videoUrl};if($)H.video={url:B.videoUrl};if(J.image!=null)if(J.image.type==="url")H.image={url:J.image.url};else{let U=typeof J.image.data==="string"?J.image.data:wG(J.image.data);H.image={url:`data:${J.image.mediaType};base64,${U}`}}if(W)H.reference_images=B.referenceImageUrls.map((U)=>({url:U}));if(B!=null){for(let[U,x]of Object.entries(B))if(!["mode","pollIntervalMs","pollTimeoutMs","resolution","videoUrl","referenceImageUrls"].includes(U))H[U]=x}let j=(K=this.config.baseURL)!=null?K:"https://api.x.ai/v1",y;if(N)y=`${j}/videos/edits`;else if($)y=`${j}/videos/extensions`;else y=`${j}/videos/generations`;let{value:S}=await u({url:y,headers:g(this.config.headers(),J.headers),body:H,failedResponseHandler:r,successfulResponseHandler:d(gJ),abortSignal:J.abortSignal,fetch:this.config.fetch}),h=S.request_id;if(!h)throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:`No request_id returned from xAI API. Response: ${JSON.stringify(S)}`});let m=(z=B==null?void 0:B.pollIntervalMs)!=null?z:5000,I=(A=B==null?void 0:B.pollTimeoutMs)!=null?A:600000,P=Date.now(),f;while(!0){if(await FG(m,{abortSignal:J.abortSignal}),Date.now()-P>I)throw new l({name:"XAI_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${I}ms`});let{value:U,responseHeaders:x}=await XG({url:`${j}/videos/${h}`,headers:g(this.config.headers(),J.headers),successfulResponseHandler:d(uJ),failedResponseHandler:r,abortSignal:J.abortSignal,fetch:this.config.fetch});if(f=x,U.status==="done"||U.status==null&&((Y=U.video)==null?void 0:Y.url)){if(((X=U.video)==null?void 0:X.respect_moderation)===!1)throw new l({name:"XAI_VIDEO_MODERATION_ERROR",message:"Video generation was blocked due to a content policy violation."});if(!((Z=U.video)==null?void 0:Z.url))throw new l({name:"XAI_VIDEO_GENERATION_ERROR",message:"Video generation completed but no video URL was returned."});return{videos:[{type:"url",url:U.video.url,mediaType:"video/mp4"}],warnings:F,response:{timestamp:E,modelId:this.modelId,headers:f},providerMetadata:{xai:{requestId:h,videoUrl:U.video.url,...U.video.duration!=null?{duration:U.video.duration}:{},...((M=U.usage)==null?void 0:M.cost_in_usd_ticks)!=null?{costInUsdTicks:U.usage.cost_in_usd_ticks}:{},...U.progress!=null?{progress:U.progress}:{}}}}}if(U.status==="expired")throw new l({name:"XAI_VIDEO_GENERATION_EXPIRED",message:"Video generation request expired."});if(U.status==="failed")throw new l({name:"XAI_VIDEO_GENERATION_FAILED",message:"Video generation failed."})}}},gJ=G.object({request_id:G.string().nullish()}),uJ=G.object({status:G.string().nullish(),video:G.object({url:G.string(),duration:G.number().nullish(),respect_moderation:G.boolean().nullish()}).nullish(),model:G.string().nullish(),usage:G.object({cost_in_usd_ticks:G.number().nullish()}).nullish(),progress:G.number().nullish(),error:G.object({code:G.string().nullish(),message:G.string().nullish()}).nullish()});function dJ(J={}){var D;let L=xG((D=J.baseURL)!=null?D:"https://api.x.ai/v1"),q=()=>OG({Authorization:`Bearer ${fG({apiKey:J.apiKey,environmentVariableName:"XAI_API_KEY",description:"xAI API key"})}`,...J.headers},`ai-sdk/xai/${CJ}`),K=(Z)=>{return new cG(Z,{provider:"xai.chat",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},z=(Z)=>{return new MJ(Z,{provider:"xai.responses",baseURL:L,headers:q,generateId:$G,fetch:J.fetch})},A=(Z)=>{return new aG(Z,{provider:"xai.image",baseURL:L,headers:q,fetch:J.fetch})},Y=(Z)=>{return new mJ(Z,{provider:"xai.video",baseURL:L,headers:q,fetch:J.fetch})},X=(Z)=>K(Z);return X.specificationVersion="v3",X.languageModel=K,X.chat=K,X.responses=z,X.embeddingModel=(Z)=>{throw new BG({modelId:Z,modelType:"embeddingModel"})},X.textEmbeddingModel=X.embeddingModel,X.imageModel=A,X.image=A,X.videoModel=Y,X.video=Y,X.tools=fJ,X}var RQ=dJ();export{fJ as xaiTools,RQ as xai,UJ as xSearch,qJ as webSearch,OJ as viewXVideo,NJ as viewImage,KJ as mcpServer,dJ as createXai,WJ as codeExecution,CJ as VERSION};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ae as c,Be as d,Ce as e,De as f,Ee as g,ye as a,ze as b}from"./chunk-q26s0wb5.js";import"./chunk-ccdjzn2m.js";import"./chunk-dp6ms01y.js";import"./chunk-2fbkw84y.js";import"./chunk-djfrkbd5.js";export{g as fromEnv,c as ENV_SESSION,b as ENV_SECRET,a as ENV_KEY,d as ENV_EXPIRATION,e as ENV_CREDENTIAL_SCOPE,f as ENV_ACCOUNT_ID};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":"\u8F93\u5165\u6D88\u606F...(\u8F93\u5165/\u5524\u8D77\u547D\u4EE4)","tui.prompt.placeholder.shell":'\u6267\u884C\u547D\u4EE4\u2026\u2026 "{{example}}"',"tui.prompt.ghost":"{{prediction}} (\u6309 Tab \u91C7\u7EB3)","tui.home.placeholder.example.todo":"\u4FEE\u590D\u4EE3\u7801\u5E93\u4E2D\u7684 TODO","tui.home.placeholder.example.stack":"\u8FD9\u4E2A\u9879\u76EE\u7528\u4E86\u4EC0\u4E48\u6280\u672F\u6808\uFF1F","tui.home.placeholder.example.tests":"\u4FEE\u590D\u5931\u8D25\u7684\u6D4B\u8BD5","tui.home.agreement.prefix":"\u4F7F\u7528 QitQode \u5373\u8868\u793A\u4F60\u540C\u610F\u6211\u4EEC\u7684","tui.home.agreement.terms":"\u670D\u52A1\u534F\u8BAE","tui.home.agreement.separator":"\u548C","tui.home.agreement.privacy":"\u9690\u79C1\u653F\u7B56","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"\u6DFB\u52A0\u6587\u4EF6","tui.prompt.hint.subagent":"\u5B50\u667A\u80FD\u4F53","tui.prompt.hint.commands":"\u5524\u8D77\u547D\u4EE4","tui.prompt.hint.switch_mode":"\u5207\u6362\u6A21\u5F0F","tui.prompt.hint.settings":"\u8BBE\u7F6E","tui.tips.label":"\u63D0\u793A","tui.tips.plain_terminal":"\u63A8\u8350\u4F7F\u7528iTerm\u6216vscode\u7EC8\u7AEF","tui.tips.attach_file":"\u8F93\u5165 {highlight}@{/highlight} \u540E\u63A5\u6587\u4EF6\u540D\u4EE5\u6A21\u7CCA\u641C\u7D22\u5E76\u9644\u52A0\u6587\u4EF6","tui.tips.shell_prefix":"\u4EE5 {highlight}!{/highlight} \u5F00\u5934\u53EF\u76F4\u63A5\u8FD0\u884C shell \u547D\u4EE4\uFF08\u4F8B\u5982 {highlight}!ls -la{/highlight}\uFF09","tui.tips.tab_agent":"\u6309 {highlight}Tab{/highlight} \u6216 {highlight}Shift+Tab{/highlight} \u5728 Build / Plan / Compose \u667A\u80FD\u4F53\u4E4B\u95F4\u5207\u6362","tui.tips.theme_mode":"\u8FD0\u884C {highlight}/dark{/highlight} \u5207\u6362\u5230\u6DF1\u8272\u6A21\u5F0F\uFF0C{highlight}/light{/highlight} \u5207\u6362\u5230\u6D45\u8272\u6A21\u5F0F","tui.tips.doc":"\u8FD0\u884C {highlight}/doc{/highlight} \u6253\u5F00\u4F7F\u7528\u6587\u6863","tui.tips.undo":"\u4F7F\u7528 {highlight}/undo{/highlight} \u64A4\u9500\u6700\u540E\u4E00\u6761\u6D88\u606F\u53CA\u5176\u6587\u4EF6\u6539\u52A8","tui.tips.redo":"\u4F7F\u7528 {highlight}/redo{/highlight} \u6062\u590D\u4E4B\u524D\u64A4\u9500\u7684\u6D88\u606F\u548C\u6587\u4EF6\u6539\u52A8","tui.tips.drag_drop":"\u628A\u56FE\u7247\u6216 PDF \u62D6\u5165\u7EC8\u7AEF\u53EF\u4F5C\u4E3A\u4E0A\u4E0B\u6587\u6DFB\u52A0","tui.tips.paste_image":"\u6309 {highlight}Ctrl+V{/highlight} \u628A\u526A\u8D34\u677F\u4E2D\u7684\u56FE\u7247\u7C98\u8D34\u5230\u63D0\u793A\u6846","tui.tips.editor":"\u6309 {highlight}Ctrl+X E{/highlight} \u6216 {highlight}/editor{/highlight} \u5728\u5916\u90E8\u7F16\u8F91\u5668\u4E2D\u7F16\u8F91\u6D88\u606F","tui.tips.init":"\u8FD0\u884C {highlight}/init{/highlight} \u57FA\u4E8E\u4F60\u7684\u4EE3\u7801\u5E93\u81EA\u52A8\u751F\u6210\u9879\u76EE\u89C4\u5219","tui.tips.models":"\u8FD0\u884C {highlight}/models{/highlight} \u6216 {highlight}Ctrl+X M{/highlight} \u5207\u6362\u6A21\u578B","tui.tips.theme":'\u5728\u547D\u4EE4\u9762\u677F\uFF08{highlight}Ctrl+P{/highlight}\uFF09\u4E2D\u641C\u7D22 "lock" \u53EF\u9501\u5B9A\u4E3B\u9898\u6A21\u5F0F\uFF0C\u4F7F\u5176\u4E0D\u968F\u7EC8\u7AEF\u80CC\u666F\u53D8\u5316',"tui.tips.new_session":"\u6309 {highlight}Ctrl+X N{/highlight} \u6216 {highlight}/new{/highlight} \u5F00\u542F\u5168\u65B0\u4F1A\u8BDD","tui.tips.sessions":"\u4F7F\u7528 {highlight}/sessions{/highlight} \u6216 {highlight}Ctrl+X L{/highlight} \u5217\u51FA\u5E76\u7EE7\u7EED\u4E4B\u524D\u7684\u4F1A\u8BDD","tui.tips.compact":"\u8FD0\u884C {highlight}/compact{/highlight} \u5728\u63A5\u8FD1\u4E0A\u4E0B\u6587\u4E0A\u9650\u65F6\u538B\u7F29\u957F\u4F1A\u8BDD","tui.tips.export":"\u6309 {highlight}Ctrl+X X{/highlight} \u6216 {highlight}/export{/highlight} \u628A\u4F1A\u8BDD\u4FDD\u5B58\u4E3A Markdown","tui.tips.copy_last":"\u6309 {highlight}Ctrl+X Y{/highlight} \u628A\u52A9\u624B\u6700\u540E\u4E00\u6761\u6D88\u606F\u590D\u5236\u5230\u526A\u8D34\u677F","tui.tips.command_palette":"\u6309 {highlight}Ctrl+P{/highlight} \u67E5\u770B\u6240\u6709\u53EF\u7528\u52A8\u4F5C\u548C\u547D\u4EE4","tui.tips.leader":"\u524D\u5BFC\u952E\u662F {highlight}Ctrl+X{/highlight}\uFF0C\u642D\u914D\u5176\u4ED6\u952E\u53EF\u5FEB\u901F\u89E6\u53D1\u52A8\u4F5C","tui.tips.f2":"\u6309 {highlight}F2{/highlight} \u5728\u6700\u8FD1\u4F7F\u7528\u7684\u6A21\u578B\u4E4B\u95F4\u5FEB\u901F\u5207\u6362","tui.tips.sidebar":"\u6309 {highlight}Ctrl+X B{/highlight} \u663E\u793A/\u9690\u85CF\u4FA7\u680F","tui.tips.history":"\u7528 {highlight}PageUp{/highlight}/{highlight}PageDown{/highlight} \u6D4F\u89C8\u4F1A\u8BDD\u5386\u53F2","tui.tips.jump_first":"\u6309 {highlight}Ctrl+G{/highlight} \u6216 {highlight}Home{/highlight} \u8DF3\u5230\u4F1A\u8BDD\u5F00\u5934","tui.tips.jump_last":"\u6309 {highlight}Ctrl+Alt+G{/highlight} \u6216 {highlight}End{/highlight} \u8DF3\u5230\u6700\u65B0\u6D88\u606F","tui.tips.newline":"\u6309 {highlight}Shift+Enter{/highlight} \u6216 {highlight}Ctrl+J{/highlight} \u5728\u63D0\u793A\u6846\u6362\u884C","tui.tips.clear_input":"\u8F93\u5165\u65F6\u6309 {highlight}Ctrl+C{/highlight} \u6E05\u7A7A\u8F93\u5165\u6846","tui.tips.escape":"\u6309 {highlight}Escape{/highlight} \u5728\u54CD\u5E94\u4E2D\u9014\u6253\u65AD AI","tui.tips.plan_agent":"\u5207\u6362\u5230 {highlight}Plan{/highlight} \u667A\u80FD\u4F53\u4EE5\u83B7\u53D6\u5EFA\u8BAE\u800C\u4E0D\u5B9E\u9645\u6539\u52A8","tui.tips.subagent":"\u5728\u63D0\u793A\u8BCD\u4E2D\u4F7F\u7528 {highlight}@agent-name{/highlight} \u8C03\u7528\u4E13\u7528\u5B50\u667A\u80FD\u4F53","tui.tips.cycle_sessions":"\u6309 {highlight}Ctrl+X Right/Left{/highlight} \u5728\u7236\u5B50\u4F1A\u8BDD\u4E4B\u95F4\u5207\u6362","tui.tips.config_files":"\u521B\u5EFA {highlight}qitqode.json{/highlight} \u7528\u4E8E\u670D\u52A1\u7AEF\u914D\u7F6E\uFF0C{highlight}tui.json{/highlight} \u7528\u4E8E TUI \u914D\u7F6E","tui.tips.global_config":"\u628A TUI \u914D\u7F6E\u653E\u5728 {highlight}~/.config/qitqode/tui.json{/highlight} \u4F5C\u4E3A\u5168\u5C40\u914D\u7F6E","tui.tips.schema":"\u5728\u914D\u7F6E\u4E2D\u52A0\u5165 {highlight}$schema{/highlight} \u4EE5\u4FBF\u7F16\u8F91\u5668\u81EA\u52A8\u8865\u5168","tui.tips.default_model":"\u5728\u914D\u7F6E\u91CC\u8BBE\u7F6E {highlight}model{/highlight} \u6765\u6307\u5B9A\u9ED8\u8BA4\u6A21\u578B","tui.tips.keybinds":"\u901A\u8FC7 {highlight}tui.json{/highlight} \u7684 {highlight}keybinds{/highlight} \u90E8\u5206\u8986\u76D6\u4EFB\u610F\u6309\u952E","tui.tips.disable_keybind":"\u628A\u4EFB\u610F\u6309\u952E\u8BBE\u4E3A {highlight}none{/highlight} \u5373\u53EF\u5B8C\u5168\u7981\u7528\u5B83","tui.tips.mcp_config":"\u5728 {highlight}mcp{/highlight} \u914D\u7F6E\u9879\u4E2D\u914D\u7F6E\u672C\u5730\u6216\u8FDC\u7A0B MCP \u670D\u52A1\u5668","tui.tips.mcp_oauth":"QitQode \u81EA\u52A8\u5904\u7406\u9700\u8981\u9274\u6743\u7684\u8FDC\u7A0B MCP \u670D\u52A1\u5668\u7684 OAuth","tui.tips.custom_command":"\u5728 {highlight}.qitqode/command/{/highlight} \u6DFB\u52A0 {highlight}.md{/highlight} \u6587\u4EF6\u4EE5\u5B9A\u4E49\u53EF\u590D\u7528\u81EA\u5B9A\u4E49\u63D0\u793A","tui.tips.command_args":"\u5728\u81EA\u5B9A\u4E49\u547D\u4EE4\u4E2D\u4F7F\u7528 {highlight}$ARGUMENTS{/highlight}\u3001{highlight}$1{/highlight}\u3001{highlight}$2{/highlight} \u63A5\u6536\u52A8\u6001\u53C2\u6570","tui.tips.command_backticks":"\u5728\u547D\u4EE4\u4E2D\u4F7F\u7528\u53CD\u5F15\u53F7\u6CE8\u5165 shell \u8F93\u51FA\uFF08\u4F8B\u5982 {highlight}`git status`{/highlight}\uFF09","tui.tips.custom_agent":"\u5728 {highlight}.qitqode/agent/{/highlight} \u6DFB\u52A0 {highlight}.md{/highlight} \u6587\u4EF6\u6765\u521B\u5EFA\u4E13\u7528 AI \u89D2\u8272","tui.tips.agent_perms":"\u4E3A\u6BCF\u4E2A\u667A\u80FD\u4F53\u5355\u72EC\u914D\u7F6E {highlight}edit{/highlight}\u3001{highlight}bash{/highlight}\u3001{highlight}webfetch{/highlight} \u5DE5\u5177\u6743\u9650","tui.tips.bash_allow":'\u4F7F\u7528 {highlight}"git *": "allow"{/highlight} \u8FD9\u7C7B\u6A21\u5F0F\u505A\u7CBE\u7EC6 bash \u6743\u9650',"tui.tips.bash_deny":'\u8BBE\u7F6E {highlight}"rm -rf *": "deny"{/highlight} \u963B\u6B62\u7834\u574F\u6027\u547D\u4EE4',"tui.tips.bash_ask":'\u914D\u7F6E {highlight}"git push": "ask"{/highlight} \u5728\u63A8\u9001\u524D\u8981\u6C42\u786E\u8BA4',"tui.tips.formatter":"QitQode \u81EA\u52A8\u4F7F\u7528 prettier\u3001gofmt\u3001ruff \u7B49\u683C\u5F0F\u5316\u6587\u4EF6","tui.tips.disable_formatter":'\u5728\u914D\u7F6E\u4E2D\u8BBE\u7F6E {highlight}"formatter": false{/highlight} \u5173\u95ED\u6240\u6709\u81EA\u52A8\u683C\u5F0F\u5316',"tui.tips.custom_formatter":"\u5728\u914D\u7F6E\u4E2D\u6309\u6587\u4EF6\u540E\u7F00\u5B9A\u4E49\u81EA\u5B9A\u4E49\u683C\u5F0F\u5316\u547D\u4EE4","tui.tips.lsp":"QitQode \u4F7F\u7528 LSP \u670D\u52A1\u5668\u8FDB\u884C\u667A\u80FD\u4EE3\u7801\u5206\u6790","tui.tips.custom_tool":"\u5728 {highlight}.qitqode/tools/{/highlight} \u521B\u5EFA {highlight}.ts{/highlight} \u6587\u4EF6\u5B9A\u4E49\u65B0\u7684 LLM \u5DE5\u5177","tui.tips.tool_scripts":"\u5DE5\u5177\u5B9A\u4E49\u53EF\u4EE5\u8C03\u7528 Python\u3001Go \u7B49\u811A\u672C","tui.tips.plugins":"\u5728 {highlight}.qitqode/plugin/{/highlight} \u6DFB\u52A0 {highlight}.ts{/highlight} \u6587\u4EF6\u6302\u63A5\u4E8B\u4EF6\u94A9\u5B50","tui.tips.plugin_notify":"\u7528\u63D2\u4EF6\u5728\u4F1A\u8BDD\u5B8C\u6210\u65F6\u53D1\u9001\u7CFB\u7EDF\u901A\u77E5","tui.tips.plugin_protect":"\u5199\u4E00\u4E2A\u63D2\u4EF6\u963B\u6B62 QitQode \u8BFB\u53D6\u654F\u611F\u6587\u4EF6","tui.tips.run":"\u7528 {highlight}qitqode run{/highlight} \u8FDB\u884C\u975E\u4EA4\u4E92\u5F0F\u811A\u672C\u8C03\u7528","tui.tips.continue":"\u7528 {highlight}qitqode --continue{/highlight} \u7EE7\u7EED\u4E0A\u4E00\u4E2A\u4F1A\u8BDD","tui.tips.attach_cli":"\u7528 {highlight}qitqode run -f file.ts{/highlight} \u901A\u8FC7\u547D\u4EE4\u884C\u9644\u52A0\u6587\u4EF6","tui.tips.format_json":"\u7528 {highlight}--format json{/highlight} \u5728\u811A\u672C\u4E2D\u83B7\u5F97\u673A\u5668\u53EF\u8BFB\u8F93\u51FA","tui.tips.auth_list":"\u8FD0\u884C {highlight}qitqode auth status{/highlight} \u67E5\u770B\u5F53\u524D\u767B\u5F55\u72B6\u6001","tui.tips.agent_create":"\u8FD0\u884C {highlight}qitqode agent create{/highlight} \u5F15\u5BFC\u5F0F\u521B\u5EFA\u667A\u80FD\u4F53","tui.tips.theme_system":'\u4F7F\u7528 {highlight}"theme": "system"{/highlight} \u8DDF\u968F\u7EC8\u7AEF\u914D\u8272',"tui.tips.theme_files":"\u5728 {highlight}.qitqode/themes/{/highlight} \u76EE\u5F55\u4E0B\u521B\u5EFA JSON \u4E3B\u9898\u6587\u4EF6","tui.tips.theme_variants":"\u4E3B\u9898\u652F\u6301\u6DF1\u8272/\u6D45\u8272\u53CC\u6A21\u5F0F\u53D8\u4F53","tui.tips.theme_ansi":"\u81EA\u5B9A\u4E49\u4E3B\u9898\u4E2D\u53EF\u5F15\u7528 ANSI 0-255 \u8272\u53F7","tui.tips.env_var":"\u5728\u914D\u7F6E\u4E2D\u7528 {highlight}{env:VAR_NAME}{/highlight} \u8BED\u6CD5\u5F15\u7528\u73AF\u5883\u53D8\u91CF","tui.tips.file_var":"\u7528 {highlight}{file:path}{/highlight} \u5728\u914D\u7F6E\u503C\u4E2D\u5D4C\u5165\u6587\u4EF6\u5185\u5BB9","tui.tips.instructions":"\u5728\u914D\u7F6E\u4E2D\u7528 {highlight}instructions{/highlight} \u52A0\u8F7D\u989D\u5916\u7684\u89C4\u5219\u6587\u4EF6","tui.tips.temperature":"\u628A\u667A\u80FD\u4F53\u7684 {highlight}temperature{/highlight} \u4ECE 0.0\uFF08\u4E13\u6CE8\uFF09\u8C03\u5230 1.0\uFF08\u521B\u9020\uFF09","tui.tips.steps":"\u914D\u7F6E {highlight}steps{/highlight} \u9650\u5236\u6BCF\u6B21\u8BF7\u6C42\u7684\u667A\u80FD\u4F53\u8FED\u4EE3\u6B21\u6570","tui.tips.disable_tool":'\u8BBE\u7F6E {highlight}"tools": {"bash": false}{/highlight} \u7981\u7528\u5177\u4F53\u5DE5\u5177',"tui.tips.disable_mcp_tools":'\u8BBE\u7F6E {highlight}"mcp_*": false{/highlight} \u7981\u7528\u67D0\u4E2A MCP \u670D\u52A1\u5668\u7684\u6240\u6709\u5DE5\u5177',"tui.tips.tool_override":"\u5728\u6BCF\u4E2A\u667A\u80FD\u4F53\u914D\u7F6E\u4E2D\u8986\u76D6\u5168\u5C40\u5DE5\u5177\u8BBE\u7F6E","tui.tips.doom_loop":"\u6743\u9650 {highlight}doom_loop{/highlight} \u9632\u6B62\u5DE5\u5177\u8C03\u7528\u9677\u5165\u6B7B\u5FAA\u73AF","tui.tips.external_dir":"\u6743\u9650 {highlight}external_directory{/highlight} \u4FDD\u62A4\u9879\u76EE\u5916\u90E8\u7684\u6587\u4EF6","tui.tips.debug_config":"\u8FD0\u884C {highlight}qitqode debug config{/highlight} \u6392\u67E5\u914D\u7F6E\u95EE\u9898","tui.tips.print_logs":"\u4F7F\u7528 {highlight}--print-logs{/highlight} \u6807\u5FD7\u5728 stderr \u8F93\u51FA\u8BE6\u7EC6\u65E5\u5FD7","tui.tips.timeline":"\u6309 {highlight}Ctrl+X G{/highlight} \u6216 {highlight}/timeline{/highlight} \u8DF3\u5230\u6307\u5B9A\u6D88\u606F","tui.tips.toggle_code":"\u6309 {highlight}Ctrl+X H{/highlight} \u5207\u6362\u6D88\u606F\u4E2D\u4EE3\u7801\u5757\u7684\u663E\u793A","tui.tips.status":"\u6309 {highlight}Ctrl+X S{/highlight} \u6216 {highlight}/status{/highlight} \u67E5\u770B\u7CFB\u7EDF\u72B6\u6001","tui.tips.scroll_accel":"\u5728 {highlight}tui.json{/highlight} \u4E2D\u5F00\u542F {highlight}scroll_acceleration{/highlight} \u4EAB\u53D7\u5E73\u6ED1\u6EDA\u52A8","tui.tips.agents_md":"\u628A\u9879\u76EE\u91CC\u7684 {highlight}AGENTS.md{/highlight} \u63D0\u4EA4\u5230 Git \u4E0E\u56E2\u961F\u5171\u4EAB","tui.tips.review":"\u7528 {highlight}/review{/highlight} \u5BA1\u9605\u672A\u63D0\u4EA4\u6539\u52A8\u3001\u5206\u652F\u6216 PR","tui.tips.help":"\u8FD0\u884C {highlight}/help{/highlight} \u6216 {highlight}Ctrl+X H{/highlight} \u663E\u793A\u5E2E\u52A9\u5BF9\u8BDD\u6846","tui.tips.rename":"\u7528 {highlight}/rename{/highlight} \u91CD\u547D\u540D\u5F53\u524D\u4F1A\u8BDD","tui.tips.suspend.unix":"\u6309 {highlight}Ctrl+Z{/highlight} \u6302\u8D77\u7EC8\u7AEF\u5E76\u8FD4\u56DE shell","tui.tips.suspend.win":"\u6309 {highlight}Ctrl+Z{/highlight} \u64A4\u9500\u63D0\u793A\u6846\u4E2D\u7684\u8F93\u5165","tui.command.palette.title":"\u547D\u4EE4","tui.command.palette.suggested":"\u63A8\u8350","tui.command.category.session":"\u4F1A\u8BDD","tui.command.category.agent":"\u667A\u80FD\u4F53","tui.command.category.provider":"\u670D\u52A1\u5546","tui.command.category.system":"\u7CFB\u7EDF","tui.command.category.prompt":"\u63D0\u793A\u6846","tui.command.category.internal":"\u5185\u7F6E","tui.command.category.external":"\u7B2C\u4E09\u65B9","tui.slash.init.description":"\u5F15\u5BFC\u5F0F AGENTS.md \u8BBE\u7F6E","tui.slash.review.description":"\u5BA1\u67E5\u53D8\u66F4 [commit|branch|pr]\uFF0C\u9ED8\u8BA4\u672A\u63D0\u4EA4\u7684\u53D8\u66F4","tui.slash.dream.description":"\u4ECE memory \u6587\u4EF6\u4E0E\u539F\u59CB\u8F68\u8FF9\u4E2D\u624B\u52A8\u6574\u5408\u9879\u76EE\u8BB0\u5FC6","tui.slash.distill.description":"\u5728\u6700\u8FD1\u5DE5\u4F5C\u4E2D\u53D1\u73B0\u91CD\u590D\u6D41\u7A0B\uFF0C\u6253\u5305\u4E3A skill\u3001\u5B50\u667A\u80FD\u4F53\u6216\u547D\u4EE4","tui.slash.goal.description":"\u8BBE\u7F6E\u7EC8\u6B62\u6761\u4EF6\u76EE\u6807\uFF1B\u8FD0\u884C\u76F4\u5230\u5224\u5B9A\u8FBE\u6210\u3002\u4F7F\u7528 /goal clear \u4E2D\u6B62","tui.slash.deep-research.description":"\u6DF1\u5EA6\u591A\u6765\u6E90\u3001\u4E8B\u5B9E\u6838\u67E5\u7684\u7814\u7A76\u62A5\u544A\uFF08\u8FD0\u884C deep-research \u5DE5\u4F5C\u6D41\uFF09","tui.command.language.switch.title":"\u5207\u6362\u8BED\u8A00","tui.command.language.switch.description":"\u66F4\u6539\u663E\u793A\u8BED\u8A00","tui.command.language.dialog.title":"\u5207\u6362\u8BED\u8A00","tui.language.auto":"\u81EA\u52A8\uFF08\u8DDF\u968F\u7CFB\u7EDF\uFF09","tui.language.current":"\u5F53\u524D","tui.command.session.list.title":"\u5207\u6362\u4F1A\u8BDD","tui.command.session.new.title":"\u65B0\u5EFA\u4F1A\u8BDD","tui.command.workflow.list.title":"\u5DE5\u4F5C\u6D41","tui.command.model.list.title":"\u5207\u6362\u6A21\u578B","tui.command.model.cycle_recent.title":"\u5FAA\u73AF\u5207\u6362\u6A21\u578B","tui.command.model.cycle_recent_reverse.title":"\u53CD\u5411\u5FAA\u73AF\u5207\u6362\u6A21\u578B","tui.command.model.cycle_favorite.title":"\u5FAA\u73AF\u5207\u6362\u6536\u85CF\u6A21\u578B","tui.command.model.cycle_favorite_reverse.title":"\u53CD\u5411\u5FAA\u73AF\u5207\u6362\u6536\u85CF\u6A21\u578B","tui.command.agent.list.title":"\u5207\u6362\u667A\u80FD\u4F53","tui.command.mcp.list.title":"\u5207\u6362 MCP","tui.command.never_ask.title_on":"\u8DF3\u8FC7\u63D0\u95EE\uFF1A\u5DF2\u5F00\u542F\uFF08\u81EA\u52A8\u51B3\u7B56\uFF0C\u6743\u9650\u8BF7\u6C42\u9664\u5916\uFF09 - \u70B9\u51FB\u5173\u95ED","tui.command.never_ask.title_off":"\u8DF3\u8FC7\u63D0\u95EE\uFF1A\u5DF2\u5173\u95ED - \u70B9\u51FB\u5F00\u542F\uFF08\u81EA\u52A8\u51B3\u7B56\uFF0C\u6743\u9650\u8BF7\u6C42\u9664\u5916\uFF09","tui.command.never_ask.toast_on":"\u5DF2\u5F00\u542F\u8DF3\u8FC7\u63D0\u95EE \u2014 \u6211\u4E0D\u4F1A\u518D\u5411\u4F60\u63D0\u95EE\uFF0C\u4F1A\u81EA\u884C\u9009\u62E9\u6700\u4F73\u9009\u9879\uFF0C\u76F4\u5230\u4F60\u5173\u95ED\uFF08/never-ask\uFF09\u3002\u6743\u9650\u8BF7\u6C42\u4ECD\u9700\u4F60\u786E\u8BA4\u3002","tui.command.never_ask.toast_off":"\u5DF2\u5173\u95ED\u8DF3\u8FC7\u63D0\u95EE \u2014 \u9047\u5230\u51B3\u7B56\u70B9\u6211\u4F1A\u91CD\u65B0\u5411\u4F60\u63D0\u95EE\u3002","tui.command.never_ask.title_on_fullauto":"\u8DF3\u8FC7\u63D0\u95EE\uFF1A\u5DF2\u5F00\u542F\uFF08\u81EA\u52A8\u51B3\u7B56\uFF1B\u5168\u81EA\u52A8\u6A21\u5F0F\u540C\u65F6\u81EA\u52A8\u6279\u51C6\u6743\u9650\uFF09 - \u70B9\u51FB\u5173\u95ED","tui.command.never_ask.title_off_fullauto":"\u8DF3\u8FC7\u63D0\u95EE\uFF1A\u5DF2\u5173\u95ED - \u70B9\u51FB\u5F00\u542F\uFF08\u81EA\u52A8\u51B3\u7B56\uFF1B\u5168\u81EA\u52A8\u6A21\u5F0F\u4ECD\u5728\u81EA\u52A8\u6279\u51C6\u6743\u9650\uFF09","tui.command.never_ask.toast_on_fullauto":"\u5DF2\u5F00\u542F\u8DF3\u8FC7\u63D0\u95EE \u2014 \u6211\u4E0D\u4F1A\u518D\u5411\u4F60\u63D0\u95EE\uFF0C\u4F1A\u81EA\u884C\u9009\u62E9\u6700\u4F73\u9009\u9879\uFF0C\u76F4\u5230\u4F60\u5173\u95ED\uFF08/never-ask\uFF09\u3002\u5168\u81EA\u52A8\u6A21\u5F0F\u5DF2\u5F00\u542F\uFF0C\u5DE5\u5177\u6743\u9650\u8BF7\u6C42\u4E5F\u4F1A\u81EA\u52A8\u6279\u51C6\u3002","tui.command.agent.cycle.title":"\u5FAA\u73AF\u5207\u6362\u667A\u80FD\u4F53","tui.command.variant.cycle.title":"\u5FAA\u73AF\u5207\u6362\u6A21\u578B\u53D8\u4F53","tui.command.variant.list.title":"\u5207\u6362\u6A21\u578B\u53D8\u4F53","tui.command.agent.cycle.reverse.title":"\u53CD\u5411\u5FAA\u73AF\u5207\u6362\u667A\u80FD\u4F53","tui.command.provider.login.title":"\u767B\u5F55","tui.command.provider.logout.title":"\u767B\u51FA","tui.command.console.org.switch.title":"\u5207\u6362\u7EC4\u7EC7","tui.command.qitqode.status.title":"\u67E5\u770B\u72B6\u6001","tui.command.worktree.list.title":"\u5DE5\u4F5C\u6811","tui.command.theme.switch.title":"\u5207\u6362\u4E3B\u9898","tui.command.theme.switch_mode.to_light":"\u5207\u6362\u5230\u6D45\u8272\u6A21\u5F0F","tui.command.theme.switch_mode.to_dark":"\u5207\u6362\u5230\u6DF1\u8272\u6A21\u5F0F","tui.command.theme.mode.unlock":"\u89E3\u9501\u4E3B\u9898\u6A21\u5F0F","tui.command.theme.mode.lock":"\u9501\u5B9A\u4E3B\u9898\u6A21\u5F0F","tui.command.help.show.title":"\u5E2E\u52A9","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"\u65E0\u969C\u788D:\u53EF\u5728\u547D\u4EE4\u5217\u8868\u4E2D\u5207\u6362\u52A8\u753B\u548C\u58F0\u97F3\u3002\u73AF\u5883\u53D8\u91CF:NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND\u3002","tui.dialog.help.announcements":"\u64AD\u62A5:\u5728\u65E0\u969C\u788D\u6A21\u5F0F\u4E0B,\u53EF\u901A\u8FC7\u547D\u4EE4\u5217\u8868\u6216 QITQODE_TUI_ANNOUNCEMENTS \u9009\u62E9\u5C4F\u5E55\u9605\u8BFB\u5668\u64AD\u62A5\u7684\u8BE6\u7EC6\u7A0B\u5EA6(\u5B89\u9759\u3001\u6B63\u5E38\u3001\u8BE6\u7EC6)\u3002\u9519\u8BEF\u59CB\u7EC8\u4F1A\u64AD\u62A5\u3002","tui.dialog.help.dialog_keys":"\u5BF9\u8BDD\u6846:\u6240\u6709\u5BF9\u8BDD\u6846\u5747\u53EF\u4EC5\u7528\u952E\u76D8\u64CD\u4F5C \u2014 Esc \u5173\u95ED,Tab \u6216\u65B9\u5411\u952E\u79FB\u52A8\u7126\u70B9,Enter \u6216\u7A7A\u683C\u952E\u6FC0\u6D3B\u5F53\u524D\u63A7\u4EF6\u3002","tui.command.app.announcements.cycle":"\u64AD\u62A5:{{level}}(\u9009\u62E9\u4EE5\u66F4\u6539)","tui.announcements.level.quiet":"\u5B89\u9759","tui.announcements.level.normal":"\u6B63\u5E38","tui.announcements.level.verbose":"\u8BE6\u7EC6","tui.app.terminal_too_small":"\u7EC8\u7AEF\u7A97\u53E3\u8FC7\u5C0F ({{width}}x{{height}}),\u8BF7\u8C03\u6574\u5230\u81F3\u5C11 40x8\u3002","tui.dialog.help.command_list":"\u6309 {{keybind}} \u67E5\u770B\u5F53\u524D\u4E0A\u4E0B\u6587\u4E2D\u6240\u6709\u53EF\u7528\u7684\u64CD\u4F5C\u548C\u547D\u4EE4\u3002","tui.dialog.help.ok":"\u786E\u5B9A","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 \u6EDA\u52A8 \xB7 PgUp/PgDn \u7FFB\u9875 \xB7 esc \u5173\u95ED","tui.dialog.ok":"\u786E\u5B9A","tui.dialog.confirm.cancel":"\u53D6\u6D88","tui.dialog.confirm.confirm":"\u786E\u8BA4","tui.dialog.agreement.title":"\u670D\u52A1\u534F\u8BAE\u4E0E\u9690\u79C1\u653F\u7B56","tui.dialog.agreement.message":"\u8BF7\u9605\u8BFB\u5E76\u540C\u610F\u540E\u7EE7\u7EED\u4F7F\u7528\u3002","tui.dialog.agreement.confirm":"\u540C\u610F\u5E76\u7EE7\u7EED","tui.command.docs.terms.title":"\u67E5\u770B\u670D\u52A1\u6761\u6B3E","tui.command.docs.privacy.title":"\u67E5\u770B\u9690\u79C1\u653F\u7B56","tui.command.consent.revoke.title":"\u64A4\u9500\u514D\u8D39\u6A21\u578B\u534F\u8BAE","tui.consent.revoked":"\u5DF2\u64A4\u9500\u514D\u8D39\u6A21\u578B\u534F\u8BAE \u2014 \u4E0B\u6B21\u4F7F\u7528\u65F6\u5C06\u518D\u6B21\u8BF7\u6C42\u540C\u610F","tui.dialog.select.placeholder":"\u641C\u7D22","tui.dialog.select.no_results":"\u672A\u627E\u5230\u7ED3\u679C","tui.dialog.prompt.placeholder":"\u8F93\u5165\u6587\u672C","tui.dialog.prompt.busy":"\u5904\u7406\u4E2D...","tui.dialog.prompt.processing":"\u5904\u7406\u4E2D...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"\u63D0\u4EA4","tui.dialog.export.title":"\u5BFC\u51FA\u9009\u9879","tui.dialog.export.filename":"\u6587\u4EF6\u540D\uFF1A","tui.dialog.export.filename_placeholder":"\u8F93\u5165\u6587\u4EF6\u540D","tui.dialog.export.include_thinking":"\u5305\u542B\u601D\u8003\u8FC7\u7A0B","tui.dialog.export.include_tool_details":"\u5305\u542B\u5DE5\u5177\u8BE6\u60C5","tui.dialog.export.include_assistant_metadata":"\u5305\u542B\u52A9\u624B\u5143\u6570\u636E","tui.dialog.export.open_without_saving":"\u76F4\u63A5\u6253\u5F00\u4E0D\u4FDD\u5B58","tui.dialog.export.hint.toggle_prefix":"\u6309","tui.dialog.export.hint.toggle_action":"\u5207\u6362","tui.dialog.export.hint.confirm_action":"\u786E\u8BA4","tui.dialog.export.hint.options_action":"\u67E5\u770B\u9009\u9879","tui.toast.copied_to_clipboard":"\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F","tui.toast.instructions_loaded":"\u5DF2\u52A0\u8F7D {{files}}","tui.toast.update_available.title":"\u6709\u65B0\u7248\u672C\u53EF\u7528","tui.toast.update_available.confirm":"\u65B0\u7248\u672C v{{version}} \u5DF2\u53D1\u5E03\uFF0C\u662F\u5426\u7ACB\u5373\u66F4\u65B0\uFF1F","tui.toast.update_available.updating":"\u6B63\u5728\u66F4\u65B0\u5230 v{{version}}...","tui.toast.update_available.failed":"\u66F4\u65B0\u5931\u8D25","tui.toast.update_available.success":"\u5DF2\u66F4\u65B0\u5230 QitQode v{{version}}\uFF0C\u8BF7\u91CD\u542F\u5E94\u7528\u3002","tui.toast.updated.title":"\u5DF2\u81EA\u52A8\u66F4\u65B0","tui.toast.updated.message":"\u5DF2\u81EA\u52A8\u5E94\u7528\u8865\u4E01\u66F4\u65B0\uFF1Av{{version}}\u3002\u91CD\u542F\u540E\u751F\u6548\u3002\u53EF\u5728\u914D\u7F6E\u4E2D\u8BBE\u7F6E autoupdate: false \u5173\u95ED\u81EA\u52A8\u66F4\u65B0\u3002","tui.sidebar.instructions":"\u6307\u4EE4\u6587\u4EF6","tui.sidebar.cwd":"\u5DE5\u4F5C\u76EE\u5F55","tui.toast.unknown_error":"\u53D1\u751F\u672A\u77E5\u9519\u8BEF","tui.command.docs.open.title":"\u6253\u5F00\u6587\u6863","tui.command.app.exit.title":"\u9000\u51FA\u5E94\u7528","tui.command.app.debug.title":"\u5207\u6362\u8C03\u8BD5\u9762\u677F","tui.command.app.console.title":"\u5207\u6362\u63A7\u5236\u53F0","tui.command.app.heap_snapshot.title":"\u5BFC\u51FA\u5806\u5FEB\u7167","tui.command.terminal.suspend.title":"\u6302\u8D77\u7EC8\u7AEF","tui.command.terminal.title.disable":"\u7981\u7528\u7EC8\u7AEF\u6807\u9898","tui.command.terminal.title.enable":"\u542F\u7528\u7EC8\u7AEF\u6807\u9898","tui.command.app.toggle.animations.disable":"\u7981\u7528\u52A8\u753B","tui.command.app.toggle.animations.enable":"\u542F\u7528\u52A8\u753B","tui.command.app.toggle.diffwrap.disable":"\u7981\u7528 diff \u81EA\u52A8\u6362\u884C","tui.command.app.toggle.diffwrap.enable":"\u542F\u7528 diff \u81EA\u52A8\u6362\u884C","tui.command.app.toggle.sound.disable":"\u7981\u7528\u58F0\u97F3","tui.command.app.toggle.sound.enable":"\u542F\u7528\u58F0\u97F3","tui.command.logout.toast":"\u5DF2\u767B\u51FA","tui.command.session.share.title":"\u5206\u4EAB\u4F1A\u8BDD","tui.command.session.share.copy_link":"\u590D\u5236\u5206\u4EAB\u94FE\u63A5","tui.command.session.rename.title":"\u91CD\u547D\u540D\u4F1A\u8BDD","tui.command.session.timeline.title":"\u8DF3\u8F6C\u5230\u6D88\u606F","tui.command.session.fork.title":"\u6D3E\u751F\u4F1A\u8BDD","tui.command.session.compact.title":"\u538B\u7F29\u4F1A\u8BDD","tui.command.session.unshare.title":"\u53D6\u6D88\u5206\u4EAB","tui.command.session.undo.title":"\u64A4\u9500\u4E0A\u4E00\u6761\u6D88\u606F","tui.command.session.redo.title":"\u91CD\u505A","tui.command.session.sidebar.show":"\u663E\u793A\u4FA7\u680F","tui.command.session.sidebar.hide":"\u9690\u85CF\u4FA7\u680F","tui.command.session.conceal.disable":"\u5173\u95ED\u4EE3\u7801\u9690\u85CF","tui.command.session.conceal.enable":"\u5F00\u542F\u4EE3\u7801\u9690\u85CF","tui.command.session.timestamps.show":"\u663E\u793A\u65F6\u95F4\u6233","tui.command.session.timestamps.hide":"\u9690\u85CF\u65F6\u95F4\u6233","tui.command.session.thinking.expand":"\u5C55\u5F00\u601D\u8003\u8FC7\u7A0B","tui.command.session.thinking.collapse":"\u6298\u53E0\u601D\u8003\u8FC7\u7A0B","tui.command.session.tool_details.show":"\u663E\u793A\u5DE5\u5177\u8BE6\u60C5","tui.command.session.tool_details.hide":"\u9690\u85CF\u5DE5\u5177\u8BE6\u60C5","tui.command.session.scrollbar.toggle":"\u5207\u6362\u4F1A\u8BDD\u6EDA\u52A8\u6761","tui.command.session.generic_tool_output.show":"\u663E\u793A\u901A\u7528\u5DE5\u5177\u8F93\u51FA","tui.command.session.generic_tool_output.hide":"\u9690\u85CF\u901A\u7528\u5DE5\u5177\u8F93\u51FA","tui.command.session.page_up.title":"\u4E0A\u7FFB\u4E00\u9875","tui.command.session.page_down.title":"\u4E0B\u7FFB\u4E00\u9875","tui.command.session.line_up.title":"\u5411\u4E0A\u4E00\u884C","tui.command.session.line_down.title":"\u5411\u4E0B\u4E00\u884C","tui.command.session.half_page_up.title":"\u5411\u4E0A\u534A\u9875","tui.command.session.half_page_down.title":"\u5411\u4E0B\u534A\u9875","tui.command.session.first.title":"\u7B2C\u4E00\u6761\u6D88\u606F","tui.command.session.last.title":"\u6700\u540E\u4E00\u6761\u6D88\u606F","tui.command.session.last_user.title":"\u8DF3\u5230\u6700\u540E\u4E00\u6761\u7528\u6237\u6D88\u606F","tui.command.session.message_next.title":"\u4E0B\u4E00\u6761\u6D88\u606F","tui.command.session.message_previous.title":"\u4E0A\u4E00\u6761\u6D88\u606F","tui.command.messages.copy.title":"\u590D\u5236\u6700\u540E\u4E00\u6761\u52A9\u624B\u6D88\u606F","tui.command.session.copy.title":"\u590D\u5236\u4F1A\u8BDD\u8BB0\u5F55","tui.command.session.export.title":"\u5BFC\u51FA\u4F1A\u8BDD\u8BB0\u5F55","tui.command.session.child_first.title":"\u8FDB\u5165\u5B50\u4F1A\u8BDD","tui.command.session.parent.title":"\u8FD4\u56DE\u7236\u4F1A\u8BDD","tui.command.session.child_next.title":"\u4E0B\u4E00\u4E2A\u5B50\u4F1A\u8BDD","tui.command.session.child_previous.title":"\u4E0A\u4E00\u4E2A\u5B50\u4F1A\u8BDD","tui.command.prompt.clear.title":"\u6E05\u7A7A\u63D0\u793A\u6846","tui.command.prompt.submit.title":"\u63D0\u4EA4\u63D0\u793A\u8BCD","tui.command.prompt.paste.title":"\u7C98\u8D34","tui.command.session.interrupt.title":"\u4E2D\u65AD\u4F1A\u8BDD","tui.command.prompt.editor.title":"\u6253\u5F00\u7F16\u8F91\u5668","tui.command.prompt.skills.title":"\u6280\u80FD","tui.command.voice.toggle.title":"\u5207\u6362\u8BED\u97F3\u8F93\u5165","tui.command.voice.toggle.title_on":"\u8BED\u97F3\u8F93\u5165\uFF1A\u5DF2\u5F00\u542F \u2014 \u70B9\u51FB\u5173\u95ED","tui.command.voice.toggle.title_off":"\u8BED\u97F3\u8F93\u5165\uFF1A\u5DF2\u5173\u95ED \u2014 \u70B9\u51FB\u5F00\u542F","tui.command.voice.send.title":"\u5207\u6362\u8BED\u97F3\u53D1\u9001\u6307\u4EE4","tui.command.voice.send.title_on":"\u8BED\u97F3\u53D1\u9001\uFF1A\u5DF2\u5F00\u542F \u2014 \u70B9\u51FB\u5173\u95ED","tui.command.voice.send.title_off":"\u8BED\u97F3\u53D1\u9001\uFF1A\u5DF2\u5173\u95ED \u2014 \u70B9\u51FB\u5F00\u542F","tui.voice.enabled":"\u8BED\u97F3\u8F93\u5165\u5DF2\u542F\u7528\uFF08\u4E2D\u6587/\u82F1\u6587\uFF09\u2014 \u70B9\u51FB [Voice] \u5F00\u59CB\u5F55\u97F3","tui.voice.disabled":"\u8BED\u97F3\u8F93\u5165\u5DF2\u5173\u95ED","tui.voice.send.enabled":"\u8BED\u97F3\u53D1\u9001\u5DF2\u542F\u7528 \u2014 \u505C\u987F\u540E\u6E05\u6670\u5FF5\u51FA\u300C\u53D1\u9001\u300D\u5373\u53EF\u63D0\u4EA4","tui.voice.send.disabled":"\u8BED\u97F3\u53D1\u9001\u5DF2\u5173\u95ED","tui.voice.control.enabled":"\u8BED\u97F3\u63A7\u5236\u5DF2\u542F\u7528 \u2014 \u4F7F\u7528\u591A\u6A21\u6001\u6A21\u578B\u667A\u80FD\u7F16\u8F91\uFF08\u8F83\u6162\uFF09","tui.voice.control.disabled":"\u8BED\u97F3\u63A7\u5236\u5DF2\u5173\u95ED \u2014 \u4F7F\u7528\u5FEB\u901F ASR \u8F6C\u5199","tui.command.voice.control.title":"\u5207\u6362\u8BED\u97F3\u63A7\u5236\uFF08\u591A\u6A21\u6001\uFF09","tui.command.voice.control.title_on":"\u8BED\u97F3\u63A7\u5236\uFF1A\u5DF2\u5F00\u542F\uFF08\u591A\u6A21\u6001\uFF09 \u2014 \u70B9\u51FB\u5173\u95ED","tui.command.voice.control.title_off":"\u8BED\u97F3\u63A7\u5236\uFF1A\u5DF2\u5173\u95ED\uFF08\u5FEB\u901F ASR\uFF09 \u2014 \u70B9\u51FB\u5F00\u542F","tui.voice.error.no_auth":"\u8BF7\u5148\u7528 /connect \u8FDE\u63A5 QitQode \u8D26\u53F7\uFF0C\u6216\u914D\u7F6E voice.asr_model \u6307\u5B9A\u5176\u4ED6 provider","tui.voice.error.no_auth_provider":"\u8BED\u97F3 provider\u300C{{provider}}\u300D\u672A\u8BA4\u8BC1\uFF0C\u8BF7\u68C0\u67E5\u5176 apiKey \u914D\u7F6E","tui.voice.error.provider_not_found":"provider\u300C{{provider}}\u300D\u4E0D\u53EF\u7528 \u2014 \u8BF7 /connect \u8FDE\u63A5\uFF0C\u81EA\u5B9A\u4E49\u7AEF\u70B9\u9700\u5728\u914D\u7F6E\u4E2D\u58F0\u660E models","tui.voice.error.no_url":"provider\u300C{{provider}}\u300D\u672A\u914D\u7F6E baseURL\uFF0C\u8BF7\u5728 options.baseURL \u4E2D\u6307\u5B9A","tui.voice.error.no_device":"\u672A\u68C0\u6D4B\u5230\u9EA6\u514B\u98CE/\u97F3\u9891\u8BBE\u5907 \u2014 \u8BF7\u68C0\u67E5\u7CFB\u7EDF\u97F3\u9891\u8BBE\u7F6E","tui.voice.error.recorder_failed":"\u5F55\u97F3\u5931\u8D25","tui.voice.error.no_recorder":"\u672A\u68C0\u6D4B\u5230\u5F55\u97F3\u5DE5\u5177\uFF0C\u8BF7\u5B89\u88C5 sox","tui.voice.error.too_short":"\u5F55\u97F3\u65F6\u95F4\u8FC7\u77ED","tui.voice.error.network":"\u8F6C\u5199\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC","tui.voice.error.empty_send":"\u65E0\u5185\u5BB9\u53EF\u53D1\u9001","tui.voice.error.unknown_agent":"\u672A\u627E\u5230 agent\u300C{{name}}\u300D","tui.command.prompt.stash.title":"\u6682\u5B58\u63D0\u793A\u8BCD","tui.command.prompt.stash.pop.title":"\u5F39\u51FA\u6682\u5B58","tui.command.prompt.stash.list.title":"\u6682\u5B58\u5217\u8868","tui.command.tips.toggle.show":"\u663E\u793A Tips","tui.command.tips.toggle.hide":"\u9690\u85CF Tips","tui.command.plugins.list.title":"\u63D2\u4EF6","tui.command.plugins.install.title":"\u5B89\u88C5\u63D2\u4EF6","tui.dialog.login.title":"QitQode \u767B\u5F55","cli.providers.select":"\u9009\u62E9\u670D\u52A1\u5546","cli.providers.other":"\u5176\u4ED6 Provider","tui.dialog.login.import_claude":"\u4ECE Claude Code \u5BFC\u5165","tui.dialog.login.other":"\u5176\u4ED6\u670D\u52A1\u5546","tui.dialog.login.import_claude.no_key":"\u672A\u627E\u5230 Claude Code API Key","tui.dialog.login.import_claude.read_failed":"\u8BFB\u53D6 ~/.claude/settings.json \u5931\u8D25","tui.dialog.login.import_claude.success":"\u5DF2\u4ECE Claude Code \u5BFC\u5165\u914D\u7F6E","tui.question.plan_enter.question":"\u662F\u5426\u5207\u6362\u5230 plan \u6A21\u5F0F\u8FDB\u884C\u7ED3\u6784\u5316\u89C4\u5212\uFF1F","tui.question.plan_enter.header":"\u8FDB\u5165\u8BA1\u5212","tui.question.plan_enter.option.0.label":"\u662F","tui.question.plan_enter.option.0.description":"\u5207\u6362\u5230 plan \u667A\u80FD\u4F53\u8FDB\u884C\u53EA\u8BFB\u89C4\u5212","tui.question.plan_enter.option.1.label":"\u5426","tui.question.plan_enter.option.1.description":"\u7559\u5728\u5F53\u524D\u6A21\u5F0F","tui.question.plan_exit.question":"{{plan}} \u5904\u7684\u8BA1\u5212\u5DF2\u5B8C\u6210\u3002\u662F\u5426\u5207\u6362\u5230 build \u667A\u80FD\u4F53\u5F00\u59CB\u5B9E\u73B0\uFF1F","tui.question.plan_exit.header":"\u9000\u51FA\u8BA1\u5212","tui.question.plan_exit.option.0.label":"\u662F","tui.question.plan_exit.option.0.description":"\u5207\u6362\u5230 build \u667A\u80FD\u4F53\u5E76\u5F00\u59CB\u5B9E\u73B0\u8BA1\u5212","tui.question.plan_exit.option.1.label":"\u5426","tui.question.plan_exit.option.1.description":"\u7559\u5728 plan \u667A\u80FD\u4F53\u7EE7\u7EED\u5B8C\u5584\u8BA1\u5212","tui.session.badge.auto":"\u81EA\u52A8","trust.title":"\u8BBF\u95EE\u5DE5\u4F5C\u533A\uFF1A","trust.safety_check":"\u5B89\u5168\u786E\u8BA4\uFF1A\u8FD9\u662F\u4F60\u81EA\u5DF1\u521B\u5EFA\u6216\u4FE1\u4EFB\u7684\u9879\u76EE\u5417\uFF1F\uFF08\u5982\u4F60\u81EA\u5DF1\u7684\u4EE3\u7801\u3001\u77E5\u540D\u5F00\u6E90\u9879\u76EE\u6216\u56E2\u961F\u5185\u90E8\u9879\u76EE\uFF09\u3002\u5982\u679C\u4E0D\u662F\uFF0C\u8BF7\u5148\u68C0\u67E5\u6B64\u76EE\u5F55\u4E0B\u7684\u5185\u5BB9\u3002","trust.capabilities":"QitQode \u5C06\u80FD\u591F\u8BFB\u53D6\u3001\u7F16\u8F91\u548C\u6267\u884C\u6B64\u76EE\u5F55\u4E2D\u7684\u6587\u4EF6\u3002","trust.plugin_warn":"\u5982\u679C\u6B64\u76EE\u5F55\u4E2D\u5B58\u5728\u6076\u610F\u63D2\u4EF6\uFF0C\u5B83\u4EEC\u53EF\u4EE5\u6267\u884C\u4EFB\u610F\u4EE3\u7801\u3001\u8BFB\u53D6\u3001\u4FEE\u6539\u6216\u7A83\u53D6\u4F60\u7684\u6587\u4EF6\u3002","trust.option.yes":"\u662F\u7684\uFF0C\u6211\u4FE1\u4EFB\u6B64\u76EE\u5F55","trust.option.no":"\u5426\uFF0C\u9000\u51FA","trust.dangerous.title_home":"\u8B66\u544A\uFF1A\u4F60\u5373\u5C06\u6253\u5F00\u4E3B\u76EE\u5F55\u3002","trust.dangerous.title_root":"\u8B66\u544A\uFF1A\u4F60\u5373\u5C06\u6253\u5F00\u6587\u4EF6\u7CFB\u7EDF\u6839\u76EE\u5F55\u3002","trust.dangerous.body_home":"\u6A21\u578B\u5C06\u80FD\u591F\u8BBF\u95EE\u4F60\u6240\u6709\u7684\u4E2A\u4EBA\u6587\u4EF6 \u2014 SSH \u5BC6\u94A5\u3001\u51ED\u8BC1\u3001\u6D4F\u89C8\u5668\u914D\u7F6E\u7B49\u4E3B\u76EE\u5F55\u4E0B\u7684\u6240\u6709\u5185\u5BB9\u3002","trust.dangerous.body_root":"\u6A21\u578B\u5C06\u80FD\u591F\u8BBF\u95EE\u6574\u4E2A\u6587\u4EF6\u7CFB\u7EDF \u2014 \u7CFB\u7EDF\u6587\u4EF6\u3001\u6240\u6709\u7528\u6237\u6570\u636E\u3001\u51ED\u8BC1\u4EE5\u53CA\u8FD9\u53F0\u673A\u5668\u4E0A\u7684\u4E00\u5207\u3002","trust.dangerous.advice_home":"\u9664\u975E\u6709\u660E\u786E\u7684\u7406\u7531\uFF0C\u5426\u5219\u4E0D\u8981\u4FE1\u4EFB\u4F60\u7684\u6574\u4E2A\u4E3B\u76EE\u5F55\u3002","trust.dangerous.advice_root":"\u9664\u975E\u6709\u660E\u786E\u7684\u7406\u7531\uFF0C\u5426\u5219\u4E0D\u8981\u4FE1\u4EFB\u6587\u4EF6\u7CFB\u7EDF\u6839\u76EE\u5F55\u3002","trust.dangerous.option.yes":"\u6211\u4E86\u89E3\u98CE\u9669\uFF0C\u4EC5\u672C\u6B21\u4FE1\u4EFB","trust.dangerous.option.no":"\u9000\u51FA\uFF08\u63A8\u8350\uFF09"};
|
|
3
|
-
export{f as
|
|
3
|
+
export{f as Md};
|