jialing-code 1.2.0 → 1.3.1
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/dist/{chunk-ata64rnb.js → chunk-02z1b3pn.js} +1 -1
- package/dist/{chunk-yjbxnshv.js → chunk-031788by.js} +5 -5
- package/dist/{chunk-63r6wx91.js → chunk-03bw81yf.js} +1 -1
- package/dist/{chunk-a9qyv65k.js → chunk-06bja8ne.js} +5 -5
- package/dist/{chunk-5amndp82.js → chunk-072ddspk.js} +15 -15
- package/dist/{chunk-9x7v2172.js → chunk-07nwaffm.js} +26 -26
- package/dist/{chunk-fnp4masn.js → chunk-086g9x56.js} +20 -20
- package/dist/{chunk-vds1kh8j.js → chunk-097hawk8.js} +19 -19
- package/dist/{chunk-4kh3yeqx.js → chunk-0mgw2mkr.js} +11 -11
- package/dist/{chunk-t1nnzjgg.js → chunk-0n4e5as3.js} +2 -2
- package/dist/{chunk-sakgp0hv.js → chunk-0pft9pn6.js} +23 -23
- package/dist/{chunk-7ngmattt.js → chunk-0qc1fc2k.js} +1 -1
- package/dist/{chunk-gvm0fdsh.js → chunk-14k25g8v.js} +2 -2
- package/dist/{chunk-ermy23fb.js → chunk-181z55tq.js} +2 -2
- package/dist/{chunk-dz8c7ac9.js → chunk-1b379t1d.js} +21 -21
- package/dist/{chunk-6mhseqjj.js → chunk-1be31ygd.js} +22 -22
- package/dist/{chunk-a5y3eyz5.js → chunk-1cr92538.js} +21 -21
- package/dist/{chunk-bqac4egk.js → chunk-1fr94msa.js} +30 -30
- package/dist/{chunk-a2dn46wv.js → chunk-1fx2tx6h.js} +17 -17
- package/dist/chunk-1gn0rpnx.js +520 -0
- package/dist/{chunk-2v3gb9q9.js → chunk-1h2fx4jh.js} +20 -20
- package/dist/{chunk-v9fghq77.js → chunk-1kn1wpac.js} +19 -19
- package/dist/{chunk-88r7kwgj.js → chunk-1m23ntdh.js} +5 -5
- package/dist/{chunk-qaxe3dpf.js → chunk-1s97s4ph.js} +22 -22
- package/dist/{chunk-y997ehrm.js → chunk-20xxnafe.js} +1 -1
- package/dist/chunk-238g70xa.js +1 -1
- package/dist/{chunk-805fhkfh.js → chunk-262grp9b.js} +8 -8
- package/dist/{chunk-kngg2gwm.js → chunk-28rcy2gj.js} +1 -1
- package/dist/{chunk-81p4y0bn.js → chunk-2dr6hn84.js} +1 -1
- package/dist/{chunk-kfyzz478.js → chunk-2gzn4gqd.js} +2 -2
- package/dist/{chunk-twp2r2kv.js → chunk-30em25sf.js} +19 -19
- package/dist/{chunk-yngfgr86.js → chunk-32rswx3m.js} +21 -21
- package/dist/{chunk-56023raw.js → chunk-33kcjr4h.js} +5 -5
- package/dist/{chunk-beasb0nx.js → chunk-3ch9v9pn.js} +1 -1
- package/dist/{chunk-30ph3f30.js → chunk-3jqcfxvn.js} +19 -19
- package/dist/{chunk-45vaghh5.js → chunk-3k1rmhrx.js} +1 -1
- package/dist/{chunk-0x9qknab.js → chunk-3nx113vz.js} +4 -4
- package/dist/{chunk-81ws594a.js → chunk-3v06mpfr.js} +21 -21
- package/dist/{chunk-smn5vb6h.js → chunk-3zt93n2c.js} +3 -3
- package/dist/{chunk-0075f2cp.js → chunk-41rt5mh4.js} +34 -34
- package/dist/{chunk-edjd6aay.js → chunk-4j7nyfpc.js} +4 -4
- package/dist/{chunk-q81jx1tq.js → chunk-4kjzfhxg.js} +1 -1
- package/dist/{chunk-2sw1xam9.js → chunk-4n8sx5c3.js} +1 -1
- package/dist/{chunk-vqmt61b9.js → chunk-4pjnsy3k.js} +2 -2
- package/dist/{chunk-rwzecjae.js → chunk-4sz598aa.js} +2 -2
- package/dist/{chunk-mkejwh4t.js → chunk-4t0xhy3r.js} +2 -2
- package/dist/{chunk-v8vvng6s.js → chunk-50hr08bk.js} +2 -2
- package/dist/{chunk-vj7kfkq8.js → chunk-5301z37j.js} +19 -19
- package/dist/{chunk-vrz7t3m3.js → chunk-54jz0km1.js} +2 -2
- package/dist/{chunk-ax7zym86.js → chunk-56njrn1z.js} +3 -3
- package/dist/{chunk-gf5emw83.js → chunk-59dpn7fv.js} +19 -19
- package/dist/{chunk-pws7ev16.js → chunk-5a2rjqdy.js} +71 -71
- package/dist/{chunk-qy1khncb.js → chunk-5hbh3kwn.js} +19 -19
- package/dist/{chunk-s4na264a.js → chunk-5r7etvhs.js} +31 -31
- package/dist/{chunk-7myhm62f.js → chunk-62t9vfqg.js} +6 -6
- package/dist/{chunk-cg0jpq62.js → chunk-652zfd3a.js} +2 -2
- package/dist/{chunk-q25bjaev.js → chunk-677as3nh.js} +2 -2
- package/dist/{chunk-34hcgenn.js → chunk-6aq7r6nc.js} +7 -7
- package/dist/{chunk-8ngxagxq.js → chunk-6dg3q1hp.js} +2 -2
- package/dist/{chunk-99jaqs39.js → chunk-6qkn51pk.js} +67 -67
- package/dist/{chunk-9x8twfez.js → chunk-6qmg0m5g.js} +4 -4
- package/dist/{chunk-7avwb240.js → chunk-6vr901fq.js} +19 -19
- package/dist/{chunk-1f8qyd76.js → chunk-747zns6f.js} +1 -1
- package/dist/{chunk-vz91cg4d.js → chunk-78cr36p2.js} +3 -3
- package/dist/{chunk-4aq18dqj.js → chunk-7ajt63qh.js} +3 -3
- package/dist/{chunk-wzzkfc78.js → chunk-7amfr2jf.js} +20 -20
- package/dist/{chunk-w47s3z9n.js → chunk-7e317cze.js} +19 -19
- package/dist/{chunk-ns43hctb.js → chunk-7hty0jss.js} +126 -126
- package/dist/{chunk-g8m0wvdc.js → chunk-7rs175z8.js} +4 -4
- package/dist/{chunk-7mshd4dn.js → chunk-7swnjjn7.js} +3 -3
- package/dist/{chunk-arnfrwch.js → chunk-7vfm0xfd.js} +19 -19
- package/dist/{chunk-ezzk3tv2.js → chunk-7w6rst8f.js} +20 -20
- package/dist/{chunk-mtn242d4.js → chunk-81gfg8jy.js} +10 -10
- package/dist/{chunk-hgykfm6j.js → chunk-860154cx.js} +5 -5
- package/dist/{chunk-eyvbyykf.js → chunk-8gjn4sbb.js} +4 -4
- package/dist/{chunk-4znkew0r.js → chunk-8sbxch29.js} +2 -2
- package/dist/{chunk-vfvrhgnb.js → chunk-8tzzfcsa.js} +1 -1
- package/dist/{chunk-6awawe40.js → chunk-8xzg6h3j.js} +21 -21
- package/dist/{chunk-g0jf6sfg.js → chunk-90pf9gvq.js} +2 -2
- package/dist/{chunk-qcp1rqa3.js → chunk-92thh3p0.js} +19 -19
- package/dist/{chunk-d4ngz00v.js → chunk-92zmn0a6.js} +3 -3
- package/dist/{chunk-50x2s0et.js → chunk-9ca62r8z.js} +1 -1
- package/dist/{chunk-3tg459j3.js → chunk-9ejrwq3z.js} +29 -29
- package/dist/{chunk-m5zf9bw5.js → chunk-9qpn6hae.js} +19 -19
- package/dist/{chunk-9k9csnwm.js → chunk-9s4j4sac.js} +1 -1
- package/dist/{chunk-0tq0t8cy.js → chunk-9sx9dze6.js} +2 -2
- package/dist/{chunk-88f5mtzd.js → chunk-a24semgp.js} +3 -3
- package/dist/{chunk-cwc598m7.js → chunk-adshf2sx.js} +1 -1
- package/dist/{chunk-naz430bp.js → chunk-aez1vf7x.js} +1 -1
- package/dist/{chunk-25jnakkp.js → chunk-agn7z12w.js} +2 -2
- package/dist/{chunk-retj134p.js → chunk-ahz95r72.js} +3 -3
- package/dist/{chunk-fqsz6czc.js → chunk-aq93vd90.js} +20 -20
- package/dist/{chunk-ggsah27z.js → chunk-b1ds13bq.js} +2 -2
- package/dist/{chunk-jdaj6c1y.js → chunk-b1q6dnnv.js} +3 -3
- package/dist/{chunk-afa8mqr6.js → chunk-b29zrnj2.js} +9 -9
- package/dist/{chunk-7qsg8rxa.js → chunk-b59b3zt1.js} +19 -19
- package/dist/{chunk-wfyekc43.js → chunk-ber1sywh.js} +37 -37
- package/dist/{chunk-pbrhz0zr.js → chunk-bfk94hgz.js} +8 -8
- package/dist/{chunk-azgz7kj9.js → chunk-bpjs9d4j.js} +5 -5
- package/dist/{chunk-ma3x20kw.js → chunk-bqkdehpp.js} +21 -21
- package/dist/{chunk-nbxwkcdx.js → chunk-bsw2fns5.js} +1 -1
- package/dist/{chunk-dsa9xjjf.js → chunk-bwb80cn2.js} +19 -19
- package/dist/{chunk-yxtg7hb4.js → chunk-bwbcg5b9.js} +19 -19
- package/dist/{chunk-hx97zx00.js → chunk-bzkfmwya.js} +21 -21
- package/dist/{chunk-6zw9fhgb.js → chunk-c0kejbeq.js} +12 -12
- package/dist/{chunk-s2j9j3za.js → chunk-c3z1v42j.js} +26 -26
- package/dist/{chunk-8bpnmdwy.js → chunk-c78frw9g.js} +19 -19
- package/dist/{chunk-9ngf8pgm.js → chunk-c8ypg0mh.js} +2 -2
- package/dist/{chunk-zghr5m9p.js → chunk-cbbyx6n2.js} +19 -19
- package/dist/{chunk-zs0nsz55.js → chunk-cbtth3ym.js} +21 -21
- package/dist/{chunk-4z0jsrqg.js → chunk-ckjkssec.js} +4 -4
- package/dist/{chunk-nza9k8za.js → chunk-cmrkv32b.js} +1 -1
- package/dist/{chunk-mk8se770.js → chunk-cvxtkjkc.js} +1 -1
- package/dist/{chunk-g5ewvwm4.js → chunk-cyr7bhz2.js} +19 -19
- package/dist/{chunk-abyyn6a6.js → chunk-d1bm9z6a.js} +20 -20
- package/dist/{chunk-s1dkb5bt.js → chunk-d3n5tfj4.js} +2 -2
- package/dist/{chunk-vs0mqxyh.js → chunk-d9qv6jpq.js} +19 -19
- package/dist/{chunk-ve1arjj1.js → chunk-dfnq1rfs.js} +4 -4
- package/dist/{chunk-h6qn8f8r.js → chunk-dfqhcsh5.js} +24 -24
- package/dist/{chunk-mkppcek9.js → chunk-dgmnvyws.js} +2 -2
- package/dist/{chunk-nqv2289a.js → chunk-dxtyff9n.js} +31 -31
- package/dist/{chunk-ddsbv19g.js → chunk-e7tj013a.js} +21 -21
- package/dist/{chunk-n1erf6kh.js → chunk-e9c2adyz.js} +4 -4
- package/dist/{chunk-j39kvn3t.js → chunk-eej4bp0c.js} +1 -1
- package/dist/{chunk-bdk37qrh.js → chunk-ek8wpfrj.js} +2 -2
- package/dist/{chunk-rgrrzhdc.js → chunk-enyx4b92.js} +19 -19
- package/dist/{chunk-16wz3n4d.js → chunk-eswy620e.js} +27 -27
- package/dist/{chunk-t1kjwayh.js → chunk-evjqd93x.js} +1 -1
- package/dist/{chunk-rznp0dpc.js → chunk-ex9tna6e.js} +7 -7
- package/dist/{chunk-7yc77fk5.js → chunk-exstp2k7.js} +22 -22
- package/dist/{chunk-dnfrfckt.js → chunk-f2ff2h9f.js} +19 -19
- package/dist/{chunk-5m0k300f.js → chunk-f6zy4237.js} +19 -19
- package/dist/{chunk-75th4717.js → chunk-f70eftd0.js} +8 -8
- package/dist/{chunk-mjgzabrq.js → chunk-f88hxn0j.js} +3 -3
- package/dist/{chunk-8b7sanvy.js → chunk-fa75rbn6.js} +105 -105
- package/dist/{chunk-qck6h0wt.js → chunk-fbnzd3gm.js} +26 -26
- package/dist/{chunk-fzsnz1c1.js → chunk-fc265e9d.js} +3 -3
- package/dist/{chunk-xawkt0vb.js → chunk-ffef066z.js} +9 -9
- package/dist/{chunk-4xa5vb3k.js → chunk-fgrejvwf.js} +20 -20
- package/dist/{chunk-a22sayzp.js → chunk-fnqxrsdx.js} +5 -5
- package/dist/{chunk-q6gnh4ah.js → chunk-ftyc1q0e.js} +1 -1
- package/dist/{chunk-zarvadh6.js → chunk-fyh51eqe.js} +23 -23
- package/dist/{chunk-axcawgnh.js → chunk-g62km359.js} +19 -19
- package/dist/{chunk-mtc4xsdt.js → chunk-ga3gskwm.js} +9 -9
- package/dist/{chunk-prrc78fb.js → chunk-gch4b79b.js} +4 -4
- package/dist/{chunk-ssnhwa9x.js → chunk-gkqg7gs9.js} +21 -21
- package/dist/{chunk-xbnm9rkh.js → chunk-grc9z5xr.js} +21 -21
- package/dist/{chunk-yckrj4xa.js → chunk-gv4m2gxr.js} +3 -3
- package/dist/chunk-h24tmagd.js +288 -0
- package/dist/{chunk-wn23dsvz.js → chunk-h5wczxf1.js} +20 -20
- package/dist/{chunk-pjvbzaec.js → chunk-h6yer4qf.js} +20 -20
- package/dist/{chunk-1n0hpzk0.js → chunk-hfde3n4j.js} +1 -1
- package/dist/{chunk-jftd4jq5.js → chunk-hg0bg5my.js} +9 -9
- package/dist/{chunk-e7jm6wma.js → chunk-hgnamrze.js} +19 -19
- package/dist/{chunk-p5c99m9b.js → chunk-hm841025.js} +19 -19
- package/dist/{chunk-dk034366.js → chunk-hn1abxh7.js} +1 -1
- package/dist/{chunk-b42z3vcp.js → chunk-hpqct0tf.js} +20 -20
- package/dist/{chunk-6rwwyg8a.js → chunk-hsjevfb8.js} +2 -2
- package/dist/{chunk-yt2p98e2.js → chunk-hvd3afep.js} +4 -4
- package/dist/{chunk-0df13h9j.js → chunk-j0d7xvd3.js} +2 -2
- package/dist/{chunk-28kjej5h.js → chunk-j4bp05yt.js} +20 -20
- package/dist/{chunk-z4999enw.js → chunk-j9raymz5.js} +1 -1
- package/dist/{chunk-2vvsa7zx.js → chunk-jeryqw17.js} +4 -4
- package/dist/{chunk-stp454a0.js → chunk-jjr34vvp.js} +72 -72
- package/dist/{chunk-fzmej48h.js → chunk-jtzfvmpm.js} +6 -6
- package/dist/{chunk-s8t8k03a.js → chunk-k5htedvy.js} +20 -20
- package/dist/{chunk-5grt1vzg.js → chunk-k9gwdvb9.js} +20 -20
- package/dist/{chunk-tsjzpp08.js → chunk-kagj666q.js} +2 -2
- package/dist/{chunk-w2cd3yey.js → chunk-ken87ahf.js} +19 -19
- package/dist/{chunk-dd6hbkbh.js → chunk-kphrphgs.js} +30 -30
- package/dist/{chunk-08pnv54s.js → chunk-kqceh190.js} +20 -20
- package/dist/{chunk-8f7qzrny.js → chunk-kr9pqhkf.js} +3 -3
- package/dist/{chunk-01wpsh7j.js → chunk-krt6dqhg.js} +3 -3
- package/dist/{chunk-paa4s0kr.js → chunk-m283zt5c.js} +1 -1
- package/dist/{chunk-7nz9y5rg.js → chunk-mbqh2yps.js} +1 -1
- package/dist/{chunk-ret810dw.js → chunk-mjwwnnmz.js} +2 -2
- package/dist/{chunk-ghpn0v77.js → chunk-mnmc8ryb.js} +2 -2
- package/dist/{chunk-xbs6fh0f.js → chunk-mqjwssrg.js} +20 -20
- package/dist/{chunk-0denq6ed.js → chunk-mrgpzw1c.js} +4 -4
- package/dist/{chunk-ecs7vx1t.js → chunk-n0gst0hx.js} +2 -2
- package/dist/{chunk-jsbpm1gz.js → chunk-n3weyy07.js} +3 -3
- package/dist/{chunk-7rprvf1j.js → chunk-n4k8qt5x.js} +21 -21
- package/dist/{chunk-1eapde8a.js → chunk-n58eyfnk.js} +1 -1
- package/dist/{chunk-rzszqp82.js → chunk-n7ht1jgh.js} +7 -7
- package/dist/{chunk-90nq6xd1.js → chunk-n9cdw0t2.js} +6 -6
- package/dist/{chunk-29cwt6jb.js → chunk-nkv7b4c1.js} +2 -2
- package/dist/{chunk-2qrd6yp9.js → chunk-ns01axvd.js} +6 -6
- package/dist/{chunk-z0b2vb24.js → chunk-nwechpvj.js} +8 -8
- package/dist/{chunk-bfm0tndy.js → chunk-nxy0ak70.js} +1 -1
- package/dist/{chunk-3250nkp6.js → chunk-nygwv3e0.js} +2 -2
- package/dist/{chunk-w4herm6y.js → chunk-p2bnzwpg.js} +19 -19
- package/dist/{chunk-3q30a3zk.js → chunk-p6qe2s74.js} +3 -3
- package/dist/{chunk-tj8xm5w4.js → chunk-p7bh3myb.js} +1 -1
- package/dist/{chunk-khmv9t7x.js → chunk-pbbnbask.js} +19 -19
- package/dist/{chunk-1np0s1kg.js → chunk-pbz4mh16.js} +22 -22
- package/dist/{chunk-21xf0kt1.js → chunk-pdrck5s2.js} +20 -20
- package/dist/{chunk-1en23sch.js → chunk-pmtt6pn2.js} +20 -20
- package/dist/{chunk-4mncmt3x.js → chunk-pnt2g5ky.js} +1 -1
- package/dist/{chunk-3ej58kpx.js → chunk-ppxk89xc.js} +2 -2
- package/dist/{chunk-fk1p6hg8.js → chunk-pq86snxv.js} +2 -2
- package/dist/{chunk-bmpjjnzy.js → chunk-pr18v6ak.js} +11 -11
- package/dist/{chunk-rm3ffqcw.js → chunk-psznjajk.js} +1 -1
- package/dist/{chunk-etrqmsd9.js → chunk-pt7kj47q.js} +3 -3
- package/dist/{chunk-qjmp704z.js → chunk-pty52c4r.js} +30 -30
- package/dist/{chunk-5fb3575x.js → chunk-pwrfamqw.js} +7 -7
- package/dist/{chunk-wyk10vg9.js → chunk-pydnv5x0.js} +19 -19
- package/dist/{chunk-2jp9nsdp.js → chunk-q4vv960q.js} +2 -2
- package/dist/{chunk-62kerh04.js → chunk-q92kb7r0.js} +1 -1
- package/dist/{chunk-s0gn15e9.js → chunk-qcf8d15r.js} +14 -14
- package/dist/{chunk-x1py9f9c.js → chunk-qmgv76hv.js} +19 -19
- package/dist/{chunk-ve6z2jpt.js → chunk-qnqye0zx.js} +2 -2
- package/dist/{chunk-zpa0vdjz.js → chunk-qp0zqyjb.js} +1 -1
- package/dist/{chunk-0nsn2zhh.js → chunk-qtfwypee.js} +1 -1
- package/dist/{chunk-jtg8hmdm.js → chunk-qzs01jxs.js} +49 -49
- package/dist/{chunk-26qhf7e9.js → chunk-r2m08ts5.js} +20 -20
- package/dist/{chunk-bany6evx.js → chunk-r7g0svnt.js} +3 -3
- package/dist/{chunk-asq59013.js → chunk-rbejmsh8.js} +19 -19
- package/dist/{chunk-t6ngea93.js → chunk-rd5dg1rc.js} +27 -27
- package/dist/{chunk-m7krfc0f.js → chunk-rn36ndw0.js} +2 -2
- package/dist/{chunk-2j1w3ra2.js → chunk-rpqh4scm.js} +2 -2
- package/dist/{chunk-7n5feteg.js → chunk-rqfvxp58.js} +2 -2
- package/dist/{chunk-0v1wh5st.js → chunk-rzan1d2k.js} +3 -3
- package/dist/{chunk-34xcbwk4.js → chunk-s58dhett.js} +1 -1
- package/dist/{chunk-sah01pch.js → chunk-s5cetm1d.js} +4 -4
- package/dist/{chunk-kfrd38n5.js → chunk-s7w9ap3w.js} +1 -1
- package/dist/{chunk-4ba796se.js → chunk-s9dx9n0b.js} +7 -7
- package/dist/{chunk-vkcyyv1m.js → chunk-sggzs6ea.js} +2 -2
- package/dist/{chunk-3zgwa2cg.js → chunk-skv8zmwe.js} +2 -2
- package/dist/{chunk-3zf06a84.js → chunk-smkp5pcr.js} +1 -496
- package/dist/{chunk-e3m9k9s2.js → chunk-smvfhzf9.js} +8 -8
- package/dist/{chunk-h6sefwzz.js → chunk-sn71b1c8.js} +4 -4
- package/dist/{chunk-544r356p.js → chunk-t1ejvknt.js} +2 -2
- package/dist/{chunk-qrg0z423.js → chunk-t1yvxj9j.js} +5 -5
- package/dist/{chunk-m8x440q1.js → chunk-tata7sds.js} +36 -36
- package/dist/{chunk-mtft2935.js → chunk-tc4m252m.js} +1 -1
- package/dist/{chunk-advwxc45.js → chunk-tchbf2v2.js} +11 -11
- package/dist/{chunk-avyperdk.js → chunk-tcz4wcpw.js} +1 -1
- package/dist/{chunk-25na7w1p.js → chunk-tds898pw.js} +30 -30
- package/dist/{chunk-62krayk4.js → chunk-tjpmxbtq.js} +19 -19
- package/dist/{chunk-4xx1xxz5.js → chunk-tz654p4e.js} +23 -23
- package/dist/{chunk-bzqmdtkq.js → chunk-v3an7b8a.js} +2 -2
- package/dist/{chunk-gsz4dh3y.js → chunk-v3n4x4ct.js} +24 -24
- package/dist/{chunk-92jtdg1s.js → chunk-v5d730s6.js} +12 -12
- package/dist/{chunk-5vt6zszr.js → chunk-v8ffgdn9.js} +3 -3
- package/dist/{chunk-4hprnnc7.js → chunk-ved8k6kt.js} +4 -4
- package/dist/{chunk-c6e8pzfj.js → chunk-vhcn23yr.js} +22 -22
- package/dist/{chunk-56t1vwab.js → chunk-vr7gccmp.js} +26 -26
- package/dist/{chunk-t37xd00m.js → chunk-vsc4gb0y.js} +23 -23
- package/dist/{chunk-64czcyt6.js → chunk-vt94dr8w.js} +7 -7
- package/dist/{chunk-4h6ddgk1.js → chunk-w6swvsba.js} +1 -1
- package/dist/{chunk-xm63b5y7.js → chunk-wedz8vxt.js} +20 -20
- package/dist/{chunk-14a25hz8.js → chunk-wgx7skx7.js} +21 -21
- package/dist/{chunk-6g62sjpf.js → chunk-whegaby0.js} +2 -2
- package/dist/{chunk-nga09bbb.js → chunk-wk25xctw.js} +4 -4
- package/dist/{chunk-njex1zeh.js → chunk-wvbr8qez.js} +3 -3
- package/dist/{chunk-89hry9r4.js → chunk-x399k93v.js} +19 -19
- package/dist/{chunk-m7an4m5k.js → chunk-x9tm8c89.js} +5 -5
- package/dist/{chunk-1ese82pp.js → chunk-xa6s2erk.js} +3 -3
- package/dist/{chunk-kk8k8xy8.js → chunk-xd1cbnjb.js} +4 -4
- package/dist/{chunk-54ema2zp.js → chunk-xgkykb2m.js} +19 -19
- package/dist/{chunk-fwtse19g.js → chunk-xj217d6e.js} +2 -2
- package/dist/{chunk-7rs8vdyh.js → chunk-xmc5cgmx.js} +24 -24
- package/dist/{chunk-ph9s3kqd.js → chunk-xq2fxvfj.js} +9 -9
- package/dist/{chunk-qrmscbnv.js → chunk-xvtrj770.js} +23 -23
- package/dist/{chunk-8bscgnhn.js → chunk-y0xj4tsk.js} +25 -25
- package/dist/{chunk-j0jqcc3m.js → chunk-y1jznj8g.js} +19 -19
- package/dist/{chunk-8re0q9x3.js → chunk-y7zr2b92.js} +23 -23
- package/dist/{chunk-4j7rq8ky.js → chunk-yb63yg9d.js} +2 -2
- package/dist/{chunk-gr8hqeqn.js → chunk-ydtqd0bf.js} +4 -4
- package/dist/{chunk-jcawvx14.js → chunk-yhzrmdhy.js} +22 -22
- package/dist/{chunk-dz7aaq55.js → chunk-ysx4yzqy.js} +20 -20
- package/dist/{chunk-ms4fqzr4.js → chunk-yxc2q80a.js} +20 -20
- package/dist/{chunk-9mc7rfpj.js → chunk-yxtjb36k.js} +19 -19
- package/dist/{chunk-dktedz99.js → chunk-yzh1fqkt.js} +3 -3
- package/dist/{chunk-0s7prsxw.js → chunk-zc59ke8a.js} +13 -13
- package/dist/{chunk-eejkxzh0.js → chunk-zhhdhw6s.js} +20 -20
- package/dist/{chunk-fntqhe3b.js → chunk-zwajhen4.js} +19 -19
- package/dist/{chunk-hkss7xmp.js → chunk-zwcy5tyk.js} +19 -19
- package/dist/cli.js +32 -16
- package/package.json +1 -1
- package/dist/{chunk-vest0y6x.js → chunk-6h6kzvyd.js} +3 -3
- package/dist/{chunk-27xc1csx.js → chunk-dggvswz1.js} +3 -3
- package/dist/{chunk-6exxdk1p.js → chunk-djh0hzs3.js} +9 -9
- package/dist/{chunk-dv1wfr85.js → chunk-fezchwvs.js} +3 -3
- package/dist/{chunk-zsfxha74.js → chunk-kb4y637z.js} +3 -3
- package/dist/{chunk-m2mcpbhk.js → chunk-pcy0sqby.js} +3 -3
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
getProxyFetchOptions,
|
|
4
|
+
init_proxy
|
|
5
|
+
} from "./chunk-n58eyfnk.js";
|
|
6
|
+
import {
|
|
7
|
+
init_providerRegistry,
|
|
8
|
+
resolveAPIKey,
|
|
9
|
+
resolveProvider
|
|
10
|
+
} from "./chunk-smkp5pcr.js";
|
|
11
|
+
import"./chunk-nxsh6de2.js";
|
|
12
|
+
import"./chunk-fbv4apne.js";
|
|
13
|
+
import"./chunk-3r24h7t6.js";
|
|
14
|
+
import"./chunk-qqfa0dqg.js";
|
|
15
|
+
import"./chunk-hqmz36b3.js";
|
|
16
|
+
import"./chunk-4g3v8y12.js";
|
|
17
|
+
import"./chunk-7739pg2c.js";
|
|
18
|
+
import"./chunk-xszk7n10.js";
|
|
19
|
+
import"./chunk-sdj9b9wh.js";
|
|
20
|
+
import {
|
|
21
|
+
__esm
|
|
22
|
+
} from "./chunk-qp2qdcda.js";
|
|
23
|
+
|
|
24
|
+
// src/services/api/openaiAdapter.ts
|
|
25
|
+
import { createHash } from "crypto";
|
|
26
|
+
function getOpenAIConfig() {
|
|
27
|
+
const resolved = resolveProvider();
|
|
28
|
+
if (resolved) {
|
|
29
|
+
const { config } = resolved;
|
|
30
|
+
return {
|
|
31
|
+
apiKey: resolveAPIKey(config),
|
|
32
|
+
baseURL: process.env.OPENAI_BASE_URL || config.baseURL,
|
|
33
|
+
model: process.env.OPENAI_MODEL || config.defaultModel
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
apiKey: process.env.OPENAI_API_KEY || "",
|
|
38
|
+
baseURL: process.env.OPENAI_BASE_URL || "https://api.openai.com/v1",
|
|
39
|
+
model: process.env.OPENAI_MODEL || "gpt-4o"
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function convertMessages(system, messages) {
|
|
43
|
+
const result = [];
|
|
44
|
+
if (system) {
|
|
45
|
+
let sysText = "";
|
|
46
|
+
if (typeof system === "string") {
|
|
47
|
+
sysText = system;
|
|
48
|
+
} else if (Array.isArray(system)) {
|
|
49
|
+
sysText = system.map((b) => typeof b === "string" ? b : b?.text || "").filter(Boolean).join(`
|
|
50
|
+
`);
|
|
51
|
+
}
|
|
52
|
+
if (sysText) {
|
|
53
|
+
const maxLen = 8000;
|
|
54
|
+
if (sysText.length > maxLen) {
|
|
55
|
+
sysText = sysText.slice(0, maxLen) + `
|
|
56
|
+
|
|
57
|
+
[System prompt truncated]`;
|
|
58
|
+
}
|
|
59
|
+
result.push({ role: "system", content: sysText });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
for (const msg of messages) {
|
|
63
|
+
const m = msg;
|
|
64
|
+
if (!m || !m.role)
|
|
65
|
+
continue;
|
|
66
|
+
if (typeof m.content === "string") {
|
|
67
|
+
result.push({ role: m.role === "assistant" ? "assistant" : "user", content: m.content });
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
if (!Array.isArray(m.content))
|
|
71
|
+
continue;
|
|
72
|
+
if (m.role === "assistant") {
|
|
73
|
+
const textParts = [];
|
|
74
|
+
const toolCalls = [];
|
|
75
|
+
for (const block of m.content) {
|
|
76
|
+
if (!block)
|
|
77
|
+
continue;
|
|
78
|
+
if (block.type === "text" && block.text) {
|
|
79
|
+
textParts.push(block.text);
|
|
80
|
+
} else if (block.type === "tool_use") {
|
|
81
|
+
toolCalls.push({
|
|
82
|
+
id: block.id || `toolu_${Date.now()}`,
|
|
83
|
+
type: "function",
|
|
84
|
+
function: {
|
|
85
|
+
name: block.name,
|
|
86
|
+
arguments: typeof block.input === "string" ? block.input : JSON.stringify(block.input || {})
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const assistantMsg = { role: "assistant" };
|
|
92
|
+
const text = textParts.join(`
|
|
93
|
+
`);
|
|
94
|
+
if (text)
|
|
95
|
+
assistantMsg.content = text;
|
|
96
|
+
else if (toolCalls.length > 0)
|
|
97
|
+
assistantMsg.content = null;
|
|
98
|
+
if (toolCalls.length > 0)
|
|
99
|
+
assistantMsg.tool_calls = toolCalls;
|
|
100
|
+
if (text || toolCalls.length > 0)
|
|
101
|
+
result.push(assistantMsg);
|
|
102
|
+
} else {
|
|
103
|
+
const textParts = [];
|
|
104
|
+
const toolResults = [];
|
|
105
|
+
for (const block of m.content) {
|
|
106
|
+
if (!block)
|
|
107
|
+
continue;
|
|
108
|
+
if (typeof block === "string") {
|
|
109
|
+
textParts.push(block);
|
|
110
|
+
} else if (block.type === "text") {
|
|
111
|
+
textParts.push(block.text || "");
|
|
112
|
+
} else if (block.type === "tool_result") {
|
|
113
|
+
const resultContent = typeof block.content === "string" ? block.content : Array.isArray(block.content) ? block.content.map((c) => c.text || JSON.stringify(c) || "").join(`
|
|
114
|
+
`) : JSON.stringify(block.content || "");
|
|
115
|
+
toolResults.push({
|
|
116
|
+
tool_call_id: block.tool_use_id || "unknown",
|
|
117
|
+
content: block.is_error ? `[ERROR] ${resultContent}` : resultContent
|
|
118
|
+
});
|
|
119
|
+
} else if (block.type === "image") {
|
|
120
|
+
textParts.push("[Image content]");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
for (const tr of toolResults) {
|
|
124
|
+
result.push({
|
|
125
|
+
role: "tool",
|
|
126
|
+
tool_call_id: tr.tool_call_id,
|
|
127
|
+
content: tr.content
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
const text = textParts.join(`
|
|
131
|
+
`).trim();
|
|
132
|
+
if (text) {
|
|
133
|
+
result.push({ role: "user", content: text });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
function convertTools(tools) {
|
|
140
|
+
if (!tools || tools.length === 0)
|
|
141
|
+
return;
|
|
142
|
+
const filtered = tools.filter((tool) => {
|
|
143
|
+
if (SKIP_TOOLS.has(tool.name))
|
|
144
|
+
return false;
|
|
145
|
+
if (TIER1_TOOLS.has(tool.name))
|
|
146
|
+
return true;
|
|
147
|
+
if (TIER2_TOOLS.has(tool.name))
|
|
148
|
+
return true;
|
|
149
|
+
if (tool.name?.startsWith("mcp__"))
|
|
150
|
+
return true;
|
|
151
|
+
return false;
|
|
152
|
+
});
|
|
153
|
+
if (filtered.length === 0)
|
|
154
|
+
return;
|
|
155
|
+
return filtered.map((tool) => ({
|
|
156
|
+
type: "function",
|
|
157
|
+
function: {
|
|
158
|
+
name: tool.name,
|
|
159
|
+
description: (tool.description || "").slice(0, 800),
|
|
160
|
+
parameters: tool.input_schema || {}
|
|
161
|
+
}
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
async function* openaiStreamToAnthropicEvents(response, model) {
|
|
165
|
+
yield {
|
|
166
|
+
type: "message_start",
|
|
167
|
+
message: {
|
|
168
|
+
id: `msg_openai_${Date.now()}`,
|
|
169
|
+
type: "message",
|
|
170
|
+
role: "assistant",
|
|
171
|
+
content: [],
|
|
172
|
+
model,
|
|
173
|
+
stop_reason: null,
|
|
174
|
+
stop_sequence: null,
|
|
175
|
+
usage: { input_tokens: 0, output_tokens: 0 }
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
let textBlockStarted = false;
|
|
179
|
+
let textBlockIndex = 0;
|
|
180
|
+
let toolCallBlocks = new Map;
|
|
181
|
+
let thinkingBlockStarted = false;
|
|
182
|
+
let thinkingBlockIndex = -1;
|
|
183
|
+
let nextBlockIndex = 0;
|
|
184
|
+
let outputTokens = 0;
|
|
185
|
+
let inputTokens = 0;
|
|
186
|
+
let hasToolCalls = false;
|
|
187
|
+
const reader = response.body?.getReader();
|
|
188
|
+
if (!reader)
|
|
189
|
+
return;
|
|
190
|
+
const decoder = new TextDecoder;
|
|
191
|
+
let buffer = "";
|
|
192
|
+
try {
|
|
193
|
+
while (true) {
|
|
194
|
+
const { done, value } = await reader.read();
|
|
195
|
+
if (done)
|
|
196
|
+
break;
|
|
197
|
+
buffer += decoder.decode(value, { stream: true });
|
|
198
|
+
const lines = buffer.split(`
|
|
199
|
+
`);
|
|
200
|
+
buffer = lines.pop() || "";
|
|
201
|
+
for (const line of lines) {
|
|
202
|
+
const trimmed = line.trim();
|
|
203
|
+
if (!trimmed || trimmed === "data: [DONE]")
|
|
204
|
+
continue;
|
|
205
|
+
if (!trimmed.startsWith("data: "))
|
|
206
|
+
continue;
|
|
207
|
+
let chunk;
|
|
208
|
+
try {
|
|
209
|
+
chunk = JSON.parse(trimmed.slice(6));
|
|
210
|
+
} catch {
|
|
211
|
+
continue;
|
|
212
|
+
}
|
|
213
|
+
if (chunk.usage) {
|
|
214
|
+
inputTokens = chunk.usage.prompt_tokens || 0;
|
|
215
|
+
outputTokens = chunk.usage.completion_tokens || 0;
|
|
216
|
+
}
|
|
217
|
+
for (const choice of chunk.choices) {
|
|
218
|
+
const delta = choice.delta;
|
|
219
|
+
const thinkingText = delta.reasoning_content || delta.reasoning;
|
|
220
|
+
if (thinkingText) {
|
|
221
|
+
if (!thinkingBlockStarted) {
|
|
222
|
+
thinkingBlockIndex = nextBlockIndex++;
|
|
223
|
+
thinkingBlockStarted = true;
|
|
224
|
+
yield {
|
|
225
|
+
type: "content_block_start",
|
|
226
|
+
index: thinkingBlockIndex,
|
|
227
|
+
content_block: { type: "thinking", thinking: "", signature: "" }
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
yield {
|
|
231
|
+
type: "content_block_delta",
|
|
232
|
+
index: thinkingBlockIndex,
|
|
233
|
+
delta: { type: "thinking_delta", thinking: thinkingText }
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
if (delta.content && delta.content.length > 0) {
|
|
237
|
+
if (thinkingBlockStarted && !textBlockStarted) {
|
|
238
|
+
yield {
|
|
239
|
+
type: "content_block_stop",
|
|
240
|
+
index: thinkingBlockIndex
|
|
241
|
+
};
|
|
242
|
+
thinkingBlockStarted = false;
|
|
243
|
+
}
|
|
244
|
+
if (!textBlockStarted) {
|
|
245
|
+
textBlockIndex = nextBlockIndex++;
|
|
246
|
+
textBlockStarted = true;
|
|
247
|
+
yield {
|
|
248
|
+
type: "content_block_start",
|
|
249
|
+
index: textBlockIndex,
|
|
250
|
+
content_block: { type: "text", text: "" }
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
yield {
|
|
254
|
+
type: "content_block_delta",
|
|
255
|
+
index: textBlockIndex,
|
|
256
|
+
delta: { type: "text_delta", text: delta.content }
|
|
257
|
+
};
|
|
258
|
+
outputTokens++;
|
|
259
|
+
}
|
|
260
|
+
if (delta.tool_calls) {
|
|
261
|
+
for (const tc of delta.tool_calls) {
|
|
262
|
+
if (!toolCallBlocks.has(tc.index)) {
|
|
263
|
+
if (textBlockStarted) {
|
|
264
|
+
yield { type: "content_block_stop", index: textBlockIndex };
|
|
265
|
+
textBlockStarted = false;
|
|
266
|
+
}
|
|
267
|
+
if (thinkingBlockStarted) {
|
|
268
|
+
yield { type: "content_block_stop", index: thinkingBlockIndex };
|
|
269
|
+
thinkingBlockStarted = false;
|
|
270
|
+
}
|
|
271
|
+
const blockIdx = nextBlockIndex++;
|
|
272
|
+
const toolId = tc.id || `toolu_openai_${Date.now()}_${tc.index}`;
|
|
273
|
+
const toolName = tc.function?.name || "";
|
|
274
|
+
toolCallBlocks.set(tc.index, { id: toolId, name: toolName, argsBuf: "", blockIndex: blockIdx });
|
|
275
|
+
yield {
|
|
276
|
+
type: "content_block_start",
|
|
277
|
+
index: blockIdx,
|
|
278
|
+
content_block: {
|
|
279
|
+
type: "tool_use",
|
|
280
|
+
id: toolId,
|
|
281
|
+
name: toolName,
|
|
282
|
+
input: {}
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
const block = toolCallBlocks.get(tc.index);
|
|
287
|
+
if (tc.function?.arguments) {
|
|
288
|
+
block.argsBuf += tc.function.arguments;
|
|
289
|
+
yield {
|
|
290
|
+
type: "content_block_delta",
|
|
291
|
+
index: block.blockIndex,
|
|
292
|
+
delta: {
|
|
293
|
+
type: "input_json_delta",
|
|
294
|
+
partial_json: tc.function.arguments
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if (choice.finish_reason) {
|
|
301
|
+
if (thinkingBlockStarted) {
|
|
302
|
+
yield { type: "content_block_stop", index: thinkingBlockIndex };
|
|
303
|
+
thinkingBlockStarted = false;
|
|
304
|
+
}
|
|
305
|
+
if (textBlockStarted) {
|
|
306
|
+
yield { type: "content_block_stop", index: textBlockIndex };
|
|
307
|
+
textBlockStarted = false;
|
|
308
|
+
}
|
|
309
|
+
for (const [, tcBlock] of toolCallBlocks) {
|
|
310
|
+
yield { type: "content_block_stop", index: tcBlock.blockIndex };
|
|
311
|
+
}
|
|
312
|
+
if (choice.finish_reason === "tool_calls") {
|
|
313
|
+
hasToolCalls = true;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
} finally {
|
|
320
|
+
reader.releaseLock();
|
|
321
|
+
}
|
|
322
|
+
yield {
|
|
323
|
+
type: "message_delta",
|
|
324
|
+
delta: { stop_reason: hasToolCalls ? "tool_use" : "end_turn", stop_sequence: null },
|
|
325
|
+
usage: { output_tokens: outputTokens }
|
|
326
|
+
};
|
|
327
|
+
yield {
|
|
328
|
+
type: "message_stop"
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
function hashKey(key) {
|
|
332
|
+
return createHash("sha256").update(key).digest("hex");
|
|
333
|
+
}
|
|
334
|
+
function verifyOllamaLicense() {
|
|
335
|
+
const userSetBaseURL = process.env.OPENAI_BASE_URL;
|
|
336
|
+
const userSetProvider = process.env.PROVIDER;
|
|
337
|
+
if (userSetBaseURL)
|
|
338
|
+
return;
|
|
339
|
+
if (userSetProvider && userSetProvider.toLowerCase() !== "ollama")
|
|
340
|
+
return;
|
|
341
|
+
if (process.env.OPENAI_API_KEY || process.env.OLLAMA_API_KEY)
|
|
342
|
+
return;
|
|
343
|
+
const config = getOpenAIConfig();
|
|
344
|
+
const isBuiltinOllama = config.baseURL.includes("218.201.19.105:11434") || config.baseURL.includes("localhost:11434") || config.baseURL.includes("127.0.0.1:11434");
|
|
345
|
+
if (!isBuiltinOllama)
|
|
346
|
+
return;
|
|
347
|
+
const licenseKey = process.env.JIALING_LICENSE_KEY?.trim();
|
|
348
|
+
if (!licenseKey) {
|
|
349
|
+
throw new Error(`
|
|
350
|
+
\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\u2557
|
|
351
|
+
` + `\u2551 \u5609\u9675\u6C5F-code Ollama \u672C\u5730\u6A21\u5F0F\u9700\u8981\u6388\u6743\u5BC6\u94A5 \u2551
|
|
352
|
+
` + `\u2551 \u2551
|
|
353
|
+
` + `\u2551 \u8BF7\u8BBE\u7F6E\u73AF\u5883\u53D8\u91CF: \u2551
|
|
354
|
+
` + `\u2551 export JIALING_LICENSE_KEY="\u4F60\u7684\u5BC6\u94A5" \u2551
|
|
355
|
+
` + `\u2551 \u2551
|
|
356
|
+
` + `\u2551 \u83B7\u53D6\u5BC6\u94A5\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458 \u2551
|
|
357
|
+
` + `\u2551 \u2551
|
|
358
|
+
` + `\u2551 \u4F7F\u7528\u5176\u4ED6\u5927\u6A21\u578B\u5382\u5546\u4E0D\u53D7\u6B64\u9650\u5236: \u2551
|
|
359
|
+
` + `\u2551 export DEEPSEEK_API_KEY=sk-xxx (DeepSeek) \u2551
|
|
360
|
+
` + `\u2551 export OPENAI_API_KEY=sk-xxx (OpenAI) \u2551
|
|
361
|
+
` + `\u2551 export QWEN_API_KEY=sk-xxx (\u901A\u4E49\u5343\u95EE) \u2551
|
|
362
|
+
` + `\u2551 ... \u652F\u6301 22+ \u5382\u5546\uFF0C\u8BE6\u89C1\u6587\u6863 \u2551
|
|
363
|
+
` + `\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\u255D
|
|
364
|
+
`);
|
|
365
|
+
}
|
|
366
|
+
if (!OLLAMA_LICENSE_HASHES.has(hashKey(licenseKey))) {
|
|
367
|
+
throw new Error(`
|
|
368
|
+
[\u5609\u9675\u6C5F-code] \u5BC6\u94A5\u65E0\u6548\uFF0C\u8BF7\u68C0\u67E5 JIALING_LICENSE_KEY \u662F\u5426\u6B63\u786E\u3002
|
|
369
|
+
`);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function createOpenAIAdapterClient(options) {
|
|
373
|
+
verifyOllamaLicense();
|
|
374
|
+
const config = getOpenAIConfig();
|
|
375
|
+
const client = {
|
|
376
|
+
beta: {
|
|
377
|
+
messages: {
|
|
378
|
+
create: (params, requestOptions) => {
|
|
379
|
+
const doFetch = async () => {
|
|
380
|
+
const model = params.model || config.model;
|
|
381
|
+
const openaiMessages = convertMessages(params.system, params.messages);
|
|
382
|
+
const openaiTools = convertTools(params.tools || []);
|
|
383
|
+
const noStreamOptsProviders = new Set(["ollama", "perplexity", "cohere", "google"]);
|
|
384
|
+
const skipStreamOpts = noStreamOptsProviders.has(providerId) || config.baseURL.includes("localhost:11434") || config.baseURL.includes("127.0.0.1:11434") || config.baseURL.includes("218.201.19.105:11434");
|
|
385
|
+
const body = {
|
|
386
|
+
model,
|
|
387
|
+
messages: openaiMessages,
|
|
388
|
+
stream: true,
|
|
389
|
+
...!skipStreamOpts && { stream_options: { include_usage: true } },
|
|
390
|
+
max_tokens: params.max_tokens || 16384
|
|
391
|
+
};
|
|
392
|
+
if (params.temperature !== undefined) {
|
|
393
|
+
body.temperature = params.temperature;
|
|
394
|
+
}
|
|
395
|
+
const noToolProviders = new Set(["perplexity"]);
|
|
396
|
+
if (openaiTools && openaiTools.length > 0 && !noToolProviders.has(providerId)) {
|
|
397
|
+
body.tools = openaiTools;
|
|
398
|
+
}
|
|
399
|
+
const fetchOptions = getProxyFetchOptions({ forAnthropicAPI: false }) || {};
|
|
400
|
+
const url = `${config.baseURL.replace(/\/+$/, "")}/chat/completions`;
|
|
401
|
+
const resolved = resolveProvider();
|
|
402
|
+
const providerId = resolved?.providerId || "";
|
|
403
|
+
const headers = {
|
|
404
|
+
"Content-Type": "application/json",
|
|
405
|
+
...process.env.OPENAI_CUSTOM_HEADERS ? parseCustomHeaders(process.env.OPENAI_CUSTOM_HEADERS) : {}
|
|
406
|
+
};
|
|
407
|
+
if (providerId === "google") {
|
|
408
|
+
if (config.apiKey)
|
|
409
|
+
headers["x-goog-api-key"] = config.apiKey;
|
|
410
|
+
} else if (config.apiKey && config.apiKey !== "ollama" && config.apiKey !== "none") {
|
|
411
|
+
headers["Authorization"] = `Bearer ${config.apiKey}`;
|
|
412
|
+
}
|
|
413
|
+
if (providerId === "openrouter") {
|
|
414
|
+
headers["HTTP-Referer"] = process.env.OPENROUTER_REFERER || "https://jialing-code.dev";
|
|
415
|
+
headers["X-Title"] = "\u5609\u9675\u6C5F-code";
|
|
416
|
+
}
|
|
417
|
+
if (providerId === "minimax" && process.env.MINIMAX_GROUP_ID) {
|
|
418
|
+
headers["GroupId"] = process.env.MINIMAX_GROUP_ID;
|
|
419
|
+
}
|
|
420
|
+
const response = await fetch(url, {
|
|
421
|
+
method: "POST",
|
|
422
|
+
headers,
|
|
423
|
+
body: JSON.stringify(body),
|
|
424
|
+
signal: requestOptions?.signal,
|
|
425
|
+
...fetchOptions
|
|
426
|
+
});
|
|
427
|
+
if (!response.ok) {
|
|
428
|
+
const errorText = await response.text().catch(() => "Unknown error");
|
|
429
|
+
throw new Error(`OpenAI API error (${response.status}): ${errorText}`);
|
|
430
|
+
}
|
|
431
|
+
const stream = openaiStreamToAnthropicEvents(response, model);
|
|
432
|
+
return { stream, response };
|
|
433
|
+
};
|
|
434
|
+
const resultPromise = doFetch();
|
|
435
|
+
return {
|
|
436
|
+
withResponse: () => resultPromise.then(({ stream, response }) => ({
|
|
437
|
+
data: stream,
|
|
438
|
+
response,
|
|
439
|
+
request_id: response.headers.get("x-request-id") || `openai-${Date.now()}`
|
|
440
|
+
})),
|
|
441
|
+
then: (resolve, reject) => resultPromise.then(({ stream }) => stream).then(resolve, reject)
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
messages: {
|
|
447
|
+
create: async () => {
|
|
448
|
+
throw new Error("Use beta.messages.create for OpenAI adapter");
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
return client;
|
|
453
|
+
}
|
|
454
|
+
function parseCustomHeaders(headerStr) {
|
|
455
|
+
const headers = {};
|
|
456
|
+
for (const line of headerStr.split(/\n|\r\n/)) {
|
|
457
|
+
const idx = line.indexOf(":");
|
|
458
|
+
if (idx === -1)
|
|
459
|
+
continue;
|
|
460
|
+
const name = line.slice(0, idx).trim();
|
|
461
|
+
const value = line.slice(idx + 1).trim();
|
|
462
|
+
if (name)
|
|
463
|
+
headers[name] = value;
|
|
464
|
+
}
|
|
465
|
+
return headers;
|
|
466
|
+
}
|
|
467
|
+
var TIER1_TOOLS, TIER2_TOOLS, SKIP_TOOLS, OLLAMA_LICENSE_HASHES;
|
|
468
|
+
var init_openaiAdapter = __esm(() => {
|
|
469
|
+
init_proxy();
|
|
470
|
+
init_providerRegistry();
|
|
471
|
+
TIER1_TOOLS = new Set([
|
|
472
|
+
"Bash",
|
|
473
|
+
"Read",
|
|
474
|
+
"Write",
|
|
475
|
+
"Edit",
|
|
476
|
+
"Glob",
|
|
477
|
+
"Grep"
|
|
478
|
+
]);
|
|
479
|
+
TIER2_TOOLS = new Set([
|
|
480
|
+
"WebFetch",
|
|
481
|
+
"WebSearch",
|
|
482
|
+
"NotebookEdit",
|
|
483
|
+
"Agent"
|
|
484
|
+
]);
|
|
485
|
+
SKIP_TOOLS = new Set([
|
|
486
|
+
"EnterPlanMode",
|
|
487
|
+
"ExitPlanMode",
|
|
488
|
+
"EnterWorktree",
|
|
489
|
+
"ExitWorktree",
|
|
490
|
+
"TodoWrite",
|
|
491
|
+
"Brief",
|
|
492
|
+
"TaskOutput",
|
|
493
|
+
"TaskStop",
|
|
494
|
+
"TaskCreate",
|
|
495
|
+
"TaskGet",
|
|
496
|
+
"TaskUpdate",
|
|
497
|
+
"TaskList",
|
|
498
|
+
"TeamCreate",
|
|
499
|
+
"TeamDelete",
|
|
500
|
+
"ToolSearch",
|
|
501
|
+
"SendMessage",
|
|
502
|
+
"AskUserQuestion",
|
|
503
|
+
"Skill",
|
|
504
|
+
"ListMcpResources",
|
|
505
|
+
"ReadMcpResource",
|
|
506
|
+
"SyntheticOutput",
|
|
507
|
+
"CronCreate",
|
|
508
|
+
"CronDelete",
|
|
509
|
+
"CronList"
|
|
510
|
+
]);
|
|
511
|
+
OLLAMA_LICENSE_HASHES = new Set([
|
|
512
|
+
"2352f11c7b38404b2ab5a135b3c429199a5a0ff7c04349c9179b3f58265f6b3a"
|
|
513
|
+
]);
|
|
514
|
+
});
|
|
515
|
+
init_openaiAdapter();
|
|
516
|
+
|
|
517
|
+
export {
|
|
518
|
+
getOpenAIConfig,
|
|
519
|
+
createOpenAIAdapterClient
|
|
520
|
+
};
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
init_TeleportError,
|
|
9
9
|
init_teleport,
|
|
10
10
|
teleportResumeCodeSession
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import"./chunk-
|
|
11
|
+
} from "./chunk-7hty0jss.js";
|
|
12
|
+
import"./chunk-tc4m252m.js";
|
|
13
|
+
import"./chunk-28rcy2gj.js";
|
|
14
|
+
import"./chunk-9ca62r8z.js";
|
|
13
15
|
import"./chunk-t0rgmccj.js";
|
|
14
|
-
import"./chunk-
|
|
15
|
-
import"./chunk-nbxwkcdx.js";
|
|
16
|
-
import"./chunk-kngg2gwm.js";
|
|
16
|
+
import"./chunk-bsw2fns5.js";
|
|
17
17
|
import {
|
|
18
18
|
Byline,
|
|
19
19
|
ConfigurableShortcutHint,
|
|
@@ -23,34 +23,34 @@ import {
|
|
|
23
23
|
init_KeyboardShortcutHint,
|
|
24
24
|
init_useShortcutDisplay,
|
|
25
25
|
useShortcutDisplay
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7ajt63qh.js";
|
|
27
27
|
import"./chunk-2gzv8nrw.js";
|
|
28
28
|
import"./chunk-ehtwnxpg.js";
|
|
29
29
|
import"./chunk-3be7ka25.js";
|
|
30
|
-
import"./chunk-
|
|
30
|
+
import"./chunk-eej4bp0c.js";
|
|
31
31
|
import"./chunk-cgfdkzhb.js";
|
|
32
32
|
import"./chunk-bhdt6k7w.js";
|
|
33
33
|
import"./chunk-45kxdsp8.js";
|
|
34
34
|
import"./chunk-5dbk24zg.js";
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
37
|
-
import"./chunk-
|
|
35
|
+
import"./chunk-w6swvsba.js";
|
|
36
|
+
import"./chunk-q4vv960q.js";
|
|
37
|
+
import"./chunk-4pjnsy3k.js";
|
|
38
38
|
import"./chunk-9gbamk79.js";
|
|
39
|
-
import"./chunk-
|
|
39
|
+
import"./chunk-mjwwnnmz.js";
|
|
40
40
|
import"./chunk-9e2kqv5g.js";
|
|
41
41
|
import {
|
|
42
42
|
init_useKeybinding,
|
|
43
43
|
init_useTerminalSize,
|
|
44
44
|
useKeybinding,
|
|
45
45
|
useTerminalSize
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-hfde3n4j.js";
|
|
47
47
|
import {
|
|
48
48
|
ThemedBox_default,
|
|
49
49
|
ThemedText,
|
|
50
50
|
init_ink,
|
|
51
51
|
require_compiler_runtime,
|
|
52
52
|
use_input_default
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-s7w9ap3w.js";
|
|
54
54
|
import"./chunk-7m2nd8da.js";
|
|
55
55
|
import"./chunk-ps49ymvj.js";
|
|
56
56
|
import {
|
|
@@ -58,19 +58,19 @@ import {
|
|
|
58
58
|
require_react
|
|
59
59
|
} from "./chunk-g338npwr.js";
|
|
60
60
|
import"./chunk-zk2wsm7d.js";
|
|
61
|
-
import"./chunk-
|
|
61
|
+
import"./chunk-pnt2g5ky.js";
|
|
62
|
+
import"./chunk-spqaamnc.js";
|
|
63
|
+
import"./chunk-4jm600zv.js";
|
|
62
64
|
import {
|
|
63
65
|
fetchCodeSessionsFromSessionsAPI,
|
|
64
66
|
init_api
|
|
65
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-tcz4wcpw.js";
|
|
66
68
|
import"./chunk-m06q12hg.js";
|
|
67
|
-
import"./chunk-
|
|
68
|
-
import"./chunk-spqaamnc.js";
|
|
69
|
-
import"./chunk-4jm600zv.js";
|
|
69
|
+
import"./chunk-8tzzfcsa.js";
|
|
70
70
|
import"./chunk-qz2x630m.js";
|
|
71
71
|
import"./chunk-7sb5axvf.js";
|
|
72
72
|
import"./chunk-v9smspw2.js";
|
|
73
|
-
import"./chunk-
|
|
73
|
+
import"./chunk-0mgw2mkr.js";
|
|
74
74
|
import"./chunk-e3g8q4cn.js";
|
|
75
75
|
import"./chunk-z1yfevvp.js";
|
|
76
76
|
import"./chunk-ctw5jwcd.js";
|
|
@@ -85,7 +85,7 @@ import"./chunk-w2z5pqd3.js";
|
|
|
85
85
|
import"./chunk-7ymfj7m3.js";
|
|
86
86
|
import"./chunk-f5ma3nh5.js";
|
|
87
87
|
import"./chunk-v1kzp02e.js";
|
|
88
|
-
import"./chunk-
|
|
88
|
+
import"./chunk-n58eyfnk.js";
|
|
89
89
|
import"./chunk-p2816w9z.js";
|
|
90
90
|
import"./chunk-0vkfrmqm.js";
|
|
91
91
|
import"./chunk-0xjaqda8.js";
|
|
@@ -7,46 +7,46 @@ import {
|
|
|
7
7
|
isTranscriptMessage,
|
|
8
8
|
saveCustomTitle,
|
|
9
9
|
searchSessionsByCustomTitle
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import"./chunk-
|
|
10
|
+
} from "./chunk-7hty0jss.js";
|
|
11
|
+
import"./chunk-tc4m252m.js";
|
|
12
|
+
import"./chunk-28rcy2gj.js";
|
|
13
|
+
import"./chunk-9ca62r8z.js";
|
|
12
14
|
import"./chunk-t0rgmccj.js";
|
|
13
|
-
import"./chunk-
|
|
14
|
-
import"./chunk-
|
|
15
|
-
import"./chunk-kngg2gwm.js";
|
|
16
|
-
import"./chunk-4aq18dqj.js";
|
|
15
|
+
import"./chunk-bsw2fns5.js";
|
|
16
|
+
import"./chunk-7ajt63qh.js";
|
|
17
17
|
import"./chunk-2gzv8nrw.js";
|
|
18
18
|
import"./chunk-ehtwnxpg.js";
|
|
19
19
|
import"./chunk-3be7ka25.js";
|
|
20
|
-
import"./chunk-
|
|
20
|
+
import"./chunk-eej4bp0c.js";
|
|
21
21
|
import"./chunk-cgfdkzhb.js";
|
|
22
22
|
import"./chunk-bhdt6k7w.js";
|
|
23
23
|
import"./chunk-45kxdsp8.js";
|
|
24
24
|
import"./chunk-5dbk24zg.js";
|
|
25
|
-
import"./chunk-
|
|
26
|
-
import"./chunk-
|
|
27
|
-
import"./chunk-
|
|
25
|
+
import"./chunk-w6swvsba.js";
|
|
26
|
+
import"./chunk-q4vv960q.js";
|
|
27
|
+
import"./chunk-4pjnsy3k.js";
|
|
28
28
|
import"./chunk-9gbamk79.js";
|
|
29
|
-
import"./chunk-
|
|
29
|
+
import"./chunk-mjwwnnmz.js";
|
|
30
30
|
import"./chunk-9e2kqv5g.js";
|
|
31
|
-
import"./chunk-
|
|
32
|
-
import"./chunk-
|
|
31
|
+
import"./chunk-hfde3n4j.js";
|
|
32
|
+
import"./chunk-s7w9ap3w.js";
|
|
33
33
|
import"./chunk-7m2nd8da.js";
|
|
34
34
|
import"./chunk-ps49ymvj.js";
|
|
35
35
|
import"./chunk-g338npwr.js";
|
|
36
36
|
import"./chunk-zk2wsm7d.js";
|
|
37
|
-
import"./chunk-
|
|
38
|
-
import"./chunk-avyperdk.js";
|
|
39
|
-
import"./chunk-m06q12hg.js";
|
|
40
|
-
import"./chunk-vfvrhgnb.js";
|
|
37
|
+
import"./chunk-pnt2g5ky.js";
|
|
41
38
|
import"./chunk-spqaamnc.js";
|
|
42
39
|
import"./chunk-4jm600zv.js";
|
|
40
|
+
import"./chunk-tcz4wcpw.js";
|
|
41
|
+
import"./chunk-m06q12hg.js";
|
|
42
|
+
import"./chunk-8tzzfcsa.js";
|
|
43
43
|
import"./chunk-qz2x630m.js";
|
|
44
44
|
import"./chunk-7sb5axvf.js";
|
|
45
45
|
import"./chunk-v9smspw2.js";
|
|
46
46
|
import {
|
|
47
47
|
escapeRegExp,
|
|
48
48
|
init_stringUtils
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-0mgw2mkr.js";
|
|
50
50
|
import {
|
|
51
51
|
init_json,
|
|
52
52
|
parseJSONL
|
|
@@ -64,7 +64,7 @@ import"./chunk-w2z5pqd3.js";
|
|
|
64
64
|
import"./chunk-7ymfj7m3.js";
|
|
65
65
|
import"./chunk-f5ma3nh5.js";
|
|
66
66
|
import"./chunk-v1kzp02e.js";
|
|
67
|
-
import"./chunk-
|
|
67
|
+
import"./chunk-n58eyfnk.js";
|
|
68
68
|
import"./chunk-p2816w9z.js";
|
|
69
69
|
import"./chunk-0vkfrmqm.js";
|
|
70
70
|
import"./chunk-0xjaqda8.js";
|