@caspian2026/agent-sdk 0.0.8 → 0.0.11
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-dtgh4te6.js → chunk-0ac6r0fw.js} +46 -45
- package/dist/{chunk-cfgha78n.js → chunk-0dm971mw.js} +2 -2
- package/dist/{chunk-0mej3p7q.js → chunk-0f5anjkb.js} +14 -14
- package/dist/{chunk-6g5qbbxk.js → chunk-0k9sft0s.js} +47 -46
- package/dist/chunk-0kgwksm1.js +57 -0
- package/dist/chunk-0vp3wfab.js +12 -0
- package/dist/{chunk-d9yghsfg.js → chunk-1etzkkxs.js} +1 -1
- package/dist/{chunk-a4npwxvb.js → chunk-1gz2wrhq.js} +46 -45
- package/dist/{chunk-25bwa70y.js → chunk-1pr4hr5x.js} +49 -48
- package/dist/{chunk-2f21meep.js → chunk-1v01c96r.js} +1 -1
- package/dist/{chunk-jvmybb06.js → chunk-1vhjn1j9.js} +46 -45
- package/dist/{chunk-69r3hm9b.js → chunk-1wr6ag3j.js} +13 -19
- package/dist/{chunk-83e71kz6.js → chunk-2072dpbx.js} +2 -2
- package/dist/{chunk-8hpq2659.js → chunk-24t2wjab.js} +1 -1
- package/dist/{chunk-q7e0106d.js → chunk-2589k4k0.js} +51 -56
- package/dist/{chunk-d7886r6a.js → chunk-26wtxbdc.js} +7774 -7774
- package/dist/{chunk-ahrhwpm9.js → chunk-28k13wc7.js} +2 -2
- package/dist/{chunk-vvjgdzhn.js → chunk-2cr43hzw.js} +55 -51
- package/dist/{chunk-mw1kpeg9.js → chunk-2sqhjnpn.js} +1909 -1377
- package/dist/chunk-2tfe2zs1.js +87 -0
- package/dist/{chunk-c11swzas.js → chunk-2vteceqh.js} +5 -5
- package/dist/{chunk-zmra45az.js → chunk-2z9rak9s.js} +47 -46
- package/dist/chunk-31bwdrm5.js +93 -0
- package/dist/{chunk-2xbyb015.js → chunk-38rkx4cj.js} +47 -46
- package/dist/{chunk-am3qcgzp.js → chunk-394djs3v.js} +56 -55
- package/dist/{chunk-15m49c67.js → chunk-3e28fvn0.js} +2 -2
- package/dist/{chunk-4hv90qcz.js → chunk-3mgywd32.js} +1 -1
- package/dist/{chunk-234668cb.js → chunk-3we6j8b4.js} +5 -5
- package/dist/{chunk-7rnqsng2.js → chunk-400r5gmq.js} +19 -19
- package/dist/{chunk-yc23zxmj.js → chunk-4057dtxd.js} +1 -1
- package/dist/{chunk-70eey1nh.js → chunk-40s88wdg.js} +2 -2
- package/dist/{chunk-8nfn89nz.js → chunk-41en0cc6.js} +9 -9
- package/dist/{chunk-t5vbqd9d.js → chunk-488spx13.js} +55 -54
- package/dist/{chunk-9v13f3gm.js → chunk-49bs7x5p.js} +558 -196
- package/dist/{chunk-0awwmrwr.js → chunk-4ayjwyqj.js} +2 -2
- package/dist/chunk-4d0g9n3q.js +92 -0
- package/dist/{chunk-denyma1s.js → chunk-4fh25m1z.js} +14 -12
- package/dist/chunk-4hgxxzdw.js +94 -0
- package/dist/{chunk-8g747a8x.js → chunk-4pbx3g7s.js} +1 -1
- package/dist/{chunk-fkhs3myp.js → chunk-4pj88fnc.js} +5 -3
- package/dist/{chunk-st73prx0.js → chunk-4re879ja.js} +47 -46
- package/dist/{chunk-pb92bj1h.js → chunk-50art2hr.js} +6 -6
- package/dist/{chunk-1nk93fqz.js → chunk-5cxjxxx8.js} +2 -7
- package/dist/{chunk-kek5v6ef.js → chunk-5pqq0nym.js} +3 -3
- package/dist/{chunk-nk82j7r2.js → chunk-6696fngv.js} +7 -7
- package/dist/{chunk-ya40p6vj.js → chunk-66dk94r4.js} +46 -45
- package/dist/{chunk-xrpstt41.js → chunk-67808qek.js} +4 -4
- package/dist/{chunk-zhk465tg.js → chunk-69841w77.js} +46 -45
- package/dist/{chunk-jgzxmtpf.js → chunk-6ebvysef.js} +52 -52
- package/dist/{chunk-bmbq6nt1.js → chunk-6wzg2hpc.js} +2 -2
- package/dist/{chunk-12k745vf.js → chunk-6zsxtysq.js} +3 -3
- package/dist/{chunk-qcnhb4cd.js → chunk-75qqeec8.js} +3 -3
- package/dist/{chunk-nvwwtq1w.js → chunk-765zdaq8.js} +49 -48
- package/dist/{chunk-zq6ezxh2.js → chunk-7ce8wn1f.js} +49 -45
- package/dist/{chunk-e7h4qxgw.js → chunk-7etkb4pr.js} +4 -4
- package/dist/{chunk-wha6v7za.js → chunk-7krg0dkt.js} +2 -2
- package/dist/{chunk-nqrc7pc4.js → chunk-7p2vw8qe.js} +29 -27
- package/dist/{chunk-q1ah9nbq.js → chunk-7t5ymv2m.js} +1 -1
- package/dist/{chunk-xz655xxa.js → chunk-7tphrzjj.js} +2 -2
- package/dist/{chunk-hzknr99c.js → chunk-83b2frat.js} +4 -4
- package/dist/{chunk-bxcfz5gy.js → chunk-87xg6yb4.js} +1 -1
- package/dist/{chunk-nrtksr2p.js → chunk-8b2y3x7a.js} +1 -1
- package/dist/{chunk-1cq2vrzq.js → chunk-8c907cv9.js} +4 -4
- package/dist/{chunk-88cekjja.js → chunk-8dzg4nr5.js} +47 -46
- package/dist/{chunk-2fxpd35d.js → chunk-8hn2xqjz.js} +2 -2
- package/dist/{chunk-3g1vqhyx.js → chunk-8kmna3cc.js} +17 -21
- package/dist/{chunk-1zhy5cbc.js → chunk-8r5eevap.js} +13 -13
- package/dist/{chunk-7n51wk9k.js → chunk-8vkv63c5.js} +2 -2
- package/dist/{chunk-268jd0rc.js → chunk-8w21adpe.js} +6 -4
- package/dist/{chunk-21gmrwhs.js → chunk-8w8d1k7b.js} +17 -21
- package/dist/{chunk-yzcjz0gg.js → chunk-90bqyqfd.js} +46 -45
- package/dist/{chunk-2xvc97x4.js → chunk-942yq6xx.js} +3 -3
- package/dist/{chunk-88xc4d7f.js → chunk-99ck62v1.js} +49 -48
- package/dist/chunk-9ewnsd7f.js +31 -0
- package/dist/{chunk-xwg327ys.js → chunk-9g29z3dv.js} +6 -6
- package/dist/{chunk-5a5w0ygx.js → chunk-9nj016rn.js} +2 -2
- package/dist/chunk-9nk34wee.js +441 -0
- package/dist/{chunk-2v4x8kaq.js → chunk-9z45660r.js} +51 -50
- package/dist/{chunk-s1tg295x.js → chunk-a3gq2vv4.js} +10 -8
- package/dist/{chunk-6p4cyhb3.js → chunk-a6d2q415.js} +2 -2
- package/dist/{chunk-0jtbeesf.js → chunk-akqsq8bn.js} +16 -20
- package/dist/{chunk-tff58196.js → chunk-aqq5qh2y.js} +48 -47
- package/dist/{chunk-dvcwahst.js → chunk-awdftfcf.js} +51 -50
- package/dist/{chunk-3zxswxtg.js → chunk-b3nkagky.js} +2 -2
- package/dist/{chunk-jgjqa49s.js → chunk-b56smerd.js} +3 -3
- package/dist/{chunk-enkdxqas.js → chunk-b5asw4tj.js} +6 -6
- package/dist/{chunk-1x0y4426.js → chunk-b8f5dz5b.js} +4 -4
- package/dist/{chunk-30smv00b.js → chunk-bayvqjm6.js} +47 -46
- package/dist/chunk-bgyb0z0p.js +96 -0
- package/dist/{chunk-3skj4gfg.js → chunk-bhabqhx1.js} +47 -46
- package/dist/{chunk-4140c8xy.js → chunk-bj85dnsy.js} +20 -24
- package/dist/{chunk-vdcm8hz6.js → chunk-bp4s0gry.js} +47 -46
- package/dist/{chunk-d00mfc1e.js → chunk-brng9f4q.js} +46 -45
- package/dist/{chunk-a3ws4gae.js → chunk-bvdzmdw4.js} +47 -46
- package/dist/{chunk-m87bhhqv.js → chunk-bzatg35k.js} +1 -1
- package/dist/{chunk-hxzt3r84.js → chunk-ca72efeb.js} +51 -50
- package/dist/{chunk-vajwapkf.js → chunk-cdact4jj.js} +17 -23
- package/dist/{chunk-s3hsqf80.js → chunk-cexw1jmv.js} +30 -81
- package/dist/chunk-cfyvkbe5.js +197 -0
- package/dist/{chunk-jj5wj46b.js → chunk-cjca0q27.js} +7 -7
- package/dist/{chunk-3hwa20vg.js → chunk-cs9aqzag.js} +49 -46
- package/dist/{chunk-1ax1znzj.js → chunk-cttezxcb.js} +24 -14
- package/dist/chunk-d2g976qe.js +1457 -0
- package/dist/{chunk-d6rypdxt.js → chunk-d7ws01qk.js} +1 -1
- package/dist/{chunk-xxw9a0bq.js → chunk-dhwr4fz4.js} +2 -2
- package/dist/{chunk-x2pvw7xw.js → chunk-dmyedkpw.js} +8 -8
- package/dist/{chunk-af868wet.js → chunk-dsqfe05n.js} +46 -45
- package/dist/{chunk-4r50c14n.js → chunk-e82vbky2.js} +46 -45
- package/dist/{chunk-vawgyev5.js → chunk-eba0b85f.js} +3 -3
- package/dist/{chunk-87e209aj.js → chunk-eqnfk1g0.js} +46 -45
- package/dist/chunk-erj5nc8b.js +92 -0
- package/dist/{chunk-ky39hkg1.js → chunk-eseq7djh.js} +9 -7
- package/dist/{chunk-vvsbvz2b.js → chunk-esrkw9v4.js} +2 -2
- package/dist/{chunk-jgpmpgx6.js → chunk-etdt1xz3.js} +1 -1
- package/dist/{chunk-w05jpkkr.js → chunk-ewbvcf88.js} +5 -9
- package/dist/chunk-ewhxddsa.js +445 -0
- package/dist/{chunk-jjh7m5sg.js → chunk-ey1pg5v8.js} +66 -77
- package/dist/{chunk-h02gcdx5.js → chunk-f1v8h236.js} +8 -8
- package/dist/chunk-f70fwxds.js +211 -0
- package/dist/{chunk-1dwvgrfc.js → chunk-f73trmvk.js} +46 -45
- package/dist/{chunk-xnv6kb39.js → chunk-fcww10dt.js} +22 -23
- package/dist/{chunk-15edybe0.js → chunk-fhprmgf4.js} +1 -1
- package/dist/{chunk-5awgsvrw.js → chunk-fnf4av18.js} +14 -6
- package/dist/{chunk-j4m8fd76.js → chunk-fy543pwf.js} +7 -11
- package/dist/chunk-fybanr7d.js +988 -0
- package/dist/chunk-g5epkvz2.js +331 -0
- package/dist/chunk-g5pe8dew.js +25 -0
- package/dist/chunk-g8183rkv.js +517 -0
- package/dist/{chunk-4g0nj78p.js → chunk-gbztsm42.js} +46 -45
- package/dist/{chunk-ga86yjm1.js → chunk-gdwdqewd.js} +3 -3
- package/dist/{chunk-kva79cra.js → chunk-ge57c9hg.js} +7 -5
- package/dist/{chunk-f2hbn5rk.js → chunk-ggq2y3tn.js} +100420 -57118
- package/dist/{chunk-w0gmf6bv.js → chunk-gpzkzg7v.js} +47 -46
- package/dist/{chunk-v0bykh19.js → chunk-gw1a82j8.js} +108 -102
- package/dist/chunk-gw1g065z.js +20 -0
- package/dist/{chunk-21jsjcfa.js → chunk-h4dnamt5.js} +46 -45
- package/dist/{chunk-hh3k5s1s.js → chunk-h5mkzk0z.js} +3 -3
- package/dist/chunk-h7dm24cc.js +108 -0
- package/dist/{chunk-wr3pd88n.js → chunk-hadww3nd.js} +40 -9
- package/dist/{chunk-8ywngxqt.js → chunk-hapvn84d.js} +10 -10
- package/dist/{chunk-gbte7d7h.js → chunk-hekf5s9q.js} +4 -2
- package/dist/{chunk-veap97he.js → chunk-hkgb5y9f.js} +46 -45
- package/dist/{chunk-23fkapww.js → chunk-hzceftr4.js} +2 -2
- package/dist/chunk-j2x6fp25.js +29 -0
- package/dist/{chunk-vsqwd13w.js → chunk-j30g8fd1.js} +17 -19
- package/dist/{chunk-yyf72f78.js → chunk-j35mw64g.js} +4 -2
- package/dist/{chunk-qq5d2s0d.js → chunk-j3awswy3.js} +46 -45
- package/dist/{chunk-dmqeqxfz.js → chunk-j513wqe9.js} +46 -45
- package/dist/{chunk-hya4c599.js → chunk-jkens34n.js} +46 -45
- package/dist/{chunk-s4zb3f1b.js → chunk-jperb6n2.js} +46 -45
- package/dist/{chunk-psnsve7m.js → chunk-jqmr6ag1.js} +49 -48
- package/dist/{chunk-q7jnesv8.js → chunk-jsj3fx0g.js} +5 -5
- package/dist/{chunk-w1sv7j01.js → chunk-jx6k8msx.js} +46 -45
- package/dist/{chunk-xw8pjerk.js → chunk-jyz65rfv.js} +48 -47
- package/dist/{chunk-1avzakfd.js → chunk-k5mckm5f.js} +3 -3
- package/dist/{chunk-zctfbr1v.js → chunk-k7cw1a8a.js} +1 -1
- package/dist/{chunk-m46xyqr6.js → chunk-k9z36r5q.js} +48 -47
- package/dist/{chunk-th4y838y.js → chunk-kamesdff.js} +51 -50
- package/dist/{chunk-y7we499r.js → chunk-kj4m0j4n.js} +8 -8
- package/dist/{chunk-tdbz9gbm.js → chunk-kjqyhxz7.js} +6 -6
- package/dist/{chunk-k0v0cz71.js → chunk-m25yfqc3.js} +46 -45
- package/dist/{chunk-4nspekjp.js → chunk-mcws22k3.js} +1 -28
- package/dist/chunk-mgpj5f7h.js +150 -0
- package/dist/{chunk-1ybvj5df.js → chunk-mmn62bh2.js} +47 -46
- package/dist/{chunk-jpc9zwsk.js → chunk-mq94v5vn.js} +3 -3
- package/dist/{chunk-a1bf2kh4.js → chunk-msvv7dpt.js} +46 -45
- package/dist/chunk-mtv83pq4.js +123 -0
- package/dist/chunk-n36xjgtj.js +95 -0
- package/dist/{chunk-twqzmqsn.js → chunk-n9d0gg9z.js} +31 -27
- package/dist/{chunk-cvm2tmwg.js → chunk-na63s9wn.js} +20 -24
- package/dist/{chunk-jtztm8f5.js → chunk-nebntwvd.js} +44 -43
- package/dist/{chunk-0ym2z0c7.js → chunk-nj02kck4.js} +1 -1
- package/dist/{chunk-5rv9c8yd.js → chunk-nrjtxhyr.js} +1 -1
- package/dist/{chunk-nqn45znr.js → chunk-ns7x6xam.js} +9 -9
- package/dist/{chunk-jaaxk89e.js → chunk-nsc89h0n.js} +2 -22
- package/dist/{chunk-gnj7tyj6.js → chunk-nv7vcqme.js} +49 -48
- package/dist/{chunk-z19sd3bt.js → chunk-p4196wzm.js} +5 -5
- package/dist/{chunk-as5rvw4n.js → chunk-pbeee2kp.js} +17 -21
- package/dist/{chunk-va8drjmv.js → chunk-pcbm66ch.js} +48 -47
- package/dist/{chunk-phd1qfpc.js → chunk-pd2vy8hx.js} +5 -5
- package/dist/chunk-pe3n0w2t.js +91 -0
- package/dist/{chunk-bd5sqj86.js → chunk-peh3mj19.js} +11 -11
- package/dist/{chunk-mk1y74w7.js → chunk-pepgckn4.js} +17 -21
- package/dist/{chunk-wqvr37xp.js → chunk-pm67yj46.js} +15 -31
- package/dist/{chunk-qyqpb15f.js → chunk-pp8nrx40.js} +205 -261
- package/dist/{chunk-nx7c354z.js → chunk-pq5290db.js} +46 -45
- package/dist/{chunk-w4yn8cq7.js → chunk-psm26hv7.js} +8 -8
- package/dist/{chunk-hwn8vetn.js → chunk-pwpk3gm6.js} +10 -10
- package/dist/chunk-pzp8fj0a.js +123 -0
- package/dist/{chunk-x94btg29.js → chunk-q1j8ebyf.js} +17 -21
- package/dist/{chunk-87scz097.js → chunk-q2fn2p7y.js} +46 -45
- package/dist/chunk-q347821k.js +99 -0
- package/dist/{chunk-23jzrwsw.js → chunk-q6tdxy8v.js} +5 -5
- package/dist/{chunk-byb2mn1c.js → chunk-qb88vpgy.js} +118 -450
- package/dist/{chunk-eenq3avg.js → chunk-qcrpqjya.js} +1 -1
- package/dist/chunk-qehbwde1.js +90 -0
- package/dist/{chunk-ck0ap688.js → chunk-qkczt8cr.js} +4 -4
- package/dist/{chunk-c3d2cnz5.js → chunk-qmmxwh8x.js} +7 -7
- package/dist/{chunk-1a6ez1mg.js → chunk-qxmm3jbn.js} +51 -49
- package/dist/{chunk-njxgct8f.js → chunk-qywk2c7m.js} +46 -45
- package/dist/{chunk-rkg741k3.js → chunk-qz0xdht6.js} +14 -14
- package/dist/chunk-r0dpeqg0.js +468 -0
- package/dist/{chunk-6ksdp40n.js → chunk-r0m970pk.js} +1 -1
- package/dist/{chunk-fape0yfp.js → chunk-r5bf0h0t.js} +46 -45
- package/dist/{chunk-jcwkgtbp.js → chunk-r7xpsch7.js} +52 -90
- package/dist/{chunk-z9n0183s.js → chunk-rfq9kmsy.js} +9 -9
- package/dist/{chunk-xp61y5ba.js → chunk-rkv8bdtr.js} +2 -2
- package/dist/{chunk-5cem2v7n.js → chunk-rkvwts6v.js} +5 -5
- package/dist/{chunk-1vnd9s2j.js → chunk-rm4c8zd9.js} +57 -66
- package/dist/{chunk-e7efcp3k.js → chunk-rm9gb396.js} +257 -2857
- package/dist/{chunk-0m9w9esf.js → chunk-s213xmp8.js} +46 -45
- package/dist/{chunk-c42pqnxx.js → chunk-s3s0611n.js} +1 -1
- package/dist/{chunk-qdnxk7d7.js → chunk-scrk9jbt.js} +29 -30
- package/dist/{chunk-wayfjcwt.js → chunk-sdfvr9ps.js} +4 -4
- package/dist/{chunk-7mqab3z7.js → chunk-skp5w8bq.js} +1 -1
- package/dist/{chunk-76j2e9vy.js → chunk-snxp8mxj.js} +2 -2
- package/dist/{chunk-ad3v6mzw.js → chunk-tgmettzd.js} +12 -12
- package/dist/{chunk-cdj51xbj.js → chunk-tj6hejny.js} +46 -45
- package/dist/chunk-tn0xnp8a.js +124 -0
- package/dist/chunk-tpn6rh31.js +62 -0
- package/dist/{chunk-qsc98gbe.js → chunk-tq4vws6e.js} +2 -2
- package/dist/{chunk-ydcsbj4t.js → chunk-tzzzbb9d.js} +11 -9
- package/dist/chunk-v3s93bzd.js +34 -0
- package/dist/{chunk-4cp6193g.js → chunk-v4t6dyyh.js} +2 -2
- package/dist/{chunk-xfkfh5sd.js → chunk-v6fcbmqz.js} +1808 -1643
- package/dist/{chunk-k7g9gcr9.js → chunk-vc59jf3q.js} +64 -58
- package/dist/{chunk-gdhz1652.js → chunk-vdk9b74d.js} +27 -30
- package/dist/{chunk-tvzr9c8a.js → chunk-vf9c1649.js} +46 -45
- package/dist/{chunk-naybw0p0.js → chunk-vgk0nymz.js} +8 -8
- package/dist/{chunk-jh965sa0.js → chunk-vgzpbh28.js} +47 -46
- package/dist/{chunk-q87kegxh.js → chunk-vhxrn87v.js} +49 -48
- package/dist/chunk-vnzgpyrz.js +1534 -0
- package/dist/{chunk-r6kaak61.js → chunk-vqh6cjfx.js} +16 -20
- package/dist/{chunk-wbbykfdd.js → chunk-vz3pa5n6.js} +1 -1
- package/dist/{chunk-pwqm47kn.js → chunk-w1h5z2sy.js} +46 -45
- package/dist/{chunk-rm2vtv77.js → chunk-w2vvxj1f.js} +22 -25
- package/dist/{chunk-s7q42kp2.js → chunk-w5zezk61.js} +9 -9
- package/dist/{chunk-vrjbc8ap.js → chunk-wa8yn2p0.js} +1 -1
- package/dist/{chunk-a3wczqrp.js → chunk-wahqac7c.js} +37 -41
- package/dist/{chunk-qvd3hbqs.js → chunk-wc0np2zw.js} +5 -5
- package/dist/{chunk-2j3v2dgk.js → chunk-wcpmtszh.js} +47 -46
- package/dist/{chunk-jxfp3g9b.js → chunk-wdzjtdye.js} +4 -4
- package/dist/{chunk-0g5cy3wj.js → chunk-wgk9sxk7.js} +4 -4
- package/dist/{chunk-rc9x0raa.js → chunk-wmbpjx7v.js} +56 -55
- package/dist/chunk-wrsy4y58.js +93 -0
- package/dist/{chunk-rtmh0v4c.js → chunk-wskkym13.js} +6 -6
- package/dist/{chunk-bm5rc541.js → chunk-wt6v1zbe.js} +5 -5
- package/dist/{chunk-37p5p94r.js → chunk-wyj3wpjv.js} +55 -54
- package/dist/chunk-x7fdwq3d.js +33 -0
- package/dist/{chunk-6t5zvnrg.js → chunk-xdg2rpj3.js} +48 -46
- package/dist/{chunk-chsyvavm.js → chunk-xeb6075z.js} +1 -1
- package/dist/{chunk-23q4jpn2.js → chunk-xemw9d52.js} +3 -3
- package/dist/{chunk-n7pnyq43.js → chunk-xhfmdq1y.js} +16 -0
- package/dist/{chunk-jmkn11my.js → chunk-xmdny0m1.js} +20 -20
- package/dist/chunk-xswyz2es.js +118 -0
- package/dist/{chunk-67a4147x.js → chunk-xv5a2xbe.js} +1 -1
- package/dist/{chunk-1dgdjrm1.js → chunk-xx709m24.js} +4 -4
- package/dist/{chunk-qn8z4r79.js → chunk-y024419t.js} +50 -48
- package/dist/{chunk-dbwmzvfj.js → chunk-y1ps26mz.js} +46 -45
- package/dist/{chunk-4m9df5ef.js → chunk-y2r5e6kv.js} +17 -21
- package/dist/{chunk-k1crm94z.js → chunk-y41svpxw.js} +46 -45
- package/dist/{chunk-qjyg1dv7.js → chunk-ygwcq4vd.js} +6 -10
- package/dist/{chunk-fk8crdnk.js → chunk-ykv414dd.js} +48 -46
- package/dist/{chunk-g5pgham9.js → chunk-ynkzfhs1.js} +20 -14
- package/dist/{chunk-gvrjgq1n.js → chunk-yrqx3p9k.js} +16 -20
- package/dist/{chunk-c9dmpdss.js → chunk-ys17e80d.js} +46 -45
- package/dist/{chunk-97wgdsab.js → chunk-z16txqz0.js} +3 -3
- package/dist/{chunk-yvtzznds.js → chunk-z6wm96eh.js} +2 -2
- package/dist/{chunk-8ybw2s0h.js → chunk-zbb7qd0v.js} +4 -4
- package/dist/{chunk-030rqd3a.js → chunk-zjxv5g2n.js} +54 -53
- package/dist/{chunk-425w66ka.js → chunk-zmwgp2sh.js} +4 -4
- package/dist/cli.js +8 -8
- package/dist/gateway/index.js +430 -0
- package/dist/gateway/worker.js +482687 -0
- package/package.json +1 -1
- package/dist/chunk-11cz07kz.js +0 -93
- package/dist/chunk-1pbtp2z2.js +0 -92
- package/dist/chunk-25y2dtzf.js +0 -91
- package/dist/chunk-3hyj0zpy.js +0 -95
- package/dist/chunk-4kqjjakw.js +0 -73
- package/dist/chunk-4zwqbg7s.js +0 -87
- package/dist/chunk-5be33wja.js +0 -120
- package/dist/chunk-70mgxhkz.js +0 -369
- package/dist/chunk-7gmk09cq.js +0 -116
- package/dist/chunk-8dprcdra.js +0 -92
- package/dist/chunk-8xwx1xtg.js +0 -120
- package/dist/chunk-a579wjd2.js +0 -436
- package/dist/chunk-axqk3mxk.js +0 -116
- package/dist/chunk-c0ckmxr1.js +0 -86
- package/dist/chunk-c6t24y8q.js +0 -94
- package/dist/chunk-cfv996bs.js +0 -22
- package/dist/chunk-e5t5eefc.js +0 -62
- package/dist/chunk-eyph0250.js +0 -88
- package/dist/chunk-f825x57v.js +0 -91
- package/dist/chunk-h9xx5bj6.js +0 -91
- package/dist/chunk-j1dg659r.js +0 -89
- package/dist/chunk-jk8seqkk.js +0 -90
- package/dist/chunk-jzg4nddc.js +0 -92
- package/dist/chunk-k5vy0s3c.js +0 -93
- package/dist/chunk-ke820fjw.js +0 -91
- package/dist/chunk-kyzd4p8z.js +0 -111
- package/dist/chunk-njrt3tac.js +0 -640
- package/dist/chunk-pavb6a7w.js +0 -516
- package/dist/chunk-q268gpa0.js +0 -145
- package/dist/chunk-qvh1w3t7.js +0 -157
- package/dist/chunk-qy1es4jj.js +0 -95
- package/dist/chunk-qz2x630m.js +0 -49145
- package/dist/chunk-tw48evtr.js +0 -40
- package/dist/chunk-w0gfctyc.js +0 -117
- package/dist/chunk-y0fhjxef.js +0 -276
- package/dist/chunk-y275vgmw.js +0 -654
- package/dist/chunk-zq7pmdas.js +0 -1003
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
notifyPermissionModeChanged,
|
|
4
4
|
notifySessionMetadataChanged
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-8vkv63c5.js";
|
|
6
6
|
import {
|
|
7
7
|
applyConfigEnvironmentVariables,
|
|
8
8
|
init_managedEnv
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ggq2y3tn.js";
|
|
10
10
|
import {
|
|
11
11
|
clearApiKeyHelperCache,
|
|
12
|
-
clearAwsCredentialsCache,
|
|
13
|
-
clearGcpCredentialsCache,
|
|
14
12
|
getGlobalConfig,
|
|
15
13
|
init_PermissionMode,
|
|
16
14
|
init_auth,
|
|
@@ -20,15 +18,15 @@ import {
|
|
|
20
18
|
saveGlobalConfig,
|
|
21
19
|
toExternalPermissionMode,
|
|
22
20
|
updateSettingsForSource
|
|
23
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-rm9gb396.js";
|
|
24
22
|
import {
|
|
25
23
|
init_log,
|
|
26
24
|
logError
|
|
27
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5cxjxxx8.js";
|
|
28
26
|
import {
|
|
29
27
|
init_errors,
|
|
30
28
|
toError
|
|
31
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-pd2vy8hx.js";
|
|
32
30
|
import {
|
|
33
31
|
init_state,
|
|
34
32
|
setMainLoopModelOverride
|
|
@@ -108,8 +106,6 @@ function onChangeAppState({
|
|
|
108
106
|
if (newState.settings !== oldState.settings) {
|
|
109
107
|
try {
|
|
110
108
|
clearApiKeyHelperCache();
|
|
111
|
-
clearAwsCredentialsCache();
|
|
112
|
-
clearGcpCredentialsCache();
|
|
113
109
|
if (newState.settings.env !== oldState.settings.env) {
|
|
114
110
|
applyConfigEnvironmentVariables();
|
|
115
111
|
}
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
diffWordsWithSpace,
|
|
4
|
+
expectColorDiff,
|
|
5
|
+
init_colorDiff,
|
|
6
|
+
init_fullscreen,
|
|
7
|
+
init_libesm,
|
|
8
|
+
init_sliceAnsi,
|
|
9
|
+
init_useSettings,
|
|
10
|
+
isFullscreenEnvEnabled,
|
|
11
|
+
sliceAnsi,
|
|
12
|
+
useSettings
|
|
13
|
+
} from "./chunk-ggq2y3tn.js";
|
|
14
|
+
import {
|
|
15
|
+
NoSelect,
|
|
16
|
+
RawAnsi,
|
|
17
|
+
ThemedBox_default,
|
|
18
|
+
ThemedText,
|
|
19
|
+
init_src,
|
|
20
|
+
stringWidth,
|
|
21
|
+
useTheme,
|
|
22
|
+
wrapText
|
|
23
|
+
} from "./chunk-c7jwbe76.js";
|
|
24
|
+
import {
|
|
25
|
+
require_jsx_dev_runtime,
|
|
26
|
+
require_react
|
|
27
|
+
} from "./chunk-7sgtxrsc.js";
|
|
28
|
+
import {
|
|
29
|
+
__esm,
|
|
30
|
+
__toESM
|
|
31
|
+
} from "./chunk-qp2qdcda.js";
|
|
32
|
+
|
|
33
|
+
// src/components/StructuredDiff/Fallback.tsx
|
|
34
|
+
function StructuredDiffFallback({
|
|
35
|
+
patch,
|
|
36
|
+
dim,
|
|
37
|
+
width
|
|
38
|
+
}) {
|
|
39
|
+
const [theme] = useTheme();
|
|
40
|
+
const diff = import_react.useMemo(() => formatDiff(patch.lines, patch.oldStart, width, dim, theme), [patch.lines, patch.oldStart, width, dim, theme]);
|
|
41
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
42
|
+
flexDirection: "column",
|
|
43
|
+
flexGrow: 1,
|
|
44
|
+
children: diff.map((node, i) => /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
45
|
+
children: node
|
|
46
|
+
}, i, false, undefined, this))
|
|
47
|
+
}, undefined, false, undefined, this);
|
|
48
|
+
}
|
|
49
|
+
function transformLinesToObjects(lines) {
|
|
50
|
+
return lines.map((code) => {
|
|
51
|
+
if (code.startsWith("+")) {
|
|
52
|
+
return {
|
|
53
|
+
code: code.slice(1),
|
|
54
|
+
i: 0,
|
|
55
|
+
type: "add",
|
|
56
|
+
originalCode: code.slice(1)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
if (code.startsWith("-")) {
|
|
60
|
+
return {
|
|
61
|
+
code: code.slice(1),
|
|
62
|
+
i: 0,
|
|
63
|
+
type: "remove",
|
|
64
|
+
originalCode: code.slice(1)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
code: code.slice(1),
|
|
69
|
+
i: 0,
|
|
70
|
+
type: "nochange",
|
|
71
|
+
originalCode: code.slice(1)
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function processAdjacentLines(lineObjects) {
|
|
76
|
+
const processedLines = [];
|
|
77
|
+
let i = 0;
|
|
78
|
+
while (i < lineObjects.length) {
|
|
79
|
+
const current = lineObjects[i];
|
|
80
|
+
if (!current) {
|
|
81
|
+
i++;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (current.type === "remove") {
|
|
85
|
+
const removeLines = [current];
|
|
86
|
+
let j = i + 1;
|
|
87
|
+
while (j < lineObjects.length && lineObjects[j]?.type === "remove") {
|
|
88
|
+
const line = lineObjects[j];
|
|
89
|
+
if (line) {
|
|
90
|
+
removeLines.push(line);
|
|
91
|
+
}
|
|
92
|
+
j++;
|
|
93
|
+
}
|
|
94
|
+
const addLines = [];
|
|
95
|
+
while (j < lineObjects.length && lineObjects[j]?.type === "add") {
|
|
96
|
+
const line = lineObjects[j];
|
|
97
|
+
if (line) {
|
|
98
|
+
addLines.push(line);
|
|
99
|
+
}
|
|
100
|
+
j++;
|
|
101
|
+
}
|
|
102
|
+
if (removeLines.length > 0 && addLines.length > 0) {
|
|
103
|
+
const pairCount = Math.min(removeLines.length, addLines.length);
|
|
104
|
+
for (let k = 0;k < pairCount; k++) {
|
|
105
|
+
const removeLine = removeLines[k];
|
|
106
|
+
const addLine = addLines[k];
|
|
107
|
+
if (removeLine && addLine) {
|
|
108
|
+
removeLine.wordDiff = true;
|
|
109
|
+
addLine.wordDiff = true;
|
|
110
|
+
removeLine.matchedLine = addLine;
|
|
111
|
+
addLine.matchedLine = removeLine;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
processedLines.push(...removeLines.filter(Boolean));
|
|
115
|
+
processedLines.push(...addLines.filter(Boolean));
|
|
116
|
+
i = j;
|
|
117
|
+
} else {
|
|
118
|
+
processedLines.push(current);
|
|
119
|
+
i++;
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
processedLines.push(current);
|
|
123
|
+
i++;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return processedLines;
|
|
127
|
+
}
|
|
128
|
+
function calculateWordDiffs(oldText, newText) {
|
|
129
|
+
const result = diffWordsWithSpace(oldText, newText, { ignoreCase: false });
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
function generateWordDiffElements(item, width, maxWidth, dim, overrideTheme) {
|
|
133
|
+
const { type, i, wordDiff, matchedLine, originalCode } = item;
|
|
134
|
+
if (!wordDiff || !matchedLine) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
const removedLineText = type === "remove" ? originalCode : matchedLine.originalCode;
|
|
138
|
+
const addedLineText = type === "remove" ? matchedLine.originalCode : originalCode;
|
|
139
|
+
const wordDiffs = calculateWordDiffs(removedLineText, addedLineText);
|
|
140
|
+
const totalLength = removedLineText.length + addedLineText.length;
|
|
141
|
+
const changedLength = wordDiffs.filter((part) => part.added || part.removed).reduce((sum, part) => sum + part.value.length, 0);
|
|
142
|
+
const changeRatio = changedLength / totalLength;
|
|
143
|
+
if (changeRatio > CHANGE_THRESHOLD || dim) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
const diffPrefix = type === "add" ? "+" : "-";
|
|
147
|
+
const diffPrefixWidth = diffPrefix.length;
|
|
148
|
+
const availableContentWidth = Math.max(1, width - maxWidth - 1 - diffPrefixWidth);
|
|
149
|
+
const wrappedLines = [];
|
|
150
|
+
let currentLine = [];
|
|
151
|
+
let currentLineWidth = 0;
|
|
152
|
+
wordDiffs.forEach((part, partIndex) => {
|
|
153
|
+
let shouldShow = false;
|
|
154
|
+
let partBgColor;
|
|
155
|
+
if (type === "add") {
|
|
156
|
+
if (part.added) {
|
|
157
|
+
shouldShow = true;
|
|
158
|
+
partBgColor = "diffAddedWord";
|
|
159
|
+
} else if (!part.removed) {
|
|
160
|
+
shouldShow = true;
|
|
161
|
+
}
|
|
162
|
+
} else if (type === "remove") {
|
|
163
|
+
if (part.removed) {
|
|
164
|
+
shouldShow = true;
|
|
165
|
+
partBgColor = "diffRemovedWord";
|
|
166
|
+
} else if (!part.added) {
|
|
167
|
+
shouldShow = true;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (!shouldShow)
|
|
171
|
+
return;
|
|
172
|
+
const partWrapped = wrapText(part.value, availableContentWidth, "wrap");
|
|
173
|
+
const partLines = partWrapped.split(`
|
|
174
|
+
`);
|
|
175
|
+
partLines.forEach((partLine, lineIdx) => {
|
|
176
|
+
if (!partLine)
|
|
177
|
+
return;
|
|
178
|
+
if (lineIdx > 0 || currentLineWidth + stringWidth(partLine) > availableContentWidth) {
|
|
179
|
+
if (currentLine.length > 0) {
|
|
180
|
+
wrappedLines.push({
|
|
181
|
+
content: [...currentLine],
|
|
182
|
+
contentWidth: currentLineWidth
|
|
183
|
+
});
|
|
184
|
+
currentLine = [];
|
|
185
|
+
currentLineWidth = 0;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
currentLine.push(/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
189
|
+
backgroundColor: partBgColor,
|
|
190
|
+
children: partLine
|
|
191
|
+
}, `part-${partIndex}-${lineIdx}`, false, undefined, this));
|
|
192
|
+
currentLineWidth += stringWidth(partLine);
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
if (currentLine.length > 0) {
|
|
196
|
+
wrappedLines.push({ content: currentLine, contentWidth: currentLineWidth });
|
|
197
|
+
}
|
|
198
|
+
return wrappedLines.map(({ content, contentWidth }, lineIndex) => {
|
|
199
|
+
const key = `${type}-${i}-${lineIndex}`;
|
|
200
|
+
const lineBgColor = type === "add" ? dim ? "diffAddedDimmed" : "diffAdded" : dim ? "diffRemovedDimmed" : "diffRemoved";
|
|
201
|
+
const lineNum = lineIndex === 0 ? i : undefined;
|
|
202
|
+
const lineNumStr = (lineNum !== undefined ? lineNum.toString().padStart(maxWidth) : " ".repeat(maxWidth)) + " ";
|
|
203
|
+
const usedWidth = lineNumStr.length + diffPrefixWidth + contentWidth;
|
|
204
|
+
const padding = Math.max(0, width - usedWidth);
|
|
205
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
206
|
+
flexDirection: "row",
|
|
207
|
+
children: [
|
|
208
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(NoSelect, {
|
|
209
|
+
fromLeftEdge: true,
|
|
210
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
211
|
+
color: overrideTheme ? "text" : undefined,
|
|
212
|
+
backgroundColor: lineBgColor,
|
|
213
|
+
dimColor: dim,
|
|
214
|
+
children: [
|
|
215
|
+
lineNumStr,
|
|
216
|
+
diffPrefix
|
|
217
|
+
]
|
|
218
|
+
}, undefined, true, undefined, this)
|
|
219
|
+
}, undefined, false, undefined, this),
|
|
220
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
221
|
+
color: overrideTheme ? "text" : undefined,
|
|
222
|
+
backgroundColor: lineBgColor,
|
|
223
|
+
dimColor: dim,
|
|
224
|
+
children: [
|
|
225
|
+
content,
|
|
226
|
+
" ".repeat(padding)
|
|
227
|
+
]
|
|
228
|
+
}, undefined, true, undefined, this)
|
|
229
|
+
]
|
|
230
|
+
}, key, true, undefined, this);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function formatDiff(lines, startingLineNumber, width, dim, overrideTheme) {
|
|
234
|
+
const safeWidth = Math.max(1, Math.floor(width));
|
|
235
|
+
const lineObjects = transformLinesToObjects(lines);
|
|
236
|
+
const processedLines = processAdjacentLines(lineObjects);
|
|
237
|
+
const ls = numberDiffLines(processedLines, startingLineNumber);
|
|
238
|
+
const maxLineNumber = Math.max(...ls.map(({ i }) => i), 0);
|
|
239
|
+
const maxWidth = Math.max(maxLineNumber.toString().length + 1, 0);
|
|
240
|
+
return ls.flatMap((item) => {
|
|
241
|
+
const { type, code, i, wordDiff, matchedLine } = item;
|
|
242
|
+
if (wordDiff && matchedLine) {
|
|
243
|
+
const wordDiffElements = generateWordDiffElements(item, safeWidth, maxWidth, dim, overrideTheme);
|
|
244
|
+
if (wordDiffElements !== null) {
|
|
245
|
+
return wordDiffElements;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
const diffPrefixWidth = 2;
|
|
249
|
+
const availableContentWidth = Math.max(1, safeWidth - maxWidth - 1 - diffPrefixWidth);
|
|
250
|
+
const wrappedText = wrapText(code, availableContentWidth, "wrap");
|
|
251
|
+
const wrappedLines = wrappedText.split(`
|
|
252
|
+
`);
|
|
253
|
+
return wrappedLines.map((line, lineIndex) => {
|
|
254
|
+
const key = `${type}-${i}-${lineIndex}`;
|
|
255
|
+
const lineNum = lineIndex === 0 ? i : undefined;
|
|
256
|
+
const lineNumStr = (lineNum !== undefined ? lineNum.toString().padStart(maxWidth) : " ".repeat(maxWidth)) + " ";
|
|
257
|
+
const sigil = type === "add" ? "+" : type === "remove" ? "-" : " ";
|
|
258
|
+
const contentWidth = lineNumStr.length + 1 + stringWidth(line);
|
|
259
|
+
const padding = Math.max(0, safeWidth - contentWidth);
|
|
260
|
+
const bgColor = type === "add" ? dim ? "diffAddedDimmed" : "diffAdded" : type === "remove" ? dim ? "diffRemovedDimmed" : "diffRemoved" : undefined;
|
|
261
|
+
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
262
|
+
flexDirection: "row",
|
|
263
|
+
children: [
|
|
264
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(NoSelect, {
|
|
265
|
+
fromLeftEdge: true,
|
|
266
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
267
|
+
color: overrideTheme ? "text" : undefined,
|
|
268
|
+
backgroundColor: bgColor,
|
|
269
|
+
dimColor: dim || type === "nochange",
|
|
270
|
+
children: [
|
|
271
|
+
lineNumStr,
|
|
272
|
+
sigil
|
|
273
|
+
]
|
|
274
|
+
}, undefined, true, undefined, this)
|
|
275
|
+
}, undefined, false, undefined, this),
|
|
276
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
277
|
+
color: overrideTheme ? "text" : undefined,
|
|
278
|
+
backgroundColor: bgColor,
|
|
279
|
+
dimColor: dim,
|
|
280
|
+
children: [
|
|
281
|
+
line,
|
|
282
|
+
" ".repeat(padding)
|
|
283
|
+
]
|
|
284
|
+
}, undefined, true, undefined, this)
|
|
285
|
+
]
|
|
286
|
+
}, key, true, undefined, this);
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function numberDiffLines(diff, startLine) {
|
|
291
|
+
let i = startLine;
|
|
292
|
+
const result = [];
|
|
293
|
+
const queue = [...diff];
|
|
294
|
+
while (queue.length > 0) {
|
|
295
|
+
const current = queue.shift();
|
|
296
|
+
const { code, type, originalCode, wordDiff, matchedLine } = current;
|
|
297
|
+
const line = {
|
|
298
|
+
code,
|
|
299
|
+
type,
|
|
300
|
+
i,
|
|
301
|
+
originalCode,
|
|
302
|
+
wordDiff,
|
|
303
|
+
matchedLine
|
|
304
|
+
};
|
|
305
|
+
switch (type) {
|
|
306
|
+
case "nochange":
|
|
307
|
+
i++;
|
|
308
|
+
result.push(line);
|
|
309
|
+
break;
|
|
310
|
+
case "add":
|
|
311
|
+
i++;
|
|
312
|
+
result.push(line);
|
|
313
|
+
break;
|
|
314
|
+
case "remove": {
|
|
315
|
+
result.push(line);
|
|
316
|
+
let numRemoved = 0;
|
|
317
|
+
while (queue[0]?.type === "remove") {
|
|
318
|
+
i++;
|
|
319
|
+
const current2 = queue.shift();
|
|
320
|
+
const { code: code2, type: type2, originalCode: originalCode2, wordDiff: wordDiff2, matchedLine: matchedLine2 } = current2;
|
|
321
|
+
const line2 = {
|
|
322
|
+
code: code2,
|
|
323
|
+
type: type2,
|
|
324
|
+
i,
|
|
325
|
+
originalCode: originalCode2,
|
|
326
|
+
wordDiff: wordDiff2,
|
|
327
|
+
matchedLine: matchedLine2
|
|
328
|
+
};
|
|
329
|
+
result.push(line2);
|
|
330
|
+
numRemoved++;
|
|
331
|
+
}
|
|
332
|
+
i -= numRemoved;
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return result;
|
|
338
|
+
}
|
|
339
|
+
var import_react, jsx_dev_runtime, CHANGE_THRESHOLD = 0.4;
|
|
340
|
+
var init_Fallback = __esm(() => {
|
|
341
|
+
init_libesm();
|
|
342
|
+
init_src();
|
|
343
|
+
import_react = __toESM(require_react(), 1);
|
|
344
|
+
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
// src/components/StructuredDiff.tsx
|
|
348
|
+
function computeGutterWidth(patch) {
|
|
349
|
+
const maxLineNumber = Math.max(patch.oldStart + patch.oldLines - 1, patch.newStart + patch.newLines - 1, 1);
|
|
350
|
+
return maxLineNumber.toString().length + 3;
|
|
351
|
+
}
|
|
352
|
+
function renderColorDiff(patch, firstLine, filePath, fileContent, theme, width, dim, splitGutter) {
|
|
353
|
+
const ColorDiff = expectColorDiff();
|
|
354
|
+
if (!ColorDiff)
|
|
355
|
+
return null;
|
|
356
|
+
const rawGutterWidth = splitGutter ? computeGutterWidth(patch) : 0;
|
|
357
|
+
const gutterWidth = rawGutterWidth > 0 && rawGutterWidth < width ? rawGutterWidth : 0;
|
|
358
|
+
const key = `${theme}|${width}|${dim ? 1 : 0}|${gutterWidth}|${firstLine ?? ""}|${filePath}`;
|
|
359
|
+
let perHunk = RENDER_CACHE.get(patch);
|
|
360
|
+
const hit = perHunk?.get(key);
|
|
361
|
+
if (hit)
|
|
362
|
+
return hit;
|
|
363
|
+
const lines = new ColorDiff(patch, firstLine, filePath, fileContent).render(theme, width, dim);
|
|
364
|
+
if (lines === null)
|
|
365
|
+
return null;
|
|
366
|
+
let gutters = null;
|
|
367
|
+
let contents = null;
|
|
368
|
+
if (gutterWidth > 0) {
|
|
369
|
+
gutters = lines.map((l) => sliceAnsi(l, 0, gutterWidth));
|
|
370
|
+
contents = lines.map((l) => sliceAnsi(l, gutterWidth));
|
|
371
|
+
}
|
|
372
|
+
const entry = { lines, gutterWidth, gutters, contents };
|
|
373
|
+
if (!perHunk) {
|
|
374
|
+
perHunk = new Map;
|
|
375
|
+
RENDER_CACHE.set(patch, perHunk);
|
|
376
|
+
}
|
|
377
|
+
if (perHunk.size >= 4)
|
|
378
|
+
perHunk.clear();
|
|
379
|
+
perHunk.set(key, entry);
|
|
380
|
+
return entry;
|
|
381
|
+
}
|
|
382
|
+
var import_react2, jsx_dev_runtime2, RENDER_CACHE, StructuredDiff;
|
|
383
|
+
var init_StructuredDiff = __esm(() => {
|
|
384
|
+
init_useSettings();
|
|
385
|
+
init_src();
|
|
386
|
+
init_fullscreen();
|
|
387
|
+
init_sliceAnsi();
|
|
388
|
+
init_colorDiff();
|
|
389
|
+
init_Fallback();
|
|
390
|
+
import_react2 = __toESM(require_react(), 1);
|
|
391
|
+
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
392
|
+
RENDER_CACHE = new WeakMap;
|
|
393
|
+
StructuredDiff = import_react2.memo(function StructuredDiff2({
|
|
394
|
+
patch,
|
|
395
|
+
dim,
|
|
396
|
+
filePath,
|
|
397
|
+
firstLine,
|
|
398
|
+
fileContent,
|
|
399
|
+
width,
|
|
400
|
+
skipHighlighting = false
|
|
401
|
+
}) {
|
|
402
|
+
const [theme] = useTheme();
|
|
403
|
+
const settings = useSettings();
|
|
404
|
+
const syntaxHighlightingDisabled = settings.syntaxHighlightingDisabled ?? false;
|
|
405
|
+
const safeWidth = Math.max(1, Math.floor(width));
|
|
406
|
+
const splitGutter = isFullscreenEnvEnabled();
|
|
407
|
+
const cached = skipHighlighting || syntaxHighlightingDisabled ? null : renderColorDiff(patch, firstLine, filePath, fileContent ?? null, theme, safeWidth, dim, splitGutter);
|
|
408
|
+
if (!cached) {
|
|
409
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
410
|
+
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(StructuredDiffFallback, {
|
|
411
|
+
patch,
|
|
412
|
+
dim,
|
|
413
|
+
width
|
|
414
|
+
}, undefined, false, undefined, this)
|
|
415
|
+
}, undefined, false, undefined, this);
|
|
416
|
+
}
|
|
417
|
+
const { lines, gutterWidth, gutters, contents } = cached;
|
|
418
|
+
if (gutterWidth > 0 && gutters && contents) {
|
|
419
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
420
|
+
flexDirection: "row",
|
|
421
|
+
children: [
|
|
422
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(NoSelect, {
|
|
423
|
+
fromLeftEdge: true,
|
|
424
|
+
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(RawAnsi, {
|
|
425
|
+
lines: gutters,
|
|
426
|
+
width: gutterWidth
|
|
427
|
+
}, undefined, false, undefined, this)
|
|
428
|
+
}, undefined, false, undefined, this),
|
|
429
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(RawAnsi, {
|
|
430
|
+
lines: contents,
|
|
431
|
+
width: safeWidth - gutterWidth
|
|
432
|
+
}, undefined, false, undefined, this)
|
|
433
|
+
]
|
|
434
|
+
}, undefined, true, undefined, this);
|
|
435
|
+
}
|
|
436
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
437
|
+
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(RawAnsi, {
|
|
438
|
+
lines,
|
|
439
|
+
width: safeWidth
|
|
440
|
+
}, undefined, false, undefined, this)
|
|
441
|
+
}, undefined, false, undefined, this);
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
export { StructuredDiff, init_StructuredDiff };
|