@qitqode/qitqode-android-arm64 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-37n34pzd.js → chunk-01my2y0c.js} +1 -1
- package/bundle/{chunk-ejjea8hh.js → chunk-02jtpxe0.js} +1 -1
- package/bundle/{chunk-6qy1ghrx.js → chunk-05mce0j3.js} +1 -1
- package/bundle/chunk-096pd6c4.js +2 -0
- package/bundle/{chunk-g1dwbvkg.js → chunk-0bbs01f0.js} +1 -1
- package/bundle/chunk-0c2p3a6v.js +2 -0
- package/bundle/chunk-0c5rxty9.js +2 -0
- package/bundle/{chunk-j6emx6jn.js → chunk-0dt0bxz6.js} +2 -2
- package/bundle/chunk-0e86gt9r.js +2 -0
- package/bundle/{chunk-mskwkcgj.js → chunk-0mx2psfc.js} +1 -1
- package/bundle/chunk-0p27fvfr.js +2 -0
- package/bundle/chunk-0qs1vx97.js +2 -0
- package/bundle/{chunk-f45tp3e3.js → chunk-0v0vqbn5.js} +1 -1
- package/bundle/{chunk-be216spx.js → chunk-10bjs581.js} +2 -2
- package/bundle/{chunk-bss414qz.js → chunk-12vef2pr.js} +1 -1
- package/bundle/{chunk-jm1ptn8n.js → chunk-15hw2z9t.js} +1 -1
- package/bundle/chunk-15j5cn4t.js +2 -0
- package/bundle/{chunk-srh4xvsj.js → chunk-1gx18dm5.js} +1 -1
- package/bundle/chunk-1r95p0tp.js +2 -0
- package/bundle/chunk-1rhhhm88.js +2 -0
- package/bundle/{chunk-b0syck9r.js → chunk-1sgahe1s.js} +1 -1
- package/bundle/{chunk-26nfphsg.js → chunk-1vb79bw1.js} +1 -1
- package/bundle/chunk-1wbjh23g.js +2 -0
- package/bundle/chunk-20702epe.js +2 -0
- package/bundle/{chunk-371r2111.js → chunk-24jg9d61.js} +1 -1
- package/bundle/chunk-257me4z3.js +800 -0
- package/bundle/{chunk-1sgby720.js → chunk-2hc5z7b5.js} +1 -1
- package/bundle/{chunk-yq3m8190.js → chunk-2maqde7w.js} +2 -2
- package/bundle/{chunk-mrw279k3.js → chunk-2phz0bn9.js} +1 -1
- package/bundle/{chunk-b8tw709r.js → chunk-2vn41ecx.js} +1 -1
- package/bundle/chunk-2wajs9xv.js +2 -0
- package/bundle/{chunk-w87a3mzm.js → chunk-2zq4k837.js} +1 -1
- package/bundle/{chunk-1bhvt33f.js → chunk-31qrzrwy.js} +1 -1
- package/bundle/{chunk-d5bxan80.js → chunk-326p5b10.js} +2 -2
- package/bundle/{chunk-0df4kede.js → chunk-33e9y2aw.js} +1 -1
- package/bundle/{chunk-zcm2jdr5.js → chunk-35xk4g91.js} +1 -1
- package/bundle/{chunk-5fz8tph5.js → chunk-3632wgg1.js} +1 -1
- package/bundle/{chunk-1ngtxja9.js → chunk-3bxg5bta.js} +1 -1
- package/bundle/{chunk-mgk9sh16.js → chunk-3c6p8tm3.js} +1 -1
- package/bundle/{chunk-fqw4y7x0.js → chunk-3nx7112w.js} +2 -2
- package/bundle/{chunk-n26yf3he.js → chunk-3wetyrjs.js} +1 -1
- package/bundle/{chunk-2jmxt3fb.js → chunk-40efytmk.js} +1 -1
- package/bundle/chunk-42p59wm4.js +2 -0
- package/bundle/chunk-4512pvca.js +2 -0
- package/bundle/chunk-456bmaww.js +2 -0
- package/bundle/{chunk-c5e6sk9c.js → chunk-48ge2ryx.js} +1 -1
- package/bundle/chunk-48pajrnt.js +2 -0
- package/bundle/{chunk-12bssxd4.js → chunk-4cnwn1rh.js} +2 -2
- package/bundle/chunk-4fy9c54h.js +2 -0
- package/bundle/{chunk-4tbwha3m.js → chunk-4jtxtkj7.js} +2 -2
- package/bundle/chunk-4sc82a27.js +2 -0
- package/bundle/chunk-52bam8g7.js +2 -0
- package/bundle/{chunk-6fp8a9ek.js → chunk-53bqcctj.js} +1 -1
- package/bundle/{chunk-hwbyqezq.js → chunk-56z7x7h4.js} +2 -2
- package/bundle/chunk-59y8q9m5.js +2 -0
- package/bundle/chunk-59yqvk48.js +3 -0
- package/bundle/{chunk-a1pw9r6f.js → chunk-5hw6xa49.js} +2 -2
- package/bundle/{chunk-8qkhddq3.js → chunk-5jx0yadh.js} +2 -2
- package/bundle/chunk-5pb551dx.js +2 -0
- package/bundle/{chunk-qrey2gwb.js → chunk-5q4harvc.js} +2 -2
- package/bundle/chunk-5tray1fw.js +3 -0
- package/bundle/{chunk-my6sz5d6.js → chunk-60v5jvgt.js} +1 -1
- package/bundle/chunk-634pnryq.js +2 -0
- package/bundle/chunk-64ezpbwt.js +2 -0
- package/bundle/{chunk-5fgx6fa4.js → chunk-69nzndk7.js} +1 -1
- package/bundle/{chunk-k8ss3135.js → chunk-6aqyhfag.js} +218 -218
- package/bundle/{chunk-chmrvbbj.js → chunk-6d5rrre9.js} +1 -1
- package/bundle/{chunk-g3dhsmbt.js → chunk-6hpgb8h4.js} +3 -3
- package/bundle/{chunk-drs1gv2b.js → chunk-6kp07m7p.js} +1 -1
- package/bundle/{chunk-wy46mbwt.js → chunk-6phh70sp.js} +1 -1
- package/bundle/{chunk-v2zp22r3.js → chunk-70ck4v3t.js} +1 -1
- package/bundle/{chunk-2tnarng3.js → chunk-71sjjjr8.js} +1 -1
- package/bundle/{chunk-ds69qc8b.js → chunk-71xz70r9.js} +1 -1
- package/bundle/{chunk-2dzk5txw.js → chunk-73e409hd.js} +1 -1
- package/bundle/chunk-764fksh3.js +2 -0
- package/bundle/{chunk-g7rjtehn.js → chunk-78ymd20x.js} +1 -1
- package/bundle/{chunk-szr0f7k2.js → chunk-7avcnwv8.js} +1 -1
- package/bundle/{chunk-z8v2tsz2.js → chunk-7hm0c2yg.js} +1 -1
- package/bundle/chunk-7mke41x0.js +2 -0
- package/bundle/chunk-7ry9cvby.js +2 -0
- package/bundle/chunk-7tr9ejyk.js +7 -0
- package/bundle/chunk-7wczs9mx.js +2 -0
- package/bundle/{chunk-aztre27e.js → chunk-7xm75w1e.js} +1 -1
- package/bundle/{chunk-s3yna2wm.js → chunk-7z5jh4ra.js} +1 -1
- package/bundle/chunk-7z777y9k.js +2 -0
- package/bundle/{chunk-vj62pc0h.js → chunk-81qwdg5s.js} +1 -1
- package/bundle/chunk-85wcc1tp.js +3 -0
- package/bundle/chunk-89w3yhf8.js +2 -0
- package/bundle/chunk-8dwq41q1.js +28 -0
- package/bundle/{chunk-6hv59ere.js → chunk-8hytwgwf.js} +1 -1
- package/bundle/{chunk-wz0zcddf.js → chunk-8n20thvd.js} +2 -2
- package/bundle/{chunk-s07j8hfy.js → chunk-8qswepp2.js} +1 -1
- package/bundle/{chunk-bpbptx89.js → chunk-8r6ht39z.js} +1 -1
- package/bundle/chunk-8v96pmqn.js +2 -0
- package/bundle/chunk-8y2scz6z.js +2 -0
- package/bundle/chunk-8zx7vnx6.js +2 -0
- package/bundle/{chunk-qhc90p4a.js → chunk-93p131d5.js} +1 -1
- package/bundle/chunk-94a76f8w.js +2 -0
- package/bundle/{chunk-ppfjf7qx.js → chunk-9emq67vc.js} +1 -1
- package/bundle/{chunk-bvkq0a5q.js → chunk-9f1z9xce.js} +1 -1
- package/bundle/{chunk-dcvatax2.js → chunk-9gazyynx.js} +2 -2
- package/bundle/chunk-9ng7jjp7.js +2 -0
- package/bundle/chunk-9tpgnjy8.js +2 -0
- package/bundle/{chunk-mk6cddvd.js → chunk-a1wdeapb.js} +1 -1
- package/bundle/{chunk-qjn86fc0.js → chunk-a7amey9s.js} +1 -1
- package/bundle/chunk-a7ym9f0v.js +2 -0
- package/bundle/chunk-a8f2xvy3.js +2 -0
- package/bundle/chunk-a99cvwta.js +2 -0
- package/bundle/{chunk-42f7p0hq.js → chunk-ad72gb5f.js} +2 -2
- package/bundle/{chunk-89v6dgpp.js → chunk-ag8kz1e7.js} +2 -2
- package/bundle/{chunk-zv6pjtz1.js → chunk-avf8v3hb.js} +1 -1
- package/bundle/chunk-avys5mnz.js +2 -0
- package/bundle/chunk-axvjd10y.js +2 -0
- package/bundle/{chunk-m612agnk.js → chunk-ay8emwym.js} +1 -1
- package/bundle/chunk-b4pphqab.js +2 -0
- package/bundle/chunk-b6087ak4.js +2 -0
- package/bundle/{chunk-msegx0t7.js → chunk-b8gjz6bk.js} +1 -1
- package/bundle/{chunk-gf0pdgjs.js → chunk-bh53dz71.js} +1 -1
- package/bundle/chunk-bn0h9dny.js +10 -0
- package/bundle/chunk-brkqxbjy.js +2 -0
- package/bundle/{chunk-09kba1hg.js → chunk-c11d28qn.js} +2 -2
- package/bundle/chunk-c26qxt5g.js +2 -0
- package/bundle/chunk-c6zscb38.js +2 -0
- package/bundle/{chunk-ddnpx1yx.js → chunk-caj1b9y7.js} +5 -5
- package/bundle/{chunk-pekm54ce.js → chunk-cfgvm15x.js} +1 -1
- package/bundle/{chunk-v4xcysh0.js → chunk-chpr8ekb.js} +1 -1
- package/bundle/chunk-cjww2jmv.js +3 -0
- package/bundle/{chunk-m67tcnk4.js → chunk-ck2gfaba.js} +1 -1
- package/bundle/{chunk-9j1qqdr2.js → chunk-cphrgyp6.js} +1 -1
- package/bundle/{chunk-eb9mytjq.js → chunk-ctaze2hn.js} +1 -1
- package/bundle/{chunk-5qam3c8r.js → chunk-cxnfy6qk.js} +1 -1
- package/bundle/{chunk-cafzcmrg.js → chunk-d07p6fpk.js} +2 -2
- package/bundle/chunk-d0damw6y.js +2 -0
- package/bundle/{chunk-b8bytvka.js → chunk-d3ermm6d.js} +2 -2
- package/bundle/{chunk-4qqkqrn9.js → chunk-d6ry9418.js} +2 -2
- package/bundle/{chunk-sn4nez18.js → chunk-d9hbhkbq.js} +2 -2
- package/bundle/{chunk-ztc3gm8y.js → chunk-dactgryw.js} +1 -1
- package/bundle/chunk-dafmkrhn.js +2 -0
- package/bundle/{chunk-dfnv7vkn.js → chunk-db405hjg.js} +1 -1
- package/bundle/chunk-dgprdym0.js +2 -0
- package/bundle/{chunk-7yrhe3xq.js → chunk-dnwefyhv.js} +1 -1
- package/bundle/chunk-dryzt12j.js +2 -0
- package/bundle/chunk-dsamees2.js +2 -0
- package/bundle/{chunk-xpc2zgj7.js → chunk-dxpj0cxh.js} +2 -2
- package/bundle/{chunk-yjtdgcq5.js → chunk-dynv30gm.js} +1 -1
- package/bundle/chunk-dyqpxx3b.js +2 -0
- package/bundle/{chunk-2rs39vj2.js → chunk-e01wnqvc.js} +1 -1
- package/bundle/{chunk-2vepzgek.js → chunk-e10py6yr.js} +1 -1
- package/bundle/chunk-e5mv5wnt.js +2 -0
- package/bundle/{chunk-qv2s39dv.js → chunk-e7ny0b3x.js} +1 -1
- package/bundle/{chunk-n8h6x2en.js → chunk-ejrhvy38.js} +1 -1
- package/bundle/{chunk-dq9kpj4a.js → chunk-enpzvmtc.js} +1 -1
- package/bundle/chunk-ew9pdrp9.js +3 -0
- package/bundle/{chunk-gj3hzx3d.js → chunk-ezfy0b6q.js} +2 -2
- package/bundle/{chunk-2km50rd3.js → chunk-fgg9txzb.js} +1 -1
- package/bundle/{chunk-b9za12y1.js → chunk-fn9h4ync.js} +1 -1
- package/bundle/{chunk-ngchsw2g.js → chunk-fvzwbjh8.js} +1 -1
- package/bundle/{chunk-nzehfpxp.js → chunk-g10d6x57.js} +1 -1
- package/bundle/{chunk-zyhdxggp.js → chunk-g5rabwre.js} +2 -2
- package/bundle/{chunk-kfsb2stm.js → chunk-g7ccdh7r.js} +1 -1
- package/bundle/{chunk-phxrg7aw.js → chunk-gagtmjmp.js} +2 -2
- package/bundle/{chunk-yp0a8q29.js → chunk-gb00fh4z.js} +3 -3
- package/bundle/{chunk-hw1dmx28.js → chunk-gbpvs0fx.js} +1 -1
- package/bundle/{chunk-j8efst22.js → chunk-gj0wt0cy.js} +1 -1
- package/bundle/{chunk-2q96x1t5.js → chunk-gsar6xda.js} +1 -1
- package/bundle/{chunk-xs3xtz6x.js → chunk-gt31468k.js} +1 -1
- package/bundle/{chunk-ecn8gbtz.js → chunk-gwp17r03.js} +1 -1
- package/bundle/chunk-gwzw92jt.js +2 -0
- package/bundle/chunk-gz8sz7z1.js +9 -0
- package/bundle/{chunk-2bn4b42t.js → chunk-h2afsbm1.js} +1 -1
- package/bundle/{chunk-tj78jsp9.js → chunk-h4j5xzc8.js} +1 -1
- package/bundle/chunk-h6f3kbz2.js +2 -0
- package/bundle/{chunk-b3dqcbsc.js → chunk-hbbsbyyq.js} +1 -1
- package/bundle/{chunk-2gerf08b.js → chunk-hnvn2c25.js} +2 -2
- package/bundle/{chunk-vn7nkrqb.js → chunk-hnzegjgv.js} +1 -1
- package/bundle/chunk-hp7tssgv.js +2 -0
- package/bundle/chunk-ht0hbdmx.js +2 -0
- package/bundle/{chunk-j9pcnkkq.js → chunk-ht5w06x7.js} +2 -2
- package/bundle/{chunk-a1p2f16h.js → chunk-htz93dsd.js} +2 -2
- package/bundle/{chunk-q6ztpfcs.js → chunk-jbx3s7nw.js} +2 -2
- package/bundle/{chunk-hxz2rdjq.js → chunk-jdynx7m6.js} +1 -1
- package/bundle/{chunk-h9pvnp5c.js → chunk-jef04wyf.js} +1 -1
- package/bundle/{chunk-ct48575c.js → chunk-jh0bw59r.js} +1 -1
- package/bundle/{chunk-knpt9n8f.js → chunk-jrqb0jwy.js} +1 -1
- package/bundle/{chunk-1dwcga8g.js → chunk-js1n8tgv.js} +1 -1
- package/bundle/chunk-k1txw65h.js +2 -0
- package/bundle/chunk-k5atbdbm.js +2 -0
- package/bundle/chunk-k75jqg60.js +3 -0
- package/bundle/{chunk-yn6sbycg.js → chunk-k7aenxan.js} +2 -2
- package/bundle/{chunk-1rp1cvmc.js → chunk-kf167jw7.js} +1 -1
- package/bundle/{chunk-wsy0m70r.js → chunk-kfxv5rfg.js} +1 -1
- package/bundle/{chunk-btz9jvec.js → chunk-kj20f048.js} +1 -1
- package/bundle/{chunk-j5kb0y1m.js → chunk-kq6b222y.js} +1 -1
- package/bundle/{chunk-1t9jne14.js → chunk-ktzq4ha1.js} +1 -1
- package/bundle/{chunk-5v4py9p2.js → chunk-m2q317gh.js} +1 -1
- package/bundle/chunk-mahgmbt9.js +2 -0
- package/bundle/{chunk-1qshjfzm.js → chunk-mk1bfzg5.js} +1 -1
- package/bundle/{chunk-2y90ad1v.js → chunk-mqd1jsg2.js} +1 -1
- package/bundle/{chunk-t12xrrfr.js → chunk-mzs2pjyc.js} +2 -2
- package/bundle/{chunk-m02zt1a3.js → chunk-n9xns8by.js} +2 -2
- package/bundle/chunk-ngm6pqyt.js +2 -0
- package/bundle/chunk-ngtavamt.js +2 -0
- package/bundle/chunk-nkhc32s3.js +2 -0
- package/bundle/{chunk-wpajh5s5.js → chunk-nkkch4h7.js} +1 -1
- package/bundle/chunk-npse2xrd.js +2 -0
- package/bundle/{chunk-k7gq9bra.js → chunk-nv3eyyaj.js} +1 -1
- package/bundle/{chunk-ab6cabxh.js → chunk-p18axz0m.js} +1 -1
- package/bundle/{chunk-jje0srjq.js → chunk-p62gb4wj.js} +1 -1
- package/bundle/chunk-p6e4vqy7.js +2 -0
- package/bundle/{chunk-m1h5a4vg.js → chunk-p9qfbr02.js} +1 -1
- package/bundle/{chunk-ggqst87g.js → chunk-pe29yy6s.js} +1 -1
- package/bundle/{chunk-yy526n9c.js → chunk-pje60pj2.js} +1 -1
- package/bundle/{chunk-3n1324bt.js → chunk-pp2eqkse.js} +1 -1
- package/bundle/{chunk-x067eetw.js → chunk-pp6vhqrr.js} +1 -1
- package/bundle/chunk-pqkjhn8h.js +2 -0
- package/bundle/{chunk-ezja6njs.js → chunk-pv67gwce.js} +1 -1
- package/bundle/{chunk-b3rpzkcb.js → chunk-q7vasbxn.js} +1 -1
- package/bundle/chunk-qadw6j20.js +2 -0
- package/bundle/{chunk-89q1y7tc.js → chunk-qc8rsn4v.js} +1 -1
- package/bundle/chunk-qd8w2gkd.js +2 -0
- package/bundle/chunk-qggcszs2.js +2 -0
- package/bundle/{chunk-q1v2pytx.js → chunk-qrsveve6.js} +1 -1
- package/bundle/chunk-r7sqdfad.js +2 -0
- package/bundle/chunk-r8m7rtfc.js +2 -0
- package/bundle/{chunk-7ppd2phw.js → chunk-rbk8seme.js} +1 -1
- package/bundle/chunk-rf12t4n5.js +2 -0
- package/bundle/{chunk-04tw0r4s.js → chunk-rg0mrprz.js} +1 -1
- package/bundle/{chunk-cdhmc0t0.js → chunk-rjd8gbs5.js} +1 -1
- package/bundle/chunk-rkyf0cp8.js +2 -0
- package/bundle/chunk-rpgne7xh.js +2 -0
- package/bundle/chunk-rvgj1vky.js +2 -0
- package/bundle/{chunk-c01z3cvg.js → chunk-rvkrgkeq.js} +1 -1
- package/bundle/chunk-rza530gm.js +5 -0
- package/bundle/{chunk-2ahqhh4z.js → chunk-rzhdkkpz.js} +1 -1
- package/bundle/chunk-s3mnrhbx.js +5 -0
- package/bundle/chunk-s6ktx2sx.js +2 -0
- package/bundle/{chunk-kqn9h2gk.js → chunk-skqbaadf.js} +1 -1
- package/bundle/chunk-ss2jvqrg.js +2 -0
- package/bundle/{chunk-ydp0q1hk.js → chunk-ss2ms1r3.js} +1 -1
- package/bundle/{chunk-1fbeendk.js → chunk-t56r99hp.js} +1 -1
- package/bundle/{chunk-xc5044tm.js → chunk-t8m74g39.js} +1 -1
- package/bundle/{chunk-s6bar2f9.js → chunk-t9mz17gb.js} +2 -2
- package/bundle/{chunk-cvdxgsq1.js → chunk-tq0239xp.js} +1 -1
- package/bundle/{chunk-whxjkz9a.js → chunk-tqj69nh6.js} +2 -2
- package/bundle/{chunk-hj5y7fvk.js → chunk-tt30dybd.js} +1 -1
- package/bundle/{chunk-5a5t01ka.js → chunk-tvdmnee6.js} +1 -1
- package/bundle/chunk-tvwwq4b3.js +2 -0
- package/bundle/{chunk-dhjp0zx2.js → chunk-v1xjc3s8.js} +1 -1
- package/bundle/chunk-v2n26eg4.js +2 -0
- package/bundle/chunk-vcw00k0n.js +3 -0
- package/bundle/{chunk-7jbz3dgt.js → chunk-vhe0tth1.js} +1 -1
- package/bundle/{chunk-yfkvjphe.js → chunk-vvxmwyrw.js} +1 -1
- package/bundle/{chunk-p68rwmhc.js → chunk-vxyy2dp3.js} +2 -2
- package/bundle/{chunk-y2v09y71.js → chunk-vywnd5sf.js} +1 -1
- package/bundle/{chunk-0jgsp4c2.js → chunk-w18xs2h5.js} +1 -1
- package/bundle/{chunk-fjgyrsbw.js → chunk-w7vh8cxt.js} +1 -1
- package/bundle/chunk-w8saweey.js +2 -0
- package/bundle/chunk-we9cv8we.js +8 -0
- package/bundle/chunk-wezarrvy.js +2 -0
- package/bundle/{chunk-d6r4xwtg.js → chunk-wfb608qf.js} +3 -3
- package/bundle/{chunk-3g1yz39h.js → chunk-whe7h2mj.js} +1 -1
- package/bundle/chunk-wmqsdt2c.js +3 -0
- package/bundle/chunk-wqj0xasg.js +2 -0
- package/bundle/chunk-wr42tphe.js +2 -0
- package/bundle/chunk-x24y7qyd.js +2 -0
- package/bundle/{chunk-07g7cybt.js → chunk-x25zkrz7.js} +1 -1
- package/bundle/{chunk-tr8sf0dk.js → chunk-x3y2xzhn.js} +1 -1
- package/bundle/{chunk-27yxgy03.js → chunk-x4sp99g6.js} +1 -1
- package/bundle/{chunk-3nwve06r.js → chunk-x562b0xk.js} +1 -1
- package/bundle/{chunk-61c62e5s.js → chunk-x7k5yeey.js} +1 -1
- package/bundle/{chunk-fkgv2hqd.js → chunk-x9rbv6p6.js} +1 -1
- package/bundle/{chunk-wnqwb6fd.js → chunk-xcmgkc57.js} +1 -1
- package/bundle/chunk-xj765svc.js +3 -0
- package/bundle/{chunk-gm85xefs.js → chunk-xm7wascx.js} +1 -1
- package/bundle/{chunk-whcg14sc.js → chunk-xrs18kzn.js} +1 -1
- package/bundle/{chunk-6nbzdb0r.js → chunk-xthkjax9.js} +1 -1
- package/bundle/{chunk-scnz207s.js → chunk-xvwvd4kq.js} +2 -2
- package/bundle/{chunk-zb0me4kk.js → chunk-xzrb857v.js} +1 -1
- package/bundle/chunk-y2d0w09y.js +2 -0
- package/bundle/{chunk-3nyqh1d6.js → chunk-y3b4k38p.js} +1 -1
- package/bundle/{chunk-svvgv1s0.js → chunk-y6123zvq.js} +1 -1
- package/bundle/chunk-y7sy3w6z.js +2 -0
- package/bundle/{chunk-vg2fmyje.js → chunk-y9q0hb7b.js} +2 -2
- package/bundle/chunk-yb79f79m.js +2 -0
- package/bundle/{chunk-fnbpap62.js → chunk-yek0sk2q.js} +1 -1
- package/bundle/{chunk-wfs4pcwa.js → chunk-ygs5pzk7.js} +4 -4
- package/bundle/{chunk-3bmzjznz.js → chunk-yhbcbjfk.js} +1 -1
- package/bundle/{chunk-sermjas1.js → chunk-yjf3kyej.js} +1 -1
- package/bundle/chunk-yjnyzpmt.js +2 -0
- package/bundle/{chunk-0a0vat1h.js → chunk-yp5bypsp.js} +2 -2
- package/bundle/{chunk-h0rpmne5.js → chunk-yp8wyzzm.js} +1 -1
- package/bundle/chunk-yqbcnsa1.js +2 -0
- package/bundle/{chunk-4xh1qm90.js → chunk-yv0xrnn9.js} +1 -1
- package/bundle/chunk-z3mra3nm.js +2 -0
- package/bundle/chunk-za7mwbye.js +2 -0
- package/bundle/chunk-zaks8cae.js +11 -0
- package/bundle/{chunk-0fmbz83g.js → chunk-zcsgqk9f.js} +1 -1
- package/bundle/chunk-zqqx96jx.js +3 -0
- package/bundle/{chunk-snm5q21k.js → chunk-zs8kqdsf.js} +2 -2
- package/bundle/{chunk-y062spw2.js → chunk-zscer8rc.js} +1 -1
- package/bundle/{chunk-qjjch1zt.js → chunk-zw815d68.js} +2 -2
- package/bundle/chunk-zy9w1vkc.js +2 -0
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-07ws99b1.js +0 -2
- package/bundle/chunk-09c4ngag.js +0 -2
- package/bundle/chunk-0ch32p4c.js +0 -3
- package/bundle/chunk-0jgst767.js +0 -2
- package/bundle/chunk-0psrr9vp.js +0 -2
- package/bundle/chunk-1j73cnvz.js +0 -2
- package/bundle/chunk-1yddn03z.js +0 -2
- package/bundle/chunk-27dgtm8r.js +0 -2
- package/bundle/chunk-2ec6ps8r.js +0 -5
- package/bundle/chunk-38g8yzw0.js +0 -2
- package/bundle/chunk-3bkd0ar3.js +0 -2
- package/bundle/chunk-3f4zht9e.js +0 -2
- package/bundle/chunk-3pxnp6jb.js +0 -2
- package/bundle/chunk-3szwfy7w.js +0 -3
- package/bundle/chunk-426dt7be.js +0 -2
- package/bundle/chunk-4amgp4yd.js +0 -3
- package/bundle/chunk-4p5e5tsz.js +0 -28
- package/bundle/chunk-4pjm21a5.js +0 -2
- package/bundle/chunk-4sz3jbc5.js +0 -2
- package/bundle/chunk-58x5seqn.js +0 -2
- package/bundle/chunk-5xe6x2rt.js +0 -2
- package/bundle/chunk-618tmyx9.js +0 -2
- package/bundle/chunk-6d9wsjxm.js +0 -2
- package/bundle/chunk-730a2d1k.js +0 -2
- package/bundle/chunk-76wrw0cs.js +0 -2
- package/bundle/chunk-7bd0x9vf.js +0 -2
- package/bundle/chunk-7czkntef.js +0 -2
- package/bundle/chunk-7ex57nyh.js +0 -2
- package/bundle/chunk-7gpczxbh.js +0 -2
- package/bundle/chunk-7j0bgeh2.js +0 -2
- package/bundle/chunk-7py443fe.js +0 -2
- package/bundle/chunk-90q5sae0.js +0 -2
- package/bundle/chunk-9amwe0ed.js +0 -2
- package/bundle/chunk-9grvepmd.js +0 -2
- package/bundle/chunk-9hrh15p2.js +0 -2
- package/bundle/chunk-a0v55ywn.js +0 -8
- package/bundle/chunk-a2qz9m10.js +0 -2
- package/bundle/chunk-av6ezvxm.js +0 -2
- package/bundle/chunk-beksar7w.js +0 -2
- package/bundle/chunk-bg66rqrx.js +0 -2
- package/bundle/chunk-bn15mzd7.js +0 -2
- package/bundle/chunk-bt6yw07v.js +0 -2
- package/bundle/chunk-cy9s1ma5.js +0 -2
- package/bundle/chunk-d0nkvp57.js +0 -2
- package/bundle/chunk-dvk2wwjj.js +0 -2
- package/bundle/chunk-dxe29jj6.js +0 -2
- package/bundle/chunk-e0jy9qxd.js +0 -2
- package/bundle/chunk-eercqt72.js +0 -2
- package/bundle/chunk-efxd6b2k.js +0 -2
- package/bundle/chunk-eneawsj8.js +0 -2
- package/bundle/chunk-f72pppr7.js +0 -2
- package/bundle/chunk-feyphhxd.js +0 -2
- package/bundle/chunk-fnnch1e9.js +0 -2
- package/bundle/chunk-ft93f33g.js +0 -3
- package/bundle/chunk-gk34kh8p.js +0 -2
- package/bundle/chunk-gn50xqbd.js +0 -2
- package/bundle/chunk-h6rv626m.js +0 -2
- package/bundle/chunk-h7s2w1e2.js +0 -2
- package/bundle/chunk-hmv2cdnz.js +0 -2
- package/bundle/chunk-ht81ensf.js +0 -2
- package/bundle/chunk-hxpgs78j.js +0 -5
- package/bundle/chunk-j59ktwny.js +0 -2
- package/bundle/chunk-jmz2mq3t.js +0 -2
- package/bundle/chunk-jvqbvgjy.js +0 -11
- package/bundle/chunk-k309zez0.js +0 -3
- package/bundle/chunk-k3fn3yed.js +0 -2
- package/bundle/chunk-kpw6nghv.js +0 -2
- package/bundle/chunk-m5ghbt5y.js +0 -2
- package/bundle/chunk-mj4bepvj.js +0 -2
- package/bundle/chunk-mn41f9qv.js +0 -2
- package/bundle/chunk-mqjf9sbm.js +0 -2
- package/bundle/chunk-n5gwrrbb.js +0 -2
- package/bundle/chunk-nfjhem1c.js +0 -2
- package/bundle/chunk-ngytjdg2.js +0 -3
- package/bundle/chunk-nj4d554m.js +0 -11
- package/bundle/chunk-nrc3bj9p.js +0 -2
- package/bundle/chunk-nt4e3em9.js +0 -3
- package/bundle/chunk-nxyyn2ra.js +0 -2
- package/bundle/chunk-p5tceb4k.js +0 -2
- package/bundle/chunk-pvpy9kq1.js +0 -800
- package/bundle/chunk-qjgm3e2p.js +0 -2
- package/bundle/chunk-qt80mhdn.js +0 -2
- package/bundle/chunk-qtw5nrr4.js +0 -2
- package/bundle/chunk-rc9ex3vt.js +0 -2
- package/bundle/chunk-s9672vvv.js +0 -2
- package/bundle/chunk-sbyey0qb.js +0 -2
- package/bundle/chunk-shpq6es1.js +0 -3
- package/bundle/chunk-sj5v361q.js +0 -2
- package/bundle/chunk-ta3k9syc.js +0 -2
- package/bundle/chunk-tk5afan4.js +0 -2
- package/bundle/chunk-tpndnprb.js +0 -2
- package/bundle/chunk-v965rsr8.js +0 -3
- package/bundle/chunk-vcmrrt8b.js +0 -3
- package/bundle/chunk-vcrn3v70.js +0 -2
- package/bundle/chunk-vwxfgea7.js +0 -2
- package/bundle/chunk-w0kgcz1t.js +0 -2
- package/bundle/chunk-wgpsmxqx.js +0 -7
- package/bundle/chunk-wksczmes.js +0 -2
- package/bundle/chunk-wsxta33r.js +0 -2
- package/bundle/chunk-xck0sq3k.js +0 -2
- package/bundle/chunk-xjyhtm8r.js +0 -2
- package/bundle/chunk-xm08fc2q.js +0 -3
- package/bundle/chunk-ygc5qegv.js +0 -2
- package/bundle/chunk-yjqmzm51.js +0 -2
- package/bundle/chunk-yzc53n88.js +0 -2
- package/bundle/chunk-yzjc15vp.js +0 -9
- package/bundle/chunk-z7y9pdj7.js +0 -2
- package/bundle/chunk-z8g819cz.js +0 -2
- package/bundle/chunk-z8r65yw3.js +0 -2
- package/bundle/chunk-zt1nbwmm.js +0 -2
- package/bundle/chunk-zz36xg2n.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{DO as d3,FO as P5}from"./chunk-7xm75w1e.js";function R($,X,Y,J,Q){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?$!==X||!Q:!X.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?Q.call($,Y):Q?Q.value=Y:X.set($,Y),Y}function M($,X,Y,J){if(Y==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?$!==X||!J:!X.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return Y==="m"?J:Y==="a"?J.call($):J?J.value:X.get($)}var t4=function(){let{crypto:$}=globalThis;if($?.randomUUID)return t4=$.randomUUID.bind($),$.randomUUID();let X=new Uint8Array(1),Y=$?()=>$.getRandomValues(X)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^Y()&15>>+J/4).toString(16))};function e$($){return typeof $==="object"&&$!==null&&(("name"in $)&&$.name==="AbortError"||("message"in $)&&String($.message).includes("FetchRequestCanceledException"))}var M8=($)=>{if($ instanceof Error)return $;if(typeof $==="object"&&$!==null){try{if(Object.prototype.toString.call($)==="[object Error]"){let X=Error($.message,$.cause?{cause:$.cause}:{});if($.stack)X.stack=$.stack;if($.cause&&!X.cause)X.cause=$.cause;if($.name)X.name=$.name;return X}}catch{}try{return Error(JSON.stringify($))}catch{}}return Error($)};class f extends Error{}class X$ extends f{constructor($,X,Y,J){super(`${X$.makeMessage($,X,Y)}`);this.status=$,this.headers=J,this.requestID=J?.get("request-id"),this.error=X}static makeMessage($,X,Y){let J=X?.message?typeof X.message==="string"?X.message:JSON.stringify(X.message):X?JSON.stringify(X):Y;if($&&J)return`${$} ${J}`;if($)return`${$} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate($,X,Y,J){if(!$||!J)return new f0({message:Y,cause:M8(X)});let Q=X;if($===400)return new E8($,Q,Y,J);if($===401)return new L8($,Q,Y,J);if($===403)return new Z8($,Q,Y,J);if($===404)return new S8($,Q,Y,J);if($===409)return new A8($,Q,Y,J);if($===422)return new C8($,Q,Y,J);if($===429)return new D8($,Q,Y,J);if($>=500)return new R8($,Q,Y,J);return new X$($,Q,Y,J)}}class q$ extends X${constructor({message:$}={}){super(void 0,void 0,$||"Request was aborted.",void 0)}}class f0 extends X${constructor({message:$,cause:X}){super(void 0,void 0,$||"Connection error.",void 0);if(X)this.cause=X}}class O8 extends f0{constructor({message:$}={}){super({message:$??"Request timed out."})}}class E8 extends X${}class L8 extends X${}class Z8 extends X${}class S8 extends X${}class A8 extends X${}class C8 extends X${}class D8 extends X${}class R8 extends X${}var o5=/^[a-z][a-z0-9+.-]*:/i,E7=($)=>{return o5.test($)},o4=($)=>(o4=Array.isArray,o4($)),e4=o4;function c6($){if(typeof $!=="object")return{};return $??{}}function L7($){if(!$)return!0;for(let X in $)return!1;return!0}function Z7($,X){return Object.prototype.hasOwnProperty.call($,X)}var S7=($,X)=>{if(typeof X!=="number"||!Number.isInteger(X))throw new f(`${$} must be an integer`);if(X<0)throw new f(`${$} must be a positive integer`);return X};var l6=($)=>{try{return JSON.parse($)}catch(X){return}};var A7=($)=>new Promise((X)=>setTimeout(X,$));var w0="0.71.2";var T7=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"};function e5(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}var $Y=()=>{let $=e5();if($==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(Deno.build.os),"X-Stainless-Arch":C7(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if($==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(globalThis.process.platform??"unknown"),"X-Stainless-Arch":C7(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let X=XY();if(X)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${X.browser}`,"X-Stainless-Runtime-Version":X.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function XY(){if(typeof navigator>"u"||!navigator)return null;let $=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:X,pattern:Y}of $){let J=Y.exec(navigator.userAgent);if(J){let Q=J[1]||0,W=J[2]||0,z=J[3]||0;return{browser:X,version:`${Q}.${W}.${z}`}}}return null}var C7=($)=>{if($==="x32")return"x32";if($==="x86_64"||$==="x64")return"x64";if($==="arm")return"arm";if($==="aarch64"||$==="arm64")return"arm64";if($)return`other:${$}`;return"unknown"},D7=($)=>{if($=$.toLowerCase(),$.includes("ios"))return"iOS";if($==="android")return"Android";if($==="darwin")return"MacOS";if($==="win32")return"Windows";if($==="freebsd")return"FreeBSD";if($==="openbsd")return"OpenBSD";if($==="linux")return"Linux";if($)return`Other:${$}`;return"Unknown"},R7,_7=()=>{return R7??(R7=$Y())};function P7(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function $X(...$){let X=globalThis.ReadableStream;if(typeof X>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new X(...$)}function p6($){let X=Symbol.asyncIterator in $?$[Symbol.asyncIterator]():$[Symbol.iterator]();return $X({start(){},async pull(Y){let{done:J,value:Q}=await X.next();if(J)Y.close();else Y.enqueue(Q)},async cancel(){await X.return?.()}})}function T8($){if($[Symbol.asyncIterator])return $;let X=$.getReader();return{async next(){try{let Y=await X.read();if(Y?.done)X.releaseLock();return Y}catch(Y){throw X.releaseLock(),Y}},async return(){let Y=X.cancel();return X.releaseLock(),await Y,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function j7($){if($===null||typeof $!=="object")return;if($[Symbol.asyncIterator]){await $[Symbol.asyncIterator]().return?.();return}let X=$.getReader(),Y=X.cancel();X.releaseLock(),await Y}var k7=({headers:$,body:X})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(X)}};function b7($){let X=0;for(let Q of $)X+=Q.length;let Y=new Uint8Array(X),J=0;for(let Q of $)Y.set(Q,J),J+=Q.length;return Y}var x7;function _8($){let X;return(x7??(X=new globalThis.TextEncoder,x7=X.encode.bind(X)))($)}var f7;function XX($){let X;return(f7??(X=new globalThis.TextDecoder,f7=X.decode.bind(X)))($)}var Z$,S$;class N0{constructor(){Z$.set(this,void 0),S$.set(this,void 0),R(this,Z$,new Uint8Array,"f"),R(this,S$,null,"f")}decode($){if($==null)return[];let X=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?_8($):$;R(this,Z$,b7([M(this,Z$,"f"),X]),"f");let Y=[],J;while((J=QY(M(this,Z$,"f"),M(this,S$,"f")))!=null){if(J.carriage&&M(this,S$,"f")==null){R(this,S$,J.index,"f");continue}if(M(this,S$,"f")!=null&&(J.index!==M(this,S$,"f")+1||J.carriage)){Y.push(XX(M(this,Z$,"f").subarray(0,M(this,S$,"f")-1))),R(this,Z$,M(this,Z$,"f").subarray(M(this,S$,"f")),"f"),R(this,S$,null,"f");continue}let Q=M(this,S$,"f")!==null?J.preceding-1:J.preceding,W=XX(M(this,Z$,"f").subarray(0,Q));Y.push(W),R(this,Z$,M(this,Z$,"f").subarray(J.index),"f"),R(this,S$,null,"f")}return Y}flush(){if(!M(this,Z$,"f").length)return[];return this.decode(`
|
|
3
3
|
`)}}Z$=new WeakMap,S$=new WeakMap;N0.NEWLINE_CHARS=new Set([`
|
|
4
4
|
`,"\r"]);N0.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function QY($,X){for(let Q=X??0;Q<$.length;Q++){if($[Q]===10)return{preceding:Q,index:Q+1,carriage:!1};if($[Q]===13)return{preceding:Q,index:Q+1,carriage:!0}}return null}function I7($){for(let J=0;J<$.length-1;J++){if($[J]===10&&$[J+1]===10)return J+2;if($[J]===13&&$[J+1]===13)return J+2;if($[J]===13&&$[J+1]===10&&J+3<$.length&&$[J+2]===13&&$[J+3]===10)return J+4}return-1}var n6={off:0,error:200,warn:300,info:400,debug:500},YX=($,X,Y)=>{if(!$)return;if(Z7(n6,$))return $;G$(Y).warn(`${X} was set to ${JSON.stringify($)}, expected one of ${JSON.stringify(Object.keys(n6))}`);return};function P8(){}function i6($,X,Y){if(!X||n6[$]>n6[Y])return P8;else return X[$].bind(X)}var WY={error:P8,warn:P8,info:P8,debug:P8},v7=new WeakMap;function G$($){let X=$.logger,Y=$.logLevel??"off";if(!X)return WY;let J=v7.get(X);if(J&&J[0]===Y)return J[1];let Q={error:i6("error",X,Y),warn:i6("warn",X,Y),info:i6("info",X,Y),debug:i6("debug",X,Y)};return v7.set(X,[Y,Q]),Q}var $0=($)=>{if($.options)$.options={...$.options},delete $.options.headers;if($.headers)$.headers=Object.fromEntries(($.headers instanceof Headers?[...$.headers]:Object.entries($.headers)).map(([X,Y])=>[X,X.toLowerCase()==="x-api-key"||X.toLowerCase()==="authorization"||X.toLowerCase()==="cookie"||X.toLowerCase()==="set-cookie"?"***":Y]));if("retryOfRequestLogID"in $){if($.retryOfRequestLogID)$.retryOf=$.retryOfRequestLogID;delete $.retryOfRequestLogID}return $};var j8;class A${constructor($,X,Y){this.iterator=$,j8.set(this,void 0),this.controller=X,R(this,j8,Y,"f")}static fromSSEResponse($,X,Y){let J=!1,Q=Y?G$(Y):console;async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of zY($,X)){if(G.event==="completion")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="message_start"||G.event==="message_delta"||G.event==="message_stop"||G.event==="content_block_start"||G.event==="content_block_delta"||G.event==="content_block_stop")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="ping")continue;if(G.event==="error")throw new X$(void 0,l6(G.data)??G.data,void 0,$.headers)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}static fromReadableStream($,X,Y){let J=!1;async function*Q(){let z=new N0,G=T8($);for await(let V of G)for(let H of z.decode(V))yield H;for(let V of z.flush())yield V}async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of Q()){if(z)continue;if(G)yield JSON.parse(G)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}[(j8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let $=[],X=[],Y=this.iterator(),J=(Q)=>{return{next:()=>{if(Q.length===0){let W=Y.next();$.push(W),X.push(W)}return Q.shift()}}};return[new A$(()=>J($),this.controller,M(this,j8,"f")),new A$(()=>J(X),this.controller,M(this,j8,"f"))]}toReadableStream(){let $=this,X;return $X({async start(){X=$[Symbol.asyncIterator]()},async pull(Y){try{let{value:J,done:Q}=await X.next();if(Q)return Y.close();let W=_8(JSON.stringify(J)+`
|
|
5
5
|
`);Y.enqueue(W)}catch(J){Y.error(J)}},async cancel(){await X.return?.()}})}}async function*zY($,X){if(!$.body){if(X.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new f("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new f("Attempted to iterate over a response with no body")}let Y=new y7,J=new N0,Q=T8($.body);for await(let W of GY(Q))for(let z of J.decode(W)){let G=Y.decode(z);if(G)yield G}for(let W of J.flush()){let z=Y.decode(W);if(z)yield z}}async function*GY($){let X=new Uint8Array;for await(let Y of $){if(Y==null)continue;let J=Y instanceof ArrayBuffer?new Uint8Array(Y):typeof Y==="string"?_8(Y):Y,Q=new Uint8Array(X.length+J.length);Q.set(X),Q.set(J,X.length),X=Q;let W;while((W=I7(X))!==-1)yield X.slice(0,W),X=X.slice(W)}if(X.length>0)yield X}class y7{constructor(){this.event=null,this.data=[],this.chunks=[]}decode($){if($.endsWith("\r"))$=$.substring(0,$.length-1);if(!$){if(!this.event&&!this.data.length)return null;let Q={event:this.event,data:this.data.join(`
|
|
@@ -99,4 +99,4 @@ ${Q.content}`:Q.content;continue}if(Q.role==="user"){let W=[];for(let z of Q.con
|
|
|
99
99
|
`,wW=600000,d5=class{config;fetchFn;cache=new Map;constructor($){this.config=$,this.fetchFn=$.fetch??fetch}async discover($){let X=this.cache.get($);if(X&&X.expiresAt>Date.now())return X.data;let Y=`${this.config.instanceUrl}/api/graphql`;try{let J=await this.fetchFn(Y,{method:"POST",headers:{...this.config.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({query:qW,variables:{rootNamespaceId:$}})});if(!J.ok){let H=await J.text();throw new x({message:`Model discovery GraphQL request failed: ${J.status} ${J.statusText} - ${H}`,statusCode:J.status,responseBody:H})}let Q=await J.json();if(Q.errors&&Q.errors.length>0)throw new x({message:`Model discovery GraphQL errors: ${Q.errors.map((H)=>H.message).join(", ")}`});let W=Q.data?.aiChatAvailableModels,z=Q.data?.metadata,G=z?.featureFlags?.find((H)=>H.name==="ai_user_model_switching")?.enabled??!1,V={defaultModel:W?.defaultModel??null,selectableModels:W?.selectableModels??[],pinnedModel:W?.pinnedModel??null,modelSwitchingEnabled:G,instanceVersion:z?.version??null};return this.cache.set($,{data:V,expiresAt:Date.now()+wW}),V}catch(J){if(J instanceof x)throw J;throw new x({message:`Model discovery failed: ${J}`,cause:J})}}async getEffectiveModelRef($,X){let Y=await this.discover($);if(Y.pinnedModel)return Y.pinnedModel.ref;if(X&&Y.modelSwitchingEnabled){if(Y.selectableModels.some((Q)=>Q.ref===X))return X}return Y.defaultModel?.ref??null}invalidateCache(){this.cache.clear()}},NW=600000;function UW(){let $=process.env.XDG_CACHE_HOME||h6.join(c5.homedir(),".cache");return h6.join($,"opencode","gitlab-workflow-model-cache.json")}function FW($,X){let Y=(X||"https://gitlab.com").replace(/\/$/,"");return l5.createHash("sha256").update(`${$}\x00${Y}`).digest("hex").slice(0,12)}var p5=class{filePath;key;constructor($,X){this.filePath=UW(),this.key=FW($,X)}readAll(){try{if(!u$.existsSync(this.filePath))return{};let $=u$.readFileSync(this.filePath,"utf-8");return JSON.parse($)}catch{return{}}}writeAll($){try{let X=h6.dirname(this.filePath);u$.mkdirSync(X,{recursive:!0,mode:448}),u$.writeFileSync(this.filePath,JSON.stringify($,null,2),{mode:384})}catch{}}load(){return this.readAll()[this.key]??null}save($){let X=this.readAll();X[this.key]=$,this.writeAll(X)}isDiscoveryExpired(){let $=this.load();if(!$?.discovery||!$.updatedAt)return!0;return Date.now()-new Date($.updatedAt).getTime()>NW}saveDiscovery($,X){let Y=this.load();this.save({discovery:$,project:X!==void 0?X:Y?.project??null,selectedModelRef:Y?.selectedModelRef??null,selectedModelName:Y?.selectedModelName??null,updatedAt:new Date().toISOString()})}saveSelection($,X){let Y=this.load(),J=X;if(!J&&$&&Y?.discovery){let Q=Y.discovery;J=(Q.pinnedModel?.ref===$?Q.pinnedModel:Q.selectableModels.find((z)=>z.ref===$)??(Q.defaultModel?.ref===$?Q.defaultModel:null))?.name??null}this.save({discovery:Y?.discovery??null,project:Y?.project??null,selectedModelRef:$,selectedModelName:J,updatedAt:new Date().toISOString()})}clear(){let $=this.readAll();if(delete $[this.key],Object.keys($).length===0)try{if(u$.existsSync(this.filePath))u$.unlinkSync(this.filePath)}catch{}else this.writeAll($)}getSelectedModelRef(){return this.load()?.selectedModelRef??null}getSelectedModelName(){return this.load()?.selectedModelName??null}getDiscovery(){return this.load()?.discovery??null}};function B7($){if(!$||typeof $!=="object")return $;let X={};for(let[Y,J]of Object.entries($)){if(Y==="description"||Y==="examples"||Y==="default")continue;if(Y==="properties"&&typeof J==="object"&&J!==null){let Q={};for(let[W,z]of Object.entries(J))if(typeof z==="object"&&z!==null)Q[W]=B7(z);else Q[W]=z;X[Y]=Q}else if(Y==="items"&&typeof J==="object"&&J!==null)X[Y]=B7(J);else X[Y]=J}return X}function MW($){try{return JSON.stringify(B7(JSON.parse($)))}catch{return $}}function OW($){if(!$||typeof $!=="object")return $;let X={type:$.type||"object"};if($.required)X.required=$.required;if($.properties&&typeof $.properties==="object"){let Y={};for(let[J,Q]of Object.entries($.properties))if(typeof Q==="object"&&Q!==null){let W=Q;Y[J]={type:W.type||"string"}}else Y[J]={type:"string"};X.properties=Y}return X}function EW($){try{return JSON.stringify(OW(JSON.parse($)))}catch{return $}}var LW=class ${specificationVersion="v3";modelId;supportedUrls={};config;workflowOptions;tokenClient;projectDetector;modelDiscovery;modelCache;detectedProjectPath=null;sessionWorkflows=new Map;currentWorkflowId=null;currentWorkflowDefinition=null;persistedAgentEmitted=new Map;activeClients=new Set;_selectedModelRef;_selectedModelName;_rootNamespaceId;_discoveryPromise;get selectedModelRef(){return this._selectedModelRef??null}set selectedModelRef(X){this._selectedModelRef=X??void 0,this._selectedModelName=void 0,this.modelCache.saveSelection(X,null)}get selectedModelName(){return this._selectedModelName??null}set selectedModelName(X){this._selectedModelName=X??void 0,this.modelCache.saveSelection(this._selectedModelRef??null,X)}_toolExecutor=null;onUsageUpdate=null;sessionPreapprovedTools=[];sessionID="";set approvalHandler(X){this.workflowOptions.approvalHandler=X??void 0}get approvalHandler(){return this.workflowOptions.approvalHandler??null}onSelectModel=null;set systemPrompt(X){this.workflowOptions.systemPrompt=X??void 0}get systemPrompt(){return this.workflowOptions.systemPrompt??null}get toolExecutor(){return this._toolExecutor}set toolExecutor(X){if(X)try{let{AsyncResource:Y}=N7("async_hooks");this._toolExecutor=Y.bind(X)}catch{this._toolExecutor=X}else this._toolExecutor=null}constructor(X,Y,J={}){this.modelId=X,this.config=Y,this.workflowOptions=J;let Q=J.workingDirectory??process.cwd();this.modelCache=new p5(Q,Y.instanceUrl);let W=this.modelCache.load();if(W?.selectedModelRef)this._selectedModelRef=W.selectedModelRef;if(W?.selectedModelName)this._selectedModelName=W.selectedModelName;this.tokenClient=new HW({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,refreshApiKey:Y.refreshApiKey,fetch:Y.fetch,featureFlags:Y.featureFlags}),this.projectDetector=new u5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch}),this.modelDiscovery=new d5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch})}get provider(){return this.config.provider}async resolveProjectId(){if(this.workflowOptions.projectId)return this.workflowOptions.projectId;if(this.detectedProjectPath)return this.detectedProjectPath;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y)return this.detectedProjectPath=Y.pathWithNamespace,Y.pathWithNamespace;return}async resolveRootNamespaceId(){if(this.workflowOptions.rootNamespaceId)return this.workflowOptions.rootNamespaceId;if(this._rootNamespaceId!==void 0)return this._rootNamespaceId;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y?.namespaceId){let J=`gid://gitlab/Group/${Y.namespaceId}`;return this._rootNamespaceId=J,J}return this._rootNamespaceId=null,null}async resolveModelRef(){let X=sQ(this.modelId);if(this.modelId!=="duo-workflow")return X??"default";if(this._selectedModelRef)return this._selectedModelRef;if(!this._discoveryPromise)this._discoveryPromise=this.doResolveModelRef(),this._discoveryPromise.finally(()=>{this._discoveryPromise=void 0});return this._discoveryPromise}async doResolveModelRef(){let X=await this.resolveRootNamespaceId();if(!X)return this._selectedModelRef="default","default";try{let Y=await this.modelDiscovery.discover(X);if(this.modelCache.saveDiscovery(Y),Y.pinnedModel)return this._selectedModelRef=Y.pinnedModel.ref,this._selectedModelName=Y.pinnedModel.name,this.modelCache.saveSelection(Y.pinnedModel.ref,Y.pinnedModel.name),Y.pinnedModel.ref;let J=this.onSelectModel??this.workflowOptions.onSelectModel;if(Y.selectableModels.length>0&&J){let Q=await J(Y.selectableModels);if(Q){let W=Y.selectableModels.find((z)=>z.ref===Q);if(W)return this._selectedModelRef=W.ref,this._selectedModelName=W.name,this.modelCache.saveSelection(W.ref,W.name),W.ref}}if(Y.defaultModel)return this._selectedModelRef=Y.defaultModel.ref,this._selectedModelName=Y.defaultModel.name,this.modelCache.saveSelection(Y.defaultModel.ref,Y.defaultModel.name),Y.defaultModel.ref}catch{let Y=this.modelCache.load();if(Y?.selectedModelRef)return this._selectedModelRef=Y.selectedModelRef,this._selectedModelName=Y.selectedModelName??void 0,Y.selectedModelRef}return this._selectedModelRef="default","default"}async discoverModels(X){let Y=await this.modelDiscovery.discover(X);return this.modelCache.saveDiscovery(Y),Y}getModelCache(){return this.modelCache}stopWorkflow(){for(let X of this.activeClients)if(X.isConnected)X.stop()}resetWorkflow(X){if(X)this.sessionWorkflows.delete(X);else this.sessionWorkflows.clear(),this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}get workflowId(){return this.currentWorkflowId}createUsage(X){return{inputTokens:{total:X?.inputTotal,noCache:X?.inputTotal,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X?.outputTotal,text:X?.outputTotal,reasoning:void 0}}}createFinishReason(X,Y){return{unified:X,raw:Y}}async doGenerate(X){let{stream:Y}=await this.doStream(X),J=Y.getReader(),Q=[],W=[],z={unified:"other",raw:void 0},G=this.createUsage();try{while(!0){let{done:q,value:w}=await J.read();if(q)break;switch(w.type){case"text-delta":Q.push(w.delta);break;case"tool-call":W.push({type:"tool-call",toolCallId:w.toolCallId,toolName:w.toolName,input:w.input});break;case"finish":if(z=w.finishReason,w.usage)G=w.usage;break;case"error":throw w.error}}}finally{J.releaseLock()}let V=[],H=Q.join("");if(H)V.push({type:"text",text:H});return V.push(...W),{content:V,finishReason:z,usage:G,warnings:[]}}async doStream(X){let Y=this.extractGoalFromPrompt(X.prompt),J=await this.resolveModelRef(),Q=this.extractMcpTools(X),W=[...this.workflowOptions.preapprovedTools??Q.map((a)=>a.name),...this.sessionPreapprovedTools],z=this.buildAdditionalContext(X.prompt),G=this.toolExecutor??null,V=new Set(X.tools?.map((a)=>a.name)??[]),H=X.providerOptions?.gitlab,q=H?.workflowDefinition??this.workflowOptions.workflowDefinition,w=H?.flowConfig??void 0,B=H?.flowConfigSchemaVersion??void 0,U=H?.aiCatalogItemVersionId??void 0;await this.tokenClient.getToken(q??y6,this.workflowOptions.rootNamespaceId);let O=await this.resolveProjectId(),P=w??q??y6,j=this.sessionID,L=this.sessionWorkflows.get(j);if(L&&L.workflowDefinition!==P)this.sessionWorkflows.delete(j),L=void 0;let A=j==="";if(A&&this.currentWorkflowId&&this.currentWorkflowDefinition!==P)this.currentWorkflowId=null,this.currentWorkflowDefinition=null;let E;if(L)E=L.workflowId;else if(A&&this.currentWorkflowId)E=this.currentWorkflowId;else if(E=await this.tokenClient.createWorkflow(Y,{projectId:O,namespaceId:this.workflowOptions.namespaceId,workflowDefinition:q,agentPrivileges:this.workflowOptions.agentPrivileges,aiCatalogItemVersionId:U}),A)this.currentWorkflowId=E,this.currentWorkflowDefinition=P;else this.sessionWorkflows.set(j,{workflowId:E,workflowDefinition:P,agentEmitted:new Map,toolEntries:new Set}),L=this.sessionWorkflows.get(j);let _=new x5;this.activeClients.add(_);let c=0,n={streamClosed:!1,streamedInputChars:0,streamedOutputChars:0,pendingToolCount:0,approvalPending:!1,deferredClose:null,activeTextBlockId:null,agentMessageEmitted:new Map(L?.agentEmitted??this.persistedAgentEmitted),currentAgentMessageId:"",activeClient:_,processedRequestIDs:new Set,emittedToolEntries:new Set(L?.toolEntries),emittedToolKeys:new Set,sessionKey:j};for(let a of X.prompt)if(a.role==="system")n.streamedInputChars+=a.content.length;else if(a.role==="user"){for(let u of a.content)if(u.type==="text")n.streamedInputChars+=u.text.length}let p;return{stream:new ReadableStream({start:async(a)=>{try{await _.connect({instanceUrl:this.config.instanceUrl,modelRef:J,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition},(s4)=>{this.handleWorkflowEvent(n,s4,a,_,G,()=>`text-${c++}`,V,p,{aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition})});let u=q??y6,x$=this.workflowOptions.clientCapabilities??$W,u6=await this.buildWorkflowMetadata(),w2=JSON.stringify(u6),d6=JSON.stringify({workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,clientCapabilities:x$,preapproved_tools:W}).length+100,r4=this.trimPayload(Q,z,d6),r5=W.filter((s4)=>r4.mcpTools.some((s5)=>s5.name===s4));p={workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,additional_context:r4.additionalContext,clientCapabilities:x$,mcpTools:r4.mcpTools,preapproved_tools:r5};let M7=w??this.workflowOptions.flowConfig,O7=B??this.workflowOptions.flowConfigSchemaVersion;if(M7)p.flowConfig=M7;if(O7)p.flowConfigSchemaVersion=O7;else if(p.flowConfig)p.flowConfigSchemaVersion="v1";_.sendStartRequest(p),a.enqueue({type:"stream-start",warnings:[]}),a.enqueue({type:"response-metadata",id:E,modelId:J})}catch(u){if(!n.streamClosed)a.enqueue({type:"error",error:u instanceof x?u:new x({message:`Workflow connection failed: ${u}`,cause:u})}),n.streamClosed=!0,a.close()}},cancel:(a)=>{if(_.stop(),_.close(),this.activeClients.delete(_),n.activeClient=null,!n.streamClosed)if(n.sessionKey)this.sessionWorkflows.delete(n.sessionKey);else this.currentWorkflowId=null}}),request:{body:{workflowId:E,modelRef:J,goal:Y}}}}handleWorkflowEvent(X,Y,J,Q,W,z,G,V,H){if(X.streamClosed)return;switch(Y.type){case"checkpoint":{this.processCheckpoint(X,Y.data,J,z);break}case"tool-request":{let{requestID:q,data:w}=Y;if(X.processedRequestIDs.has(q))break;X.processedRequestIDs.add(q),X.emittedToolKeys.add(w.name);let B;try{JSON.parse(w.args),B=w.args}catch{B=w.args||"{}"}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:q,toolName:w.name,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:q,delta:B}),J.enqueue({type:"tool-input-end",id:q}),J.enqueue({type:"tool-call",toolCallId:q,toolName:w.name,input:B,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,q,w.name,B,W).catch(()=>{});break}case"builtin-tool-request":{if(X.processedRequestIDs.has(Y.requestID))break;X.processedRequestIDs.add(Y.requestID);let q=WW(Y.toolName,Y.data,G);X.emittedToolKeys.add(q.toolName);let w=JSON.stringify(q.args);if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:Y.requestID,toolName:q.toolName,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:Y.requestID,delta:w}),J.enqueue({type:"tool-input-end",id:Y.requestID}),J.enqueue({type:"tool-call",toolCallId:Y.requestID,toolName:q.toolName,input:w,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,Y.requestID,q.toolName,w,W).catch(()=>{});break}case"approval-required":{X.approvalPending=!0,this.approveAndResume(X,Y.tools,V,J,W,z,G,H).catch((q)=>{if(X.approvalPending=!1,X.deferredClose){let w=X.deferredClose;X.deferredClose=null,w()}});break}case"completed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","completed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}case"failed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"error",error:new x({message:`Workflow failed: ${g6(Y.error.message)}`,cause:Y.error})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);break}case"closed":{if(X.streamClosed)break;if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;if(Y.code!==1000)J.enqueue({type:"error",error:new x({message:`WebSocket closed unexpectedly: code=${Y.code} reason=${g6(Y.reason)}`,statusCode:Y.code})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);else{let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","closed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)}};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}}}processCheckpoint(X,Y,J,Q){if(!Y.checkpoint){if(Y.content){if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:Y.content}),X.streamedOutputChars+=Y.content.length}return}let W;try{W=JSON.parse(Y.checkpoint)}catch(G){return}let z=W.channel_values?.ui_chat_log;if(!z||!Array.isArray(z)||z.length===0)return;if(Y.status!=="RUNNING"&&Y.status!=="INPUT_REQUIRED"&&Y.status!=="FINISHED"&&Y.status!=="COMPLETED"&&Y.status!=="TOOL_CALL_APPROVAL_REQUIRED")return;for(let G=0;G<z.length;G++){let V=z[G];if(V.message_type==="tool"&&V.tool_info){let P=V.message_id||V.correlation_id||`tool-${G}`;if(X.emittedToolEntries.has(P))continue;let j=V.tool_info.name,L=JSON.stringify(V.tool_info.args??{});if(X.emittedToolKeys.has(j)){X.emittedToolEntries.add(P);let c=this.sessionWorkflows.get(X.sessionKey);if(c)c.toolEntries.add(P);continue}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:P,toolName:j,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:P,delta:L}),J.enqueue({type:"tool-input-end",id:P}),J.enqueue({type:"tool-call",toolCallId:P,toolName:j,input:L,providerExecuted:!0,dynamic:!0});let A=V.tool_info.tool_response,E=typeof A==="string"?A:A?A.content:V.content||"";J.enqueue({type:"tool-result",toolCallId:P,toolName:j,result:{output:E,title:j,metadata:{}},isError:!1}),X.emittedToolEntries.add(P);let _=this.sessionWorkflows.get(X.sessionKey);if(_)_.toolEntries.add(P);continue}if(V.message_type!=="agent")continue;let H=V.content||"",q=V.message_id||`idx-${G}`,w=X.agentMessageEmitted.get(q)??0;if(H.length<=w)continue;let B=H.slice(w);if(q!==X.currentAgentMessageId&&X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:B}),X.streamedOutputChars+=B.length,X.agentMessageEmitted.set(q,H.length),(this.sessionWorkflows.get(X.sessionKey)?.agentEmitted??this.persistedAgentEmitted).set(q,H.length),X.currentAgentMessageId=q}}async executeToolAndRespond(X,Y,J,Q,W,z,G){X.pendingToolCount++;let V=(H)=>{if(X.streamClosed)return;try{J.enqueue(H)}catch{}};try{if(G){let H=await G(W,z,Q);if(H.error&&/^Unknown tool:/.test(H.error)){let U=zW(W,z);if(U)H=U}Y.sendActionResponse(Q,H.result,H.error),X.streamedInputChars+=z.length,X.streamedOutputChars+=H.result.length;let q=H.result,w=H.title??`${W} result`,B=H.metadata??{output:H.result};if(H.error){let U;if(typeof H.error==="string")U=H.error;else if(H.error&&typeof H.error==="object")U=JSON.stringify(H.error);else U=String(H.error);V({type:"tool-result",toolCallId:Q,toolName:W,result:U,isError:!0})}else V({type:"tool-result",toolCallId:Q,toolName:W,result:{output:q,title:w,metadata:B},isError:!1})}else{let H=`Tool executor not configured for tool: ${W}`;Y.sendActionResponse(Q,"",H),V({type:"tool-result",toolCallId:Q,toolName:W,result:H,isError:!0})}}catch(H){let q=H instanceof Error?H.message:String(H),w=g6(q);Y.sendActionResponse(Q,"",w),V({type:"tool-result",toolCallId:Q,toolName:W,result:w,isError:!0})}finally{if(X.pendingToolCount--,this.onUsageUpdate)try{this.onUsageUpdate({inputTokens:Math.ceil(X.streamedInputChars/4),outputTokens:Math.ceil(X.streamedOutputChars/4)})}catch{}if(X.pendingToolCount<=0&&X.deferredClose){let H=X.deferredClose;X.deferredClose=null,H()}}}cleanupClient(X,Y=!1){if(X.activeClient)X.activeClient.close(),this.activeClients.delete(X.activeClient),X.activeClient=null;if(Y)if(X.sessionKey)this.sessionWorkflows.delete(X.sessionKey);else this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}async approveAndResume(X,Y,J,Q,W,z,G,V){let H=this.workflowOptions.approvalHandler;if(!H||!J){if(X.approvalPending=!1,X.deferredClose){let P=X.deferredClose;X.deferredClose=null,P()}return}let q;try{q=await H(Y)}catch(P){if(X.approvalPending=!1,!X.streamClosed)Q.error(P);return}X.approvalPending=!1,X.deferredClose=null,this.cleanupClient(X,!1);let w=q.approved?{approval:{tool_name:Y[0]?.name,tool_args_json:Y[0]?.args}}:{rejection:{message:q.message??"User rejected"}},B={...J,approval:w,preapproved_tools:q.approved?[...J.preapproved_tools??[],...Y.map((P)=>P.name)]:J.preapproved_tools??[]},U=new x5;this.activeClients.add(U),X.activeClient=U;let O=await this.resolveModelRef();try{await U.connect({instanceUrl:this.config.instanceUrl,modelRef:O,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:V?.aiCatalogItemVersionId,workflowDefinition:V?.workflowDefinition},(P)=>this.handleWorkflowEvent(X,P,Q,U,W,z,G,B,V)),U.sendStartRequest(B)}catch(P){if(this.cleanupClient(X,!0),!X.streamClosed)Q.error(P)}}async buildWorkflowMetadata(){let X={extended_logging:!1,tool_approval_for_session_enabled:!0};try{let Y=this.workflowOptions.workingDirectory??process.cwd(),J=await this.getGitInfo(Y);if(J.url)X.git_url=J.url;if(J.sha)X.git_sha=J.sha;if(J.branch)X.git_branch=J.branch}catch{}return X}async getGitInfo(X){let{execFile:Y}=await import("child_process"),{promisify:J}=await import("util"),Q=J(Y),W={cwd:X,timeout:3000},z=async(q,w)=>{try{let{stdout:B}=await Q(q,w,W);return B.trim()||void 0}catch{return}},[G,V,H]=await Promise.all([z("git",["remote","get-url","origin"]),z("git",["rev-parse","HEAD"]),z("git",["rev-parse","--abbrev-ref","HEAD"])]);return{url:G,sha:V,branch:H}}static SYSTEM_REMINDER_RE=/<system-reminder>([\s\S]*?)<\/system-reminder>/g;extractGoalFromPrompt(X){for(let Y=X.length-1;Y>=0;Y--){let J=X[Y];if(J.role==="user"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text);if(Q.length>0){let W=Q.join(`
|
|
100
100
|
`);return W.replace($.SYSTEM_REMINDER_RE,"").trim()||W}}}return""}extractMcpTools(X){if(this.workflowOptions.mcpTools&&this.workflowOptions.mcpTools.length>0)return this.workflowOptions.mcpTools;if(!X.tools||X.tools.length===0)return[];return X.tools.filter((Y)=>Y.type==="function").map((Y)=>({name:Y.name,description:Y.description||"",inputSchema:JSON.stringify(Y.inputSchema||{type:"object",properties:{}})}))}static MAX_START_REQUEST_BYTES=4194304;trimPayload(X,Y,J){let Q=$.MAX_START_REQUEST_BYTES-J,W=JSON.stringify(Y);if(JSON.stringify(X).length+W.length<=Q)return{mcpTools:X,additionalContext:Y};let V=X.map((U)=>({name:U.name,description:U.description,inputSchema:MW(U.inputSchema)}));if(JSON.stringify(V).length+W.length<=Q)return{mcpTools:V,additionalContext:Y};let q=V.map((U)=>({name:U.name,description:U.description,inputSchema:EW(U.inputSchema)}));if(JSON.stringify(q).length+W.length<=Q)return{mcpTools:q,additionalContext:Y};let B=[...q];while(B.length>0){if(JSON.stringify(B).length+W.length<=Q)break;B.pop()}return{mcpTools:B,additionalContext:Y}}buildAdditionalContext(X){let Y=[];if(this.workflowOptions.additionalContext)Y.push(...this.workflowOptions.additionalContext);for(let J of X)if(J.role==="system")Y.push({category:"system_prompt",content:J.content,metadata:JSON.stringify({role:"system"})});else if(J.role==="assistant"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text).join(`
|
|
101
101
|
`);if(Q)Y.push({category:"conversation",content:Q,metadata:JSON.stringify({role:"assistant"})})}else if(J.role==="user"){for(let Q of J.content)if(Q.type==="text"){let z=Q.text.matchAll($.SYSTEM_REMINDER_RE);for(let G of z){let V=G[1].trim();if(V)Y.push({category:"agent_context",content:V,metadata:JSON.stringify({source:"system-reminder"})})}}}return Y}},ZW="1d89f9fdb23ee96d4e603201f6861dab6e143c5c3c00469a018a2d94bdc03d4e",vE="36f2a70cddeb5a0889d4fd8295c241b7e9848e89cf9e599d0eed2d8e5350fbf5",SW="https://gitlab.com",AW=300000,yE=["api"],CW=class{fetch;constructor($=fetch){this.fetch=$}isTokenExpired($){return Date.now()>=$}needsRefresh($){return Date.now()>=$-AW}async refreshIfNeeded($,X){if(!this.needsRefresh($.expiresAt))return $;if(this.isTokenExpired($.expiresAt))throw new x({message:"OAuth token has expired and cannot be used"});return this.exchangeRefreshToken({instanceUrl:$.instanceUrl,refreshToken:$.refreshToken,clientId:X})}async exchangeAuthorizationCode($){let{instanceUrl:X,code:Y,codeVerifier:J,clientId:Q,redirectUri:W}=$,z=await this.exchangeToken({instanceUrl:X,grantType:"authorization_code",code:Y,codeVerifier:J,clientId:Q||this.getClientId(X),redirectUri:W});return this.createTokensFromResponse(z,X)}async exchangeRefreshToken($){let{instanceUrl:X,refreshToken:Y,clientId:J}=$,Q=await this.exchangeToken({instanceUrl:X,grantType:"refresh_token",refreshToken:Y,clientId:J||this.getClientId(X)});return this.createTokensFromResponse(Q,X)}getClientId($){let X=process.env.GITLAB_OAUTH_CLIENT_ID;if(X)return X;if($===SW)return ZW;throw new x({message:`No OAuth client ID configured for instance ${$}. Please provide a clientId parameter or set GITLAB_OAUTH_CLIENT_ID environment variable.`})}async exchangeToken($){let{instanceUrl:X,grantType:Y,code:J,codeVerifier:Q,refreshToken:W,clientId:z,redirectUri:G}=$,V={client_id:z,grant_type:Y};if(Y==="authorization_code"){if(!J||!Q||!G)throw new x({message:"Authorization code, code verifier, and redirect URI are required for authorization_code grant"});V.code=J,V.code_verifier=Q,V.redirect_uri=G}else if(Y==="refresh_token"){if(!W)throw new x({message:"Refresh token is required for refresh_token grant"});V.refresh_token=W}let H=`${X}/oauth/token`;try{let q=await this.fetch(H,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(V).toString()});if(!q.ok){let B=await q.text();throw new x({message:`OAuth token exchange failed: ${q.status} ${q.statusText}`,cause:Error(B)})}return await q.json()}catch(q){if(q instanceof x)throw q;throw new x({message:`Failed to exchange OAuth token: ${q instanceof Error?q.message:String(q)}`,cause:q instanceof Error?q:void 0})}}createTokensFromResponse($,X){let Y=this.createExpiresTimestamp($);return{accessToken:$.access_token,refreshToken:$.refresh_token||"",expiresAt:Y,instanceUrl:X}}createExpiresTimestamp($){let X=$.created_at*1000,Y=$.expires_in*1000;return X+Y}};function n5(){let $=i5.homedir(),X=process.env.XDG_DATA_HOME;if(X)return a4.join(X,"opencode","auth.json");if(process.platform!=="win32")return a4.join($,".local","share","opencode","auth.json");return a4.join($,".opencode","auth.json")}async function DW($){try{let X=n5();if(!q2.existsSync(X))return;let Y=JSON.parse(q2.readFileSync(X,"utf-8"));if(Y.gitlab?.type==="oauth"){let W=Y.gitlab;if(W.enterpriseUrl===$||W.enterpriseUrl===$.replace(/\/$/,""))return W}let J=$.replace(/\/$/,"");return Y[J]||Y[`${J}/`]}catch(X){throw Error(`Failed to load auth.json: ${X instanceof Error?X.message:X}`)}}async function v5($,X,Y){if($.apiKey)return $.apiKey;let J=await DW(X);if(J?.type==="oauth"){let W=new CW;if(W.needsRefresh(J.expires))try{let z=await W.exchangeRefreshToken({instanceUrl:X,refreshToken:J.refresh,clientId:Y}),G=n5(),V=JSON.parse(q2.readFileSync(G,"utf-8"));return V.gitlab={type:"oauth",refresh:z.refreshToken,access:z.accessToken,expires:z.expiresAt,enterpriseUrl:X},q2.writeFileSync(G,JSON.stringify(V,null,2),{mode:384}),z.accessToken}catch(z){let G=z instanceof Error?z.message:String(z),V=process.env[$.environmentVariableName];if(V)return V;throw new x({message:`OAuth token refresh failed and no fallback ${$.environmentVariableName} environment variable is set. Refresh error: ${G}. Re-authenticate with 'opencode auth login gitlab' or set ${$.environmentVariableName}.`})}else return J.access}let Q=process.env[$.environmentVariableName];if(!Q)throw new x({message:`${$.description} API key is missing. Pass it as the 'apiKey' parameter, set the ${$.environmentVariableName} environment variable, or authenticate with 'opencode auth login gitlab'.`});return Q}function RW($,X){let Y=$["User-Agent"];return{...$,"User-Agent":Y?`${Y} ${X}`:X}}function TW($={}){let X=$.instanceUrl??process.env.GITLAB_INSTANCE_URL??"https://gitlab.com",Y=$.name??"gitlab",J,Q,W=async()=>{if(J)return J;if(Q)return Q;return Q=v5({apiKey:$.apiKey,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId),J=await Q,Q=void 0,J},z=async()=>{J=void 0,Q=void 0,J=await v5({apiKey:void 0,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId)},G=()=>{let B=J||$.apiKey||process.env.GITLAB_TOKEN||"";if(!B)throw new x({message:"GitLab API key is missing. Pass it as the 'apiKey' parameter, set the GITLAB_TOKEN environment variable, or authenticate with 'opencode auth login gitlab'."});return RW({Authorization:`Bearer ${B}`,"Content-Type":"application/json",...$.headers},`ai-sdk-gitlab/${H7}`)};W().catch(()=>{});let V=(B,U)=>{let O=j5(B);if(!O)throw new x({message:`Unknown model ID: ${B}. Model must be registered in MODEL_MAPPINGS.`});if(U?.providerModel){let E=iQ(O.provider);if(!E.includes(U.providerModel))throw new x({message:`Invalid providerModel '${U.providerModel}' for provider '${O.provider}'. Valid models: ${E.join(", ")}`})}let P={DuoAgentPlatformNext:!0,...$.featureFlags,...U?.featureFlags},L={...{"User-Agent":`gitlab-ai-provider/${H7}`},...$.aiGatewayHeaders,...U?.aiGatewayHeaders},A={provider:`${Y}.agentic`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,maxTokens:U?.maxTokens,featureFlags:P,aiGatewayUrl:$.aiGatewayUrl,aiGatewayHeaders:L};if(O.provider==="openai")return new tQ(B,{...A,openaiModel:U?.providerModel??O.model});return new pQ(B,{...A,anthropicModel:U?.providerModel??O.model})},H=(B,U)=>{let O=j5(B);if(!O||O.provider!=="workflow")throw new x({message:`Unknown workflow model ID: ${B}. Use 'duo-workflow' or a 'duo-workflow-*' model ID.`});return new LW(B,{provider:`${Y}.workflow`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,featureFlags:{...$.featureFlags,...U?.featureFlags},aiGatewayUrl:$.aiGatewayUrl},U)},q=(B)=>{if(rQ(B))return H(B);return V(B)},w=Object.assign((B)=>q(B),{specificationVersion:"v3",languageModel:q,chat:q,agenticChat:V,workflowChat:H});return w.embeddingModel=(B)=>{throw new x({message:`GitLab provider does not support text embedding models. Model ID: ${B}`})},w.imageModel=(B)=>{throw new x({message:`GitLab provider does not support image models. Model ID: ${B}`})},w}var gE=TW(),_W="https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/raw/main/ai_gateway/model_selection/models.yml",PW=86400000,q7=200000,w7=64000;function U7(){let $=process.env.XDG_CACHE_HOME||m6.join(a5.homedir(),".cache");return m6.join($,"opencode","gitlab-model-configs.json")}function jW(){try{let $=U7();if(!d$.existsSync($))return null;let X=d$.readFileSync($,"utf-8");return JSON.parse(X)}catch{return null}}function kW($){try{let X=U7(),Y=m6.dirname(X);d$.mkdirSync(Y,{recursive:!0,mode:448});let J={configs:Object.fromEntries($),updatedAt:new Date().toISOString()};d$.writeFileSync(X,JSON.stringify(J,null,2),{mode:384})}catch{}}function y5($){let X=jW();if(!X)return null;let Y=new Date(X.updatedAt).getTime();if(Date.now()-Y>$)return null;return{configs:new Map(Object.entries(X.configs)),writtenAt:Y}}var xW=class{url;ttlMs;fetchFn;memCache=null;memExpiresAt=0;pending=null;constructor($){this.url=$?.url??_W,this.ttlMs=$?.ttlMs??PW,this.fetchFn=$?.fetch??fetch}async getConfigs(){if(this.memCache&&Date.now()<this.memExpiresAt)return this.memCache;let $=y5(this.ttlMs);if($)return this.memCache=$.configs,this.memExpiresAt=$.writtenAt+this.ttlMs,$.configs;if(this.pending)return this.pending;this.pending=this.fetchConfigs();try{return await this.pending}finally{this.pending=null}}async getConfig($){return(await this.getConfigs()).get($)??{context:q7,output:w7}}invalidateCache(){this.memCache=null,this.memExpiresAt=0;try{let $=U7();if(d$.existsSync($))d$.unlinkSync($)}catch{}}async fetchConfigs(){try{let $=await this.fetchFn(this.url);if(!$.ok)throw Error(`HTTP ${$.status}`);let X=await $.text(),Y=fW(X);return this.memCache=Y,this.memExpiresAt=Date.now()+this.ttlMs,kW(Y),Y}catch{return this.memCache??y5(1/0)?.configs??new Map}}};function fW($){let X=new Map,Y=null,J=0,Q=0,W=!1,z=-1;for(let G of $.split(`
|
|
102
|
-
`)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as
|
|
102
|
+
`)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as oi,lQ as pi,h5 as qi,pQ as ri,o$ as si,j5 as ti,jE as ui,iQ as vi,kE as wi,xE as xi,nQ as yi,aQ as zi,rQ as Ai,sQ as Bi,fE as Ci,tQ as Di,H7 as Ei,oQ as Fi,eQ as Gi,k5 as Hi,y6 as Ii,$W as Ji,K7 as Ki,U8 as Li,YW as Mi,JW as Ni,x5 as Oi,HW as Pi,BW as Qi,u5 as Ri,d5 as Si,p5 as Ti,LW as Ui,ZW as Vi,vE as Wi,SW as Xi,AW as Yi,yE as Zi,CW as _i,TW as $i,gE as aj,xW as bj,fW as cj,hE as dj};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as ZB,b as $B}from"./chunk-
|
|
3
|
-
`+B}async function d(B){let V=a({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),X=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],Y=(await V.session.create({permission:X})).data?.id;if(!Y){H.error("headless: failed to create session");return}let W=await V.event.subscribe(),$=YB({sessionID:Y,query:async()=>{return(await V.session.status()).data?.[Y]}}),A=W.stream[Symbol.asyncIterator](),P=$.completion.then(()=>"DONE");(async()=>{try{while(!0){let z=await Promise.race([A.next(),P]);if(z==="DONE")break;let y=z;if(y.done)break;let j=y.value;$.onEvent(j);let K=j.properties;if(j.type==="message.part.updated"){let J=K?.part;if(!J||J.sessionID!==Y)continue;if(J.type==="text"&&J.time?.end){let C=String(J.text??"").trim();if(C)process.stdout.write(C+M)}}if(j.type==="permission.asked"){if(!K||K.sessionID!==Y)continue;await V.permission.reply({requestID:String(K.id),reply:"once"})}if(j.type==="session.error"){if(!K||K.sessionID!==Y||!K.error)continue;let J=K.error,C=J?.data!==null&&typeof J?.data==="object"&&"message"in J.data?String(J.data.message):String(J?.name??J);H.error(C)}}}finally{$.stop(),await A.return?.(void 0).catch(()=>{})}})().catch((z)=>{console.error(z),process.exit(1)});let q=B.model?r.parseModel(B.model):void 0;await V.session.prompt({sessionID:Y,agent:B.agent,model:q,parts:[{type:"text",text:B.prompt}]}),$.markStarted(),await $.completion}var nB=e({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>n(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(i).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((V)=>{if(V.dark&&V.light)throw Error("--dark and --light are mutually exclusive");if(V.sso&&!V.headless)throw Error("--sso requires --headless");if(V.sso&&V["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let X=Object.keys(zB).filter((Z)=>V[Z]);if(X.length>1)throw Error(`${X.map((Z)=>`--${Z}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(X.length===1&&V.model)throw Error(`--${X[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let V=JB();try{BB();let X=XB(B);if(X){H.error(X),process.exitCode=1;return}let Z=jB(B)??B.model,Y=_(process.env.PWD??process.cwd()),W=B.project?_(E.isAbsolute(B.project)?B.project:E.join(Y,B.project)):_(process.cwd()),$=O(W);if($){if(B.project){H.error("Cannot start in "+W+": "+$),process.exitCode=1;return}let J=_(MB.homedir());if(O(J)){H.error("Cannot start in "+W+": "+$),process.exitCode=1;return}x.warn("unsafe start directory, falling back to home",{requested:W,home:J}),W=J}let A=await bB();try{process.chdir(W)}catch{H.error("Failed to change directory to "+W);return}let P=_(process.cwd()),k=l({[c]:"worker",[f]:u()}),q=new Worker(A,{env:k});q.onerror=(J)=>{x.error("thread error",{message:J.message,filename:J.filename,lineno:J.lineno,colno:J.colno,error:J.error})};let z=g(q),y=()=>{z.call("reload",void 0).catch((J)=>{x.warn("worker reload failed",{error:N(J)})})};process.on("SIGUSR2",y);let j=!1,K=async()=>{if(j)return;j=!0,process.off("SIGUSR2",y),await o(z.call("shutdown",void 0),5000).catch((J)=>{x.warn("worker shutdown failed",{error:N(J)})}),q.terminate()};try{let J=import("./chunk-
|
|
2
|
+
import{a as ZB,b as $B}from"./chunk-zaks8cae.js";import"./chunk-zqqx96jx.js";import"./chunk-rvkrgkeq.js";import{B as XB}from"./chunk-gsez13bg.js";import{C as BB,E as JB}from"./chunk-c8k32724.js";import"./chunk-whe7h2mj.js";import{I as VB}from"./chunk-t9mz17gb.js";import{O as YB}from"./chunk-6p7yg5sr.js";import"./chunk-p62gb4wj.js";import"./chunk-x4sp99g6.js";import{Rd as e}from"./chunk-yajd975f.js";import{Of as n,Pf as D,Qf as w,Rf as i}from"./chunk-pv67gwce.js";import{Vf as H}from"./chunk-rbk8seme.js";import{Cg as s}from"./chunk-gz8sz7z1.js";import{gh as U}from"./chunk-caj1b9y7.js";import"./chunk-ygs5pzk7.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import{Xj as R,ok as o,rl as r}from"./chunk-257me4z3.js";import"./chunk-nkkch4h7.js";import{km as O}from"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import"./chunk-bn0h9dny.js";import"./chunk-hnvn2c25.js";import"./chunk-3nx7112w.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import{no as a,qo as t}from"./chunk-we9cv8we.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import{Tr as v}from"./chunk-764fksh3.js";import{Js as g,Us as x,vs as f,ws as c,xs as u,zs as l}from"./chunk-xj765svc.js";import{bt as N,pt as p,rt as _}from"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import{pH as S}from"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import{FO as I}from"./chunk-7xm75w1e.js";import E from"path";import{fileURLToPath as HB}from"url";import{writeHeapSnapshot as KB}from"v8";import MB,{EOL as M}from"os";var zB={free:"free",default:"default",fast:"fast",economy:"economical",power:"power",orchestrated:"orchestrated"},T="build";function h(B){if(B.agent)return B.agent;if(B.headless||B.fullauto)return T;return}function jB(B){for(let[V,X]of Object.entries(zB))if(B[V]){let Z=v[X];if(Z)return`${Z.providerID}/${Z.modelID}`}return}function GB(B){return async(X,Z)=>{let Y=new Request(X,Z),W=Y.body?await Y.text():void 0,$=await B.call("fetch",{url:Y.url,method:Y.method,headers:Object.fromEntries(Y.headers.entries()),body:W});return new Response($.body,{status:$.status,headers:$.headers})}}function QB(B){return{subscribe:async(V)=>{return B.on("global.event",(X)=>{V(X)})}}}async function bB(){if(typeof globalThis.QITQODE_WORKER_PATH<"u")return globalThis.QITQODE_WORKER_PATH;let B=new URL("./cli/cmd/tui/worker.js",import.meta.url);if(await p(HB(B)))return B;return new URL("./worker.ts",import.meta.url)}async function PB(B){let V=process.stdin.isTTY?void 0:await Bun.stdin.text();if(!B)return V;if(!V)return B;return V+`
|
|
3
|
+
`+B}async function d(B){let V=a({baseUrl:B.url,fetch:B.fetch,directory:B.directory}),X=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}],Y=(await V.session.create({permission:X})).data?.id;if(!Y){H.error("headless: failed to create session");return}let W=await V.event.subscribe(),$=YB({sessionID:Y,query:async()=>{return(await V.session.status()).data?.[Y]}}),A=W.stream[Symbol.asyncIterator](),P=$.completion.then(()=>"DONE");(async()=>{try{while(!0){let z=await Promise.race([A.next(),P]);if(z==="DONE")break;let y=z;if(y.done)break;let j=y.value;$.onEvent(j);let K=j.properties;if(j.type==="message.part.updated"){let J=K?.part;if(!J||J.sessionID!==Y)continue;if(J.type==="text"&&J.time?.end){let C=String(J.text??"").trim();if(C)process.stdout.write(C+M)}}if(j.type==="permission.asked"){if(!K||K.sessionID!==Y)continue;await V.permission.reply({requestID:String(K.id),reply:"once"})}if(j.type==="session.error"){if(!K||K.sessionID!==Y||!K.error)continue;let J=K.error,C=J?.data!==null&&typeof J?.data==="object"&&"message"in J.data?String(J.data.message):String(J?.name??J);H.error(C)}}}finally{$.stop(),await A.return?.(void 0).catch(()=>{})}})().catch((z)=>{console.error(z),process.exit(1)});let q=B.model?r.parseModel(B.model):void 0;await V.session.prompt({sessionID:Y,agent:B.agent,model:q,parts:[{type:"text",text:B.prompt}]}),$.markStarted(),await $.completion}var nB=e({command:"$0 [project]",describe:"start qitqode tui",builder:(B)=>n(B).positional("project",{type:"string",describe:"path to start qitqode in"}).options(i).option("never-ask",{type:"boolean",describe:"start in never-ask mode \u2014 auto-decide without asking (permissions excluded), toggle at runtime with /never-ask",default:!1}).check((V)=>{if(V.dark&&V.light)throw Error("--dark and --light are mutually exclusive");if(V.sso&&!V.headless)throw Error("--sso requires --headless");if(V.sso&&V["api-key"]!==void 0)throw Error("--sso and --api-key are mutually exclusive");let X=Object.keys(zB).filter((Z)=>V[Z]);if(X.length>1)throw Error(`${X.map((Z)=>`--${Z}`).join(" and ")} are mutually exclusive \u2014 choose one tier flag`);if(X.length===1&&V.model)throw Error(`--${X[0]} and --model are mutually exclusive \u2014 use one or the other`);return!0}),handler:async(B)=>{if(B.monochrome)process.env.QITQODE_TUI_ACCESSIBLE="1",process.env.NO_COLOR="1";let V=JB();try{BB();let X=XB(B);if(X){H.error(X),process.exitCode=1;return}let Z=jB(B)??B.model,Y=_(process.env.PWD??process.cwd()),W=B.project?_(E.isAbsolute(B.project)?B.project:E.join(Y,B.project)):_(process.cwd()),$=O(W);if($){if(B.project){H.error("Cannot start in "+W+": "+$),process.exitCode=1;return}let J=_(MB.homedir());if(O(J)){H.error("Cannot start in "+W+": "+$),process.exitCode=1;return}x.warn("unsafe start directory, falling back to home",{requested:W,home:J}),W=J}let A=await bB();try{process.chdir(W)}catch{H.error("Failed to change directory to "+W);return}let P=_(process.cwd()),k=l({[c]:"worker",[f]:u()}),q=new Worker(A,{env:k});q.onerror=(J)=>{x.error("thread error",{message:J.message,filename:J.filename,lineno:J.lineno,colno:J.colno,error:J.error})};let z=g(q),y=()=>{z.call("reload",void 0).catch((J)=>{x.warn("worker reload failed",{error:N(J)})})};process.on("SIGUSR2",y);let j=!1,K=async()=>{if(j)return;j=!0,process.off("SIGUSR2",y),await o(z.call("shutdown",void 0),5000).catch((J)=>{x.warn("worker shutdown failed",{error:N(J)})}),q.terminate()};try{let J=import("./chunk-d0damw6y.js"),C=import("./chunk-wr42tphe.js").then(({TuiConfig:F})=>F.get()),L=await PB(B.prompt),WB=await C;if(B.headless&&D(w(B))){H.error("--headless cannot be combined with network-listener flags (--port, --hostname, --mdns)"),process.exitCode=1;return}let m=w(B),b=D(m)?{url:(await z.call("server",m)).url,fetch:void 0,events:void 0}:{url:"http://qitqode.internal",fetch:GB(z),events:QB(z)};if(setTimeout(()=>{z.call("checkUpgrade",{directory:P}).catch(()=>{})},1000).unref?.(),B.headless){if(!L){H.error("--headless requires a prompt: pass --prompt or pipe input via stdin"),process.exitCode=1;return}if(B.sso){try{let G=await s({tryOpen:!1,onCode:(Q)=>{if(process.stdout.write(M),process.stdout.write(" To sign in, open: "+Q.verificationUri+M),process.stdout.write(" and enter code: "+Q.userCode+M),Q.verificationUriComplete)process.stdout.write(M+" Or open this link directly:"+M+" "+Q.verificationUriComplete+M);process.stdout.write(M+" Waiting for approval... (ctrl+c to cancel)"+M)}});await U.runPromise(S.gen(function*(){yield*(yield*R.Service).set("forgewise",VB(G,{rotateRefreshToken:!0}))})),process.stdout.write(" Signed in as "+(G.name||G.email)+M)}catch(G){H.error("SSO sign-in failed: "+N(G)),process.exitCode=1;return}await d({url:b.url,fetch:b.fetch,prompt:L,model:Z,agent:h(B)??T,directory:P});return}let F=ZB(typeof B["api-key"]==="string"?String(B["api-key"]):"");if(F)await U.runPromise($B(F));else if(!await U.runPromise(S.gen(function*(){if(yield*S.promise(()=>t()))return!0;return!!(yield*(yield*R.Service).get("forgewise"))}))){H.error(`Not signed in. Use one of:
|
|
4
4
|
qode auth login (browser / device-code flow)
|
|
5
5
|
qode auth login --api-key (paste a Qortex API key)
|
|
6
6
|
--api-key <key> (inline for this run)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ed as b}from"./chunk-x25zkrz7.js";import{Rd as f}from"./chunk-yajd975f.js";import{gh as S}from"./chunk-caj1b9y7.js";import"./chunk-ygs5pzk7.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import{Cl as v}from"./chunk-257me4z3.js";import"./chunk-nkkch4h7.js";import{Vl as U,bm as R,lm as k}from"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import"./chunk-bn0h9dny.js";import"./chunk-hnvn2c25.js";import"./chunk-3nx7112w.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-we9cv8we.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-764fksh3.js";import{Hs as Z}from"./chunk-xj765svc.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import"./chunk-7xm75w1e.js";var i=f({command:"stats",describe:"show token usage and cost statistics",builder:(z)=>{return z.option("days",{describe:"show stats for the last N days (default: all time)",type:"number"}).option("tools",{describe:"number of tools to show (default: all)",type:"number"}).option("models",{describe:"show model statistics (default: hidden). Pass a number to show top N, otherwise shows all"}).option("project",{describe:"filter by project (default: all projects, empty string: current project)",type:"string"})},handler:async(z)=>{await b(process.cwd(),async()=>{let E=await y(z.days,z.project),_;if(z.models===!0)_=1/0;else if(typeof z.models==="number")_=z.models;u(E,z.tools,_)})}});async function w(){return k.project}async function p(){return R.use((E)=>E.select().from(U).all()).map((E)=>v.fromRow(E))}async function y(z,E){let _=await p(),L=86400000,J=(()=>{if(z===void 0)return 0;if(z===0){let V=new Date;return V.setHours(0,0,0,0),V.getTime()}return Date.now()-z*86400000})(),K=(()=>{if(z===void 0)return;if(z===0)return 1;return z})(),Y=J>0?_.filter((V)=>V.time.updated>=J):_;if(E!==void 0)if(E===""){let V=await w();Y=Y.filter((F)=>F.projectID===V.id)}else Y=Y.filter((V)=>V.projectID===E);let G={totalSessions:Y.length,totalMessages:0,totalCost:0,totalTokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}},toolUsage:{},modelUsage:{},dateRange:{earliest:Date.now(),latest:Date.now()},days:0,costPerDay:0,tokensPerSession:0,medianTokensPerSession:0};if(Y.length>1000)console.log(`Large dataset detected (${Y.length} sessions). This may take a while...`);if(Y.length===0)return G.days=K??0,G;let C=Date.now(),x=0,X=[],h=20;for(let V=0;V<Y.length;V+=h){let D=Y.slice(V,V+h).map(async(Q)=>{let W=await S.runPromise(v.Service.use((O)=>O.messages({sessionID:Q.id,agentID:"*"}))),N=0,H={input:0,output:0,reasoning:0,cache:{read:0,write:0}},j={},A={};for(let O of W){if(O.info.role==="assistant"){N+=O.info.cost||0;let B=`${O.info.providerID}/${O.info.modelID}`;if(!A[B])A[B]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};if(A[B].messages++,A[B].cost+=O.info.cost||0,O.info.tokens)H.input+=O.info.tokens.input||0,H.output+=O.info.tokens.output||0,H.reasoning+=O.info.tokens.reasoning||0,H.cache.read+=O.info.tokens.cache?.read||0,H.cache.write+=O.info.tokens.cache?.write||0,A[B].tokens.input+=O.info.tokens.input||0,A[B].tokens.output+=(O.info.tokens.output||0)+(O.info.tokens.reasoning||0),A[B].tokens.cache.read+=O.info.tokens.cache?.read||0,A[B].tokens.cache.write+=O.info.tokens.cache?.write||0}for(let B of O.parts)if(B.type==="tool"&&B.tool)j[B.tool]=(j[B.tool]||0)+1}return{messageCount:W.length,sessionCost:N,sessionTokens:H,sessionTotalTokens:H.input+H.output+H.reasoning+H.cache.read+H.cache.write,sessionToolUsage:j,sessionModelUsage:A,earliestTime:J>0?Q.time.updated:Q.time.created,latestTime:Q.time.updated}}),M=await Promise.all(D);for(let Q of M){C=Math.min(C,Q.earliestTime),x=Math.max(x,Q.latestTime),X.push(Q.sessionTotalTokens),G.totalMessages+=Q.messageCount,G.totalCost+=Q.sessionCost,G.totalTokens.input+=Q.sessionTokens.input,G.totalTokens.output+=Q.sessionTokens.output,G.totalTokens.reasoning+=Q.sessionTokens.reasoning,G.totalTokens.cache.read+=Q.sessionTokens.cache.read,G.totalTokens.cache.write+=Q.sessionTokens.cache.write;for(let[W,N]of Object.entries(Q.sessionToolUsage))G.toolUsage[W]=(G.toolUsage[W]||0)+N;for(let[W,N]of Object.entries(Q.sessionModelUsage)){if(!G.modelUsage[W])G.modelUsage[W]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};G.modelUsage[W].messages+=N.messages,G.modelUsage[W].tokens.input+=N.tokens.input,G.modelUsage[W].tokens.output+=N.tokens.output,G.modelUsage[W].tokens.cache.read+=N.tokens.cache.read,G.modelUsage[W].tokens.cache.write+=N.tokens.cache.write,G.modelUsage[W].cost+=N.cost}}}let $=Math.max(1,Math.ceil((x-C)/86400000)),q=K??$;G.dateRange={earliest:C,latest:x},G.days=q,G.costPerDay=G.totalCost/q;let I=G.totalTokens.input+G.totalTokens.output+G.totalTokens.reasoning+G.totalTokens.cache.read+G.totalTokens.cache.write;G.tokensPerSession=Y.length>0?I/Y.length:0,X.sort((V,F)=>V-F);let P=Math.floor(X.length/2);return G.medianTokensPerSession=X.length===0?0:X.length%2===0?(X[P-1]+X[P])/2:X[P],G}function u(z,E,_){function J(x,X){let $=55-x.length-X.length,q=Math.max(0,$);return`\u2502${x}${" ".repeat(q)}${X} \u2502`}console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 OVERVIEW \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(J("Sessions",z.totalSessions.toLocaleString())),console.log(J("Messages",z.totalMessages.toLocaleString())),console.log(J("Days",z.days.toString())),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 COST & TOKENS \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let K=isNaN(z.totalCost)?0:z.totalCost,Y=isNaN(z.costPerDay)?0:z.costPerDay,G=isNaN(z.tokensPerSession)?0:z.tokensPerSession;console.log(J("Total Cost",`$${K.toFixed(2)}`)),console.log(J("Avg Cost/Day",`$${Y.toFixed(2)}`)),console.log(J("Avg Tokens/Session",Z.number(Math.round(G))));let C=isNaN(z.medianTokensPerSession)?0:z.medianTokensPerSession;if(console.log(J("Median Tokens/Session",Z.number(Math.round(C)))),console.log(J("Input",Z.number(z.totalTokens.input))),console.log(J("Output",Z.number(z.totalTokens.output))),console.log(J("Cache Read",Z.number(z.totalTokens.cache.read))),console.log(J("Cache Write",Z.number(z.totalTokens.cache.write))),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),_!==void 0&&Object.keys(z.modelUsage).length>0){let x=Object.entries(z.modelUsage).sort(([,h],[,$])=>$.messages-h.messages),X=_===1/0?x:x.slice(0,_);console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 MODEL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let[h,$]of X)console.log(`\u2502 ${h.padEnd(54)} \u2502`),console.log(J(" Messages",$.messages.toLocaleString())),console.log(J(" Input Tokens",Z.number($.tokens.input))),console.log(J(" Output Tokens",Z.number($.tokens.output))),console.log(J(" Cache Read",Z.number($.tokens.cache.read))),console.log(J(" Cache Write",Z.number($.tokens.cache.write))),console.log(J(" Cost",`$${$.cost.toFixed(4)}`)),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");process.stdout.write("\x1B[1A"),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}if(console.log(),Object.keys(z.toolUsage).length>0){let x=Object.entries(z.toolUsage).sort(([,q],[,I])=>I-q),X=E?x.slice(0,E):x;console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 TOOL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let h=Math.max(...X.map(([,q])=>q)),$=Object.values(z.toolUsage).reduce((q,I)=>q+I,0);for(let[q,I]of X){let P=Math.max(1,Math.floor(I/h*20)),V="\u2588".repeat(P),F=(I/$*100).toFixed(1),D=18,W=` ${(q.length>18?q.substring(0,16)+"..":q).padEnd(18)} ${V.padEnd(20)} ${I.toString().padStart(3)} (${F.padStart(4)}%)`,N=Math.max(0,56-W.length-1);console.log(`\u2502${W}${" ".repeat(N)} \u2502`)}console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}console.log()}export{u as displayStats,y as aggregateSessionStats,i as StatsCommand};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ud as X}from"./chunk-
|
|
2
|
+
import{Ud as X}from"./chunk-kf167jw7.js";import{Vd as oe,Wd as re}from"./chunk-rg0mrprz.js";import{Xd as k,Yd as $}from"./chunk-0mx2psfc.js";import{Zd as we,_d as ie}from"./chunk-dnwefyhv.js";import{$d as ge}from"./chunk-js1n8tgv.js";import{he as H,ke as K}from"./chunk-e01wnqvc.js";import{le as M,me as Y,re as T}from"./chunk-p18axz0m.js";import{se as U}from"./chunk-tvdmnee6.js";import"./chunk-70ck4v3t.js";import{Ae as me,Be as ue}from"./chunk-ht5w06x7.js";import"./chunk-enpzvmtc.js";import{wf as y}from"./chunk-tq0239xp.js";import{BO as i,FO as g}from"./chunk-7xm75w1e.js";var d=i(y(),1);var be=(...e)=>{let o=-1,t=Object.assign(async(n)=>{let c=await te(...e)(n);if(!c.expiration&&o!==-1)c.expiration=new Date(Date.now()+o);return c},{expireAfter(n){if(n<300000)throw Error("@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.");return o=n,t}});return t},te=(...e)=>async(o)=>{if(e.length===0)throw new d.ProviderError("No providers in chain",{tryNextLink:!1});let r;for(let t of e)try{return await t(o)}catch(n){if(r=n,n?.tryNextLink)continue;throw n}throw r};var v=i(y(),1);function O(e){return Promise.all(Object.keys(e).reduce((o,r)=>{let t=e[r];if(typeof t==="string")o.push([r,t]);else o.push(t().then((n)=>[r,n]));return o},[])).then((o)=>o.reduce((r,[t,n])=>{return r[t]=n,r},{}))}function N(e){return async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let{GetCredentialsForIdentityCommand:r,CognitoIdentityClient:t}=await import("./chunk-ck2gfaba.js"),n=(u)=>e.clientConfig?.[u]??e.parentClientConfig?.[u]??o?.callerClientConfig?.[u],{Credentials:{AccessKeyId:c=ne(e.logger),Expiration:l,SecretKey:s=le(e.logger),SessionToken:a}=ce(e.logger)}=await(e.client??new t(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new r({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await O(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:c,secretAccessKey:s,sessionToken:a,expiration:l}}}function ne(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no access key ID",{logger:e})}function ce(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no credentials",{logger:e})}function le(e){throw new v.CredentialsProviderError("Response from Amazon Cognito contained no secret key",{logger:e})}var I=i(y(),1);class R{dbName;constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(o)=>{let r=o.get(e);return new Promise((t)=>{r.onerror=()=>t(null),r.onsuccess=()=>t(r.result?r.result.value:null)})}).catch(()=>null)}removeItem(e){return this.withObjectStore("readwrite",(o)=>{let r=o.delete(e);return new Promise((t,n)=>{r.onerror=()=>n(r.error),r.onsuccess=()=>t()})})}setItem(e,o){return this.withObjectStore("readwrite",(r)=>{let t=r.put({id:e,value:o});return new Promise((n,c)=>{t.onerror=()=>c(t.error),t.onsuccess=()=>n()})})}getDb(){let e=self.indexedDB.open(this.dbName,1);return new Promise((o,r)=>{e.onsuccess=()=>{o(e.result)},e.onerror=()=>{r(e.error)},e.onblocked=()=>{r(Error("Unable to access DB"))},e.onupgradeneeded=()=>{let t=e.result;t.onerror=()=>{r(Error("Failed to create object store"))},t.createObjectStore("IdentityIds",{keyPath:"id"})}})}withObjectStore(e,o){return this.getDb().then((r)=>{let t=r.transaction("IdentityIds",e);return t.oncomplete=()=>r.close(),new Promise((n,c)=>{t.onerror=()=>c(t.error),n(o(t.objectStore("IdentityIds")))}).catch((n)=>{throw r.close(),n})})}}class j{store;constructor(e={}){this.store=e}getItem(e){if(e in this.store)return this.store[e];return null}removeItem(e){delete this.store[e]}setItem(e,o){this.store[e]=o}}var ae=new j;function P(){if(typeof self==="object"&&self.indexedDB)return new R;if(typeof window==="object"&&window.localStorage)return window.localStorage;return ae}function D({accountId:e,cache:o=P(),client:r,clientConfig:t,customRoleArn:n,identityPoolId:c,logins:l,userIdentifier:s=!l||Object.keys(l).length===0?"ANONYMOUS":void 0,logger:a,parentClientConfig:u}){a?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");let S=s?`aws:cognito-identity-credentials:${c}:${s}`:void 0,f=async(C)=>{let{GetIdCommand:m,CognitoIdentityClient:b}=await import("./chunk-ck2gfaba.js"),h=(w)=>t?.[w]??u?.[w]??C?.callerClientConfig?.[w],p=r??new b(Object.assign({},t??{},{region:h("region"),profile:h("profile"),userAgentAppId:h("userAgentAppId")})),x=S&&await o.getItem(S);if(!x){let{IdentityId:w=se(a)}=await p.send(new m({AccountId:e,IdentityPoolId:c,Logins:l?await O(l):void 0}));if(x=w,S)Promise.resolve(o.setItem(S,x)).catch(()=>{})}return f=N({client:p,customRoleArn:n,logins:l,identityId:x}),f(C)};return(C)=>f(C).catch(async(m)=>{if(S)Promise.resolve(o.removeItem(S)).catch(()=>{});throw m})}function se(e){throw new I.CredentialsProviderError("Response from Amazon Cognito contained no identity ID",{logger:e})}var De=(e)=>N({...e});var Ke=(e)=>D({...e});var ze=(e)=>{return e?.logger?.debug("@smithy/credential-provider-imds","fromContainerMetadata"),H(e)};var Fe=(e)=>T(e);var Je=(e={})=>$({...e});var L=i(ue(),1);var Xe=(e)=>{return e?.logger?.debug("@smithy/credential-provider-imds","fromInstanceMetadata"),async()=>K(e)().then((o)=>L.setCredentialFeature(o,"CREDENTIALS_IMDS","0"))};var Ve=(e)=>k({...e});var A=i(y(),1);var E=i(y(),1),z="AWS_EC2_METADATA_DISABLED",G=async(e)=>{let{ENV_CMDS_FULL_URI:o,ENV_CMDS_RELATIVE_URI:r,fromContainerMetadata:t,fromInstanceMetadata:n}=await import("./chunk-8qswepp2.js");if(process.env[r]||process.env[o]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:c}=await import("./chunk-a7ym9f0v.js");return E.chain(c(e),t(e))}if(process.env[z]&&process.env[z]!=="false")return async()=>{throw new E.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:e.logger})};return e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),n(e)};function B(e,o){let r=fe(e),t,n,c,l,s=async(a)=>{if(a?.forceRefresh){if(!l)l=r(a).then((u)=>{c=u}).finally(()=>{l=void 0});return await l,c}if(c?.expiration){if(c?.expiration?.getTime()<Date.now())c=void 0}if(t)await t;else if(!c||o?.(c))if(c){if(!n)n=r(a).then((u)=>{c=u}).finally(()=>{n=void 0})}else return t=r(a).then((u)=>{c=u}).finally(()=>{t=void 0}),s(a);return c};return s}var fe=(e)=>async(o)=>{let r;for(let t of e)try{return await t(o)}catch(n){if(r=n,n?.tryNextLink)continue;throw n}throw r};var F=!1,J=(e={})=>B([async()=>{if(e.profile??process.env[A.ENV_PROFILE]){if(process.env[M]&&process.env[Y]){if(!F)(e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
3
3
|
Multiple credential sources detected:
|
|
4
4
|
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
5
5
|
This SDK will proceed with the AWS_PROFILE value.
|
|
@@ -7,4 +7,4 @@ import{Ud as X}from"./chunk-1rp1cvmc.js";import{Vd as oe,Wd as re}from"./chunk-0
|
|
|
7
7
|
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
8
8
|
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
9
9
|
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
10
|
-
`),F=!0}throw new A.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0})}return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),T(e)()},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:c,ssoSession:l}=e;if(!r&&!t&&!n&&!c&&!l)throw new A.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:s}=await import("./chunk-
|
|
10
|
+
`),F=!0}throw new A.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0})}return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),T(e)()},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:c,ssoSession:l}=e;if(!r&&!t&&!n&&!c&&!l)throw new A.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:s}=await import("./chunk-ht0hbdmx.js");return s(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await import("./chunk-yb79f79m.js");return r(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await import("./chunk-b4pphqab.js");return r(e)(o)},async(o)=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await import("./chunk-0qs1vx97.js");return r(e)(o)},async()=>{return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await G(e))()},async()=>{throw new A.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}],de);var de=(e)=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<300000;var Q=(e={})=>J({...e});var ur=(e)=>U(e);var mr=(e={})=>{return X({...e})};var _=i(we(),1),ee=i(ie(),1);var W=i(me(),1);var he="us-east-1",V=(e,o,r)=>{let t;return async(n={})=>{let{callerClientConfig:c}=n,l=e.clientConfig?.profile??c?.profile,s=e.logger??c?.logger;s?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");let a={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(a?.SerialNumber){if(!e.mfaCodeProvider)throw new d.CredentialsProviderError("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:s});a.TokenCode=await e.mfaCodeProvider(a?.SerialNumber)}let{AssumeRoleCommand:u,STSClient:S}=await import("./chunk-gt31468k.js");if(!t){let C=typeof o==="function"?o():void 0,m=[e.masterCredentials,e.clientConfig?.credentials,void c?.credentials,c?.credentialDefaultProvider?.(),C],b="STS client default credentials";if(m[0])b="options.masterCredentials";else if(m[1])b="options.clientConfig.credentials";else if(m[2])throw b="caller client's credentials",Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");else if(m[3])b="caller client's credentialDefaultProvider";else if(m[4])b="AWS SDK default credentials";let h=[e.clientConfig?.region,c?.region,await r?.({profile:l}),he],p="default partition's default region";if(h[0])p="options.clientConfig.region";else if(h[1])p="caller client's region";else if(h[2])p="file or env region";let x=[Z(e.clientConfig?.requestHandler),Z(c?.requestHandler)],w="STS default requestHandler";if(x[0])w="options.clientConfig.requestHandler";else if(x[1])w="caller client's requestHandler";s?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await W.normalizeProvider(q(h))()}, ${b}, ${w}.`),t=new S({userAgentAppId:c?.userAgentAppId,...e.clientConfig,credentials:q(m),logger:s,profile:l,region:q(h),requestHandler:q(x)})}if(e.clientPlugins)for(let C of e.clientPlugins)t.middlewareStack.use(C);let{Credentials:f}=await t.send(new u(a));if(!f||!f.AccessKeyId||!f.SecretAccessKey)throw new d.CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${a.RoleArn}`,{logger:s});return{accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.SessionToken,expiration:f.Expiration,credentialScope:f.CredentialScope}}},Z=(e)=>{return e?.metadata?.handlerProtocol==="h2"?void 0:e},q=(e)=>{for(let o of e)if(o!==void 0)return o};var Cr=(e)=>{return V(e,Q,async({profile:o=process.env.AWS_PROFILE})=>ee.loadConfig({environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>{return r.region},default:()=>{return}},{..._.NODE_REGION_CONFIG_FILE_OPTIONS,profile:o})())};var pr=(e={})=>re({...e});var Or=(e)=>oe({...e});export{te as propertyProviderChain,Or as fromWebToken,pr as fromTokenFile,Cr as fromTemporaryCredentials,mr as fromSSO,ur as fromProcess,Q as fromNodeProviderChain,Ve as fromLoginCredentials,Xe as fromInstanceMetadata,Je as fromIni,ge as fromHttp,Fe as fromEnv,ze as fromContainerMetadata,Ke as fromCognitoIdentityPool,De as fromCognitoIdentity,be as createCredentialChain};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-bzgj60w4.js";import"./chunk-aztre27e.js";var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":"Escreva a sua mensagem... (escreva / para comandos)","tui.prompt.placeholder.shell":'Execute um comando... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab para aceitar)","tui.home.placeholder.example.todo":"Corrigir um TODO no c\xF3digo","tui.home.placeholder.example.stack":"Qual \xE9 a stack tecnol\xF3gica deste projeto?","tui.home.placeholder.example.tests":"Corrigir testes falhados","tui.home.agreement.prefix":"Ao usar o QitQode, concorda com os nossos ","tui.home.agreement.terms":"Termos de Servi\xE7o","tui.home.agreement.separator":" e a ","tui.home.agreement.privacy":"Pol\xEDtica de Privacidade","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"anexar ficheiro","tui.prompt.hint.subagent":"subagente","tui.prompt.hint.commands":"comandos","tui.prompt.hint.switch_mode":"mudar modo","tui.prompt.hint.settings":"defini\xE7\xF5es","tui.tips.label":"Dica","tui.tips.plain_terminal":"Recomendamos usar o iTerm ou o terminal do VS Code","tui.tips.attach_file":"Escreva {highlight}@{/highlight} seguido do nome do ficheiro para pesquisar e anexar ficheiros","tui.tips.shell_prefix":"Inicie uma mensagem com {highlight}!{/highlight} para executar comandos de shell diretamente (ex.: {highlight}!ls -la{/highlight})","tui.tips.tab_agent":"Prima {highlight}Tab{/highlight} ou {highlight}Shift+Tab{/highlight} para alternar entre os agentes Build, Plan e Compose","tui.tips.theme_mode":"Execute {highlight}/dark{/highlight} para o modo escuro ou {highlight}/light{/highlight} para o modo claro","tui.tips.doc":"Execute {highlight}/doc{/highlight} para abrir a documenta\xE7\xE3o do utilizador","tui.tips.undo":"Use {highlight}/undo{/highlight} para reverter a \xFAltima mensagem e altera\xE7\xF5es em ficheiros","tui.tips.redo":"Use {highlight}/redo{/highlight} para restaurar mensagens e altera\xE7\xF5es desfeitas anteriormente","tui.tips.drag_drop":"Arraste e solte imagens ou PDFs no terminal para os adicionar como contexto","tui.tips.paste_image":"Prima {highlight}Ctrl+V{/highlight} para colar imagens da \xE1rea de transfer\xEAncia na entrada","tui.tips.editor":"Prima {highlight}Ctrl+X E{/highlight} ou {highlight}/editor{/highlight} para compor mensagens no seu editor externo","tui.tips.init":"Execute {highlight}/init{/highlight} para gerar automaticamente regras do projeto a partir do seu c\xF3digo","tui.tips.models":"Execute {highlight}/models{/highlight} ou {highlight}Ctrl+X M{/highlight} para alternar entre os modelos dispon\xEDveis","tui.tips.theme":'Trave o modo de tema contra o fundo do seu terminal \u2014 abra a paleta de comandos ({highlight}Ctrl+P{/highlight}) e busque "lock"',"tui.tips.new_session":"Prima {highlight}Ctrl+X N{/highlight} ou {highlight}/new{/highlight} para iniciar uma nova sess\xE3o","tui.tips.sessions":"Use {highlight}/sessions{/highlight} ou {highlight}Ctrl+X L{/highlight} para listar e continuar conversas anteriores","tui.tips.compact":"Execute {highlight}/compact{/highlight} para resumir sess\xF5es longas pr\xF3ximas dos limites de contexto","tui.tips.export":"Prima {highlight}Ctrl+X X{/highlight} ou {highlight}/export{/highlight} para guardar a conversa como Markdown","tui.tips.copy_last":"Prima {highlight}Ctrl+X Y{/highlight} para copiar a \xFAltima mensagem do assistente para a \xE1rea de transfer\xEAncia","tui.tips.command_palette":"Prima {highlight}Ctrl+P{/highlight} para ver todas as a\xE7\xF5es e comandos dispon\xEDveis","tui.tips.leader":"A tecla l\xEDder \xE9 {highlight}Ctrl+X{/highlight}; combine-a com outras teclas para a\xE7\xF5es r\xE1pidas","tui.tips.f2":"Prima {highlight}F2{/highlight} para alternar rapidamente entre os modelos usados recentemente","tui.tips.sidebar":"Prima {highlight}Ctrl+X B{/highlight} para mostrar/ocultar o painel lateral","tui.tips.history":"Use {highlight}PageUp{/highlight}/{highlight}PageDown{/highlight} para navegar no hist\xF3rico da conversa","tui.tips.jump_first":"Prima {highlight}Ctrl+G{/highlight} ou {highlight}Home{/highlight} para ir ao in\xEDcio da conversa","tui.tips.jump_last":"Prima {highlight}Ctrl+Alt+G{/highlight} ou {highlight}End{/highlight} para ir \xE0 mensagem mais recente","tui.tips.newline":"Prima {highlight}Shift+Enter{/highlight} ou {highlight}Ctrl+J{/highlight} para adicionar novas linhas na entrada","tui.tips.clear_input":"Prima {highlight}Ctrl+C{/highlight} ao escrever para limpar o campo de entrada","tui.tips.escape":"Prima {highlight}Escape{/highlight} para parar a resposta da IA a meio","tui.tips.plan_agent":"Mude para o agente {highlight}Plan{/highlight} para obter sugest\xF5es sem efetuar altera\xE7\xF5es reais","tui.tips.subagent":"Use {highlight}@agent-name{/highlight} nas entradas para invocar subagentes especializados","tui.tips.cycle_sessions":"Prima {highlight}Ctrl+X Right/Left{/highlight} para alternar entre sess\xF5es pai e filho","tui.tips.config_files":"Crie {highlight}qitqode.json{/highlight} para defini\xE7\xF5es do servidor e {highlight}tui.json{/highlight} para a TUI","tui.tips.global_config":"Coloque as defini\xE7\xF5es da TUI em {highlight}~/.config/qitqode/tui.json{/highlight} para configura\xE7\xE3o global","tui.tips.schema":"Adicione {highlight}$schema{/highlight} \xE0 sua configura\xE7\xE3o para autocompletar no editor","tui.tips.default_model":"Configure {highlight}model{/highlight} na configura\xE7\xE3o para definir o seu modelo predefinido","tui.tips.keybinds":"Substitua qualquer atalho em {highlight}tui.json{/highlight} atrav\xE9s da sec\xE7\xE3o {highlight}keybinds{/highlight}","tui.tips.disable_keybind":"Defina qualquer atalho como {highlight}none{/highlight} para o desativar completamente","tui.tips.mcp_config":"Configure servidores MCP locais ou remotos na sec\xE7\xE3o de configura\xE7\xE3o {highlight}mcp{/highlight}","tui.tips.mcp_oauth":"O QitQode gere automaticamente o OAuth para servidores MCP remotos que requerem autentica\xE7\xE3o","tui.tips.custom_command":"Adicione ficheiros {highlight}.md{/highlight} a {highlight}.qitqode/command/{/highlight} para definir prompts personalizados reutiliz\xE1veis","tui.tips.command_args":"Use {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} em comandos personalizados para entrada din\xE2mica","tui.tips.command_backticks":"Use acentos graves em comandos para injetar sa\xEDda de shell (ex.: {highlight}`git status`{/highlight})","tui.tips.custom_agent":"Adicione ficheiros {highlight}.md{/highlight} a {highlight}.qitqode/agent/{/highlight} para personas de IA especializadas","tui.tips.agent_perms":"Configure permiss\xF5es por agente para as ferramentas {highlight}edit{/highlight}, {highlight}bash{/highlight} e {highlight}webfetch{/highlight}","tui.tips.bash_allow":'Use padr\xF5es como {highlight}"git *": "allow"{/highlight} para permiss\xF5es de bash mais granulares',"tui.tips.bash_deny":'Defina {highlight}"rm -rf *": "deny"{/highlight} para bloquear comandos destrutivos',"tui.tips.bash_ask":'Configure {highlight}"git push": "ask"{/highlight} para exigir aprova\xE7\xE3o antes de fazer push',"tui.tips.formatter":"O QitQode formata ficheiros automaticamente com prettier, gofmt, ruff e mais","tui.tips.disable_formatter":'Defina {highlight}"formatter": false{/highlight} na configura\xE7\xE3o para desativar toda a formata\xE7\xE3o autom\xE1tica',"tui.tips.custom_formatter":"Defina comandos de formata\xE7\xE3o personalizados com extens\xF5es de ficheiro na configura\xE7\xE3o","tui.tips.lsp":"O QitQode usa servidores LSP para an\xE1lise de c\xF3digo inteligente","tui.tips.custom_tool":"Crie ficheiros {highlight}.ts{/highlight} em {highlight}.qitqode/tools/{/highlight} para definir novas ferramentas LLM","tui.tips.tool_scripts":"As defini\xE7\xF5es de ferramentas podem invocar scripts escritos em Python, Go, etc.","tui.tips.plugins":"Adicione ficheiros {highlight}.ts{/highlight} a {highlight}.qitqode/plugin/{/highlight} para ganchos de eventos","tui.tips.plugin_notify":"Use plugins para enviar notifica\xE7\xF5es do sistema operativo quando as sess\xF5es terminam","tui.tips.plugin_protect":"Crie um plugin para impedir que o QitQode leia ficheiros sens\xEDveis","tui.tips.run":"Use {highlight}qitqode run{/highlight} para scripting n\xE3o interativo","tui.tips.continue":"Use {highlight}qitqode --continue{/highlight} para retomar a \xFAltima sess\xE3o","tui.tips.attach_cli":"Use {highlight}qitqode run -f file.ts{/highlight} para anexar ficheiros via CLI","tui.tips.format_json":"Use {highlight}--format json{/highlight} para sa\xEDda leg\xEDvel por m\xE1quina em scripts","tui.tips.auth_list":"Execute {highlight}qitqode auth status{/highlight} para ver seu status de login atual","tui.tips.agent_create":"Execute {highlight}qitqode agent create{/highlight} para cria\xE7\xE3o guiada de agentes","tui.tips.theme_system":'Use {highlight}"theme": "system"{/highlight} para corresponder \xE0s cores do seu terminal',"tui.tips.theme_files":"Crie ficheiros de tema JSON no diret\xF3rio {highlight}.qitqode/themes/{/highlight}","tui.tips.theme_variants":"Os temas suportam variantes escura/clara para ambos os modos","tui.tips.theme_ansi":"Referencie cores ANSI 0-255 em temas personalizados","tui.tips.env_var":"Use a sintaxe {highlight}{env:VAR_NAME}{/highlight} para referenciar vari\xE1veis de ambiente na configura\xE7\xE3o","tui.tips.file_var":"Use {highlight}{file:path}{/highlight} para incluir conte\xFAdo de ficheiros em valores de configura\xE7\xE3o","tui.tips.instructions":"Use {highlight}instructions{/highlight} na configura\xE7\xE3o para carregar ficheiros de regras adicionais","tui.tips.temperature":"Defina a {highlight}temperature{/highlight} do agente de 0.0 (focado) a 1.0 (criativo)","tui.tips.steps":"Configure {highlight}steps{/highlight} para limitar as itera\xE7\xF5es ag\xEAnticas por pedido","tui.tips.disable_tool":'Defina {highlight}"tools": {"bash": false}{/highlight} para desativar ferramentas espec\xEDficas',"tui.tips.disable_mcp_tools":'Defina {highlight}"mcp_*": false{/highlight} para desativar todas as ferramentas de um servidor MCP',"tui.tips.tool_override":"Substitua as defini\xE7\xF5es globais de ferramentas por configura\xE7\xE3o de agente","tui.tips.doom_loop":"A permiss\xE3o {highlight}doom_loop{/highlight} previne ciclos infinitos de chamadas a ferramentas","tui.tips.external_dir":"A permiss\xE3o {highlight}external_directory{/highlight} protege ficheiros fora do projeto","tui.tips.debug_config":"Execute {highlight}qitqode debug config{/highlight} para diagnosticar problemas de configura\xE7\xE3o","tui.tips.print_logs":"Use a op\xE7\xE3o {highlight}--print-logs{/highlight} para ver registos detalhados no stderr","tui.tips.timeline":"Prima {highlight}Ctrl+X G{/highlight} ou {highlight}/timeline{/highlight} para saltar para mensagens espec\xEDficas","tui.tips.toggle_code":"Prima {highlight}Ctrl+X H{/highlight} para alternar a visibilidade dos blocos de c\xF3digo nas mensagens","tui.tips.status":"Prima {highlight}Ctrl+X S{/highlight} ou {highlight}/status{/highlight} para ver informa\xE7\xF5es de estado do sistema","tui.tips.scroll_accel":"Ative {highlight}scroll_acceleration{/highlight} em {highlight}tui.json{/highlight} para deslocamento suave no estilo macOS","tui.tips.agents_md":"Fa\xE7a commit do ficheiro {highlight}AGENTS.md{/highlight} do seu projeto no Git para partilhar com a equipa","tui.tips.review":"Use {highlight}/review{/highlight} para rever altera\xE7\xF5es n\xE3o confirmadas, branches ou PRs","tui.tips.help":"Execute {highlight}/help{/highlight} ou {highlight}Ctrl+X H{/highlight} para mostrar o di\xE1logo de ajuda","tui.tips.rename":"Use {highlight}/rename{/highlight} para renomear a sess\xE3o atual","tui.tips.suspend.unix":"Prima {highlight}Ctrl+Z{/highlight} para suspender o terminal e regressar \xE0 sua shell","tui.tips.suspend.win":"Prima {highlight}Ctrl+Z{/highlight} para desfazer altera\xE7\xF5es na sua entrada","tui.command.palette.title":"Comandos","tui.command.palette.suggested":"Sugeridos","tui.command.category.session":"Sess\xE3o","tui.command.category.agent":"Agente","tui.command.category.provider":"Fornecedor","tui.command.category.system":"Sistema","tui.command.category.prompt":"Entrada","tui.command.category.internal":"Interno","tui.command.category.external":"Externo","tui.slash.init.description":"configura\xE7\xE3o guiada de AGENTS.md","tui.slash.review.description":"rever altera\xE7\xF5es [commit|branch|pr], por defeito n\xE3o confirmadas","tui.slash.dream.description":"consolidar manualmente a mem\xF3ria do projeto a partir de ficheiros de mem\xF3ria e trajet\xF3ria bruta","tui.slash.distill.description":"encontrar fluxos repetidos no trabalho recente e empacot\xE1-los em skills, subagentes ou comandos","tui.slash.goal.description":"definir um objetivo com condi\xE7\xE3o de paragem; executa at\xE9 um juiz confirmar. /goal clear para abortar","tui.slash.deep-research.description":"relat\xF3rio de investiga\xE7\xE3o profunda multi-fonte e verificado (executa o workflow deep-research)","tui.command.language.switch.title":"Mudar idioma","tui.command.language.switch.description":"Alterar o idioma de apresenta\xE7\xE3o","tui.command.language.dialog.title":"Mudar idioma","tui.language.auto":"Auto (sistema)","tui.language.current":"Atual","tui.command.session.list.title":"Mudar sess\xE3o","tui.command.session.new.title":"Nova sess\xE3o","tui.command.workflow.list.title":"Fluxos de trabalho","tui.command.model.list.title":"Mudar modelo","tui.command.model.cycle_recent.title":"Ciclo de modelos","tui.command.model.cycle_recent_reverse.title":"Ciclo de modelos (inverso)","tui.command.model.cycle_favorite.title":"Ciclo de favoritos","tui.command.model.cycle_favorite_reverse.title":"Ciclo de favoritos (inverso)","tui.command.agent.list.title":"Mudar agente","tui.command.mcp.list.title":"Alternar MCPs","tui.command.never_ask.title_on":"Sem perguntas: ATIVO (decidir automaticamente, permiss\xF5es exclu\xEDdas) \u2014 clique para desativar","tui.command.never_ask.title_off":"Sem perguntas: INATIVO \u2014 clique para ativar (decidir automaticamente, permiss\xF5es exclu\xEDdas)","tui.command.never_ask.toast_on":"Sem perguntas ATIVO \u2014 n\xE3o lhe perguntarei; escolherei a melhor op\xE7\xE3o at\xE9 desativar (/never-ask). Os pedidos de permiss\xE3o ainda requerem a sua aprova\xE7\xE3o.","tui.command.never_ask.toast_off":"Sem perguntas INATIVO \u2014 voltarei a perguntar nos pontos de decis\xE3o.","tui.command.never_ask.title_on_fullauto":"Sem perguntas: ATIVO (decidir automaticamente; o modo full-auto tamb\xE9m aprova as permiss\xF5es) \u2014 clique para desativar","tui.command.never_ask.title_off_fullauto":"Sem perguntas: INATIVO \u2014 clique para ativar (decidir automaticamente; o modo full-auto continua a aprovar as permiss\xF5es)","tui.command.never_ask.toast_on_fullauto":"Sem perguntas ATIVO \u2014 n\xE3o lhe perguntarei; escolherei a melhor op\xE7\xE3o at\xE9 desativar (/never-ask). O modo full-auto est\xE1 ligado, por isso os pedidos de permiss\xE3o tamb\xE9m s\xE3o aprovados automaticamente.","tui.command.agent.cycle.title":"Ciclo de agentes","tui.command.variant.cycle.title":"Ciclo de variantes","tui.command.variant.list.title":"Mudar variante de modelo","tui.command.agent.cycle.reverse.title":"Ciclo de agentes (inverso)","tui.command.provider.login.title":"Iniciar sess\xE3o","tui.command.provider.logout.title":"Terminar sess\xE3o","tui.command.console.org.switch.title":"Mudar organiza\xE7\xE3o","tui.command.qitqode.status.title":"Ver estado","tui.command.worktree.list.title":"\xC1rvores de trabalho","tui.command.theme.switch.title":"Mudar tema","tui.command.theme.switch_mode.to_light":"Mudar para modo claro","tui.command.theme.switch_mode.to_dark":"Mudar para modo escuro","tui.command.theme.mode.unlock":"Desbloquear modo do tema","tui.command.theme.mode.lock":"Bloquear modo do tema","tui.command.help.show.title":"Ajuda","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Acessibilidade: alterne anima\xE7\xF5es e som na lista de comandos. Vari\xE1veis de ambiente: NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"An\xFAncios: no modo acess\xEDvel, escolha o n\xEDvel de detalhe dos an\xFAncios para leitores de tela (silencioso, normal, detalhado) na lista de comandos ou com QITQODE_TUI_ANNOUNCEMENTS. Erros s\xE3o sempre anunciados.","tui.dialog.help.dialog_keys":"Di\xE1logos: todos os di\xE1logos funcionam apenas com o teclado \u2014 Esc fecha, Tab ou as setas movem o foco, Enter ou Espa\xE7o ativa o controle em foco.","tui.command.app.announcements.cycle":"An\xFAncios: {{level}} (selecione para alterar)","tui.announcements.level.quiet":"silencioso","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"detalhado","tui.app.terminal_too_small":"Terminal muito pequeno ({{width}}x{{height}}). Redimensione para pelo menos 40x8.","tui.dialog.help.command_list":"Prima {{keybind}} para ver todas as a\xE7\xF5es e comandos dispon\xEDveis em qualquer contexto.","tui.dialog.help.ok":"ok","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 rolar \xB7 PgUp/PgDn p\xE1gina \xB7 esc fechar","tui.dialog.ok":"ok","tui.dialog.confirm.cancel":"Cancelar","tui.dialog.confirm.confirm":"Confirmar","tui.dialog.agreement.title":"Termos e Privacidade","tui.dialog.agreement.message":"Por favor reveja e aceite para continuar.","tui.dialog.agreement.confirm":"Aceitar e Continuar","tui.command.docs.terms.title":"Ver os termos de servi\xE7o","tui.command.docs.privacy.title":"Ver a pol\xEDtica de privacidade","tui.command.consent.revoke.title":"Revogar o acordo de modelo gratuito","tui.consent.revoked":"Acordo de modelo gratuito revogado \u2014 ser-lhe-\xE1 pedido que aceite novamente","tui.dialog.select.placeholder":"Pesquisar","tui.dialog.select.no_results":"Sem resultados","tui.dialog.prompt.placeholder":"Introduza texto","tui.dialog.prompt.busy":"A trabalhar...","tui.dialog.prompt.processing":"a processar...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"enviar","tui.dialog.export.title":"Op\xE7\xF5es de Exporta\xE7\xE3o","tui.dialog.export.filename":"Nome do ficheiro:","tui.dialog.export.filename_placeholder":"Introduza o nome do ficheiro","tui.dialog.export.include_thinking":"Incluir racioc\xEDnio","tui.dialog.export.include_tool_details":"Incluir detalhes das ferramentas","tui.dialog.export.include_assistant_metadata":"Incluir metadados do assistente","tui.dialog.export.open_without_saving":"Abrir sem guardar","tui.dialog.export.hint.toggle_prefix":"Prima","tui.dialog.export.hint.toggle_action":"para alternar","tui.dialog.export.hint.confirm_action":"para confirmar","tui.dialog.export.hint.options_action":"para op\xE7\xF5es","tui.toast.copied_to_clipboard":"Copiado para a \xE1rea de transfer\xEAncia","tui.toast.instructions_loaded":"Carregado {{files}}","tui.toast.update_available.title":"Atualiza\xE7\xE3o Dispon\xEDvel","tui.toast.update_available.confirm":"Uma nova vers\xE3o v{{version}} est\xE1 dispon\xEDvel. Deseja atualizar agora?","tui.toast.update_available.updating":"A atualizar para v{{version}}...","tui.toast.update_available.failed":"A atualiza\xE7\xE3o falhou","tui.toast.update_available.success":"Atualizado com sucesso para QitQode v{{version}}. Por favor reinicie a aplica\xE7\xE3o.","tui.toast.updated.title":"Atualizado automaticamente","tui.toast.updated.message":"Atualiza\xE7\xE3o de patch aplicada: v{{version}}. Reinicie para usar a nova vers\xE3o. Desative com autoupdate: false na configura\xE7\xE3o.","tui.sidebar.instructions":"Instru\xE7\xF5es","tui.sidebar.cwd":"Diret\xF3rio de Trabalho","tui.toast.unknown_error":"Ocorreu um erro desconhecido","tui.command.docs.open.title":"Abrir documenta\xE7\xE3o","tui.command.app.exit.title":"Sair da aplica\xE7\xE3o","tui.command.app.debug.title":"Alternar painel de depura\xE7\xE3o","tui.command.app.console.title":"Alternar consola","tui.command.app.heap_snapshot.title":"Escrever snapshot do heap","tui.command.terminal.suspend.title":"Suspender terminal","tui.command.terminal.title.disable":"Desativar t\xEDtulo do terminal","tui.command.terminal.title.enable":"Ativar t\xEDtulo do terminal","tui.command.app.toggle.animations.disable":"Desativar anima\xE7\xF5es","tui.command.app.toggle.animations.enable":"Ativar anima\xE7\xF5es","tui.command.app.toggle.diffwrap.disable":"Desativar quebra de diff","tui.command.app.toggle.diffwrap.enable":"Ativar quebra de diff","tui.command.app.toggle.sound.disable":"Desativar som","tui.command.app.toggle.sound.enable":"Ativar som","tui.command.logout.toast":"Sess\xE3o terminada","tui.command.session.share.title":"Partilhar sess\xE3o","tui.command.session.share.copy_link":"Copiar liga\xE7\xE3o de partilha","tui.command.session.rename.title":"Renomear sess\xE3o","tui.command.session.timeline.title":"Saltar para mensagem","tui.command.session.fork.title":"Bifurcar sess\xE3o","tui.command.session.compact.title":"Compactar sess\xE3o","tui.command.session.unshare.title":"Deixar de partilhar","tui.command.session.undo.title":"Desfazer mensagem anterior","tui.command.session.redo.title":"Refazer","tui.command.session.sidebar.show":"Mostrar painel lateral","tui.command.session.sidebar.hide":"Ocultar painel lateral","tui.command.session.conceal.disable":"Desativar oculta\xE7\xE3o de c\xF3digo","tui.command.session.conceal.enable":"Ativar oculta\xE7\xE3o de c\xF3digo","tui.command.session.timestamps.show":"Mostrar marcas temporais","tui.command.session.timestamps.hide":"Ocultar marcas temporais","tui.command.session.thinking.expand":"Expandir racioc\xEDnio","tui.command.session.thinking.collapse":"Recolher racioc\xEDnio","tui.command.session.tool_details.show":"Mostrar detalhes das ferramentas","tui.command.session.tool_details.hide":"Ocultar detalhes das ferramentas","tui.command.session.scrollbar.toggle":"Alternar barra de deslocamento da sess\xE3o","tui.command.session.generic_tool_output.show":"Mostrar sa\xEDda de ferramenta gen\xE9rica","tui.command.session.generic_tool_output.hide":"Ocultar sa\xEDda de ferramenta gen\xE9rica","tui.command.session.page_up.title":"P\xE1gina acima","tui.command.session.page_down.title":"P\xE1gina abaixo","tui.command.session.line_up.title":"Linha acima","tui.command.session.line_down.title":"Linha abaixo","tui.command.session.half_page_up.title":"Meia p\xE1gina acima","tui.command.session.half_page_down.title":"Meia p\xE1gina abaixo","tui.command.session.first.title":"Primeira mensagem","tui.command.session.last.title":"\xDAltima mensagem","tui.command.session.last_user.title":"Saltar para \xFAltima mensagem do utilizador","tui.command.session.message_next.title":"Mensagem seguinte","tui.command.session.message_previous.title":"Mensagem anterior","tui.command.messages.copy.title":"Copiar \xFAltima mensagem do assistente","tui.command.session.copy.title":"Copiar transcri\xE7\xE3o da sess\xE3o","tui.command.session.export.title":"Exportar transcri\xE7\xE3o da sess\xE3o","tui.command.session.child_first.title":"Ir para sess\xE3o filho","tui.command.session.parent.title":"Ir para sess\xE3o pai","tui.command.session.child_next.title":"Pr\xF3xima sess\xE3o filho","tui.command.session.child_previous.title":"Sess\xE3o filho anterior","tui.command.prompt.clear.title":"Limpar entrada","tui.command.prompt.submit.title":"Enviar prompt","tui.command.prompt.paste.title":"Colar","tui.command.session.interrupt.title":"Interromper sess\xE3o","tui.command.prompt.editor.title":"Abrir editor","tui.command.prompt.skills.title":"Skills","tui.command.voice.toggle.title":"Alternar entrada de voz","tui.command.voice.toggle.title_on":"Entrada de voz: ATIVA \u2014 clique para desativar","tui.command.voice.toggle.title_off":"Entrada de voz: INATIVA \u2014 clique para ativar","tui.command.voice.send.title":"Alternar envio por voz","tui.command.voice.send.title_on":"Envio por voz: ATIVO \u2014 clique para desativar","tui.command.voice.send.title_off":"Envio por voz: INATIVO \u2014 clique para ativar","tui.voice.enabled":"Entrada de voz ativa (Chin\xEAs/Ingl\xEAs) \u2014 clique em [Voice] para gravar","tui.voice.disabled":"Entrada de voz desativada","tui.voice.send.enabled":'Envio por voz ativo \u2014 ap\xF3s uma pausa, diga claramente "send it" para enviar',"tui.voice.send.disabled":"Envio por voz desativado","tui.voice.control.enabled":"Controlo por voz ativo \u2014 usa modelo multimodal para edi\xE7\xE3o inteligente (mais lento)","tui.voice.control.disabled":"Controlo por voz inativo \u2014 usa transcri\xE7\xE3o ASR r\xE1pida","tui.command.voice.control.title":"Alternar controlo por voz (multimodal)","tui.command.voice.control.title_on":"Controlo por voz: ATIVO (multimodal) \u2014 clique para desativar","tui.command.voice.control.title_off":"Controlo por voz: INATIVO (ASR r\xE1pido) \u2014 clique para ativar","tui.voice.error.no_auth":"Use /connect para iniciar sess\xE3o no QitQode, ou configure voice.asr_model para outro fornecedor","tui.voice.error.no_auth_provider":'O fornecedor de voz "{{provider}}" n\xE3o est\xE1 autenticado, verifique a sua apiKey',"tui.voice.error.provider_not_found":'Fornecedor "{{provider}}" n\xE3o dispon\xEDvel \u2014 /connect para autenticar, ou declare models na configura\xE7\xE3o para endpoints personalizados',"tui.voice.error.no_url":'O fornecedor "{{provider}}" n\xE3o tem baseURL configurada \u2014 defina options.baseURL na configura\xE7\xE3o do fornecedor',"tui.voice.error.no_device":"Nenhum microfone/dispositivo de \xE1udio encontrado \u2014 verifique as defini\xE7\xF5es de \xE1udio do sistema","tui.voice.error.recorder_failed":"A grava\xE7\xE3o falhou","tui.voice.error.no_recorder":"Nenhuma ferramenta de grava\xE7\xE3o encontrada, instale sox","tui.voice.error.too_short":"Grava\xE7\xE3o demasiado curta","tui.voice.error.network":"A transcri\xE7\xE3o falhou, verifique a sua rede","tui.voice.error.empty_send":"Nada para enviar","tui.voice.error.unknown_agent":'Agente "{{name}}" n\xE3o encontrado',"tui.command.prompt.stash.title":"Guardar prompt","tui.command.prompt.stash.pop.title":"Recuperar prompt","tui.command.prompt.stash.list.title":"Lista de prompts guardados","tui.command.tips.toggle.show":"Mostrar dicas","tui.command.tips.toggle.hide":"Ocultar dicas","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Instalar plugin","tui.dialog.login.title":"In\xEDcio de Sess\xE3o QitQode","cli.providers.select":"Selecionar fornecedor","cli.providers.other":"Outro fornecedor","tui.dialog.login.import_claude":"Importar do Claude Code","tui.dialog.login.other":"Outro Fornecedor","tui.dialog.login.import_claude.no_key":"Chave API do Claude Code n\xE3o encontrada","tui.dialog.login.import_claude.read_failed":"Falha ao ler ~/.claude/settings.json","tui.dialog.login.import_claude.success":"Importado do Claude Code","tui.question.plan_enter.question":"Deseja mudar para o modo plan para planeamento estruturado?","tui.question.plan_enter.header":"Entrar no plan","tui.question.plan_enter.option.0.label":"Sim","tui.question.plan_enter.option.0.description":"Mudar para o agente plan para planeamento s\xF3 de leitura","tui.question.plan_enter.option.1.label":"N\xE3o","tui.question.plan_enter.option.1.description":"Permanecer no modo atual","tui.question.plan_exit.question":"O plan em {{plan}} est\xE1 completo. Deseja mudar para o agente build e come\xE7ar a implementa\xE7\xE3o?","tui.question.plan_exit.header":"Sair do plan","tui.question.plan_exit.option.0.label":"Sim","tui.question.plan_exit.option.0.description":"Mudar para o agente build e come\xE7ar a implementa\xE7\xE3o do plan","tui.question.plan_exit.option.1.label":"N\xE3o","tui.question.plan_exit.option.1.description":"Permanecer com o agente plan para continuar a refinar","tui.session.badge.auto":"Auto","trust.title":"A aceder ao espa\xE7o de trabalho:","trust.safety_check":"Verifica\xE7\xE3o r\xE1pida de seguran\xE7a: Este \xE9 um projeto que criou ou em que confia? (Como o seu pr\xF3prio c\xF3digo, um projeto open source conhecido ou trabalho da sua equipa). Se n\xE3o, reserve um momento para rever o que est\xE1 nesta pasta.","trust.capabilities":"O QitQode poder\xE1 ler, editar e executar ficheiros aqui.","trust.plugin_warn":"Se existirem plugins maliciosos neste diret\xF3rio, podem executar c\xF3digo arbitr\xE1rio, ler, modificar ou exfiltrar os seus ficheiros.","trust.option.yes":"Sim, confio nesta pasta","trust.option.no":"N\xE3o, sair","trust.dangerous.title_home":"AVISO: Est\xE1 prestes a abrir o seu DIRET\xD3RIO PESSOAL.","trust.dangerous.title_root":"AVISO: Est\xE1 prestes a abrir a RAIZ DO SISTEMA DE FICHEIROS.","trust.dangerous.body_home":"O modelo ter\xE1 acesso a TODOS os seus ficheiros pessoais \u2014 chaves SSH, credenciais, perfis de navegador e tudo o resto sob a sua pasta pessoal.","trust.dangerous.body_root":"O modelo ter\xE1 acesso ao SISTEMA DE FICHEIROS INTEIRO \u2014 ficheiros do sistema, todos os dados de utilizador, credenciais e tudo nesta m\xE1quina.","trust.dangerous.advice_home":"A menos que tenha uma raz\xE3o muito espec\xEDfica, N\xC3O confie em todo o seu diret\xF3rio pessoal.","trust.dangerous.advice_root":"A menos que tenha uma raz\xE3o muito espec\xEDfica, N\xC3O confie na raiz do sistema de ficheiros.","trust.dangerous.option.yes":"Compreendo os riscos, confiar apenas nesta sess\xE3o","trust.dangerous.option.no":"Sair (recomendado)"};export{f as dict};
|
|
2
|
+
import"./chunk-bzgj60w4.js";import"./chunk-7xm75w1e.js";var f={"language.en":"English","language.zh":"\u7B80\u4F53\u4E2D\u6587","language.zht":"\u7E41\u9AD4\u4E2D\u6587","language.ko":"\uD55C\uAD6D\uC5B4","language.de":"Deutsch","language.es":"Espa\xF1ol","language.fr":"Fran\xE7ais","language.da":"Dansk","language.ja":"\u65E5\u672C\u8A9E","language.pl":"Polski","language.ru":"\u0420\u0443\u0441\u0441\u043A\u0438\u0439","language.ar":"\u0627\u0644\u0639\u0631\u0628\u064A\u0629","language.no":"Norsk","language.br":"Portugu\xEAs (Brasil)","language.pt":"Portugu\xEAs","language.bs":"Bosanski","language.th":"\u0E44\u0E17\u0E22","language.tr":"T\xFCrk\xE7e","tui.prompt.placeholder.normal":"Escreva a sua mensagem... (escreva / para comandos)","tui.prompt.placeholder.shell":'Execute um comando... "{{example}}"',"tui.prompt.ghost":"{{prediction}} (Tab para aceitar)","tui.home.placeholder.example.todo":"Corrigir um TODO no c\xF3digo","tui.home.placeholder.example.stack":"Qual \xE9 a stack tecnol\xF3gica deste projeto?","tui.home.placeholder.example.tests":"Corrigir testes falhados","tui.home.agreement.prefix":"Ao usar o QitQode, concorda com os nossos ","tui.home.agreement.terms":"Termos de Servi\xE7o","tui.home.agreement.separator":" e a ","tui.home.agreement.privacy":"Pol\xEDtica de Privacidade","tui.home.agreement.suffix":"","tui.prompt.hint.attach_file":"anexar ficheiro","tui.prompt.hint.subagent":"subagente","tui.prompt.hint.commands":"comandos","tui.prompt.hint.switch_mode":"mudar modo","tui.prompt.hint.settings":"defini\xE7\xF5es","tui.tips.label":"Dica","tui.tips.plain_terminal":"Recomendamos usar o iTerm ou o terminal do VS Code","tui.tips.attach_file":"Escreva {highlight}@{/highlight} seguido do nome do ficheiro para pesquisar e anexar ficheiros","tui.tips.shell_prefix":"Inicie uma mensagem com {highlight}!{/highlight} para executar comandos de shell diretamente (ex.: {highlight}!ls -la{/highlight})","tui.tips.tab_agent":"Prima {highlight}Tab{/highlight} ou {highlight}Shift+Tab{/highlight} para alternar entre os agentes Build, Plan e Compose","tui.tips.theme_mode":"Execute {highlight}/dark{/highlight} para o modo escuro ou {highlight}/light{/highlight} para o modo claro","tui.tips.doc":"Execute {highlight}/doc{/highlight} para abrir a documenta\xE7\xE3o do utilizador","tui.tips.undo":"Use {highlight}/undo{/highlight} para reverter a \xFAltima mensagem e altera\xE7\xF5es em ficheiros","tui.tips.redo":"Use {highlight}/redo{/highlight} para restaurar mensagens e altera\xE7\xF5es desfeitas anteriormente","tui.tips.drag_drop":"Arraste e solte imagens ou PDFs no terminal para os adicionar como contexto","tui.tips.paste_image":"Prima {highlight}Ctrl+V{/highlight} para colar imagens da \xE1rea de transfer\xEAncia na entrada","tui.tips.editor":"Prima {highlight}Ctrl+X E{/highlight} ou {highlight}/editor{/highlight} para compor mensagens no seu editor externo","tui.tips.init":"Execute {highlight}/init{/highlight} para gerar automaticamente regras do projeto a partir do seu c\xF3digo","tui.tips.models":"Execute {highlight}/models{/highlight} ou {highlight}Ctrl+X M{/highlight} para alternar entre os modelos dispon\xEDveis","tui.tips.theme":'Trave o modo de tema contra o fundo do seu terminal \u2014 abra a paleta de comandos ({highlight}Ctrl+P{/highlight}) e busque "lock"',"tui.tips.new_session":"Prima {highlight}Ctrl+X N{/highlight} ou {highlight}/new{/highlight} para iniciar uma nova sess\xE3o","tui.tips.sessions":"Use {highlight}/sessions{/highlight} ou {highlight}Ctrl+X L{/highlight} para listar e continuar conversas anteriores","tui.tips.compact":"Execute {highlight}/compact{/highlight} para resumir sess\xF5es longas pr\xF3ximas dos limites de contexto","tui.tips.export":"Prima {highlight}Ctrl+X X{/highlight} ou {highlight}/export{/highlight} para guardar a conversa como Markdown","tui.tips.copy_last":"Prima {highlight}Ctrl+X Y{/highlight} para copiar a \xFAltima mensagem do assistente para a \xE1rea de transfer\xEAncia","tui.tips.command_palette":"Prima {highlight}Ctrl+P{/highlight} para ver todas as a\xE7\xF5es e comandos dispon\xEDveis","tui.tips.leader":"A tecla l\xEDder \xE9 {highlight}Ctrl+X{/highlight}; combine-a com outras teclas para a\xE7\xF5es r\xE1pidas","tui.tips.f2":"Prima {highlight}F2{/highlight} para alternar rapidamente entre os modelos usados recentemente","tui.tips.sidebar":"Prima {highlight}Ctrl+X B{/highlight} para mostrar/ocultar o painel lateral","tui.tips.history":"Use {highlight}PageUp{/highlight}/{highlight}PageDown{/highlight} para navegar no hist\xF3rico da conversa","tui.tips.jump_first":"Prima {highlight}Ctrl+G{/highlight} ou {highlight}Home{/highlight} para ir ao in\xEDcio da conversa","tui.tips.jump_last":"Prima {highlight}Ctrl+Alt+G{/highlight} ou {highlight}End{/highlight} para ir \xE0 mensagem mais recente","tui.tips.newline":"Prima {highlight}Shift+Enter{/highlight} ou {highlight}Ctrl+J{/highlight} para adicionar novas linhas na entrada","tui.tips.clear_input":"Prima {highlight}Ctrl+C{/highlight} ao escrever para limpar o campo de entrada","tui.tips.escape":"Prima {highlight}Escape{/highlight} para parar a resposta da IA a meio","tui.tips.plan_agent":"Mude para o agente {highlight}Plan{/highlight} para obter sugest\xF5es sem efetuar altera\xE7\xF5es reais","tui.tips.subagent":"Use {highlight}@agent-name{/highlight} nas entradas para invocar subagentes especializados","tui.tips.cycle_sessions":"Prima {highlight}Ctrl+X Right/Left{/highlight} para alternar entre sess\xF5es pai e filho","tui.tips.config_files":"Crie {highlight}qitqode.json{/highlight} para defini\xE7\xF5es do servidor e {highlight}tui.json{/highlight} para a TUI","tui.tips.global_config":"Coloque as defini\xE7\xF5es da TUI em {highlight}~/.config/qitqode/tui.json{/highlight} para configura\xE7\xE3o global","tui.tips.schema":"Adicione {highlight}$schema{/highlight} \xE0 sua configura\xE7\xE3o para autocompletar no editor","tui.tips.default_model":"Configure {highlight}model{/highlight} na configura\xE7\xE3o para definir o seu modelo predefinido","tui.tips.keybinds":"Substitua qualquer atalho em {highlight}tui.json{/highlight} atrav\xE9s da sec\xE7\xE3o {highlight}keybinds{/highlight}","tui.tips.disable_keybind":"Defina qualquer atalho como {highlight}none{/highlight} para o desativar completamente","tui.tips.mcp_config":"Configure servidores MCP locais ou remotos na sec\xE7\xE3o de configura\xE7\xE3o {highlight}mcp{/highlight}","tui.tips.mcp_oauth":"O QitQode gere automaticamente o OAuth para servidores MCP remotos que requerem autentica\xE7\xE3o","tui.tips.custom_command":"Adicione ficheiros {highlight}.md{/highlight} a {highlight}.qitqode/command/{/highlight} para definir prompts personalizados reutiliz\xE1veis","tui.tips.command_args":"Use {highlight}$ARGUMENTS{/highlight}, {highlight}$1{/highlight}, {highlight}$2{/highlight} em comandos personalizados para entrada din\xE2mica","tui.tips.command_backticks":"Use acentos graves em comandos para injetar sa\xEDda de shell (ex.: {highlight}`git status`{/highlight})","tui.tips.custom_agent":"Adicione ficheiros {highlight}.md{/highlight} a {highlight}.qitqode/agent/{/highlight} para personas de IA especializadas","tui.tips.agent_perms":"Configure permiss\xF5es por agente para as ferramentas {highlight}edit{/highlight}, {highlight}bash{/highlight} e {highlight}webfetch{/highlight}","tui.tips.bash_allow":'Use padr\xF5es como {highlight}"git *": "allow"{/highlight} para permiss\xF5es de bash mais granulares',"tui.tips.bash_deny":'Defina {highlight}"rm -rf *": "deny"{/highlight} para bloquear comandos destrutivos',"tui.tips.bash_ask":'Configure {highlight}"git push": "ask"{/highlight} para exigir aprova\xE7\xE3o antes de fazer push',"tui.tips.formatter":"O QitQode formata ficheiros automaticamente com prettier, gofmt, ruff e mais","tui.tips.disable_formatter":'Defina {highlight}"formatter": false{/highlight} na configura\xE7\xE3o para desativar toda a formata\xE7\xE3o autom\xE1tica',"tui.tips.custom_formatter":"Defina comandos de formata\xE7\xE3o personalizados com extens\xF5es de ficheiro na configura\xE7\xE3o","tui.tips.lsp":"O QitQode usa servidores LSP para an\xE1lise de c\xF3digo inteligente","tui.tips.custom_tool":"Crie ficheiros {highlight}.ts{/highlight} em {highlight}.qitqode/tools/{/highlight} para definir novas ferramentas LLM","tui.tips.tool_scripts":"As defini\xE7\xF5es de ferramentas podem invocar scripts escritos em Python, Go, etc.","tui.tips.plugins":"Adicione ficheiros {highlight}.ts{/highlight} a {highlight}.qitqode/plugin/{/highlight} para ganchos de eventos","tui.tips.plugin_notify":"Use plugins para enviar notifica\xE7\xF5es do sistema operativo quando as sess\xF5es terminam","tui.tips.plugin_protect":"Crie um plugin para impedir que o QitQode leia ficheiros sens\xEDveis","tui.tips.run":"Use {highlight}qitqode run{/highlight} para scripting n\xE3o interativo","tui.tips.continue":"Use {highlight}qitqode --continue{/highlight} para retomar a \xFAltima sess\xE3o","tui.tips.attach_cli":"Use {highlight}qitqode run -f file.ts{/highlight} para anexar ficheiros via CLI","tui.tips.format_json":"Use {highlight}--format json{/highlight} para sa\xEDda leg\xEDvel por m\xE1quina em scripts","tui.tips.auth_list":"Execute {highlight}qitqode auth status{/highlight} para ver seu status de login atual","tui.tips.agent_create":"Execute {highlight}qitqode agent create{/highlight} para cria\xE7\xE3o guiada de agentes","tui.tips.theme_system":'Use {highlight}"theme": "system"{/highlight} para corresponder \xE0s cores do seu terminal',"tui.tips.theme_files":"Crie ficheiros de tema JSON no diret\xF3rio {highlight}.qitqode/themes/{/highlight}","tui.tips.theme_variants":"Os temas suportam variantes escura/clara para ambos os modos","tui.tips.theme_ansi":"Referencie cores ANSI 0-255 em temas personalizados","tui.tips.env_var":"Use a sintaxe {highlight}{env:VAR_NAME}{/highlight} para referenciar vari\xE1veis de ambiente na configura\xE7\xE3o","tui.tips.file_var":"Use {highlight}{file:path}{/highlight} para incluir conte\xFAdo de ficheiros em valores de configura\xE7\xE3o","tui.tips.instructions":"Use {highlight}instructions{/highlight} na configura\xE7\xE3o para carregar ficheiros de regras adicionais","tui.tips.temperature":"Defina a {highlight}temperature{/highlight} do agente de 0.0 (focado) a 1.0 (criativo)","tui.tips.steps":"Configure {highlight}steps{/highlight} para limitar as itera\xE7\xF5es ag\xEAnticas por pedido","tui.tips.disable_tool":'Defina {highlight}"tools": {"bash": false}{/highlight} para desativar ferramentas espec\xEDficas',"tui.tips.disable_mcp_tools":'Defina {highlight}"mcp_*": false{/highlight} para desativar todas as ferramentas de um servidor MCP',"tui.tips.tool_override":"Substitua as defini\xE7\xF5es globais de ferramentas por configura\xE7\xE3o de agente","tui.tips.doom_loop":"A permiss\xE3o {highlight}doom_loop{/highlight} previne ciclos infinitos de chamadas a ferramentas","tui.tips.external_dir":"A permiss\xE3o {highlight}external_directory{/highlight} protege ficheiros fora do projeto","tui.tips.debug_config":"Execute {highlight}qitqode debug config{/highlight} para diagnosticar problemas de configura\xE7\xE3o","tui.tips.print_logs":"Use a op\xE7\xE3o {highlight}--print-logs{/highlight} para ver registos detalhados no stderr","tui.tips.timeline":"Prima {highlight}Ctrl+X G{/highlight} ou {highlight}/timeline{/highlight} para saltar para mensagens espec\xEDficas","tui.tips.toggle_code":"Prima {highlight}Ctrl+X H{/highlight} para alternar a visibilidade dos blocos de c\xF3digo nas mensagens","tui.tips.status":"Prima {highlight}Ctrl+X S{/highlight} ou {highlight}/status{/highlight} para ver informa\xE7\xF5es de estado do sistema","tui.tips.scroll_accel":"Ative {highlight}scroll_acceleration{/highlight} em {highlight}tui.json{/highlight} para deslocamento suave no estilo macOS","tui.tips.agents_md":"Fa\xE7a commit do ficheiro {highlight}AGENTS.md{/highlight} do seu projeto no Git para partilhar com a equipa","tui.tips.review":"Use {highlight}/review{/highlight} para rever altera\xE7\xF5es n\xE3o confirmadas, branches ou PRs","tui.tips.help":"Execute {highlight}/help{/highlight} ou {highlight}Ctrl+X H{/highlight} para mostrar o di\xE1logo de ajuda","tui.tips.rename":"Use {highlight}/rename{/highlight} para renomear a sess\xE3o atual","tui.tips.suspend.unix":"Prima {highlight}Ctrl+Z{/highlight} para suspender o terminal e regressar \xE0 sua shell","tui.tips.suspend.win":"Prima {highlight}Ctrl+Z{/highlight} para desfazer altera\xE7\xF5es na sua entrada","tui.command.palette.title":"Comandos","tui.command.palette.suggested":"Sugeridos","tui.command.category.session":"Sess\xE3o","tui.command.category.agent":"Agente","tui.command.category.provider":"Fornecedor","tui.command.category.system":"Sistema","tui.command.category.prompt":"Entrada","tui.command.category.internal":"Interno","tui.command.category.external":"Externo","tui.slash.init.description":"configura\xE7\xE3o guiada de AGENTS.md","tui.slash.review.description":"rever altera\xE7\xF5es [commit|branch|pr], por defeito n\xE3o confirmadas","tui.slash.dream.description":"consolidar manualmente a mem\xF3ria do projeto a partir de ficheiros de mem\xF3ria e trajet\xF3ria bruta","tui.slash.distill.description":"encontrar fluxos repetidos no trabalho recente e empacot\xE1-los em skills, subagentes ou comandos","tui.slash.goal.description":"definir um objetivo com condi\xE7\xE3o de paragem; executa at\xE9 um juiz confirmar. /goal clear para abortar","tui.slash.deep-research.description":"relat\xF3rio de investiga\xE7\xE3o profunda multi-fonte e verificado (executa o workflow deep-research)","tui.command.language.switch.title":"Mudar idioma","tui.command.language.switch.description":"Alterar o idioma de apresenta\xE7\xE3o","tui.command.language.dialog.title":"Mudar idioma","tui.language.auto":"Auto (sistema)","tui.language.current":"Atual","tui.command.session.list.title":"Mudar sess\xE3o","tui.command.session.new.title":"Nova sess\xE3o","tui.command.workflow.list.title":"Fluxos de trabalho","tui.command.model.list.title":"Mudar modelo","tui.command.model.cycle_recent.title":"Ciclo de modelos","tui.command.model.cycle_recent_reverse.title":"Ciclo de modelos (inverso)","tui.command.model.cycle_favorite.title":"Ciclo de favoritos","tui.command.model.cycle_favorite_reverse.title":"Ciclo de favoritos (inverso)","tui.command.agent.list.title":"Mudar agente","tui.command.mcp.list.title":"Alternar MCPs","tui.command.never_ask.title_on":"Sem perguntas: ATIVO (decidir automaticamente, permiss\xF5es exclu\xEDdas) \u2014 clique para desativar","tui.command.never_ask.title_off":"Sem perguntas: INATIVO \u2014 clique para ativar (decidir automaticamente, permiss\xF5es exclu\xEDdas)","tui.command.never_ask.toast_on":"Sem perguntas ATIVO \u2014 n\xE3o lhe perguntarei; escolherei a melhor op\xE7\xE3o at\xE9 desativar (/never-ask). Os pedidos de permiss\xE3o ainda requerem a sua aprova\xE7\xE3o.","tui.command.never_ask.toast_off":"Sem perguntas INATIVO \u2014 voltarei a perguntar nos pontos de decis\xE3o.","tui.command.never_ask.title_on_fullauto":"Sem perguntas: ATIVO (decidir automaticamente; o modo full-auto tamb\xE9m aprova as permiss\xF5es) \u2014 clique para desativar","tui.command.never_ask.title_off_fullauto":"Sem perguntas: INATIVO \u2014 clique para ativar (decidir automaticamente; o modo full-auto continua a aprovar as permiss\xF5es)","tui.command.never_ask.toast_on_fullauto":"Sem perguntas ATIVO \u2014 n\xE3o lhe perguntarei; escolherei a melhor op\xE7\xE3o at\xE9 desativar (/never-ask). O modo full-auto est\xE1 ligado, por isso os pedidos de permiss\xE3o tamb\xE9m s\xE3o aprovados automaticamente.","tui.command.agent.cycle.title":"Ciclo de agentes","tui.command.variant.cycle.title":"Ciclo de variantes","tui.command.variant.list.title":"Mudar variante de modelo","tui.command.agent.cycle.reverse.title":"Ciclo de agentes (inverso)","tui.command.provider.login.title":"Iniciar sess\xE3o","tui.command.provider.logout.title":"Terminar sess\xE3o","tui.command.console.org.switch.title":"Mudar organiza\xE7\xE3o","tui.command.qitqode.status.title":"Ver estado","tui.command.worktree.list.title":"\xC1rvores de trabalho","tui.command.theme.switch.title":"Mudar tema","tui.command.theme.switch_mode.to_light":"Mudar para modo claro","tui.command.theme.switch_mode.to_dark":"Mudar para modo escuro","tui.command.theme.mode.unlock":"Desbloquear modo do tema","tui.command.theme.mode.lock":"Bloquear modo do tema","tui.command.help.show.title":"Ajuda","tui.dialog.help.close_hint":"esc/enter/space","tui.dialog.help.accessibility":"Acessibilidade: alterne anima\xE7\xF5es e som na lista de comandos. Vari\xE1veis de ambiente: NO_COLOR, QITQODE_TUI_ACCESSIBLE, QITQODE_REDUCE_MOTION, QITQODE_TUI_SOUND.","tui.dialog.help.announcements":"An\xFAncios: no modo acess\xEDvel, escolha o n\xEDvel de detalhe dos an\xFAncios para leitores de tela (silencioso, normal, detalhado) na lista de comandos ou com QITQODE_TUI_ANNOUNCEMENTS. Erros s\xE3o sempre anunciados.","tui.dialog.help.dialog_keys":"Di\xE1logos: todos os di\xE1logos funcionam apenas com o teclado \u2014 Esc fecha, Tab ou as setas movem o foco, Enter ou Espa\xE7o ativa o controle em foco.","tui.command.app.announcements.cycle":"An\xFAncios: {{level}} (selecione para alterar)","tui.announcements.level.quiet":"silencioso","tui.announcements.level.normal":"normal","tui.announcements.level.verbose":"detalhado","tui.app.terminal_too_small":"Terminal muito pequeno ({{width}}x{{height}}). Redimensione para pelo menos 40x8.","tui.dialog.help.command_list":"Prima {{keybind}} para ver todas as a\xE7\xF5es e comandos dispon\xEDveis em qualquer contexto.","tui.dialog.help.ok":"ok","tui.dialog.close_hint":"esc","tui.dialog.document.scroll_hint":"\u2191/\u2193 rolar \xB7 PgUp/PgDn p\xE1gina \xB7 esc fechar","tui.dialog.ok":"ok","tui.dialog.confirm.cancel":"Cancelar","tui.dialog.confirm.confirm":"Confirmar","tui.dialog.agreement.title":"Termos e Privacidade","tui.dialog.agreement.message":"Por favor reveja e aceite para continuar.","tui.dialog.agreement.confirm":"Aceitar e Continuar","tui.command.docs.terms.title":"Ver os termos de servi\xE7o","tui.command.docs.privacy.title":"Ver a pol\xEDtica de privacidade","tui.command.consent.revoke.title":"Revogar o acordo de modelo gratuito","tui.consent.revoked":"Acordo de modelo gratuito revogado \u2014 ser-lhe-\xE1 pedido que aceite novamente","tui.dialog.select.placeholder":"Pesquisar","tui.dialog.select.no_results":"Sem resultados","tui.dialog.prompt.placeholder":"Introduza texto","tui.dialog.prompt.busy":"A trabalhar...","tui.dialog.prompt.processing":"a processar...","tui.dialog.prompt.submit_key":"enter","tui.dialog.prompt.submit_action":"enviar","tui.dialog.export.title":"Op\xE7\xF5es de Exporta\xE7\xE3o","tui.dialog.export.filename":"Nome do ficheiro:","tui.dialog.export.filename_placeholder":"Introduza o nome do ficheiro","tui.dialog.export.include_thinking":"Incluir racioc\xEDnio","tui.dialog.export.include_tool_details":"Incluir detalhes das ferramentas","tui.dialog.export.include_assistant_metadata":"Incluir metadados do assistente","tui.dialog.export.open_without_saving":"Abrir sem guardar","tui.dialog.export.hint.toggle_prefix":"Prima","tui.dialog.export.hint.toggle_action":"para alternar","tui.dialog.export.hint.confirm_action":"para confirmar","tui.dialog.export.hint.options_action":"para op\xE7\xF5es","tui.toast.copied_to_clipboard":"Copiado para a \xE1rea de transfer\xEAncia","tui.toast.instructions_loaded":"Carregado {{files}}","tui.toast.update_available.title":"Atualiza\xE7\xE3o Dispon\xEDvel","tui.toast.update_available.confirm":"Uma nova vers\xE3o v{{version}} est\xE1 dispon\xEDvel. Deseja atualizar agora?","tui.toast.update_available.updating":"A atualizar para v{{version}}...","tui.toast.update_available.failed":"A atualiza\xE7\xE3o falhou","tui.toast.update_available.success":"Atualizado com sucesso para QitQode v{{version}}. Por favor reinicie a aplica\xE7\xE3o.","tui.toast.updated.title":"Atualizado automaticamente","tui.toast.updated.message":"Atualiza\xE7\xE3o de patch aplicada: v{{version}}. Reinicie para usar a nova vers\xE3o. Desative com autoupdate: false na configura\xE7\xE3o.","tui.sidebar.instructions":"Instru\xE7\xF5es","tui.sidebar.cwd":"Diret\xF3rio de Trabalho","tui.toast.unknown_error":"Ocorreu um erro desconhecido","tui.command.docs.open.title":"Abrir documenta\xE7\xE3o","tui.command.app.exit.title":"Sair da aplica\xE7\xE3o","tui.command.app.debug.title":"Alternar painel de depura\xE7\xE3o","tui.command.app.console.title":"Alternar consola","tui.command.app.heap_snapshot.title":"Escrever snapshot do heap","tui.command.terminal.suspend.title":"Suspender terminal","tui.command.terminal.title.disable":"Desativar t\xEDtulo do terminal","tui.command.terminal.title.enable":"Ativar t\xEDtulo do terminal","tui.command.app.toggle.animations.disable":"Desativar anima\xE7\xF5es","tui.command.app.toggle.animations.enable":"Ativar anima\xE7\xF5es","tui.command.app.toggle.diffwrap.disable":"Desativar quebra de diff","tui.command.app.toggle.diffwrap.enable":"Ativar quebra de diff","tui.command.app.toggle.sound.disable":"Desativar som","tui.command.app.toggle.sound.enable":"Ativar som","tui.command.logout.toast":"Sess\xE3o terminada","tui.command.session.share.title":"Partilhar sess\xE3o","tui.command.session.share.copy_link":"Copiar liga\xE7\xE3o de partilha","tui.command.session.rename.title":"Renomear sess\xE3o","tui.command.session.timeline.title":"Saltar para mensagem","tui.command.session.fork.title":"Bifurcar sess\xE3o","tui.command.session.compact.title":"Compactar sess\xE3o","tui.command.session.unshare.title":"Deixar de partilhar","tui.command.session.undo.title":"Desfazer mensagem anterior","tui.command.session.redo.title":"Refazer","tui.command.session.sidebar.show":"Mostrar painel lateral","tui.command.session.sidebar.hide":"Ocultar painel lateral","tui.command.session.conceal.disable":"Desativar oculta\xE7\xE3o de c\xF3digo","tui.command.session.conceal.enable":"Ativar oculta\xE7\xE3o de c\xF3digo","tui.command.session.timestamps.show":"Mostrar marcas temporais","tui.command.session.timestamps.hide":"Ocultar marcas temporais","tui.command.session.thinking.expand":"Expandir racioc\xEDnio","tui.command.session.thinking.collapse":"Recolher racioc\xEDnio","tui.command.session.tool_details.show":"Mostrar detalhes das ferramentas","tui.command.session.tool_details.hide":"Ocultar detalhes das ferramentas","tui.command.session.scrollbar.toggle":"Alternar barra de deslocamento da sess\xE3o","tui.command.session.generic_tool_output.show":"Mostrar sa\xEDda de ferramenta gen\xE9rica","tui.command.session.generic_tool_output.hide":"Ocultar sa\xEDda de ferramenta gen\xE9rica","tui.command.session.page_up.title":"P\xE1gina acima","tui.command.session.page_down.title":"P\xE1gina abaixo","tui.command.session.line_up.title":"Linha acima","tui.command.session.line_down.title":"Linha abaixo","tui.command.session.half_page_up.title":"Meia p\xE1gina acima","tui.command.session.half_page_down.title":"Meia p\xE1gina abaixo","tui.command.session.first.title":"Primeira mensagem","tui.command.session.last.title":"\xDAltima mensagem","tui.command.session.last_user.title":"Saltar para \xFAltima mensagem do utilizador","tui.command.session.message_next.title":"Mensagem seguinte","tui.command.session.message_previous.title":"Mensagem anterior","tui.command.messages.copy.title":"Copiar \xFAltima mensagem do assistente","tui.command.session.copy.title":"Copiar transcri\xE7\xE3o da sess\xE3o","tui.command.session.export.title":"Exportar transcri\xE7\xE3o da sess\xE3o","tui.command.session.child_first.title":"Ir para sess\xE3o filho","tui.command.session.parent.title":"Ir para sess\xE3o pai","tui.command.session.child_next.title":"Pr\xF3xima sess\xE3o filho","tui.command.session.child_previous.title":"Sess\xE3o filho anterior","tui.command.prompt.clear.title":"Limpar entrada","tui.command.prompt.submit.title":"Enviar prompt","tui.command.prompt.paste.title":"Colar","tui.command.session.interrupt.title":"Interromper sess\xE3o","tui.command.prompt.editor.title":"Abrir editor","tui.command.prompt.skills.title":"Skills","tui.command.voice.toggle.title":"Alternar entrada de voz","tui.command.voice.toggle.title_on":"Entrada de voz: ATIVA \u2014 clique para desativar","tui.command.voice.toggle.title_off":"Entrada de voz: INATIVA \u2014 clique para ativar","tui.command.voice.send.title":"Alternar envio por voz","tui.command.voice.send.title_on":"Envio por voz: ATIVO \u2014 clique para desativar","tui.command.voice.send.title_off":"Envio por voz: INATIVO \u2014 clique para ativar","tui.voice.enabled":"Entrada de voz ativa (Chin\xEAs/Ingl\xEAs) \u2014 clique em [Voice] para gravar","tui.voice.disabled":"Entrada de voz desativada","tui.voice.send.enabled":'Envio por voz ativo \u2014 ap\xF3s uma pausa, diga claramente "send it" para enviar',"tui.voice.send.disabled":"Envio por voz desativado","tui.voice.control.enabled":"Controlo por voz ativo \u2014 usa modelo multimodal para edi\xE7\xE3o inteligente (mais lento)","tui.voice.control.disabled":"Controlo por voz inativo \u2014 usa transcri\xE7\xE3o ASR r\xE1pida","tui.command.voice.control.title":"Alternar controlo por voz (multimodal)","tui.command.voice.control.title_on":"Controlo por voz: ATIVO (multimodal) \u2014 clique para desativar","tui.command.voice.control.title_off":"Controlo por voz: INATIVO (ASR r\xE1pido) \u2014 clique para ativar","tui.voice.error.no_auth":"Use /connect para iniciar sess\xE3o no QitQode, ou configure voice.asr_model para outro fornecedor","tui.voice.error.no_auth_provider":'O fornecedor de voz "{{provider}}" n\xE3o est\xE1 autenticado, verifique a sua apiKey',"tui.voice.error.provider_not_found":'Fornecedor "{{provider}}" n\xE3o dispon\xEDvel \u2014 /connect para autenticar, ou declare models na configura\xE7\xE3o para endpoints personalizados',"tui.voice.error.no_url":'O fornecedor "{{provider}}" n\xE3o tem baseURL configurada \u2014 defina options.baseURL na configura\xE7\xE3o do fornecedor',"tui.voice.error.no_device":"Nenhum microfone/dispositivo de \xE1udio encontrado \u2014 verifique as defini\xE7\xF5es de \xE1udio do sistema","tui.voice.error.recorder_failed":"A grava\xE7\xE3o falhou","tui.voice.error.no_recorder":"Nenhuma ferramenta de grava\xE7\xE3o encontrada, instale sox","tui.voice.error.too_short":"Grava\xE7\xE3o demasiado curta","tui.voice.error.network":"A transcri\xE7\xE3o falhou, verifique a sua rede","tui.voice.error.empty_send":"Nada para enviar","tui.voice.error.unknown_agent":'Agente "{{name}}" n\xE3o encontrado',"tui.command.prompt.stash.title":"Guardar prompt","tui.command.prompt.stash.pop.title":"Recuperar prompt","tui.command.prompt.stash.list.title":"Lista de prompts guardados","tui.command.tips.toggle.show":"Mostrar dicas","tui.command.tips.toggle.hide":"Ocultar dicas","tui.command.plugins.list.title":"Plugins","tui.command.plugins.install.title":"Instalar plugin","tui.dialog.login.title":"In\xEDcio de Sess\xE3o QitQode","cli.providers.select":"Selecionar fornecedor","cli.providers.other":"Outro fornecedor","tui.dialog.login.import_claude":"Importar do Claude Code","tui.dialog.login.other":"Outro Fornecedor","tui.dialog.login.import_claude.no_key":"Chave API do Claude Code n\xE3o encontrada","tui.dialog.login.import_claude.read_failed":"Falha ao ler ~/.claude/settings.json","tui.dialog.login.import_claude.success":"Importado do Claude Code","tui.question.plan_enter.question":"Deseja mudar para o modo plan para planeamento estruturado?","tui.question.plan_enter.header":"Entrar no plan","tui.question.plan_enter.option.0.label":"Sim","tui.question.plan_enter.option.0.description":"Mudar para o agente plan para planeamento s\xF3 de leitura","tui.question.plan_enter.option.1.label":"N\xE3o","tui.question.plan_enter.option.1.description":"Permanecer no modo atual","tui.question.plan_exit.question":"O plan em {{plan}} est\xE1 completo. Deseja mudar para o agente build e come\xE7ar a implementa\xE7\xE3o?","tui.question.plan_exit.header":"Sair do plan","tui.question.plan_exit.option.0.label":"Sim","tui.question.plan_exit.option.0.description":"Mudar para o agente build e come\xE7ar a implementa\xE7\xE3o do plan","tui.question.plan_exit.option.1.label":"N\xE3o","tui.question.plan_exit.option.1.description":"Permanecer com o agente plan para continuar a refinar","tui.session.badge.auto":"Auto","trust.title":"A aceder ao espa\xE7o de trabalho:","trust.safety_check":"Verifica\xE7\xE3o r\xE1pida de seguran\xE7a: Este \xE9 um projeto que criou ou em que confia? (Como o seu pr\xF3prio c\xF3digo, um projeto open source conhecido ou trabalho da sua equipa). Se n\xE3o, reserve um momento para rever o que est\xE1 nesta pasta.","trust.capabilities":"O QitQode poder\xE1 ler, editar e executar ficheiros aqui.","trust.plugin_warn":"Se existirem plugins maliciosos neste diret\xF3rio, podem executar c\xF3digo arbitr\xE1rio, ler, modificar ou exfiltrar os seus ficheiros.","trust.option.yes":"Sim, confio nesta pasta","trust.option.no":"N\xE3o, sair","trust.dangerous.title_home":"AVISO: Est\xE1 prestes a abrir o seu DIRET\xD3RIO PESSOAL.","trust.dangerous.title_root":"AVISO: Est\xE1 prestes a abrir a RAIZ DO SISTEMA DE FICHEIROS.","trust.dangerous.body_home":"O modelo ter\xE1 acesso a TODOS os seus ficheiros pessoais \u2014 chaves SSH, credenciais, perfis de navegador e tudo o resto sob a sua pasta pessoal.","trust.dangerous.body_root":"O modelo ter\xE1 acesso ao SISTEMA DE FICHEIROS INTEIRO \u2014 ficheiros do sistema, todos os dados de utilizador, credenciais e tudo nesta m\xE1quina.","trust.dangerous.advice_home":"A menos que tenha uma raz\xE3o muito espec\xEDfica, N\xC3O confie em todo o seu diret\xF3rio pessoal.","trust.dangerous.advice_root":"A menos que tenha uma raz\xE3o muito espec\xEDfica, N\xC3O confie na raiz do sistema de ficheiros.","trust.dangerous.option.yes":"Compreendo os riscos, confiar apenas nesta sess\xE3o","trust.dangerous.option.no":"Sair (recomendado)"};export{f as dict};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Id as q,Jd as K,Kd as D,Nd as L,Od as N}from"./chunk-p62gb4wj.js";import"./chunk-x4sp99g6.js";import{Vf as B}from"./chunk-rbk8seme.js";import{gh as G}from"./chunk-caj1b9y7.js";import"./chunk-ygs5pzk7.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import"./chunk-257me4z3.js";import{Fl as C}from"./chunk-nkkch4h7.js";import"./chunk-s3mnrhbx.js";import"./chunk-ezfy0b6q.js";import"./chunk-bn0h9dny.js";import"./chunk-hnvn2c25.js";import"./chunk-3nx7112w.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-we9cv8we.js";import"./chunk-2hc5z7b5.js";import"./chunk-9gazyynx.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-d9hbhkbq.js";import"./chunk-ad72gb5f.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-764fksh3.js";import{Vr as J}from"./chunk-xj765svc.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import"./chunk-7xm75w1e.js";var X={command:"upgrade [target]",describe:"upgrade qitqode to the latest or a specific version",builder:(z)=>{return z.positional("target",{describe:"version to upgrade to, for ex '0.1.48' or 'v0.1.48'",type:"string"}).option("method",{alias:"m",describe:"installation method to use",type:"string",choices:["curl","npm","pnpm","bun","brew","choco","scoop"]})},handler:async(z)=>{B.empty(),B.println(B.logo(" ")),B.empty(),K("Upgrade");let O=await G.runPromise(C.Service.use((j)=>j.method())),E=z.method??O;if(E==="unknown"){if(q.error(`qitqode is installed to ${process.execPath} and may be managed by a package manager`),!await N({message:"Install anyways?",options:[{label:"Yes",value:!0},{label:"No",value:!1}],initialValue:!1})){D("Done");return}}q.info("Using method: "+E);let F=z.target?z.target.replace(/^v/,""):await G.runPromise(C.Service.use((j)=>j.latest()));if(J===F){q.warn(`qitqode upgrade skipped: ${F} is already installed`),D("Done");return}q.info(`From ${J} \u2192 ${F}`);let H=L();H.start("Upgrading...");let x=await G.runPromise(C.Service.use((j)=>j.upgrade(E,F))).catch((j)=>j);if(x){if(H.stop("Upgrade failed",1),x instanceof C.UpgradeFailedError)if(E==="choco"&&x.stderr.includes("not running from an elevated command shell"))q.error("Please run the terminal as Administrator and try again");else q.error(x.stderr);else if(x instanceof Error)q.error(x.message);D("Done");return}H.stop("Upgrade complete"),D("Done")}};export{X as UpgradeCommand};
|