@qitqode/qitqode-android-arm64 0.1.22 → 0.1.24
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-18xhxdsh.js → chunk-02txthqv.js} +2 -2
- package/bundle/{chunk-t4c0zy2s.js → chunk-0ae5q6ck.js} +2 -2
- package/bundle/chunk-0bvde0cx.js +2 -0
- package/bundle/chunk-0kbxnazj.js +2 -0
- package/bundle/{chunk-n68xjm4p.js → chunk-0pbt75ev.js} +1 -1
- package/bundle/{chunk-hmm1m733.js → chunk-0pvbk8ks.js} +2 -2
- package/bundle/{chunk-j6cpsxva.js → chunk-0rtshz2r.js} +1 -1
- package/bundle/{chunk-mbkw9s6e.js → chunk-0w0jfzb4.js} +1 -1
- package/bundle/{chunk-qq9pvscd.js → chunk-0w4v0fbs.js} +2 -2
- package/bundle/{chunk-jee9y4t0.js → chunk-0z3z0gk1.js} +2 -2
- package/bundle/{chunk-mr7ya5kc.js → chunk-17ggas8k.js} +1 -1
- package/bundle/chunk-19z5q33z.js +2 -0
- package/bundle/chunk-1a0wnwna.js +2 -0
- package/bundle/{chunk-y2tnzn1y.js → chunk-1d64dywx.js} +2 -2
- package/bundle/chunk-1ddm2wxv.js +2 -0
- package/bundle/chunk-1fk4vsmc.js +2 -0
- package/bundle/{chunk-x4c8drpe.js → chunk-1fnmkm0z.js} +2 -2
- package/bundle/chunk-1j2f9nd5.js +2 -0
- package/bundle/{chunk-b5x3zghc.js → chunk-1jh5p5qw.js} +2 -2
- package/bundle/{chunk-mbmc1mg0.js → chunk-1jsywey3.js} +1 -1
- package/bundle/{chunk-t2n6fmpy.js → chunk-1p34bx7c.js} +2 -2
- package/bundle/{chunk-7yw60h8j.js → chunk-1xyn0sp2.js} +2 -2
- package/bundle/{chunk-yy91rm3y.js → chunk-1y9t7nxn.js} +1 -1
- package/bundle/{chunk-h99n5rv7.js → chunk-21ejqv4v.js} +1 -1
- package/bundle/chunk-23geekk5.js +3 -0
- package/bundle/chunk-27s736an.js +2 -0
- package/bundle/{chunk-4qegdkss.js → chunk-2eardzxs.js} +1 -1
- package/bundle/{chunk-6emme4kp.js → chunk-2gxjjqfx.js} +1 -1
- package/bundle/chunk-2j17xrzj.js +2 -0
- package/bundle/{chunk-s4epqtge.js → chunk-2mmspnr3.js} +1 -1
- package/bundle/{chunk-30233h8f.js → chunk-2qcndbxv.js} +1 -1
- package/bundle/{chunk-8rcpj28e.js → chunk-2wp1w8cy.js} +1 -1
- package/bundle/{chunk-6r4gn18m.js → chunk-2y8qz8te.js} +1 -1
- package/bundle/{chunk-8r4xs1q9.js → chunk-2z6fzwyc.js} +2 -2
- package/bundle/chunk-2zca3nak.js +2 -0
- package/bundle/chunk-2zcvcfq4.js +2 -0
- package/bundle/chunk-38hwkfj5.js +2 -0
- package/bundle/chunk-3afqxvsn.js +2 -0
- package/bundle/chunk-3avc1ppg.js +7 -0
- package/bundle/{chunk-a2ty2e0g.js → chunk-3nhqd8wg.js} +3 -3
- package/bundle/{chunk-jfy6bfvv.js → chunk-3tdqsm5c.js} +1 -1
- package/bundle/{chunk-c88rh38d.js → chunk-3tkp27x7.js} +2 -2
- package/bundle/chunk-3v4vtah1.js +2 -0
- package/bundle/{chunk-x8w2xgx6.js → chunk-3vbtra1j.js} +1 -1
- package/bundle/{chunk-b54t7ycj.js → chunk-3wzqs241.js} +1 -1
- package/bundle/chunk-3ypk0j2f.js +2 -0
- package/bundle/{chunk-tq258v8s.js → chunk-3z1y040p.js} +2 -2
- package/bundle/{chunk-3w60y2x5.js → chunk-453wpzg6.js} +1 -1
- package/bundle/chunk-4aykrj51.js +9 -0
- package/bundle/{chunk-qryeqw9s.js → chunk-4d1a547n.js} +1 -1
- package/bundle/chunk-4dtbmqmq.js +2 -0
- package/bundle/{chunk-s1mx3bkw.js → chunk-4k149ews.js} +1 -1
- package/bundle/{chunk-hyr049cr.js → chunk-4kse3awh.js} +1 -1
- package/bundle/chunk-4q9w2yve.js +5 -0
- package/bundle/{chunk-cx0z3mm3.js → chunk-4tn69nqs.js} +1 -1
- package/bundle/chunk-4zjb6rps.js +2 -0
- package/bundle/{chunk-cpkega70.js → chunk-58enbars.js} +2 -2
- package/bundle/{chunk-p64fb4rm.js → chunk-5h2hcp46.js} +1 -1
- package/bundle/chunk-5hkcjgwh.js +2 -0
- package/bundle/{chunk-7b69jj5g.js → chunk-5kmfnkzv.js} +1 -1
- package/bundle/{chunk-k19zvbzh.js → chunk-5rkmhzq0.js} +2 -2
- package/bundle/chunk-5snrz263.js +2 -0
- package/bundle/{chunk-ht1hqsaa.js → chunk-5y8efy5b.js} +1 -1
- package/bundle/chunk-653c0mxr.js +11 -0
- package/bundle/chunk-6av7hrrk.js +7 -0
- package/bundle/chunk-6bswn7w5.js +2 -0
- package/bundle/{chunk-fgtyrvan.js → chunk-6dxaty1v.js} +1 -1
- package/bundle/chunk-6epghftw.js +2 -0
- package/bundle/{chunk-bbznk59q.js → chunk-6g3m7yxf.js} +2 -2
- package/bundle/{chunk-xjdxyeja.js → chunk-6j0365q3.js} +2 -2
- package/bundle/chunk-6jjhxh8p.js +2 -0
- package/bundle/{chunk-y0fxwgrv.js → chunk-6mscvf6y.js} +1 -1
- package/bundle/{chunk-30p5pm3w.js → chunk-6nhje520.js} +1 -1
- package/bundle/{chunk-bjw39da9.js → chunk-6sdh1q7g.js} +1 -1
- package/bundle/{chunk-1eqcgkyq.js → chunk-6szvs3k9.js} +1 -1
- package/bundle/chunk-6ws7xyc5.js +2 -0
- package/bundle/{chunk-1d6ret10.js → chunk-78bajmqm.js} +1 -1
- package/bundle/{chunk-xtjsfqam.js → chunk-7a6p7dfx.js} +1 -1
- package/bundle/{chunk-ng85b73s.js → chunk-7dckfame.js} +1 -1
- package/bundle/chunk-7g28zhar.js +2 -0
- package/bundle/{chunk-8t1whx0k.js → chunk-7gczzccz.js} +1 -1
- package/bundle/chunk-7mhffm9f.js +800 -0
- package/bundle/{chunk-68jsyydc.js → chunk-7tgm8wp5.js} +1 -1
- package/bundle/chunk-7v02b2ms.js +2 -0
- package/bundle/chunk-7vmp2034.js +2 -0
- package/bundle/chunk-7wxrypkr.js +2 -0
- package/bundle/{chunk-1zb95qfx.js → chunk-7y3y3j51.js} +2 -2
- package/bundle/{chunk-mgp034y0.js → chunk-7yf15a3a.js} +1 -1
- package/bundle/{chunk-bwyf1bvf.js → chunk-82gs5cmn.js} +1 -1
- package/bundle/{chunk-hkmx6w54.js → chunk-84gnbzky.js} +1 -1
- package/bundle/{chunk-fyd31m33.js → chunk-8651hq0k.js} +1 -1
- package/bundle/{chunk-ymv05pbt.js → chunk-8717htya.js} +1 -1
- package/bundle/{chunk-fjtq8164.js → chunk-8ace31r2.js} +1 -1
- package/bundle/{chunk-7276th89.js → chunk-8cr7ks31.js} +1 -1
- package/bundle/{chunk-9g05wsae.js → chunk-8h9r6c8g.js} +2 -2
- package/bundle/chunk-8kk9gvdy.js +2 -0
- package/bundle/{chunk-haw1jzwb.js → chunk-8pe047p0.js} +1 -1
- package/bundle/{chunk-j2k4wxsk.js → chunk-8r79zf3y.js} +2 -2
- package/bundle/chunk-8ygpp4y3.js +2 -0
- package/bundle/chunk-95q60g1p.js +2 -0
- package/bundle/{chunk-rvz05kxy.js → chunk-9798jffg.js} +1 -1
- package/bundle/{chunk-7hx0pza2.js → chunk-99n6czag.js} +2 -2
- package/bundle/{chunk-m79gd4yt.js → chunk-9easaxy7.js} +1 -1
- package/bundle/{chunk-jyh2g13j.js → chunk-9f7y0dj0.js} +1 -1
- package/bundle/{chunk-x1dfc7qd.js → chunk-9jf67xb0.js} +2 -2
- package/bundle/chunk-9mjbenja.js +2 -0
- package/bundle/{chunk-9fdv5d8a.js → chunk-9nx8hm57.js} +1 -1
- package/bundle/{chunk-0ddhkapd.js → chunk-9pe4agdz.js} +2 -2
- package/bundle/{chunk-f72j5yx8.js → chunk-9rqrm9y8.js} +1 -1
- package/bundle/{chunk-mqt5qh3t.js → chunk-9sy9ws1w.js} +1 -1
- package/bundle/{chunk-zfw873yt.js → chunk-9vcw33dv.js} +1 -1
- package/bundle/chunk-9vn1gy8h.js +2 -0
- package/bundle/{chunk-wmmck56g.js → chunk-9xvctnjr.js} +1 -1
- package/bundle/{chunk-2p6w3w8f.js → chunk-a5zjrwqy.js} +2 -2
- package/bundle/{chunk-jj7wrfty.js → chunk-a9y27zd2.js} +1 -1
- package/bundle/{chunk-pcctf3gs.js → chunk-ac202abt.js} +1 -1
- package/bundle/{chunk-tcp31yv0.js → chunk-agdfqncf.js} +2 -2
- package/bundle/chunk-ajp3f08k.js +2 -0
- package/bundle/{chunk-7w01dxp9.js → chunk-am73j1bt.js} +1 -1
- package/bundle/{chunk-ne8ftsv3.js → chunk-apq38bt4.js} +3 -3
- package/bundle/chunk-aptkpdkc.js +2 -0
- package/bundle/{chunk-vpp88hhd.js → chunk-b643cra9.js} +229 -229
- package/bundle/{chunk-6hkv9411.js → chunk-b6m4yyww.js} +1 -1
- package/bundle/{chunk-rry321tn.js → chunk-b8ag61vj.js} +1 -1
- package/bundle/{chunk-hzexvrnj.js → chunk-bas6x25m.js} +2 -2
- package/bundle/{chunk-q6x5bmc3.js → chunk-bd21p9zz.js} +2 -2
- package/bundle/{chunk-t7v8wzr9.js → chunk-bf146hz2.js} +2 -2
- package/bundle/{chunk-pkdk0ppc.js → chunk-bky5a42k.js} +2 -2
- package/bundle/chunk-bry94ar5.js +2 -0
- package/bundle/chunk-btzyvqkf.js +2 -0
- package/bundle/{chunk-xce77xex.js → chunk-c31k8yh0.js} +1 -1
- package/bundle/chunk-c94pjdfh.js +2 -0
- package/bundle/chunk-cct9ds5c.js +2 -0
- package/bundle/chunk-cesrhm09.js +4 -0
- package/bundle/{chunk-pqyds00j.js → chunk-cvchztkc.js} +1 -1
- package/bundle/{chunk-x6gzygc3.js → chunk-cy2586rv.js} +1 -1
- package/bundle/chunk-czn535v0.js +2 -0
- package/bundle/chunk-d56zc21w.js +3 -0
- package/bundle/chunk-d7wd5hz1.js +2 -0
- package/bundle/chunk-d86cmjrp.js +2 -0
- package/bundle/{chunk-1kje2a6g.js → chunk-dann9gfq.js} +1 -1
- package/bundle/{chunk-fssgbz70.js → chunk-dcx8hjbs.js} +1 -1
- package/bundle/{chunk-x4b0ywbs.js → chunk-dgzyn27r.js} +1 -1
- package/bundle/{chunk-meaa7wrs.js → chunk-dkm7x8rj.js} +2 -2
- package/bundle/chunk-dkv2mg97.js +3 -0
- package/bundle/chunk-dnq65xvn.js +2 -0
- package/bundle/chunk-dpqv8rtn.js +2 -0
- package/bundle/chunk-e346x00p.js +10 -0
- package/bundle/chunk-e9mh7s3z.js +2 -0
- package/bundle/{chunk-kywg73qz.js → chunk-ebjhggdw.js} +1 -1
- package/bundle/{chunk-prrrw8t8.js → chunk-ecwz9nhs.js} +2 -2
- package/bundle/{chunk-m9bc5csy.js → chunk-edvcz2gd.js} +1 -1
- package/bundle/chunk-ek2y5f6g.js +2 -0
- package/bundle/{chunk-dhvwrrqx.js → chunk-ep8zn49w.js} +2 -2
- package/bundle/chunk-epdsay73.js +2 -0
- package/bundle/{chunk-adgrn60n.js → chunk-evqxvhdb.js} +1 -1
- package/bundle/{chunk-n1wawwry.js → chunk-ewyk4py6.js} +1 -1
- package/bundle/{chunk-56cty7nr.js → chunk-f3kjp838.js} +2 -2
- package/bundle/{chunk-c9afcdba.js → chunk-f819a7ec.js} +1 -1
- package/bundle/chunk-f89gntcy.js +3 -0
- package/bundle/{chunk-qwf258sw.js → chunk-fdezde1z.js} +1 -1
- package/bundle/chunk-ffnsn7tv.js +2 -0
- package/bundle/{chunk-98nh88th.js → chunk-fhng5her.js} +2 -2
- package/bundle/chunk-fkezc7ew.js +2 -0
- package/bundle/{chunk-78wt9ad8.js → chunk-fkvccmgk.js} +2 -2
- package/bundle/{chunk-1123xk5a.js → chunk-fm4xa6yx.js} +2 -2
- package/bundle/{chunk-j1kqhxnq.js → chunk-frdc3ysq.js} +1 -1
- package/bundle/chunk-fsxddgj0.js +2 -0
- package/bundle/{chunk-ah9cm91p.js → chunk-ftk58wxe.js} +1 -1
- package/bundle/{chunk-zz192a31.js → chunk-g0v9g37f.js} +1 -1
- package/bundle/{chunk-50aznc8e.js → chunk-g7vkkmsk.js} +3 -3
- package/bundle/chunk-gbcsfg6v.js +2 -0
- package/bundle/{chunk-s6qdtfty.js → chunk-gc9q0x8z.js} +3 -3
- package/bundle/{chunk-ntmn6epc.js → chunk-gen6f3dn.js} +2 -2
- package/bundle/{chunk-fkdbba26.js → chunk-gf4ek7rv.js} +1 -1
- package/bundle/{chunk-ee5r4h0v.js → chunk-gff87y4n.js} +1 -1
- package/bundle/chunk-gfmz85hp.js +2 -0
- package/bundle/chunk-gk63k4t6.js +2 -0
- package/bundle/{chunk-b3x13ndd.js → chunk-gn7xgd4c.js} +1 -1
- package/bundle/{chunk-4gfryje2.js → chunk-gn9p1d50.js} +1 -1
- package/bundle/{chunk-b1t8d1s8.js → chunk-gvzfffr4.js} +1 -1
- package/bundle/{chunk-zeh3mjgp.js → chunk-ha1w0xzh.js} +1 -1
- package/bundle/{chunk-r8ddb02d.js → chunk-hbnr0j7h.js} +2 -2
- package/bundle/chunk-hg563h5r.js +3 -0
- package/bundle/{chunk-y3x5m3e8.js → chunk-hg9nk090.js} +1 -1
- package/bundle/{chunk-67wvdfs5.js → chunk-hh3w51wp.js} +2 -2
- package/bundle/{chunk-fa03gsff.js → chunk-hh4c02fh.js} +1 -1
- package/bundle/{chunk-5z8gpy3x.js → chunk-hh9a709t.js} +1 -1
- package/bundle/{chunk-dgsg31vm.js → chunk-hjbks7r9.js} +1 -1
- package/bundle/{chunk-qafcfb4x.js → chunk-hqg5qbxk.js} +1 -1
- package/bundle/{chunk-jtbf88gw.js → chunk-hv4nhx6q.js} +2 -2
- package/bundle/{chunk-n4spe0sv.js → chunk-hxgb0y1w.js} +1 -1
- package/bundle/chunk-j0vf8s12.js +2 -0
- package/bundle/chunk-j1a64ade.js +3 -0
- package/bundle/chunk-j1bxt69x.js +2 -0
- package/bundle/{chunk-351wfvhp.js → chunk-j1veq3zr.js} +2 -2
- package/bundle/{chunk-60dxyp37.js → chunk-jbd9k041.js} +2 -2
- package/bundle/chunk-jcem8s30.js +2 -0
- package/bundle/{chunk-v9sfzkg5.js → chunk-jegn6jc3.js} +2 -2
- package/bundle/chunk-jjwjb9w0.js +3 -0
- package/bundle/{chunk-3degq6rv.js → chunk-jmjg8d8a.js} +4 -4
- package/bundle/chunk-jpham2a3.js +2 -0
- package/bundle/{chunk-rpy4rgmm.js → chunk-jpygkh1c.js} +1 -1
- package/bundle/{chunk-n39gqxkz.js → chunk-jr8qcf99.js} +2 -2
- package/bundle/{chunk-9hrpcnt8.js → chunk-jr9xnvjq.js} +1 -1
- package/bundle/{chunk-07b36w5g.js → chunk-jz3aav8a.js} +2 -2
- package/bundle/chunk-jzkymnr5.js +2 -0
- package/bundle/chunk-k0qtwnhb.js +2 -0
- package/bundle/{chunk-6w15nfph.js → chunk-k16hzy2q.js} +1 -1
- package/bundle/chunk-k2rsky7z.js +2 -0
- package/bundle/{chunk-61ndvjmm.js → chunk-k9d927xe.js} +1 -1
- package/bundle/{chunk-jrwfx6d8.js → chunk-k9g77a02.js} +1 -1
- package/bundle/{chunk-t1f7jeat.js → chunk-kaeyhw2n.js} +2 -2
- package/bundle/{chunk-gvj8qg7x.js → chunk-kc3hpmr2.js} +2 -2
- package/bundle/chunk-kcetcysa.js +2 -0
- package/bundle/chunk-kjfc5v3s.js +2 -0
- package/bundle/chunk-kkvb2c2z.js +8 -0
- package/bundle/chunk-km2ayfyf.js +2 -0
- package/bundle/chunk-knrh89eb.js +2 -0
- package/bundle/{chunk-8wzc27e3.js → chunk-kr0fsqas.js} +1 -1
- package/bundle/chunk-ksqfjawv.js +2 -0
- package/bundle/{chunk-awdpkgxf.js → chunk-ktmazmas.js} +2 -2
- package/bundle/{chunk-c4x99ayd.js → chunk-m8djypsy.js} +1 -1
- package/bundle/{chunk-10qkxzhh.js → chunk-mj24ntn9.js} +1 -1
- package/bundle/chunk-mjhb1q0n.js +3 -0
- package/bundle/{chunk-4xpfmpjf.js → chunk-ms1fd6h4.js} +1 -1
- package/bundle/chunk-mxcger73.js +2 -0
- package/bundle/{chunk-fzhgxcej.js → chunk-n1chdwrs.js} +1 -1
- package/bundle/{chunk-jatba8z8.js → chunk-najzfhb2.js} +1 -1
- package/bundle/chunk-nazkrkeb.js +2 -0
- package/bundle/chunk-nk01s49e.js +2 -0
- package/bundle/{chunk-pp44xnd7.js → chunk-ns0pswww.js} +1 -1
- package/bundle/chunk-ns8b7rx1.js +2 -0
- package/bundle/chunk-ny6vpkx2.js +2 -0
- package/bundle/{chunk-0vw5a7m9.js → chunk-p4hpr8d7.js} +1 -1
- package/bundle/{chunk-n1m5qdf5.js → chunk-p54bzjtv.js} +1 -1
- package/bundle/{chunk-f8xnn26j.js → chunk-pb7rnkke.js} +1 -1
- package/bundle/{chunk-4se8cbmb.js → chunk-pfhp78cr.js} +1 -1
- package/bundle/{chunk-y2r3zker.js → chunk-ps543k72.js} +1 -1
- package/bundle/chunk-pv8jcpnf.js +2 -0
- package/bundle/{chunk-vqxyph4q.js → chunk-pyq01301.js} +1 -1
- package/bundle/chunk-q0dd3ak6.js +3 -0
- package/bundle/chunk-q2s057bm.js +2 -0
- package/bundle/{chunk-x1naayst.js → chunk-q3x4x2tq.js} +1 -1
- package/bundle/chunk-q5cqg2c0.js +28 -0
- package/bundle/{chunk-msqx5bb0.js → chunk-q6fbyvpq.js} +1 -1
- package/bundle/chunk-qk2wnp2x.js +2 -0
- package/bundle/{chunk-wm3b050v.js → chunk-qw2hgs5b.js} +2 -2
- package/bundle/{chunk-8x6x3g16.js → chunk-qywwj58s.js} +2 -2
- package/bundle/chunk-r012q335.js +3 -0
- package/bundle/{chunk-gzwcj7c9.js → chunk-r3yqe7x0.js} +1 -1
- package/bundle/{chunk-2epf5806.js → chunk-r48g0kaq.js} +2 -2
- package/bundle/{chunk-hrnx60em.js → chunk-r7xp0xcn.js} +2 -2
- package/bundle/chunk-rbdjbgkb.js +2 -0
- package/bundle/{chunk-a3a9bbk7.js → chunk-rvvfs9ps.js} +2 -2
- package/bundle/chunk-rxjprhgh.js +2 -0
- package/bundle/chunk-s3w9bmze.js +2 -0
- package/bundle/chunk-s3zste1a.js +2 -0
- package/bundle/{chunk-bdzgtazc.js → chunk-s9amvacw.js} +2 -2
- package/bundle/chunk-sbt7qmwm.js +3 -0
- package/bundle/chunk-sf6h44pb.js +2 -0
- package/bundle/{chunk-aznbvrbm.js → chunk-sgtgvzv6.js} +1 -1
- package/bundle/chunk-sgvzxs7m.js +2 -0
- package/bundle/{chunk-h7rxnbf0.js → chunk-sjrmhd3e.js} +1 -1
- package/bundle/chunk-sp9bndyh.js +2 -0
- package/bundle/{chunk-ck65rcxb.js → chunk-spm1yy6w.js} +1 -1
- package/bundle/{chunk-h6htvj2y.js → chunk-srf73nm4.js} +1 -1
- package/bundle/{chunk-c2w3bqsa.js → chunk-sswbfqcq.js} +1 -1
- package/bundle/{chunk-er5q8nhp.js → chunk-t488d66k.js} +1 -1
- package/bundle/{chunk-aftpj9fe.js → chunk-t6w96xq2.js} +1 -1
- package/bundle/{chunk-t8365msg.js → chunk-te1zfpzv.js} +1 -1
- package/bundle/{chunk-2bxy8zm1.js → chunk-tk3bve0x.js} +2 -2
- package/bundle/chunk-tsn1jkr7.js +2 -0
- package/bundle/{chunk-z9b0ydw1.js → chunk-tzc4jkzg.js} +1 -1
- package/bundle/{chunk-01gtn79f.js → chunk-v2kyarwz.js} +2 -2
- package/bundle/{chunk-0qmaxpkv.js → chunk-v7r9np94.js} +1 -1
- package/bundle/{chunk-0jv8r99k.js → chunk-va4davgy.js} +317 -297
- package/bundle/{chunk-2bbvvh0d.js → chunk-vavrczqm.js} +1 -1
- package/bundle/{chunk-43xq4p51.js → chunk-ve5gb789.js} +2 -2
- package/bundle/{chunk-n9gzj085.js → chunk-vf1r5ckp.js} +1 -1
- package/bundle/{chunk-hnzs3ywg.js → chunk-vftqwdpg.js} +1 -1
- package/bundle/chunk-vg4styg5.js +2 -0
- package/bundle/chunk-vh09hhcs.js +2 -0
- package/bundle/chunk-vhktpm0n.js +2 -0
- package/bundle/{chunk-5a80qybt.js → chunk-vvypb02q.js} +1 -1
- package/bundle/{chunk-h5wh2d49.js → chunk-vzjcmwry.js} +2 -2
- package/bundle/{chunk-6nhgkw5r.js → chunk-w1atxyz0.js} +1 -1
- package/bundle/{chunk-73d0dy03.js → chunk-w7p2x973.js} +2 -2
- package/bundle/{chunk-db7hykjs.js → chunk-wa2ce2sg.js} +2 -2
- package/bundle/{chunk-3nc9wy1m.js → chunk-wf09j72q.js} +2 -2
- package/bundle/{chunk-wfb9dwmc.js → chunk-wfnk2vsd.js} +1 -1
- package/bundle/{chunk-zt8kghd2.js → chunk-wj6aq50n.js} +1 -1
- package/bundle/{chunk-39h565hz.js → chunk-wmrq9qqf.js} +1 -1
- package/bundle/{chunk-ha5qct06.js → chunk-wmw2gne9.js} +2 -2
- package/bundle/chunk-wtp0yvqw.js +2 -0
- package/bundle/{chunk-btjcs9ee.js → chunk-x6z2b63w.js} +1 -1
- package/bundle/{chunk-3xbtg0hn.js → chunk-xccs5c50.js} +1 -1
- package/bundle/{chunk-abc7ccfd.js → chunk-xj73j10a.js} +1 -1
- package/bundle/chunk-xmzs7q66.js +2 -0
- package/bundle/chunk-xv80476w.js +2 -0
- package/bundle/{chunk-tepesp0b.js → chunk-xv8gnkh5.js} +1 -1
- package/bundle/{chunk-hf0gny5t.js → chunk-y1srca0c.js} +2 -2
- package/bundle/{chunk-zy0zn8yx.js → chunk-y2jmtfdh.js} +2 -2
- package/bundle/{chunk-w8xaw2dv.js → chunk-y3n31nnx.js} +2 -2
- package/bundle/{chunk-6v4mhtha.js → chunk-ygj1cy0n.js} +1 -1
- package/bundle/{chunk-496rb1e4.js → chunk-yh174jhg.js} +2 -2
- package/bundle/chunk-yjvr0et1.js +2 -0
- package/bundle/{chunk-h9ftcgs2.js → chunk-yz7rqzby.js} +3 -3
- package/bundle/{chunk-2qy62cv4.js → chunk-yzdty5t9.js} +2 -2
- package/bundle/{chunk-5mrjxapq.js → chunk-zavtsfxz.js} +1 -1
- package/bundle/{chunk-h725tttx.js → chunk-zeh481tm.js} +2 -2
- package/bundle/{chunk-cn7nnjsf.js → chunk-zfnbk5gy.js} +1 -1
- package/bundle/{chunk-p20ft5mj.js → chunk-zk8n8hnh.js} +2 -2
- package/bundle/{chunk-en7nxqvn.js → chunk-zp2ffbc2.js} +2 -2
- package/bundle/chunk-zx3kcfkj.js +2 -0
- package/bundle/index.js +4 -4
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-04ezvjjf.js +0 -2
- package/bundle/chunk-0msr85tj.js +0 -2
- package/bundle/chunk-0qrpg3n8.js +0 -2
- package/bundle/chunk-0w8ztgmg.js +0 -2
- package/bundle/chunk-0y2nwncb.js +0 -2
- package/bundle/chunk-0zh8tykf.js +0 -2
- package/bundle/chunk-21z1vfgm.js +0 -2
- package/bundle/chunk-2ec8msmq.js +0 -2
- package/bundle/chunk-2n5m61m9.js +0 -2
- package/bundle/chunk-362z696e.js +0 -2
- package/bundle/chunk-367rm03h.js +0 -2
- package/bundle/chunk-3f6t3wde.js +0 -799
- package/bundle/chunk-40vz0fhv.js +0 -3
- package/bundle/chunk-43k17qzb.js +0 -2
- package/bundle/chunk-4r574drd.js +0 -2
- package/bundle/chunk-6c2xn1ab.js +0 -2
- package/bundle/chunk-6pe3xzkk.js +0 -11
- package/bundle/chunk-6rak9ez9.js +0 -2
- package/bundle/chunk-71dbq1d0.js +0 -2
- package/bundle/chunk-73r1zvgw.js +0 -2
- package/bundle/chunk-7az1bpy8.js +0 -2
- package/bundle/chunk-7bm1t462.js +0 -2
- package/bundle/chunk-7nq8126b.js +0 -2
- package/bundle/chunk-80a0d0js.js +0 -2
- package/bundle/chunk-9ac4h2d9.js +0 -2
- package/bundle/chunk-9zp746aj.js +0 -2
- package/bundle/chunk-a0vpemkf.js +0 -2
- package/bundle/chunk-anqjy235.js +0 -7
- package/bundle/chunk-atjzxp7b.js +0 -2
- package/bundle/chunk-ax4f4fbm.js +0 -2
- package/bundle/chunk-aybmm0jf.js +0 -2
- package/bundle/chunk-b2scgkye.js +0 -2
- package/bundle/chunk-b5h8vd5n.js +0 -3
- package/bundle/chunk-bbpze4hq.js +0 -2
- package/bundle/chunk-bn6mg34g.js +0 -7
- package/bundle/chunk-c6wrjyep.js +0 -2
- package/bundle/chunk-cckshvkb.js +0 -9
- package/bundle/chunk-ce3c03mh.js +0 -2
- package/bundle/chunk-cm31dbwq.js +0 -2
- package/bundle/chunk-cqaw6hka.js +0 -2
- package/bundle/chunk-cxbkhs5y.js +0 -2
- package/bundle/chunk-d9vs6zd0.js +0 -2
- package/bundle/chunk-dcyzpkww.js +0 -2
- package/bundle/chunk-dj3rct8v.js +0 -2
- package/bundle/chunk-djcsvcby.js +0 -5
- package/bundle/chunk-ds162xgb.js +0 -3
- package/bundle/chunk-e1zv873k.js +0 -2
- package/bundle/chunk-eb0ksh4x.js +0 -2
- package/bundle/chunk-efxshjyz.js +0 -2
- package/bundle/chunk-enry018j.js +0 -2
- package/bundle/chunk-f03yje8k.js +0 -3
- package/bundle/chunk-fd1vbz1f.js +0 -3
- package/bundle/chunk-fydd2nmw.js +0 -2
- package/bundle/chunk-g2bw2qf5.js +0 -2
- package/bundle/chunk-h9a4zzr4.js +0 -2
- package/bundle/chunk-hkqcpdmt.js +0 -3
- package/bundle/chunk-jx3kvzka.js +0 -2
- package/bundle/chunk-k6eyc1wv.js +0 -8
- package/bundle/chunk-k9m536te.js +0 -2
- package/bundle/chunk-khkv9s5c.js +0 -2
- package/bundle/chunk-kv58j3yk.js +0 -2
- package/bundle/chunk-m3sr6xdg.js +0 -2
- package/bundle/chunk-mmyhzhzt.js +0 -2
- package/bundle/chunk-mt8zem33.js +0 -24
- package/bundle/chunk-mw60bmaf.js +0 -2
- package/bundle/chunk-nk42gy65.js +0 -2
- package/bundle/chunk-ps8xnz0h.js +0 -2
- package/bundle/chunk-pvn4dz8e.js +0 -2
- package/bundle/chunk-pw3tnt2j.js +0 -2
- package/bundle/chunk-pzajshbc.js +0 -2
- package/bundle/chunk-q2weasmk.js +0 -2
- package/bundle/chunk-qe8zp79w.js +0 -2
- package/bundle/chunk-qvcnvqvf.js +0 -2
- package/bundle/chunk-qxrjbw22.js +0 -2
- package/bundle/chunk-qy9s3nmy.js +0 -2
- package/bundle/chunk-r0zsgad8.js +0 -4
- package/bundle/chunk-r4hkkcj4.js +0 -2
- package/bundle/chunk-r50kjthp.js +0 -2
- package/bundle/chunk-rbrkvj3x.js +0 -2
- package/bundle/chunk-rhgfyvth.js +0 -2
- package/bundle/chunk-rjdpw6at.js +0 -2
- package/bundle/chunk-s6c5c940.js +0 -2
- package/bundle/chunk-s79zd152.js +0 -2
- package/bundle/chunk-skjx57kv.js +0 -2
- package/bundle/chunk-ssfgge5z.js +0 -2
- package/bundle/chunk-t813v629.js +0 -2
- package/bundle/chunk-tdqbsbyb.js +0 -2
- package/bundle/chunk-th189x63.js +0 -3
- package/bundle/chunk-thbjhgw0.js +0 -2
- package/bundle/chunk-tk6gjy9d.js +0 -3
- package/bundle/chunk-tsfpkwvr.js +0 -2
- package/bundle/chunk-tz8qhbk9.js +0 -3
- package/bundle/chunk-v07wtbmt.js +0 -2
- package/bundle/chunk-v6kenrks.js +0 -2
- package/bundle/chunk-v7dfqwxx.js +0 -2
- package/bundle/chunk-vf7hhxsa.js +0 -2
- package/bundle/chunk-vmhq6cyz.js +0 -2
- package/bundle/chunk-vvs87e61.js +0 -2
- package/bundle/chunk-w6z123g2.js +0 -2
- package/bundle/chunk-wg0849tq.js +0 -2
- package/bundle/chunk-xa0f5g9z.js +0 -2
- package/bundle/chunk-xj0ba60b.js +0 -2
- package/bundle/chunk-xtfcdgwe.js +0 -2
- package/bundle/chunk-xz7dccwp.js +0 -2
- package/bundle/chunk-ye6j8k26.js +0 -2
- package/bundle/chunk-zbvf09bm.js +0 -3
- package/bundle/chunk-zmqmccbc.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-hh4c02fh.js";var i={"ui.sessionReview.title":"Zmiany w sesji","ui.sessionReview.title.lastTurn":"Zmiany z ostatniej tury","ui.sessionReview.diffStyle.unified":"Ujednolicony","ui.sessionReview.diffStyle.split":"Podzielony","ui.sessionReview.openFile":"Otw\xF3rz plik","ui.sessionReview.selection.line":"linia {{line}}","ui.sessionReview.selection.lines":"linie {{start}}-{{end}}","ui.sessionReview.expandAll":"Rozwi\u0144 wszystko","ui.sessionReview.collapseAll":"Zwi\u0144 wszystko","ui.sessionReview.change.added":"Dodano","ui.sessionReview.change.removed":"Usuni\u0119to","ui.sessionReview.change.modified":"Zmodyfikowano","ui.sessionReview.image.loading":"\u0141adowanie...","ui.sessionReview.image.placeholder":"Obraz","ui.sessionReview.largeDiff.title":"Diff jest zbyt du\u017Cy, aby go wyrenderowa\u0107","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} zmienionych linii. Obecnie: {{current}} zmienionych linii.","ui.sessionReview.largeDiff.renderAnyway":"Renderuj mimo to","ui.fileMedia.kind.image":"obraz","ui.fileMedia.kind.audio":"d\u017Awi\u0119k","ui.fileMedia.state.removed":"{{kind}} usuni\u0119ty","ui.fileMedia.state.loading":"Wczytywanie: {{kind}}...","ui.fileMedia.state.error":"B\u0142\u0105d wczytywania: {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} niedost\u0119pny","ui.fileMedia.binary.title":"Plik binarny","ui.fileMedia.binary.description.path":"Nie mo\u017Cna wy\u015Bwietli\u0107 pliku {{path}}, poniewa\u017C jest to plik binarny.","ui.fileMedia.binary.description.default":"Nie mo\u017Cna wy\u015Bwietli\u0107 tego pliku, poniewa\u017C jest to plik binarny.","ui.lineComment.label.prefix":"Komentarz do ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Komentowanie: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Dodaj komentarz","ui.lineComment.submit":"Skomentuj","ui.sessionTurn.steps.show":"Poka\u017C kroki","ui.sessionTurn.steps.hide":"Ukryj kroki","ui.sessionTurn.summary.response":"Odpowied\u017A","ui.sessionTurn.diff.showMore":"Poka\u017C wi\u0119cej zmian ({{count}})","ui.sessionTurn.retry.retrying":"ponawianie","ui.sessionTurn.retry.inSeconds":"za {{seconds}}s","ui.sessionTurn.retry.attempt":"pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini jest teraz mocno przeci\u0105\u017Cony","ui.sessionTurn.error.freeUsageExceeded":"Przekroczono limit darmowego u\u017Cytkowania","ui.sessionTurn.error.addQredits":"Dodaj kredyty","ui.sessionTurn.status.delegating":"Delegowanie pracy","ui.sessionTurn.status.planning":"Planowanie kolejnych krok\xF3w","ui.sessionTurn.status.gatheringContext":"Eksplorowanie","ui.sessionTurn.status.gatheredContext":"Wyeksplorowano","ui.sessionTurn.status.searchingCodebase":"Przeszukiwanie bazy kodu","ui.sessionTurn.status.searchingWeb":"Przeszukiwanie sieci","ui.sessionTurn.status.makingEdits":"Wprowadzanie zmian","ui.sessionTurn.status.runningCommands":"Uruchamianie polece\u0144","ui.sessionTurn.status.thinking":"My\u015Blenie","ui.sessionTurn.status.thinkingWithTopic":"My\u015Blenie - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Zbieranie my\u015Bli","ui.sessionTurn.status.consideringNextSteps":"Rozwa\u017Canie kolejnych krok\xF3w","ui.messagePart.questions.dismissed":"Pytania odrzucone","ui.messagePart.compaction":"Sesja skompaktowana","ui.messagePart.context.read.one":"{{count}} odczyt","ui.messagePart.context.read.other":"{{count}} odczyty","ui.messagePart.context.search.one":"{{count}} wyszukiwanie","ui.messagePart.context.search.other":"{{count}} wyszukiwania","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listy","ui.messagePart.diagnostic.error":"B\u0142\u0105d","ui.messagePart.title.edit":"Edycja","ui.messagePart.title.write":"Pisanie","ui.messagePart.option.typeOwnAnswer":"Wpisz w\u0142asn\u0105 odpowied\u017A","ui.messagePart.review.title":"Przejrzyj swoje odpowiedzi","ui.list.loading":"\u0141adowanie","ui.list.empty":"Brak wynik\xF3w","ui.list.clearFilter":"Wyczy\u015B\u0107 filtr","ui.list.emptyWithFilter.prefix":"Brak wynik\xF3w dla","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nowa wiadomo\u015B\u0107","ui.textField.copyToClipboard":"Skopiuj do schowka","ui.textField.copyLink":"Skopiuj link","ui.textField.copied":"Skopiowano","ui.imagePreview.alt":"Podgl\u0105d obrazu","ui.scrollView.ariaLabel":"tre\u015B\u0107 przewijana","ui.tool.read":"Odczyt","ui.tool.loaded":"Za\u0142adowano","ui.tool.list":"Lista","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Pobieranie sieciowe","ui.tool.websearch":"Wyszukiwanie w sieci","ui.tool.codesearch":"Wyszukiwanie kodu","ui.tool.shell":"Terminal","ui.tool.patch":"Patch","ui.tool.todos":"Zadania","ui.tool.todos.read":"Czytaj zadania","ui.tool.questions":"Pytania","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"plik","ui.common.file.other":"pliki","ui.common.question.one":"pytanie","ui.common.question.other":"pytania","ui.common.add":"Dodaj","ui.common.back":"Wstecz","ui.common.cancel":"Anuluj","ui.common.confirm":"Potwierd\u017A","ui.common.dismiss":"Odrzu\u0107","ui.common.close":"Zamknij","ui.common.next":"Dalej","ui.common.submit":"Prze\u015Blij","ui.permission.deny":"Odm\xF3w","ui.permission.allowAlways":"Zezwalaj zawsze","ui.permission.allowOnce":"Zezw\xF3l raz","ui.message.expand":"Rozwi\u0144 wiadomo\u015B\u0107","ui.message.collapse":"Zwi\u0144 wiadomo\u015B\u0107","ui.message.copy":"Kopiuj","ui.message.copyMessage":"Kopiuj wiadomo\u015B\u0107","ui.message.forkMessage":"Rozwidlij do nowej sesji","ui.message.revertMessage":"Zresetuj do tego punktu","ui.message.copyResponse":"Kopiuj odpowied\u017A","ui.message.copied":"Skopiowano!","ui.message.interrupted":"Przerwano","ui.message.queued":"W kolejce","ui.message.attachment.alt":"za\u0142\u0105cznik","ui.patch.action.deleted":"Usuni\u0119to","ui.patch.action.created":"Utworzono","ui.patch.action.moved":"Przeniesiono","ui.patch.action.patched":"Za\u0142atano","ui.question.subtitle.answered":"{{count}} odpowiedzi","ui.question.answer.none":"(brak odpowiedzi)","ui.question.review.notAnswered":"(bez odpowiedzi)","ui.question.multiHint":"Zaznacz wszystkie pasuj\u0105ce","ui.question.singleHint":"Wybierz jedn\u0105 odpowied\u017A","ui.question.custom.placeholder":"Wpisz swoj\u0105 odpowied\u017A...","ui.fileSearch.placeholder":"Szukaj","ui.fileSearch.previousMatch":"Poprzednie","ui.fileSearch.nextMatch":"Nast\u0119pne","ui.fileSearch.close":"Zamknij wyszukiwanie","ui.tool.task":"Zadanie","ui.tool.skill":"Umiej\u0119tno\u015B\u0107","ui.basicTool.called":"Wywo\u0142ano `{{tool}}`","ui.toolErrorCard.failed":"B\u0142\u0105d","ui.toolErrorCard.copyError":"Kopiuj b\u0142\u0105d","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{i as dict};
|
|
@@ -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":'Posez votre question... "{{example}}"',"tui.prompt.placeholder.shell":'Ex\xE9cuter une commande... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab pour accepter)","tui.home.placeholder.example.todo":"Corriger un TODO dans le code","tui.home.placeholder.example.stack":"Quelle est la stack technique de ce projet ?","tui.home.placeholder.example.tests":"R\xE9parer les tests cass\xE9s","tui.home.agreement.prefix":"En utilisant QitQode, vous acceptez nos ","tui.home.agreement.terms":"Conditions d'utilisation","tui.home.agreement.separator":" et notre ","tui.home.agreement.privacy":"Politique de confidentialit\xE9","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"joindre un fichier","tui.prompt.hint.subagent":"sous-agent","tui.prompt.hint.commands":"commandes","tui.prompt.hint.switch_mode":"changer de mode","tui.prompt.hint.settings":"param\xE8tres","tui.tips.label":"Astuce","tui.tips.plain_terminal":"Nous recommandons iTerm ou le terminal VS Code","tui.tips.attach_file":"Tapez {highlight}@{/highlight} suivi d'un nom de fichier pour rechercher et joindre des fichiers","tui.tips.shell_prefix":"Commencez un message par {highlight}!{/highlight} pour ex\xE9cuter directement des commandes shell (ex. {highlight}!ls -la{/highlight})","tui.tips.tab_agent":"Appuyez sur {highlight}Tab{/highlight} ou {highlight}Shift+Tab{/highlight} pour basculer entre les agents Build, Plan et Compose","tui.tips.theme_mode":"Ex\xE9cutez {highlight}/dark{/highlight} pour le mode sombre ou {highlight}/light{/highlight} pour le mode clair","tui.tips.doc":"Ex\xE9cutez {highlight}/doc{/highlight} pour ouvrir la documentation utilisateur","tui.tips.undo":"Utilisez {highlight}/undo{/highlight} pour annuler le dernier message et ses modifications","tui.tips.redo":"Utilisez {highlight}/redo{/highlight} pour r\xE9tablir des messages et modifications pr\xE9c\xE9demment annul\xE9s","tui.tips.drag_drop":"Glissez-d\xE9posez des images ou PDF dans le terminal pour les ajouter au contexte","tui.tips.paste_image":"Appuyez sur {highlight}Ctrl+V{/highlight} pour coller des images du presse-papiers dans l'invite","tui.tips.editor":"Appuyez sur {highlight}Ctrl+X E{/highlight} ou {highlight}/editor{/highlight} pour r\xE9diger des messages dans votre \xE9diteur externe","tui.tips.init":"Ex\xE9cutez {highlight}/init{/highlight} pour g\xE9n\xE9rer automatiquement les r\xE8gles du projet \xE0 partir de votre code","tui.tips.models":"Ex\xE9cutez {highlight}/models{/highlight} ou {highlight}Ctrl+X M{/highlight} pour changer de mod\xE8le","tui.tips.theme":`Verrouillez le mode du th\xE8me face \xE0 l'arri\xE8re-plan du terminal \u2014 ouvrez la palette de commandes ({highlight}Ctrl+P{/highlight}) et cherchez "lock"`,"tui.tips.new_session":"Appuyez sur {highlight}Ctrl+X N{/highlight} ou {highlight}/new{/highlight} pour d\xE9marrer une nouvelle session","tui.tips.sessions":"Utilisez {highlight}/sessions{/highlight} ou {highlight}Ctrl+X L{/highlight} pour lister et reprendre des conversations","tui.tips.compact":"Ex\xE9cutez {highlight}/compact{/highlight} pour r\xE9sumer les longues sessions \xE0 l'approche de la limite de contexte","tui.tips.export":"Appuyez sur {highlight}Ctrl+X X{/highlight} ou {highlight}/export{/highlight} pour enregistrer la conversation en Markdown","tui.tips.copy_last":"Appuyez sur {highlight}Ctrl+X Y{/highlight} pour copier le dernier message de l'assistant","tui.tips.command_palette":"Appuyez sur {highlight}Ctrl+P{/highlight} pour voir toutes les actions et commandes disponibles","tui.tips.leader":"La touche leader est {highlight}Ctrl+X{/highlight} ; combinez-la avec d'autres pour des actions rapides","tui.tips.f2":"Appuyez sur {highlight}F2{/highlight} pour basculer rapidement entre les mod\xE8les r\xE9cents","tui.tips.sidebar":"Appuyez sur {highlight}Ctrl+X B{/highlight} pour afficher/masquer la barre lat\xE9rale","tui.tips.history":"Utilisez {highlight}PageUp{/highlight}/{highlight}PageDown{/highlight} pour parcourir l'historique de la conversation","tui.tips.jump_first":"Appuyez sur {highlight}Ctrl+G{/highlight} ou {highlight}Home{/highlight} pour aller au d\xE9but de la conversation","tui.tips.jump_last":"Appuyez sur {highlight}Ctrl+Alt+G{/highlight} ou {highlight}End{/highlight} pour aller au message le plus r\xE9cent","tui.tips.newline":"Appuyez sur {highlight}Shift+Enter{/highlight} ou {highlight}Ctrl+J{/highlight} pour ins\xE9rer un saut de ligne dans l'invite","tui.tips.clear_input":"Appuyez sur {highlight}Ctrl+C{/highlight} pendant la saisie pour vider le champ","tui.tips.escape":"Appuyez sur {highlight}Escape{/highlight} pour interrompre l'IA en cours de r\xE9ponse","tui.tips.plan_agent":"Passez \xE0 l'agent {highlight}Plan{/highlight} pour obtenir des suggestions sans appliquer de modifications","tui.tips.subagent":"Utilisez {highlight}@agent-name{/highlight} dans les invites pour invoquer des sous-agents sp\xE9cialis\xE9s","tui.tips.cycle_sessions":"Appuyez sur {highlight}Ctrl+X Right/Left{/highlight} pour parcourir les sessions parent et enfant","tui.tips.config_files":"Cr\xE9ez {highlight}qitqode.json{/highlight} pour la configuration serveur et {highlight}tui.json{/highlight} pour le TUI","tui.tips.global_config":"Placez les param\xE8tres TUI dans {highlight}~/.config/qitqode/tui.json{/highlight} comme configuration globale","tui.tips.schema":"Ajoutez {highlight}$schema{/highlight} \xE0 votre config pour l'auto-compl\xE9tion dans l'\xE9diteur","tui.tips.default_model":"Configurez {highlight}model{/highlight} dans la config pour d\xE9finir le mod\xE8le par d\xE9faut","tui.tips.keybinds":"Remplacez n'importe quel raccourci dans {highlight}tui.json{/highlight} via la section {highlight}keybinds{/highlight}","tui.tips.disable_keybind":"D\xE9finissez un raccourci sur {highlight}none{/highlight} pour le d\xE9sactiver compl\xE8tement","tui.tips.mcp_config":"Configurez les serveurs MCP locaux ou distants dans la section {highlight}mcp{/highlight}","tui.tips.mcp_oauth":"QitQode g\xE8re automatiquement OAuth pour les serveurs MCP distants n\xE9cessitant une authentification","tui.tips.custom_command":"Ajoutez des fichiers {highlight}.md{/highlight} dans {highlight}.qitqode/command/{/highlight} pour d\xE9finir des invites personnalis\xE9es r\xE9utilisables","tui.tips.command_args":"Utilisez {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} dans les commandes pour des entr\xE9es dynamiques","tui.tips.command_backticks":"Utilisez des backticks dans les commandes pour injecter la sortie shell (ex. {highlight}`git status`{/highlight})","tui.tips.custom_agent":"Ajoutez des fichiers {highlight}.md{/highlight} dans {highlight}.qitqode/agent/{/highlight} pour des personas IA sp\xE9cialis\xE9s","tui.tips.agent_perms":"Configurez par agent les permissions des outils {highlight}edit{/highlight}, {highlight}bash{/highlight} et {highlight}webfetch{/highlight}","tui.tips.bash_allow":'Utilisez des motifs comme {highlight}"git *": "allow"{/highlight} pour des permissions bash fines',"tui.tips.bash_deny":'D\xE9finissez {highlight}"rm -rf *": "deny"{/highlight} pour bloquer les commandes destructrices',"tui.tips.bash_ask":'Configurez {highlight}"git push": "ask"{/highlight} pour exiger une confirmation avant le push',"tui.tips.formatter":"QitQode formate automatiquement les fichiers avec prettier, gofmt, ruff, etc.","tui.tips.disable_formatter":'D\xE9finissez {highlight}"formatter": false{/highlight} dans la config pour d\xE9sactiver le formatage automatique',"tui.tips.custom_formatter":"D\xE9finissez des commandes de formatage personnalis\xE9es par extension de fichier dans la config","tui.tips.lsp":"QitQode utilise des serveurs LSP pour une analyse de code intelligente","tui.tips.custom_tool":"Cr\xE9ez des fichiers {highlight}.ts{/highlight} dans {highlight}.qitqode/tools/{/highlight} pour d\xE9finir de nouveaux outils LLM","tui.tips.tool_scripts":"Les d\xE9finitions d'outils peuvent invoquer des scripts en Python, Go, etc.","tui.tips.plugins":"Ajoutez des fichiers {highlight}.ts{/highlight} dans {highlight}.qitqode/plugin/{/highlight} pour des hooks d'\xE9v\xE9nements","tui.tips.plugin_notify":"Utilisez des plugins pour envoyer des notifications syst\xE8me \xE0 la fin des sessions","tui.tips.plugin_protect":"Cr\xE9ez un plugin pour emp\xEAcher QitQode de lire des fichiers sensibles","tui.tips.run":"Utilisez {highlight}qitqode run{/highlight} pour des scripts non interactifs","tui.tips.continue":"Utilisez {highlight}qitqode --continue{/highlight} pour reprendre la derni\xE8re session","tui.tips.attach_cli":"Utilisez {highlight}qitqode run -f file.ts{/highlight} pour joindre des fichiers via la CLI","tui.tips.format_json":"Utilisez {highlight}--format json{/highlight} pour une sortie lisible par machine dans les scripts","tui.tips.auth_list":"Ex\xE9cutez {highlight}qitqode auth status{/highlight} pour voir votre \xE9tat de connexion actuel","tui.tips.agent_create":"Ex\xE9cutez {highlight}qitqode agent create{/highlight} pour cr\xE9er un agent en mode guid\xE9","tui.tips.theme_system":'Utilisez {highlight}"theme": "system"{/highlight} pour suivre les couleurs du terminal',"tui.tips.theme_files":"Cr\xE9ez des fichiers de th\xE8me JSON dans le dossier {highlight}.qitqode/themes/{/highlight}","tui.tips.theme_variants":"Les th\xE8mes prennent en charge des variantes claires/sombres pour les deux modes","tui.tips.theme_ansi":"R\xE9f\xE9rencez les couleurs ANSI 0-255 dans des th\xE8mes personnalis\xE9s","tui.tips.env_var":"Utilisez la syntaxe {highlight}{env:VAR_NAME}{/highlight} pour r\xE9f\xE9rencer des variables d'environnement","tui.tips.file_var":"Utilisez {highlight}{file:path}{/highlight} pour inclure le contenu d'un fichier dans la config","tui.tips.instructions":"Utilisez {highlight}instructions{/highlight} dans la config pour charger des fichiers de r\xE8gles suppl\xE9mentaires","tui.tips.temperature":"R\xE9glez la {highlight}temperature{/highlight} de l'agent de 0.0 (focalis\xE9) \xE0 1.0 (cr\xE9atif)","tui.tips.steps":"Configurez {highlight}steps{/highlight} pour limiter les it\xE9rations agentiques par requ\xEAte","tui.tips.disable_tool":'D\xE9finissez {highlight}"tools": {"bash": false}{/highlight} pour d\xE9sactiver des outils sp\xE9cifiques',"tui.tips.disable_mcp_tools":`D\xE9finissez {highlight}"mcp_*": false{/highlight} pour d\xE9sactiver tous les outils d'un serveur MCP`,"tui.tips.tool_override":"Remplacez les param\xE8tres globaux des outils dans la configuration de chaque agent","tui.tips.doom_loop":"La permission {highlight}doom_loop{/highlight} pr\xE9vient les boucles infinies d'appels d'outils","tui.tips.external_dir":"La permission {highlight}external_directory{/highlight} prot\xE8ge les fichiers en dehors du projet","tui.tips.debug_config":"Ex\xE9cutez {highlight}qitqode debug config{/highlight} pour diagnostiquer la configuration","tui.tips.print_logs":"Utilisez l'option {highlight}--print-logs{/highlight} pour afficher des journaux d\xE9taill\xE9s sur stderr","tui.tips.timeline":"Appuyez sur {highlight}Ctrl+X G{/highlight} ou {highlight}/timeline{/highlight} pour aller \xE0 un message pr\xE9cis","tui.tips.toggle_code":"Appuyez sur {highlight}Ctrl+X H{/highlight} pour afficher/masquer les blocs de code des messages","tui.tips.status":"Appuyez sur {highlight}Ctrl+X S{/highlight} ou {highlight}/status{/highlight} pour voir l'\xE9tat du syst\xE8me","tui.tips.scroll_accel":"Activez {highlight}scroll_acceleration{/highlight} dans {highlight}tui.json{/highlight} pour un d\xE9filement fluide","tui.tips.agents_md":"Versionnez le fichier {highlight}AGENTS.md{/highlight} de votre projet sur Git pour le partager avec l'\xE9quipe","tui.tips.review":"Utilisez {highlight}/review{/highlight} pour r\xE9viser les modifications non commit, branches ou PR","tui.tips.help":"Ex\xE9cutez {highlight}/help{/highlight} ou {highlight}Ctrl+X H{/highlight} pour ouvrir l'aide","tui.tips.rename":"Utilisez {highlight}/rename{/highlight} pour renommer la session courante","tui.tips.suspend.unix":"Appuyez sur {highlight}Ctrl+Z{/highlight} pour suspendre le terminal et revenir au shell","tui.tips.suspend.win":"Appuyez sur {highlight}Ctrl+Z{/highlight} pour annuler les modifications dans l'invite","tui.command.palette.title":"Commandes","tui.command.palette.suggested":"Sugg\xE9r\xE9es","tui.command.category.session":"Session","tui.command.category.agent":"Agent","tui.command.category.provider":"Fournisseur","tui.command.category.system":"Syst\xE8me","tui.command.category.prompt":"Invite","tui.command.category.internal":"Interne","tui.command.category.external":"Externe","tui.slash.init.description":"configuration guid\xE9e de AGENTS.md","tui.slash.review.description":"revoir les changements [commit|branch|pr], par d\xE9faut non commit\xE9s","tui.slash.dream.description":"consolider manuellement la m\xE9moire du projet \xE0 partir des fichiers memory et de la trajectoire brute","tui.slash.distill.description":"trouver les workflows r\xE9p\xE9t\xE9s dans le travail r\xE9cent et les empaqueter en skills, sous-agents ou commandes","tui.slash.goal.description":"d\xE9finir un objectif avec condition d'arr\xEAt ; s'ex\xE9cute jusqu'\xE0 ce qu'un juge confirme. /goal clear pour annuler","tui.slash.deep-research.description":"rapport de recherche approfondi multi-sources et v\xE9rifi\xE9 (ex\xE9cute le workflow deep-research)","tui.command.language.switch.title":"Changer de langue","tui.command.language.switch.description":"Modifier la langue d'affichage","tui.command.language.dialog.title":"Changer de langue","tui.language.auto":"Auto (syst\xE8me)","tui.language.current":"Actuelle","tui.command.session.list.title":"Changer de session","tui.command.session.new.title":"Nouvelle session","tui.command.workflow.list.title":"Workflows","tui.command.model.list.title":"Changer de mod\xE8le","tui.command.model.cycle_recent.title":"Mod\xE8les r\xE9cents","tui.command.model.cycle_recent_reverse.title":"Mod\xE8les r\xE9cents (inverse)","tui.command.model.cycle_favorite.title":"Favoris","tui.command.model.cycle_favorite_reverse.title":"Favoris (inverse)","tui.command.agent.list.title":"Changer d'agent","tui.command.mcp.list.title":"Activer/d\xE9sactiver MCP","tui.command.never_ask.title_on":"Sans questions : ACTIV\xC9 (auto-d\xE9cider, autorisations exclues) \u2014 cliquer pour d\xE9sactiver","tui.command.never_ask.title_off":"Sans questions : D\xC9SACTIV\xC9 \u2014 cliquer pour activer (auto-d\xE9cider, autorisations exclues)","tui.command.never_ask.toast_on":"Sans questions ACTIV\xC9 \u2014 je ne te demanderai rien ; je choisirai moi-m\xEAme la meilleure option jusqu'\xE0 ce que tu le d\xE9sactives (/never-ask). Les demandes d'autorisation n\xE9cessitent toujours ton approbation.","tui.command.never_ask.toast_off":"Sans questions D\xC9SACTIV\xC9 \u2014 je te redemanderai aux points de d\xE9cision.","tui.command.agent.cycle.title":"Cycle d'agents","tui.command.variant.cycle.title":"Cycle de variantes","tui.command.variant.list.title":"Changer de variante de mod\xE8le","tui.command.agent.cycle.reverse.title":"Cycle d'agents (inverse)","tui.command.provider.login.title":"Connexion","tui.command.provider.logout.title":"D\xE9connexion","tui.command.console.org.switch.title":"Changer d'organisation","tui.command.qitqode.status.title":"Voir l'\xE9tat","tui.command.theme.switch.title":"Changer de th\xE8me","tui.command.theme.switch_mode.to_light":"Passer au mode clair","tui.command.theme.switch_mode.to_dark":"Passer au mode sombre","tui.command.theme.mode.unlock":"D\xE9verrouiller le mode du th\xE8me","tui.command.theme.mode.lock":"Verrouiller le mode du th\xE8me","tui.command.help.show.title":"Aide","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Accessibilit\xE9 : activez ou d\xE9sactivez les animations et le son depuis la liste de commandes. Variables d'environnement : NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"Annonces : en mode accessible, choisissez le niveau de d\xE9tail des annonces du lecteur d'\xE9cran (silencieux, normal, d\xE9taill\xE9) depuis la liste de commandes ou avec QITQODE_TUI_ANNOUNCEMENTS. Les erreurs sont toujours annonc\xE9es.","tui.dialog.help.dialog_keys":"Bo\xEEtes de dialogue : toutes fonctionnent uniquement au clavier \u2014 \xC9chap ferme, Tab ou les fl\xE8ches d\xE9placent le focus, Entr\xE9e ou Espace active le contr\xF4le cibl\xE9.","tui.command.app.announcements.cycle":"Annonces : {{level}} (s\xE9lectionner pour changer)","tui.announcements.level.quiet":"silencieux","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"d\xE9taill\xE9","tui.app.terminal_too_small":"Terminal trop petit ({{width}}x{{height}}). Redimensionnez-le \xE0 au moins 40x8.","tui.dialog.help.command_list":"Appuyez sur {{keybind}} pour voir toutes les actions et commandes disponibles dans n'importe quel contexte.","tui.dialog.help.ok":"OK","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 d\xE9filer \xB7 PgPr\xE9c/PgSuiv page \xB7 esc fermer","tui.dialog.ok":"OK","tui.dialog.confirm.cancel":"Annuler","tui.dialog.confirm.confirm":"Confirmer","tui.dialog.agreement.title":"Conditions et confidentialit\xE9","tui.dialog.agreement.message":"Veuillez les lire et les accepter pour continuer.","tui.dialog.agreement.confirm":"Accepter et continuer","tui.command.docs.terms.title":"Voir les conditions d'utilisation","tui.command.docs.privacy.title":"Voir la politique de confidentialit\xE9","tui.command.consent.revoke.title":"R\xE9voquer l'accord du mod\xE8le gratuit","tui.consent.revoked":"Accord du mod\xE8le gratuit r\xE9voqu\xE9 \u2014 vous devrez l'accepter \xE0 nouveau","tui.dialog.select.placeholder":"Rechercher","tui.dialog.select.no_results":"Aucun r\xE9sultat trouv\xE9","tui.dialog.prompt.placeholder":"Saisir du texte","tui.dialog.prompt.busy":"Traitement...","tui.dialog.prompt.processing":"traitement...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"envoyer","tui.dialog.export.title":"Options d'export","tui.dialog.export.filename":"Nom du fichier :","tui.dialog.export.filename_placeholder":"Saisir le nom du fichier","tui.dialog.export.include_thinking":"Inclure la r\xE9flexion","tui.dialog.export.include_tool_details":"Inclure les d\xE9tails des outils","tui.dialog.export.include_assistant_metadata":"Inclure les m\xE9tadonn\xE9es de l'assistant","tui.dialog.export.open_without_saving":"Ouvrir sans enregistrer","tui.dialog.export.hint.toggle_prefix":"Appuyez sur","tui.dialog.export.hint.toggle_action":"pour basculer","tui.dialog.export.hint.confirm_action":"pour confirmer","tui.dialog.export.hint.options_action":"pour les options","tui.toast.copied_to_clipboard":"Copi\xE9 dans le presse-papiers","tui.toast.instructions_loaded":"Charg\xE9 {{files}}","tui.toast.update_available.title":"Mise \xE0 jour disponible","tui.toast.update_available.confirm":"La nouvelle version v{{version}} est disponible. Voulez-vous mettre \xE0 jour maintenant ?","tui.toast.update_available.updating":"Mise \xE0 jour vers v{{version}}...","tui.toast.update_available.failed":"La mise \xE0 jour a \xE9chou\xE9","tui.toast.update_available.success":"Mis \xE0 jour vers QitQode v{{version}}. Veuillez red\xE9marrer l'application.","tui.toast.updated.title":"Mis \xE0 jour automatiquement","tui.toast.updated.message":"Correctif appliqu\xE9 automatiquement : v{{version}}. Red\xE9marrez pour utiliser la nouvelle version. D\xE9sactivez avec autoupdate: false dans la configuration.","tui.sidebar.instructions":"Instructions","tui.sidebar.cwd":"R\xE9pertoire de travail","tui.toast.unknown_error":"Une erreur inconnue s'est produite","tui.command.docs.open.title":"Ouvrir la documentation","tui.command.app.exit.title":"Quitter l'application","tui.command.app.debug.title":"Basculer le panneau de d\xE9bogage","tui.command.app.console.title":"Basculer la console","tui.command.app.heap_snapshot.title":"Exporter le snapshot du tas","tui.command.terminal.suspend.title":"Suspendre le terminal","tui.command.terminal.title.disable":"D\xE9sactiver le titre du terminal","tui.command.terminal.title.enable":"Activer le titre du terminal","tui.command.app.toggle.animations.disable":"D\xE9sactiver les animations","tui.command.app.toggle.animations.enable":"Activer les animations","tui.command.app.toggle.diffwrap.disable":"D\xE9sactiver le retour \xE0 la ligne des diffs","tui.command.app.toggle.diffwrap.enable":"Activer le retour \xE0 la ligne des diffs","tui.command.app.toggle.sound.disable":"D\xE9sactiver le son","tui.command.app.toggle.sound.enable":"Activer le son","tui.command.logout.toast":"D\xE9connect\xE9","tui.command.session.share.title":"Partager la session","tui.command.session.share.copy_link":"Copier le lien de partage","tui.command.session.rename.title":"Renommer la session","tui.command.session.timeline.title":"Aller \xE0 un message","tui.command.session.fork.title":"Dupliquer la session","tui.command.session.compact.title":"Compacter la session","tui.command.session.unshare.title":"Annuler le partage","tui.command.session.undo.title":"Annuler le message pr\xE9c\xE9dent","tui.command.session.redo.title":"R\xE9tablir","tui.command.session.sidebar.show":"Afficher la barre lat\xE9rale","tui.command.session.sidebar.hide":"Masquer la barre lat\xE9rale","tui.command.session.conceal.disable":"D\xE9sactiver le masquage du code","tui.command.session.conceal.enable":"Activer le masquage du code","tui.command.session.timestamps.show":"Afficher les horodatages","tui.command.session.timestamps.hide":"Masquer les horodatages","tui.command.session.thinking.expand":"D\xE9velopper la r\xE9flexion","tui.command.session.thinking.collapse":"R\xE9duire la r\xE9flexion","tui.command.session.tool_details.show":"Afficher les d\xE9tails des outils","tui.command.session.tool_details.hide":"Masquer les d\xE9tails des outils","tui.command.session.scrollbar.toggle":"Basculer la barre de d\xE9filement","tui.command.session.generic_tool_output.show":"Afficher la sortie d'outil g\xE9n\xE9rique","tui.command.session.generic_tool_output.hide":"Masquer la sortie d'outil g\xE9n\xE9rique","tui.command.session.page_up.title":"Page pr\xE9c\xE9dente","tui.command.session.page_down.title":"Page suivante","tui.command.session.line_up.title":"Ligne au-dessus","tui.command.session.line_down.title":"Ligne en dessous","tui.command.session.half_page_up.title":"Demi-page vers le haut","tui.command.session.half_page_down.title":"Demi-page vers le bas","tui.command.session.first.title":"Premier message","tui.command.session.last.title":"Dernier message","tui.command.session.last_user.title":"Aller au dernier message utilisateur","tui.command.session.message_next.title":"Message suivant","tui.command.session.message_previous.title":"Message pr\xE9c\xE9dent","tui.command.messages.copy.title":"Copier le dernier message de l'assistant","tui.command.session.copy.title":"Copier la transcription","tui.command.session.export.title":"Exporter la transcription","tui.command.session.child_first.title":"Aller \xE0 la session enfant","tui.command.session.parent.title":"Aller \xE0 la session parente","tui.command.session.child_next.title":"Session enfant suivante","tui.command.session.child_previous.title":"Session enfant pr\xE9c\xE9dente","tui.command.prompt.clear.title":"Vider l'invite","tui.command.prompt.submit.title":"Envoyer l'invite","tui.command.prompt.paste.title":"Coller","tui.command.session.interrupt.title":"Interrompre la session","tui.command.prompt.editor.title":"Ouvrir l'\xE9diteur","tui.command.prompt.skills.title":"Comp\xE9tences","tui.command.voice.toggle.title":"Activer/d\xE9sactiver la saisie vocale","tui.command.voice.toggle.title_on":"Saisie vocale : activ\xE9e \u2014 cliquer pour d\xE9sactiver","tui.command.voice.toggle.title_off":"Saisie vocale : d\xE9sactiv\xE9e \u2014 cliquer pour activer","tui.voice.enabled":"Saisie vocale activ\xE9e (chinois/anglais) \u2014 cliquez sur [Voice] pour enregistrer","tui.voice.disabled":"Saisie vocale d\xE9sactiv\xE9e","tui.voice.send.enabled":'Envoi vocal activ\xE9 \u2014 dites\u300C\u53D1\u9001\u300Dou "send it" pour envoyer',"tui.voice.send.disabled":"Envoi vocal d\xE9sactiv\xE9","tui.command.voice.send.title":"Basculer l'envoi vocal","tui.command.voice.send.title_on":"Envoi vocal : activ\xE9 \u2014 cliquer pour d\xE9sactiver","tui.command.voice.send.title_off":"Envoi vocal : d\xE9sactiv\xE9 \u2014 cliquer pour activer","tui.voice.control.enabled":"Contr\xF4le vocal activ\xE9 \u2014 utilise le mod\xE8le multimodal pour l'\xE9dition intelligente (plus lent)","tui.voice.control.disabled":"Contr\xF4le vocal d\xE9sactiv\xE9 \u2014 utilise la transcription ASR rapide","tui.command.voice.control.title":"Basculer le contr\xF4le vocal (multimodal)","tui.command.voice.control.title_on":"Contr\xF4le vocal : activ\xE9 (multimodal) \u2014 cliquer pour d\xE9sactiver","tui.command.voice.control.title_off":"Contr\xF4le vocal : d\xE9sactiv\xE9 (ASR rapide) \u2014 cliquer pour activer","tui.voice.error.no_auth":"Utilisez /connect pour vous connecter \xE0 QitQode, ou configurez voice.asr_model pour un autre fournisseur","tui.voice.error.no_auth_provider":`Le fournisseur vocal "{{provider}}" n'est pas authentifi\xE9, v\xE9rifiez son apiKey`,"tui.voice.error.provider_not_found":`Fournisseur "{{provider}}" indisponible \u2014 /connect pour s'authentifier, ou d\xE9clarez models dans la config pour les endpoints personnalis\xE9s`,"tui.voice.error.no_url":`Le fournisseur "{{provider}}" n'a pas de baseURL configur\xE9 \u2014 d\xE9finissez options.baseURL dans la configuration`,"tui.voice.error.no_device":"Aucun microphone/appareil audio trouv\xE9 \u2014 v\xE9rifiez les param\xE8tres audio du syst\xE8me","tui.voice.error.recorder_failed":"L'enregistrement a \xE9chou\xE9","tui.voice.error.no_recorder":"Aucun outil d'enregistrement trouv\xE9, installez sox","tui.voice.error.too_short":"Enregistrement trop court","tui.voice.error.network":"La transcription a \xE9chou\xE9, v\xE9rifiez votre r\xE9seau","tui.command.prompt.stash.title":"Mettre l'invite de c\xF4t\xE9","tui.command.prompt.stash.pop.title":"R\xE9cup\xE9rer l'invite","tui.command.prompt.stash.list.title":"Liste des invites mises de c\xF4t\xE9","tui.command.tips.toggle.show":"Afficher les astuces","tui.command.tips.toggle.hide":"Masquer les astuces","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Installer un plugin","cli.providers.select":"S\xE9lectionner un fournisseur","cli.providers.other":"Autre fournisseur","tui.question.plan_enter.question":"Voulez-vous basculer en mode plan pour une planification structur\xE9e ?","tui.question.plan_enter.header":"Entrer dans le plan","tui.question.plan_enter.option.0.label":"Oui","tui.question.plan_enter.option.0.description":"Basculer vers l'agent plan pour une planification en lecture seule","tui.question.plan_enter.option.1.label":"Non","tui.question.plan_enter.option.1.description":"Rester dans le mode actuel","tui.question.plan_exit.question":"Le plan {{plan}} est termin\xE9. Voulez-vous basculer vers l'agent build pour commencer l'impl\xE9mentation ?","tui.question.plan_exit.header":"Quitter le plan","tui.question.plan_exit.option.0.label":"Oui","tui.question.plan_exit.option.0.description":"Basculer vers l'agent build et commencer l'impl\xE9mentation","tui.question.plan_exit.option.1.label":"Non","tui.question.plan_exit.option.1.description":"Rester avec l'agent plan pour continuer \xE0 affiner","tui.session.badge.auto":"Auto","trust.title":"Acc\xE8s \xE0 l'espace de travail :","trust.safety_check":"V\xE9rification rapide : est-ce un projet que vous avez cr\xE9\xE9 ou auquel vous faites confiance ? (Votre propre code, un projet open source reconnu ou un travail de votre \xE9quipe). Sinon, prenez un moment pour examiner le contenu de ce dossier.","trust.capabilities":"QitQode pourra lire, modifier et ex\xE9cuter des fichiers ici.","trust.plugin_warn":"Si des plugins malveillants existent dans ce r\xE9pertoire, ils peuvent ex\xE9cuter du code arbitraire, lire, modifier ou exfiltrer vos fichiers.","trust.option.yes":"Oui, je fais confiance \xE0 ce dossier","trust.option.no":"Non, quitter","trust.dangerous.title_home":"ATTENTION : Vous \xEAtes sur le point d'ouvrir votre R\xC9PERTOIRE PERSONNEL.","trust.dangerous.title_root":"ATTENTION : Vous \xEAtes sur le point d'ouvrir la RACINE DU SYST\xC8ME DE FICHIERS.","trust.dangerous.body_home":"Le mod\xE8le aura acc\xE8s \xE0 TOUS vos fichiers personnels \u2014 cl\xE9s SSH, identifiants, profils de navigateur et tout le contenu de votre dossier personnel.","trust.dangerous.body_root":"Le mod\xE8le aura acc\xE8s \xE0 l'ENSEMBLE du syst\xE8me de fichiers \u2014 fichiers syst\xE8me, donn\xE9es de tous les utilisateurs, identifiants et tout sur cette machine.","trust.dangerous.advice_home":"Sauf raison tr\xE8s sp\xE9cifique, NE faites PAS confiance \xE0 l'int\xE9gralit\xE9 de votre r\xE9pertoire personnel.","trust.dangerous.advice_root":"Sauf raison tr\xE8s sp\xE9cifique, NE faites PAS confiance \xE0 la racine du syst\xE8me de fichiers.","trust.dangerous.option.yes":"Je comprends les risques, faire confiance pour cette session","trust.dangerous.option.no":"Quitter (recommand\xE9)"};
|
|
3
|
-
export{f as
|
|
3
|
+
export{f as wd};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ad as H,Bd as I}from"./chunk-r48g0kaq.js";import{Pd as G}from"./chunk-9xvctnjr.js";import{Mf as B}from"./chunk-02txthqv.js";import{_f as E}from"./chunk-vzjcmwry.js";import"./chunk-6j0365q3.js";import"./chunk-7y3y3j51.js";import"./chunk-4aykrj51.js";import"./chunk-sbt7qmwm.js";import"./chunk-nfg7nt13.js";import"./chunk-ktmazmas.js";import"./chunk-qywwj58s.js";import"./chunk-va4davgy.js";import"./chunk-hg563h5r.js";import"./chunk-j1a64ade.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-ecwz9nhs.js";import"./chunk-5rkmhzq0.js";import"./chunk-7mhffm9f.js";import"./chunk-r012q335.js";import"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import"./chunk-w7p2x973.js";import"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import{pp as D}from"./chunk-kkvb2c2z.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-fhng5her.js";import"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-1p34bx7c.js";import"./chunk-q3x4x2tq.js";import"./chunk-7dckfame.js";import"./chunk-j1veq3zr.js";import"./chunk-0pvbk8ks.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import"./chunk-tsn1jkr7.js";import{qt as f}from"./chunk-zk8n8hnh.js";import"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-v2kyarwz.js";import"./chunk-dkm7x8rj.js";import"./chunk-9pe4agdz.js";import"./chunk-kc3hpmr2.js";import"./chunk-hh4c02fh.js";var T=G({command:"serve",builder:(b)=>B(b).option("auto-password",{type:"boolean",default:!1,describe:"generate a random ephemeral QITQODE_SERVER_PASSWORD for this run and print it"}),describe:"starts a headless qitqode server",handler:async(b)=>{let A=await H(b);if(b["auto-password"]&&!f.QITQODE_SERVER_PASSWORD){let z=crypto.randomUUID();process.env.QITQODE_SERVER_PASSWORD=z,console.log('Generated ephemeral server password (basic auth, username "qitqode"):'),console.log(` ${z}`)}if(I(A,f.QITQODE_SERVER_PASSWORD))console.error("ERROR: Binding to non-loopback address without QITQODE_SERVER_PASSWORD is not allowed."),console.error("Set QITQODE_SERVER_PASSWORD, pass --auto-password, or pass --no-auth to override (DANGEROUS)."),process.exit(1);if(!f.QITQODE_SERVER_PASSWORD)console.error(""),console.error("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.error("\u2551 WARNING: server is running WITHOUT authentication. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Any process or browser page that can reach this address can read \u2551"),console.error("\u2551 project files, run shell commands, and open terminals as you. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Set QITQODE_SERVER_PASSWORD, or restart with --auto-password to \u2551"),console.error("\u2551 generate an ephemeral password for this run. \u2551"),console.error("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.error("");if(process.env.QITQODE_KEY)console.log("Using QITQODE_KEY for authentication.");else if(!await D())console.error("Warning: no QitQode credential found. AI features will not work until you sign in (`qitqode auth login`) or set QITQODE_KEY.");let j=await E.listen(A);console.log(`qitqode server listening on http://${j.hostname}:${j.port}`),await new Promise(()=>{}),await j.stop()}});export{T as ServeCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{pu as k}from"./chunk-hrnx60em.js";import{lx as j,mx as z,qz as u}from"./chunk-bbznk59q.js";import"./chunk-fa03gsff.js";var q=(Q)=>typeof Q==="object"&&Q!==null&&("_zod"in Q),b=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q))Y[K]=G.addExample(W,[...X,K]);return Y},y=(Q,G,X)=>{let{schema:Y,examples:K,...W}=Q,F=W;if(q(Y))F.schema=G.registry.addSchema(Y,[...X,"schema"],{io:G.io,source:{type:"mediaType"}});else F.schema=Y;if(K)F.examples=b(K,G.registry,[...X,"examples"]);return F},C=(Q,G,X)=>{let Y={};for(let[K,W]of Object.entries(Q))if(W)Y[K]=y(W,G,[...X,K]);return Y},E=(Q,G,X)=>{let Y=Q._zod.def;switch(Y.type){case"object":return Q;case"lazy":return E(Y.getter(),G,X);case"pipe":if(G==="input")return E(Y.in,G,X);return E(Y.out,G,X)}throw Error(`Failed to unwrap ZodObject from type: ${Q._zod.def.type} at ${X.join(" > ")}`)},f=(Q,G)=>{if(G==="input")return Q._zod.optin===void 0;return Q._zod.optout===void 0},m=(Q,G,X)=>{if(!Q)return;if(q(Q)){let Y=E(Q,"output",X),K={};for(let[W,F]of Object.entries(Y._zod.def.shape))K[W]=G.addHeader(F,[...X,W]);return K}return Q},p=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q))Y[K]=G.addLink(W,[...X,K]);return Y},$=(Q,G,X)=>{if(!Q)return;let Y=[];for(let K of Q){if(q(K)){let W=G.addParameter(K,[...X,"parameters"]);Y.push(W);continue}Y.push(K)}return Y},i=(Q,G,X)=>{if(!Q)return;let Y=[];for(let[K,W]of Object.entries(Q??{})){let F=E(W,"input",X);for(let[V,L]of Object.entries(F._zod.def.shape)){let M=G.addParameter(L,[...X,K,V],{location:{in:K,name:V}});Y.push(M)}}return Y},T=(Q)=>Q.startsWith("x-"),n=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q)){if(T(K)){Y[K]=W;continue}Y[K]=G.addCallback(W,[...X,K])}return Y},o=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q)){if(!W)continue;if(T(K)){Y[K]=W;continue}if("$ref"in W){Y[K]=W;continue}Y[K]=G.addResponse(W,[...X,K])}return Y},c=(Q,G,X)=>{let{parameters:Y,requestParams:K,requestBody:W,responses:F,callbacks:V,...L}=Q,M=L,H=$(Y,G,[...X,"parameters"]),N=i(K,G,[...X,"requestParams"]);if(N||H)M.parameters=[...N??[],...H??[]];let A=W&&G.addRequestBody(W,X);if(A)M.requestBody=A;let Z=o(F,G,[...X,"responses"]);if(Z)M.responses=Z;let J=n(V,G,[...X,"callbacks"]);if(J)M.callbacks=J;return M},R=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q)){if(T(K)){Y[K]=W;continue}Y[K]=G.addPathItem(W,[...X,K])}return Y},S=["3.0.0","3.0.1","3.0.2","3.0.3","3.1.0","3.1.1"],_=(Q,G)=>S.indexOf(Q)>=S.indexOf(G),a=(Q)=>{let G=Q.zodSchema._zod.def;switch(G.type){case"bigint":Q.jsonSchema.type="integer",Q.jsonSchema.format="int64";break;case"union":{if("discriminator"in G&&typeof G.discriminator==="string"){Q.jsonSchema.oneOf??=Q.jsonSchema.anyOf,delete Q.jsonSchema.anyOf,Q.jsonSchema.type="object",Q.jsonSchema.discriminator={propertyName:G.discriminator};let Y={};for(let[K,W]of Object.entries(Q.jsonSchema.oneOf)){let F=W.$ref;if(!F){delete Q.jsonSchema.discriminator;return}let V=G.options[Number(K)]._zod.propValues?.[G.discriminator];if(!V?.size)return;for(let L of[...V??[]]){if(typeof L!=="string"&&typeof L!=="number"&&typeof L!=="boolean")return;Y[String(L)]=F}}Q.jsonSchema.discriminator.mapping=Y}let X=z.get(Q.zodSchema);if(typeof X?.unionOneOf==="boolean"){if(X.unionOneOf)Q.jsonSchema.oneOf=Q.jsonSchema.anyOf,delete Q.jsonSchema.anyOf;delete Q.jsonSchema.unionOneOf}break}case"date":Q.jsonSchema.type="string";break;case"literal":if(G.values.includes(void 0))break;break;case"undefined":Q.jsonSchema.not={};break}},l=(Q,G,X)=>{if(X.context&&Q.zodSchema._zod.parent!==X.context.zodSchema){if(X.context.zodSchema._zod.def.type==="pipe")throw Error(`Zod transform found at ${X.context.path.join(" > ")} are not supported in output schemas. Please use \`.overwrite()\` or wrap the schema in a \`.pipe()\` or assign it manual metadata with \`.meta()\``);throw Error(`Zod schema of type \`${X.context.zodSchema._zod.def.type}\` at ${X.context?.path.join(" > ")} cannot be represented in OpenAPI. Please assign it metadata with \`.meta()\``)}if(X.context=void 0,Object.keys(Q.jsonSchema).length)return;let Y=Q.zodSchema._zod.def,K=G.allowEmptySchema?.[Y.type];if(K===!0||K?.[Q.io])return;switch(Y.type){case"optional":l({...Q,zodSchema:Y.innerType},G,X);return;case"any":return;case"unknown":return;case"pipe":if(Q.io==="output"){if(!Q.zodSchema._zod.parent){X.context=Q;return}}return;case"transform":if(Q.io==="output")return;break;case"literal":if(Y.values.includes(void 0))throw Error(`Zod literal at ${Q.path.join(" > ")} cannot include \`undefined\` as a value. Please use \`z.undefined()\` or \`.optional()\` instead.`);return;case"custom":if(!Q.zodSchema._zod.parent){X.context=Q;return}}throw Error(`Zod schema of type \`${Y.type}\` at ${Q.path.join(" > ")} cannot be represented in OpenAPI. Please assign it metadata with \`.meta()\``)},r=(Q,G,X,Y)=>{let K=new Map;if(X.io==="input")return K;let W=new Map,F=new Map;for(let[V,L]of Object.entries(Q)){let M=JSON.stringify(L),H=new RegExp(`"${Y}([^"]+)"`,"g"),N=M.matchAll(H),A=new Set;for(let Z of N){let J=Z[1];if(J!==V)A.add(J)}F.set(V,M),W.set(V,{dependencies:A})}for(let[V]of F){if(!X.registry.components.schemas.ids.get(V))continue;if(x(W,F,X.registry,V))continue;let L=G.get(V)??`${V}${X.opts.outputIdSuffix??"Output"}`;K.set(V,L),Q[L]=Q[V],delete Q[V]}return K},x=(Q,G,X,Y,K=new Set)=>{if(K.has(Y))return!0;let W=Q.get(Y);if(W.pure!==void 0)return W.pure;let F=G.get(Y),V=X.components.schemas.ids.get(Y);if(V&&F!==JSON.stringify(V))return W.pure=!1,!1;K.add(Y);let L=[...W.dependencies].every((M)=>x(Q,G,X,M,new Set(K)));return W.pure=L,L},s=(Q,G={})=>{G.registry??=P({schemas:G.schemaComponents}),G.opts??={},G.io??="output";let X=Object.fromEntries(G.registry.components.schemas[G.io]),Y={zodOpenApiCreateSchema:{zodType:Q}};Object.assign(Y,X);let K=g(Y,{registry:G.registry,io:G.io,opts:{...G.opts,schemaRefPath:G.schemaRefPath},openapiVersion:G.openapiVersion});return{schema:K.schemas.zodOpenApiCreateSchema,components:K.components}},t=["param","header","unusedIO","override","outputId"],e=(Q)=>{t.forEach((G)=>{delete Q[G]})},v=(Q)=>{delete Q.$schema,delete Q.id,delete Q.$id},g=(Q,G)=>{let X=G.opts.schemaRefPath??"#/components/schemas/",Y={};for(let[D,{zodType:w}]of Object.entries(Q))Y[D]=w;let K=j();K.add(k(Y),{id:"zodOpenApiCreateSchema"});for(let[D,{zodType:w}]of G.registry.components.schemas.manual)K.add(w,{id:D});let W=new Map,F=_(G.openapiVersion??"3.1.0","3.1.0")?"$defs":"definitions",V={},L=u(K,{override(D){let w=z.get(D.zodSchema);if(w?.outputId&&w?.id)W.set(w.id,w.outputId);if(D.jsonSchema.$ref)return;let B={...D,io:G.io};if(a(B),typeof G.opts.override==="function")G.opts.override(B);if(typeof w?.override==="function")w.override(B),delete D.jsonSchema.override;if(typeof w?.override==="object"&&w.override!==null)Object.assign(D.jsonSchema,w.override),delete D.jsonSchema.override;v(D.jsonSchema),e(D.jsonSchema),l(B,G.opts,V)},io:G.io,unrepresentable:"any",reused:G.opts.reused,cycles:G.opts.cycles,target:_(G.openapiVersion??"3.1.0","3.1.0")?void 0:"openapi-3.0",uri:(D)=>D==="__shared"?`#ZOD_OPENAPI/${D}`:`#ZOD_OPENAPI/__shared#/${F}/${D}`}),M=L.schemas.__shared?.[F]??{};L.schemas.__shared??={[F]:M};let H=new Map;for(let[D,w]of Object.entries(M))if(v(w),/^schema\d+$/.test(D)){let B=`__schema${G.registry.components.schemas.dynamicSchemaCount++}`;if(H.set(D,`"${X}${B}"`),B!==D)M[B]=w,delete M[D]}for(let[D]of G.registry.components.schemas.manual){let w=L.schemas[D];if(!w)continue;v(w)}let N={},A=JSON.parse(JSON.stringify(L).replace(/"#ZOD_OPENAPI\/__shared#\/(?:\$defs|definitions)\/([^"]+)"/g,(D,w)=>{let B=H.get(w);if(B)return B;if(G.registry.components.schemas.manual.get(w))N[w]=!0;return`"${X}${w}"`})),Z=A.schemas.__shared?.[F]??{};A.schemas.__shared??={[F]:Z};for(let[D]of G.registry.components.schemas.manual){let w=A.schemas[D];if(!w)continue;if(N[D]){if(Z[D])throw Error(`Component "${D}" is already registered as a component in the registry`);Z[D]=w}}let J=r(Z,W,G,X);if(!J.size){let D=A.schemas.zodOpenApiCreateSchema?.properties;return delete A.schemas.zodOpenApiCreateSchema,delete A.schemas.__shared,{schemas:D,components:Z,manual:A.schemas}}let U=JSON.parse(JSON.stringify(A).replace(new RegExp(`"${X}([^"]+)"`,"g"),(D,w)=>{let B=J.get(w);if(B)return`"${X}${B}"`;return`"${X}${w}"`})),I=U.schemas.zodOpenApiCreateSchema?.properties,h=U.schemas.__shared?.[F]??{};return delete U.schemas.zodOpenApiCreateSchema,delete U.schemas.__shared,{schemas:I,components:h,manual:U.schemas}},P=(Q)=>{let G={components:{schemas:{dynamicSchemaCount:0,input:new Map,output:new Map,ids:new Map,manual:new Map},headers:{ids:new Map,seen:new WeakMap},requestBodies:{ids:new Map,seen:new WeakMap},responses:{ids:new Map,seen:new WeakMap},parameters:{ids:new Map,seen:new WeakMap},callbacks:{ids:new Map,seen:new WeakMap},pathItems:{ids:new Map,seen:new WeakMap},securitySchemes:{ids:new Map,seen:new WeakMap},links:{ids:new Map,seen:new WeakMap},examples:{ids:new Map,seen:new WeakMap}},addSchema:(X,Y,K)=>{let W={};return G.components.schemas[K.io].set(Y.join(" > "),{schemaObject:W,zodType:X,source:{path:Y,...K?.source}}),W},addParameter:(X,Y,K)=>{let W=G.components.parameters.seen.get(X);if(W)return W;let F=z.get(X),V=K?.location?.name??F?.param?.name,L=K?.location?.in??F?.param?.in;if(K?.location?.name&&F?.param?.name||K?.location?.in&&F?.param?.in)throw Error(`Parameter at ${Y.join(" > ")} has both \`.meta({ param: { name, in } })\` and \`.meta({ param: { location: { in, name } } })\` information`);if(!V||!L)throw Error(`Parameter at ${Y.join(" > ")} is missing \`.meta({ param: { name, in } })\` information`);let M=G.addSchema(X,[...Y,L,V,"schema"],{io:"input",source:{type:"parameter",location:{in:L,name:V}}}),{id:H,examples:N,...A}=F?.param??{},Z={in:L,name:V,schema:M,...A},J=b(N,G,[...Y,L,V,"examples"]);if(J)Z.examples=J;if(f(X,"input"))Z.required=!0;if(!Z.description&&F?.description)Z.description=F.description;let U=H??K?.manualId;if(U){if(G.components.parameters.ids.has(U))throw Error(`Schema "${U}" at ${Y.join(" > ")} is already registered`);let I={$ref:`#/components/parameters/${U}`};if(G.components.parameters.seen.set(X,I),G.components.parameters.ids.set(U,Z),K?.manualId)return Z;return I}if(K?.location?.name||K?.location?.in)return Z;return G.components.parameters.seen.set(X,Z),Z},addHeader:(X,Y,K)=>{let W=G.components.headers.seen.get(X);if(W)return W;let F=z.get(X),{id:V,...L}=F?.header??{},M=V??K?.manualId,H=L;if(f(X,"output"))H.required=!0;if(!H.description&&F?.description)H.description=F.description;if(H.schema=G.addSchema(X,[...Y,"schema"],{io:"output",source:{type:"header"}}),M){if(G.components.schemas.ids.has(M))throw Error(`Schema "${M}" at ${Y.join(" > ")} is already registered`);let N={$ref:`#/components/headers/${M}`};if(G.components.headers.ids.set(M,H),G.components.headers.seen.set(X,N),K?.manualId)return H;return N}return G.components.headers.seen.set(X,H),H},addRequestBody:(X,Y,K)=>{let W=G.components.requestBodies.seen.get(X);if(W)return W;let{content:F,id:V,...L}=X,M={...L,content:C(F,{registry:G,io:"input"},[...Y,"content"])},H=V??K?.manualId;if(H){if(G.components.requestBodies.ids.has(H))throw Error(`RequestBody "${H}" at ${Y.join(" > ")} is already registered`);let N={$ref:`#/components/requestBodies/${H}`};if(G.components.requestBodies.ids.set(H,M),G.components.requestBodies.seen.set(X,N),K?.manualId)return M;return N}return G.components.requestBodies.seen.set(X,M),M},addPathItem:(X,Y,K)=>{let W=G.components.pathItems.seen.get(X);if(W)return W;let F={},{id:V,...L}=X,M=V??K?.manualId;for(let[H,N]of Object.entries(L)){if(T(H)){F[H]=N;continue}if(H==="get"||H==="put"||H==="post"||H==="delete"||H==="options"||H==="head"||H==="patch"||H==="trace"){F[H]=c(N,G,[...Y,H]);continue}if(H==="parameters"){F[H]=$(N,G,[...Y,H]);continue}F[H]=N}if(M){if(G.components.pathItems.ids.has(M))throw Error(`PathItem "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/pathItems/${M}`};if(G.components.pathItems.ids.set(M,F),G.components.pathItems.seen.set(X,H),K?.manualId)return F;return H}return G.components.pathItems.seen.set(X,F),F},addResponse:(X,Y,K)=>{let W=G.components.responses.seen.get(X);if(W)return W;let{content:F,headers:V,links:L,id:M,...H}=X,N=H,A=m(V,G,[...Y,"headers"]);if(A)N.headers=A;if(F)N.content=C(F,{registry:G,io:"output"},[...Y,"content"]);if(L)N.links=p(L,G,[...Y,"links"]);let Z=M??K?.manualId;if(Z){if(G.components.responses.ids.has(Z))throw Error(`Response "${Z}" at ${Y.join(" > ")} is already registered`);let J={$ref:`#/components/responses/${Z}`};if(G.components.responses.ids.set(Z,N),G.components.responses.seen.set(X,J),K?.manualId)return N;return J}return G.components.responses.seen.set(X,N),N},addCallback:(X,Y,K)=>{let W=G.components.callbacks.seen.get(X);if(W)return W;let{id:F,...V}=X,L={};for(let[H,N]of Object.entries(V)){if(T(H)){L[H]=N;continue}L[H]=G.addPathItem(N,[...Y,H])}let M=F??K?.manualId;if(M){if(G.components.callbacks.ids.has(M))throw Error(`Callback "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/callbacks/${M}`};if(G.components.callbacks.ids.set(M,L),G.components.callbacks.seen.set(X,H),K?.manualId)return L;return H}return G.components.callbacks.seen.set(X,L),L},addSecurityScheme:(X,Y,K)=>{let W=G.components.securitySchemes.seen.get(X);if(W)return W;let{id:F,...V}=X,L=V,M=F??K?.manualId;if(M){if(G.components.securitySchemes.ids.has(M))throw Error(`SecurityScheme "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/securitySchemes/${M}`};if(G.components.securitySchemes.ids.set(M,L),G.components.securitySchemes.seen.set(X,H),K?.manualId)return L;return H}return G.components.securitySchemes.seen.set(X,L),L},addLink:(X,Y,K)=>{let W=G.components.links.seen.get(X);if(W)return W;let{id:F,...V}=X,L=V,M=F??K?.manualId;if(M){if(G.components.links.ids.has(M))throw Error(`Link "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/links/${M}`};if(G.components.links.ids.set(M,L),G.components.links.seen.set(X,H),K?.manualId)return L;return H}return G.components.links.seen.set(X,L),L},addExample:(X,Y,K)=>{let W=G.components.examples.seen.get(X);if(W)return W;let{id:F,...V}=X,L=V,M=F??K?.manualId;if(M){if(G.components.examples.ids.has(M))throw Error(`Example "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/examples/${M}`};if(G.components.examples.ids.set(M,L),G.components.examples.seen.set(X,H),K?.manualId)return L;return H}return G.components.examples.seen.set(X,L),L}};return GG(Q?.schemas,G),QG(Q?.parameters,G),XG(Q?.headers,G),YG(Q?.responses,G),FG(Q?.pathItems,G),KG(Q?.requestBodies,G),WG(Q?.callbacks,G),HG(Q?.securitySchemes,G),MG(Q?.links,G),LG(Q?.examples,G),G},GG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){let K=z.get(Y)?.id??X;G.components.schemas.manual.set(K,{input:{schemaObject:{}},output:{schemaObject:{}},zodType:Y});continue}G.components.schemas.ids.set(X,Y)}},QG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){let K=["components","parameters",X];G.addParameter(Y,K,{manualId:X});continue}G.components.parameters.ids.set(X,Y)}},XG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){let K=["components","headers",X];G.addHeader(Y,K,{manualId:X});continue}G.components.headers.ids.set(X,Y)}},YG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){let K=G.addResponse(Y,["components","responses",X],{manualId:X});G.components.responses.ids.set(X,K),G.components.responses.seen.set(Y,K)}},KG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){G.addRequestBody(Y,["components","requestBodies",X],{manualId:X});continue}G.components.requestBodies.ids.set(X,Y)}},WG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addCallback(Y,["components","callbacks",X],{manualId:X})},FG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addPathItem(Y,["components","pathItems",X],{manualId:X})},HG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addSecurityScheme(Y,["components","securitySchemes",X],{manualId:X})},MG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addLink(Y,["components","links",X],{manualId:X})},LG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.components.examples.ids.set(X,Y)},O=(Q)=>{let{schemas:G,components:X,manual:Y}=g(Object.fromEntries(Q.registry.components.schemas[Q.io]),Q);for(let[K,W]of Object.entries(X))Q.registry.components.schemas.ids.set(K,W);for(let[K,W]of Object.entries(G)){let F=Q.registry.components.schemas[Q.io].get(K);if(F)Object.assign(F.schemaObject,W)}for(let[K,W]of Object.entries(Y)){let F=Q.registry.components.schemas.manual.get(K);if(!F)continue;if(X[K])F[Q.io].used=!0;Object.assign(F[Q.io].schemaObject,W)}},VG=(Q)=>{for(let[G,X]of Q.components.schemas.manual)if(!X.input.used){let Y=X[z.get(X.zodType)?.unusedIO??"output"].schemaObject;Q.components.schemas.ids.set(G,Y)}},d=(Q,G,X)=>{O({registry:Q,io:"input",opts:G,openapiVersion:X}),O({registry:Q,io:"output",opts:G,openapiVersion:X}),VG(Q);let Y={};if(Q.components.schemas.ids.size>0)Y.schemas=Object.fromEntries(Q.components.schemas.ids);if(Q.components.headers.ids.size>0)Y.headers=Object.fromEntries(Q.components.headers.ids);if(Q.components.requestBodies.ids.size>0)Y.requestBodies=Object.fromEntries(Q.components.requestBodies.ids);if(Q.components.responses.ids.size>0)Y.responses=Object.fromEntries(Q.components.responses.ids);if(Q.components.parameters.ids.size>0)Y.parameters=Object.fromEntries(Q.components.parameters.ids);if(Q.components.callbacks.ids.size>0)Y.callbacks=Object.fromEntries(Q.components.callbacks.ids);if(Q.components.pathItems.ids.size>0)Y.pathItems=Object.fromEntries(Q.components.pathItems.ids);if(Q.components.securitySchemes.ids.size>0)Y.securitySchemes=Object.fromEntries(Q.components.securitySchemes.ids);if(Q.components.links.ids.size>0)Y.links=Object.fromEntries(Q.components.links.ids);if(Q.components.examples.ids.size>0)Y.examples=Object.fromEntries(Q.components.examples.ids);return Y};var AG=(Q,G={})=>{let{paths:X,webhooks:Y,components:K,...W}=Q,F=W,V=P(K),L=R(X,V,["paths"]);if(L)F.paths=L;let M=R(Y,V,["webhooks"]);if(M)F.webhooks=M;let H=d(V,G,Q.openapi);if(Object.keys(H).length>0)F.components=H;return F},JG={};export{JG as oas31,s as createSchema,AG as createDocument};
|
|
2
|
+
import{Cu as k}from"./chunk-r7xp0xcn.js";import{Dz as u,yx as j,zx as z}from"./chunk-6g3m7yxf.js";import"./chunk-hh4c02fh.js";var q=(Q)=>typeof Q==="object"&&Q!==null&&("_zod"in Q),b=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q))Y[K]=G.addExample(W,[...X,K]);return Y},y=(Q,G,X)=>{let{schema:Y,examples:K,...W}=Q,F=W;if(q(Y))F.schema=G.registry.addSchema(Y,[...X,"schema"],{io:G.io,source:{type:"mediaType"}});else F.schema=Y;if(K)F.examples=b(K,G.registry,[...X,"examples"]);return F},C=(Q,G,X)=>{let Y={};for(let[K,W]of Object.entries(Q))if(W)Y[K]=y(W,G,[...X,K]);return Y},E=(Q,G,X)=>{let Y=Q._zod.def;switch(Y.type){case"object":return Q;case"lazy":return E(Y.getter(),G,X);case"pipe":if(G==="input")return E(Y.in,G,X);return E(Y.out,G,X)}throw Error(`Failed to unwrap ZodObject from type: ${Q._zod.def.type} at ${X.join(" > ")}`)},f=(Q,G)=>{if(G==="input")return Q._zod.optin===void 0;return Q._zod.optout===void 0},m=(Q,G,X)=>{if(!Q)return;if(q(Q)){let Y=E(Q,"output",X),K={};for(let[W,F]of Object.entries(Y._zod.def.shape))K[W]=G.addHeader(F,[...X,W]);return K}return Q},p=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q))Y[K]=G.addLink(W,[...X,K]);return Y},$=(Q,G,X)=>{if(!Q)return;let Y=[];for(let K of Q){if(q(K)){let W=G.addParameter(K,[...X,"parameters"]);Y.push(W);continue}Y.push(K)}return Y},i=(Q,G,X)=>{if(!Q)return;let Y=[];for(let[K,W]of Object.entries(Q??{})){let F=E(W,"input",X);for(let[V,L]of Object.entries(F._zod.def.shape)){let M=G.addParameter(L,[...X,K,V],{location:{in:K,name:V}});Y.push(M)}}return Y},T=(Q)=>Q.startsWith("x-"),n=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q)){if(T(K)){Y[K]=W;continue}Y[K]=G.addCallback(W,[...X,K])}return Y},o=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q)){if(!W)continue;if(T(K)){Y[K]=W;continue}if("$ref"in W){Y[K]=W;continue}Y[K]=G.addResponse(W,[...X,K])}return Y},c=(Q,G,X)=>{let{parameters:Y,requestParams:K,requestBody:W,responses:F,callbacks:V,...L}=Q,M=L,H=$(Y,G,[...X,"parameters"]),N=i(K,G,[...X,"requestParams"]);if(N||H)M.parameters=[...N??[],...H??[]];let A=W&&G.addRequestBody(W,X);if(A)M.requestBody=A;let Z=o(F,G,[...X,"responses"]);if(Z)M.responses=Z;let J=n(V,G,[...X,"callbacks"]);if(J)M.callbacks=J;return M},R=(Q,G,X)=>{if(!Q)return;let Y={};for(let[K,W]of Object.entries(Q)){if(T(K)){Y[K]=W;continue}Y[K]=G.addPathItem(W,[...X,K])}return Y},S=["3.0.0","3.0.1","3.0.2","3.0.3","3.1.0","3.1.1"],_=(Q,G)=>S.indexOf(Q)>=S.indexOf(G),a=(Q)=>{let G=Q.zodSchema._zod.def;switch(G.type){case"bigint":Q.jsonSchema.type="integer",Q.jsonSchema.format="int64";break;case"union":{if("discriminator"in G&&typeof G.discriminator==="string"){Q.jsonSchema.oneOf??=Q.jsonSchema.anyOf,delete Q.jsonSchema.anyOf,Q.jsonSchema.type="object",Q.jsonSchema.discriminator={propertyName:G.discriminator};let Y={};for(let[K,W]of Object.entries(Q.jsonSchema.oneOf)){let F=W.$ref;if(!F){delete Q.jsonSchema.discriminator;return}let V=G.options[Number(K)]._zod.propValues?.[G.discriminator];if(!V?.size)return;for(let L of[...V??[]]){if(typeof L!=="string"&&typeof L!=="number"&&typeof L!=="boolean")return;Y[String(L)]=F}}Q.jsonSchema.discriminator.mapping=Y}let X=z.get(Q.zodSchema);if(typeof X?.unionOneOf==="boolean"){if(X.unionOneOf)Q.jsonSchema.oneOf=Q.jsonSchema.anyOf,delete Q.jsonSchema.anyOf;delete Q.jsonSchema.unionOneOf}break}case"date":Q.jsonSchema.type="string";break;case"literal":if(G.values.includes(void 0))break;break;case"undefined":Q.jsonSchema.not={};break}},l=(Q,G,X)=>{if(X.context&&Q.zodSchema._zod.parent!==X.context.zodSchema){if(X.context.zodSchema._zod.def.type==="pipe")throw Error(`Zod transform found at ${X.context.path.join(" > ")} are not supported in output schemas. Please use \`.overwrite()\` or wrap the schema in a \`.pipe()\` or assign it manual metadata with \`.meta()\``);throw Error(`Zod schema of type \`${X.context.zodSchema._zod.def.type}\` at ${X.context?.path.join(" > ")} cannot be represented in OpenAPI. Please assign it metadata with \`.meta()\``)}if(X.context=void 0,Object.keys(Q.jsonSchema).length)return;let Y=Q.zodSchema._zod.def,K=G.allowEmptySchema?.[Y.type];if(K===!0||K?.[Q.io])return;switch(Y.type){case"optional":l({...Q,zodSchema:Y.innerType},G,X);return;case"any":return;case"unknown":return;case"pipe":if(Q.io==="output"){if(!Q.zodSchema._zod.parent){X.context=Q;return}}return;case"transform":if(Q.io==="output")return;break;case"literal":if(Y.values.includes(void 0))throw Error(`Zod literal at ${Q.path.join(" > ")} cannot include \`undefined\` as a value. Please use \`z.undefined()\` or \`.optional()\` instead.`);return;case"custom":if(!Q.zodSchema._zod.parent){X.context=Q;return}}throw Error(`Zod schema of type \`${Y.type}\` at ${Q.path.join(" > ")} cannot be represented in OpenAPI. Please assign it metadata with \`.meta()\``)},r=(Q,G,X,Y)=>{let K=new Map;if(X.io==="input")return K;let W=new Map,F=new Map;for(let[V,L]of Object.entries(Q)){let M=JSON.stringify(L),H=new RegExp(`"${Y}([^"]+)"`,"g"),N=M.matchAll(H),A=new Set;for(let Z of N){let J=Z[1];if(J!==V)A.add(J)}F.set(V,M),W.set(V,{dependencies:A})}for(let[V]of F){if(!X.registry.components.schemas.ids.get(V))continue;if(x(W,F,X.registry,V))continue;let L=G.get(V)??`${V}${X.opts.outputIdSuffix??"Output"}`;K.set(V,L),Q[L]=Q[V],delete Q[V]}return K},x=(Q,G,X,Y,K=new Set)=>{if(K.has(Y))return!0;let W=Q.get(Y);if(W.pure!==void 0)return W.pure;let F=G.get(Y),V=X.components.schemas.ids.get(Y);if(V&&F!==JSON.stringify(V))return W.pure=!1,!1;K.add(Y);let L=[...W.dependencies].every((M)=>x(Q,G,X,M,new Set(K)));return W.pure=L,L},s=(Q,G={})=>{G.registry??=P({schemas:G.schemaComponents}),G.opts??={},G.io??="output";let X=Object.fromEntries(G.registry.components.schemas[G.io]),Y={zodOpenApiCreateSchema:{zodType:Q}};Object.assign(Y,X);let K=g(Y,{registry:G.registry,io:G.io,opts:{...G.opts,schemaRefPath:G.schemaRefPath},openapiVersion:G.openapiVersion});return{schema:K.schemas.zodOpenApiCreateSchema,components:K.components}},t=["param","header","unusedIO","override","outputId"],e=(Q)=>{t.forEach((G)=>{delete Q[G]})},v=(Q)=>{delete Q.$schema,delete Q.id,delete Q.$id},g=(Q,G)=>{let X=G.opts.schemaRefPath??"#/components/schemas/",Y={};for(let[D,{zodType:w}]of Object.entries(Q))Y[D]=w;let K=j();K.add(k(Y),{id:"zodOpenApiCreateSchema"});for(let[D,{zodType:w}]of G.registry.components.schemas.manual)K.add(w,{id:D});let W=new Map,F=_(G.openapiVersion??"3.1.0","3.1.0")?"$defs":"definitions",V={},L=u(K,{override(D){let w=z.get(D.zodSchema);if(w?.outputId&&w?.id)W.set(w.id,w.outputId);if(D.jsonSchema.$ref)return;let B={...D,io:G.io};if(a(B),typeof G.opts.override==="function")G.opts.override(B);if(typeof w?.override==="function")w.override(B),delete D.jsonSchema.override;if(typeof w?.override==="object"&&w.override!==null)Object.assign(D.jsonSchema,w.override),delete D.jsonSchema.override;v(D.jsonSchema),e(D.jsonSchema),l(B,G.opts,V)},io:G.io,unrepresentable:"any",reused:G.opts.reused,cycles:G.opts.cycles,target:_(G.openapiVersion??"3.1.0","3.1.0")?void 0:"openapi-3.0",uri:(D)=>D==="__shared"?`#ZOD_OPENAPI/${D}`:`#ZOD_OPENAPI/__shared#/${F}/${D}`}),M=L.schemas.__shared?.[F]??{};L.schemas.__shared??={[F]:M};let H=new Map;for(let[D,w]of Object.entries(M))if(v(w),/^schema\d+$/.test(D)){let B=`__schema${G.registry.components.schemas.dynamicSchemaCount++}`;if(H.set(D,`"${X}${B}"`),B!==D)M[B]=w,delete M[D]}for(let[D]of G.registry.components.schemas.manual){let w=L.schemas[D];if(!w)continue;v(w)}let N={},A=JSON.parse(JSON.stringify(L).replace(/"#ZOD_OPENAPI\/__shared#\/(?:\$defs|definitions)\/([^"]+)"/g,(D,w)=>{let B=H.get(w);if(B)return B;if(G.registry.components.schemas.manual.get(w))N[w]=!0;return`"${X}${w}"`})),Z=A.schemas.__shared?.[F]??{};A.schemas.__shared??={[F]:Z};for(let[D]of G.registry.components.schemas.manual){let w=A.schemas[D];if(!w)continue;if(N[D]){if(Z[D])throw Error(`Component "${D}" is already registered as a component in the registry`);Z[D]=w}}let J=r(Z,W,G,X);if(!J.size){let D=A.schemas.zodOpenApiCreateSchema?.properties;return delete A.schemas.zodOpenApiCreateSchema,delete A.schemas.__shared,{schemas:D,components:Z,manual:A.schemas}}let U=JSON.parse(JSON.stringify(A).replace(new RegExp(`"${X}([^"]+)"`,"g"),(D,w)=>{let B=J.get(w);if(B)return`"${X}${B}"`;return`"${X}${w}"`})),I=U.schemas.zodOpenApiCreateSchema?.properties,h=U.schemas.__shared?.[F]??{};return delete U.schemas.zodOpenApiCreateSchema,delete U.schemas.__shared,{schemas:I,components:h,manual:U.schemas}},P=(Q)=>{let G={components:{schemas:{dynamicSchemaCount:0,input:new Map,output:new Map,ids:new Map,manual:new Map},headers:{ids:new Map,seen:new WeakMap},requestBodies:{ids:new Map,seen:new WeakMap},responses:{ids:new Map,seen:new WeakMap},parameters:{ids:new Map,seen:new WeakMap},callbacks:{ids:new Map,seen:new WeakMap},pathItems:{ids:new Map,seen:new WeakMap},securitySchemes:{ids:new Map,seen:new WeakMap},links:{ids:new Map,seen:new WeakMap},examples:{ids:new Map,seen:new WeakMap}},addSchema:(X,Y,K)=>{let W={};return G.components.schemas[K.io].set(Y.join(" > "),{schemaObject:W,zodType:X,source:{path:Y,...K?.source}}),W},addParameter:(X,Y,K)=>{let W=G.components.parameters.seen.get(X);if(W)return W;let F=z.get(X),V=K?.location?.name??F?.param?.name,L=K?.location?.in??F?.param?.in;if(K?.location?.name&&F?.param?.name||K?.location?.in&&F?.param?.in)throw Error(`Parameter at ${Y.join(" > ")} has both \`.meta({ param: { name, in } })\` and \`.meta({ param: { location: { in, name } } })\` information`);if(!V||!L)throw Error(`Parameter at ${Y.join(" > ")} is missing \`.meta({ param: { name, in } })\` information`);let M=G.addSchema(X,[...Y,L,V,"schema"],{io:"input",source:{type:"parameter",location:{in:L,name:V}}}),{id:H,examples:N,...A}=F?.param??{},Z={in:L,name:V,schema:M,...A},J=b(N,G,[...Y,L,V,"examples"]);if(J)Z.examples=J;if(f(X,"input"))Z.required=!0;if(!Z.description&&F?.description)Z.description=F.description;let U=H??K?.manualId;if(U){if(G.components.parameters.ids.has(U))throw Error(`Schema "${U}" at ${Y.join(" > ")} is already registered`);let I={$ref:`#/components/parameters/${U}`};if(G.components.parameters.seen.set(X,I),G.components.parameters.ids.set(U,Z),K?.manualId)return Z;return I}if(K?.location?.name||K?.location?.in)return Z;return G.components.parameters.seen.set(X,Z),Z},addHeader:(X,Y,K)=>{let W=G.components.headers.seen.get(X);if(W)return W;let F=z.get(X),{id:V,...L}=F?.header??{},M=V??K?.manualId,H=L;if(f(X,"output"))H.required=!0;if(!H.description&&F?.description)H.description=F.description;if(H.schema=G.addSchema(X,[...Y,"schema"],{io:"output",source:{type:"header"}}),M){if(G.components.schemas.ids.has(M))throw Error(`Schema "${M}" at ${Y.join(" > ")} is already registered`);let N={$ref:`#/components/headers/${M}`};if(G.components.headers.ids.set(M,H),G.components.headers.seen.set(X,N),K?.manualId)return H;return N}return G.components.headers.seen.set(X,H),H},addRequestBody:(X,Y,K)=>{let W=G.components.requestBodies.seen.get(X);if(W)return W;let{content:F,id:V,...L}=X,M={...L,content:C(F,{registry:G,io:"input"},[...Y,"content"])},H=V??K?.manualId;if(H){if(G.components.requestBodies.ids.has(H))throw Error(`RequestBody "${H}" at ${Y.join(" > ")} is already registered`);let N={$ref:`#/components/requestBodies/${H}`};if(G.components.requestBodies.ids.set(H,M),G.components.requestBodies.seen.set(X,N),K?.manualId)return M;return N}return G.components.requestBodies.seen.set(X,M),M},addPathItem:(X,Y,K)=>{let W=G.components.pathItems.seen.get(X);if(W)return W;let F={},{id:V,...L}=X,M=V??K?.manualId;for(let[H,N]of Object.entries(L)){if(T(H)){F[H]=N;continue}if(H==="get"||H==="put"||H==="post"||H==="delete"||H==="options"||H==="head"||H==="patch"||H==="trace"){F[H]=c(N,G,[...Y,H]);continue}if(H==="parameters"){F[H]=$(N,G,[...Y,H]);continue}F[H]=N}if(M){if(G.components.pathItems.ids.has(M))throw Error(`PathItem "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/pathItems/${M}`};if(G.components.pathItems.ids.set(M,F),G.components.pathItems.seen.set(X,H),K?.manualId)return F;return H}return G.components.pathItems.seen.set(X,F),F},addResponse:(X,Y,K)=>{let W=G.components.responses.seen.get(X);if(W)return W;let{content:F,headers:V,links:L,id:M,...H}=X,N=H,A=m(V,G,[...Y,"headers"]);if(A)N.headers=A;if(F)N.content=C(F,{registry:G,io:"output"},[...Y,"content"]);if(L)N.links=p(L,G,[...Y,"links"]);let Z=M??K?.manualId;if(Z){if(G.components.responses.ids.has(Z))throw Error(`Response "${Z}" at ${Y.join(" > ")} is already registered`);let J={$ref:`#/components/responses/${Z}`};if(G.components.responses.ids.set(Z,N),G.components.responses.seen.set(X,J),K?.manualId)return N;return J}return G.components.responses.seen.set(X,N),N},addCallback:(X,Y,K)=>{let W=G.components.callbacks.seen.get(X);if(W)return W;let{id:F,...V}=X,L={};for(let[H,N]of Object.entries(V)){if(T(H)){L[H]=N;continue}L[H]=G.addPathItem(N,[...Y,H])}let M=F??K?.manualId;if(M){if(G.components.callbacks.ids.has(M))throw Error(`Callback "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/callbacks/${M}`};if(G.components.callbacks.ids.set(M,L),G.components.callbacks.seen.set(X,H),K?.manualId)return L;return H}return G.components.callbacks.seen.set(X,L),L},addSecurityScheme:(X,Y,K)=>{let W=G.components.securitySchemes.seen.get(X);if(W)return W;let{id:F,...V}=X,L=V,M=F??K?.manualId;if(M){if(G.components.securitySchemes.ids.has(M))throw Error(`SecurityScheme "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/securitySchemes/${M}`};if(G.components.securitySchemes.ids.set(M,L),G.components.securitySchemes.seen.set(X,H),K?.manualId)return L;return H}return G.components.securitySchemes.seen.set(X,L),L},addLink:(X,Y,K)=>{let W=G.components.links.seen.get(X);if(W)return W;let{id:F,...V}=X,L=V,M=F??K?.manualId;if(M){if(G.components.links.ids.has(M))throw Error(`Link "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/links/${M}`};if(G.components.links.ids.set(M,L),G.components.links.seen.set(X,H),K?.manualId)return L;return H}return G.components.links.seen.set(X,L),L},addExample:(X,Y,K)=>{let W=G.components.examples.seen.get(X);if(W)return W;let{id:F,...V}=X,L=V,M=F??K?.manualId;if(M){if(G.components.examples.ids.has(M))throw Error(`Example "${M}" at ${Y.join(" > ")} is already registered`);let H={$ref:`#/components/examples/${M}`};if(G.components.examples.ids.set(M,L),G.components.examples.seen.set(X,H),K?.manualId)return L;return H}return G.components.examples.seen.set(X,L),L}};return GG(Q?.schemas,G),QG(Q?.parameters,G),XG(Q?.headers,G),YG(Q?.responses,G),FG(Q?.pathItems,G),KG(Q?.requestBodies,G),WG(Q?.callbacks,G),HG(Q?.securitySchemes,G),MG(Q?.links,G),LG(Q?.examples,G),G},GG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){let K=z.get(Y)?.id??X;G.components.schemas.manual.set(K,{input:{schemaObject:{}},output:{schemaObject:{}},zodType:Y});continue}G.components.schemas.ids.set(X,Y)}},QG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){let K=["components","parameters",X];G.addParameter(Y,K,{manualId:X});continue}G.components.parameters.ids.set(X,Y)}},XG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){let K=["components","headers",X];G.addHeader(Y,K,{manualId:X});continue}G.components.headers.ids.set(X,Y)}},YG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){let K=G.addResponse(Y,["components","responses",X],{manualId:X});G.components.responses.ids.set(X,K),G.components.responses.seen.set(Y,K)}},KG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q)){if(q(Y)){G.addRequestBody(Y,["components","requestBodies",X],{manualId:X});continue}G.components.requestBodies.ids.set(X,Y)}},WG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addCallback(Y,["components","callbacks",X],{manualId:X})},FG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addPathItem(Y,["components","pathItems",X],{manualId:X})},HG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addSecurityScheme(Y,["components","securitySchemes",X],{manualId:X})},MG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.addLink(Y,["components","links",X],{manualId:X})},LG=(Q,G)=>{if(!Q)return;for(let[X,Y]of Object.entries(Q))G.components.examples.ids.set(X,Y)},O=(Q)=>{let{schemas:G,components:X,manual:Y}=g(Object.fromEntries(Q.registry.components.schemas[Q.io]),Q);for(let[K,W]of Object.entries(X))Q.registry.components.schemas.ids.set(K,W);for(let[K,W]of Object.entries(G)){let F=Q.registry.components.schemas[Q.io].get(K);if(F)Object.assign(F.schemaObject,W)}for(let[K,W]of Object.entries(Y)){let F=Q.registry.components.schemas.manual.get(K);if(!F)continue;if(X[K])F[Q.io].used=!0;Object.assign(F[Q.io].schemaObject,W)}},VG=(Q)=>{for(let[G,X]of Q.components.schemas.manual)if(!X.input.used){let Y=X[z.get(X.zodType)?.unusedIO??"output"].schemaObject;Q.components.schemas.ids.set(G,Y)}},d=(Q,G,X)=>{O({registry:Q,io:"input",opts:G,openapiVersion:X}),O({registry:Q,io:"output",opts:G,openapiVersion:X}),VG(Q);let Y={};if(Q.components.schemas.ids.size>0)Y.schemas=Object.fromEntries(Q.components.schemas.ids);if(Q.components.headers.ids.size>0)Y.headers=Object.fromEntries(Q.components.headers.ids);if(Q.components.requestBodies.ids.size>0)Y.requestBodies=Object.fromEntries(Q.components.requestBodies.ids);if(Q.components.responses.ids.size>0)Y.responses=Object.fromEntries(Q.components.responses.ids);if(Q.components.parameters.ids.size>0)Y.parameters=Object.fromEntries(Q.components.parameters.ids);if(Q.components.callbacks.ids.size>0)Y.callbacks=Object.fromEntries(Q.components.callbacks.ids);if(Q.components.pathItems.ids.size>0)Y.pathItems=Object.fromEntries(Q.components.pathItems.ids);if(Q.components.securitySchemes.ids.size>0)Y.securitySchemes=Object.fromEntries(Q.components.securitySchemes.ids);if(Q.components.links.ids.size>0)Y.links=Object.fromEntries(Q.components.links.ids);if(Q.components.examples.ids.size>0)Y.examples=Object.fromEntries(Q.components.examples.ids);return Y};var AG=(Q,G={})=>{let{paths:X,webhooks:Y,components:K,...W}=Q,F=W,V=P(K),L=R(X,V,["paths"]);if(L)F.paths=L;let M=R(Y,V,["webhooks"]);if(M)F.webhooks=M;let H=d(V,G,Q.openapi);if(Object.keys(H).length>0)F.components=H;return F},JG={};export{JG as oas31,s as createSchema,AG as createDocument};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Do as E,Eo as e,Fo as I}from"./chunk-w7p2x973.js";import{Ho as b,Jo as g,Ko as n,No as i,Oo as x,ap as _0,bp as O0,cp as G,dp as Z0}from"./chunk-wmw2gne9.js";import{kp as p}from"./chunk-3z1y040p.js";import{Ts as t,Vs as y,pt as T,qt as X,zt as q}from"./chunk-zk8n8hnh.js";import{At as s,Pt as d,Tt as Q}from"./chunk-1jh5p5qw.js";import{Vt as w}from"./chunk-f89gntcy.js";import{Xt as A,au as c}from"./chunk-bky5a42k.js";import{BJ as a,LF as o,ON as M,mI as B,wD as v}from"./chunk-dkm7x8rj.js";import{AP as F}from"./chunk-hh4c02fh.js";var h={};F(h,{waitForDependencies:()=>R0,layer:()=>$0,get:()=>C0,defaultLayer:()=>j0,TuiConfig:()=>h,Service:()=>C,Info:()=>W0});import r from"path";var D={};F(D,{Keybinds:()=>Q0,ConfigKeybinds:()=>D});var _=(O,Z)=>M.String.pipe(M.optional,M.withDecodingDefault(B.succeed(O))).annotate({description:Z}),B0=process.platform==="win32"?"ctrl+z,ctrl+-,super+z":"ctrl+-,super+z",K0=M.Struct({leader:_("ctrl+x","Leader key for keybind combinations"),app_exit:_("ctrl+c,ctrl+d,<leader>q","Exit the application"),editor_open:_("<leader>e","Open external editor"),theme_list:_("<leader>t","List available themes"),sidebar_toggle:_("<leader>b","Toggle sidebar"),scrollbar_toggle:_("none","Toggle session scrollbar"),status_view:_("<leader>s","View status"),session_export:_("<leader>x","Export session to editor"),session_new:_("<leader>n","Create a new session"),session_list:_("<leader>l","List all sessions"),session_timeline:_("<leader>g","Show session timeline"),session_fork:_("none","Fork session from message"),session_rename:_("ctrl+r","Rename session"),session_delete:_("ctrl+d","Delete session"),stash_delete:_("ctrl+d","Delete stash entry"),model_provider_list:_("ctrl+a","Open provider list from model dialog"),model_favorite_toggle:_("ctrl+f","Toggle model favorite status"),session_share:_("none","Share current session"),session_unshare:_("none","Unshare current session"),session_interrupt:_("escape","Interrupt current session"),session_compact:_("<leader>c","Compact the session"),messages_page_up:_("pageup,ctrl+alt+b","Scroll messages up by one page"),messages_page_down:_("pagedown,ctrl+alt+f","Scroll messages down by one page"),messages_line_up:_("ctrl+alt+y","Scroll messages up by one line"),messages_line_down:_("ctrl+alt+e","Scroll messages down by one line"),messages_half_page_up:_("ctrl+alt+u","Scroll messages up by half page"),messages_half_page_down:_("ctrl+alt+d","Scroll messages down by half page"),messages_first:_("ctrl+g,home","Navigate to first message"),messages_last:_("ctrl+alt+g,end","Navigate to last message"),messages_next:_("none","Navigate to next message"),messages_previous:_("none","Navigate to previous message"),messages_last_user:_("none","Navigate to last user message"),messages_copy:_("<leader>y","Copy message"),messages_undo:_("<leader>u","Undo message"),messages_redo:_("<leader>r","Redo message"),messages_toggle_conceal:_("<leader>h","Toggle code block concealment in messages"),tool_details:_("none","Toggle tool details visibility"),model_list:_("<leader>m","List available models"),model_cycle_recent:_("f2","Next recently used model"),model_cycle_recent_reverse:_("shift+f2","Previous recently used model"),model_cycle_favorite:_("none","Next favorite model"),model_cycle_favorite_reverse:_("none","Previous favorite model"),command_list:_("ctrl+p","List available commands"),agent_list:_("<leader>a","List agents"),agent_cycle:_("ctrl+space","Next agent"),agent_cycle_reverse:_("none","Previous agent"),variant_cycle:_("ctrl+t","Cycle model variants"),variant_list:_("none","List model variants"),input_clear:_("ctrl+c","Clear input field"),input_paste:_("super+v,ctrl+v","Paste from clipboard"),input_submit:_("return","Submit input"),input_newline:_("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline in input"),input_move_left:_("left,ctrl+b","Move cursor left in input"),input_move_right:_("right,ctrl+f","Move cursor right in input"),input_move_up:_("up","Move cursor up in input"),input_move_down:_("down","Move cursor down in input"),input_select_left:_("shift+left","Select left in input"),input_select_right:_("shift+right","Select right in input"),input_select_up:_("shift+up","Select up in input"),input_select_down:_("shift+down","Select down in input"),input_line_home:_("ctrl+a","Move to start of line in input"),input_line_end:_("ctrl+e","Move to end of line in input"),input_select_line_home:_("ctrl+shift+a","Select to start of line in input"),input_select_line_end:_("ctrl+shift+e","Select to end of line in input"),input_visual_line_home:_("alt+a","Move to start of visual line in input"),input_visual_line_end:_("alt+e","Move to end of visual line in input"),input_select_visual_line_home:_("alt+shift+a","Select to start of visual line in input"),input_select_visual_line_end:_("alt+shift+e","Select to end of visual line in input"),input_buffer_home:_("home","Move to start of buffer in input"),input_buffer_end:_("end","Move to end of buffer in input"),input_select_buffer_home:_("shift+home","Select to start of buffer in input"),input_select_buffer_end:_("shift+end","Select to end of buffer in input"),input_delete_line:_("ctrl+shift+d","Delete line in input"),input_delete_to_line_end:_("ctrl+k","Delete to end of line in input"),input_delete_to_line_start:_("ctrl+u","Delete to start of line in input"),input_backspace:_("backspace,shift+backspace","Backspace in input"),input_delete:_("ctrl+d,delete,shift+delete","Delete character in input"),input_undo:_(B0,"Undo in input"),input_redo:_("ctrl+.,super+shift+z","Redo in input"),input_word_forward:_("alt+f,alt+right,ctrl+right","Move word forward in input"),input_word_backward:_("alt+b,alt+left,ctrl+left","Move word backward in input"),input_select_word_forward:_("alt+shift+f,alt+shift+right","Select word forward in input"),input_select_word_backward:_("alt+shift+b,alt+shift+left","Select word backward in input"),input_delete_word_forward:_("alt+d,alt+delete,ctrl+delete","Delete word forward in input"),input_delete_word_backward:_("ctrl+w,ctrl+backspace,alt+backspace","Delete word backward in input"),history_previous:_("up","Previous history item"),history_next:_("down","Next history item"),session_child_first:_("<leader>down","Go to first child session"),session_child_cycle:_("right","Go to next child session"),session_child_cycle_reverse:_("left","Go to previous child session"),session_parent:_("up","Go to parent session"),terminal_suspend:_("ctrl+z","Suspend terminal"),terminal_title_toggle:_("none","Toggle terminal title"),tips_toggle:_("<leader>h","Toggle tips on home screen"),plugin_manager:_("none","Open plugin manager dialog"),display_thinking:_("none","Toggle thinking blocks visibility")}).annotate({identifier:"KeybindsConfig"}),Q0=p(K0);var V0=w.object(Object.fromEntries(Object.keys(D.Keybinds.shape).map((O)=>[O,w.string().optional()]))).strict(),R=w.object({scroll_speed:w.number().min(0.001).optional().describe("TUI scroll speed"),scroll_acceleration:w.object({enabled:w.boolean().describe("Enable scroll acceleration")}).optional().describe("Scroll acceleration settings"),diff_style:w.enum(["auto","stacked"]).optional().describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),mouse:w.boolean().optional().describe("Enable or disable mouse capture (default: true on desktop, false on Android/Termux)"),accessible:w.boolean().optional().describe("Screen-reader friendly mode: linear main-screen rendering, no mouse capture, reduced motion, no sound (default: false)"),reduce_motion:w.boolean().optional().describe("Disable spinners and other animations, showing static text instead (default: false)"),sound:w.boolean().optional().describe("Enable or disable sound cues (default: true)"),announcements:w.enum(["quiet","normal","verbose"]).optional().describe("Verbosity of accessible-mode screen-reader announcements: 'quiet' announces only turn boundaries, errors, and stops; 'normal' adds tool-start lines; 'verbose' adds tool-completion lines (default: normal). Errors are always announced.")}),P=w.object({$schema:w.string().optional(),theme:w.string().optional(),keybinds:V0.optional(),plugin:I.Spec.zod.array().optional(),plugin_enabled:w.record(w.string(),w.boolean()).optional()}).extend(R.shape).strict();var H=q.create({service:"tui.migrate"}),Y0="https://qitqode.com/tui.json",D0=P.shape.theme.optional(),l=w.record(w.string(),w.unknown()).optional(),H0=w.object({scroll_speed:R.shape.scroll_speed.catch(void 0),scroll_acceleration:R.shape.scroll_acceleration.catch(void 0),diff_style:R.shape.diff_style.catch(void 0)}).strip();async function k(O){let Z=await G0(O);for(let W of Z){let j=await Q.readText(W).catch((m)=>{H.warn("failed to read config for tui migration",{path:W,error:m});return});if(!j)continue;let V=[],K=b(j,V,{allowTrailingComma:!0});if(V.length||!K||typeof K!=="object"||Array.isArray(K))continue;let $=D0.safeParse("theme"in K?K.theme:void 0),J=l.safeParse("keybinds"in K?K.keybinds:void 0),N=l.safeParse("tui"in K?K.tui:void 0),Y={theme:$.success?$.data:void 0,keybinds:J.success?J.data:void 0,tui:N.success?N.data:void 0},L=Y.tui?J0(Y.tui):void 0;if(Y.theme===void 0&&Y.keybinds===void 0&&!L)continue;let U=r.join(r.dirname(W),"tui.json");if(await Q.exists(U))continue;let z={$schema:Y0};if(Y.theme!==void 0)z.theme=Y.theme;if(Y.keybinds!==void 0)z.keybinds=Y.keybinds;if(L)Object.assign(z,L);if(!await Q.write(U,JSON.stringify(z,null,2)).then(()=>!0).catch((m)=>{return H.warn("failed to write tui migration target",{from:W,to:U,error:m}),!1}))continue;if(!await A0(W,j)){H.warn("tui config migrated but source file was not stripped",{from:W,to:U});continue}H.info("migrated tui config",{from:W,to:U})}}function J0(O){let Z=H0.parse(O);if(Z.scroll_speed===void 0&&Z.diff_style===void 0&&Z.scroll_acceleration===void 0)return;return Z}async function A0(O,Z){let W=O+".tui-migration.bak";if(!(await Q.exists(W)?!0:await Q.write(W,Z).then(()=>!0).catch(($)=>{return H.warn("failed to backup source config during tui migration",{path:O,backup:W,error:$}),!1})))return!1;let K=["theme","keybinds","tui"].reduce(($,J)=>{let N=g($,[J],void 0,{formattingOptions:{insertSpaces:!0,tabSize:2}});if(!N.length)return $;return n($,N)},Z);return Q.write(O,K).then(()=>{return H.info("stripped tui keys from server config",{path:O,backup:W}),!0}).catch(($)=>{return H.warn("failed to strip legacy tui keys from server config",{path:O,backup:W,error:$}),!1})}async function G0(O){let Z=[...G(T.Path.config,"qitqode"),...await Q.findUp(["qitqode.json","qitqode.jsonc"],O.cwd,void 0,{rootFirst:!0})];for(let j of A(O.directories))Z.push(...G(j,"qitqode"));if(X.QITQODE_CONFIG)Z.push(X.QITQODE_CONFIG);return(await Promise.all(A(Z).map(async(j)=>{return await Q.exists(j)?j:void 0}))).filter((j)=>!!j)}var f=v.Reference("CurrentWorkingDirectory",{defaultValue:()=>process.cwd()});var u=q.create({service:"tui.config"}),W0=P;class C extends v.Service()("@qitqode/TuiConfig"){}function N0(O,Z){if(Q.contains(Z.directory,O))return"local";return"global"}function U0(O){let Z={...O};if(!("tui"in Z))return Z;if(!s(Z.tui))return delete Z.tui,Z;let W=Z.tui;return delete Z.tui,{...W,...Z}}async function M0(O,Z){if(!O.plugin)return O;for(let W=0;W<O.plugin.length;W++)O.plugin[W]=await I.resolvePluginSpec(O.plugin[W],Z);return O}async function S(O,Z,W){let j=await z0(Z);if(O.result=c(O.result,j),!j.plugin?.length)return;let V=N0(Z,W),K=I.deduplicatePluginOrigins([...O.result.plugin_origins??[],...j.plugin.map(($)=>({spec:$,scope:V,source:Z}))]);O.result.plugin=K.map(($)=>$.spec),O.result.plugin_origins=K}var I0=B.fn("TuiConfig.loadState")(function*(O){let Z=yield*O0(O.directory);yield*B.promise(()=>k({directories:Z,cwd:O.directory}));let W=X.QITQODE_DISABLE_PROJECT_CONFIG?[]:yield*_0("tui",O.directory),j={result:{}};for(let $ of G(T.Path.config,"tui"))yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);if(X.QITQODE_TUI_CONFIG){let $=X.QITQODE_TUI_CONFIG;yield*B.promise(()=>S(j,$,O)).pipe(B.orDie),u.debug("loaded custom tui config",{path:$})}for(let $ of W)yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);let V=A(Z).filter(($)=>$.endsWith(".qitqode")||$===X.QITQODE_CONFIG_DIR);for(let $ of V){if(!$.endsWith(".qitqode")&&$!==X.QITQODE_CONFIG_DIR)continue;for(let J of G($,"tui"))yield*B.promise(()=>S(j,J,O)).pipe(B.orDie)}let K={...j.result.keybinds??{}};if(process.platform==="win32")K.terminal_suspend="none",K.input_undo??=A(["ctrl+z",...D.Keybinds.shape.input_undo.parse(void 0).split(",")]).join(",");return j.result.keybinds=D.Keybinds.parse(K),{config:j.result,dirs:j.result.plugin?.length?V:[]}}),$0=o.effect(C,B.gen(function*(){let O=yield*f,Z=yield*x.Service,W=yield*I0({directory:O}),j=yield*B.forEach(W.dirs,($)=>Z.install($,{add:[{name:"@qitqode/plugin",version:y?void 0:t}]}).pipe(B.forkScoped),{concurrency:"unbounded"}),V=B.fn("TuiConfig.get")(()=>B.succeed(W.config)),K=B.fn("TuiConfig.waitForDependencies")(()=>B.forEach(j,a.join,{concurrency:"unbounded"}).pipe(B.ignore(),B.asVoid));return C.of({get:V,waitForDependencies:K})}).pipe(B.withSpan("TuiConfig.layer"))),j0=$0.pipe(o.provide(x.defaultLayer),o.provide(d.defaultLayer)),{runPromise:w0}=i(C,j0);async function R0(){await w0((O)=>O.waitForDependencies())}async function C0(){return w0((O)=>O.get())}async function z0(O){let Z=await Z0(O);if(!Z)return{};return P0(Z,O).catch((W)=>{return u.warn("failed to load tui config",{path:O,error:W}),{}})}async function P0(O,Z){return e.substitute({text:O,type:"path",path:Z,missing:"empty"}).then((W)=>E.jsonc(W,Z)).then((W)=>{if(!s(W))return{};return E.schema(W0,U0(W),Z)}).then((W)=>M0(W,Z)).catch((W)=>{return u.warn("invalid tui config",{path:Z,error:W}),{}})}
|
|
3
|
+
export{W0 as t,C as u,$0 as v,j0 as w,R0 as x,C0 as y,h as z};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import P from"fs";import B from"fs";var x;function K(){try{return B.statSync("/.dockerenv"),!0}catch{return!1}}function M(){try{return B.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function y(){if(x===void 0)x=K()||M();return x}var z,Q=()=>{try{return P.statSync("/run/.containerenv"),!0}catch{return!1}};function q(){if(z===void 0)z=Q()||y();return z}import J from"process";import V from"os";import A from"fs";var H=()=>{if(J.platform!=="linux")return!1;if(V.release().toLowerCase().includes("microsoft")){if(q())return!1;return!0}try{if(A.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft"))return!q()}catch{}if(A.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")||A.existsSync("/run/WSL"))return!q();return!1},L=J.env.__IS_WSL_TEST__?H:H();
|
|
3
|
-
export{q as
|
|
3
|
+
export{q as nr,L as or};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{mf as f}from"./chunk-y2jmtfdh.js";import{Np as x}from"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import{Ss as w}from"./chunk-tsn1jkr7.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-hh4c02fh.js";var m=w.streamUrl(),c=w.omniqueryBaseUrl()+"/runOrchestrated";class g extends Error{name="QlexNotLoggedInError";constructor(){super(w.copy().notLoggedIn)}}class E extends Error{name="QlexInsufficientBalanceError";constructor(j){super(w.copy().insufficientBalance(j))}}class C extends Error{name="QlexRateLimitError";constructor(){super(w.copy().rateLimit)}}class A extends Error{name="QlexInvalidCredentialsError";constructor(j){super(w.copy().invalidCredentials(j))}}class Q extends Error{name="QlexGatewayError";constructor(j){super(w.copy().gatewayUnavailable(j))}}var d=60000;function Dj(j){return w.sanitizeUpstreamError(j)}class T extends Error{name="QlexStreamError";constructor(j){super(w.copy().streamFailed(j))}}function h(j){return x(j)}var i=new Set(["coding","agent","research","review","chat"]);function l(j){if(j===void 0)return;if(typeof j==="string"&&i.has(j))return j;throw Error(`invalid Qortex posture: ${String(j)}`)}function n(j){if(j===void 0)return;let J=Array.isArray(j)?j:[j];if(J.every((K)=>typeof K==="string"&&/^[^/\s]+\/[^/\s]+$/.test(K)))return Array.isArray(j)?J:j;throw Error(`invalid Qortex directive registry key: ${String(j)}`)}function I(j){if(typeof j==="string")return j;if(Array.isArray(j))return j.map((J)=>{if(typeof J==="string")return J;if(J&&typeof J==="object"){let K=J;if(typeof K.text==="string")return K.text;if(typeof K.content==="string")return K.content}return""}).join("");if(j===void 0||j===null)return"";return String(j)}function s(j){if(!Array.isArray(j))return j;return j.map((J)=>{if(!J||typeof J!=="object")return J;let K=J;if(!("content"in K))return J;return{...K,content:I(K.content)}})}function a(j){if(!Array.isArray(j))return j;let J=($)=>!!$&&typeof $==="object"&&$.role==="system",K=0;while(K<j.length&&J(j[K]))K++;if(K<=1)return j;let Y=j.slice(0,K),V=Y.map(($)=>typeof $.content==="string"?$.content:String($.content??"")).filter(($)=>$.length>0).join(`
|
|
3
|
+
|
|
4
|
+
`);return[{...Y[0],role:"system",content:V},...j.slice(K)]}var R="<tool_call>",L="</tool_call>";function r(j){if(!Array.isArray(j)||j.length===0)return;let J=j.map((K)=>{try{return JSON.stringify(K)}catch{return}}).filter((K)=>K!==void 0);if(J.length===0)return;return["# Tools","","You may call one or more functions to assist with the user query.","","You are provided with function signatures within <tools></tools> XML tags:","<tools>",...J,"</tools>","","For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:","<tool_call>",'{"name": <function-name>, "arguments": <args-json-object>}',"</tool_call>","","Function results will be provided within <tool_response></tool_response> XML tags. Do not write <tool_response> blocks yourself.","Only use the functions declared above. Never invent function names, and never write out a function-call-like block in any other format."].join(`
|
|
5
|
+
`)}function t(j){let J=j.function??{},K=typeof J.name==="string"?J.name:"",Y={};if(typeof J.arguments==="string")try{Y=JSON.parse(J.arguments)}catch{Y=J.arguments}else if(J.arguments!==void 0)Y=J.arguments;return`${R}
|
|
6
|
+
${JSON.stringify({name:K,arguments:Y})}
|
|
7
|
+
${L}`}function o(j,J){if(!Array.isArray(j))return j;let K=j.map((V)=>{if(!V||typeof V!=="object")return V;let $=V;if($.role==="assistant"&&Array.isArray($.tool_calls)){let Z=$.tool_calls.map(t).join(`
|
|
8
|
+
`),z=I($.content),{tool_calls:W,...N}=$;return{...N,content:z.length>0?`${z}
|
|
9
|
+
${Z}`:Z}}if($.role==="tool"){let{tool_call_id:Z,name:z,...W}=$;return{...W,role:"user",content:`<tool_response>
|
|
10
|
+
${I($.content)}
|
|
11
|
+
</tool_response>`}}return V}),Y=r(J);if(Y){let V=0;while(V<K.length&&!!K[V]&&typeof K[V]==="object"&&K[V].role==="system")V++;K.splice(V,0,{role:"system",content:Y})}return K}function e(){return process.env.QITQODE_TOOL_PROTOCOL==="text"?"text":"native"}function jj(j){if(Array.isArray(j.tools)&&j.tools.length>0)return!0;let J=j.messages;if(!Array.isArray(J))return!1;return J.some((K)=>{if(!K||typeof K!=="object")return!1;let Y=K;return Y.role==="tool"||Y.role==="assistant"&&Array.isArray(Y.tool_calls)})}function y(j,J){let K=J?.toolMode??"native",Y=j.model??"default",V={stream:j.stream??!0};if(j.temperature!==void 0)V.temperature=j.temperature;if(j.max_tokens!==void 0)V.max_tokens=j.max_tokens;if(j.tools!==void 0)V.tools=j.tools;if(j.tool_choice!==void 0)V.tool_choice=j.tool_choice;if(j.stream_options!==void 0)V.stream_options=j.stream_options;let $=K==="text"?o(j.messages,j.tools):j.messages,Z={},z=l(j.posture);if(z!==void 0)Z.posture=z;let W=n(j.directive);if(W!==void 0)Z.directive=W;if(j.modelPersona!==void 0)Z.modelPersona=j.modelPersona;return{tier:Y,messages:a(s($)),opts:V,...Z}}function Jj(j){let J=[],K=j.indexOf(`
|
|
12
|
+
`)===-1?[j]:j.split(`
|
|
13
|
+
`);for(let Z of K){let z=Z.endsWith("\r")?Z.slice(0,-1):Z;if(!z.startsWith("data:"))continue;let W=z.slice(5);if(W.startsWith(" "))W=W.slice(1);J.push(W)}if(J.length===0)return{kind:"skip"};let Y=J.length===1?J[0]:J.join(`
|
|
14
|
+
`);if(Y==="")return{kind:"skip"};if(Y==="[DONE]")return{kind:"done"};if(Y.startsWith("[ERROR]"))return{kind:"error",message:Y.slice(7).trim()||"qlex stream error"};let V=Y.charCodeAt(0),$=V===123||V===91||V===32||V===9||V===10||V===13;try{if(!$)return{kind:"token",content:Y};let Z=JSON.parse(Y);if(Z&&typeof Z==="object"){let z=Z.id;if(z==="qlex-cost"||z==="qortex-cost")return{kind:"cost",cost:Z};if(z==="qlex-stream"&&Z.usage&&typeof Z.usage==="object"){let G=Z.choices,M;if(Array.isArray(G)&&G[0]&&typeof G[0]==="object"){let U=G[0].finish_reason;if(typeof U==="string")M=U}return{kind:"usage",usage:Z.usage,finishReason:M}}if(Array.isArray(Z.choices))return{kind:"passthrough",chunk:Z};let W=Z,N=typeof W.content==="string"?W.content:typeof W.text==="string"?W.text:typeof W.delta==="string"?W.delta:void 0;if(N!==void 0)return{kind:"token",content:N}}}catch{}return{kind:"token",content:Y}}function Kj(j,J){let K=Math.min(j.length,J.length-1);for(let Y=K;Y>=1;Y--)if(J.startsWith(j.slice(j.length-Y)))return Y;return 0}class u{onText;onToolCall;pending="";inBlock=!1;constructor(j,J){this.onText=j;this.onToolCall=J}feed(j){this.pending+=j,this.drain(!1)}flush(){if(this.drain(!0),this.inBlock)this.emitBlock(this.pending,!0),this.inBlock=!1;else if(this.pending.length>0)this.onText(this.pending);this.pending=""}drain(j){while(!0)if(!this.inBlock){let J=this.pending.indexOf(R);if(J===-1){let K=j?0:Kj(this.pending,R),Y=this.pending.length-K;if(Y>0)this.onText(this.pending.slice(0,Y)),this.pending=K>0?this.pending.slice(Y):"";return}if(J>0)this.onText(this.pending.slice(0,J));this.pending=this.pending.slice(J+R.length),this.inBlock=!0}else{let J=this.pending.indexOf(L);if(J===-1)return;if(this.emitBlock(this.pending.slice(0,J),!1),this.pending=this.pending.slice(J+L.length),this.pending.startsWith(`\r
|
|
15
|
+
`))this.pending=this.pending.slice(2);else if(this.pending.startsWith(`
|
|
16
|
+
`))this.pending=this.pending.slice(1);this.inBlock=!1}}emitBlock(j,J){try{let K=JSON.parse(j.trim());if(K&&typeof K==="object"&&typeof K.name==="string"){let Y=K.arguments;this.onToolCall({name:K.name,arguments:typeof Y==="string"?Y:JSON.stringify(Y??{})});return}}catch{}this.onText(`${R}${j}${J?"":L}`)}}function B(j,J,K){let Y={id:"qlex-stream",object:"chat.completion.chunk",created:Math.floor(Date.now()/1000),model:"qlex",choices:[{index:0,delta:j,finish_reason:J}]};if(K)Y.usage=K;return`data: ${JSON.stringify(Y)}
|
|
17
|
+
|
|
18
|
+
`}function Vj(j,J){let K=J?.toolProtocolEnabled===!0,Y=j.getReader(),V=new TextDecoder,$=new TextEncoder,Z="",z=!1,W=!1,N,G,M;return new ReadableStream({async start(U){let b=(H)=>{let X=z?{content:H}:{role:"assistant",content:H};z=!0,U.enqueue($.encode(B(X,null)))},_=0,D=K?new u(b,(H)=>{let X={...z?{}:{role:"assistant"},tool_calls:[{index:_,id:`qlexcall_${Date.now().toString(36)}_${_}`,type:"function",function:{name:H.name,arguments:H.arguments}}]};z=!0,_++,U.enqueue($.encode(B(X,null)))}):void 0,O=(H)=>D?D.feed(H):b(H),v=()=>{D?.flush();let H=N||G!==void 0?{prompt_tokens:N?.tokens.prompt??0,completion_tokens:N?.tokens.completion??0,total_tokens:N?.tokens.total??(N?.tokens.prompt??0)+(N?.tokens.completion??0),cost_usd:N?.cost_usd,cost_credits:N?.cost_credits??N?.cost_qredits,context_window:G}:void 0,X=_>0?"tool_calls":M??"stop";U.enqueue($.encode(B({},X,H))),U.enqueue($.encode(`data: [DONE]
|
|
19
|
+
|
|
20
|
+
`)),U.close(),W=!0},F=(H)=>{let X=Jj(H);switch(X.kind){case"skip":return!1;case"token":return O(X.content),!1;case"passthrough":{let k=X.chunk.choices;if(Array.isArray(k)&&k[0]&&typeof k[0]==="object"){let S=k[0].finish_reason;if(typeof S==="string")M=S}return z=!0,U.enqueue($.encode(`data: ${JSON.stringify(X.chunk)}
|
|
21
|
+
|
|
22
|
+
`)),!1}case"cost":if(X.cost.final)N=X.cost;return!1;case"usage":if(X.usage.context_window!==void 0)G=X.usage.context_window;if(X.finishReason!==void 0)M=X.finishReason;return!1;case"done":return v(),!0;case"error":return U.error(new T(X.message)),W=!0,!0}};try{while(!0){let{done:X,value:k}=await Y.read();if(X)break;Z+=V.decode(k,{stream:!0});let S;while((S=Z.indexOf(`
|
|
23
|
+
|
|
24
|
+
`))!==-1){let q=Z.slice(0,S);if(Z=Z.slice(S+2),F(q))return}}Z+=V.decode();let H=Z.replace(/\r?\n$/,"");if(H.length>0&&F(H))return;if(!W)v()}catch(H){if(!W)U.error(H instanceof T?H:new T(H instanceof Error?H.message:String(H)))}finally{Y.releaseLock()}},cancel(U){Y.cancel(U).catch(()=>{})}})}function p(j){return{content:typeof j.content==="string"?j.content:j.choices?.[0]?.message?.content??"",finishReason:j.choices?.[0]?.finish_reason??"stop"}}function Yj(j){let J=j??{},{content:K,finishReason:Y}=p(J),V=J.usage??{},$=V.prompt_tokens??0,Z=V.completion_tokens??0,z="orch-"+Date.now().toString(36),W=Math.floor(Date.now()/1000),N=(_,D,O)=>{let v={id:z,object:"chat.completion.chunk",created:W,model:"orchestrated",choices:[{index:0,delta:_,finish_reason:D}]};if(O)v.usage=O;return`data: ${JSON.stringify(v)}
|
|
25
|
+
|
|
26
|
+
`},G={prompt_tokens:$,completion_tokens:Z,total_tokens:V.total_tokens??$+Z};if(typeof V.cost_usd==="number")G.cost_usd=V.cost_usd;if(typeof V.cost_credits==="number")G.cost_credits=V.cost_credits;if(typeof V.context_window==="number")G.context_window=V.context_window;let M=[N({role:"assistant",content:""},null),N({content:K},null),N({},Y,G),`data: [DONE]
|
|
27
|
+
|
|
28
|
+
`],U=new TextEncoder,b=new ReadableStream({start(_){for(let D of M)_.enqueue(U.encode(D));_.close()}});return new Response(b,{status:200,headers:{"content-type":"text/event-stream"}})}function Wj(j){let J=j??{},{content:K,finishReason:Y}=p(J),V=J.usage??{},$=V.prompt_tokens??0,Z=V.completion_tokens??0,z={id:"orch-"+Date.now(),object:"chat.completion",created:Math.floor(Date.now()/1000),model:"orchestrated",choices:[{index:0,message:{role:"assistant",content:K},finish_reason:Y}],usage:{prompt_tokens:$,completion_tokens:Z,total_tokens:V.total_tokens??$+Z,...typeof V.cost_usd==="number"?{cost_usd:V.cost_usd}:{},...typeof V.context_window==="number"?{context_window:V.context_window}:{}}};return new Response(JSON.stringify(z),{status:200,headers:{"content-type":"application/json"}})}function Zj(j,J=globalThis.fetch,K,Y){let V=Y?.responseTimeoutMs??d;return async($,Z)=>{if(Z?.method==="POST"&&typeof Z?.body==="string"){let z;try{z=JSON.parse(Z.body)}catch{return J($,Z)}let W=e(),N=y(z,{toolMode:W}),G=await j(),M=typeof G==="string"?{key:G,method:"sso"}:G;if(!M?.key)throw new g;let U=new Headers(Z.headers);if(M.method==="api-key")U.delete("Authorization"),U.set("x-api-key",M.key);else U.delete("x-api-key"),U.set("Authorization",`Bearer ${M.key}`);if(U.set("Content-Type","application/json"),N.tier==="orchestrated"){let F=Z.signal,H=new AbortController,X=()=>H.abort(F?.reason);if(F)if(F.aborted)H.abort(F.reason);else F.addEventListener("abort",X,{once:!0});let k=!1,S=setTimeout(()=>{k=!0,H.abort()},V),q;try{q=await J(c,{method:"POST",headers:U,body:JSON.stringify(N),signal:H.signal})}catch(P){if(F?.removeEventListener("abort",X),k)throw new Q(`no response within ${Math.round(V/1000)}s`);throw P}finally{clearTimeout(S)}if(F?.removeEventListener("abort",X),q.status===402){let P=await q.text().catch(()=>"");throw new E(P||void 0)}if(q.status===429)throw new C;if(q.status===401||q.status===403){let P=await q.text().catch(()=>"");if(h(P))throw new Q(`HTTP ${q.status}`);throw await K?.().catch(()=>{}),new A(P?`HTTP ${q.status}: ${P}`:`HTTP ${q.status}`)}if(!q.ok){let P=await q.text().catch(()=>"");throw new Q(P?`HTTP ${q.status}: ${P}`:`HTTP ${q.status}`)}return Yj(await q.json())}let b=Z.signal,_=async(F)=>{let H=new AbortController,X=()=>H.abort(b?.reason);if(b)if(b.aborted)H.abort(b.reason);else b.addEventListener("abort",X,{once:!0});let k=()=>b?.removeEventListener("abort",X),S=!1,q=setTimeout(()=>{S=!0,H.abort()},V);try{return{res:await J(m,{method:"POST",headers:U,body:JSON.stringify(F),signal:H.signal}),detach:k}}catch(P){if(k(),S)throw new Q(`no response within ${Math.round(V/1000)}s`);throw P}finally{clearTimeout(q)}},{res:D,detach:O}=await _(N);if(D.status===400&&W==="native"&&jj(z))O(),await D.body?.cancel().catch(()=>{}),{res:D,detach:O}=await _(y(z,{toolMode:"text"}));try{if(D.status===402){let F=await D.text().catch(()=>"");throw new E(F||void 0)}if(D.status===429)throw new C;if(D.status===401||D.status===403){let F=await D.text().catch(()=>"");if(h(F))throw new Q(`HTTP ${D.status}`);throw await K?.().catch(()=>{}),new A(F?`HTTP ${D.status}: ${F}`:`HTTP ${D.status}`)}if(!D.ok){let F=await D.text().catch(()=>"");throw new Q(F?`HTTP ${D.status}: ${F}`:`HTTP ${D.status}`)}}catch(F){throw O(),F}if(z.stream!==!1&&D.body){let F=Array.isArray(z.tools)&&z.tools.length>0;return new Response(Vj(D.body,{toolProtocolEnabled:F}),{status:D.status,statusText:D.statusText,headers:{"content-type":"text/event-stream"}})}return D}return J($,Z)}}function Xj(j){let J=j.getToken??(async()=>j.bearerToken),K=Zj(J,globalThis.fetch,j.onInvalidCredentials);return f({name:j.name??"qlex",baseURL:w.streamBaseUrl(),fetch:K})}export{Vj as transformQlexStream,Yj as toOrchestratedSSEStream,Wj as toOpenAICompletion,Dj as sanitizeUpstreamProviderError,e as resolveToolMode,r as renderToolProtocolPrompt,Kj as partialTagSuffixLength,Jj as parseQlexFrame,s as normalizeQlexMessages,a as mergeLeadingSystemMessages,h as isGatewayRequiredError,jj as hasToolContext,I as flattenMessageContent,o as encodeToolProtocolMessages,Xj as createQlexProvider,Zj as createCustomFetch,y as buildQlexBody,u as ToolCallExtractor,R as TOOL_CALL_OPEN,L as TOOL_CALL_CLOSE,T as QlexStreamError,C as QlexRateLimitError,g as QlexNotLoggedInError,A as QlexInvalidCredentialsError,E as QlexInsufficientBalanceError,Q as QlexGatewayError,m as QLEX_STREAM_URL,d as QLEX_RESPONSE_TIMEOUT_MS,c as QLEX_ORCHESTRATED_URL};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{o as w,p as h,q as I,r as C,s as D}from"./chunk-rvvfs9ps.js";import{Gd as c,Hd as k,Id as $,Ld as x}from"./chunk-8h9r6c8g.js";import"./chunk-9jf67xb0.js";import{Pd as P}from"./chunk-9xvctnjr.js";import{Tf as d}from"./chunk-gen6f3dn.js";import{Nl as l}from"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import{Vo as v}from"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import{pt as b}from"./chunk-zk8n8hnh.js";import{Ct as m}from"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-v2kyarwz.js";import"./chunk-dkm7x8rj.js";import"./chunk-hh4c02fh.js";var j={spinner:()=>x(),log:{error:(o)=>c.error(o),info:(o)=>c.info(o),success:(o)=>c.success(o)},resolve:(o)=>v(o),...h,global:b.Path.config};function S(o){if(!o||typeof o!=="object")return;if(!("cause"in o))return;return o.cause}function _(o,e=j){let n=o.mod,a=Boolean(o.force),y=Boolean(o.global);return async(f)=>{let u=e.spinner();u.start("Installing plugin package...");let p=await I(n,e);if(!p.ok){u.stop("Install failed",1),e.log.error(`Could not install "${n}"`);let t=w(p.error);if(t.detail)e.log.error(t.detail);if(t.missing)e.log.info("This package depends on a version that is not available in your npm registry."),e.log.info("Check npm registry/auth settings and try again.");return!1}u.stop("Plugin package ready");let s=e.spinner();s.start("Reading plugin manifest...");let i=await C(p.target);if(!i.ok){if(i.code==="manifest_read_failed")return s.stop("Manifest read failed",1),e.log.error(`Installed "${n}" but failed to read ${i.file}`),e.log.error(m(S(i.error)??i.error)),!1;if(i.code==="manifest_no_targets")return s.stop("No plugin targets found",1),e.log.error(`"${n}" does not expose plugin entrypoints in package.json`),e.log.info('Expected one of: exports["./tui"], exports["./server"], package.json main for server, or package.json["oc-themes"] for tui themes.'),!1;return s.stop("Manifest read failed",1),!1}s.stop(`Detected ${i.targets.map((t)=>t.kind).join(" + ")} target${i.targets.length===1?"":"s"}`);let g=e.spinner();g.start("Updating plugin config...");let r=await D({spec:n,targets:i.targets,force:a,global:y,vcs:f.vcs,worktree:f.worktree,directory:f.directory,config:e.global},e);if(!r.ok){if(r.code==="invalid_json")return g.stop(`Failed updating ${r.kind} config`,1),e.log.error(`Invalid JSON in ${r.file} (${r.parse} at line ${r.line}, column ${r.col})`),e.log.info("Fix the config file and run the command again."),!1;return g.stop("Failed updating plugin config",1),e.log.error(m(r.error)),!1}g.stop("Plugin config updated");for(let t of r.items){if(t.mode==="noop"){e.log.info(`Already configured in ${t.file}`);continue}if(t.mode==="replace"){e.log.info(`Replaced in ${t.file}`);continue}e.log.info(`Added to ${t.file}`)}return e.log.success(`Installed ${n}`),e.log.info(y?`Scope: global (${r.dir})`:`Scope: local (${r.dir})`),!0}}var R=P({command:"plugin <module>",aliases:["plug"],describe:"install plugin and update config",builder:(o)=>{return o.positional("module",{type:"string",describe:"npm module name"}).option("global",{alias:["g"],type:"boolean",default:!1,describe:"install in global config"}).option("force",{alias:["f"],type:"boolean",default:!1,describe:"replace existing plugin version"})},handler:async(o)=>{let e=String(o.module??"").trim();if(!e){d.error("module is required"),process.exitCode=1;return}d.empty(),k(`Install plugin ${e}`);let n=_({mod:e,global:Boolean(o.global),force:Boolean(o.force)}),a=!0;if(await l.provide({directory:process.cwd(),fn:async()=>{a=await n({vcs:l.project.vcs,worktree:l.worktree,directory:l.directory})}}),$("Done"),!a)process.exitCode=1}});export{_ as createPlugTask,R as PluginCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{De as T,Fe as VG,He as c,Le as h,We as l,Xe as R,Ye as b,af as f,bf as i,cf as v}from"./chunk-x4c8drpe.js";import{Iq as KG,Jq as s,Oq as BG,Qq as S}from"./chunk-er5q8nhp.js";import{Cu as G}from"./chunk-hrnx60em.js";var EG=G.object({error:G.object({message:G.string(),type:G.string().nullish(),param:G.any().nullish(),code:G.union([G.string(),G.number()]).nullish()})}),n={errorSchema:EG,errorToMessage:(Q)=>Q.error.message};function $G(Q){var Y,Z,$,U,z,j;if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let K=(Y=Q.prompt_tokens)!=null?Y:0,W=(Z=Q.completion_tokens)!=null?Z:0,X=(U=($=Q.prompt_tokens_details)==null?void 0:$.cached_tokens)!=null?U:0,J=(j=(z=Q.completion_tokens_details)==null?void 0:z.reasoning_tokens)!=null?j:0;return{inputTokens:{total:K,noCache:K-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:W,text:W-J,reasoning:J},raw:Q}}function C(Q){var Y,Z;return(Z=(Y=Q==null?void 0:Q.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function HG(Q){switch(Q){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function AG(Q){var Y,Z,$;let U=[];for(let{role:z,content:j,...K}of Q){let W=C({...K});switch(z){case"system":{U.push({role:"system",content:j,...W});break}case"user":{if(j.length===1&&j[0].type==="text"){U.push({role:"user",content:j[0].text,...C(j[0])});break}U.push({role:"user",content:j.map((X)=>{var J;let B=C(X);switch(X.type){case"text":return{type:"text",text:X.text,...B};case"file":{if(X.mediaType.startsWith("image/")){let L=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${L};base64,${c(X.data)}`},...B}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new S({functionality:"audio file parts with URLs"});let L=HG(X.mediaType);if(L===null)throw new S({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:c(X.data),format:L},...B}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new S({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(J=X.filename)!=null?J:"document.pdf",file_data:`data:application/pdf;base64,${c(X.data)}`},...B}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(VG(X.data)):new TextDecoder().decode(X.data),...B};throw new S({functionality:`file part media type ${X.mediaType}`})}}}),...W});break}case"assistant":{let X="",J="",B=[];for(let L of j){let N=C(L);switch(L.type){case"text":{X+=L.text;break}case"reasoning":{J+=L.text;break}case"tool-call":{let H=(Z=(Y=L.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;B.push({id:L.toolCallId,type:"function",function:{name:L.toolName,arguments:JSON.stringify(L.input)},...N,...H?{extra_content:{google:{thought_signature:String(H)}}}:{}});break}}}U.push({role:"assistant",content:X,...J.length>0?{reasoning_content:J}:{},tool_calls:B.length>0?B:void 0,...W});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let J=X.output,B;switch(J.type){case"text":case"error-text":B=J.value;break;case"execution-denied":B=($=J.reason)!=null?$:"Tool execution denied.";break;case"content":case"json":case"error-json":B=JSON.stringify(J.value);break}let L=C(X);U.push({role:"tool",tool_call_id:X.toolCallId,content:B,...L})}break}default:throw Error(`Unsupported role: ${z}`)}}return U}function JG({id:Q,model:Y,created:Z}){return{id:Q!=null?Q:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function UG(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var d=G.object({user:G.string().optional(),reasoningEffort:G.string().optional(),textVerbosity:G.string().optional(),strictJsonSchema:G.boolean().optional()});function PG({tools:Q,toolChoice:Y}){Q=(Q==null?void 0:Q.length)?Q:void 0;let Z=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let $=[];for(let z of Q)if(z.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${z.id}`});else $.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(Y==null)return{tools:$,toolChoice:void 0,toolWarnings:Z};let U=Y.type;switch(U){case"auto":case"none":case"required":return{tools:$,toolChoice:U,toolWarnings:Z};case"tool":return{tools:$,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new S({functionality:`tool choice type: ${U}`})}}var CG=class{constructor(Q,Y){this.specificationVersion="v3";var Z,$;this.modelId=Q,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:n;this.chunkSchema=DG(U.errorSchema),this.failedResponseHandler=f(U),this.supportsStructuredOutputs=($=Y.supportsStructuredOutputs)!=null?$:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var Q,Y,Z;return(Z=(Y=(Q=this.config).supportedUrls)==null?void 0:Y.call(Q))!=null?Z:{}}transformRequestBody(Q){var Y,Z,$;return($=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,Q))!=null?$:Q}async getArgs({prompt:Q,maxOutputTokens:Y,temperature:Z,topP:$,topK:U,frequencyPenalty:z,presencePenalty:j,providerOptions:K,stopSequences:W,responseFormat:X,seed:J,toolChoice:B,tools:L}){var N,H,E,V,q;let A=[],I=await R({provider:"openai-compatible",providerOptions:K,schema:d});if(I!=null)A.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(I!=null?I:{},(N=await R({provider:"openaiCompatible",providerOptions:K,schema:d}))!=null?N:{},(H=await R({provider:this.providerOptionsName,providerOptions:K,schema:d}))!=null?H:{}),P=(E=D==null?void 0:D.strictJsonSchema)!=null?E:!0;if(U!=null)A.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)A.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:w,toolChoice:y,toolWarnings:u}=PG({tools:L,toolChoice:B});return{args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:$,frequency_penalty:z,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:P,name:(V=X.name)!=null?V:"response",description:X.description}}:{type:"json_object"}:void 0,stop:W,seed:J,...Object.fromEntries(Object.entries((q=K==null?void 0:K[this.providerOptionsName])!=null?q:{}).filter(([g])=>!Object.keys(d.shape).includes(g))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:AG(Q),tools:w,tool_choice:y},warnings:[...A,...u]}}async doGenerate(Q){var Y,Z,$,U,z,j,K,W;let{args:X,warnings:J}=await this.getArgs({...Q}),B=this.transformRequestBody(X),L=JSON.stringify(B),{responseHeaders:N,value:H,rawValue:E}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:B,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:v(qG),abortSignal:Q.abortSignal,fetch:this.config.fetch}),V=H.choices[0],q=[],A=V.message.content;if(A!=null&&A.length>0)q.push({type:"text",text:A});let I=(Y=V.message.reasoning_content)!=null?Y:V.message.reasoning;if(I!=null&&I.length>0)q.push({type:"reasoning",text:I});if(V.message.tool_calls!=null)for(let w of V.message.tool_calls){let y=($=(Z=w.extra_content)==null?void 0:Z.google)==null?void 0:$.thought_signature;q.push({type:"tool-call",toolCallId:(U=w.id)!=null?U:h(),toolName:w.function.name,input:w.function.arguments,...y?{providerMetadata:{[this.providerOptionsName]:{thoughtSignature:y}}}:{}})}let D={[this.providerOptionsName]:{},...await((j=(z=this.config.metadataExtractor)==null?void 0:z.extractMetadata)==null?void 0:j.call(z,{parsedBody:E}))},P=(K=H.usage)==null?void 0:K.completion_tokens_details;if((P==null?void 0:P.accepted_prediction_tokens)!=null)D[this.providerOptionsName].acceptedPredictionTokens=P==null?void 0:P.accepted_prediction_tokens;if((P==null?void 0:P.rejected_prediction_tokens)!=null)D[this.providerOptionsName].rejectedPredictionTokens=P==null?void 0:P.rejected_prediction_tokens;return{content:q,finishReason:{unified:UG(V.finish_reason),raw:(W=V.finish_reason)!=null?W:void 0},usage:$G(H.usage),providerMetadata:D,request:{body:L},response:{...JG(H),headers:N,body:E},warnings:J}}async doStream(Q){var Y;let{args:Z,warnings:$}=await this.getArgs({...Q}),U=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),z=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:j,value:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),W=[],X={unified:"other",raw:void 0},J=void 0,B=!0,L=this.providerOptionsName,N=!1,H=!1;return{stream:K.pipeThrough(new TransformStream({start(E){E.enqueue({type:"stream-start",warnings:$})},transform(E,V){var q,A,I,D,P,w,y,u,g,a,r,t,e,o,GG,QG,XG,YG;if(Q.includeRawChunks)V.enqueue({type:"raw",rawValue:E.rawValue});if(!E.success){X={unified:"error",raw:void 0},V.enqueue({type:"error",error:E.error});return}if(z==null||z.processChunk(E.rawValue),"error"in E.value){X={unified:"error",raw:void 0},V.enqueue({type:"error",error:E.value.error.message});return}let _=E.value;if(B)B=!1,V.enqueue({type:"response-metadata",...JG(_)});if(_.usage!=null)J=_.usage;let O=_.choices[0];if((O==null?void 0:O.finish_reason)!=null)X={unified:UG(O.finish_reason),raw:(q=O.finish_reason)!=null?q:void 0};if((O==null?void 0:O.delta)==null)return;let k=O.delta,ZG=(A=k.reasoning_content)!=null?A:k.reasoning;if(ZG){if(!N)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),N=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:ZG})}if(k.content){if(N)V.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;if(!H)V.enqueue({type:"text-start",id:"txt-0"}),H=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:k.content})}if(k.tool_calls!=null){if(N)V.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;for(let x of k.tool_calls){let m=(I=x.index)!=null?I:W.length;if(W[m]==null){if(x.id==null)throw new s({data:x,message:"Expected 'id' to be a string."});if(((D=x.function)==null?void 0:D.name)==null)throw new s({data:x,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:x.id,toolName:x.function.name}),W[m]={id:x.id,type:"function",function:{name:x.function.name,arguments:(P=x.function.arguments)!=null?P:""},hasFinished:!1,thoughtSignature:(u=(y=(w=x.extra_content)==null?void 0:w.google)==null?void 0:y.thought_signature)!=null?u:void 0};let M=W[m];if(((g=M.function)==null?void 0:g.name)!=null&&((a=M.function)==null?void 0:a.arguments)!=null){if(M.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:M.id,delta:M.function.arguments});if(l(M.function.arguments))V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:(r=M.id)!=null?r:h(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}continue}let F=W[m];if(F.hasFinished)continue;if(((t=x.function)==null?void 0:t.arguments)!=null)F.function.arguments+=(o=(e=x.function)==null?void 0:e.arguments)!=null?o:"";if(V.enqueue({type:"tool-input-delta",id:F.id,delta:(GG=x.function.arguments)!=null?GG:""}),((QG=F.function)==null?void 0:QG.name)!=null&&((XG=F.function)==null?void 0:XG.arguments)!=null&&l(F.function.arguments))V.enqueue({type:"tool-input-end",id:F.id}),V.enqueue({type:"tool-call",toolCallId:(YG=F.id)!=null?YG:h(),toolName:F.function.name,input:F.function.arguments,...F.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:F.thoughtSignature}}}:{}}),F.hasFinished=!0}}},flush(E){var V,q,A,I,D;if(N)E.enqueue({type:"reasoning-end",id:"reasoning-0"});if(H)E.enqueue({type:"text-end",id:"txt-0"});for(let w of W.filter((y)=>!y.hasFinished))E.enqueue({type:"tool-input-end",id:w.id}),E.enqueue({type:"tool-call",toolCallId:(V=w.id)!=null?V:h(),toolName:w.function.name,input:w.function.arguments,...w.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:w.thoughtSignature}}}:{}});let P={[L]:{},...z==null?void 0:z.buildMetadata()};if(((q=J==null?void 0:J.completion_tokens_details)==null?void 0:q.accepted_prediction_tokens)!=null)P[L].acceptedPredictionTokens=(A=J==null?void 0:J.completion_tokens_details)==null?void 0:A.accepted_prediction_tokens;if(((I=J==null?void 0:J.completion_tokens_details)==null?void 0:I.rejected_prediction_tokens)!=null)P[L].rejectedPredictionTokens=(D=J==null?void 0:J.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens;E.enqueue({type:"finish",finishReason:X,usage:$G(J),providerMetadata:P})}})),request:{body:U},response:{headers:j}}}},WG=G.looseObject({prompt_tokens:G.number().nullish(),completion_tokens:G.number().nullish(),total_tokens:G.number().nullish(),prompt_tokens_details:G.object({cached_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish(),accepted_prediction_tokens:G.number().nullish(),rejected_prediction_tokens:G.number().nullish()}).nullish()}).nullish(),qG=G.looseObject({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant").nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),reasoning:G.string().nullish(),tool_calls:G.array(G.object({id:G.string().nullish(),function:G.object({name:G.string(),arguments:G.string()}),extra_content:G.object({google:G.object({thought_signature:G.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:G.string().nullish()})),usage:WG}),wG=G.looseObject({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),reasoning:G.string().nullish(),tool_calls:G.array(G.object({index:G.number().nullish(),id:G.string().nullish(),function:G.object({name:G.string().nullish(),arguments:G.string().nullish()}),extra_content:G.object({google:G.object({thought_signature:G.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:G.string().nullish()})),usage:WG}),DG=(Q)=>G.union([wG,Q]);function jG(Q){var Y,Z;if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=Q.prompt_tokens)!=null?Y:0,U=(Z=Q.completion_tokens)!=null?Z:0;return{inputTokens:{total:$,noCache:$,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:U,text:U,reasoning:void 0},raw:Q}}function xG({prompt:Q,user:Y="user",assistant:Z="assistant"}){let $="";if(Q[0].role==="system")$+=`${Q[0].content}
|
|
2
|
+
import{Ee as T,Ge as VG,Ie as c,Me as h,Xe as l,Ye as R,Ze as b,bf as f,cf as i,df as v}from"./chunk-1fnmkm0z.js";import{$q as BG,Vq as KG,Wq as s,br as S}from"./chunk-t488d66k.js";import{Pu as G}from"./chunk-r7xp0xcn.js";var EG=G.object({error:G.object({message:G.string(),type:G.string().nullish(),param:G.any().nullish(),code:G.union([G.string(),G.number()]).nullish()})}),n={errorSchema:EG,errorToMessage:(Q)=>Q.error.message};function $G(Q){var Y,Z,$,U,z,j;if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let K=(Y=Q.prompt_tokens)!=null?Y:0,W=(Z=Q.completion_tokens)!=null?Z:0,X=(U=($=Q.prompt_tokens_details)==null?void 0:$.cached_tokens)!=null?U:0,J=(j=(z=Q.completion_tokens_details)==null?void 0:z.reasoning_tokens)!=null?j:0;return{inputTokens:{total:K,noCache:K-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:W,text:W-J,reasoning:J},raw:Q}}function C(Q){var Y,Z;return(Z=(Y=Q==null?void 0:Q.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function HG(Q){switch(Q){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function AG(Q){var Y,Z,$;let U=[];for(let{role:z,content:j,...K}of Q){let W=C({...K});switch(z){case"system":{U.push({role:"system",content:j,...W});break}case"user":{if(j.length===1&&j[0].type==="text"){U.push({role:"user",content:j[0].text,...C(j[0])});break}U.push({role:"user",content:j.map((X)=>{var J;let B=C(X);switch(X.type){case"text":return{type:"text",text:X.text,...B};case"file":{if(X.mediaType.startsWith("image/")){let L=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${L};base64,${c(X.data)}`},...B}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new S({functionality:"audio file parts with URLs"});let L=HG(X.mediaType);if(L===null)throw new S({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:c(X.data),format:L},...B}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new S({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(J=X.filename)!=null?J:"document.pdf",file_data:`data:application/pdf;base64,${c(X.data)}`},...B}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(VG(X.data)):new TextDecoder().decode(X.data),...B};throw new S({functionality:`file part media type ${X.mediaType}`})}}}),...W});break}case"assistant":{let X="",J="",B=[];for(let L of j){let N=C(L);switch(L.type){case"text":{X+=L.text;break}case"reasoning":{J+=L.text;break}case"tool-call":{let H=(Z=(Y=L.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;B.push({id:L.toolCallId,type:"function",function:{name:L.toolName,arguments:JSON.stringify(L.input)},...N,...H?{extra_content:{google:{thought_signature:String(H)}}}:{}});break}}}U.push({role:"assistant",content:X,...J.length>0?{reasoning_content:J}:{},tool_calls:B.length>0?B:void 0,...W});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let J=X.output,B;switch(J.type){case"text":case"error-text":B=J.value;break;case"execution-denied":B=($=J.reason)!=null?$:"Tool execution denied.";break;case"content":case"json":case"error-json":B=JSON.stringify(J.value);break}let L=C(X);U.push({role:"tool",tool_call_id:X.toolCallId,content:B,...L})}break}default:throw Error(`Unsupported role: ${z}`)}}return U}function JG({id:Q,model:Y,created:Z}){return{id:Q!=null?Q:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function UG(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var d=G.object({user:G.string().optional(),reasoningEffort:G.string().optional(),textVerbosity:G.string().optional(),strictJsonSchema:G.boolean().optional()});function PG({tools:Q,toolChoice:Y}){Q=(Q==null?void 0:Q.length)?Q:void 0;let Z=[];if(Q==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let $=[];for(let z of Q)if(z.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${z.id}`});else $.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(Y==null)return{tools:$,toolChoice:void 0,toolWarnings:Z};let U=Y.type;switch(U){case"auto":case"none":case"required":return{tools:$,toolChoice:U,toolWarnings:Z};case"tool":return{tools:$,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new S({functionality:`tool choice type: ${U}`})}}var CG=class{constructor(Q,Y){this.specificationVersion="v3";var Z,$;this.modelId=Q,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:n;this.chunkSchema=DG(U.errorSchema),this.failedResponseHandler=f(U),this.supportsStructuredOutputs=($=Y.supportsStructuredOutputs)!=null?$:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var Q,Y,Z;return(Z=(Y=(Q=this.config).supportedUrls)==null?void 0:Y.call(Q))!=null?Z:{}}transformRequestBody(Q){var Y,Z,$;return($=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,Q))!=null?$:Q}async getArgs({prompt:Q,maxOutputTokens:Y,temperature:Z,topP:$,topK:U,frequencyPenalty:z,presencePenalty:j,providerOptions:K,stopSequences:W,responseFormat:X,seed:J,toolChoice:B,tools:L}){var N,H,E,V,q;let A=[],I=await R({provider:"openai-compatible",providerOptions:K,schema:d});if(I!=null)A.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(I!=null?I:{},(N=await R({provider:"openaiCompatible",providerOptions:K,schema:d}))!=null?N:{},(H=await R({provider:this.providerOptionsName,providerOptions:K,schema:d}))!=null?H:{}),P=(E=D==null?void 0:D.strictJsonSchema)!=null?E:!0;if(U!=null)A.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)A.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:w,toolChoice:y,toolWarnings:u}=PG({tools:L,toolChoice:B});return{args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:$,frequency_penalty:z,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:P,name:(V=X.name)!=null?V:"response",description:X.description}}:{type:"json_object"}:void 0,stop:W,seed:J,...Object.fromEntries(Object.entries((q=K==null?void 0:K[this.providerOptionsName])!=null?q:{}).filter(([g])=>!Object.keys(d.shape).includes(g))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:AG(Q),tools:w,tool_choice:y},warnings:[...A,...u]}}async doGenerate(Q){var Y,Z,$,U,z,j,K,W;let{args:X,warnings:J}=await this.getArgs({...Q}),B=this.transformRequestBody(X),L=JSON.stringify(B),{responseHeaders:N,value:H,rawValue:E}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:B,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:v(qG),abortSignal:Q.abortSignal,fetch:this.config.fetch}),V=H.choices[0],q=[],A=V.message.content;if(A!=null&&A.length>0)q.push({type:"text",text:A});let I=(Y=V.message.reasoning_content)!=null?Y:V.message.reasoning;if(I!=null&&I.length>0)q.push({type:"reasoning",text:I});if(V.message.tool_calls!=null)for(let w of V.message.tool_calls){let y=($=(Z=w.extra_content)==null?void 0:Z.google)==null?void 0:$.thought_signature;q.push({type:"tool-call",toolCallId:(U=w.id)!=null?U:h(),toolName:w.function.name,input:w.function.arguments,...y?{providerMetadata:{[this.providerOptionsName]:{thoughtSignature:y}}}:{}})}let D={[this.providerOptionsName]:{},...await((j=(z=this.config.metadataExtractor)==null?void 0:z.extractMetadata)==null?void 0:j.call(z,{parsedBody:E}))},P=(K=H.usage)==null?void 0:K.completion_tokens_details;if((P==null?void 0:P.accepted_prediction_tokens)!=null)D[this.providerOptionsName].acceptedPredictionTokens=P==null?void 0:P.accepted_prediction_tokens;if((P==null?void 0:P.rejected_prediction_tokens)!=null)D[this.providerOptionsName].rejectedPredictionTokens=P==null?void 0:P.rejected_prediction_tokens;return{content:q,finishReason:{unified:UG(V.finish_reason),raw:(W=V.finish_reason)!=null?W:void 0},usage:$G(H.usage),providerMetadata:D,request:{body:L},response:{...JG(H),headers:N,body:E},warnings:J}}async doStream(Q){var Y;let{args:Z,warnings:$}=await this.getArgs({...Q}),U=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),z=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:j,value:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),W=[],X={unified:"other",raw:void 0},J=void 0,B=!0,L=this.providerOptionsName,N=!1,H=!1;return{stream:K.pipeThrough(new TransformStream({start(E){E.enqueue({type:"stream-start",warnings:$})},transform(E,V){var q,A,I,D,P,w,y,u,g,a,r,t,e,o,GG,QG,XG,YG;if(Q.includeRawChunks)V.enqueue({type:"raw",rawValue:E.rawValue});if(!E.success){X={unified:"error",raw:void 0},V.enqueue({type:"error",error:E.error});return}if(z==null||z.processChunk(E.rawValue),"error"in E.value){X={unified:"error",raw:void 0},V.enqueue({type:"error",error:E.value.error.message});return}let _=E.value;if(B)B=!1,V.enqueue({type:"response-metadata",...JG(_)});if(_.usage!=null)J=_.usage;let O=_.choices[0];if((O==null?void 0:O.finish_reason)!=null)X={unified:UG(O.finish_reason),raw:(q=O.finish_reason)!=null?q:void 0};if((O==null?void 0:O.delta)==null)return;let k=O.delta,ZG=(A=k.reasoning_content)!=null?A:k.reasoning;if(ZG){if(!N)V.enqueue({type:"reasoning-start",id:"reasoning-0"}),N=!0;V.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:ZG})}if(k.content){if(N)V.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;if(!H)V.enqueue({type:"text-start",id:"txt-0"}),H=!0;V.enqueue({type:"text-delta",id:"txt-0",delta:k.content})}if(k.tool_calls!=null){if(N)V.enqueue({type:"reasoning-end",id:"reasoning-0"}),N=!1;for(let x of k.tool_calls){let m=(I=x.index)!=null?I:W.length;if(W[m]==null){if(x.id==null)throw new s({data:x,message:"Expected 'id' to be a string."});if(((D=x.function)==null?void 0:D.name)==null)throw new s({data:x,message:"Expected 'function.name' to be a string."});V.enqueue({type:"tool-input-start",id:x.id,toolName:x.function.name}),W[m]={id:x.id,type:"function",function:{name:x.function.name,arguments:(P=x.function.arguments)!=null?P:""},hasFinished:!1,thoughtSignature:(u=(y=(w=x.extra_content)==null?void 0:w.google)==null?void 0:y.thought_signature)!=null?u:void 0};let M=W[m];if(((g=M.function)==null?void 0:g.name)!=null&&((a=M.function)==null?void 0:a.arguments)!=null){if(M.function.arguments.length>0)V.enqueue({type:"tool-input-delta",id:M.id,delta:M.function.arguments});if(l(M.function.arguments))V.enqueue({type:"tool-input-end",id:M.id}),V.enqueue({type:"tool-call",toolCallId:(r=M.id)!=null?r:h(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}continue}let F=W[m];if(F.hasFinished)continue;if(((t=x.function)==null?void 0:t.arguments)!=null)F.function.arguments+=(o=(e=x.function)==null?void 0:e.arguments)!=null?o:"";if(V.enqueue({type:"tool-input-delta",id:F.id,delta:(GG=x.function.arguments)!=null?GG:""}),((QG=F.function)==null?void 0:QG.name)!=null&&((XG=F.function)==null?void 0:XG.arguments)!=null&&l(F.function.arguments))V.enqueue({type:"tool-input-end",id:F.id}),V.enqueue({type:"tool-call",toolCallId:(YG=F.id)!=null?YG:h(),toolName:F.function.name,input:F.function.arguments,...F.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:F.thoughtSignature}}}:{}}),F.hasFinished=!0}}},flush(E){var V,q,A,I,D;if(N)E.enqueue({type:"reasoning-end",id:"reasoning-0"});if(H)E.enqueue({type:"text-end",id:"txt-0"});for(let w of W.filter((y)=>!y.hasFinished))E.enqueue({type:"tool-input-end",id:w.id}),E.enqueue({type:"tool-call",toolCallId:(V=w.id)!=null?V:h(),toolName:w.function.name,input:w.function.arguments,...w.thoughtSignature?{providerMetadata:{[L]:{thoughtSignature:w.thoughtSignature}}}:{}});let P={[L]:{},...z==null?void 0:z.buildMetadata()};if(((q=J==null?void 0:J.completion_tokens_details)==null?void 0:q.accepted_prediction_tokens)!=null)P[L].acceptedPredictionTokens=(A=J==null?void 0:J.completion_tokens_details)==null?void 0:A.accepted_prediction_tokens;if(((I=J==null?void 0:J.completion_tokens_details)==null?void 0:I.rejected_prediction_tokens)!=null)P[L].rejectedPredictionTokens=(D=J==null?void 0:J.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens;E.enqueue({type:"finish",finishReason:X,usage:$G(J),providerMetadata:P})}})),request:{body:U},response:{headers:j}}}},WG=G.looseObject({prompt_tokens:G.number().nullish(),completion_tokens:G.number().nullish(),total_tokens:G.number().nullish(),prompt_tokens_details:G.object({cached_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish(),accepted_prediction_tokens:G.number().nullish(),rejected_prediction_tokens:G.number().nullish()}).nullish()}).nullish(),qG=G.looseObject({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant").nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),reasoning:G.string().nullish(),tool_calls:G.array(G.object({id:G.string().nullish(),function:G.object({name:G.string(),arguments:G.string()}),extra_content:G.object({google:G.object({thought_signature:G.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:G.string().nullish()})),usage:WG}),wG=G.looseObject({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),reasoning:G.string().nullish(),tool_calls:G.array(G.object({index:G.number().nullish(),id:G.string().nullish(),function:G.object({name:G.string().nullish(),arguments:G.string().nullish()}),extra_content:G.object({google:G.object({thought_signature:G.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:G.string().nullish()})),usage:WG}),DG=(Q)=>G.union([wG,Q]);function jG(Q){var Y,Z;if(Q==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Y=Q.prompt_tokens)!=null?Y:0,U=(Z=Q.completion_tokens)!=null?Z:0;return{inputTokens:{total:$,noCache:$,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:U,text:U,reasoning:void 0},raw:Q}}function xG({prompt:Q,user:Y="user",assistant:Z="assistant"}){let $="";if(Q[0].role==="system")$+=`${Q[0].content}
|
|
3
3
|
|
|
4
4
|
`,Q=Q.slice(1);for(let{role:U,content:z}of Q)switch(U){case"system":throw new KG({message:"Unexpected system message in prompt: ${content}",prompt:Q});case"user":{let j=z.map((K)=>{switch(K.type){case"text":return K.text}}).filter(Boolean).join("");$+=`${Y}:
|
|
5
5
|
${j}
|
|
@@ -10,4 +10,4 @@ ${j}
|
|
|
10
10
|
`;break}case"tool":throw new S({functionality:"tool messages"});default:throw Error(`Unsupported role: ${U}`)}return $+=`${Z}:
|
|
11
11
|
`,{prompt:$,stopSequences:[`
|
|
12
12
|
${Y}:`]}}function LG({id:Q,model:Y,created:Z}){return{id:Q!=null?Q:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function zG(Q){switch(Q){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var IG=G.object({echo:G.boolean().optional(),logitBias:G.record(G.string(),G.number()).optional(),suffix:G.string().optional(),user:G.string().optional()}),mG=class{constructor(Q,Y){this.specificationVersion="v3";var Z;this.modelId=Q,this.config=Y;let $=(Z=Y.errorStructure)!=null?Z:n;this.chunkSchema=MG($.errorSchema),this.failedResponseHandler=f($)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var Q,Y,Z;return(Z=(Y=(Q=this.config).supportedUrls)==null?void 0:Y.call(Q))!=null?Z:{}}async getArgs({prompt:Q,maxOutputTokens:Y,temperature:Z,topP:$,topK:U,frequencyPenalty:z,presencePenalty:j,stopSequences:K,responseFormat:W,seed:X,providerOptions:J,tools:B,toolChoice:L}){var N;let H=[],E=(N=await R({provider:this.providerOptionsName,providerOptions:J,schema:IG}))!=null?N:{};if(U!=null)H.push({type:"unsupported",feature:"topK"});if(B==null?void 0:B.length)H.push({type:"unsupported",feature:"tools"});if(L!=null)H.push({type:"unsupported",feature:"toolChoice"});if(W!=null&&W.type!=="text")H.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:V,stopSequences:q}=xG({prompt:Q}),A=[...q!=null?q:[],...K!=null?K:[]];return{args:{model:this.modelId,echo:E.echo,logit_bias:E.logitBias,suffix:E.suffix,user:E.user,max_tokens:Y,temperature:Z,top_p:$,frequency_penalty:z,presence_penalty:j,seed:X,...J==null?void 0:J[this.providerOptionsName],prompt:V,stop:A.length>0?A:void 0},warnings:H}}async doGenerate(Q){let{args:Y,warnings:Z}=await this.getArgs(Q),{responseHeaders:$,value:U,rawValue:z}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:v(FG),abortSignal:Q.abortSignal,fetch:this.config.fetch}),j=U.choices[0],K=[];if(j.text!=null&&j.text.length>0)K.push({type:"text",text:j.text});return{content:K,usage:jG(U.usage),finishReason:{unified:zG(j.finish_reason),raw:j.finish_reason},request:{body:Y},response:{...LG(U),headers:$,body:z},warnings:Z}}async doStream(Q){let{args:Y,warnings:Z}=await this.getArgs(Q),$={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:U,value:z}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:T(this.config.headers(),Q.headers),body:$,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:i(this.chunkSchema),abortSignal:Q.abortSignal,fetch:this.config.fetch}),j={unified:"other",raw:void 0},K=void 0,W=!0;return{stream:z.pipeThrough(new TransformStream({start(X){X.enqueue({type:"stream-start",warnings:Z})},transform(X,J){var B;if(Q.includeRawChunks)J.enqueue({type:"raw",rawValue:X.rawValue});if(!X.success){j={unified:"error",raw:void 0},J.enqueue({type:"error",error:X.error});return}let L=X.value;if("error"in L){j={unified:"error",raw:void 0},J.enqueue({type:"error",error:L.error});return}if(W)W=!1,J.enqueue({type:"response-metadata",...LG(L)}),J.enqueue({type:"text-start",id:"0"});if(L.usage!=null)K=L.usage;let N=L.choices[0];if((N==null?void 0:N.finish_reason)!=null)j={unified:zG(N.finish_reason),raw:(B=N.finish_reason)!=null?B:void 0};if((N==null?void 0:N.text)!=null)J.enqueue({type:"text-delta",id:"0",delta:N.text})},flush(X){if(!W)X.enqueue({type:"text-end",id:"0"});X.enqueue({type:"finish",finishReason:j,usage:jG(K)})}})),request:{body:$},response:{headers:U}}}},NG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number()}),FG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({text:G.string(),finish_reason:G.string()})),usage:NG.nullish()}),MG=(Q)=>G.union([G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({text:G.string(),finish_reason:G.string().nullish(),index:G.number()})),usage:NG.nullish()}),Q]),p=G.object({dimensions:G.number().optional(),user:G.string().optional()}),sG=class{constructor(Q,Y){this.specificationVersion="v3",this.modelId=Q,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var Q;return(Q=this.config.maxEmbeddingsPerCall)!=null?Q:2048}get supportsParallelCalls(){var Q;return(Q=this.config.supportsParallelCalls)!=null?Q:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:Q,headers:Y,abortSignal:Z,providerOptions:$}){var U,z,j;let K=[],W=await R({provider:"openai-compatible",providerOptions:$,schema:p});if(W!=null)K.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let X=Object.assign(W!=null?W:{},(U=await R({provider:"openaiCompatible",providerOptions:$,schema:p}))!=null?U:{},(z=await R({provider:this.providerOptionsName,providerOptions:$,schema:p}))!=null?z:{});if(Q.length>this.maxEmbeddingsPerCall)throw new BG({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:Q});let{responseHeaders:J,value:B,rawValue:L}=await b({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:T(this.config.headers(),Y),body:{model:this.modelId,input:Q,encoding_format:"float",dimensions:X.dimensions,user:X.user},failedResponseHandler:f((j=this.config.errorStructure)!=null?j:n),successfulResponseHandler:v(SG),abortSignal:Z,fetch:this.config.fetch});return{warnings:K,embeddings:B.data.map((N)=>N.embedding),usage:B.usage?{tokens:B.usage.prompt_tokens}:void 0,providerMetadata:B.providerMetadata,response:{headers:J,body:L}}}},SG=G.object({data:G.array(G.object({embedding:G.array(G.number())})),usage:G.object({prompt_tokens:G.number()}).nullish(),providerMetadata:G.record(G.string(),G.record(G.string(),G.any())).optional()});var nG=G.object({data:G.array(G.object({b64_json:G.string()}))});
|
|
13
|
-
export{CG as
|
|
13
|
+
export{CG as Be,mG as Ce,sG as De};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{s as
|
|
2
|
+
import{Hk as e}from"./chunk-7mhffm9f.js";import{Hl as r}from"./chunk-0z3z0gk1.js";import{Vt as o}from"./chunk-f89gntcy.js";var s=o.object({id:e.zod,type:o.string(),name:o.string(),branch:o.string().nullable(),directory:o.string().nullable(),extra:o.unknown().nullable(),projectID:r.zod});
|
|
3
|
+
export{s as Ig};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Tl as A,Ul as e,Vl as oo,Wl as io,Zl as M}from"./chunk-g7vkkmsk.js";import{fp as Oo}from"./chunk-y3n31nnx.js";import{Ap as Qo}from"./chunk-3tdqsm5c.js";import{$r as F,as as s,gs as q,hs as t}from"./chunk-wf09j72q.js";import{Ts as m,Us as k,lt as Zo,mt as E,pt as _o,qt as y,zt as T}from"./chunk-zk8n8hnh.js";import{Tt as P}from"./chunk-1jh5p5qw.js";import{Vt as o}from"./chunk-f89gntcy.js";import{LF as B,NO as v,ON as U,eG as I,mI as V,wD as r}from"./chunk-dkm7x8rj.js";import{AP as a,CP as zo,yP as Yo}from"./chunk-hh4c02fh.js";var Fo={};a(Fo,{stopRefresh:()=>vo,startRefresh:()=>Io,refresh:()=>u,readModelCatalogResponse:()=>yo,get:()=>So,Provider:()=>Lo,Model:()=>Bo,MODEL_CATALOG_MAX_BYTES:()=>$o,Data:()=>D});import Do from"path";var z={};a(z,{layer:()=>bo,isPreview:()=>qo,isNewerVersion:()=>no,isLocal:()=>Go,getReleaseType:()=>wo,defaultLayer:()=>Uo,UpgradeFailedError:()=>N,USER_AGENT:()=>Ko,Service:()=>L,Installation:()=>z,Info:()=>Ho,Event:()=>Ro});var f=(i)=>i.pipe(q.retryTransient({retryOn:"errors-and-responses",times:2,schedule:I.exponential(200).pipe(I.jittered)}));import c from"path";var x=Yo(Oo(),1);var l=T.create({service:"installation"}),G="@qitqode/cli";function no(i,n){if(!x.default.valid(i)||!x.default.valid(n))return!1;return x.default.gt(n,i)}var Ro={Updated:M.define("installation.updated",o.object({version:o.string()})),UpdateAvailable:M.define("installation.update-available",o.object({version:o.string()}))};function wo(i,n){if(!no(i,n))throw Error(`Version ${n} is not newer than ${i}`);let j=x.default.major(i),Z=x.default.minor(i),$=x.default.major(n),_=x.default.minor(n);if($>j)return"major";if(_>Z)return"minor";return"patch"}var Ho=o.object({version:o.string(),latest:o.string()}).meta({ref:"InstallationInfo"}),Ko=`qitqode/${k}/${m}/${y.QITQODE_CLIENT}`;function qo(){return k!=="latest"}function Go(){return k==="local"}class N extends U.TaggedErrorClass()("UpgradeFailedError",{stderr:U.String}){}var No=U.Struct({version:U.String});class L extends r.Service()("@qitqode/Installation"){}var bo=B.effect(L,V.gen(function*(){let i=yield*q.HttpClient,n=q.filterStatusOk(f(i)),j=yield*A.ChildProcessSpawner,Z=(J,b)=>e.make(J[0],J.slice(1),{cwd:b?.cwd,env:b?.env,extendEnv:!0}),$=V.fnUntraced(function*(J){let b=yield*io(j,J);return{code:b.code,stdout:b.text,stderr:b.stderr}},V.scoped),_=V.fnUntraced(function*(J,b){let Q=yield*j.spawn(Z(J,b)),W=yield*v.mkString(v.decodeText(Q.stdout));return yield*Q.exitCode,W},V.scoped,V.catch(()=>V.succeed(""))),O=V.fnUntraced(function*(J,b){return yield*$(Z(J,b))},V.catch(()=>V.succeed({code:A.ExitCode(1),stdout:"",stderr:""}))),K=V.fn("Installation.method")(function*(){if(process.execPath.includes(c.join(".qitqode","bin")))return"curl";if(process.execPath.includes(c.join(".local","bin")))return"curl";let J=process.execPath.toLowerCase(),b=[{name:"npm",command:()=>_(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>_(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>_(["bun","pm","ls","-g"])}];b.sort((Q,W)=>{let w=J.includes(Q.name),p=J.includes(W.name);if(w&&!p)return-1;if(!w&&p)return 1;return 0});for(let Q of b)if((yield*Q.command()).includes(G))return Q.name;return"unknown"}),X=V.fn("Installation.latest")(function*(J){let b=J||(yield*K());if(b==="curl"){let W=(yield*_(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(W)return W[1];return yield*V.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(b==="npm"||b==="bun"||b==="pnpm"){let W=(yield*_(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",w=W.endsWith("/")?W.slice(0,-1):W,p=yield*n.execute(F.get(`${w}/${encodeURIComponent(G)}/${k}`).pipe(F.acceptJson));return(yield*s.schemaBodyJson(No)(p)).version}return l.warn("unsupported update channel, skipping",{method:b}),yield*V.die(Error(`unsupported update channel: ${b}`))},V.orDie),R=V.fn("Installation.upgrade")(function*(J,b){let W=yield*(()=>{if(J==="npm")return O(["npm","install","-g",`${G}@${b}`]);if(J==="pnpm")return O(["pnpm","install","-g",`${G}@${b}`]);if(J==="bun")return O(["bun","install","-g",`${G}@${b}`]);if(J==="curl")return new N({stderr:"Self-update is unavailable for script installations; reinstall QitQode from a trusted package."});return new N({stderr:`Unknown method: ${J}`})})();if(W.code!==0){let w=W.stderr||"";return yield*new N({stderr:w})}l.info("upgraded",{method:J,target:b,stdout:W.stdout,stderr:W.stderr}),yield*_([process.execPath,"--version"])});return L.of({info:V.fn("Installation.info")(function*(){return{version:m,latest:yield*X()}}),method:K,latest:X,upgrade:R})})),Uo=bo.pipe(B.provide(t.layer),B.provide(oo));var C=o.lazy(()=>o.union([o.string(),o.number(),o.boolean(),o.null(),o.array(C),o.record(o.string(),C)])),jo=o.object({input:o.number(),output:o.number(),cache_read:o.number().optional(),cache_write:o.number().optional(),context_over_200k:o.object({input:o.number(),output:o.number(),cache_read:o.number().optional(),cache_write:o.number().optional()}).optional()}),d=o.object({id:o.string(),name:o.string(),family:o.string().optional(),release_date:o.string(),attachment:o.boolean(),reasoning:o.boolean(),temperature:o.boolean().optional(),tool_call:o.boolean(),interleaved:o.union([o.literal(!0),o.object({field:o.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:jo.optional(),limit:o.object({context:o.number(),input:o.number().optional(),output:o.number()}),modalities:o.object({input:o.array(o.enum(["text","audio","image","video","pdf"])),output:o.array(o.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:o.object({modes:o.record(o.string(),o.object({cost:jo.optional(),provider:o.object({body:o.record(o.string(),C).optional(),headers:o.record(o.string(),o.string()).optional()}).optional()})).optional()}).optional(),status:o.enum(["alpha","beta","deprecated"]).optional(),provider:o.object({npm:o.string().optional(),api:o.string().optional()}).optional()}),g=o.object({api:o.string().optional(),name:o.string(),env:o.array(o.string()),id:o.string(),npm:o.string().optional(),models:o.record(o.string(),d)});var h=T.create({service:"models.dev"}),Jo=xo(),Y=Do.join(_o.Path.cache,Jo==="https://models.dev"?"models.json":`models-${Zo.fast(Jo)}.json`),Po=300000,$o=8388608,H,po=o.record(o.string(),g),Bo=d,Lo=g;function xo(){return y.QITQODE_MODELS_URL||"https://models.dev"}function To(){return Date.now()-Number(P.stat(Y)?.mtimeMs??0)<Po}function Vo(i){return!i&&To()}function S(i){let n=po.parse(typeof i==="string"?JSON.parse(i):i);for(let[j,Z]of Object.entries(n))if(Z.id!==j)throw Error(`Invalid model provider: ${j}`);return n}async function Wo(i){let n=await P.readJson(i).catch(()=>{return});if(!n)return;try{return S(n)}catch(j){h.warn("Ignoring invalid model catalog cache",{file:i,error:j});return}}async function yo(i,n,j=$o){let Z=i.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if(Z!=="application/json"&&!Z?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${Z||"missing"}`);let $=Number(i.headers.get("content-length"));if(Number.isFinite($)&&$>j)throw Error("Model catalog response is too large");if(!i.body)return"";let _=i.body.getReader(),O=()=>void _.cancel(n.reason);n.addEventListener("abort",O,{once:!0});let K=new Uint8Array(j),X=0;try{for(;;){let R=await _.read();if(R.done)break;if(X+=R.value.byteLength,X>j)throw await _.cancel(),Error("Model catalog response is too large");K.set(R.value,X-R.value.byteLength)}}finally{n.removeEventListener("abort",O)}return new TextDecoder().decode(K.subarray(0,X))}var Xo=async()=>{let i=AbortSignal.timeout(1e4),n=await fetch(`${xo()}/api.json`,{headers:{"User-Agent":z.USER_AGENT},signal:i});if(!n.ok)return;let j=S(await yo(n,i));return JSON.stringify(j)},D=Qo(async()=>{let i=await Wo(y.QITQODE_MODELS_PATH??Y);if(i)return i;let n=await import("./chunk-wj6aq50n.js").then((j)=>S(j.snapshot)).catch(()=>{return});if(n)return n;if(y.QITQODE_DISABLE_MODELS_FETCH)return{};return E.withLock(`models-dev:${Y}`,async()=>{let j=await Wo(y.QITQODE_MODELS_PATH??Y);if(j)return j;let Z=await Xo();if(Z)return await P.write(Y,Z).catch(($)=>{h.error("Failed to write models cache",{error:$})}),S(Z);return{}})});async function So(){return D()}async function u(i=!1){if(Vo(i))return D.reset();await E.withLock(`models-dev:${Y}`,async()=>{if(Vo(i))return D.reset();let n=await Xo();if(!n)return;await P.write(Y,n),D.reset()}).catch((n)=>{h.error("Failed to fetch models.dev",{error:n})})}function Io(){if(H||y.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;u(),H=setInterval(async()=>{await u()},3600000),H.unref()}function vo(){if(!H)return;clearInterval(H),H=void 0}
|
|
3
|
+
export{f as el,z as fl,$o as gl,Bo as hl,Lo as il,yo as jl,D as kl,So as ll,u as ml,Io as nl,vo as ol,Fo as pl};
|