jialing-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 +97 -0
- package/dist/chunk-065m026w.js +97 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0975ccyw.js +265 -0
- package/dist/chunk-09n3fjx5.js +67 -0
- package/dist/chunk-0bdjdzew.js +41 -0
- package/dist/chunk-0ce6kd7y.js +212 -0
- package/dist/chunk-0e1xsncc.js +969 -0
- package/dist/chunk-0m2861gw.js +154 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0rg6yrhy.js +99 -0
- package/dist/chunk-0sakxrcf.js +643 -0
- package/dist/chunk-0v9hwxvz.js +105 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0vvfnhhv.js +248 -0
- package/dist/chunk-0w4rsycj.js +145 -0
- package/dist/chunk-0x9b2nmd.js +63 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-13d1842d.js +154 -0
- package/dist/chunk-1921a6yb.js +32 -0
- package/dist/chunk-1ad8mk9g.js +527 -0
- package/dist/chunk-1ax41pws.js +28 -0
- package/dist/chunk-1c8z1b5v.js +16 -0
- package/dist/chunk-1cbn5kxf.js +7 -0
- package/dist/chunk-1eapde8a.js +726 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1jggnf7z.js +85 -0
- package/dist/chunk-1k92pn9c.js +32 -0
- package/dist/chunk-1qakq4sn.js +802 -0
- package/dist/chunk-1rvz0433.js +722 -0
- package/dist/chunk-1xkekb9y.js +19 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-24ge0eqa.js +106 -0
- package/dist/chunk-278vghwm.js +5395 -0
- package/dist/chunk-27xc1csx.js +104 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2aa02aw6.js +438 -0
- package/dist/chunk-2eykm0j0.js +20 -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-2sd2w2h4.js +44 -0
- package/dist/chunk-2tw2ve8h.js +145 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-3aavh06g.js +1581 -0
- package/dist/chunk-3b0yvt2h.js +469 -0
- package/dist/chunk-3be7ka25.js +56 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3dyxka97.js +584 -0
- package/dist/chunk-3f7rypmf.js +16544 -0
- package/dist/chunk-3fsd7f51.js +93 -0
- package/dist/chunk-3gqdqmzb.js +75 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3m84sret.js +71 -0
- package/dist/chunk-3nb7j3js.js +96 -0
- package/dist/chunk-3p08nvn2.js +98 -0
- package/dist/chunk-3r09htpc.js +318 -0
- package/dist/chunk-3r24h7t6.js +113 -0
- package/dist/chunk-3rkfxjtq.js +80 -0
- package/dist/chunk-3tmk7dc2.js +604 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-43qjymy5.js +92 -0
- package/dist/chunk-44fpr6jq.js +434 -0
- package/dist/chunk-45kxdsp8.js +444 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4ba796se.js +1095 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4h53xj8n.js +3445 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4jy9dtwk.js +116 -0
- package/dist/chunk-4p60dd45.js +55 -0
- package/dist/chunk-4z0jsrqg.js +81 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-55wgxwa9.js +13877 -0
- package/dist/chunk-5dbk24zg.js +890 -0
- package/dist/chunk-5hzvp4va.js +115 -0
- package/dist/chunk-5kbt1mbt.js +500 -0
- package/dist/chunk-5pen7vr8.js +176 -0
- package/dist/chunk-5r280eng.js +198 -0
- package/dist/chunk-5srym52s.js +88 -0
- package/dist/chunk-600kg7k6.js +41 -0
- package/dist/chunk-616w0qj3.js +160 -0
- package/dist/chunk-62jw1t8c.js +94 -0
- package/dist/chunk-62xmt9mk.js +372 -0
- package/dist/chunk-64bvg7c3.js +229 -0
- package/dist/chunk-65yhe4s0.js +281 -0
- package/dist/chunk-6aewh27m.js +102 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6exxdk1p.js +6956 -0
- package/dist/chunk-6f5j8fs0.js +752 -0
- package/dist/chunk-6g62sjpf.js +328 -0
- package/dist/chunk-6gecq2ta.js +1493 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6kpbgc5w.js +23 -0
- package/dist/chunk-6kseqw79.js +154 -0
- package/dist/chunk-6mxm1qd0.js +40764 -0
- package/dist/chunk-6n2qgm9v.js +8 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-6wsdhj3v.js +93 -0
- package/dist/chunk-6zw9fhgb.js +4389 -0
- package/dist/chunk-71grc1mw.js +111 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-748feghg.js +604 -0
- package/dist/chunk-75e8gtg9.js +84 -0
- package/dist/chunk-75th4717.js +780 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-778fnx46.js +472 -0
- package/dist/chunk-77g09znh.js +391 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7m2nd8da.js +110 -0
- package/dist/chunk-7n35vjtw.js +444 -0
- package/dist/chunk-7n5ss4sh.js +144 -0
- package/dist/chunk-7rjnxcfe.js +107 -0
- package/dist/chunk-7sb5axvf.js +122 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7ymfj7m3.js +151 -0
- package/dist/chunk-7z8j9qfn.js +121 -0
- package/dist/chunk-7zsapntc.js +216 -0
- package/dist/chunk-805fhkfh.js +908 -0
- package/dist/chunk-80k1nj24.js +253 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-85cypsdd.js +92 -0
- package/dist/chunk-8760caxf.js +2644 -0
- package/dist/chunk-88f6egg6.js +387 -0
- package/dist/chunk-88r7kwgj.js +22 -0
- package/dist/chunk-89e1v45e.js +463 -0
- package/dist/chunk-8bedvdm1.js +32 -0
- package/dist/chunk-8c4x4vdz.js +177 -0
- package/dist/chunk-8hq5kk3y.js +44 -0
- package/dist/chunk-8ngxagxq.js +18 -0
- package/dist/chunk-8tnsngw2.js +31 -0
- package/dist/chunk-8wjnca8h.js +307 -0
- package/dist/chunk-8y12jxg8.js +10 -0
- package/dist/chunk-8ymf4e6z.js +48 -0
- package/dist/chunk-90wp6wez.js +10510 -0
- package/dist/chunk-92bp5bnf.js +650 -0
- package/dist/chunk-92q8sx5z.js +90 -0
- package/dist/chunk-958rtmtx.js +10476 -0
- package/dist/chunk-9e2kqv5g.js +125 -0
- package/dist/chunk-9f4f1hy5.js +281 -0
- package/dist/chunk-9gbamk79.js +93 -0
- package/dist/chunk-9k5s3ryh.js +167 -0
- package/dist/chunk-9xzfqm15.js +97 -0
- package/dist/chunk-9zgdvbm6.js +110 -0
- package/dist/chunk-a0p3q8jw.js +24 -0
- package/dist/chunk-a22sayzp.js +220 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a8gj9d9z.js +120 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9yev47v.js +674 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-ack5mfba.js +105 -0
- package/dist/chunk-ae76ded0.js +30 -0
- package/dist/chunk-akjw4dh6.js +538 -0
- package/dist/chunk-asc6wz4q.js +1188 -0
- package/dist/chunk-atqejh3p.js +273 -0
- package/dist/chunk-atv2e6b7.js +61 -0
- package/dist/chunk-axvvkwz8.js +1551 -0
- package/dist/chunk-azgz7kj9.js +38 -0
- package/dist/chunk-b3zave8q.js +275 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b8b13qn2.js +100 -0
- package/dist/chunk-bg3mt9bm.js +28 -0
- package/dist/chunk-bh4jvcjn.js +91 -0
- package/dist/chunk-bhdt6k7w.js +15 -0
- package/dist/chunk-bm1qb16p.js +17 -0
- package/dist/chunk-bpvsd1j1.js +266 -0
- package/dist/chunk-bqfnp99q.js +477 -0
- package/dist/chunk-bsbmmfyt.js +17 -0
- package/dist/chunk-bsbt34jm.js +42 -0
- package/dist/chunk-c78akdhr.js +458 -0
- package/dist/chunk-cdz5yb0r.js +57 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-ckh4r5er.js +257 -0
- package/dist/chunk-cmgjnvn9.js +89 -0
- package/dist/chunk-cpjgvay8.js +687 -0
- package/dist/chunk-crfryjx9.js +276 -0
- package/dist/chunk-ctw5jwcd.js +213 -0
- package/dist/chunk-cvy3vntc.js +65 -0
- package/dist/chunk-cwbzz504.js +94 -0
- package/dist/chunk-cy2hswr1.js +15 -0
- package/dist/chunk-cyejkay3.js +222 -0
- package/dist/chunk-d18z9pna.js +106 -0
- package/dist/chunk-d5cq0n0v.js +162 -0
- package/dist/chunk-db45aryp.js +50 -0
- package/dist/chunk-de8nqh0z.js +790 -0
- package/dist/chunk-dfw6h350.js +2336 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dn75ptgd.js +184 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dpshyv9m.js +90 -0
- package/dist/chunk-dt8cdvnm.js +642 -0
- package/dist/chunk-dtxby6fr.js +306 -0
- package/dist/chunk-dv1wfr85.js +6373 -0
- package/dist/chunk-dw363edx.js +1154 -0
- package/dist/chunk-dwrdacck.js +62 -0
- package/dist/chunk-dxnnv5e3.js +276 -0
- package/dist/chunk-e3g8q4cn.js +1646 -0
- package/dist/chunk-e3m9k9s2.js +542 -0
- package/dist/chunk-e4q49asn.js +155 -0
- package/dist/chunk-e5pntxye.js +37 -0
- package/dist/chunk-e7393td6.js +42 -0
- package/dist/chunk-ead42yrh.js +87 -0
- package/dist/chunk-eb90vwvr.js +152 -0
- package/dist/chunk-ecvwk9hg.js +250 -0
- package/dist/chunk-edjd6aay.js +173 -0
- package/dist/chunk-eg0h8mtm.js +130 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-ek686gx1.js +94 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-evhwt0ar.js +1015 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-ewsgsw9h.js +172291 -0
- package/dist/chunk-f0pa0r7e.js +3198 -0
- package/dist/chunk-f2mhrmww.js +62 -0
- package/dist/chunk-f39zxvwn.js +401 -0
- package/dist/chunk-f46z54tq.js +374 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-f60q23az.js +3038 -0
- package/dist/chunk-f6v2nz57.js +107 -0
- package/dist/chunk-f6yjan38.js +38 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fem4s778.js +70 -0
- package/dist/chunk-fezm1kn8.js +376 -0
- package/dist/chunk-fm1n3ysp.js +6108 -0
- package/dist/chunk-frg83bfw.js +225 -0
- package/dist/chunk-fscm8db0.js +692 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-g0j0t6qk.js +26 -0
- package/dist/chunk-g0nc1ftf.js +849 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g3t0act8.js +8 -0
- package/dist/chunk-g75w4hw3.js +26 -0
- package/dist/chunk-g8vp82en.js +1866 -0
- package/dist/chunk-gax0fcbx.js +182 -0
- package/dist/chunk-gsz4dh3y.js +606 -0
- package/dist/chunk-gtfffm7h.js +440 -0
- package/dist/chunk-gver9zb9.js +420 -0
- package/dist/chunk-gyj242zr.js +20 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h14kemnk.js +123 -0
- package/dist/chunk-h8wj1a74.js +8960 -0
- package/dist/chunk-h9mcb2eg.js +87 -0
- package/dist/chunk-h9nh2980.js +91 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hbc6ymdv.js +55 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hjhc4cpt.js +69 -0
- package/dist/chunk-hjwez8qc.js +5018 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hqmz36b3.js +552 -0
- package/dist/chunk-hrzerbfw.js +1299 -0
- package/dist/chunk-hs8ph4p8.js +8 -0
- package/dist/chunk-ht1xwrnd.js +716 -0
- package/dist/chunk-hvmfg2dc.js +338 -0
- package/dist/chunk-hx2tr4ep.js +7189 -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-j49g6g3s.js +57 -0
- package/dist/chunk-j5d5hp9h.js +71 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j7tyxan1.js +116 -0
- package/dist/chunk-j8v4774z.js +424 -0
- package/dist/chunk-jafes477.js +29 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jftd4jq5.js +4521 -0
- package/dist/chunk-jkxqhv6y.js +812 -0
- package/dist/chunk-jmfr6h0n.js +120 -0
- package/dist/chunk-jn4aabmx.js +40 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jsbpm1gz.js +27 -0
- package/dist/chunk-jtcyjc3k.js +5802 -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-k3dcdnck.js +89 -0
- package/dist/chunk-k3wadzcd.js +88 -0
- package/dist/chunk-kaeshsk1.js +713 -0
- package/dist/chunk-kbkey9ed.js +522 -0
- package/dist/chunk-kcwfhqbb.js +196 -0
- package/dist/chunk-key6jr7p.js +224 -0
- package/dist/chunk-knay8cy9.js +173 -0
- package/dist/chunk-kr3rg2y1.js +95 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m06q12hg.js +61 -0
- package/dist/chunk-m2mcpbhk.js +43 -0
- package/dist/chunk-m8v220gz.js +71 -0
- package/dist/chunk-mgpqy78h.js +208 -0
- package/dist/chunk-mkejwh4t.js +16 -0
- package/dist/chunk-mptyw5n1.js +107 -0
- package/dist/chunk-mqajm0dp.js +66 -0
- package/dist/chunk-mrksbgxj.js +490 -0
- package/dist/chunk-msjfc5ba.js +246 -0
- package/dist/chunk-mt25echc.js +6157 -0
- package/dist/chunk-mt3jfnr8.js +277 -0
- package/dist/chunk-mtn242d4.js +9300 -0
- package/dist/chunk-mzfkvave.js +169 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n1erf6kh.js +22820 -0
- package/dist/chunk-n2avk1r2.js +61 -0
- package/dist/chunk-n6atnpcq.js +765 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-ncnfzby5.js +822 -0
- package/dist/chunk-ncnr1jtf.js +2058 -0
- package/dist/chunk-nerv0jvx.js +74 -0
- package/dist/chunk-ngd2abep.js +90 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nnaxkc2z.js +128 -0
- package/dist/chunk-npyrtj8j.js +691 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nrmffak7.js +114 -0
- package/dist/chunk-nsz546wq.js +1170 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nv64x1z5.js +86 -0
- package/dist/chunk-nxsh6de2.js +1711 -0
- package/dist/chunk-nz4getcr.js +40 -0
- package/dist/chunk-p1f607pa.js +83 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p4r5y02t.js +90 -0
- package/dist/chunk-p7g7pf3f.js +336 -0
- package/dist/chunk-pb4ad8r2.js +110 -0
- package/dist/chunk-pbrhz0zr.js +716 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pwnt3veb.js +103 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-px3w0kde.js +299 -0
- package/dist/chunk-pzn777jb.js +756 -0
- package/dist/chunk-q25bjaev.js +15 -0
- package/dist/chunk-q5by3da6.js +8 -0
- package/dist/chunk-q6av622g.js +38 -0
- package/dist/chunk-q6xkvtf2.js +1318 -0
- package/dist/chunk-q81jx1tq.js +476 -0
- package/dist/chunk-qehb6fk5.js +339 -0
- package/dist/chunk-qj1avx1q.js +87 -0
- package/dist/chunk-qn2dxr66.js +105 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp18kd4h.js +48 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qpjy9tcf.js +133 -0
- package/dist/chunk-qqfa0dqg.js +2343 -0
- package/dist/chunk-qwh3htcz.js +202 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-r3vakcs1.js +496 -0
- package/dist/chunk-r66hz8j6.js +34 -0
- package/dist/chunk-r6b58y3x.js +17 -0
- package/dist/chunk-rekp48rk.js +62 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rs1xrs6m.js +534 -0
- package/dist/chunk-rs45skes.js +123 -0
- package/dist/chunk-rzszqp82.js +524 -0
- package/dist/chunk-s274nv8k.js +8 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s9mesaw0.js +26840 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-sdj9b9wh.js +782 -0
- package/dist/chunk-sdw2q69p.js +227 -0
- package/dist/chunk-sfgp9cc0.js +130 -0
- package/dist/chunk-spqaamnc.js +63 -0
- package/dist/chunk-spzrs4df.js +73 -0
- package/dist/chunk-sxkr7k43.js +55 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t0rgmccj.js +39 -0
- package/dist/chunk-t1nnzjgg.js +17 -0
- package/dist/chunk-t94fcnt8.js +566 -0
- package/dist/chunk-tjaqa99q.js +125 -0
- package/dist/chunk-tjq2evtw.js +328 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-tw0q7ynt.js +59 -0
- package/dist/chunk-v02jkvgy.js +131 -0
- package/dist/chunk-v084bqt3.js +1529 -0
- package/dist/chunk-v0amythm.js +164 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v1mgv1et.js +15 -0
- package/dist/chunk-v399mzxk.js +58 -0
- package/dist/chunk-v3gm2day.js +8 -0
- package/dist/chunk-v43hrrxp.js +71 -0
- package/dist/chunk-v6aqb2aj.js +102 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v7qmhjdn.js +1921 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-vdw93s4h.js +2431 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vratq94g.js +349 -0
- package/dist/chunk-vrz7t3m3.js +20 -0
- package/dist/chunk-vtb185z9.js +70 -0
- package/dist/chunk-vx01rvg8.js +654 -0
- package/dist/chunk-vyc0rjyx.js +31 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-vzpffsza.js +269 -0
- package/dist/chunk-w2ef3kxk.js +3353 -0
- package/dist/chunk-w2z5pqd3.js +336 -0
- package/dist/chunk-w3whm4mn.js +432 -0
- package/dist/chunk-w7wgpqcp.js +157 -0
- package/dist/chunk-waa00cvb.js +301 -0
- package/dist/chunk-wb0qm4es.js +155 -0
- package/dist/chunk-wbkahkdc.js +27 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wn0cx0pt.js +283 -0
- package/dist/chunk-wv6gzt9c.js +726 -0
- package/dist/chunk-wx42ycm4.js +998 -0
- package/dist/chunk-wxkpgy05.js +268 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x0mwzt38.js +714 -0
- package/dist/chunk-x592wbfh.js +244 -0
- package/dist/chunk-x5pqsp9r.js +100 -0
- package/dist/chunk-x679thag.js +825 -0
- package/dist/chunk-x8b7vft8.js +132 -0
- package/dist/chunk-x8cftch7.js +119 -0
- package/dist/chunk-x9q7r885.js +348 -0
- package/dist/chunk-xawkt0vb.js +1585 -0
- package/dist/chunk-xdw5dv00.js +8 -0
- package/dist/chunk-xe9cc860.js +287 -0
- package/dist/chunk-xjr9c3vt.js +101 -0
- package/dist/chunk-xk7zaqta.js +21933 -0
- package/dist/chunk-xktbmawc.js +678 -0
- package/dist/chunk-xn6yw46v.js +140 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xszk7n10.js +14358 -0
- package/dist/chunk-xt8a5r1t.js +84 -0
- package/dist/chunk-xydyndkv.js +195 -0
- package/dist/chunk-xzt10yc5.js +60 -0
- package/dist/chunk-y04y95dr.js +91 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y1x32h3x.js +128 -0
- package/dist/chunk-y3s7aww5.js +99 -0
- package/dist/chunk-y47cg3kz.js +42 -0
- package/dist/chunk-y7kzvepn.js +469 -0
- package/dist/chunk-y89kbsyc.js +287 -0
- package/dist/chunk-yd87p1c3.js +159 -0
- package/dist/chunk-yf3yw8fw.js +105 -0
- package/dist/chunk-ygbf0ezx.js +1391 -0
- package/dist/chunk-yjbxnshv.js +208 -0
- package/dist/chunk-ynednmqd.js +192 -0
- package/dist/chunk-yvhez44y.js +259 -0
- package/dist/chunk-ywxd4qw4.js +22 -0
- package/dist/chunk-yzrmgpy4.js +117 -0
- package/dist/chunk-z0b2vb24.js +862 -0
- package/dist/chunk-z1zj044v.js +655 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z3w0xasa.js +165 -0
- package/dist/chunk-z7ycmrb3.js +644 -0
- package/dist/chunk-zh11tdkb.js +347 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-zqfqcf22.js +229 -0
- package/dist/chunk-zqk2j8px.js +699 -0
- package/dist/chunk-zqvsc10j.js +2833 -0
- package/dist/chunk-zsfxha74.js +17655 -0
- package/dist/chunk-zvc4snyb.js +117 -0
- package/dist/cli.js +194 -0
- package/package.json +173 -0
|
@@ -0,0 +1,1921 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
Select,
|
|
4
|
+
getAllHooks,
|
|
5
|
+
getHookDisplayText,
|
|
6
|
+
getTools,
|
|
7
|
+
hookSourceDescriptionDisplayString,
|
|
8
|
+
hookSourceHeaderDisplayString,
|
|
9
|
+
hookSourceInlineDisplayString,
|
|
10
|
+
init_AppState,
|
|
11
|
+
init_hooksSettings,
|
|
12
|
+
init_select,
|
|
13
|
+
init_tools1 as init_tools,
|
|
14
|
+
init_useSettingsChange,
|
|
15
|
+
sortMatchersByPriority,
|
|
16
|
+
useAppState,
|
|
17
|
+
useAppStateStore,
|
|
18
|
+
useSettingsChange
|
|
19
|
+
} from "./chunk-ewsgsw9h.js";
|
|
20
|
+
import"./chunk-z1zj044v.js";
|
|
21
|
+
import"./chunk-t0rgmccj.js";
|
|
22
|
+
import"./chunk-key6jr7p.js";
|
|
23
|
+
import"./chunk-0m2861gw.js";
|
|
24
|
+
import"./chunk-0x9b2nmd.js";
|
|
25
|
+
import {
|
|
26
|
+
Dialog,
|
|
27
|
+
init_Dialog
|
|
28
|
+
} from "./chunk-89e1v45e.js";
|
|
29
|
+
import"./chunk-2gzv8nrw.js";
|
|
30
|
+
import"./chunk-ehtwnxpg.js";
|
|
31
|
+
import"./chunk-3be7ka25.js";
|
|
32
|
+
import"./chunk-x679thag.js";
|
|
33
|
+
import"./chunk-cgfdkzhb.js";
|
|
34
|
+
import"./chunk-bhdt6k7w.js";
|
|
35
|
+
import"./chunk-45kxdsp8.js";
|
|
36
|
+
import"./chunk-5dbk24zg.js";
|
|
37
|
+
import"./chunk-msjfc5ba.js";
|
|
38
|
+
import"./chunk-7zsapntc.js";
|
|
39
|
+
import"./chunk-0rg6yrhy.js";
|
|
40
|
+
import"./chunk-9gbamk79.js";
|
|
41
|
+
import"./chunk-x0mwzt38.js";
|
|
42
|
+
import"./chunk-9e2kqv5g.js";
|
|
43
|
+
import {
|
|
44
|
+
init_useKeybinding,
|
|
45
|
+
useKeybinding
|
|
46
|
+
} from "./chunk-1qakq4sn.js";
|
|
47
|
+
import {
|
|
48
|
+
Link,
|
|
49
|
+
ThemedBox_default,
|
|
50
|
+
ThemedText,
|
|
51
|
+
init_ink,
|
|
52
|
+
require_compiler_runtime
|
|
53
|
+
} from "./chunk-s9mesaw0.js";
|
|
54
|
+
import"./chunk-7m2nd8da.js";
|
|
55
|
+
import"./chunk-ps49ymvj.js";
|
|
56
|
+
import {
|
|
57
|
+
require_jsx_dev_runtime,
|
|
58
|
+
require_react
|
|
59
|
+
} from "./chunk-g338npwr.js";
|
|
60
|
+
import"./chunk-zk2wsm7d.js";
|
|
61
|
+
import"./chunk-tw0q7ynt.js";
|
|
62
|
+
import"./chunk-xe9cc860.js";
|
|
63
|
+
import"./chunk-m06q12hg.js";
|
|
64
|
+
import"./chunk-ygbf0ezx.js";
|
|
65
|
+
import"./chunk-spqaamnc.js";
|
|
66
|
+
import"./chunk-4jm600zv.js";
|
|
67
|
+
import"./chunk-qz2x630m.js";
|
|
68
|
+
import"./chunk-7sb5axvf.js";
|
|
69
|
+
import"./chunk-v9smspw2.js";
|
|
70
|
+
import {
|
|
71
|
+
getSettingsForSource,
|
|
72
|
+
getSettings_DEPRECATED,
|
|
73
|
+
init_settings1 as init_settings,
|
|
74
|
+
init_stringUtils,
|
|
75
|
+
plural
|
|
76
|
+
} from "./chunk-3f7rypmf.js";
|
|
77
|
+
import"./chunk-e3g8q4cn.js";
|
|
78
|
+
import"./chunk-ctw5jwcd.js";
|
|
79
|
+
import"./chunk-0e1xsncc.js";
|
|
80
|
+
import"./chunk-vratq94g.js";
|
|
81
|
+
import"./chunk-g0j0t6qk.js";
|
|
82
|
+
import"./chunk-6kpbgc5w.js";
|
|
83
|
+
import"./chunk-3c25bcsw.js";
|
|
84
|
+
import"./chunk-tjaqa99q.js";
|
|
85
|
+
import"./chunk-55wgxwa9.js";
|
|
86
|
+
import"./chunk-w2z5pqd3.js";
|
|
87
|
+
import"./chunk-7ymfj7m3.js";
|
|
88
|
+
import"./chunk-f5ma3nh5.js";
|
|
89
|
+
import"./chunk-v1kzp02e.js";
|
|
90
|
+
import"./chunk-1eapde8a.js";
|
|
91
|
+
import"./chunk-p2816w9z.js";
|
|
92
|
+
import"./chunk-0vkfrmqm.js";
|
|
93
|
+
import"./chunk-0xjaqda8.js";
|
|
94
|
+
import"./chunk-1rvz0433.js";
|
|
95
|
+
import"./chunk-cdz5yb0r.js";
|
|
96
|
+
import {
|
|
97
|
+
init_analytics,
|
|
98
|
+
logEvent
|
|
99
|
+
} from "./chunk-f2mhrmww.js";
|
|
100
|
+
import"./chunk-7z8j9qfn.js";
|
|
101
|
+
import"./chunk-hrzerbfw.js";
|
|
102
|
+
import"./chunk-d18z9pna.js";
|
|
103
|
+
import"./chunk-qnfx3qtx.js";
|
|
104
|
+
import"./chunk-hjhc4cpt.js";
|
|
105
|
+
import"./chunk-vyc0rjyx.js";
|
|
106
|
+
import {
|
|
107
|
+
figures_default,
|
|
108
|
+
init_figures
|
|
109
|
+
} from "./chunk-hx2tr4ep.js";
|
|
110
|
+
import"./chunk-p7g7pf3f.js";
|
|
111
|
+
import"./chunk-8tnsngw2.js";
|
|
112
|
+
import"./chunk-8bedvdm1.js";
|
|
113
|
+
import"./chunk-7wm5s02e.js";
|
|
114
|
+
import"./chunk-nxsh6de2.js";
|
|
115
|
+
import"./chunk-fbv4apne.js";
|
|
116
|
+
import"./chunk-3r24h7t6.js";
|
|
117
|
+
import {
|
|
118
|
+
getRegisteredHooks,
|
|
119
|
+
init_state
|
|
120
|
+
} from "./chunk-qqfa0dqg.js";
|
|
121
|
+
import {
|
|
122
|
+
init_memoize,
|
|
123
|
+
memoize_default
|
|
124
|
+
} from "./chunk-hqmz36b3.js";
|
|
125
|
+
import"./chunk-4g3v8y12.js";
|
|
126
|
+
import"./chunk-7739pg2c.js";
|
|
127
|
+
import"./chunk-xszk7n10.js";
|
|
128
|
+
import"./chunk-sdj9b9wh.js";
|
|
129
|
+
import {
|
|
130
|
+
__esm,
|
|
131
|
+
__toESM
|
|
132
|
+
} from "./chunk-qp2qdcda.js";
|
|
133
|
+
|
|
134
|
+
// src/utils/hooks/hooksConfigManager.ts
|
|
135
|
+
function groupHooksByEventAndMatcher(appState, toolNames) {
|
|
136
|
+
const grouped = {
|
|
137
|
+
PreToolUse: {},
|
|
138
|
+
PostToolUse: {},
|
|
139
|
+
PostToolUseFailure: {},
|
|
140
|
+
PermissionDenied: {},
|
|
141
|
+
Notification: {},
|
|
142
|
+
UserPromptSubmit: {},
|
|
143
|
+
SessionStart: {},
|
|
144
|
+
SessionEnd: {},
|
|
145
|
+
Stop: {},
|
|
146
|
+
StopFailure: {},
|
|
147
|
+
SubagentStart: {},
|
|
148
|
+
SubagentStop: {},
|
|
149
|
+
PreCompact: {},
|
|
150
|
+
PostCompact: {},
|
|
151
|
+
PermissionRequest: {},
|
|
152
|
+
Setup: {},
|
|
153
|
+
TeammateIdle: {},
|
|
154
|
+
TaskCreated: {},
|
|
155
|
+
TaskCompleted: {},
|
|
156
|
+
Elicitation: {},
|
|
157
|
+
ElicitationResult: {},
|
|
158
|
+
ConfigChange: {},
|
|
159
|
+
WorktreeCreate: {},
|
|
160
|
+
WorktreeRemove: {},
|
|
161
|
+
InstructionsLoaded: {},
|
|
162
|
+
CwdChanged: {},
|
|
163
|
+
FileChanged: {}
|
|
164
|
+
};
|
|
165
|
+
const metadata = getHookEventMetadata(toolNames);
|
|
166
|
+
getAllHooks(appState).forEach((hook) => {
|
|
167
|
+
const eventGroup = grouped[hook.event];
|
|
168
|
+
if (eventGroup) {
|
|
169
|
+
const matcherKey = metadata[hook.event].matcherMetadata !== undefined ? hook.matcher || "" : "";
|
|
170
|
+
if (!eventGroup[matcherKey]) {
|
|
171
|
+
eventGroup[matcherKey] = [];
|
|
172
|
+
}
|
|
173
|
+
eventGroup[matcherKey].push(hook);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
const registeredHooks = getRegisteredHooks();
|
|
177
|
+
if (registeredHooks) {
|
|
178
|
+
for (const [event, matchers] of Object.entries(registeredHooks)) {
|
|
179
|
+
const hookEvent = event;
|
|
180
|
+
const eventGroup = grouped[hookEvent];
|
|
181
|
+
if (!eventGroup)
|
|
182
|
+
continue;
|
|
183
|
+
for (const matcher of matchers) {
|
|
184
|
+
const matcherKey = matcher.matcher || "";
|
|
185
|
+
if ("pluginRoot" in matcher) {
|
|
186
|
+
eventGroup[matcherKey] ??= [];
|
|
187
|
+
for (const hook of matcher.hooks) {
|
|
188
|
+
eventGroup[matcherKey].push({
|
|
189
|
+
event: hookEvent,
|
|
190
|
+
config: hook,
|
|
191
|
+
matcher: matcher.matcher,
|
|
192
|
+
source: "pluginHook",
|
|
193
|
+
pluginName: matcher.pluginId
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
} else if (process.env.USER_TYPE === "ant") {
|
|
197
|
+
eventGroup[matcherKey] ??= [];
|
|
198
|
+
for (const _hook of matcher.hooks) {
|
|
199
|
+
eventGroup[matcherKey].push({
|
|
200
|
+
event: hookEvent,
|
|
201
|
+
config: {
|
|
202
|
+
type: "command",
|
|
203
|
+
command: "[ANT-ONLY] Built-in Hook"
|
|
204
|
+
},
|
|
205
|
+
matcher: matcher.matcher,
|
|
206
|
+
source: "builtinHook"
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return grouped;
|
|
214
|
+
}
|
|
215
|
+
function getSortedMatchersForEvent(hooksByEventAndMatcher, event) {
|
|
216
|
+
const matchers = Object.keys(hooksByEventAndMatcher[event] || {});
|
|
217
|
+
return sortMatchersByPriority(matchers, hooksByEventAndMatcher, event);
|
|
218
|
+
}
|
|
219
|
+
function getHooksForMatcher(hooksByEventAndMatcher, event, matcher) {
|
|
220
|
+
const matcherKey = matcher ?? "";
|
|
221
|
+
return hooksByEventAndMatcher[event]?.[matcherKey] ?? [];
|
|
222
|
+
}
|
|
223
|
+
function getMatcherMetadata(event, toolNames) {
|
|
224
|
+
return getHookEventMetadata(toolNames)[event].matcherMetadata;
|
|
225
|
+
}
|
|
226
|
+
var getHookEventMetadata;
|
|
227
|
+
var init_hooksConfigManager = __esm(() => {
|
|
228
|
+
init_memoize();
|
|
229
|
+
init_state();
|
|
230
|
+
init_hooksSettings();
|
|
231
|
+
getHookEventMetadata = memoize_default(function(toolNames) {
|
|
232
|
+
return {
|
|
233
|
+
PreToolUse: {
|
|
234
|
+
summary: "Before tool execution",
|
|
235
|
+
description: `Input to command is JSON of tool call arguments.
|
|
236
|
+
Exit code 0 - stdout/stderr not shown
|
|
237
|
+
Exit code 2 - show stderr to model and block tool call
|
|
238
|
+
Other exit codes - show stderr to user only but continue with tool call`,
|
|
239
|
+
matcherMetadata: {
|
|
240
|
+
fieldToMatch: "tool_name",
|
|
241
|
+
values: toolNames
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
PostToolUse: {
|
|
245
|
+
summary: "After tool execution",
|
|
246
|
+
description: `Input to command is JSON with fields "inputs" (tool call arguments) and "response" (tool call response).
|
|
247
|
+
Exit code 0 - stdout shown in transcript mode (ctrl+o)
|
|
248
|
+
Exit code 2 - show stderr to model immediately
|
|
249
|
+
Other exit codes - show stderr to user only`,
|
|
250
|
+
matcherMetadata: {
|
|
251
|
+
fieldToMatch: "tool_name",
|
|
252
|
+
values: toolNames
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
PostToolUseFailure: {
|
|
256
|
+
summary: "After tool execution fails",
|
|
257
|
+
description: `Input to command is JSON with tool_name, tool_input, tool_use_id, error, error_type, is_interrupt, and is_timeout.
|
|
258
|
+
Exit code 0 - stdout shown in transcript mode (ctrl+o)
|
|
259
|
+
Exit code 2 - show stderr to model immediately
|
|
260
|
+
Other exit codes - show stderr to user only`,
|
|
261
|
+
matcherMetadata: {
|
|
262
|
+
fieldToMatch: "tool_name",
|
|
263
|
+
values: toolNames
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
PermissionDenied: {
|
|
267
|
+
summary: "After auto mode classifier denies a tool call",
|
|
268
|
+
description: `Input to command is JSON with tool_name, tool_input, tool_use_id, and reason.
|
|
269
|
+
Return {"hookSpecificOutput":{"hookEventName":"PermissionDenied","retry":true}} to tell the model it may retry.
|
|
270
|
+
Exit code 0 - stdout shown in transcript mode (ctrl+o)
|
|
271
|
+
Other exit codes - show stderr to user only`,
|
|
272
|
+
matcherMetadata: {
|
|
273
|
+
fieldToMatch: "tool_name",
|
|
274
|
+
values: toolNames
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
Notification: {
|
|
278
|
+
summary: "When notifications are sent",
|
|
279
|
+
description: `Input to command is JSON with notification message and type.
|
|
280
|
+
Exit code 0 - stdout/stderr not shown
|
|
281
|
+
Other exit codes - show stderr to user only`,
|
|
282
|
+
matcherMetadata: {
|
|
283
|
+
fieldToMatch: "notification_type",
|
|
284
|
+
values: [
|
|
285
|
+
"permission_prompt",
|
|
286
|
+
"idle_prompt",
|
|
287
|
+
"auth_success",
|
|
288
|
+
"elicitation_dialog",
|
|
289
|
+
"elicitation_complete",
|
|
290
|
+
"elicitation_response"
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
UserPromptSubmit: {
|
|
295
|
+
summary: "When the user submits a prompt",
|
|
296
|
+
description: `Input to command is JSON with original user prompt text.
|
|
297
|
+
Exit code 0 - stdout shown to Claude
|
|
298
|
+
Exit code 2 - block processing, erase original prompt, and show stderr to user only
|
|
299
|
+
Other exit codes - show stderr to user only`
|
|
300
|
+
},
|
|
301
|
+
SessionStart: {
|
|
302
|
+
summary: "When a new session is started",
|
|
303
|
+
description: `Input to command is JSON with session start source.
|
|
304
|
+
Exit code 0 - stdout shown to Claude
|
|
305
|
+
Blocking errors are ignored
|
|
306
|
+
Other exit codes - show stderr to user only`,
|
|
307
|
+
matcherMetadata: {
|
|
308
|
+
fieldToMatch: "source",
|
|
309
|
+
values: ["startup", "resume", "clear", "compact"]
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
Stop: {
|
|
313
|
+
summary: "Right before Claude concludes its response",
|
|
314
|
+
description: `Exit code 0 - stdout/stderr not shown
|
|
315
|
+
Exit code 2 - show stderr to model and continue conversation
|
|
316
|
+
Other exit codes - show stderr to user only`
|
|
317
|
+
},
|
|
318
|
+
StopFailure: {
|
|
319
|
+
summary: "When the turn ends due to an API error",
|
|
320
|
+
description: "Fires instead of Stop when an API error (rate limit, auth failure, etc.) ended the turn. Fire-and-forget \u2014 hook output and exit codes are ignored.",
|
|
321
|
+
matcherMetadata: {
|
|
322
|
+
fieldToMatch: "error",
|
|
323
|
+
values: [
|
|
324
|
+
"rate_limit",
|
|
325
|
+
"authentication_failed",
|
|
326
|
+
"billing_error",
|
|
327
|
+
"invalid_request",
|
|
328
|
+
"server_error",
|
|
329
|
+
"max_output_tokens",
|
|
330
|
+
"unknown"
|
|
331
|
+
]
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
SubagentStart: {
|
|
335
|
+
summary: "When a subagent (Agent tool call) is started",
|
|
336
|
+
description: `Input to command is JSON with agent_id and agent_type.
|
|
337
|
+
Exit code 0 - stdout shown to subagent
|
|
338
|
+
Blocking errors are ignored
|
|
339
|
+
Other exit codes - show stderr to user only`,
|
|
340
|
+
matcherMetadata: {
|
|
341
|
+
fieldToMatch: "agent_type",
|
|
342
|
+
values: []
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
SubagentStop: {
|
|
346
|
+
summary: "Right before a subagent (Agent tool call) concludes its response",
|
|
347
|
+
description: `Input to command is JSON with agent_id, agent_type, and agent_transcript_path.
|
|
348
|
+
Exit code 0 - stdout/stderr not shown
|
|
349
|
+
Exit code 2 - show stderr to subagent and continue having it run
|
|
350
|
+
Other exit codes - show stderr to user only`,
|
|
351
|
+
matcherMetadata: {
|
|
352
|
+
fieldToMatch: "agent_type",
|
|
353
|
+
values: []
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
PreCompact: {
|
|
357
|
+
summary: "Before conversation compaction",
|
|
358
|
+
description: `Input to command is JSON with compaction details.
|
|
359
|
+
Exit code 0 - stdout appended as custom compact instructions
|
|
360
|
+
Exit code 2 - block compaction
|
|
361
|
+
Other exit codes - show stderr to user only but continue with compaction`,
|
|
362
|
+
matcherMetadata: {
|
|
363
|
+
fieldToMatch: "trigger",
|
|
364
|
+
values: ["manual", "auto"]
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
PostCompact: {
|
|
368
|
+
summary: "After conversation compaction",
|
|
369
|
+
description: `Input to command is JSON with compaction details and the summary.
|
|
370
|
+
Exit code 0 - stdout shown to user
|
|
371
|
+
Other exit codes - show stderr to user only`,
|
|
372
|
+
matcherMetadata: {
|
|
373
|
+
fieldToMatch: "trigger",
|
|
374
|
+
values: ["manual", "auto"]
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
SessionEnd: {
|
|
378
|
+
summary: "When a session is ending",
|
|
379
|
+
description: `Input to command is JSON with session end reason.
|
|
380
|
+
Exit code 0 - command completes successfully
|
|
381
|
+
Other exit codes - show stderr to user only`,
|
|
382
|
+
matcherMetadata: {
|
|
383
|
+
fieldToMatch: "reason",
|
|
384
|
+
values: ["clear", "logout", "prompt_input_exit", "other"]
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
PermissionRequest: {
|
|
388
|
+
summary: "When a permission dialog is displayed",
|
|
389
|
+
description: `Input to command is JSON with tool_name, tool_input, and tool_use_id.
|
|
390
|
+
Output JSON with hookSpecificOutput containing decision to allow or deny.
|
|
391
|
+
Exit code 0 - use hook decision if provided
|
|
392
|
+
Other exit codes - show stderr to user only`,
|
|
393
|
+
matcherMetadata: {
|
|
394
|
+
fieldToMatch: "tool_name",
|
|
395
|
+
values: toolNames
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
Setup: {
|
|
399
|
+
summary: "Repo setup hooks for init and maintenance",
|
|
400
|
+
description: `Input to command is JSON with trigger (init or maintenance).
|
|
401
|
+
Exit code 0 - stdout shown to Claude
|
|
402
|
+
Blocking errors are ignored
|
|
403
|
+
Other exit codes - show stderr to user only`,
|
|
404
|
+
matcherMetadata: {
|
|
405
|
+
fieldToMatch: "trigger",
|
|
406
|
+
values: ["init", "maintenance"]
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
TeammateIdle: {
|
|
410
|
+
summary: "When a teammate is about to go idle",
|
|
411
|
+
description: `Input to command is JSON with teammate_name and team_name.
|
|
412
|
+
Exit code 0 - stdout/stderr not shown
|
|
413
|
+
Exit code 2 - show stderr to teammate and prevent idle (teammate continues working)
|
|
414
|
+
Other exit codes - show stderr to user only`
|
|
415
|
+
},
|
|
416
|
+
TaskCreated: {
|
|
417
|
+
summary: "When a task is being created",
|
|
418
|
+
description: `Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
|
|
419
|
+
Exit code 0 - stdout/stderr not shown
|
|
420
|
+
Exit code 2 - show stderr to model and prevent task creation
|
|
421
|
+
Other exit codes - show stderr to user only`
|
|
422
|
+
},
|
|
423
|
+
TaskCompleted: {
|
|
424
|
+
summary: "When a task is being marked as completed",
|
|
425
|
+
description: `Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.
|
|
426
|
+
Exit code 0 - stdout/stderr not shown
|
|
427
|
+
Exit code 2 - show stderr to model and prevent task completion
|
|
428
|
+
Other exit codes - show stderr to user only`
|
|
429
|
+
},
|
|
430
|
+
Elicitation: {
|
|
431
|
+
summary: "When an MCP server requests user input (elicitation)",
|
|
432
|
+
description: `Input to command is JSON with mcp_server_name, message, and requested_schema.
|
|
433
|
+
Output JSON with hookSpecificOutput containing action (accept/decline/cancel) and optional content.
|
|
434
|
+
Exit code 0 - use hook response if provided
|
|
435
|
+
Exit code 2 - deny the elicitation
|
|
436
|
+
Other exit codes - show stderr to user only`,
|
|
437
|
+
matcherMetadata: {
|
|
438
|
+
fieldToMatch: "mcp_server_name",
|
|
439
|
+
values: []
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
ElicitationResult: {
|
|
443
|
+
summary: "After a user responds to an MCP elicitation",
|
|
444
|
+
description: `Input to command is JSON with mcp_server_name, action, content, mode, and elicitation_id.
|
|
445
|
+
Output JSON with hookSpecificOutput containing optional action and content to override the response.
|
|
446
|
+
Exit code 0 - use hook response if provided
|
|
447
|
+
Exit code 2 - block the response (action becomes decline)
|
|
448
|
+
Other exit codes - show stderr to user only`,
|
|
449
|
+
matcherMetadata: {
|
|
450
|
+
fieldToMatch: "mcp_server_name",
|
|
451
|
+
values: []
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
ConfigChange: {
|
|
455
|
+
summary: "When configuration files change during a session",
|
|
456
|
+
description: `Input to command is JSON with source (user_settings, project_settings, local_settings, policy_settings, skills) and file_path.
|
|
457
|
+
Exit code 0 - allow the change
|
|
458
|
+
Exit code 2 - block the change from being applied to the session
|
|
459
|
+
Other exit codes - show stderr to user only`,
|
|
460
|
+
matcherMetadata: {
|
|
461
|
+
fieldToMatch: "source",
|
|
462
|
+
values: [
|
|
463
|
+
"user_settings",
|
|
464
|
+
"project_settings",
|
|
465
|
+
"local_settings",
|
|
466
|
+
"policy_settings",
|
|
467
|
+
"skills"
|
|
468
|
+
]
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
InstructionsLoaded: {
|
|
472
|
+
summary: "When an instruction file (CLAUDE.md or rule) is loaded",
|
|
473
|
+
description: `Input to command is JSON with file_path, memory_type (User, Project, Local, Managed), load_reason (session_start, nested_traversal, path_glob_match, include, compact), globs (optional \u2014 the paths: frontmatter patterns that matched), trigger_file_path (optional \u2014 the file Claude touched that caused the load), and parent_file_path (optional \u2014 the file that @-included this one).
|
|
474
|
+
Exit code 0 - command completes successfully
|
|
475
|
+
Other exit codes - show stderr to user only
|
|
476
|
+
This hook is observability-only and does not support blocking.`,
|
|
477
|
+
matcherMetadata: {
|
|
478
|
+
fieldToMatch: "load_reason",
|
|
479
|
+
values: [
|
|
480
|
+
"session_start",
|
|
481
|
+
"nested_traversal",
|
|
482
|
+
"path_glob_match",
|
|
483
|
+
"include",
|
|
484
|
+
"compact"
|
|
485
|
+
]
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
WorktreeCreate: {
|
|
489
|
+
summary: "Create an isolated worktree for VCS-agnostic isolation",
|
|
490
|
+
description: `Input to command is JSON with name (suggested worktree slug).
|
|
491
|
+
Stdout should contain the absolute path to the created worktree directory.
|
|
492
|
+
Exit code 0 - worktree created successfully
|
|
493
|
+
Other exit codes - worktree creation failed`
|
|
494
|
+
},
|
|
495
|
+
WorktreeRemove: {
|
|
496
|
+
summary: "Remove a previously created worktree",
|
|
497
|
+
description: `Input to command is JSON with worktree_path (absolute path to worktree).
|
|
498
|
+
Exit code 0 - worktree removed successfully
|
|
499
|
+
Other exit codes - show stderr to user only`
|
|
500
|
+
},
|
|
501
|
+
CwdChanged: {
|
|
502
|
+
summary: "After the working directory changes",
|
|
503
|
+
description: `Input to command is JSON with old_cwd and new_cwd.
|
|
504
|
+
CLAUDE_ENV_FILE is set \u2014 write bash exports there to apply env to subsequent BashTool commands.
|
|
505
|
+
Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to register with the FileChanged watcher.
|
|
506
|
+
Exit code 0 - command completes successfully
|
|
507
|
+
Other exit codes - show stderr to user only`
|
|
508
|
+
},
|
|
509
|
+
FileChanged: {
|
|
510
|
+
summary: "When a watched file changes",
|
|
511
|
+
description: `Input to command is JSON with file_path and event (change, add, unlink).
|
|
512
|
+
CLAUDE_ENV_FILE is set \u2014 write bash exports there to apply env to subsequent BashTool commands.
|
|
513
|
+
The matcher field specifies filenames to watch in the current directory (e.g. ".envrc|.env").
|
|
514
|
+
Hook output can include hookSpecificOutput.watchPaths (array of absolute paths) to dynamically update the watch list.
|
|
515
|
+
Exit code 0 - command completes successfully
|
|
516
|
+
Other exit codes - show stderr to user only`
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
}, (toolNames) => toolNames.slice().sort().join(","));
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// src/components/hooks/SelectEventMode.tsx
|
|
523
|
+
function SelectEventMode(t0) {
|
|
524
|
+
const $ = import_compiler_runtime.c(23);
|
|
525
|
+
const {
|
|
526
|
+
hookEventMetadata,
|
|
527
|
+
hooksByEvent,
|
|
528
|
+
totalHooksCount,
|
|
529
|
+
restrictedByPolicy,
|
|
530
|
+
onSelectEvent,
|
|
531
|
+
onCancel
|
|
532
|
+
} = t0;
|
|
533
|
+
let t1;
|
|
534
|
+
if ($[0] !== totalHooksCount) {
|
|
535
|
+
t1 = plural(totalHooksCount, "hook");
|
|
536
|
+
$[0] = totalHooksCount;
|
|
537
|
+
$[1] = t1;
|
|
538
|
+
} else {
|
|
539
|
+
t1 = $[1];
|
|
540
|
+
}
|
|
541
|
+
const subtitle = `${totalHooksCount} ${t1} configured`;
|
|
542
|
+
let t2;
|
|
543
|
+
if ($[2] !== restrictedByPolicy) {
|
|
544
|
+
t2 = restrictedByPolicy && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
545
|
+
flexDirection: "column",
|
|
546
|
+
children: [
|
|
547
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
548
|
+
color: "suggestion",
|
|
549
|
+
children: [
|
|
550
|
+
figures_default.info,
|
|
551
|
+
" Hooks Restricted by Policy"
|
|
552
|
+
]
|
|
553
|
+
}, undefined, true, undefined, this),
|
|
554
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
555
|
+
dimColor: true,
|
|
556
|
+
children: "Only hooks from managed settings can run. User-defined hooks from ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json are blocked."
|
|
557
|
+
}, undefined, false, undefined, this)
|
|
558
|
+
]
|
|
559
|
+
}, undefined, true, undefined, this);
|
|
560
|
+
$[2] = restrictedByPolicy;
|
|
561
|
+
$[3] = t2;
|
|
562
|
+
} else {
|
|
563
|
+
t2 = $[3];
|
|
564
|
+
}
|
|
565
|
+
let t3;
|
|
566
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
567
|
+
t3 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
568
|
+
flexDirection: "column",
|
|
569
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
570
|
+
dimColor: true,
|
|
571
|
+
children: [
|
|
572
|
+
figures_default.info,
|
|
573
|
+
" This menu is read-only. To add or modify hooks, edit settings.json directly or ask Claude.",
|
|
574
|
+
" ",
|
|
575
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Link, {
|
|
576
|
+
url: "https://code.claude.com/docs/en/hooks",
|
|
577
|
+
children: "Learn more"
|
|
578
|
+
}, undefined, false, undefined, this)
|
|
579
|
+
]
|
|
580
|
+
}, undefined, true, undefined, this)
|
|
581
|
+
}, undefined, false, undefined, this);
|
|
582
|
+
$[4] = t3;
|
|
583
|
+
} else {
|
|
584
|
+
t3 = $[4];
|
|
585
|
+
}
|
|
586
|
+
let t4;
|
|
587
|
+
if ($[5] !== onSelectEvent) {
|
|
588
|
+
t4 = (value) => {
|
|
589
|
+
onSelectEvent(value);
|
|
590
|
+
};
|
|
591
|
+
$[5] = onSelectEvent;
|
|
592
|
+
$[6] = t4;
|
|
593
|
+
} else {
|
|
594
|
+
t4 = $[6];
|
|
595
|
+
}
|
|
596
|
+
let t5;
|
|
597
|
+
if ($[7] !== hookEventMetadata) {
|
|
598
|
+
t5 = Object.entries(hookEventMetadata);
|
|
599
|
+
$[7] = hookEventMetadata;
|
|
600
|
+
$[8] = t5;
|
|
601
|
+
} else {
|
|
602
|
+
t5 = $[8];
|
|
603
|
+
}
|
|
604
|
+
let t6;
|
|
605
|
+
if ($[9] !== hooksByEvent || $[10] !== t5) {
|
|
606
|
+
t6 = t5.map((t72) => {
|
|
607
|
+
const [name, metadata] = t72;
|
|
608
|
+
const count = hooksByEvent[name] || 0;
|
|
609
|
+
return {
|
|
610
|
+
label: count > 0 ? /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
611
|
+
children: [
|
|
612
|
+
name,
|
|
613
|
+
" ",
|
|
614
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
615
|
+
color: "suggestion",
|
|
616
|
+
children: [
|
|
617
|
+
"(",
|
|
618
|
+
count,
|
|
619
|
+
")"
|
|
620
|
+
]
|
|
621
|
+
}, undefined, true, undefined, this)
|
|
622
|
+
]
|
|
623
|
+
}, undefined, true, undefined, this) : name,
|
|
624
|
+
value: name,
|
|
625
|
+
description: metadata.summary
|
|
626
|
+
};
|
|
627
|
+
});
|
|
628
|
+
$[9] = hooksByEvent;
|
|
629
|
+
$[10] = t5;
|
|
630
|
+
$[11] = t6;
|
|
631
|
+
} else {
|
|
632
|
+
t6 = $[11];
|
|
633
|
+
}
|
|
634
|
+
let t7;
|
|
635
|
+
if ($[12] !== onCancel || $[13] !== t4 || $[14] !== t6) {
|
|
636
|
+
t7 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
637
|
+
flexDirection: "column",
|
|
638
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
|
|
639
|
+
onChange: t4,
|
|
640
|
+
onCancel,
|
|
641
|
+
options: t6
|
|
642
|
+
}, undefined, false, undefined, this)
|
|
643
|
+
}, undefined, false, undefined, this);
|
|
644
|
+
$[12] = onCancel;
|
|
645
|
+
$[13] = t4;
|
|
646
|
+
$[14] = t6;
|
|
647
|
+
$[15] = t7;
|
|
648
|
+
} else {
|
|
649
|
+
t7 = $[15];
|
|
650
|
+
}
|
|
651
|
+
let t8;
|
|
652
|
+
if ($[16] !== t2 || $[17] !== t7) {
|
|
653
|
+
t8 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
654
|
+
flexDirection: "column",
|
|
655
|
+
gap: 1,
|
|
656
|
+
children: [
|
|
657
|
+
t2,
|
|
658
|
+
t3,
|
|
659
|
+
t7
|
|
660
|
+
]
|
|
661
|
+
}, undefined, true, undefined, this);
|
|
662
|
+
$[16] = t2;
|
|
663
|
+
$[17] = t7;
|
|
664
|
+
$[18] = t8;
|
|
665
|
+
} else {
|
|
666
|
+
t8 = $[18];
|
|
667
|
+
}
|
|
668
|
+
let t9;
|
|
669
|
+
if ($[19] !== onCancel || $[20] !== subtitle || $[21] !== t8) {
|
|
670
|
+
t9 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
|
|
671
|
+
title: "Hooks",
|
|
672
|
+
subtitle,
|
|
673
|
+
onCancel,
|
|
674
|
+
children: t8
|
|
675
|
+
}, undefined, false, undefined, this);
|
|
676
|
+
$[19] = onCancel;
|
|
677
|
+
$[20] = subtitle;
|
|
678
|
+
$[21] = t8;
|
|
679
|
+
$[22] = t9;
|
|
680
|
+
} else {
|
|
681
|
+
t9 = $[22];
|
|
682
|
+
}
|
|
683
|
+
return t9;
|
|
684
|
+
}
|
|
685
|
+
var import_compiler_runtime, jsx_dev_runtime;
|
|
686
|
+
var init_SelectEventMode = __esm(() => {
|
|
687
|
+
init_figures();
|
|
688
|
+
init_ink();
|
|
689
|
+
init_stringUtils();
|
|
690
|
+
init_select();
|
|
691
|
+
init_Dialog();
|
|
692
|
+
import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
|
|
693
|
+
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
694
|
+
});
|
|
695
|
+
|
|
696
|
+
// src/components/hooks/SelectHookMode.tsx
|
|
697
|
+
function SelectHookMode(t0) {
|
|
698
|
+
const $ = import_compiler_runtime2.c(19);
|
|
699
|
+
const {
|
|
700
|
+
selectedEvent,
|
|
701
|
+
selectedMatcher,
|
|
702
|
+
hooksForSelectedMatcher,
|
|
703
|
+
hookEventMetadata,
|
|
704
|
+
onSelect,
|
|
705
|
+
onCancel
|
|
706
|
+
} = t0;
|
|
707
|
+
const title = hookEventMetadata.matcherMetadata !== undefined ? `${selectedEvent} - Matcher: ${selectedMatcher || "(all)"}` : selectedEvent;
|
|
708
|
+
if (hooksForSelectedMatcher.length === 0) {
|
|
709
|
+
let t12;
|
|
710
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
711
|
+
t12 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
712
|
+
flexDirection: "column",
|
|
713
|
+
gap: 1,
|
|
714
|
+
children: [
|
|
715
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
716
|
+
dimColor: true,
|
|
717
|
+
children: "No hooks configured for this event."
|
|
718
|
+
}, undefined, false, undefined, this),
|
|
719
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
720
|
+
dimColor: true,
|
|
721
|
+
children: "To add hooks, edit settings.json directly or ask Claude."
|
|
722
|
+
}, undefined, false, undefined, this)
|
|
723
|
+
]
|
|
724
|
+
}, undefined, true, undefined, this);
|
|
725
|
+
$[0] = t12;
|
|
726
|
+
} else {
|
|
727
|
+
t12 = $[0];
|
|
728
|
+
}
|
|
729
|
+
let t22;
|
|
730
|
+
if ($[1] !== hookEventMetadata.description || $[2] !== onCancel || $[3] !== title) {
|
|
731
|
+
t22 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
|
|
732
|
+
title,
|
|
733
|
+
subtitle: hookEventMetadata.description,
|
|
734
|
+
onCancel,
|
|
735
|
+
inputGuide: _temp,
|
|
736
|
+
children: t12
|
|
737
|
+
}, undefined, false, undefined, this);
|
|
738
|
+
$[1] = hookEventMetadata.description;
|
|
739
|
+
$[2] = onCancel;
|
|
740
|
+
$[3] = title;
|
|
741
|
+
$[4] = t22;
|
|
742
|
+
} else {
|
|
743
|
+
t22 = $[4];
|
|
744
|
+
}
|
|
745
|
+
return t22;
|
|
746
|
+
}
|
|
747
|
+
const t1 = hookEventMetadata.description;
|
|
748
|
+
let t2;
|
|
749
|
+
if ($[5] !== hooksForSelectedMatcher) {
|
|
750
|
+
t2 = hooksForSelectedMatcher.map(_temp2);
|
|
751
|
+
$[5] = hooksForSelectedMatcher;
|
|
752
|
+
$[6] = t2;
|
|
753
|
+
} else {
|
|
754
|
+
t2 = $[6];
|
|
755
|
+
}
|
|
756
|
+
let t3;
|
|
757
|
+
if ($[7] !== hooksForSelectedMatcher || $[8] !== onSelect) {
|
|
758
|
+
t3 = (value) => {
|
|
759
|
+
const index_0 = parseInt(value, 10);
|
|
760
|
+
const hook_0 = hooksForSelectedMatcher[index_0];
|
|
761
|
+
if (hook_0) {
|
|
762
|
+
onSelect(hook_0);
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
$[7] = hooksForSelectedMatcher;
|
|
766
|
+
$[8] = onSelect;
|
|
767
|
+
$[9] = t3;
|
|
768
|
+
} else {
|
|
769
|
+
t3 = $[9];
|
|
770
|
+
}
|
|
771
|
+
let t4;
|
|
772
|
+
if ($[10] !== onCancel || $[11] !== t2 || $[12] !== t3) {
|
|
773
|
+
t4 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
774
|
+
flexDirection: "column",
|
|
775
|
+
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
|
|
776
|
+
options: t2,
|
|
777
|
+
onChange: t3,
|
|
778
|
+
onCancel
|
|
779
|
+
}, undefined, false, undefined, this)
|
|
780
|
+
}, undefined, false, undefined, this);
|
|
781
|
+
$[10] = onCancel;
|
|
782
|
+
$[11] = t2;
|
|
783
|
+
$[12] = t3;
|
|
784
|
+
$[13] = t4;
|
|
785
|
+
} else {
|
|
786
|
+
t4 = $[13];
|
|
787
|
+
}
|
|
788
|
+
let t5;
|
|
789
|
+
if ($[14] !== hookEventMetadata.description || $[15] !== onCancel || $[16] !== t4 || $[17] !== title) {
|
|
790
|
+
t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
|
|
791
|
+
title,
|
|
792
|
+
subtitle: t1,
|
|
793
|
+
onCancel,
|
|
794
|
+
children: t4
|
|
795
|
+
}, undefined, false, undefined, this);
|
|
796
|
+
$[14] = hookEventMetadata.description;
|
|
797
|
+
$[15] = onCancel;
|
|
798
|
+
$[16] = t4;
|
|
799
|
+
$[17] = title;
|
|
800
|
+
$[18] = t5;
|
|
801
|
+
} else {
|
|
802
|
+
t5 = $[18];
|
|
803
|
+
}
|
|
804
|
+
return t5;
|
|
805
|
+
}
|
|
806
|
+
function _temp2(hook, index) {
|
|
807
|
+
return {
|
|
808
|
+
label: `[${hook.config.type}] ${getHookDisplayText(hook.config)}`,
|
|
809
|
+
value: index.toString(),
|
|
810
|
+
description: hook.source === "pluginHook" && hook.pluginName ? `${hookSourceHeaderDisplayString(hook.source)} (${hook.pluginName})` : hookSourceHeaderDisplayString(hook.source)
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
function _temp() {
|
|
814
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
815
|
+
children: "Esc to go back"
|
|
816
|
+
}, undefined, false, undefined, this);
|
|
817
|
+
}
|
|
818
|
+
var import_compiler_runtime2, jsx_dev_runtime2;
|
|
819
|
+
var init_SelectHookMode = __esm(() => {
|
|
820
|
+
init_ink();
|
|
821
|
+
init_hooksSettings();
|
|
822
|
+
init_select();
|
|
823
|
+
init_Dialog();
|
|
824
|
+
import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
|
|
825
|
+
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
// src/components/hooks/SelectMatcherMode.tsx
|
|
829
|
+
function SelectMatcherMode(t0) {
|
|
830
|
+
const $ = import_compiler_runtime3.c(25);
|
|
831
|
+
const {
|
|
832
|
+
selectedEvent,
|
|
833
|
+
matchersForSelectedEvent,
|
|
834
|
+
hooksByEventAndMatcher,
|
|
835
|
+
eventDescription,
|
|
836
|
+
onSelect,
|
|
837
|
+
onCancel
|
|
838
|
+
} = t0;
|
|
839
|
+
let t1;
|
|
840
|
+
if ($[0] !== hooksByEventAndMatcher || $[1] !== matchersForSelectedEvent || $[2] !== selectedEvent) {
|
|
841
|
+
let t22;
|
|
842
|
+
if ($[4] !== hooksByEventAndMatcher || $[5] !== selectedEvent) {
|
|
843
|
+
t22 = (matcher) => {
|
|
844
|
+
const hooks = hooksByEventAndMatcher[selectedEvent]?.[matcher] || [];
|
|
845
|
+
const sources = Array.from(new Set(hooks.map(_temp4)));
|
|
846
|
+
return {
|
|
847
|
+
matcher,
|
|
848
|
+
sources,
|
|
849
|
+
hookCount: hooks.length
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
$[4] = hooksByEventAndMatcher;
|
|
853
|
+
$[5] = selectedEvent;
|
|
854
|
+
$[6] = t22;
|
|
855
|
+
} else {
|
|
856
|
+
t22 = $[6];
|
|
857
|
+
}
|
|
858
|
+
t1 = matchersForSelectedEvent.map(t22);
|
|
859
|
+
$[0] = hooksByEventAndMatcher;
|
|
860
|
+
$[1] = matchersForSelectedEvent;
|
|
861
|
+
$[2] = selectedEvent;
|
|
862
|
+
$[3] = t1;
|
|
863
|
+
} else {
|
|
864
|
+
t1 = $[3];
|
|
865
|
+
}
|
|
866
|
+
const matchersWithSources = t1;
|
|
867
|
+
if (matchersForSelectedEvent.length === 0) {
|
|
868
|
+
const t22 = `${selectedEvent} - Matchers`;
|
|
869
|
+
let t32;
|
|
870
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
871
|
+
t32 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
872
|
+
flexDirection: "column",
|
|
873
|
+
gap: 1,
|
|
874
|
+
children: [
|
|
875
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
876
|
+
dimColor: true,
|
|
877
|
+
children: "No hooks configured for this event."
|
|
878
|
+
}, undefined, false, undefined, this),
|
|
879
|
+
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
880
|
+
dimColor: true,
|
|
881
|
+
children: "To add hooks, edit settings.json directly or ask Claude."
|
|
882
|
+
}, undefined, false, undefined, this)
|
|
883
|
+
]
|
|
884
|
+
}, undefined, true, undefined, this);
|
|
885
|
+
$[7] = t32;
|
|
886
|
+
} else {
|
|
887
|
+
t32 = $[7];
|
|
888
|
+
}
|
|
889
|
+
let t42;
|
|
890
|
+
if ($[8] !== eventDescription || $[9] !== onCancel || $[10] !== t22) {
|
|
891
|
+
t42 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
|
|
892
|
+
title: t22,
|
|
893
|
+
subtitle: eventDescription,
|
|
894
|
+
onCancel,
|
|
895
|
+
inputGuide: _temp22,
|
|
896
|
+
children: t32
|
|
897
|
+
}, undefined, false, undefined, this);
|
|
898
|
+
$[8] = eventDescription;
|
|
899
|
+
$[9] = onCancel;
|
|
900
|
+
$[10] = t22;
|
|
901
|
+
$[11] = t42;
|
|
902
|
+
} else {
|
|
903
|
+
t42 = $[11];
|
|
904
|
+
}
|
|
905
|
+
return t42;
|
|
906
|
+
}
|
|
907
|
+
const t2 = `${selectedEvent} - Matchers`;
|
|
908
|
+
let t3;
|
|
909
|
+
if ($[12] !== matchersWithSources) {
|
|
910
|
+
t3 = matchersWithSources.map(_temp3);
|
|
911
|
+
$[12] = matchersWithSources;
|
|
912
|
+
$[13] = t3;
|
|
913
|
+
} else {
|
|
914
|
+
t3 = $[13];
|
|
915
|
+
}
|
|
916
|
+
let t4;
|
|
917
|
+
if ($[14] !== onSelect) {
|
|
918
|
+
t4 = (value) => {
|
|
919
|
+
onSelect(value);
|
|
920
|
+
};
|
|
921
|
+
$[14] = onSelect;
|
|
922
|
+
$[15] = t4;
|
|
923
|
+
} else {
|
|
924
|
+
t4 = $[15];
|
|
925
|
+
}
|
|
926
|
+
let t5;
|
|
927
|
+
if ($[16] !== onCancel || $[17] !== t3 || $[18] !== t4) {
|
|
928
|
+
t5 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
929
|
+
flexDirection: "column",
|
|
930
|
+
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Select, {
|
|
931
|
+
options: t3,
|
|
932
|
+
onChange: t4,
|
|
933
|
+
onCancel
|
|
934
|
+
}, undefined, false, undefined, this)
|
|
935
|
+
}, undefined, false, undefined, this);
|
|
936
|
+
$[16] = onCancel;
|
|
937
|
+
$[17] = t3;
|
|
938
|
+
$[18] = t4;
|
|
939
|
+
$[19] = t5;
|
|
940
|
+
} else {
|
|
941
|
+
t5 = $[19];
|
|
942
|
+
}
|
|
943
|
+
let t6;
|
|
944
|
+
if ($[20] !== eventDescription || $[21] !== onCancel || $[22] !== t2 || $[23] !== t5) {
|
|
945
|
+
t6 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Dialog, {
|
|
946
|
+
title: t2,
|
|
947
|
+
subtitle: eventDescription,
|
|
948
|
+
onCancel,
|
|
949
|
+
children: t5
|
|
950
|
+
}, undefined, false, undefined, this);
|
|
951
|
+
$[20] = eventDescription;
|
|
952
|
+
$[21] = onCancel;
|
|
953
|
+
$[22] = t2;
|
|
954
|
+
$[23] = t5;
|
|
955
|
+
$[24] = t6;
|
|
956
|
+
} else {
|
|
957
|
+
t6 = $[24];
|
|
958
|
+
}
|
|
959
|
+
return t6;
|
|
960
|
+
}
|
|
961
|
+
function _temp3(item) {
|
|
962
|
+
const sourceText = item.sources.map(hookSourceInlineDisplayString).join(", ");
|
|
963
|
+
const matcherLabel = item.matcher || "(all)";
|
|
964
|
+
return {
|
|
965
|
+
label: `[${sourceText}] ${matcherLabel}`,
|
|
966
|
+
value: item.matcher,
|
|
967
|
+
description: `${item.hookCount} ${plural(item.hookCount, "hook")}`
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
function _temp22() {
|
|
971
|
+
return /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
972
|
+
children: "Esc to go back"
|
|
973
|
+
}, undefined, false, undefined, this);
|
|
974
|
+
}
|
|
975
|
+
function _temp4(h) {
|
|
976
|
+
return h.source;
|
|
977
|
+
}
|
|
978
|
+
var import_compiler_runtime3, jsx_dev_runtime3;
|
|
979
|
+
var init_SelectMatcherMode = __esm(() => {
|
|
980
|
+
init_ink();
|
|
981
|
+
init_hooksSettings();
|
|
982
|
+
init_stringUtils();
|
|
983
|
+
init_select();
|
|
984
|
+
init_Dialog();
|
|
985
|
+
import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
|
|
986
|
+
jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
|
|
987
|
+
});
|
|
988
|
+
|
|
989
|
+
// src/components/hooks/ViewHookMode.tsx
|
|
990
|
+
function ViewHookMode(t0) {
|
|
991
|
+
const $ = import_compiler_runtime4.c(40);
|
|
992
|
+
const {
|
|
993
|
+
selectedHook,
|
|
994
|
+
eventSupportsMatcher,
|
|
995
|
+
onCancel
|
|
996
|
+
} = t0;
|
|
997
|
+
let t1;
|
|
998
|
+
if ($[0] !== selectedHook.event) {
|
|
999
|
+
t1 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1000
|
+
children: [
|
|
1001
|
+
"Event: ",
|
|
1002
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1003
|
+
bold: true,
|
|
1004
|
+
children: selectedHook.event
|
|
1005
|
+
}, undefined, false, undefined, this)
|
|
1006
|
+
]
|
|
1007
|
+
}, undefined, true, undefined, this);
|
|
1008
|
+
$[0] = selectedHook.event;
|
|
1009
|
+
$[1] = t1;
|
|
1010
|
+
} else {
|
|
1011
|
+
t1 = $[1];
|
|
1012
|
+
}
|
|
1013
|
+
let t2;
|
|
1014
|
+
if ($[2] !== eventSupportsMatcher || $[3] !== selectedHook.matcher) {
|
|
1015
|
+
t2 = eventSupportsMatcher && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1016
|
+
children: [
|
|
1017
|
+
"Matcher: ",
|
|
1018
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1019
|
+
bold: true,
|
|
1020
|
+
children: selectedHook.matcher || "(all)"
|
|
1021
|
+
}, undefined, false, undefined, this)
|
|
1022
|
+
]
|
|
1023
|
+
}, undefined, true, undefined, this);
|
|
1024
|
+
$[2] = eventSupportsMatcher;
|
|
1025
|
+
$[3] = selectedHook.matcher;
|
|
1026
|
+
$[4] = t2;
|
|
1027
|
+
} else {
|
|
1028
|
+
t2 = $[4];
|
|
1029
|
+
}
|
|
1030
|
+
let t3;
|
|
1031
|
+
if ($[5] !== selectedHook.config.type) {
|
|
1032
|
+
t3 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1033
|
+
children: [
|
|
1034
|
+
"Type: ",
|
|
1035
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1036
|
+
bold: true,
|
|
1037
|
+
children: selectedHook.config.type
|
|
1038
|
+
}, undefined, false, undefined, this)
|
|
1039
|
+
]
|
|
1040
|
+
}, undefined, true, undefined, this);
|
|
1041
|
+
$[5] = selectedHook.config.type;
|
|
1042
|
+
$[6] = t3;
|
|
1043
|
+
} else {
|
|
1044
|
+
t3 = $[6];
|
|
1045
|
+
}
|
|
1046
|
+
let t4;
|
|
1047
|
+
if ($[7] !== selectedHook.source) {
|
|
1048
|
+
t4 = hookSourceDescriptionDisplayString(selectedHook.source);
|
|
1049
|
+
$[7] = selectedHook.source;
|
|
1050
|
+
$[8] = t4;
|
|
1051
|
+
} else {
|
|
1052
|
+
t4 = $[8];
|
|
1053
|
+
}
|
|
1054
|
+
let t5;
|
|
1055
|
+
if ($[9] !== t4) {
|
|
1056
|
+
t5 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1057
|
+
children: [
|
|
1058
|
+
"Source:",
|
|
1059
|
+
" ",
|
|
1060
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1061
|
+
dimColor: true,
|
|
1062
|
+
children: t4
|
|
1063
|
+
}, undefined, false, undefined, this)
|
|
1064
|
+
]
|
|
1065
|
+
}, undefined, true, undefined, this);
|
|
1066
|
+
$[9] = t4;
|
|
1067
|
+
$[10] = t5;
|
|
1068
|
+
} else {
|
|
1069
|
+
t5 = $[10];
|
|
1070
|
+
}
|
|
1071
|
+
let t6;
|
|
1072
|
+
if ($[11] !== selectedHook.pluginName) {
|
|
1073
|
+
t6 = selectedHook.pluginName && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1074
|
+
children: [
|
|
1075
|
+
"Plugin: ",
|
|
1076
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1077
|
+
dimColor: true,
|
|
1078
|
+
children: selectedHook.pluginName
|
|
1079
|
+
}, undefined, false, undefined, this)
|
|
1080
|
+
]
|
|
1081
|
+
}, undefined, true, undefined, this);
|
|
1082
|
+
$[11] = selectedHook.pluginName;
|
|
1083
|
+
$[12] = t6;
|
|
1084
|
+
} else {
|
|
1085
|
+
t6 = $[12];
|
|
1086
|
+
}
|
|
1087
|
+
let t7;
|
|
1088
|
+
if ($[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t5 || $[17] !== t6) {
|
|
1089
|
+
t7 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
1090
|
+
flexDirection: "column",
|
|
1091
|
+
children: [
|
|
1092
|
+
t1,
|
|
1093
|
+
t2,
|
|
1094
|
+
t3,
|
|
1095
|
+
t5,
|
|
1096
|
+
t6
|
|
1097
|
+
]
|
|
1098
|
+
}, undefined, true, undefined, this);
|
|
1099
|
+
$[13] = t1;
|
|
1100
|
+
$[14] = t2;
|
|
1101
|
+
$[15] = t3;
|
|
1102
|
+
$[16] = t5;
|
|
1103
|
+
$[17] = t6;
|
|
1104
|
+
$[18] = t7;
|
|
1105
|
+
} else {
|
|
1106
|
+
t7 = $[18];
|
|
1107
|
+
}
|
|
1108
|
+
let t8;
|
|
1109
|
+
if ($[19] !== selectedHook.config) {
|
|
1110
|
+
t8 = getContentFieldLabel(selectedHook.config);
|
|
1111
|
+
$[19] = selectedHook.config;
|
|
1112
|
+
$[20] = t8;
|
|
1113
|
+
} else {
|
|
1114
|
+
t8 = $[20];
|
|
1115
|
+
}
|
|
1116
|
+
let t9;
|
|
1117
|
+
if ($[21] !== t8) {
|
|
1118
|
+
t9 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1119
|
+
dimColor: true,
|
|
1120
|
+
children: [
|
|
1121
|
+
t8,
|
|
1122
|
+
":"
|
|
1123
|
+
]
|
|
1124
|
+
}, undefined, true, undefined, this);
|
|
1125
|
+
$[21] = t8;
|
|
1126
|
+
$[22] = t9;
|
|
1127
|
+
} else {
|
|
1128
|
+
t9 = $[22];
|
|
1129
|
+
}
|
|
1130
|
+
let t10;
|
|
1131
|
+
if ($[23] !== selectedHook.config) {
|
|
1132
|
+
t10 = getContentFieldValue(selectedHook.config);
|
|
1133
|
+
$[23] = selectedHook.config;
|
|
1134
|
+
$[24] = t10;
|
|
1135
|
+
} else {
|
|
1136
|
+
t10 = $[24];
|
|
1137
|
+
}
|
|
1138
|
+
let t11;
|
|
1139
|
+
if ($[25] !== t10) {
|
|
1140
|
+
t11 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
1141
|
+
borderStyle: "round",
|
|
1142
|
+
borderDimColor: true,
|
|
1143
|
+
paddingLeft: 1,
|
|
1144
|
+
paddingRight: 1,
|
|
1145
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1146
|
+
children: t10
|
|
1147
|
+
}, undefined, false, undefined, this)
|
|
1148
|
+
}, undefined, false, undefined, this);
|
|
1149
|
+
$[25] = t10;
|
|
1150
|
+
$[26] = t11;
|
|
1151
|
+
} else {
|
|
1152
|
+
t11 = $[26];
|
|
1153
|
+
}
|
|
1154
|
+
let t12;
|
|
1155
|
+
if ($[27] !== t11 || $[28] !== t9) {
|
|
1156
|
+
t12 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
1157
|
+
flexDirection: "column",
|
|
1158
|
+
children: [
|
|
1159
|
+
t9,
|
|
1160
|
+
t11
|
|
1161
|
+
]
|
|
1162
|
+
}, undefined, true, undefined, this);
|
|
1163
|
+
$[27] = t11;
|
|
1164
|
+
$[28] = t9;
|
|
1165
|
+
$[29] = t12;
|
|
1166
|
+
} else {
|
|
1167
|
+
t12 = $[29];
|
|
1168
|
+
}
|
|
1169
|
+
let t13;
|
|
1170
|
+
if ($[30] !== selectedHook.config) {
|
|
1171
|
+
t13 = "statusMessage" in selectedHook.config && selectedHook.config.statusMessage && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1172
|
+
children: [
|
|
1173
|
+
"Status message:",
|
|
1174
|
+
" ",
|
|
1175
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1176
|
+
dimColor: true,
|
|
1177
|
+
children: selectedHook.config.statusMessage
|
|
1178
|
+
}, undefined, false, undefined, this)
|
|
1179
|
+
]
|
|
1180
|
+
}, undefined, true, undefined, this);
|
|
1181
|
+
$[30] = selectedHook.config;
|
|
1182
|
+
$[31] = t13;
|
|
1183
|
+
} else {
|
|
1184
|
+
t13 = $[31];
|
|
1185
|
+
}
|
|
1186
|
+
let t14;
|
|
1187
|
+
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1188
|
+
t14 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1189
|
+
dimColor: true,
|
|
1190
|
+
children: "To modify or remove this hook, edit settings.json directly or ask Claude to help."
|
|
1191
|
+
}, undefined, false, undefined, this);
|
|
1192
|
+
$[32] = t14;
|
|
1193
|
+
} else {
|
|
1194
|
+
t14 = $[32];
|
|
1195
|
+
}
|
|
1196
|
+
let t15;
|
|
1197
|
+
if ($[33] !== t12 || $[34] !== t13 || $[35] !== t7) {
|
|
1198
|
+
t15 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
1199
|
+
flexDirection: "column",
|
|
1200
|
+
gap: 1,
|
|
1201
|
+
children: [
|
|
1202
|
+
t7,
|
|
1203
|
+
t12,
|
|
1204
|
+
t13,
|
|
1205
|
+
t14
|
|
1206
|
+
]
|
|
1207
|
+
}, undefined, true, undefined, this);
|
|
1208
|
+
$[33] = t12;
|
|
1209
|
+
$[34] = t13;
|
|
1210
|
+
$[35] = t7;
|
|
1211
|
+
$[36] = t15;
|
|
1212
|
+
} else {
|
|
1213
|
+
t15 = $[36];
|
|
1214
|
+
}
|
|
1215
|
+
let t16;
|
|
1216
|
+
if ($[37] !== onCancel || $[38] !== t15) {
|
|
1217
|
+
t16 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Dialog, {
|
|
1218
|
+
title: "Hook details",
|
|
1219
|
+
onCancel,
|
|
1220
|
+
inputGuide: _temp6,
|
|
1221
|
+
children: t15
|
|
1222
|
+
}, undefined, false, undefined, this);
|
|
1223
|
+
$[37] = onCancel;
|
|
1224
|
+
$[38] = t15;
|
|
1225
|
+
$[39] = t16;
|
|
1226
|
+
} else {
|
|
1227
|
+
t16 = $[39];
|
|
1228
|
+
}
|
|
1229
|
+
return t16;
|
|
1230
|
+
}
|
|
1231
|
+
function _temp6() {
|
|
1232
|
+
return /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1233
|
+
children: "Esc to go back"
|
|
1234
|
+
}, undefined, false, undefined, this);
|
|
1235
|
+
}
|
|
1236
|
+
function getContentFieldLabel(config) {
|
|
1237
|
+
switch (config.type) {
|
|
1238
|
+
case "command":
|
|
1239
|
+
return "Command";
|
|
1240
|
+
case "prompt":
|
|
1241
|
+
return "Prompt";
|
|
1242
|
+
case "agent":
|
|
1243
|
+
return "Prompt";
|
|
1244
|
+
case "http":
|
|
1245
|
+
return "URL";
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
function getContentFieldValue(config) {
|
|
1249
|
+
switch (config.type) {
|
|
1250
|
+
case "command":
|
|
1251
|
+
return config.command;
|
|
1252
|
+
case "prompt":
|
|
1253
|
+
return config.prompt;
|
|
1254
|
+
case "agent":
|
|
1255
|
+
return config.prompt;
|
|
1256
|
+
case "http":
|
|
1257
|
+
return config.url;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
var import_compiler_runtime4, jsx_dev_runtime4;
|
|
1261
|
+
var init_ViewHookMode = __esm(() => {
|
|
1262
|
+
init_ink();
|
|
1263
|
+
init_hooksSettings();
|
|
1264
|
+
init_Dialog();
|
|
1265
|
+
import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
|
|
1266
|
+
jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1267
|
+
});
|
|
1268
|
+
|
|
1269
|
+
// src/components/hooks/HooksConfigMenu.tsx
|
|
1270
|
+
function HooksConfigMenu(t0) {
|
|
1271
|
+
const $ = import_compiler_runtime5.c(100);
|
|
1272
|
+
const {
|
|
1273
|
+
toolNames,
|
|
1274
|
+
onExit
|
|
1275
|
+
} = t0;
|
|
1276
|
+
let t1;
|
|
1277
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1278
|
+
t1 = {
|
|
1279
|
+
mode: "select-event"
|
|
1280
|
+
};
|
|
1281
|
+
$[0] = t1;
|
|
1282
|
+
} else {
|
|
1283
|
+
t1 = $[0];
|
|
1284
|
+
}
|
|
1285
|
+
const [modeState, setModeState] = import_react.useState(t1);
|
|
1286
|
+
const [disabledByPolicy, setDisabledByPolicy] = import_react.useState(_temp7);
|
|
1287
|
+
const [restrictedByPolicy, setRestrictedByPolicy] = import_react.useState(_temp23);
|
|
1288
|
+
let t2;
|
|
1289
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1290
|
+
t2 = (source) => {
|
|
1291
|
+
if (source === "policySettings") {
|
|
1292
|
+
const settings_0 = getSettings_DEPRECATED();
|
|
1293
|
+
const hooksDisabled_0 = settings_0?.disableAllHooks === true;
|
|
1294
|
+
setDisabledByPolicy(hooksDisabled_0 && getSettingsForSource("policySettings")?.disableAllHooks === true);
|
|
1295
|
+
setRestrictedByPolicy(getSettingsForSource("policySettings")?.allowManagedHooksOnly === true);
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
$[1] = t2;
|
|
1299
|
+
} else {
|
|
1300
|
+
t2 = $[1];
|
|
1301
|
+
}
|
|
1302
|
+
useSettingsChange(t2);
|
|
1303
|
+
const mode = modeState.mode;
|
|
1304
|
+
const selectedEvent = "event" in modeState ? modeState.event : "PreToolUse";
|
|
1305
|
+
const selectedMatcher = "matcher" in modeState ? modeState.matcher : null;
|
|
1306
|
+
const mcp = useAppState(_temp32);
|
|
1307
|
+
const appStateStore = useAppStateStore();
|
|
1308
|
+
let t3;
|
|
1309
|
+
if ($[2] !== mcp.tools || $[3] !== toolNames) {
|
|
1310
|
+
t3 = [...toolNames, ...mcp.tools.map(_temp42)];
|
|
1311
|
+
$[2] = mcp.tools;
|
|
1312
|
+
$[3] = toolNames;
|
|
1313
|
+
$[4] = t3;
|
|
1314
|
+
} else {
|
|
1315
|
+
t3 = $[4];
|
|
1316
|
+
}
|
|
1317
|
+
const combinedToolNames = t3;
|
|
1318
|
+
let t4;
|
|
1319
|
+
if ($[5] !== appStateStore || $[6] !== combinedToolNames) {
|
|
1320
|
+
t4 = groupHooksByEventAndMatcher(appStateStore.getState(), combinedToolNames);
|
|
1321
|
+
$[5] = appStateStore;
|
|
1322
|
+
$[6] = combinedToolNames;
|
|
1323
|
+
$[7] = t4;
|
|
1324
|
+
} else {
|
|
1325
|
+
t4 = $[7];
|
|
1326
|
+
}
|
|
1327
|
+
const hooksByEventAndMatcher = t4;
|
|
1328
|
+
let t5;
|
|
1329
|
+
if ($[8] !== hooksByEventAndMatcher || $[9] !== selectedEvent) {
|
|
1330
|
+
t5 = getSortedMatchersForEvent(hooksByEventAndMatcher, selectedEvent);
|
|
1331
|
+
$[8] = hooksByEventAndMatcher;
|
|
1332
|
+
$[9] = selectedEvent;
|
|
1333
|
+
$[10] = t5;
|
|
1334
|
+
} else {
|
|
1335
|
+
t5 = $[10];
|
|
1336
|
+
}
|
|
1337
|
+
const sortedMatchersForSelectedEvent = t5;
|
|
1338
|
+
let t6;
|
|
1339
|
+
if ($[11] !== hooksByEventAndMatcher || $[12] !== selectedEvent || $[13] !== selectedMatcher) {
|
|
1340
|
+
t6 = getHooksForMatcher(hooksByEventAndMatcher, selectedEvent, selectedMatcher);
|
|
1341
|
+
$[11] = hooksByEventAndMatcher;
|
|
1342
|
+
$[12] = selectedEvent;
|
|
1343
|
+
$[13] = selectedMatcher;
|
|
1344
|
+
$[14] = t6;
|
|
1345
|
+
} else {
|
|
1346
|
+
t6 = $[14];
|
|
1347
|
+
}
|
|
1348
|
+
const hooksForSelectedMatcher = t6;
|
|
1349
|
+
let t7;
|
|
1350
|
+
if ($[15] !== onExit) {
|
|
1351
|
+
t7 = () => {
|
|
1352
|
+
onExit("Hooks dialog dismissed", {
|
|
1353
|
+
display: "system"
|
|
1354
|
+
});
|
|
1355
|
+
};
|
|
1356
|
+
$[15] = onExit;
|
|
1357
|
+
$[16] = t7;
|
|
1358
|
+
} else {
|
|
1359
|
+
t7 = $[16];
|
|
1360
|
+
}
|
|
1361
|
+
const handleExit = t7;
|
|
1362
|
+
const t8 = mode === "select-event";
|
|
1363
|
+
let t9;
|
|
1364
|
+
if ($[17] !== t8) {
|
|
1365
|
+
t9 = {
|
|
1366
|
+
context: "Confirmation",
|
|
1367
|
+
isActive: t8
|
|
1368
|
+
};
|
|
1369
|
+
$[17] = t8;
|
|
1370
|
+
$[18] = t9;
|
|
1371
|
+
} else {
|
|
1372
|
+
t9 = $[18];
|
|
1373
|
+
}
|
|
1374
|
+
useKeybinding("confirm:no", handleExit, t9);
|
|
1375
|
+
let t10;
|
|
1376
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1377
|
+
t10 = () => {
|
|
1378
|
+
setModeState({
|
|
1379
|
+
mode: "select-event"
|
|
1380
|
+
});
|
|
1381
|
+
};
|
|
1382
|
+
$[19] = t10;
|
|
1383
|
+
} else {
|
|
1384
|
+
t10 = $[19];
|
|
1385
|
+
}
|
|
1386
|
+
const t11 = mode === "select-matcher";
|
|
1387
|
+
let t12;
|
|
1388
|
+
if ($[20] !== t11) {
|
|
1389
|
+
t12 = {
|
|
1390
|
+
context: "Confirmation",
|
|
1391
|
+
isActive: t11
|
|
1392
|
+
};
|
|
1393
|
+
$[20] = t11;
|
|
1394
|
+
$[21] = t12;
|
|
1395
|
+
} else {
|
|
1396
|
+
t12 = $[21];
|
|
1397
|
+
}
|
|
1398
|
+
useKeybinding("confirm:no", t10, t12);
|
|
1399
|
+
let t13;
|
|
1400
|
+
if ($[22] !== combinedToolNames || $[23] !== modeState) {
|
|
1401
|
+
t13 = () => {
|
|
1402
|
+
if ("event" in modeState) {
|
|
1403
|
+
if (getMatcherMetadata(modeState.event, combinedToolNames) !== undefined) {
|
|
1404
|
+
setModeState({
|
|
1405
|
+
mode: "select-matcher",
|
|
1406
|
+
event: modeState.event
|
|
1407
|
+
});
|
|
1408
|
+
} else {
|
|
1409
|
+
setModeState({
|
|
1410
|
+
mode: "select-event"
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
$[22] = combinedToolNames;
|
|
1416
|
+
$[23] = modeState;
|
|
1417
|
+
$[24] = t13;
|
|
1418
|
+
} else {
|
|
1419
|
+
t13 = $[24];
|
|
1420
|
+
}
|
|
1421
|
+
const t14 = mode === "select-hook";
|
|
1422
|
+
let t15;
|
|
1423
|
+
if ($[25] !== t14) {
|
|
1424
|
+
t15 = {
|
|
1425
|
+
context: "Confirmation",
|
|
1426
|
+
isActive: t14
|
|
1427
|
+
};
|
|
1428
|
+
$[25] = t14;
|
|
1429
|
+
$[26] = t15;
|
|
1430
|
+
} else {
|
|
1431
|
+
t15 = $[26];
|
|
1432
|
+
}
|
|
1433
|
+
useKeybinding("confirm:no", t13, t15);
|
|
1434
|
+
let t16;
|
|
1435
|
+
if ($[27] !== modeState) {
|
|
1436
|
+
t16 = () => {
|
|
1437
|
+
if (modeState.mode === "view-hook") {
|
|
1438
|
+
const {
|
|
1439
|
+
event,
|
|
1440
|
+
hook
|
|
1441
|
+
} = modeState;
|
|
1442
|
+
setModeState({
|
|
1443
|
+
mode: "select-hook",
|
|
1444
|
+
event,
|
|
1445
|
+
matcher: hook.matcher || ""
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
};
|
|
1449
|
+
$[27] = modeState;
|
|
1450
|
+
$[28] = t16;
|
|
1451
|
+
} else {
|
|
1452
|
+
t16 = $[28];
|
|
1453
|
+
}
|
|
1454
|
+
const t17 = mode === "view-hook";
|
|
1455
|
+
let t18;
|
|
1456
|
+
if ($[29] !== t17) {
|
|
1457
|
+
t18 = {
|
|
1458
|
+
context: "Confirmation",
|
|
1459
|
+
isActive: t17
|
|
1460
|
+
};
|
|
1461
|
+
$[29] = t17;
|
|
1462
|
+
$[30] = t18;
|
|
1463
|
+
} else {
|
|
1464
|
+
t18 = $[30];
|
|
1465
|
+
}
|
|
1466
|
+
useKeybinding("confirm:no", t16, t18);
|
|
1467
|
+
let t19;
|
|
1468
|
+
if ($[31] !== combinedToolNames) {
|
|
1469
|
+
t19 = getHookEventMetadata(combinedToolNames);
|
|
1470
|
+
$[31] = combinedToolNames;
|
|
1471
|
+
$[32] = t19;
|
|
1472
|
+
} else {
|
|
1473
|
+
t19 = $[32];
|
|
1474
|
+
}
|
|
1475
|
+
const hookEventMetadata = t19;
|
|
1476
|
+
const settings_1 = getSettings_DEPRECATED();
|
|
1477
|
+
const hooksDisabled_1 = settings_1?.disableAllHooks === true;
|
|
1478
|
+
let t20;
|
|
1479
|
+
if ($[33] !== hooksByEventAndMatcher) {
|
|
1480
|
+
const byEvent = {};
|
|
1481
|
+
let total = 0;
|
|
1482
|
+
for (const [event_0, matchers] of Object.entries(hooksByEventAndMatcher)) {
|
|
1483
|
+
const eventCount = Object.values(matchers).reduce(_temp5, 0);
|
|
1484
|
+
byEvent[event_0] = eventCount;
|
|
1485
|
+
total = total + eventCount;
|
|
1486
|
+
}
|
|
1487
|
+
t20 = {
|
|
1488
|
+
hooksByEvent: byEvent,
|
|
1489
|
+
totalHooksCount: total
|
|
1490
|
+
};
|
|
1491
|
+
$[33] = hooksByEventAndMatcher;
|
|
1492
|
+
$[34] = t20;
|
|
1493
|
+
} else {
|
|
1494
|
+
t20 = $[34];
|
|
1495
|
+
}
|
|
1496
|
+
const {
|
|
1497
|
+
hooksByEvent,
|
|
1498
|
+
totalHooksCount
|
|
1499
|
+
} = t20;
|
|
1500
|
+
if (hooksDisabled_1) {
|
|
1501
|
+
let t21;
|
|
1502
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1503
|
+
t21 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1504
|
+
bold: true,
|
|
1505
|
+
children: "disabled"
|
|
1506
|
+
}, undefined, false, undefined, this);
|
|
1507
|
+
$[35] = t21;
|
|
1508
|
+
} else {
|
|
1509
|
+
t21 = $[35];
|
|
1510
|
+
}
|
|
1511
|
+
const t22 = disabledByPolicy && " by a managed settings file";
|
|
1512
|
+
let t23;
|
|
1513
|
+
if ($[36] !== totalHooksCount) {
|
|
1514
|
+
t23 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1515
|
+
bold: true,
|
|
1516
|
+
children: totalHooksCount
|
|
1517
|
+
}, undefined, false, undefined, this);
|
|
1518
|
+
$[36] = totalHooksCount;
|
|
1519
|
+
$[37] = t23;
|
|
1520
|
+
} else {
|
|
1521
|
+
t23 = $[37];
|
|
1522
|
+
}
|
|
1523
|
+
let t24;
|
|
1524
|
+
if ($[38] !== totalHooksCount) {
|
|
1525
|
+
t24 = plural(totalHooksCount, "hook");
|
|
1526
|
+
$[38] = totalHooksCount;
|
|
1527
|
+
$[39] = t24;
|
|
1528
|
+
} else {
|
|
1529
|
+
t24 = $[39];
|
|
1530
|
+
}
|
|
1531
|
+
let t25;
|
|
1532
|
+
if ($[40] !== totalHooksCount) {
|
|
1533
|
+
t25 = plural(totalHooksCount, "is", "are");
|
|
1534
|
+
$[40] = totalHooksCount;
|
|
1535
|
+
$[41] = t25;
|
|
1536
|
+
} else {
|
|
1537
|
+
t25 = $[41];
|
|
1538
|
+
}
|
|
1539
|
+
let t26;
|
|
1540
|
+
if ($[42] !== t22 || $[43] !== t23 || $[44] !== t24 || $[45] !== t25) {
|
|
1541
|
+
t26 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1542
|
+
children: [
|
|
1543
|
+
"All hooks are currently ",
|
|
1544
|
+
t21,
|
|
1545
|
+
t22,
|
|
1546
|
+
". You have",
|
|
1547
|
+
" ",
|
|
1548
|
+
t23,
|
|
1549
|
+
" configured",
|
|
1550
|
+
" ",
|
|
1551
|
+
t24,
|
|
1552
|
+
" that",
|
|
1553
|
+
" ",
|
|
1554
|
+
t25,
|
|
1555
|
+
" not running."
|
|
1556
|
+
]
|
|
1557
|
+
}, undefined, true, undefined, this);
|
|
1558
|
+
$[42] = t22;
|
|
1559
|
+
$[43] = t23;
|
|
1560
|
+
$[44] = t24;
|
|
1561
|
+
$[45] = t25;
|
|
1562
|
+
$[46] = t26;
|
|
1563
|
+
} else {
|
|
1564
|
+
t26 = $[46];
|
|
1565
|
+
}
|
|
1566
|
+
let t27;
|
|
1567
|
+
let t28;
|
|
1568
|
+
let t29;
|
|
1569
|
+
let t30;
|
|
1570
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1571
|
+
t27 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1572
|
+
marginTop: 1,
|
|
1573
|
+
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1574
|
+
dimColor: true,
|
|
1575
|
+
children: "When hooks are disabled:"
|
|
1576
|
+
}, undefined, false, undefined, this)
|
|
1577
|
+
}, undefined, false, undefined, this);
|
|
1578
|
+
t28 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1579
|
+
dimColor: true,
|
|
1580
|
+
children: "\xB7 No hook commands will execute"
|
|
1581
|
+
}, undefined, false, undefined, this);
|
|
1582
|
+
t29 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1583
|
+
dimColor: true,
|
|
1584
|
+
children: "\xB7 StatusLine will not be displayed"
|
|
1585
|
+
}, undefined, false, undefined, this);
|
|
1586
|
+
t30 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1587
|
+
dimColor: true,
|
|
1588
|
+
children: "\xB7 Tool operations will proceed without hook validation"
|
|
1589
|
+
}, undefined, false, undefined, this);
|
|
1590
|
+
$[47] = t27;
|
|
1591
|
+
$[48] = t28;
|
|
1592
|
+
$[49] = t29;
|
|
1593
|
+
$[50] = t30;
|
|
1594
|
+
} else {
|
|
1595
|
+
t27 = $[47];
|
|
1596
|
+
t28 = $[48];
|
|
1597
|
+
t29 = $[49];
|
|
1598
|
+
t30 = $[50];
|
|
1599
|
+
}
|
|
1600
|
+
let t31;
|
|
1601
|
+
if ($[51] !== t26) {
|
|
1602
|
+
t31 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1603
|
+
flexDirection: "column",
|
|
1604
|
+
children: [
|
|
1605
|
+
t26,
|
|
1606
|
+
t27,
|
|
1607
|
+
t28,
|
|
1608
|
+
t29,
|
|
1609
|
+
t30
|
|
1610
|
+
]
|
|
1611
|
+
}, undefined, true, undefined, this);
|
|
1612
|
+
$[51] = t26;
|
|
1613
|
+
$[52] = t31;
|
|
1614
|
+
} else {
|
|
1615
|
+
t31 = $[52];
|
|
1616
|
+
}
|
|
1617
|
+
let t32;
|
|
1618
|
+
if ($[53] !== disabledByPolicy) {
|
|
1619
|
+
t32 = !disabledByPolicy && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1620
|
+
dimColor: true,
|
|
1621
|
+
children: 'To re-enable hooks, remove "disableAllHooks" from settings.json or ask Claude.'
|
|
1622
|
+
}, undefined, false, undefined, this);
|
|
1623
|
+
$[53] = disabledByPolicy;
|
|
1624
|
+
$[54] = t32;
|
|
1625
|
+
} else {
|
|
1626
|
+
t32 = $[54];
|
|
1627
|
+
}
|
|
1628
|
+
let t33;
|
|
1629
|
+
if ($[55] !== t31 || $[56] !== t32) {
|
|
1630
|
+
t33 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1631
|
+
flexDirection: "column",
|
|
1632
|
+
gap: 1,
|
|
1633
|
+
children: [
|
|
1634
|
+
t31,
|
|
1635
|
+
t32
|
|
1636
|
+
]
|
|
1637
|
+
}, undefined, true, undefined, this);
|
|
1638
|
+
$[55] = t31;
|
|
1639
|
+
$[56] = t32;
|
|
1640
|
+
$[57] = t33;
|
|
1641
|
+
} else {
|
|
1642
|
+
t33 = $[57];
|
|
1643
|
+
}
|
|
1644
|
+
let t34;
|
|
1645
|
+
if ($[58] !== handleExit || $[59] !== t33) {
|
|
1646
|
+
t34 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
|
|
1647
|
+
title: "Hook Configuration - Disabled",
|
|
1648
|
+
onCancel: handleExit,
|
|
1649
|
+
inputGuide: _temp62,
|
|
1650
|
+
children: t33
|
|
1651
|
+
}, undefined, false, undefined, this);
|
|
1652
|
+
$[58] = handleExit;
|
|
1653
|
+
$[59] = t33;
|
|
1654
|
+
$[60] = t34;
|
|
1655
|
+
} else {
|
|
1656
|
+
t34 = $[60];
|
|
1657
|
+
}
|
|
1658
|
+
return t34;
|
|
1659
|
+
}
|
|
1660
|
+
switch (modeState.mode) {
|
|
1661
|
+
case "select-event": {
|
|
1662
|
+
let t21;
|
|
1663
|
+
if ($[61] !== combinedToolNames) {
|
|
1664
|
+
t21 = (event_2) => {
|
|
1665
|
+
if (getMatcherMetadata(event_2, combinedToolNames) !== undefined) {
|
|
1666
|
+
setModeState({
|
|
1667
|
+
mode: "select-matcher",
|
|
1668
|
+
event: event_2
|
|
1669
|
+
});
|
|
1670
|
+
} else {
|
|
1671
|
+
setModeState({
|
|
1672
|
+
mode: "select-hook",
|
|
1673
|
+
event: event_2,
|
|
1674
|
+
matcher: ""
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
};
|
|
1678
|
+
$[61] = combinedToolNames;
|
|
1679
|
+
$[62] = t21;
|
|
1680
|
+
} else {
|
|
1681
|
+
t21 = $[62];
|
|
1682
|
+
}
|
|
1683
|
+
let t22;
|
|
1684
|
+
if ($[63] !== handleExit || $[64] !== hookEventMetadata || $[65] !== hooksByEvent || $[66] !== restrictedByPolicy || $[67] !== t21 || $[68] !== totalHooksCount) {
|
|
1685
|
+
t22 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectEventMode, {
|
|
1686
|
+
hookEventMetadata,
|
|
1687
|
+
hooksByEvent,
|
|
1688
|
+
totalHooksCount,
|
|
1689
|
+
restrictedByPolicy,
|
|
1690
|
+
onSelectEvent: t21,
|
|
1691
|
+
onCancel: handleExit
|
|
1692
|
+
}, undefined, false, undefined, this);
|
|
1693
|
+
$[63] = handleExit;
|
|
1694
|
+
$[64] = hookEventMetadata;
|
|
1695
|
+
$[65] = hooksByEvent;
|
|
1696
|
+
$[66] = restrictedByPolicy;
|
|
1697
|
+
$[67] = t21;
|
|
1698
|
+
$[68] = totalHooksCount;
|
|
1699
|
+
$[69] = t22;
|
|
1700
|
+
} else {
|
|
1701
|
+
t22 = $[69];
|
|
1702
|
+
}
|
|
1703
|
+
return t22;
|
|
1704
|
+
}
|
|
1705
|
+
case "select-matcher": {
|
|
1706
|
+
const t21 = hookEventMetadata[modeState.event];
|
|
1707
|
+
let t22;
|
|
1708
|
+
if ($[70] !== modeState.event) {
|
|
1709
|
+
t22 = (matcher) => {
|
|
1710
|
+
setModeState({
|
|
1711
|
+
mode: "select-hook",
|
|
1712
|
+
event: modeState.event,
|
|
1713
|
+
matcher
|
|
1714
|
+
});
|
|
1715
|
+
};
|
|
1716
|
+
$[70] = modeState.event;
|
|
1717
|
+
$[71] = t22;
|
|
1718
|
+
} else {
|
|
1719
|
+
t22 = $[71];
|
|
1720
|
+
}
|
|
1721
|
+
let t23;
|
|
1722
|
+
if ($[72] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1723
|
+
t23 = () => {
|
|
1724
|
+
setModeState({
|
|
1725
|
+
mode: "select-event"
|
|
1726
|
+
});
|
|
1727
|
+
};
|
|
1728
|
+
$[72] = t23;
|
|
1729
|
+
} else {
|
|
1730
|
+
t23 = $[72];
|
|
1731
|
+
}
|
|
1732
|
+
let t24;
|
|
1733
|
+
if ($[73] !== hooksByEventAndMatcher || $[74] !== modeState.event || $[75] !== sortedMatchersForSelectedEvent || $[76] !== t21.description || $[77] !== t22) {
|
|
1734
|
+
t24 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectMatcherMode, {
|
|
1735
|
+
selectedEvent: modeState.event,
|
|
1736
|
+
matchersForSelectedEvent: sortedMatchersForSelectedEvent,
|
|
1737
|
+
hooksByEventAndMatcher,
|
|
1738
|
+
eventDescription: t21.description,
|
|
1739
|
+
onSelect: t22,
|
|
1740
|
+
onCancel: t23
|
|
1741
|
+
}, undefined, false, undefined, this);
|
|
1742
|
+
$[73] = hooksByEventAndMatcher;
|
|
1743
|
+
$[74] = modeState.event;
|
|
1744
|
+
$[75] = sortedMatchersForSelectedEvent;
|
|
1745
|
+
$[76] = t21.description;
|
|
1746
|
+
$[77] = t22;
|
|
1747
|
+
$[78] = t24;
|
|
1748
|
+
} else {
|
|
1749
|
+
t24 = $[78];
|
|
1750
|
+
}
|
|
1751
|
+
return t24;
|
|
1752
|
+
}
|
|
1753
|
+
case "select-hook": {
|
|
1754
|
+
const t21 = hookEventMetadata[modeState.event];
|
|
1755
|
+
let t22;
|
|
1756
|
+
if ($[79] !== modeState.event) {
|
|
1757
|
+
t22 = (hook_1) => {
|
|
1758
|
+
setModeState({
|
|
1759
|
+
mode: "view-hook",
|
|
1760
|
+
event: modeState.event,
|
|
1761
|
+
hook: hook_1
|
|
1762
|
+
});
|
|
1763
|
+
};
|
|
1764
|
+
$[79] = modeState.event;
|
|
1765
|
+
$[80] = t22;
|
|
1766
|
+
} else {
|
|
1767
|
+
t22 = $[80];
|
|
1768
|
+
}
|
|
1769
|
+
let t23;
|
|
1770
|
+
if ($[81] !== combinedToolNames || $[82] !== modeState.event) {
|
|
1771
|
+
t23 = () => {
|
|
1772
|
+
if (getMatcherMetadata(modeState.event, combinedToolNames) !== undefined) {
|
|
1773
|
+
setModeState({
|
|
1774
|
+
mode: "select-matcher",
|
|
1775
|
+
event: modeState.event
|
|
1776
|
+
});
|
|
1777
|
+
} else {
|
|
1778
|
+
setModeState({
|
|
1779
|
+
mode: "select-event"
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1782
|
+
};
|
|
1783
|
+
$[81] = combinedToolNames;
|
|
1784
|
+
$[82] = modeState.event;
|
|
1785
|
+
$[83] = t23;
|
|
1786
|
+
} else {
|
|
1787
|
+
t23 = $[83];
|
|
1788
|
+
}
|
|
1789
|
+
let t24;
|
|
1790
|
+
if ($[84] !== hooksForSelectedMatcher || $[85] !== modeState.event || $[86] !== modeState.matcher || $[87] !== t21 || $[88] !== t22 || $[89] !== t23) {
|
|
1791
|
+
t24 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(SelectHookMode, {
|
|
1792
|
+
selectedEvent: modeState.event,
|
|
1793
|
+
selectedMatcher: modeState.matcher,
|
|
1794
|
+
hooksForSelectedMatcher,
|
|
1795
|
+
hookEventMetadata: t21,
|
|
1796
|
+
onSelect: t22,
|
|
1797
|
+
onCancel: t23
|
|
1798
|
+
}, undefined, false, undefined, this);
|
|
1799
|
+
$[84] = hooksForSelectedMatcher;
|
|
1800
|
+
$[85] = modeState.event;
|
|
1801
|
+
$[86] = modeState.matcher;
|
|
1802
|
+
$[87] = t21;
|
|
1803
|
+
$[88] = t22;
|
|
1804
|
+
$[89] = t23;
|
|
1805
|
+
$[90] = t24;
|
|
1806
|
+
} else {
|
|
1807
|
+
t24 = $[90];
|
|
1808
|
+
}
|
|
1809
|
+
return t24;
|
|
1810
|
+
}
|
|
1811
|
+
case "view-hook": {
|
|
1812
|
+
const t21 = modeState.hook;
|
|
1813
|
+
let t22;
|
|
1814
|
+
if ($[91] !== combinedToolNames || $[92] !== modeState.event) {
|
|
1815
|
+
t22 = getMatcherMetadata(modeState.event, combinedToolNames);
|
|
1816
|
+
$[91] = combinedToolNames;
|
|
1817
|
+
$[92] = modeState.event;
|
|
1818
|
+
$[93] = t22;
|
|
1819
|
+
} else {
|
|
1820
|
+
t22 = $[93];
|
|
1821
|
+
}
|
|
1822
|
+
const t23 = t22 !== undefined;
|
|
1823
|
+
let t24;
|
|
1824
|
+
if ($[94] !== modeState) {
|
|
1825
|
+
t24 = () => {
|
|
1826
|
+
const {
|
|
1827
|
+
event: event_1,
|
|
1828
|
+
hook: hook_0
|
|
1829
|
+
} = modeState;
|
|
1830
|
+
setModeState({
|
|
1831
|
+
mode: "select-hook",
|
|
1832
|
+
event: event_1,
|
|
1833
|
+
matcher: hook_0.matcher || ""
|
|
1834
|
+
});
|
|
1835
|
+
};
|
|
1836
|
+
$[94] = modeState;
|
|
1837
|
+
$[95] = t24;
|
|
1838
|
+
} else {
|
|
1839
|
+
t24 = $[95];
|
|
1840
|
+
}
|
|
1841
|
+
let t25;
|
|
1842
|
+
if ($[96] !== modeState.hook || $[97] !== t23 || $[98] !== t24) {
|
|
1843
|
+
t25 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ViewHookMode, {
|
|
1844
|
+
selectedHook: t21,
|
|
1845
|
+
eventSupportsMatcher: t23,
|
|
1846
|
+
onCancel: t24
|
|
1847
|
+
}, undefined, false, undefined, this);
|
|
1848
|
+
$[96] = modeState.hook;
|
|
1849
|
+
$[97] = t23;
|
|
1850
|
+
$[98] = t24;
|
|
1851
|
+
$[99] = t25;
|
|
1852
|
+
} else {
|
|
1853
|
+
t25 = $[99];
|
|
1854
|
+
}
|
|
1855
|
+
return t25;
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
function _temp62() {
|
|
1860
|
+
return /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1861
|
+
children: "Esc to close"
|
|
1862
|
+
}, undefined, false, undefined, this);
|
|
1863
|
+
}
|
|
1864
|
+
function _temp5(sum, hooks) {
|
|
1865
|
+
return sum + hooks.length;
|
|
1866
|
+
}
|
|
1867
|
+
function _temp42(tool) {
|
|
1868
|
+
return tool.name;
|
|
1869
|
+
}
|
|
1870
|
+
function _temp32(s) {
|
|
1871
|
+
return s.mcp;
|
|
1872
|
+
}
|
|
1873
|
+
function _temp23() {
|
|
1874
|
+
return getSettingsForSource("policySettings")?.allowManagedHooksOnly === true;
|
|
1875
|
+
}
|
|
1876
|
+
function _temp7() {
|
|
1877
|
+
const settings = getSettings_DEPRECATED();
|
|
1878
|
+
const hooksDisabled = settings?.disableAllHooks === true;
|
|
1879
|
+
return hooksDisabled && getSettingsForSource("policySettings")?.disableAllHooks === true;
|
|
1880
|
+
}
|
|
1881
|
+
var import_compiler_runtime5, import_react, jsx_dev_runtime5;
|
|
1882
|
+
var init_HooksConfigMenu = __esm(() => {
|
|
1883
|
+
init_AppState();
|
|
1884
|
+
init_useSettingsChange();
|
|
1885
|
+
init_ink();
|
|
1886
|
+
init_useKeybinding();
|
|
1887
|
+
init_hooksConfigManager();
|
|
1888
|
+
init_settings();
|
|
1889
|
+
init_stringUtils();
|
|
1890
|
+
init_Dialog();
|
|
1891
|
+
init_SelectEventMode();
|
|
1892
|
+
init_SelectHookMode();
|
|
1893
|
+
init_SelectMatcherMode();
|
|
1894
|
+
init_ViewHookMode();
|
|
1895
|
+
import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
|
|
1896
|
+
import_react = __toESM(require_react(), 1);
|
|
1897
|
+
jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1898
|
+
});
|
|
1899
|
+
|
|
1900
|
+
// src/commands/hooks/hooks.tsx
|
|
1901
|
+
var jsx_dev_runtime6, call = async (onDone, context) => {
|
|
1902
|
+
logEvent("tengu_hooks_command", {});
|
|
1903
|
+
const appState = context.getAppState();
|
|
1904
|
+
const permissionContext = appState.toolPermissionContext;
|
|
1905
|
+
const toolNames = getTools(permissionContext).map((tool) => tool.name);
|
|
1906
|
+
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(HooksConfigMenu, {
|
|
1907
|
+
toolNames,
|
|
1908
|
+
onExit: onDone
|
|
1909
|
+
}, undefined, false, undefined, this);
|
|
1910
|
+
};
|
|
1911
|
+
var init_hooks = __esm(() => {
|
|
1912
|
+
init_HooksConfigMenu();
|
|
1913
|
+
init_analytics();
|
|
1914
|
+
init_tools();
|
|
1915
|
+
jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1916
|
+
});
|
|
1917
|
+
init_hooks();
|
|
1918
|
+
|
|
1919
|
+
export {
|
|
1920
|
+
call
|
|
1921
|
+
};
|