@rainhole/rain-code 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -0
- package/dist/chunk-06b2745w.js +3583 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-07069jq1.js +30 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0bs2528v.js +192 -0
- package/dist/chunk-0fj1d707.js +313 -0
- package/dist/chunk-0gdkvtx4.js +117 -0
- package/dist/chunk-0jd8rpt4.js +34257 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0pk0w4j1.js +332 -0
- package/dist/chunk-0rpb2bdp.js +8 -0
- package/dist/chunk-0rvwew67.js +9300 -0
- package/dist/chunk-0sa1g8jf.js +318 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0xgxxqhr.js +708 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-0zep39v0.js +81 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-12hn2mhy.js +17 -0
- package/dist/chunk-12rjry89.js +81 -0
- package/dist/chunk-168xb8v1.js +436 -0
- package/dist/chunk-1cwdhk7a.js +969 -0
- package/dist/chunk-1cx0fd76.js +132 -0
- package/dist/chunk-1erfksyp.js +107 -0
- package/dist/chunk-1h1tc4mw.js +126 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1jnbys9f.js +1811 -0
- package/dist/chunk-1k4fp6ft.js +389 -0
- package/dist/chunk-1mjn8xxc.js +22 -0
- package/dist/chunk-1mn6r4y2.js +747 -0
- package/dist/chunk-1p8myfza.js +1568 -0
- package/dist/chunk-1vthytca.js +79 -0
- package/dist/chunk-1y32rx73.js +145 -0
- package/dist/chunk-200781fd.js +64 -0
- package/dist/chunk-205mmm67.js +100 -0
- package/dist/chunk-209eh6ak.js +9381 -0
- package/dist/chunk-21mfpnva.js +85 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-24k6t9fa.js +151 -0
- package/dist/chunk-29gg6hx0.js +2992 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2ekjxh7d.js +289 -0
- package/dist/chunk-2eykm0j0.js +20 -0
- package/dist/chunk-2fwze72g.js +24 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2k995y2x.js +880 -0
- package/dist/chunk-2nayx6q1.js +63 -0
- package/dist/chunk-2pg9pmvc.js +182 -0
- package/dist/chunk-2qp2hc02.js +36 -0
- package/dist/chunk-2rj0dnps.js +436 -0
- package/dist/chunk-2t0xa4dt.js +145 -0
- package/dist/chunk-2ym6tnww.js +216 -0
- package/dist/chunk-30bpz5m2.js +34 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-36b2q5fg.js +1299 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3ewzhjyb.js +207 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3nk79af8.js +8 -0
- package/dist/chunk-3sfr7j85.js +884 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-3x52v1wb.js +660 -0
- package/dist/chunk-404qm8xt.js +1715 -0
- package/dist/chunk-42fjay4q.js +141 -0
- package/dist/chunk-48649h96.js +8590 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4anj5saq.js +111 -0
- package/dist/chunk-4asynmj4.js +259 -0
- package/dist/chunk-4ck9wve9.js +225 -0
- package/dist/chunk-4cp6193g.js +9076 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4geyher8.js +244 -0
- package/dist/chunk-4hv90qcz.js +8 -0
- package/dist/chunk-4jhr03e7.js +61 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4nspekjp.js +69 -0
- package/dist/chunk-4ptqcw4p.js +16 -0
- package/dist/chunk-4qj8cqbh.js +173 -0
- package/dist/chunk-4wxsg6a0.js +122 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-54dckh8a.js +1169 -0
- package/dist/chunk-54y13759.js +650 -0
- package/dist/chunk-54yf6e8d.js +91 -0
- package/dist/chunk-57qz90z8.js +154 -0
- package/dist/chunk-59k0mjnc.js +120 -0
- package/dist/chunk-59p9jye4.js +104 -0
- package/dist/chunk-5c753bd4.js +64 -0
- package/dist/chunk-5cw6zwep.js +106 -0
- package/dist/chunk-5eaf3j24.js +133 -0
- package/dist/chunk-5me7398b.js +81 -0
- package/dist/chunk-5pevjsyw.js +118 -0
- package/dist/chunk-5q3c2rf4.js +107 -0
- package/dist/chunk-5xwtnq4g.js +146 -0
- package/dist/chunk-5z28bqne.js +6748 -0
- package/dist/chunk-613f6fbv.js +63 -0
- package/dist/chunk-641hawvm.js +95 -0
- package/dist/chunk-64c1avct.js +13 -0
- package/dist/chunk-64hks9ax.js +456 -0
- package/dist/chunk-677as3nh.js +15 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6cs6mmez.js +112 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6e8vht4y.js +780 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6hkd32eh.js +83 -0
- package/dist/chunk-6jqxvef0.js +198 -0
- package/dist/chunk-6mh3vfa4.js +115 -0
- package/dist/chunk-6mpw9h55.js +1071 -0
- package/dist/chunk-6p4cyhb3.js +16 -0
- package/dist/chunk-6qvgnepd.js +26 -0
- package/dist/chunk-6r2bhsvt.js +6956 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-7316m01k.js +125 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-75zk7zr1.js +309 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-764ec4ja.js +173 -0
- package/dist/chunk-76vgnv24.js +108 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-7a7hxy3d.js +167 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7b6bg1r4.js +16128 -0
- package/dist/chunk-7ca4qskp.js +99 -0
- package/dist/chunk-7deph26x.js +311 -0
- package/dist/chunk-7ds8zqar.js +108 -0
- package/dist/chunk-7fqxw3d2.js +479 -0
- package/dist/chunk-7nysf9yd.js +266 -0
- package/dist/chunk-7tascxe2.js +90 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7xmw2tcz.js +277 -0
- package/dist/chunk-7xyswgjh.js +8 -0
- package/dist/chunk-7zkhadkb.js +220 -0
- package/dist/chunk-8225arm6.js +6374 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-85tag8nv.js +1391 -0
- package/dist/chunk-8bd8q5xw.js +359 -0
- package/dist/chunk-8bwqtasa.js +213 -0
- package/dist/chunk-8g5pe1gr.js +37 -0
- package/dist/chunk-8g747a8x.js +26 -0
- package/dist/chunk-8h6sdj66.js +447 -0
- package/dist/chunk-8mm8b6dd.js +19 -0
- package/dist/chunk-8ndwn6st.js +120 -0
- package/dist/chunk-8pn8tvgg.js +637 -0
- package/dist/chunk-8tnn9kcb.js +131 -0
- package/dist/chunk-8tnsngw2.js +31 -0
- package/dist/chunk-8x5w267y.js +112 -0
- package/dist/chunk-8y12jxg8.js +10 -0
- package/dist/chunk-8ymf4e6z.js +48 -0
- package/dist/chunk-90mt0m1w.js +102 -0
- package/dist/chunk-90wp6wez.js +10510 -0
- package/dist/chunk-91ew1d6f.js +2689 -0
- package/dist/chunk-97jsc1kn.js +231 -0
- package/dist/chunk-993pnm45.js +4521 -0
- package/dist/chunk-9a0rsdre.js +46 -0
- package/dist/chunk-9d7fmqkw.js +41 -0
- package/dist/chunk-9dgaq0g4.js +667 -0
- package/dist/chunk-9f52phb8.js +138 -0
- package/dist/chunk-9fbpqghc.js +105 -0
- package/dist/chunk-9hzxd5q3.js +122 -0
- package/dist/chunk-9kyrssch.js +28 -0
- package/dist/chunk-9q93n4w6.js +308 -0
- package/dist/chunk-9s0xs06y.js +581 -0
- package/dist/chunk-9x5zgy22.js +12 -0
- package/dist/chunk-9zdcb9jy.js +105 -0
- package/dist/chunk-a136cvvz.js +27 -0
- package/dist/chunk-a4psxnr1.js +224 -0
- package/dist/chunk-a4twdmhf.js +45 -0
- package/dist/chunk-a7rhvq9b.js +106 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-aawg48hh.js +4102 -0
- package/dist/chunk-ad2f3890.js +65 -0
- package/dist/chunk-ae7ar1jk.js +105 -0
- package/dist/chunk-ak3hdbe4.js +234 -0
- package/dist/chunk-as4e9g8f.js +298 -0
- package/dist/chunk-ase86y73.js +15 -0
- package/dist/chunk-awb4vc41.js +69 -0
- package/dist/chunk-b4bep0aq.js +5041 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b81hd3m6.js +32 -0
- package/dist/chunk-b9knmzt0.js +106 -0
- package/dist/chunk-besmz4ym.js +32 -0
- package/dist/chunk-bgpkemkg.js +65 -0
- package/dist/chunk-bj8x29tz.js +54 -0
- package/dist/chunk-bkqsnwrq.js +239 -0
- package/dist/chunk-bnf662he.js +359 -0
- package/dist/chunk-bq00fcsd.js +165 -0
- package/dist/chunk-brz2c4cq.js +275 -0
- package/dist/chunk-bsa118r4.js +502 -0
- package/dist/chunk-bsengrbt.js +2737 -0
- package/dist/chunk-bt64sq5y.js +19 -0
- package/dist/chunk-bxcfz5gy.js +56 -0
- package/dist/chunk-bxs2a71m.js +213 -0
- package/dist/chunk-byv2p9hn.js +397 -0
- package/dist/chunk-c03am3es.js +29 -0
- package/dist/chunk-c2ahb7yg.js +105 -0
- package/dist/chunk-c2qm0t6p.js +111 -0
- package/dist/chunk-c42h9gzx.js +71 -0
- package/dist/chunk-c47xbxqw.js +38 -0
- package/dist/chunk-c5vkve4j.js +68 -0
- package/dist/chunk-c6sjhj89.js +1284 -0
- package/dist/chunk-ca147npg.js +27 -0
- package/dist/chunk-caxx597g.js +71 -0
- package/dist/chunk-cbrt5vsb.js +31 -0
- package/dist/chunk-ce0z23ct.js +443 -0
- package/dist/chunk-cefsp8h1.js +155 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-chsyvavm.js +3435 -0
- package/dist/chunk-cmsknj6n.js +28228 -0
- package/dist/chunk-cn8bkmvj.js +264 -0
- package/dist/chunk-crmjpsqe.js +68 -0
- package/dist/chunk-cthpw4pj.js +849 -0
- package/dist/chunk-cwy9nj4y.js +134 -0
- package/dist/chunk-cyagce56.js +155 -0
- package/dist/chunk-cynewytp.js +227 -0
- package/dist/chunk-cznf6k4g.js +46 -0
- package/dist/chunk-d0954t9j.js +267 -0
- package/dist/chunk-d1qhftze.js +118 -0
- package/dist/chunk-d4mdda98.js +94 -0
- package/dist/chunk-d4rnqevg.js +41 -0
- package/dist/chunk-d7886r6a.js +13870 -0
- package/dist/chunk-dd1qvamk.js +678 -0
- package/dist/chunk-dg4je8qj.js +183 -0
- package/dist/chunk-dggvswz1.js +104 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dm3n2qgd.js +24 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dsenyfax.js +105 -0
- package/dist/chunk-dtf0a7rr.js +655 -0
- package/dist/chunk-dxdb7bs1.js +60 -0
- package/dist/chunk-e0pth8g7.js +79 -0
- package/dist/chunk-e36y0q82.js +109 -0
- package/dist/chunk-ef55cwrv.js +267 -0
- package/dist/chunk-efh644hv.js +915 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-ejahyhd8.js +120 -0
- package/dist/chunk-ejk1bpzz.js +472 -0
- package/dist/chunk-emef71ea.js +202 -0
- package/dist/chunk-en7v028t.js +333 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-exh7z6tv.js +132 -0
- package/dist/chunk-f0npbgyf.js +340 -0
- package/dist/chunk-f2qkc8ce.js +229 -0
- package/dist/chunk-f49sb3q7.js +40 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fday7sfg.js +269 -0
- package/dist/chunk-feyzykye.js +10 -0
- package/dist/chunk-fgqwr70t.js +241 -0
- package/dist/chunk-fhy7zs1w.js +943 -0
- package/dist/chunk-fmw3f68k.js +432 -0
- package/dist/chunk-fmwqvpqm.js +506 -0
- package/dist/chunk-fn1apgre.js +66 -0
- package/dist/chunk-fpy4nam9.js +21933 -0
- package/dist/chunk-fqy0erkw.js +908 -0
- package/dist/chunk-ftqwza3a.js +43 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-fz0ch109.js +329 -0
- package/dist/chunk-fzhn8z8j.js +253 -0
- package/dist/chunk-g12brv6y.js +321 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g5tpks28.js +795 -0
- package/dist/chunk-g63tgj4f.js +58 -0
- package/dist/chunk-g827r0mk.js +266 -0
- package/dist/chunk-g8wzsxgc.js +2534 -0
- package/dist/chunk-gey7mwcw.js +36 -0
- package/dist/chunk-gghb9pks.js +120 -0
- package/dist/chunk-grdpaf1p.js +606 -0
- package/dist/chunk-gx8016vp.js +125 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h0rbjg6x.js +55 -0
- package/dist/chunk-h1mr3371.js +121 -0
- package/dist/chunk-h3xwdgpd.js +68 -0
- package/dist/chunk-h4b85amj.js +2331 -0
- package/dist/chunk-h6d137aa.js +20 -0
- package/dist/chunk-h9n7z00d.js +95 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hd8531ec.js +685 -0
- package/dist/chunk-heq3rn8t.js +33068 -0
- package/dist/chunk-hfvxc9fd.js +542 -0
- package/dist/chunk-hgpd0qmm.js +371 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hhjs87wh.js +1407 -0
- package/dist/chunk-hjtvdvgj.js +208 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hknbjky3.js +160798 -0
- package/dist/chunk-htsbqyf9.js +338 -0
- package/dist/chunk-htx7jmxk.js +78 -0
- package/dist/chunk-hzhe8ygc.js +547 -0
- package/dist/chunk-j2k4p94p.js +55 -0
- package/dist/chunk-j3a4p81y.js +184 -0
- package/dist/chunk-j46rb9m9.js +544 -0
- package/dist/chunk-j5bth84e.js +97 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j6jh72hw.js +140 -0
- package/dist/chunk-j9gxwbe3.js +349 -0
- package/dist/chunk-jaaxk89e.js +113 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jk826edv.js +174 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jsx72hep.js +208 -0
- package/dist/chunk-jx817w05.js +11 -0
- package/dist/chunk-jzmz18nn.js +65 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k3s4yk22.js +477 -0
- package/dist/chunk-kfd89dsd.js +21 -0
- package/dist/chunk-kgfz4522.js +126 -0
- package/dist/chunk-kn6zg6bd.js +524 -0
- package/dist/chunk-kp9vkzj6.js +120 -0
- package/dist/chunk-kraf793v.js +118 -0
- package/dist/chunk-kw0r30h3.js +208 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m2bcpk8j.js +30 -0
- package/dist/chunk-m2kp5f7p.js +4389 -0
- package/dist/chunk-m74w3187.js +164 -0
- package/dist/chunk-m88q4jmb.js +61 -0
- package/dist/chunk-man6wb4n.js +1456 -0
- package/dist/chunk-mdk3xgya.js +42 -0
- package/dist/chunk-mf4g439x.js +82 -0
- package/dist/chunk-mg8g0xqs.js +71 -0
- package/dist/chunk-mkwzrqvf.js +38 -0
- package/dist/chunk-mn61mk4v.js +351 -0
- package/dist/chunk-ms09sxcj.js +908 -0
- package/dist/chunk-mtn1anwe.js +2351 -0
- package/dist/chunk-mv0zm0qj.js +65 -0
- package/dist/chunk-mx28h61f.js +1147 -0
- package/dist/chunk-mxbf8ajn.js +1067 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n34z5cw8.js +74 -0
- package/dist/chunk-n55ehz77.js +120 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-n9ktjngj.js +336 -0
- package/dist/chunk-nb2ntesh.js +149 -0
- package/dist/chunk-netzwgv1.js +154 -0
- package/dist/chunk-nh3cd07f.js +14358 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nm97cw83.js +458 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nx87c0vw.js +250 -0
- package/dist/chunk-nxw6y6xm.js +862 -0
- package/dist/chunk-nzt717xg.js +32 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p9cdykwf.js +72 -0
- package/dist/chunk-paxw1ryd.js +227 -0
- package/dist/chunk-ph5g4d1j.js +109 -0
- package/dist/chunk-pp42p8y3.js +574 -0
- package/dist/chunk-ppdn71n4.js +400 -0
- package/dist/chunk-ppwjyveh.js +8 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pshjyzq4.js +17656 -0
- package/dist/chunk-pw8nf9rt.js +126 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-py3zxq5j.js +129 -0
- package/dist/chunk-pyz1qswz.js +300 -0
- package/dist/chunk-q50q8mc5.js +157 -0
- package/dist/chunk-q7tpyeb3.js +39 -0
- package/dist/chunk-q82r31er.js +151 -0
- package/dist/chunk-qajrkk97.js +298 -0
- package/dist/chunk-qcpxnyeh.js +110 -0
- package/dist/chunk-qeabchwr.js +132 -0
- package/dist/chunk-qm7nbd10.js +755 -0
- package/dist/chunk-qm8j7kxr.js +280 -0
- package/dist/chunk-qmwgg5zy.js +136 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qphaajd7.js +305 -0
- package/dist/chunk-qt21xxgm.js +419 -0
- package/dist/chunk-qy2z2p0b.js +122 -0
- package/dist/chunk-qyz8q0dj.js +689 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-qzq5n1yn.js +76 -0
- package/dist/chunk-r0ya57xw.js +170 -0
- package/dist/chunk-r7j395t6.js +122 -0
- package/dist/chunk-r7trcrs7.js +62 -0
- package/dist/chunk-re4yh70t.js +1095 -0
- package/dist/chunk-rhte1r8g.js +272 -0
- package/dist/chunk-rhw4ayb1.js +6851 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rphakhme.js +281 -0
- package/dist/chunk-rrtzz2pv.js +32 -0
- package/dist/chunk-rtnjk8ge.js +726 -0
- package/dist/chunk-rwhswkma.js +87 -0
- package/dist/chunk-rxd4kn2g.js +308 -0
- package/dist/chunk-s083x8ry.js +2840 -0
- package/dist/chunk-s16sn02n.js +365 -0
- package/dist/chunk-s1s8qfdh.js +182 -0
- package/dist/chunk-s2bwz69v.js +473 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s9y6t0mt.js +291 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-se8xzw8h.js +87 -0
- package/dist/chunk-sg66v252.js +1648 -0
- package/dist/chunk-sg7gf3hj.js +1585 -0
- package/dist/chunk-spx24x6j.js +98 -0
- package/dist/chunk-sybxpy18.js +73 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t0gb304x.js +182 -0
- package/dist/chunk-t3fr4skc.js +165 -0
- package/dist/chunk-t58wfamm.js +5368 -0
- package/dist/chunk-t6s2kkm3.js +104 -0
- package/dist/chunk-t8hv0x81.js +116 -0
- package/dist/chunk-tezak8rx.js +6157 -0
- package/dist/chunk-th5y3hj5.js +189 -0
- package/dist/chunk-tj0d3870.js +180 -0
- package/dist/chunk-tjgsawpx.js +40 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-tv9pcdnz.js +51 -0
- package/dist/chunk-ty99rgvw.js +122 -0
- package/dist/chunk-tzgp8av2.js +61 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v2c9dq7t.js +275 -0
- package/dist/chunk-v3aq3heg.js +620 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-var1et7e.js +66 -0
- package/dist/chunk-vchrkvet.js +120 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vf612n57.js +472 -0
- package/dist/chunk-vgpy9md6.js +339 -0
- package/dist/chunk-vkzt82ry.js +644 -0
- package/dist/chunk-vsh80y0c.js +100 -0
- package/dist/chunk-vxkdxhyk.js +103 -0
- package/dist/chunk-vxt6ywm9.js +485 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-vytdzvqs.js +1181 -0
- package/dist/chunk-w0qks2ja.js +1030 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wp1568nt.js +828 -0
- package/dist/chunk-wpckhx7b.js +66 -0
- package/dist/chunk-wpvkvwvc.js +41 -0
- package/dist/chunk-ws5d6qs4.js +655 -0
- package/dist/chunk-wsnxrrb5.js +986 -0
- package/dist/chunk-wyavftcj.js +103 -0
- package/dist/chunk-wybh0bvv.js +121 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x2dp18yj.js +74 -0
- package/dist/chunk-x6r4v44b.js +8 -0
- package/dist/chunk-x7r5k0hf.js +423 -0
- package/dist/chunk-xahk20z8.js +877 -0
- package/dist/chunk-xajwdaxm.js +295 -0
- package/dist/chunk-xkt36p6r.js +61 -0
- package/dist/chunk-xnav6j8h.js +490 -0
- package/dist/chunk-xrj294jg.js +440 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xt9z9t7b.js +40 -0
- package/dist/chunk-xv3era3s.js +8 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y289fz8y.js +116 -0
- package/dist/chunk-y3r7v9pq.js +336 -0
- package/dist/chunk-y98z50mm.js +158 -0
- package/dist/chunk-yhce3x0q.js +64 -0
- package/dist/chunk-yhhf6n9p.js +338 -0
- package/dist/chunk-ykr34msh.js +411 -0
- package/dist/chunk-yks9ggzn.js +103 -0
- package/dist/chunk-ym5r3jnk.js +2007 -0
- package/dist/chunk-ypa349qq.js +148 -0
- package/dist/chunk-yzx3mhfd.js +110 -0
- package/dist/chunk-z1bs6d7k.js +24 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z3k0k30d.js +882 -0
- package/dist/chunk-z42cqdtf.js +107 -0
- package/dist/chunk-z7asrz6j.js +259 -0
- package/dist/chunk-za09fhhh.js +716 -0
- package/dist/chunk-zae0t3p4.js +252 -0
- package/dist/chunk-zbsw794g.js +259 -0
- package/dist/chunk-ze6zvkg6.js +22820 -0
- package/dist/chunk-zejm280k.js +39 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-znf2b75k.js +113 -0
- package/dist/chunk-zqpnvsdz.js +24 -0
- package/dist/chunk-zs2gdkj5.js +433 -0
- package/dist/chunk-zseb1639.js +37 -0
- package/dist/chunk-zsgha506.js +63 -0
- package/dist/chunk-zvsfgmq8.js +146 -0
- package/dist/chunk-zw5xd7m9.js +160 -0
- package/dist/chunk-zzm33q8x.js +8 -0
- package/dist/cli.js +97 -0
- package/dist/download-ripgrep.js +24821 -0
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/package.json +178 -0
- package/scripts/download-ripgrep.ts +335 -0
- package/scripts/postinstall.cjs +319 -0
|
@@ -0,0 +1,877 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
clearTrackedMagicDocs,
|
|
4
|
+
init_magicDocs
|
|
5
|
+
} from "./chunk-brz2c4cq.js";
|
|
6
|
+
import {
|
|
7
|
+
CLAUDE_CONFIG_DIRECTORIES,
|
|
8
|
+
clearAllDumpState,
|
|
9
|
+
clearAllPendingCallbacks,
|
|
10
|
+
clearAllSessions,
|
|
11
|
+
clearCommandPrefixCaches,
|
|
12
|
+
clearCommandsCache,
|
|
13
|
+
clearDynamicSkills,
|
|
14
|
+
clearSessionEnvVars,
|
|
15
|
+
clearStoredImagePaths,
|
|
16
|
+
createBaseHookInput,
|
|
17
|
+
executeFileSuggestionCommand,
|
|
18
|
+
getGitStatus,
|
|
19
|
+
getSessionStartDate,
|
|
20
|
+
getSystemContext,
|
|
21
|
+
getUserContext,
|
|
22
|
+
init_LSPDiagnosticRegistry,
|
|
23
|
+
init_attachments,
|
|
24
|
+
init_claudemd,
|
|
25
|
+
init_commands,
|
|
26
|
+
init_commands1 as init_commands2,
|
|
27
|
+
init_common,
|
|
28
|
+
init_context,
|
|
29
|
+
init_dumpPrompts,
|
|
30
|
+
init_hooks1 as init_hooks,
|
|
31
|
+
init_imageStore,
|
|
32
|
+
init_loadSkillsDir,
|
|
33
|
+
init_markdownConfigLoader,
|
|
34
|
+
init_postCompactCleanup,
|
|
35
|
+
init_promptCacheBreakDetection,
|
|
36
|
+
init_ripgrep,
|
|
37
|
+
init_sessionEnvVars,
|
|
38
|
+
init_sessionIngress,
|
|
39
|
+
init_useSwarmPermissionPoller,
|
|
40
|
+
loadMarkdownFilesForSubdir,
|
|
41
|
+
resetAllLSPDiagnosticState,
|
|
42
|
+
resetGetMemoryFilesCache,
|
|
43
|
+
resetPromptCacheBreakDetection,
|
|
44
|
+
resetSentSkillNames,
|
|
45
|
+
ripGrep,
|
|
46
|
+
runPostCompactCleanup,
|
|
47
|
+
setSystemPromptInjection
|
|
48
|
+
} from "./chunk-hknbjky3.js";
|
|
49
|
+
import {
|
|
50
|
+
getGlobalConfig,
|
|
51
|
+
getInitialSettings,
|
|
52
|
+
init_config1 as init_config,
|
|
53
|
+
init_settings1 as init_settings
|
|
54
|
+
} from "./chunk-7b6bg1r4.js";
|
|
55
|
+
import {
|
|
56
|
+
expandPath,
|
|
57
|
+
init_path
|
|
58
|
+
} from "./chunk-8bwqtasa.js";
|
|
59
|
+
import {
|
|
60
|
+
require_ignore
|
|
61
|
+
} from "./chunk-v9smspw2.js";
|
|
62
|
+
import {
|
|
63
|
+
init_analytics,
|
|
64
|
+
logEvent
|
|
65
|
+
} from "./chunk-h0rbjg6x.js";
|
|
66
|
+
import {
|
|
67
|
+
clearRepositoryCaches,
|
|
68
|
+
init_detectRepository
|
|
69
|
+
} from "./chunk-h1mr3371.js";
|
|
70
|
+
import {
|
|
71
|
+
clearResolveGitDirCache,
|
|
72
|
+
findGitRoot,
|
|
73
|
+
gitExe,
|
|
74
|
+
init_git,
|
|
75
|
+
init_gitFilesystem
|
|
76
|
+
} from "./chunk-36b2q5fg.js";
|
|
77
|
+
import {
|
|
78
|
+
execFileNoThrowWithCwd,
|
|
79
|
+
init_execFileNoThrow
|
|
80
|
+
} from "./chunk-m74w3187.js";
|
|
81
|
+
import {
|
|
82
|
+
getCwd,
|
|
83
|
+
init_cwd
|
|
84
|
+
} from "./chunk-b81hd3m6.js";
|
|
85
|
+
import {
|
|
86
|
+
init_log,
|
|
87
|
+
logError
|
|
88
|
+
} from "./chunk-y3r7v9pq.js";
|
|
89
|
+
import {
|
|
90
|
+
errorMessage,
|
|
91
|
+
getFsImplementation,
|
|
92
|
+
init_debug,
|
|
93
|
+
init_errors,
|
|
94
|
+
init_fsOperations,
|
|
95
|
+
logForDebugging
|
|
96
|
+
} from "./chunk-404qm8xt.js";
|
|
97
|
+
import {
|
|
98
|
+
clearInvokedSkills,
|
|
99
|
+
createSignal,
|
|
100
|
+
init_signal,
|
|
101
|
+
init_state,
|
|
102
|
+
setLastEmittedDate
|
|
103
|
+
} from "./chunk-h4b85amj.js";
|
|
104
|
+
import {
|
|
105
|
+
__esm,
|
|
106
|
+
__require,
|
|
107
|
+
__toESM
|
|
108
|
+
} from "./chunk-qp2qdcda.js";
|
|
109
|
+
|
|
110
|
+
// src/native-ts/file-index/index.ts
|
|
111
|
+
class FileIndex {
|
|
112
|
+
paths = [];
|
|
113
|
+
lowerPaths = [];
|
|
114
|
+
charBits = new Int32Array(0);
|
|
115
|
+
pathLens = new Uint16Array(0);
|
|
116
|
+
topLevelCache = null;
|
|
117
|
+
readyCount = 0;
|
|
118
|
+
loadFromFileList(fileList) {
|
|
119
|
+
const seen = new Set;
|
|
120
|
+
const paths = [];
|
|
121
|
+
for (const line of fileList) {
|
|
122
|
+
if (line.length > 0 && !seen.has(line)) {
|
|
123
|
+
seen.add(line);
|
|
124
|
+
paths.push(line);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
this.buildIndex(paths);
|
|
128
|
+
}
|
|
129
|
+
loadFromFileListAsync(fileList) {
|
|
130
|
+
let markQueryable = () => {};
|
|
131
|
+
const queryable = new Promise((resolve) => {
|
|
132
|
+
markQueryable = resolve;
|
|
133
|
+
});
|
|
134
|
+
const done = this.buildAsync(fileList, markQueryable);
|
|
135
|
+
return { queryable, done };
|
|
136
|
+
}
|
|
137
|
+
async buildAsync(fileList, markQueryable) {
|
|
138
|
+
const seen = new Set;
|
|
139
|
+
const paths = [];
|
|
140
|
+
let chunkStart = performance.now();
|
|
141
|
+
for (let i = 0;i < fileList.length; i++) {
|
|
142
|
+
const line = fileList[i];
|
|
143
|
+
if (line.length > 0 && !seen.has(line)) {
|
|
144
|
+
seen.add(line);
|
|
145
|
+
paths.push(line);
|
|
146
|
+
}
|
|
147
|
+
if ((i & 255) === 255 && performance.now() - chunkStart > CHUNK_MS) {
|
|
148
|
+
await yieldToEventLoop();
|
|
149
|
+
chunkStart = performance.now();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
this.resetArrays(paths);
|
|
153
|
+
chunkStart = performance.now();
|
|
154
|
+
let firstChunk = true;
|
|
155
|
+
for (let i = 0;i < paths.length; i++) {
|
|
156
|
+
this.indexPath(i);
|
|
157
|
+
if ((i & 255) === 255 && performance.now() - chunkStart > CHUNK_MS) {
|
|
158
|
+
this.readyCount = i + 1;
|
|
159
|
+
if (firstChunk) {
|
|
160
|
+
markQueryable();
|
|
161
|
+
firstChunk = false;
|
|
162
|
+
}
|
|
163
|
+
await yieldToEventLoop();
|
|
164
|
+
chunkStart = performance.now();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
this.readyCount = paths.length;
|
|
168
|
+
markQueryable();
|
|
169
|
+
}
|
|
170
|
+
buildIndex(paths) {
|
|
171
|
+
this.resetArrays(paths);
|
|
172
|
+
for (let i = 0;i < paths.length; i++) {
|
|
173
|
+
this.indexPath(i);
|
|
174
|
+
}
|
|
175
|
+
this.readyCount = paths.length;
|
|
176
|
+
}
|
|
177
|
+
resetArrays(paths) {
|
|
178
|
+
const n = paths.length;
|
|
179
|
+
this.paths = paths;
|
|
180
|
+
this.lowerPaths = new Array(n);
|
|
181
|
+
this.charBits = new Int32Array(n);
|
|
182
|
+
this.pathLens = new Uint16Array(n);
|
|
183
|
+
this.readyCount = 0;
|
|
184
|
+
this.topLevelCache = computeTopLevelEntries(paths, TOP_LEVEL_CACHE_LIMIT);
|
|
185
|
+
}
|
|
186
|
+
indexPath(i) {
|
|
187
|
+
const lp = this.paths[i].toLowerCase();
|
|
188
|
+
this.lowerPaths[i] = lp;
|
|
189
|
+
const len = lp.length;
|
|
190
|
+
this.pathLens[i] = len;
|
|
191
|
+
let bits = 0;
|
|
192
|
+
for (let j = 0;j < len; j++) {
|
|
193
|
+
const c = lp.charCodeAt(j);
|
|
194
|
+
if (c >= 97 && c <= 122)
|
|
195
|
+
bits |= 1 << c - 97;
|
|
196
|
+
}
|
|
197
|
+
this.charBits[i] = bits;
|
|
198
|
+
}
|
|
199
|
+
search(query, limit) {
|
|
200
|
+
if (limit <= 0)
|
|
201
|
+
return [];
|
|
202
|
+
if (query.length === 0) {
|
|
203
|
+
if (this.topLevelCache) {
|
|
204
|
+
return this.topLevelCache.slice(0, limit);
|
|
205
|
+
}
|
|
206
|
+
return [];
|
|
207
|
+
}
|
|
208
|
+
const caseSensitive = query !== query.toLowerCase();
|
|
209
|
+
const needle = caseSensitive ? query : query.toLowerCase();
|
|
210
|
+
const nLen = Math.min(needle.length, MAX_QUERY_LEN);
|
|
211
|
+
const needleChars = new Array(nLen);
|
|
212
|
+
let needleBitmap = 0;
|
|
213
|
+
for (let j = 0;j < nLen; j++) {
|
|
214
|
+
const ch = needle.charAt(j);
|
|
215
|
+
needleChars[j] = ch;
|
|
216
|
+
const cc = ch.charCodeAt(0);
|
|
217
|
+
if (cc >= 97 && cc <= 122)
|
|
218
|
+
needleBitmap |= 1 << cc - 97;
|
|
219
|
+
}
|
|
220
|
+
const scoreCeiling = nLen * (SCORE_MATCH + BONUS_BOUNDARY) + BONUS_FIRST_CHAR + 32;
|
|
221
|
+
const topK = [];
|
|
222
|
+
let threshold = -Infinity;
|
|
223
|
+
const { paths, lowerPaths, charBits, pathLens, readyCount } = this;
|
|
224
|
+
outer:
|
|
225
|
+
for (let i = 0;i < readyCount; i++) {
|
|
226
|
+
if ((charBits[i] & needleBitmap) !== needleBitmap)
|
|
227
|
+
continue;
|
|
228
|
+
const haystack = caseSensitive ? paths[i] : lowerPaths[i];
|
|
229
|
+
const firstChar = needleChars[0];
|
|
230
|
+
let startCount = 0;
|
|
231
|
+
const startPositions = [];
|
|
232
|
+
const firstPos = haystack.indexOf(firstChar);
|
|
233
|
+
if (firstPos === -1)
|
|
234
|
+
continue;
|
|
235
|
+
startPositions[startCount++] = firstPos;
|
|
236
|
+
for (let bp = firstPos + 1;bp < haystack.length; bp++) {
|
|
237
|
+
if (haystack.charCodeAt(bp) !== firstChar.charCodeAt(0))
|
|
238
|
+
continue;
|
|
239
|
+
const prevCode = haystack.charCodeAt(bp - 1);
|
|
240
|
+
if (prevCode === 47 || prevCode === 92 || prevCode === 45 || prevCode === 95 || prevCode === 46 || prevCode === 32) {
|
|
241
|
+
startPositions[startCount++] = bp;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const originalPath = paths[i];
|
|
245
|
+
const hLen = pathLens[i];
|
|
246
|
+
const lengthBonus = Math.max(0, 32 - (hLen >> 2));
|
|
247
|
+
let bestScore = -Infinity;
|
|
248
|
+
for (let si = 0;si < startCount; si++) {
|
|
249
|
+
posBuf[0] = startPositions[si];
|
|
250
|
+
let gapPenalty = 0;
|
|
251
|
+
let consecBonus = 0;
|
|
252
|
+
let prev = posBuf[0];
|
|
253
|
+
let matched = true;
|
|
254
|
+
for (let j = 1;j < nLen; j++) {
|
|
255
|
+
const pos = haystack.indexOf(needleChars[j], prev + 1);
|
|
256
|
+
if (pos === -1) {
|
|
257
|
+
matched = false;
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
posBuf[j] = pos;
|
|
261
|
+
const gap = pos - prev - 1;
|
|
262
|
+
if (gap === 0)
|
|
263
|
+
consecBonus += BONUS_CONSECUTIVE;
|
|
264
|
+
else
|
|
265
|
+
gapPenalty += PENALTY_GAP_START + gap * PENALTY_GAP_EXTENSION;
|
|
266
|
+
prev = pos;
|
|
267
|
+
}
|
|
268
|
+
if (!matched)
|
|
269
|
+
continue;
|
|
270
|
+
if (topK.length === limit && scoreCeiling + consecBonus - gapPenalty + lengthBonus <= threshold) {
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
let score2 = nLen * SCORE_MATCH + consecBonus - gapPenalty;
|
|
274
|
+
score2 += scoreBonusAt(originalPath, posBuf[0], true);
|
|
275
|
+
for (let j = 1;j < nLen; j++) {
|
|
276
|
+
score2 += scoreBonusAt(originalPath, posBuf[j], false);
|
|
277
|
+
}
|
|
278
|
+
score2 += lengthBonus;
|
|
279
|
+
if (score2 > bestScore)
|
|
280
|
+
bestScore = score2;
|
|
281
|
+
}
|
|
282
|
+
if (bestScore === -Infinity)
|
|
283
|
+
continue;
|
|
284
|
+
const score = bestScore;
|
|
285
|
+
if (topK.length < limit) {
|
|
286
|
+
topK.push({ path: originalPath, fuzzScore: score });
|
|
287
|
+
if (topK.length === limit) {
|
|
288
|
+
topK.sort((a, b) => a.fuzzScore - b.fuzzScore);
|
|
289
|
+
threshold = topK[0].fuzzScore;
|
|
290
|
+
}
|
|
291
|
+
} else if (score > threshold) {
|
|
292
|
+
let lo = 0;
|
|
293
|
+
let hi = topK.length;
|
|
294
|
+
while (lo < hi) {
|
|
295
|
+
const mid = lo + hi >> 1;
|
|
296
|
+
if (topK[mid].fuzzScore < score)
|
|
297
|
+
lo = mid + 1;
|
|
298
|
+
else
|
|
299
|
+
hi = mid;
|
|
300
|
+
}
|
|
301
|
+
topK.splice(lo, 0, { path: originalPath, fuzzScore: score });
|
|
302
|
+
topK.shift();
|
|
303
|
+
threshold = topK[0].fuzzScore;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
topK.sort((a, b) => b.fuzzScore - a.fuzzScore);
|
|
307
|
+
const matchCount = topK.length;
|
|
308
|
+
const denom = Math.max(matchCount, 1);
|
|
309
|
+
const results = new Array(matchCount);
|
|
310
|
+
for (let i = 0;i < matchCount; i++) {
|
|
311
|
+
const path = topK[i].path;
|
|
312
|
+
const positionScore = i / denom;
|
|
313
|
+
const finalScore = path.includes("test") ? Math.min(positionScore * 1.05, 1) : positionScore;
|
|
314
|
+
results[i] = { path, score: finalScore };
|
|
315
|
+
}
|
|
316
|
+
return results;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function scoreBonusAt(path, pos, first) {
|
|
320
|
+
if (pos === 0)
|
|
321
|
+
return first ? BONUS_FIRST_CHAR : 0;
|
|
322
|
+
const prevCh = path.charCodeAt(pos - 1);
|
|
323
|
+
if (isBoundary(prevCh))
|
|
324
|
+
return BONUS_BOUNDARY;
|
|
325
|
+
if (isLower(prevCh) && isUpper(path.charCodeAt(pos)))
|
|
326
|
+
return BONUS_CAMEL;
|
|
327
|
+
return 0;
|
|
328
|
+
}
|
|
329
|
+
function isBoundary(code) {
|
|
330
|
+
return code === 47 || code === 92 || code === 45 || code === 95 || code === 46 || code === 32;
|
|
331
|
+
}
|
|
332
|
+
function isLower(code) {
|
|
333
|
+
return code >= 97 && code <= 122;
|
|
334
|
+
}
|
|
335
|
+
function isUpper(code) {
|
|
336
|
+
return code >= 65 && code <= 90;
|
|
337
|
+
}
|
|
338
|
+
function yieldToEventLoop() {
|
|
339
|
+
return new Promise((resolve) => setImmediate(resolve));
|
|
340
|
+
}
|
|
341
|
+
function computeTopLevelEntries(paths, limit) {
|
|
342
|
+
const topLevel = new Set;
|
|
343
|
+
for (const p of paths) {
|
|
344
|
+
let end = p.length;
|
|
345
|
+
for (let i = 0;i < p.length; i++) {
|
|
346
|
+
const c = p.charCodeAt(i);
|
|
347
|
+
if (c === 47 || c === 92) {
|
|
348
|
+
end = i;
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
const segment = p.slice(0, end);
|
|
353
|
+
if (segment.length > 0) {
|
|
354
|
+
topLevel.add(segment);
|
|
355
|
+
if (topLevel.size >= limit)
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
const sorted = Array.from(topLevel);
|
|
360
|
+
sorted.sort((a, b) => {
|
|
361
|
+
const lenDiff = a.length - b.length;
|
|
362
|
+
if (lenDiff !== 0)
|
|
363
|
+
return lenDiff;
|
|
364
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
365
|
+
});
|
|
366
|
+
return sorted.slice(0, limit).map((path) => ({ path, score: 0 }));
|
|
367
|
+
}
|
|
368
|
+
var SCORE_MATCH = 16, BONUS_BOUNDARY = 8, BONUS_CAMEL = 6, BONUS_CONSECUTIVE = 4, BONUS_FIRST_CHAR = 8, PENALTY_GAP_START = 3, PENALTY_GAP_EXTENSION = 1, TOP_LEVEL_CACHE_LIMIT = 100, MAX_QUERY_LEN = 64, CHUNK_MS = 4, posBuf;
|
|
369
|
+
var init_file_index = __esm(() => {
|
|
370
|
+
posBuf = new Int32Array(MAX_QUERY_LEN);
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// src/hooks/fileSuggestions.ts
|
|
374
|
+
import { statSync } from "fs";
|
|
375
|
+
import * as path from "path";
|
|
376
|
+
function getFileIndex() {
|
|
377
|
+
if (!fileIndex) {
|
|
378
|
+
fileIndex = new FileIndex;
|
|
379
|
+
}
|
|
380
|
+
return fileIndex;
|
|
381
|
+
}
|
|
382
|
+
function clearFileSuggestionCaches() {
|
|
383
|
+
fileIndex = null;
|
|
384
|
+
fileListRefreshPromise = null;
|
|
385
|
+
cacheGeneration++;
|
|
386
|
+
untrackedFetchPromise = null;
|
|
387
|
+
cachedTrackedFiles = [];
|
|
388
|
+
cachedConfigFiles = [];
|
|
389
|
+
cachedTrackedDirs = [];
|
|
390
|
+
indexBuildComplete.clear();
|
|
391
|
+
ignorePatternsCache = null;
|
|
392
|
+
ignorePatternsCacheKey = null;
|
|
393
|
+
lastRefreshMs = 0;
|
|
394
|
+
lastGitIndexMtime = null;
|
|
395
|
+
loadedTrackedSignature = null;
|
|
396
|
+
loadedMergedSignature = null;
|
|
397
|
+
}
|
|
398
|
+
function pathListSignature(paths) {
|
|
399
|
+
const n = paths.length;
|
|
400
|
+
const stride = Math.max(1, Math.floor(n / 500));
|
|
401
|
+
let h = 2166136261 | 0;
|
|
402
|
+
for (let i = 0;i < n; i += stride) {
|
|
403
|
+
const p = paths[i];
|
|
404
|
+
for (let j = 0;j < p.length; j++) {
|
|
405
|
+
h = (h ^ p.charCodeAt(j)) * 16777619 | 0;
|
|
406
|
+
}
|
|
407
|
+
h = h * 16777619 | 0;
|
|
408
|
+
}
|
|
409
|
+
if (n > 0) {
|
|
410
|
+
const last = paths[n - 1];
|
|
411
|
+
for (let j = 0;j < last.length; j++) {
|
|
412
|
+
h = (h ^ last.charCodeAt(j)) * 16777619 | 0;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return `${n}:${(h >>> 0).toString(16)}`;
|
|
416
|
+
}
|
|
417
|
+
function getGitIndexMtime() {
|
|
418
|
+
const repoRoot = findGitRoot(getCwd());
|
|
419
|
+
if (!repoRoot)
|
|
420
|
+
return null;
|
|
421
|
+
try {
|
|
422
|
+
return statSync(path.join(repoRoot, ".git", "index")).mtimeMs;
|
|
423
|
+
} catch {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
function normalizeGitPaths(files, repoRoot, originalCwd) {
|
|
428
|
+
if (originalCwd === repoRoot) {
|
|
429
|
+
return files;
|
|
430
|
+
}
|
|
431
|
+
return files.map((f) => {
|
|
432
|
+
const absolutePath = path.join(repoRoot, f);
|
|
433
|
+
return path.relative(originalCwd, absolutePath);
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
async function mergeUntrackedIntoNormalizedCache(normalizedUntracked) {
|
|
437
|
+
if (normalizedUntracked.length === 0)
|
|
438
|
+
return;
|
|
439
|
+
if (!fileIndex || cachedTrackedFiles.length === 0)
|
|
440
|
+
return;
|
|
441
|
+
const untrackedDirs = await getDirectoryNamesAsync(normalizedUntracked);
|
|
442
|
+
const allPaths = [
|
|
443
|
+
...cachedTrackedFiles,
|
|
444
|
+
...cachedConfigFiles,
|
|
445
|
+
...cachedTrackedDirs,
|
|
446
|
+
...normalizedUntracked,
|
|
447
|
+
...untrackedDirs
|
|
448
|
+
];
|
|
449
|
+
const sig = pathListSignature(allPaths);
|
|
450
|
+
if (sig === loadedMergedSignature) {
|
|
451
|
+
logForDebugging(`[FileIndex] skipped index rebuild \u2014 merged paths unchanged`);
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
await fileIndex.loadFromFileListAsync(allPaths).done;
|
|
455
|
+
loadedMergedSignature = sig;
|
|
456
|
+
logForDebugging(`[FileIndex] rebuilt index with ${cachedTrackedFiles.length} tracked + ${normalizedUntracked.length} untracked files`);
|
|
457
|
+
}
|
|
458
|
+
async function loadRipgrepIgnorePatterns(repoRoot, cwd) {
|
|
459
|
+
const cacheKey = `${repoRoot}:${cwd}`;
|
|
460
|
+
if (ignorePatternsCacheKey === cacheKey) {
|
|
461
|
+
return ignorePatternsCache;
|
|
462
|
+
}
|
|
463
|
+
const fs = getFsImplementation();
|
|
464
|
+
const ignoreFiles = [".ignore", ".rgignore"];
|
|
465
|
+
const directories = [...new Set([repoRoot, cwd])];
|
|
466
|
+
const ig = import_ignore.default();
|
|
467
|
+
let hasPatterns = false;
|
|
468
|
+
const paths = directories.flatMap((dir) => ignoreFiles.map((f) => path.join(dir, f)));
|
|
469
|
+
const contents = await Promise.all(paths.map((p) => fs.readFile(p, { encoding: "utf8" }).catch(() => null)));
|
|
470
|
+
for (const [i, content] of contents.entries()) {
|
|
471
|
+
if (content === null)
|
|
472
|
+
continue;
|
|
473
|
+
ig.add(content);
|
|
474
|
+
hasPatterns = true;
|
|
475
|
+
logForDebugging(`[FileIndex] loaded ignore patterns from ${paths[i]}`);
|
|
476
|
+
}
|
|
477
|
+
const result = hasPatterns ? ig : null;
|
|
478
|
+
ignorePatternsCache = result;
|
|
479
|
+
ignorePatternsCacheKey = cacheKey;
|
|
480
|
+
return result;
|
|
481
|
+
}
|
|
482
|
+
async function getFilesUsingGit(abortSignal, respectGitignore) {
|
|
483
|
+
const startTime = Date.now();
|
|
484
|
+
logForDebugging(`[FileIndex] getFilesUsingGit called`);
|
|
485
|
+
const cwd = getCwd();
|
|
486
|
+
const repoRoot = findGitRoot(cwd);
|
|
487
|
+
if (!repoRoot) {
|
|
488
|
+
logForDebugging(`[FileIndex] not a git repo, returning null`);
|
|
489
|
+
return null;
|
|
490
|
+
}
|
|
491
|
+
try {
|
|
492
|
+
const lsFilesStart = Date.now();
|
|
493
|
+
const trackedResult = await execFileNoThrowWithCwd(gitExe(), ["-c", "core.quotepath=false", "ls-files", "--recurse-submodules"], { timeout: 5000, abortSignal, cwd: repoRoot });
|
|
494
|
+
logForDebugging(`[FileIndex] git ls-files (tracked) took ${Date.now() - lsFilesStart}ms`);
|
|
495
|
+
if (trackedResult.code !== 0) {
|
|
496
|
+
logForDebugging(`[FileIndex] git ls-files failed (code=${trackedResult.code}, stderr=${trackedResult.stderr}), falling back to ripgrep`);
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
const trackedFiles = trackedResult.stdout.trim().split(`
|
|
500
|
+
`).filter(Boolean);
|
|
501
|
+
let normalizedTracked = normalizeGitPaths(trackedFiles, repoRoot, cwd);
|
|
502
|
+
const ignorePatterns = await loadRipgrepIgnorePatterns(repoRoot, cwd);
|
|
503
|
+
if (ignorePatterns) {
|
|
504
|
+
const beforeCount = normalizedTracked.length;
|
|
505
|
+
normalizedTracked = ignorePatterns.filter(normalizedTracked);
|
|
506
|
+
logForDebugging(`[FileIndex] applied ignore patterns: ${beforeCount} -> ${normalizedTracked.length} files`);
|
|
507
|
+
}
|
|
508
|
+
cachedTrackedFiles = normalizedTracked;
|
|
509
|
+
const duration = Date.now() - startTime;
|
|
510
|
+
logForDebugging(`[FileIndex] git ls-files: ${normalizedTracked.length} tracked files in ${duration}ms`);
|
|
511
|
+
logEvent("tengu_file_suggestions_git_ls_files", {
|
|
512
|
+
file_count: normalizedTracked.length,
|
|
513
|
+
tracked_count: normalizedTracked.length,
|
|
514
|
+
untracked_count: 0,
|
|
515
|
+
duration_ms: duration
|
|
516
|
+
});
|
|
517
|
+
if (!untrackedFetchPromise) {
|
|
518
|
+
const untrackedArgs = respectGitignore ? [
|
|
519
|
+
"-c",
|
|
520
|
+
"core.quotepath=false",
|
|
521
|
+
"ls-files",
|
|
522
|
+
"--others",
|
|
523
|
+
"--exclude-standard"
|
|
524
|
+
] : ["-c", "core.quotepath=false", "ls-files", "--others"];
|
|
525
|
+
const generation = cacheGeneration;
|
|
526
|
+
untrackedFetchPromise = execFileNoThrowWithCwd(gitExe(), untrackedArgs, {
|
|
527
|
+
timeout: 1e4,
|
|
528
|
+
cwd: repoRoot
|
|
529
|
+
}).then(async (untrackedResult) => {
|
|
530
|
+
if (generation !== cacheGeneration) {
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
if (untrackedResult.code === 0) {
|
|
534
|
+
const rawUntrackedFiles = untrackedResult.stdout.trim().split(`
|
|
535
|
+
`).filter(Boolean);
|
|
536
|
+
let normalizedUntracked = normalizeGitPaths(rawUntrackedFiles, repoRoot, cwd);
|
|
537
|
+
const ignorePatterns2 = await loadRipgrepIgnorePatterns(repoRoot, cwd);
|
|
538
|
+
if (ignorePatterns2 && normalizedUntracked.length > 0) {
|
|
539
|
+
const beforeCount = normalizedUntracked.length;
|
|
540
|
+
normalizedUntracked = ignorePatterns2.filter(normalizedUntracked);
|
|
541
|
+
logForDebugging(`[FileIndex] applied ignore patterns to untracked: ${beforeCount} -> ${normalizedUntracked.length} files`);
|
|
542
|
+
}
|
|
543
|
+
logForDebugging(`[FileIndex] background untracked fetch: ${normalizedUntracked.length} files`);
|
|
544
|
+
mergeUntrackedIntoNormalizedCache(normalizedUntracked);
|
|
545
|
+
}
|
|
546
|
+
}).catch((error) => {
|
|
547
|
+
logForDebugging(`[FileIndex] background untracked fetch failed: ${error}`);
|
|
548
|
+
}).finally(() => {
|
|
549
|
+
untrackedFetchPromise = null;
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
return normalizedTracked;
|
|
553
|
+
} catch (error) {
|
|
554
|
+
logForDebugging(`[FileIndex] git ls-files error: ${errorMessage(error)}`);
|
|
555
|
+
return null;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
async function getDirectoryNamesAsync(files) {
|
|
559
|
+
const directoryNames = new Set;
|
|
560
|
+
let chunkStart = performance.now();
|
|
561
|
+
for (let i = 0;i < files.length; i++) {
|
|
562
|
+
collectDirectoryNames(files, i, i + 1, directoryNames);
|
|
563
|
+
if ((i & 255) === 255 && performance.now() - chunkStart > CHUNK_MS) {
|
|
564
|
+
await yieldToEventLoop();
|
|
565
|
+
chunkStart = performance.now();
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
return [...directoryNames].map((d) => d + path.sep);
|
|
569
|
+
}
|
|
570
|
+
function collectDirectoryNames(files, start, end, out) {
|
|
571
|
+
for (let i = start;i < end; i++) {
|
|
572
|
+
let currentDir = path.dirname(files[i]);
|
|
573
|
+
while (currentDir !== "." && !out.has(currentDir)) {
|
|
574
|
+
const parent = path.dirname(currentDir);
|
|
575
|
+
if (parent === currentDir)
|
|
576
|
+
break;
|
|
577
|
+
out.add(currentDir);
|
|
578
|
+
currentDir = parent;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
async function getClaudeConfigFiles(cwd) {
|
|
583
|
+
const markdownFileArrays = await Promise.all(CLAUDE_CONFIG_DIRECTORIES.map((subdir) => loadMarkdownFilesForSubdir(subdir, cwd)));
|
|
584
|
+
return markdownFileArrays.flatMap((markdownFiles) => markdownFiles.map((f) => f.filePath));
|
|
585
|
+
}
|
|
586
|
+
async function getProjectFiles(abortSignal, respectGitignore) {
|
|
587
|
+
logForDebugging(`[FileIndex] getProjectFiles called, respectGitignore=${respectGitignore}`);
|
|
588
|
+
const gitFiles = await getFilesUsingGit(abortSignal, respectGitignore);
|
|
589
|
+
if (gitFiles !== null) {
|
|
590
|
+
logForDebugging(`[FileIndex] using git ls-files result (${gitFiles.length} files)`);
|
|
591
|
+
return gitFiles;
|
|
592
|
+
}
|
|
593
|
+
logForDebugging(`[FileIndex] git ls-files returned null, falling back to ripgrep`);
|
|
594
|
+
const startTime = Date.now();
|
|
595
|
+
const rgArgs = [
|
|
596
|
+
"--files",
|
|
597
|
+
"--follow",
|
|
598
|
+
"--hidden",
|
|
599
|
+
"--glob",
|
|
600
|
+
"!.git/",
|
|
601
|
+
"--glob",
|
|
602
|
+
"!.svn/",
|
|
603
|
+
"--glob",
|
|
604
|
+
"!.hg/",
|
|
605
|
+
"--glob",
|
|
606
|
+
"!.bzr/",
|
|
607
|
+
"--glob",
|
|
608
|
+
"!.jj/",
|
|
609
|
+
"--glob",
|
|
610
|
+
"!.sl/"
|
|
611
|
+
];
|
|
612
|
+
if (!respectGitignore) {
|
|
613
|
+
rgArgs.push("--no-ignore-vcs");
|
|
614
|
+
}
|
|
615
|
+
const files = await ripGrep(rgArgs, ".", abortSignal);
|
|
616
|
+
const relativePaths = files.map((f) => path.relative(getCwd(), f));
|
|
617
|
+
const duration = Date.now() - startTime;
|
|
618
|
+
logForDebugging(`[FileIndex] ripgrep: ${relativePaths.length} files in ${duration}ms`);
|
|
619
|
+
logEvent("tengu_file_suggestions_ripgrep", {
|
|
620
|
+
file_count: relativePaths.length,
|
|
621
|
+
duration_ms: duration
|
|
622
|
+
});
|
|
623
|
+
return relativePaths;
|
|
624
|
+
}
|
|
625
|
+
async function getPathsForSuggestions() {
|
|
626
|
+
const signal = AbortSignal.timeout(1e4);
|
|
627
|
+
const index = getFileIndex();
|
|
628
|
+
try {
|
|
629
|
+
const projectSettings = getInitialSettings();
|
|
630
|
+
const globalConfig = getGlobalConfig();
|
|
631
|
+
const respectGitignore = projectSettings.respectGitignore ?? globalConfig.respectGitignore ?? true;
|
|
632
|
+
const cwd = getCwd();
|
|
633
|
+
const [projectFiles, configFiles] = await Promise.all([
|
|
634
|
+
getProjectFiles(signal, respectGitignore),
|
|
635
|
+
getClaudeConfigFiles(cwd)
|
|
636
|
+
]);
|
|
637
|
+
cachedConfigFiles = configFiles;
|
|
638
|
+
const allFiles = [...projectFiles, ...configFiles];
|
|
639
|
+
const directories = await getDirectoryNamesAsync(allFiles);
|
|
640
|
+
cachedTrackedDirs = directories;
|
|
641
|
+
const allPathsList = [...directories, ...allFiles];
|
|
642
|
+
const sig = pathListSignature(allPathsList);
|
|
643
|
+
if (sig !== loadedTrackedSignature) {
|
|
644
|
+
await index.loadFromFileListAsync(allPathsList).done;
|
|
645
|
+
loadedTrackedSignature = sig;
|
|
646
|
+
loadedMergedSignature = null;
|
|
647
|
+
} else {
|
|
648
|
+
logForDebugging(`[FileIndex] skipped index rebuild \u2014 tracked paths unchanged`);
|
|
649
|
+
}
|
|
650
|
+
} catch (error) {
|
|
651
|
+
logError(error);
|
|
652
|
+
}
|
|
653
|
+
return index;
|
|
654
|
+
}
|
|
655
|
+
function findCommonPrefix(a, b) {
|
|
656
|
+
const minLength = Math.min(a.length, b.length);
|
|
657
|
+
let i = 0;
|
|
658
|
+
while (i < minLength && a[i] === b[i]) {
|
|
659
|
+
i++;
|
|
660
|
+
}
|
|
661
|
+
return a.substring(0, i);
|
|
662
|
+
}
|
|
663
|
+
function findLongestCommonPrefix(suggestions) {
|
|
664
|
+
if (suggestions.length === 0)
|
|
665
|
+
return "";
|
|
666
|
+
const strings = suggestions.map((item) => item.displayText);
|
|
667
|
+
let prefix = strings[0];
|
|
668
|
+
for (let i = 1;i < strings.length; i++) {
|
|
669
|
+
const currentString = strings[i];
|
|
670
|
+
prefix = findCommonPrefix(prefix, currentString);
|
|
671
|
+
if (prefix === "")
|
|
672
|
+
return "";
|
|
673
|
+
}
|
|
674
|
+
return prefix;
|
|
675
|
+
}
|
|
676
|
+
function createFileSuggestionItem(filePath, score) {
|
|
677
|
+
return {
|
|
678
|
+
id: `file-${filePath}`,
|
|
679
|
+
displayText: filePath,
|
|
680
|
+
metadata: score !== undefined ? { score } : undefined
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
function findMatchingFiles(fileIndex2, partialPath) {
|
|
684
|
+
const results = fileIndex2.search(partialPath, MAX_SUGGESTIONS);
|
|
685
|
+
return results.map((result) => createFileSuggestionItem(result.path, result.score));
|
|
686
|
+
}
|
|
687
|
+
function startBackgroundCacheRefresh() {
|
|
688
|
+
if (fileListRefreshPromise) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
const indexMtime = getGitIndexMtime();
|
|
692
|
+
if (fileIndex) {
|
|
693
|
+
const gitStateChanged = indexMtime !== null && indexMtime !== lastGitIndexMtime;
|
|
694
|
+
if (!gitStateChanged && Date.now() - lastRefreshMs < REFRESH_THROTTLE_MS) {
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
const generation = cacheGeneration;
|
|
699
|
+
const refreshStart = Date.now();
|
|
700
|
+
getFileIndex();
|
|
701
|
+
fileListRefreshPromise = getPathsForSuggestions().then((result) => {
|
|
702
|
+
if (generation !== cacheGeneration) {
|
|
703
|
+
return result;
|
|
704
|
+
}
|
|
705
|
+
fileListRefreshPromise = null;
|
|
706
|
+
indexBuildComplete.emit();
|
|
707
|
+
lastGitIndexMtime = indexMtime;
|
|
708
|
+
lastRefreshMs = Date.now();
|
|
709
|
+
logForDebugging(`[FileIndex] cache refresh completed in ${Date.now() - refreshStart}ms`);
|
|
710
|
+
return result;
|
|
711
|
+
}).catch((error) => {
|
|
712
|
+
logForDebugging(`[FileIndex] Cache refresh failed: ${errorMessage(error)}`);
|
|
713
|
+
logError(error);
|
|
714
|
+
if (generation === cacheGeneration) {
|
|
715
|
+
fileListRefreshPromise = null;
|
|
716
|
+
}
|
|
717
|
+
return getFileIndex();
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
async function getTopLevelPaths() {
|
|
721
|
+
const fs = getFsImplementation();
|
|
722
|
+
const cwd = getCwd();
|
|
723
|
+
try {
|
|
724
|
+
const entries = await fs.readdir(cwd);
|
|
725
|
+
return entries.map((entry) => {
|
|
726
|
+
const fullPath = path.join(cwd, entry.name);
|
|
727
|
+
const relativePath = path.relative(cwd, fullPath);
|
|
728
|
+
return entry.isDirectory() ? relativePath + path.sep : relativePath;
|
|
729
|
+
});
|
|
730
|
+
} catch (error) {
|
|
731
|
+
logError(error);
|
|
732
|
+
return [];
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
async function generateFileSuggestions(partialPath, showOnEmpty = false) {
|
|
736
|
+
if (!partialPath && !showOnEmpty) {
|
|
737
|
+
return [];
|
|
738
|
+
}
|
|
739
|
+
if (getInitialSettings().fileSuggestion?.type === "command") {
|
|
740
|
+
const input = {
|
|
741
|
+
...createBaseHookInput(),
|
|
742
|
+
query: partialPath
|
|
743
|
+
};
|
|
744
|
+
const results = await executeFileSuggestionCommand(input);
|
|
745
|
+
return results.slice(0, MAX_SUGGESTIONS).map(createFileSuggestionItem);
|
|
746
|
+
}
|
|
747
|
+
if (partialPath === "" || partialPath === "." || partialPath === "./") {
|
|
748
|
+
const topLevelPaths = await getTopLevelPaths();
|
|
749
|
+
startBackgroundCacheRefresh();
|
|
750
|
+
return topLevelPaths.slice(0, MAX_SUGGESTIONS).map(createFileSuggestionItem);
|
|
751
|
+
}
|
|
752
|
+
const startTime = Date.now();
|
|
753
|
+
try {
|
|
754
|
+
const wasBuilding = fileListRefreshPromise !== null;
|
|
755
|
+
startBackgroundCacheRefresh();
|
|
756
|
+
let normalizedPath = partialPath;
|
|
757
|
+
const currentDirPrefix = "." + path.sep;
|
|
758
|
+
if (partialPath.startsWith(currentDirPrefix)) {
|
|
759
|
+
normalizedPath = partialPath.substring(2);
|
|
760
|
+
}
|
|
761
|
+
if (normalizedPath.startsWith("~")) {
|
|
762
|
+
normalizedPath = expandPath(normalizedPath);
|
|
763
|
+
}
|
|
764
|
+
const matches = fileIndex ? findMatchingFiles(fileIndex, normalizedPath) : [];
|
|
765
|
+
const duration = Date.now() - startTime;
|
|
766
|
+
logForDebugging(`[FileIndex] generateFileSuggestions: ${matches.length} results in ${duration}ms (${wasBuilding ? "partial" : "full"} index)`);
|
|
767
|
+
logEvent("tengu_file_suggestions_query", {
|
|
768
|
+
duration_ms: duration,
|
|
769
|
+
cache_hit: !wasBuilding,
|
|
770
|
+
result_count: matches.length,
|
|
771
|
+
query_length: partialPath.length
|
|
772
|
+
});
|
|
773
|
+
return matches;
|
|
774
|
+
} catch (error) {
|
|
775
|
+
logError(error);
|
|
776
|
+
return [];
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
function applyFileSuggestion(suggestion, input, partialPath, startPos, onInputChange, setCursorOffset) {
|
|
780
|
+
const suggestionText = typeof suggestion === "string" ? suggestion : suggestion.displayText;
|
|
781
|
+
const newInput = input.substring(0, startPos) + suggestionText + input.substring(startPos + partialPath.length);
|
|
782
|
+
onInputChange(newInput);
|
|
783
|
+
const newCursorPos = startPos + suggestionText.length;
|
|
784
|
+
setCursorOffset(newCursorPos);
|
|
785
|
+
}
|
|
786
|
+
var import_ignore, fileIndex = null, fileListRefreshPromise = null, indexBuildComplete, onIndexBuildComplete, cacheGeneration = 0, untrackedFetchPromise = null, cachedTrackedFiles, cachedConfigFiles, cachedTrackedDirs, ignorePatternsCache = null, ignorePatternsCacheKey = null, lastRefreshMs = 0, lastGitIndexMtime = null, loadedTrackedSignature = null, loadedMergedSignature = null, MAX_SUGGESTIONS = 15, REFRESH_THROTTLE_MS = 5000;
|
|
787
|
+
var init_fileSuggestions = __esm(() => {
|
|
788
|
+
init_markdownConfigLoader();
|
|
789
|
+
init_file_index();
|
|
790
|
+
init_analytics();
|
|
791
|
+
init_config();
|
|
792
|
+
init_cwd();
|
|
793
|
+
init_debug();
|
|
794
|
+
init_errors();
|
|
795
|
+
init_execFileNoThrow();
|
|
796
|
+
init_fsOperations();
|
|
797
|
+
init_git();
|
|
798
|
+
init_hooks();
|
|
799
|
+
init_log();
|
|
800
|
+
init_path();
|
|
801
|
+
init_ripgrep();
|
|
802
|
+
init_settings();
|
|
803
|
+
init_signal();
|
|
804
|
+
import_ignore = __toESM(require_ignore(), 1);
|
|
805
|
+
indexBuildComplete = createSignal();
|
|
806
|
+
onIndexBuildComplete = indexBuildComplete.subscribe;
|
|
807
|
+
cachedTrackedFiles = [];
|
|
808
|
+
cachedConfigFiles = [];
|
|
809
|
+
cachedTrackedDirs = [];
|
|
810
|
+
});
|
|
811
|
+
|
|
812
|
+
// src/commands/clear/caches.ts
|
|
813
|
+
function clearSessionCaches(preservedAgentIds = new Set) {
|
|
814
|
+
const hasPreserved = preservedAgentIds.size > 0;
|
|
815
|
+
getUserContext.cache.clear?.();
|
|
816
|
+
getSystemContext.cache.clear?.();
|
|
817
|
+
getGitStatus.cache.clear?.();
|
|
818
|
+
getSessionStartDate.cache.clear?.();
|
|
819
|
+
clearFileSuggestionCaches();
|
|
820
|
+
clearCommandsCache();
|
|
821
|
+
if (!hasPreserved)
|
|
822
|
+
resetPromptCacheBreakDetection();
|
|
823
|
+
setSystemPromptInjection(null);
|
|
824
|
+
setLastEmittedDate(null);
|
|
825
|
+
runPostCompactCleanup();
|
|
826
|
+
resetSentSkillNames();
|
|
827
|
+
resetGetMemoryFilesCache("session_start");
|
|
828
|
+
clearStoredImagePaths();
|
|
829
|
+
clearAllSessions();
|
|
830
|
+
if (!hasPreserved)
|
|
831
|
+
clearAllPendingCallbacks();
|
|
832
|
+
if (process.env.USER_TYPE === "ant") {
|
|
833
|
+
import("./chunk-jx817w05.js").then(({ clearSessionsWithTungstenUsage, resetInitializationState }) => {
|
|
834
|
+
clearSessionsWithTungstenUsage();
|
|
835
|
+
resetInitializationState();
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
if (false) {}
|
|
839
|
+
clearRepositoryCaches();
|
|
840
|
+
clearCommandPrefixCaches();
|
|
841
|
+
if (!hasPreserved)
|
|
842
|
+
clearAllDumpState();
|
|
843
|
+
clearInvokedSkills(preservedAgentIds);
|
|
844
|
+
clearResolveGitDirCache();
|
|
845
|
+
clearDynamicSkills();
|
|
846
|
+
resetAllLSPDiagnosticState();
|
|
847
|
+
clearTrackedMagicDocs();
|
|
848
|
+
clearSessionEnvVars();
|
|
849
|
+
import("./chunk-d1qhftze.js").then(({ clearWebFetchCache }) => clearWebFetchCache());
|
|
850
|
+
import("./chunk-7ds8zqar.js").then(({ clearToolSearchDescriptionCache }) => clearToolSearchDescriptionCache());
|
|
851
|
+
import("./chunk-qy2z2p0b.js").then(({ clearAgentDefinitionsCache }) => clearAgentDefinitionsCache());
|
|
852
|
+
import("./chunk-9hzxd5q3.js").then(({ clearPromptCache }) => clearPromptCache());
|
|
853
|
+
}
|
|
854
|
+
var init_caches = __esm(() => {
|
|
855
|
+
init_state();
|
|
856
|
+
init_commands2();
|
|
857
|
+
init_common();
|
|
858
|
+
init_context();
|
|
859
|
+
init_fileSuggestions();
|
|
860
|
+
init_useSwarmPermissionPoller();
|
|
861
|
+
init_dumpPrompts();
|
|
862
|
+
init_promptCacheBreakDetection();
|
|
863
|
+
init_sessionIngress();
|
|
864
|
+
init_postCompactCleanup();
|
|
865
|
+
init_LSPDiagnosticRegistry();
|
|
866
|
+
init_magicDocs();
|
|
867
|
+
init_loadSkillsDir();
|
|
868
|
+
init_attachments();
|
|
869
|
+
init_commands();
|
|
870
|
+
init_claudemd();
|
|
871
|
+
init_detectRepository();
|
|
872
|
+
init_gitFilesystem();
|
|
873
|
+
init_imageStore();
|
|
874
|
+
init_sessionEnvVars();
|
|
875
|
+
});
|
|
876
|
+
|
|
877
|
+
export { onIndexBuildComplete, findLongestCommonPrefix, startBackgroundCacheRefresh, generateFileSuggestions, applyFileSuggestion, init_fileSuggestions, clearSessionCaches, init_caches };
|