jialing-code 1.2.0 → 1.3.0
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-yjbxnshv.js → chunk-031788by.js} +5 -5
- package/dist/{chunk-1ese82pp.js → chunk-05x2533x.js} +3 -3
- package/dist/{chunk-fwtse19g.js → chunk-07r9q8w7.js} +2 -2
- package/dist/{chunk-kk8k8xy8.js → chunk-0bkvtyh6.js} +4 -4
- package/dist/{chunk-vds1kh8j.js → chunk-0cp4sp21.js} +19 -19
- package/dist/{chunk-25jnakkp.js → chunk-0g0vy9ne.js} +2 -2
- package/dist/{chunk-t1nnzjgg.js → chunk-0n4e5as3.js} +2 -2
- package/dist/{chunk-544r356p.js → chunk-0qmpd3av.js} +2 -2
- package/dist/chunk-0rhg74cy.js +506 -0
- package/dist/{chunk-twp2r2kv.js → chunk-0t3ptep6.js} +19 -19
- package/dist/{chunk-a5y3eyz5.js → chunk-0yaq0s7j.js} +21 -21
- package/dist/{chunk-7n5feteg.js → chunk-0ysrhnfb.js} +2 -2
- package/dist/{chunk-xbs6fh0f.js → chunk-0z4ys6rm.js} +20 -20
- package/dist/{chunk-d4ngz00v.js → chunk-1bdmq3f5.js} +3 -3
- package/dist/{chunk-dktedz99.js → chunk-1htb975n.js} +3 -3
- package/dist/{chunk-cg0jpq62.js → chunk-1jhjx7xf.js} +2 -2
- package/dist/{chunk-88r7kwgj.js → chunk-1m23ntdh.js} +5 -5
- package/dist/{chunk-1en23sch.js → chunk-1n517g5d.js} +20 -20
- package/dist/{chunk-4kh3yeqx.js → chunk-1p8q0pgc.js} +11 -11
- package/dist/chunk-238g70xa.js +1 -1
- package/dist/{chunk-805fhkfh.js → chunk-262grp9b.js} +8 -8
- package/dist/{chunk-50x2s0et.js → chunk-288q73ba.js} +1 -1
- package/dist/{chunk-0tq0t8cy.js → chunk-28dthfvq.js} +2 -2
- package/dist/{chunk-z4999enw.js → chunk-2a21bvge.js} +1 -1
- package/dist/{chunk-m8x440q1.js → chunk-2adkhbf6.js} +36 -36
- package/dist/{chunk-62krayk4.js → chunk-2c2x5m28.js} +19 -19
- package/dist/{chunk-56t1vwab.js → chunk-2d5x0wph.js} +26 -26
- package/dist/{chunk-6mhseqjj.js → chunk-2e02m8h4.js} +22 -22
- package/dist/{chunk-wn23dsvz.js → chunk-2nf837xg.js} +20 -20
- package/dist/{chunk-bzqmdtkq.js → chunk-2vz5epmk.js} +2 -2
- package/dist/{chunk-sah01pch.js → chunk-33bg3gj2.js} +4 -4
- package/dist/{chunk-pws7ev16.js → chunk-33cx6hy9.js} +71 -71
- package/dist/{chunk-ezzk3tv2.js → chunk-3b9b60eg.js} +20 -20
- package/dist/{chunk-zs0nsz55.js → chunk-3jc8f1nm.js} +21 -21
- package/dist/{chunk-h6sefwzz.js → chunk-3mvtynx1.js} +4 -4
- package/dist/{chunk-zghr5m9p.js → chunk-3nk62x91.js} +19 -19
- package/dist/{chunk-ecs7vx1t.js → chunk-3p2t5pkm.js} +2 -2
- package/dist/{chunk-54ema2zp.js → chunk-3z3n4rg2.js} +19 -19
- package/dist/{chunk-xbnm9rkh.js → chunk-4cc7xkh9.js} +21 -21
- package/dist/{chunk-edjd6aay.js → chunk-4j7nyfpc.js} +4 -4
- package/dist/{chunk-q81jx1tq.js → chunk-4kjzfhxg.js} +1 -1
- package/dist/{chunk-mkejwh4t.js → chunk-4t0xhy3r.js} +2 -2
- package/dist/{chunk-7nz9y5rg.js → chunk-4wwdbqba.js} +1 -1
- package/dist/{chunk-8bpnmdwy.js → chunk-517ysyx1.js} +19 -19
- package/dist/{chunk-a2dn46wv.js → chunk-5185vq3p.js} +17 -17
- package/dist/{chunk-0v1wh5st.js → chunk-51j5ggqm.js} +3 -3
- package/dist/{chunk-5m0k300f.js → chunk-53hkm3v0.js} +19 -19
- package/dist/{chunk-vrz7t3m3.js → chunk-54jz0km1.js} +2 -2
- package/dist/{chunk-3ej58kpx.js → chunk-55wav5md.js} +2 -2
- package/dist/{chunk-5fb3575x.js → chunk-5bm3k4xp.js} +7 -7
- package/dist/{chunk-yckrj4xa.js → chunk-5sg7qbnx.js} +3 -3
- package/dist/{chunk-s8t8k03a.js → chunk-5vxy79vc.js} +20 -20
- package/dist/{chunk-gf5emw83.js → chunk-5w7fsv07.js} +19 -19
- package/dist/{chunk-q25bjaev.js → chunk-677as3nh.js} +2 -2
- package/dist/{chunk-hgykfm6j.js → chunk-68tfdman.js} +5 -5
- package/dist/{chunk-yngfgr86.js → chunk-68x5898g.js} +21 -21
- package/dist/{chunk-4xx1xxz5.js → chunk-6b5ymext.js} +23 -23
- package/dist/{chunk-avyperdk.js → chunk-6chnsxhy.js} +1 -1
- package/dist/{chunk-8ngxagxq.js → chunk-6dg3q1hp.js} +2 -2
- package/dist/{chunk-kfrd38n5.js → chunk-6kcc4eqj.js} +1 -1
- package/dist/{chunk-0075f2cp.js → chunk-6txaknfq.js} +34 -34
- package/dist/{chunk-eejkxzh0.js → chunk-703j3ayw.js} +20 -20
- package/dist/{chunk-1np0s1kg.js → chunk-70ktycy4.js} +22 -22
- package/dist/{chunk-j0jqcc3m.js → chunk-71kmt5vh.js} +19 -19
- package/dist/{chunk-mk8se770.js → chunk-74qsy5pa.js} +1 -1
- package/dist/{chunk-ve1arjj1.js → chunk-7661jcac.js} +4 -4
- package/dist/{chunk-m5zf9bw5.js → chunk-78ztpqyx.js} +19 -19
- package/dist/{chunk-ax7zym86.js → chunk-79zgq885.js} +3 -3
- package/dist/{chunk-7myhm62f.js → chunk-7bkhaxbz.js} +6 -6
- package/dist/{chunk-yxtg7hb4.js → chunk-7cppyngr.js} +19 -19
- package/dist/{chunk-fk1p6hg8.js → chunk-7fntxxrz.js} +2 -2
- package/dist/{chunk-vkcyyv1m.js → chunk-7kq71tzc.js} +2 -2
- package/dist/{chunk-fzsnz1c1.js → chunk-7w7xn4bk.js} +3 -3
- package/dist/{chunk-7qsg8rxa.js → chunk-7ws9kwsj.js} +19 -19
- package/dist/{chunk-mtn242d4.js → chunk-81gfg8jy.js} +10 -10
- package/dist/{chunk-ata64rnb.js → chunk-821s3pbh.js} +1 -1
- package/dist/{chunk-b42z3vcp.js → chunk-8335mkv4.js} +20 -20
- package/dist/{chunk-9x7v2172.js → chunk-87694zr7.js} +26 -26
- package/dist/{chunk-4aq18dqj.js → chunk-88wrkdqr.js} +3 -3
- package/dist/{chunk-wfyekc43.js → chunk-89nrd694.js} +37 -37
- package/dist/{chunk-hkss7xmp.js → chunk-8b4dxcj3.js} +19 -19
- package/dist/{chunk-kfyzz478.js → chunk-8qjk8wxb.js} +2 -2
- package/dist/{chunk-21xf0kt1.js → chunk-8vymdtk9.js} +20 -20
- package/dist/{chunk-ve6z2jpt.js → chunk-8ws4qqbv.js} +2 -2
- package/dist/{chunk-7rprvf1j.js → chunk-8zz8vejn.js} +21 -21
- package/dist/{chunk-arnfrwch.js → chunk-9146nrgj.js} +19 -19
- package/dist/{chunk-kngg2gwm.js → chunk-97cn7qrc.js} +1 -1
- package/dist/{chunk-45vaghh5.js → chunk-97k8x3b1.js} +1 -1
- package/dist/{chunk-fqsz6czc.js → chunk-9a69gy3f.js} +20 -20
- package/dist/{chunk-cwc598m7.js → chunk-9g1hyqbp.js} +1 -1
- package/dist/{chunk-v9fghq77.js → chunk-9pm4eafa.js} +19 -19
- package/dist/{chunk-9x8twfez.js → chunk-9tad4x7f.js} +4 -4
- package/dist/{chunk-njex1zeh.js → chunk-agpbg9qm.js} +3 -3
- package/dist/{chunk-etrqmsd9.js → chunk-an1014dd.js} +3 -3
- package/dist/{chunk-mjgzabrq.js → chunk-apfvpy0z.js} +3 -3
- package/dist/{chunk-s4na264a.js → chunk-b2128ax9.js} +31 -31
- package/dist/{chunk-7ngmattt.js → chunk-b2zckw4h.js} +1 -1
- package/dist/{chunk-qjmp704z.js → chunk-b776qvba.js} +30 -30
- package/dist/{chunk-qy1khncb.js → chunk-bat5pbjv.js} +19 -19
- package/dist/{chunk-81ws594a.js → chunk-bbmje81t.js} +21 -21
- package/dist/{chunk-dz7aaq55.js → chunk-bcqhqpgs.js} +20 -20
- package/dist/{chunk-pbrhz0zr.js → chunk-bfk94hgz.js} +8 -8
- package/dist/{chunk-34xcbwk4.js → chunk-bkv9cnks.js} +1 -1
- package/dist/{chunk-azgz7kj9.js → chunk-bpjs9d4j.js} +5 -5
- package/dist/{chunk-25na7w1p.js → chunk-btxtj44r.js} +30 -30
- package/dist/{chunk-ermy23fb.js → chunk-bx9z2n42.js} +2 -2
- package/dist/{chunk-6zw9fhgb.js → chunk-c0kejbeq.js} +12 -12
- package/dist/{chunk-28kjej5h.js → chunk-c5n4fwpd.js} +20 -20
- package/dist/{chunk-rznp0dpc.js → chunk-c5p7wawn.js} +7 -7
- package/dist/{chunk-3tg459j3.js → chunk-cbw5z0sj.js} +29 -29
- package/dist/{chunk-s1dkb5bt.js → chunk-cf8dndrq.js} +2 -2
- package/dist/{chunk-4z0jsrqg.js → chunk-ckjkssec.js} +4 -4
- package/dist/{chunk-9k9csnwm.js → chunk-cn3jzyq1.js} +1 -1
- package/dist/{chunk-yt2p98e2.js → chunk-cs027r8e.js} +4 -4
- package/dist/{chunk-asq59013.js → chunk-ctjejaef.js} +19 -19
- package/dist/{chunk-08pnv54s.js → chunk-ctm5jmgf.js} +20 -20
- package/dist/{chunk-wzzkfc78.js → chunk-ctpyddty.js} +20 -20
- package/dist/{chunk-7rs8vdyh.js → chunk-d50k01k8.js} +24 -24
- package/dist/{chunk-0df13h9j.js → chunk-e12030pn.js} +2 -2
- package/dist/{chunk-mtc4xsdt.js → chunk-e4k269cy.js} +9 -9
- package/dist/{chunk-rwzecjae.js → chunk-e6t8h373.js} +2 -2
- package/dist/{chunk-0x9qknab.js → chunk-e7rfm8p3.js} +4 -4
- package/dist/{chunk-n1erf6kh.js → chunk-e9c2adyz.js} +4 -4
- package/dist/{chunk-dk034366.js → chunk-eag6jc0a.js} +1 -1
- package/dist/{chunk-89hry9r4.js → chunk-eds46cnx.js} +19 -19
- package/dist/{chunk-naz430bp.js → chunk-eh12mxc2.js} +1 -1
- package/dist/{chunk-wyk10vg9.js → chunk-en1aq5p2.js} +19 -19
- package/dist/{chunk-2jp9nsdp.js → chunk-esysrh9b.js} +2 -2
- package/dist/{chunk-3zgwa2cg.js → chunk-ewvrrh8z.js} +2 -2
- package/dist/{chunk-56023raw.js → chunk-exxzrjgz.js} +5 -5
- package/dist/{chunk-8f7qzrny.js → chunk-ey6b9379.js} +3 -3
- package/dist/{chunk-h6qn8f8r.js → chunk-f1hhae6e.js} +24 -24
- package/dist/{chunk-ns43hctb.js → chunk-f2j68nm2.js} +126 -126
- package/dist/{chunk-j39kvn3t.js → chunk-f340t6hc.js} +1 -1
- package/dist/{chunk-75th4717.js → chunk-f70eftd0.js} +8 -8
- package/dist/{chunk-rgrrzhdc.js → chunk-f7t02g9s.js} +19 -19
- package/dist/{chunk-zpa0vdjz.js → chunk-f88s7x96.js} +1 -1
- package/dist/{chunk-dnfrfckt.js → chunk-faefm5y3.js} +19 -19
- package/dist/{chunk-xawkt0vb.js → chunk-ffef066z.js} +9 -9
- package/dist/{chunk-a22sayzp.js → chunk-fnqxrsdx.js} +5 -5
- package/dist/{chunk-qrg0z423.js → chunk-ft851n30.js} +5 -5
- package/dist/{chunk-ssnhwa9x.js → chunk-fy5prntz.js} +21 -21
- package/dist/{chunk-vj7kfkq8.js → chunk-g1xt81s9.js} +19 -19
- package/dist/{chunk-beasb0nx.js → chunk-g2y69wsp.js} +1 -1
- package/dist/{chunk-prrc78fb.js → chunk-g6fbxahv.js} +4 -4
- package/dist/{chunk-ggsah27z.js → chunk-g85bt601.js} +2 -2
- package/dist/{chunk-4hprnnc7.js → chunk-gbar6ff8.js} +4 -4
- package/dist/{chunk-2j1w3ra2.js → chunk-gcbd11sf.js} +2 -2
- package/dist/{chunk-t37xd00m.js → chunk-gkjbcjn6.js} +23 -23
- package/dist/{chunk-qcp1rqa3.js → chunk-h3q22byc.js} +19 -19
- package/dist/{chunk-e7jm6wma.js → chunk-h5vwa6a9.js} +19 -19
- package/dist/{chunk-0denq6ed.js → chunk-h70kjg2d.js} +4 -4
- package/dist/{chunk-stp454a0.js → chunk-h714fvgy.js} +72 -72
- package/dist/{chunk-bany6evx.js → chunk-h97pg0re.js} +3 -3
- package/dist/{chunk-w47s3z9n.js → chunk-heac3wtr.js} +19 -19
- package/dist/{chunk-5amndp82.js → chunk-hep1j8ns.js} +15 -15
- package/dist/{chunk-jftd4jq5.js → chunk-hg0bg5my.js} +9 -9
- package/dist/{chunk-8bscgnhn.js → chunk-hg37g32w.js} +25 -25
- package/dist/{chunk-afa8mqr6.js → chunk-hp26tjp8.js} +9 -9
- package/dist/{chunk-hx97zx00.js → chunk-hpxknd74.js} +21 -21
- package/dist/{chunk-99jaqs39.js → chunk-hrgk62sw.js} +67 -67
- package/dist/{chunk-dsa9xjjf.js → chunk-hz8bn8kf.js} +19 -19
- package/dist/{chunk-vs0mqxyh.js → chunk-j3c6mr3q.js} +19 -19
- package/dist/{chunk-0nsn2zhh.js → chunk-j3xmsywz.js} +1 -1
- package/dist/{chunk-fnp4masn.js → chunk-j4ejnsfw.js} +20 -20
- package/dist/{chunk-2vvsa7zx.js → chunk-jbd6e1x1.js} +4 -4
- package/dist/{chunk-ma3x20kw.js → chunk-jesrrbc4.js} +21 -21
- package/dist/{chunk-jcawvx14.js → chunk-jq0d60y9.js} +22 -22
- package/dist/{chunk-jtg8hmdm.js → chunk-jtxvmhfm.js} +49 -49
- package/dist/{chunk-30ph3f30.js → chunk-jvjpb1vf.js} +19 -19
- package/dist/{chunk-mtft2935.js → chunk-kcsjve6k.js} +1 -1
- package/dist/{chunk-0s7prsxw.js → chunk-kecm9186.js} +13 -13
- package/dist/{chunk-ghpn0v77.js → chunk-kgcb9bav.js} +2 -2
- package/dist/{chunk-nqv2289a.js → chunk-kpzb0m8q.js} +31 -31
- package/dist/{chunk-qck6h0wt.js → chunk-kv1n22q7.js} +26 -26
- package/dist/{chunk-w2cd3yey.js → chunk-m0egh5n2.js} +19 -19
- package/dist/{chunk-zarvadh6.js → chunk-m4hasqgg.js} +23 -23
- package/dist/{chunk-t6ngea93.js → chunk-m6zh3k1j.js} +27 -27
- package/dist/{chunk-6rwwyg8a.js → chunk-m856bq3c.js} +2 -2
- package/dist/{chunk-khmv9t7x.js → chunk-mhjfztas.js} +19 -19
- package/dist/{chunk-a9qyv65k.js → chunk-mht4sv0y.js} +5 -5
- package/dist/{chunk-5grt1vzg.js → chunk-mn0k999b.js} +20 -20
- package/dist/{chunk-jsbpm1gz.js → chunk-n3weyy07.js} +3 -3
- package/dist/chunk-n512q71j.js +278 -0
- package/dist/{chunk-1eapde8a.js → chunk-n58eyfnk.js} +1 -1
- package/dist/{chunk-bqac4egk.js → chunk-n78ha5w1.js} +30 -30
- package/dist/{chunk-rzszqp82.js → chunk-n7ht1jgh.js} +7 -7
- package/dist/{chunk-88f5mtzd.js → chunk-n952deg1.js} +3 -3
- package/dist/{chunk-m7krfc0f.js → chunk-nnh2gdhx.js} +2 -2
- package/dist/{chunk-7yc77fk5.js → chunk-npz6kcpx.js} +22 -22
- package/dist/{chunk-29cwt6jb.js → chunk-nqzb40rj.js} +2 -2
- package/dist/{chunk-4mncmt3x.js → chunk-nr6vqqc5.js} +1 -1
- package/dist/{chunk-3250nkp6.js → chunk-ntw6cx18.js} +2 -2
- package/dist/{chunk-z0b2vb24.js → chunk-nwechpvj.js} +8 -8
- package/dist/{chunk-gr8hqeqn.js → chunk-p2gqer6x.js} +4 -4
- package/dist/{chunk-4h6ddgk1.js → chunk-p8qcw3dd.js} +1 -1
- package/dist/{chunk-g8m0wvdc.js → chunk-pahks5xs.js} +4 -4
- package/dist/{chunk-2sw1xam9.js → chunk-pavth16s.js} +1 -1
- package/dist/{chunk-xm63b5y7.js → chunk-pbez1rh7.js} +20 -20
- package/dist/{chunk-g5ewvwm4.js → chunk-pk7zaehq.js} +19 -19
- package/dist/{chunk-y997ehrm.js → chunk-pqqr17dt.js} +1 -1
- package/dist/{chunk-fzmej48h.js → chunk-pt3vvhzr.js} +6 -6
- package/dist/{chunk-2v3gb9q9.js → chunk-ptbr1a9g.js} +20 -20
- package/dist/{chunk-sakgp0hv.js → chunk-pvvydak9.js} +23 -23
- package/dist/{chunk-axcawgnh.js → chunk-px6rp3sv.js} +19 -19
- package/dist/{chunk-64czcyt6.js → chunk-q2ak7g9q.js} +7 -7
- package/dist/{chunk-ddsbv19g.js → chunk-q4jbahrv.js} +21 -21
- package/dist/{chunk-62kerh04.js → chunk-q54da9z6.js} +1 -1
- package/dist/{chunk-jdaj6c1y.js → chunk-q99fgx3c.js} +3 -3
- package/dist/{chunk-mkppcek9.js → chunk-qecj4thj.js} +2 -2
- package/dist/{chunk-eyvbyykf.js → chunk-qnjv029d.js} +4 -4
- package/dist/{chunk-abyyn6a6.js → chunk-qp50w6ck.js} +20 -20
- package/dist/{chunk-26qhf7e9.js → chunk-qv364xx0.js} +20 -20
- package/dist/{chunk-5vt6zszr.js → chunk-qykgz3av.js} +3 -3
- package/dist/{chunk-6awawe40.js → chunk-qzppgp6n.js} +21 -21
- package/dist/{chunk-nga09bbb.js → chunk-r4yka6ws.js} +4 -4
- package/dist/{chunk-dz8c7ac9.js → chunk-r7wj66nw.js} +21 -21
- package/dist/{chunk-gvm0fdsh.js → chunk-rb1je9hj.js} +2 -2
- package/dist/{chunk-ms4fqzr4.js → chunk-rgt6jd1k.js} +20 -20
- package/dist/{chunk-rm3ffqcw.js → chunk-rqk4wq7w.js} +1 -1
- package/dist/{chunk-vfvrhgnb.js → chunk-rqyb8v83.js} +1 -1
- package/dist/{chunk-ret810dw.js → chunk-rvpdt0cv.js} +2 -2
- package/dist/{chunk-nbxwkcdx.js → chunk-rzqdgstx.js} +1 -1
- package/dist/{chunk-q6gnh4ah.js → chunk-s4artx6z.js} +1 -1
- package/dist/{chunk-63r6wx91.js → chunk-s6r18pc2.js} +1 -1
- package/dist/{chunk-1f8qyd76.js → chunk-s933wxmj.js} +1 -1
- package/dist/{chunk-4ba796se.js → chunk-s9dx9n0b.js} +7 -7
- package/dist/{chunk-1n0hpzk0.js → chunk-sb9w2yyg.js} +1 -1
- package/dist/{chunk-paa4s0kr.js → chunk-scwzc1jh.js} +1 -1
- package/dist/{chunk-g0jf6sfg.js → chunk-sf82h3nk.js} +2 -2
- package/dist/{chunk-8re0q9x3.js → chunk-sken52eq.js} +23 -23
- package/dist/{chunk-3zf06a84.js → chunk-smkp5pcr.js} +1 -496
- package/dist/{chunk-e3m9k9s2.js → chunk-smvfhzf9.js} +8 -8
- package/dist/{chunk-retj134p.js → chunk-sv1yas5c.js} +3 -3
- package/dist/{chunk-smn5vb6h.js → chunk-sw3p7jp0.js} +3 -3
- package/dist/{chunk-9mc7rfpj.js → chunk-syj0mkv6.js} +19 -19
- package/dist/{chunk-dd6hbkbh.js → chunk-sz1x733e.js} +30 -30
- package/dist/{chunk-w4herm6y.js → chunk-tdd60ve5.js} +19 -19
- package/dist/{chunk-4xa5vb3k.js → chunk-thcb5zjg.js} +20 -20
- package/dist/{chunk-4znkew0r.js → chunk-tr117xft.js} +2 -2
- package/dist/{chunk-gsz4dh3y.js → chunk-v3n4x4ct.js} +24 -24
- package/dist/{chunk-3q30a3zk.js → chunk-v7r57tzt.js} +3 -3
- package/dist/{chunk-s2j9j3za.js → chunk-vajkc7r0.js} +26 -26
- package/dist/{chunk-7mshd4dn.js → chunk-vcner9cb.js} +3 -3
- package/dist/{chunk-m7an4m5k.js → chunk-veajq3vz.js} +5 -5
- package/dist/{chunk-16wz3n4d.js → chunk-vgfzhwte.js} +27 -27
- package/dist/{chunk-s0gn15e9.js → chunk-w0qdbkz3.js} +14 -14
- package/dist/{chunk-qrmscbnv.js → chunk-wa228dce.js} +23 -23
- package/dist/{chunk-14a25hz8.js → chunk-waxtph38.js} +21 -21
- package/dist/{chunk-6g62sjpf.js → chunk-whegaby0.js} +2 -2
- package/dist/{chunk-01wpsh7j.js → chunk-wphg252x.js} +3 -3
- package/dist/{chunk-7avwb240.js → chunk-wsww8ynt.js} +19 -19
- package/dist/{chunk-tj8xm5w4.js → chunk-wt411cfm.js} +1 -1
- package/dist/{chunk-8b7sanvy.js → chunk-x01atcnf.js} +105 -105
- package/dist/{chunk-pjvbzaec.js → chunk-x62ktt0z.js} +20 -20
- package/dist/{chunk-bmpjjnzy.js → chunk-x6zbe1y8.js} +11 -11
- package/dist/{chunk-4j7rq8ky.js → chunk-x76gdx5s.js} +2 -2
- package/dist/{chunk-ph9s3kqd.js → chunk-x84ntd5t.js} +9 -9
- package/dist/{chunk-x1py9f9c.js → chunk-x9vd3zjx.js} +19 -19
- package/dist/{chunk-92jtdg1s.js → chunk-xc7kjx08.js} +12 -12
- package/dist/{chunk-tsjzpp08.js → chunk-xjs00hhw.js} +2 -2
- package/dist/{chunk-c6e8pzfj.js → chunk-xnn2qq4z.js} +22 -22
- package/dist/{chunk-2qrd6yp9.js → chunk-xp6a2s72.js} +6 -6
- package/dist/{chunk-vqmt61b9.js → chunk-xsejfs0g.js} +2 -2
- package/dist/{chunk-nza9k8za.js → chunk-xwqg81gr.js} +1 -1
- package/dist/{chunk-81p4y0bn.js → chunk-yjm6jgx7.js} +1 -1
- package/dist/{chunk-p5c99m9b.js → chunk-ym1v7r8b.js} +19 -19
- package/dist/{chunk-vz91cg4d.js → chunk-yn4tv60w.js} +3 -3
- package/dist/{chunk-bdk37qrh.js → chunk-ytkpmwjn.js} +2 -2
- package/dist/{chunk-v8vvng6s.js → chunk-ywhrzpcp.js} +2 -2
- package/dist/{chunk-9ngf8pgm.js → chunk-z0am1r2k.js} +2 -2
- package/dist/{chunk-90nq6xd1.js → chunk-z1wkerzm.js} +6 -6
- package/dist/{chunk-t1kjwayh.js → chunk-z2zv8m3z.js} +1 -1
- package/dist/{chunk-fntqhe3b.js → chunk-z35xhtw4.js} +19 -19
- package/dist/{chunk-bfm0tndy.js → chunk-z3fe3kgg.js} +1 -1
- package/dist/{chunk-qaxe3dpf.js → chunk-zekr9zt9.js} +22 -22
- package/dist/{chunk-advwxc45.js → chunk-zgqrnpw4.js} +11 -11
- package/dist/{chunk-34hcgenn.js → chunk-zmzycmg4.js} +7 -7
- 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,506 @@
|
|
|
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 isOllama = config.baseURL.includes("localhost:11434") || config.baseURL.includes("127.0.0.1:11434") || config.baseURL.includes("218.201.19.105:11434") || process.env.PROVIDER === "ollama";
|
|
384
|
+
const body = {
|
|
385
|
+
model,
|
|
386
|
+
messages: openaiMessages,
|
|
387
|
+
stream: true,
|
|
388
|
+
...!isOllama && { stream_options: { include_usage: true } },
|
|
389
|
+
max_tokens: params.max_tokens || 16384
|
|
390
|
+
};
|
|
391
|
+
if (params.temperature !== undefined) {
|
|
392
|
+
body.temperature = params.temperature;
|
|
393
|
+
}
|
|
394
|
+
if (openaiTools && openaiTools.length > 0) {
|
|
395
|
+
body.tools = openaiTools;
|
|
396
|
+
}
|
|
397
|
+
const fetchOptions = getProxyFetchOptions({ forAnthropicAPI: false }) || {};
|
|
398
|
+
const url = `${config.baseURL.replace(/\/+$/, "")}/chat/completions`;
|
|
399
|
+
const headers = {
|
|
400
|
+
"Content-Type": "application/json",
|
|
401
|
+
...process.env.OPENAI_CUSTOM_HEADERS ? parseCustomHeaders(process.env.OPENAI_CUSTOM_HEADERS) : {}
|
|
402
|
+
};
|
|
403
|
+
if (config.apiKey && config.apiKey !== "ollama") {
|
|
404
|
+
headers["Authorization"] = `Bearer ${config.apiKey}`;
|
|
405
|
+
}
|
|
406
|
+
const response = await fetch(url, {
|
|
407
|
+
method: "POST",
|
|
408
|
+
headers,
|
|
409
|
+
body: JSON.stringify(body),
|
|
410
|
+
signal: requestOptions?.signal,
|
|
411
|
+
...fetchOptions
|
|
412
|
+
});
|
|
413
|
+
if (!response.ok) {
|
|
414
|
+
const errorText = await response.text().catch(() => "Unknown error");
|
|
415
|
+
throw new Error(`OpenAI API error (${response.status}): ${errorText}`);
|
|
416
|
+
}
|
|
417
|
+
const stream = openaiStreamToAnthropicEvents(response, model);
|
|
418
|
+
return { stream, response };
|
|
419
|
+
};
|
|
420
|
+
const resultPromise = doFetch();
|
|
421
|
+
return {
|
|
422
|
+
withResponse: () => resultPromise.then(({ stream, response }) => ({
|
|
423
|
+
data: stream,
|
|
424
|
+
response,
|
|
425
|
+
request_id: response.headers.get("x-request-id") || `openai-${Date.now()}`
|
|
426
|
+
})),
|
|
427
|
+
then: (resolve, reject) => resultPromise.then(({ stream }) => stream).then(resolve, reject)
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
messages: {
|
|
433
|
+
create: async () => {
|
|
434
|
+
throw new Error("Use beta.messages.create for OpenAI adapter");
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
return client;
|
|
439
|
+
}
|
|
440
|
+
function parseCustomHeaders(headerStr) {
|
|
441
|
+
const headers = {};
|
|
442
|
+
for (const line of headerStr.split(/\n|\r\n/)) {
|
|
443
|
+
const idx = line.indexOf(":");
|
|
444
|
+
if (idx === -1)
|
|
445
|
+
continue;
|
|
446
|
+
const name = line.slice(0, idx).trim();
|
|
447
|
+
const value = line.slice(idx + 1).trim();
|
|
448
|
+
if (name)
|
|
449
|
+
headers[name] = value;
|
|
450
|
+
}
|
|
451
|
+
return headers;
|
|
452
|
+
}
|
|
453
|
+
var TIER1_TOOLS, TIER2_TOOLS, SKIP_TOOLS, OLLAMA_LICENSE_HASHES;
|
|
454
|
+
var init_openaiAdapter = __esm(() => {
|
|
455
|
+
init_proxy();
|
|
456
|
+
init_providerRegistry();
|
|
457
|
+
TIER1_TOOLS = new Set([
|
|
458
|
+
"Bash",
|
|
459
|
+
"Read",
|
|
460
|
+
"Write",
|
|
461
|
+
"Edit",
|
|
462
|
+
"Glob",
|
|
463
|
+
"Grep"
|
|
464
|
+
]);
|
|
465
|
+
TIER2_TOOLS = new Set([
|
|
466
|
+
"WebFetch",
|
|
467
|
+
"WebSearch",
|
|
468
|
+
"NotebookEdit",
|
|
469
|
+
"Agent"
|
|
470
|
+
]);
|
|
471
|
+
SKIP_TOOLS = new Set([
|
|
472
|
+
"EnterPlanMode",
|
|
473
|
+
"ExitPlanMode",
|
|
474
|
+
"EnterWorktree",
|
|
475
|
+
"ExitWorktree",
|
|
476
|
+
"TodoWrite",
|
|
477
|
+
"Brief",
|
|
478
|
+
"TaskOutput",
|
|
479
|
+
"TaskStop",
|
|
480
|
+
"TaskCreate",
|
|
481
|
+
"TaskGet",
|
|
482
|
+
"TaskUpdate",
|
|
483
|
+
"TaskList",
|
|
484
|
+
"TeamCreate",
|
|
485
|
+
"TeamDelete",
|
|
486
|
+
"ToolSearch",
|
|
487
|
+
"SendMessage",
|
|
488
|
+
"AskUserQuestion",
|
|
489
|
+
"Skill",
|
|
490
|
+
"ListMcpResources",
|
|
491
|
+
"ReadMcpResource",
|
|
492
|
+
"SyntheticOutput",
|
|
493
|
+
"CronCreate",
|
|
494
|
+
"CronDelete",
|
|
495
|
+
"CronList"
|
|
496
|
+
]);
|
|
497
|
+
OLLAMA_LICENSE_HASHES = new Set([
|
|
498
|
+
"2352f11c7b38404b2ab5a135b3c429199a5a0ff7c04349c9179b3f58265f6b3a"
|
|
499
|
+
]);
|
|
500
|
+
});
|
|
501
|
+
init_openaiAdapter();
|
|
502
|
+
|
|
503
|
+
export {
|
|
504
|
+
getOpenAIConfig,
|
|
505
|
+
createOpenAIAdapterClient
|
|
506
|
+
};
|
|
@@ -7,36 +7,36 @@ import {
|
|
|
7
7
|
init_messages1 as init_messages,
|
|
8
8
|
init_select,
|
|
9
9
|
stripPromptXMLTags
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import"./chunk-
|
|
10
|
+
} from "./chunk-f2j68nm2.js";
|
|
11
|
+
import"./chunk-kcsjve6k.js";
|
|
12
|
+
import"./chunk-97cn7qrc.js";
|
|
13
|
+
import"./chunk-288q73ba.js";
|
|
12
14
|
import"./chunk-t0rgmccj.js";
|
|
13
|
-
import"./chunk-
|
|
14
|
-
import"./chunk-nbxwkcdx.js";
|
|
15
|
-
import"./chunk-kngg2gwm.js";
|
|
15
|
+
import"./chunk-rzqdgstx.js";
|
|
16
16
|
import {
|
|
17
17
|
Byline,
|
|
18
18
|
KeyboardShortcutHint,
|
|
19
19
|
init_Byline,
|
|
20
20
|
init_KeyboardShortcutHint
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-88wrkdqr.js";
|
|
22
22
|
import"./chunk-2gzv8nrw.js";
|
|
23
23
|
import"./chunk-ehtwnxpg.js";
|
|
24
24
|
import"./chunk-3be7ka25.js";
|
|
25
|
-
import"./chunk-
|
|
25
|
+
import"./chunk-f340t6hc.js";
|
|
26
26
|
import"./chunk-cgfdkzhb.js";
|
|
27
27
|
import"./chunk-bhdt6k7w.js";
|
|
28
28
|
import"./chunk-45kxdsp8.js";
|
|
29
29
|
import"./chunk-5dbk24zg.js";
|
|
30
|
-
import"./chunk-
|
|
31
|
-
import"./chunk-
|
|
32
|
-
import"./chunk-
|
|
30
|
+
import"./chunk-p8qcw3dd.js";
|
|
31
|
+
import"./chunk-esysrh9b.js";
|
|
32
|
+
import"./chunk-xsejfs0g.js";
|
|
33
33
|
import"./chunk-9gbamk79.js";
|
|
34
|
-
import"./chunk-
|
|
34
|
+
import"./chunk-rvpdt0cv.js";
|
|
35
35
|
import"./chunk-9e2kqv5g.js";
|
|
36
36
|
import {
|
|
37
37
|
Pane,
|
|
38
38
|
init_Pane
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-sb9w2yyg.js";
|
|
40
40
|
import {
|
|
41
41
|
ThemedBox_default,
|
|
42
42
|
ThemedText,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
init_osc,
|
|
45
45
|
require_compiler_runtime,
|
|
46
46
|
setClipboard
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-6kcc4eqj.js";
|
|
48
48
|
import"./chunk-7m2nd8da.js";
|
|
49
49
|
import"./chunk-ps49ymvj.js";
|
|
50
50
|
import {
|
|
@@ -52,12 +52,12 @@ import {
|
|
|
52
52
|
require_react
|
|
53
53
|
} from "./chunk-g338npwr.js";
|
|
54
54
|
import"./chunk-zk2wsm7d.js";
|
|
55
|
-
import"./chunk-
|
|
56
|
-
import"./chunk-avyperdk.js";
|
|
57
|
-
import"./chunk-m06q12hg.js";
|
|
58
|
-
import"./chunk-vfvrhgnb.js";
|
|
55
|
+
import"./chunk-nr6vqqc5.js";
|
|
59
56
|
import"./chunk-spqaamnc.js";
|
|
60
57
|
import"./chunk-4jm600zv.js";
|
|
58
|
+
import"./chunk-6chnsxhy.js";
|
|
59
|
+
import"./chunk-m06q12hg.js";
|
|
60
|
+
import"./chunk-rqyb8v83.js";
|
|
61
61
|
import"./chunk-qz2x630m.js";
|
|
62
62
|
import"./chunk-7sb5axvf.js";
|
|
63
63
|
import"./chunk-v9smspw2.js";
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
init_config1 as init_config,
|
|
68
68
|
init_stringUtils,
|
|
69
69
|
saveGlobalConfig
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-1p8q0pgc.js";
|
|
71
71
|
import"./chunk-e3g8q4cn.js";
|
|
72
72
|
import"./chunk-z1yfevvp.js";
|
|
73
73
|
import"./chunk-ctw5jwcd.js";
|
|
@@ -82,7 +82,7 @@ import"./chunk-w2z5pqd3.js";
|
|
|
82
82
|
import"./chunk-7ymfj7m3.js";
|
|
83
83
|
import"./chunk-f5ma3nh5.js";
|
|
84
84
|
import"./chunk-v1kzp02e.js";
|
|
85
|
-
import"./chunk-
|
|
85
|
+
import"./chunk-n58eyfnk.js";
|
|
86
86
|
import"./chunk-p2816w9z.js";
|
|
87
87
|
import"./chunk-0vkfrmqm.js";
|
|
88
88
|
import"./chunk-0xjaqda8.js";
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_setup,
|
|
4
4
|
isChromeExtensionInstalled
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-55wav5md.js";
|
|
6
6
|
import"./chunk-gyj242zr.js";
|
|
7
7
|
import {
|
|
8
8
|
Select,
|
|
9
9
|
init_AppState,
|
|
10
10
|
init_select,
|
|
11
11
|
useAppState
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import"./chunk-
|
|
12
|
+
} from "./chunk-f2j68nm2.js";
|
|
13
|
+
import"./chunk-kcsjve6k.js";
|
|
14
|
+
import"./chunk-97cn7qrc.js";
|
|
15
|
+
import"./chunk-288q73ba.js";
|
|
14
16
|
import"./chunk-t0rgmccj.js";
|
|
15
|
-
import"./chunk-
|
|
16
|
-
import"./chunk-nbxwkcdx.js";
|
|
17
|
-
import"./chunk-kngg2gwm.js";
|
|
17
|
+
import"./chunk-rzqdgstx.js";
|
|
18
18
|
import {
|
|
19
19
|
Dialog,
|
|
20
20
|
init_Dialog
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-88wrkdqr.js";
|
|
22
22
|
import"./chunk-2gzv8nrw.js";
|
|
23
23
|
import"./chunk-ehtwnxpg.js";
|
|
24
24
|
import"./chunk-3be7ka25.js";
|
|
25
|
-
import"./chunk-
|
|
25
|
+
import"./chunk-f340t6hc.js";
|
|
26
26
|
import"./chunk-cgfdkzhb.js";
|
|
27
27
|
import"./chunk-bhdt6k7w.js";
|
|
28
28
|
import {
|
|
@@ -31,19 +31,19 @@ import {
|
|
|
31
31
|
openInChrome
|
|
32
32
|
} from "./chunk-45kxdsp8.js";
|
|
33
33
|
import"./chunk-5dbk24zg.js";
|
|
34
|
-
import"./chunk-
|
|
35
|
-
import"./chunk-
|
|
36
|
-
import"./chunk-
|
|
34
|
+
import"./chunk-p8qcw3dd.js";
|
|
35
|
+
import"./chunk-esysrh9b.js";
|
|
36
|
+
import"./chunk-xsejfs0g.js";
|
|
37
37
|
import"./chunk-9gbamk79.js";
|
|
38
|
-
import"./chunk-
|
|
38
|
+
import"./chunk-rvpdt0cv.js";
|
|
39
39
|
import"./chunk-9e2kqv5g.js";
|
|
40
|
-
import"./chunk-
|
|
40
|
+
import"./chunk-sb9w2yyg.js";
|
|
41
41
|
import {
|
|
42
42
|
ThemedBox_default,
|
|
43
43
|
ThemedText,
|
|
44
44
|
init_ink,
|
|
45
45
|
require_compiler_runtime
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-6kcc4eqj.js";
|
|
47
47
|
import"./chunk-7m2nd8da.js";
|
|
48
48
|
import"./chunk-ps49ymvj.js";
|
|
49
49
|
import {
|
|
@@ -51,15 +51,15 @@ import {
|
|
|
51
51
|
require_react
|
|
52
52
|
} from "./chunk-g338npwr.js";
|
|
53
53
|
import"./chunk-zk2wsm7d.js";
|
|
54
|
-
import"./chunk-
|
|
55
|
-
import"./chunk-
|
|
54
|
+
import"./chunk-nr6vqqc5.js";
|
|
55
|
+
import"./chunk-spqaamnc.js";
|
|
56
|
+
import"./chunk-4jm600zv.js";
|
|
57
|
+
import"./chunk-6chnsxhy.js";
|
|
56
58
|
import {
|
|
57
59
|
init_browser,
|
|
58
60
|
openBrowser
|
|
59
61
|
} from "./chunk-m06q12hg.js";
|
|
60
|
-
import"./chunk-
|
|
61
|
-
import"./chunk-spqaamnc.js";
|
|
62
|
-
import"./chunk-4jm600zv.js";
|
|
62
|
+
import"./chunk-rqyb8v83.js";
|
|
63
63
|
import"./chunk-qz2x630m.js";
|
|
64
64
|
import"./chunk-7sb5axvf.js";
|
|
65
65
|
import"./chunk-v9smspw2.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
init_config1 as init_config,
|
|
70
70
|
isClaudeAISubscriber,
|
|
71
71
|
saveGlobalConfig
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-1p8q0pgc.js";
|
|
73
73
|
import"./chunk-e3g8q4cn.js";
|
|
74
74
|
import"./chunk-z1yfevvp.js";
|
|
75
75
|
import"./chunk-ctw5jwcd.js";
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
import"./chunk-7ymfj7m3.js";
|
|
88
88
|
import"./chunk-f5ma3nh5.js";
|
|
89
89
|
import"./chunk-v1kzp02e.js";
|
|
90
|
-
import"./chunk-
|
|
90
|
+
import"./chunk-n58eyfnk.js";
|
|
91
91
|
import"./chunk-p2816w9z.js";
|
|
92
92
|
import"./chunk-0vkfrmqm.js";
|
|
93
93
|
import"./chunk-0xjaqda8.js";
|