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,2833 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
Messages,
|
|
4
|
+
init_Messages
|
|
5
|
+
} from "./chunk-jtcyjc3k.js";
|
|
6
|
+
import {
|
|
7
|
+
LoadingState,
|
|
8
|
+
init_LoadingState
|
|
9
|
+
} from "./chunk-065m026w.js";
|
|
10
|
+
import {
|
|
11
|
+
SearchBox,
|
|
12
|
+
init_SearchBox,
|
|
13
|
+
init_useSearchInput,
|
|
14
|
+
useSearchInput
|
|
15
|
+
} from "./chunk-w3whm4mn.js";
|
|
16
|
+
import {
|
|
17
|
+
Select,
|
|
18
|
+
Spinner,
|
|
19
|
+
TextInput,
|
|
20
|
+
getAllBaseTools,
|
|
21
|
+
getFirstMeaningfulUserMessageTextContent,
|
|
22
|
+
getSessionIdFromLog,
|
|
23
|
+
getWorktreePaths,
|
|
24
|
+
init_Spinner,
|
|
25
|
+
init_TextInput,
|
|
26
|
+
init_getWorktreePaths,
|
|
27
|
+
init_select,
|
|
28
|
+
init_sessionStorage,
|
|
29
|
+
init_shellQuote,
|
|
30
|
+
init_sideQuery,
|
|
31
|
+
init_tools1 as init_tools,
|
|
32
|
+
isCustomTitleEnabled,
|
|
33
|
+
isLiteLog,
|
|
34
|
+
loadFullLog,
|
|
35
|
+
quote,
|
|
36
|
+
saveCustomTitle,
|
|
37
|
+
sideQuery
|
|
38
|
+
} from "./chunk-ewsgsw9h.js";
|
|
39
|
+
import {
|
|
40
|
+
Byline,
|
|
41
|
+
ConfigurableShortcutHint,
|
|
42
|
+
KeyboardShortcutHint,
|
|
43
|
+
init_Byline,
|
|
44
|
+
init_ConfigurableShortcutHint,
|
|
45
|
+
init_KeyboardShortcutHint
|
|
46
|
+
} from "./chunk-89e1v45e.js";
|
|
47
|
+
import {
|
|
48
|
+
init_useExitOnCtrlCDWithKeybindings,
|
|
49
|
+
useExitOnCtrlCDWithKeybindings
|
|
50
|
+
} from "./chunk-0rg6yrhy.js";
|
|
51
|
+
import {
|
|
52
|
+
Divider,
|
|
53
|
+
init_Divider,
|
|
54
|
+
init_useKeybinding,
|
|
55
|
+
init_useTerminalSize,
|
|
56
|
+
useKeybinding,
|
|
57
|
+
useTerminalSize
|
|
58
|
+
} from "./chunk-1qakq4sn.js";
|
|
59
|
+
import {
|
|
60
|
+
ThemedBox_default,
|
|
61
|
+
ThemedText,
|
|
62
|
+
applyColor,
|
|
63
|
+
getTheme,
|
|
64
|
+
init_colorize,
|
|
65
|
+
init_ink,
|
|
66
|
+
init_theme,
|
|
67
|
+
require_compiler_runtime,
|
|
68
|
+
useTerminalFocus,
|
|
69
|
+
useTheme,
|
|
70
|
+
use_input_default
|
|
71
|
+
} from "./chunk-s9mesaw0.js";
|
|
72
|
+
import {
|
|
73
|
+
require_jsx_dev_runtime,
|
|
74
|
+
require_react
|
|
75
|
+
} from "./chunk-g338npwr.js";
|
|
76
|
+
import {
|
|
77
|
+
getSmallFastModel,
|
|
78
|
+
init_model,
|
|
79
|
+
init_source,
|
|
80
|
+
source_default
|
|
81
|
+
} from "./chunk-3f7rypmf.js";
|
|
82
|
+
import {
|
|
83
|
+
count,
|
|
84
|
+
init_array
|
|
85
|
+
} from "./chunk-0e1xsncc.js";
|
|
86
|
+
import {
|
|
87
|
+
formatLogMetadata,
|
|
88
|
+
formatRelativeTimeAgo,
|
|
89
|
+
init_format,
|
|
90
|
+
init_stringWidth,
|
|
91
|
+
stringWidth,
|
|
92
|
+
truncateToWidth
|
|
93
|
+
} from "./chunk-1rvz0433.js";
|
|
94
|
+
import {
|
|
95
|
+
init_analytics,
|
|
96
|
+
logEvent
|
|
97
|
+
} from "./chunk-f2mhrmww.js";
|
|
98
|
+
import {
|
|
99
|
+
getBranch,
|
|
100
|
+
init_git
|
|
101
|
+
} from "./chunk-hrzerbfw.js";
|
|
102
|
+
import {
|
|
103
|
+
getLogDisplayTitle,
|
|
104
|
+
init_log,
|
|
105
|
+
logError
|
|
106
|
+
} from "./chunk-p7g7pf3f.js";
|
|
107
|
+
import {
|
|
108
|
+
init_debug,
|
|
109
|
+
init_slowOperations,
|
|
110
|
+
jsonParse,
|
|
111
|
+
logForDebugging
|
|
112
|
+
} from "./chunk-nxsh6de2.js";
|
|
113
|
+
import {
|
|
114
|
+
getOriginalCwd,
|
|
115
|
+
getSessionId,
|
|
116
|
+
init_state
|
|
117
|
+
} from "./chunk-qqfa0dqg.js";
|
|
118
|
+
import {
|
|
119
|
+
__esm,
|
|
120
|
+
__toESM
|
|
121
|
+
} from "./chunk-qp2qdcda.js";
|
|
122
|
+
|
|
123
|
+
// src/components/SessionPreview.tsx
|
|
124
|
+
function SessionPreview(t0) {
|
|
125
|
+
const $ = import_compiler_runtime.c(33);
|
|
126
|
+
const {
|
|
127
|
+
log,
|
|
128
|
+
onExit,
|
|
129
|
+
onSelect
|
|
130
|
+
} = t0;
|
|
131
|
+
const [fullLog, setFullLog] = import_react.default.useState(null);
|
|
132
|
+
let t1;
|
|
133
|
+
let t2;
|
|
134
|
+
if ($[0] !== log) {
|
|
135
|
+
t1 = () => {
|
|
136
|
+
setFullLog(null);
|
|
137
|
+
if (isLiteLog(log)) {
|
|
138
|
+
loadFullLog(log).then(setFullLog);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
t2 = [log];
|
|
142
|
+
$[0] = log;
|
|
143
|
+
$[1] = t1;
|
|
144
|
+
$[2] = t2;
|
|
145
|
+
} else {
|
|
146
|
+
t1 = $[1];
|
|
147
|
+
t2 = $[2];
|
|
148
|
+
}
|
|
149
|
+
import_react.default.useEffect(t1, t2);
|
|
150
|
+
const isLoading = isLiteLog(log) && fullLog === null;
|
|
151
|
+
const displayLog = fullLog ?? log;
|
|
152
|
+
let t3;
|
|
153
|
+
if ($[3] !== displayLog) {
|
|
154
|
+
t3 = getSessionIdFromLog(displayLog) || "";
|
|
155
|
+
$[3] = displayLog;
|
|
156
|
+
$[4] = t3;
|
|
157
|
+
} else {
|
|
158
|
+
t3 = $[4];
|
|
159
|
+
}
|
|
160
|
+
const conversationId = t3;
|
|
161
|
+
let t4;
|
|
162
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
163
|
+
t4 = getAllBaseTools();
|
|
164
|
+
$[5] = t4;
|
|
165
|
+
} else {
|
|
166
|
+
t4 = $[5];
|
|
167
|
+
}
|
|
168
|
+
const tools = t4;
|
|
169
|
+
let t5;
|
|
170
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
171
|
+
t5 = {
|
|
172
|
+
context: "Confirmation"
|
|
173
|
+
};
|
|
174
|
+
$[6] = t5;
|
|
175
|
+
} else {
|
|
176
|
+
t5 = $[6];
|
|
177
|
+
}
|
|
178
|
+
useKeybinding("confirm:no", onExit, t5);
|
|
179
|
+
let t6;
|
|
180
|
+
if ($[7] !== fullLog || $[8] !== log || $[9] !== onSelect) {
|
|
181
|
+
t6 = () => {
|
|
182
|
+
onSelect(fullLog ?? log);
|
|
183
|
+
};
|
|
184
|
+
$[7] = fullLog;
|
|
185
|
+
$[8] = log;
|
|
186
|
+
$[9] = onSelect;
|
|
187
|
+
$[10] = t6;
|
|
188
|
+
} else {
|
|
189
|
+
t6 = $[10];
|
|
190
|
+
}
|
|
191
|
+
const handleSelect = t6;
|
|
192
|
+
let t7;
|
|
193
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
194
|
+
t7 = {
|
|
195
|
+
context: "Confirmation"
|
|
196
|
+
};
|
|
197
|
+
$[11] = t7;
|
|
198
|
+
} else {
|
|
199
|
+
t7 = $[11];
|
|
200
|
+
}
|
|
201
|
+
useKeybinding("confirm:yes", handleSelect, t7);
|
|
202
|
+
if (isLoading) {
|
|
203
|
+
let t82;
|
|
204
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
205
|
+
t82 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(LoadingState, {
|
|
206
|
+
message: "Loading session\u2026"
|
|
207
|
+
}, undefined, false, undefined, this);
|
|
208
|
+
$[12] = t82;
|
|
209
|
+
} else {
|
|
210
|
+
t82 = $[12];
|
|
211
|
+
}
|
|
212
|
+
let t92;
|
|
213
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
214
|
+
t92 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
215
|
+
flexDirection: "column",
|
|
216
|
+
padding: 1,
|
|
217
|
+
children: [
|
|
218
|
+
t82,
|
|
219
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
220
|
+
dimColor: true,
|
|
221
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Byline, {
|
|
222
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ConfigurableShortcutHint, {
|
|
223
|
+
action: "confirm:no",
|
|
224
|
+
context: "Confirmation",
|
|
225
|
+
fallback: "Esc",
|
|
226
|
+
description: "cancel"
|
|
227
|
+
}, undefined, false, undefined, this)
|
|
228
|
+
}, undefined, false, undefined, this)
|
|
229
|
+
}, undefined, false, undefined, this)
|
|
230
|
+
]
|
|
231
|
+
}, undefined, true, undefined, this);
|
|
232
|
+
$[13] = t92;
|
|
233
|
+
} else {
|
|
234
|
+
t92 = $[13];
|
|
235
|
+
}
|
|
236
|
+
return t92;
|
|
237
|
+
}
|
|
238
|
+
let t8;
|
|
239
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
240
|
+
t8 = [];
|
|
241
|
+
$[14] = t8;
|
|
242
|
+
} else {
|
|
243
|
+
t8 = $[14];
|
|
244
|
+
}
|
|
245
|
+
let t10;
|
|
246
|
+
let t9;
|
|
247
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
248
|
+
t9 = [];
|
|
249
|
+
t10 = new Set;
|
|
250
|
+
$[15] = t10;
|
|
251
|
+
$[16] = t9;
|
|
252
|
+
} else {
|
|
253
|
+
t10 = $[15];
|
|
254
|
+
t9 = $[16];
|
|
255
|
+
}
|
|
256
|
+
let t11;
|
|
257
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
258
|
+
t11 = [];
|
|
259
|
+
$[17] = t11;
|
|
260
|
+
} else {
|
|
261
|
+
t11 = $[17];
|
|
262
|
+
}
|
|
263
|
+
let t12;
|
|
264
|
+
if ($[18] !== conversationId || $[19] !== displayLog.messages) {
|
|
265
|
+
t12 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Messages, {
|
|
266
|
+
messages: displayLog.messages,
|
|
267
|
+
tools,
|
|
268
|
+
commands: t8,
|
|
269
|
+
verbose: true,
|
|
270
|
+
toolJSX: null,
|
|
271
|
+
toolUseConfirmQueue: t9,
|
|
272
|
+
inProgressToolUseIDs: t10,
|
|
273
|
+
isMessageSelectorVisible: false,
|
|
274
|
+
conversationId,
|
|
275
|
+
screen: "transcript",
|
|
276
|
+
streamingToolUses: t11,
|
|
277
|
+
showAllInTranscript: true,
|
|
278
|
+
isLoading: false
|
|
279
|
+
}, undefined, false, undefined, this);
|
|
280
|
+
$[18] = conversationId;
|
|
281
|
+
$[19] = displayLog.messages;
|
|
282
|
+
$[20] = t12;
|
|
283
|
+
} else {
|
|
284
|
+
t12 = $[20];
|
|
285
|
+
}
|
|
286
|
+
let t13;
|
|
287
|
+
if ($[21] !== displayLog.modified) {
|
|
288
|
+
t13 = formatRelativeTimeAgo(displayLog.modified);
|
|
289
|
+
$[21] = displayLog.modified;
|
|
290
|
+
$[22] = t13;
|
|
291
|
+
} else {
|
|
292
|
+
t13 = $[22];
|
|
293
|
+
}
|
|
294
|
+
const t14 = displayLog.gitBranch ? ` \xB7 ${displayLog.gitBranch}` : "";
|
|
295
|
+
let t15;
|
|
296
|
+
if ($[23] !== displayLog.messageCount || $[24] !== t13 || $[25] !== t14) {
|
|
297
|
+
t15 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
298
|
+
children: [
|
|
299
|
+
t13,
|
|
300
|
+
" \xB7",
|
|
301
|
+
" ",
|
|
302
|
+
displayLog.messageCount,
|
|
303
|
+
" messages",
|
|
304
|
+
t14
|
|
305
|
+
]
|
|
306
|
+
}, undefined, true, undefined, this);
|
|
307
|
+
$[23] = displayLog.messageCount;
|
|
308
|
+
$[24] = t13;
|
|
309
|
+
$[25] = t14;
|
|
310
|
+
$[26] = t15;
|
|
311
|
+
} else {
|
|
312
|
+
t15 = $[26];
|
|
313
|
+
}
|
|
314
|
+
let t16;
|
|
315
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
316
|
+
t16 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
317
|
+
dimColor: true,
|
|
318
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Byline, {
|
|
319
|
+
children: [
|
|
320
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(KeyboardShortcutHint, {
|
|
321
|
+
shortcut: "Enter",
|
|
322
|
+
action: "resume"
|
|
323
|
+
}, undefined, false, undefined, this),
|
|
324
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ConfigurableShortcutHint, {
|
|
325
|
+
action: "confirm:no",
|
|
326
|
+
context: "Confirmation",
|
|
327
|
+
fallback: "Esc",
|
|
328
|
+
description: "cancel"
|
|
329
|
+
}, undefined, false, undefined, this)
|
|
330
|
+
]
|
|
331
|
+
}, undefined, true, undefined, this)
|
|
332
|
+
}, undefined, false, undefined, this);
|
|
333
|
+
$[27] = t16;
|
|
334
|
+
} else {
|
|
335
|
+
t16 = $[27];
|
|
336
|
+
}
|
|
337
|
+
let t17;
|
|
338
|
+
if ($[28] !== t15) {
|
|
339
|
+
t17 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
340
|
+
flexShrink: 0,
|
|
341
|
+
flexDirection: "column",
|
|
342
|
+
borderTopDimColor: true,
|
|
343
|
+
borderBottom: false,
|
|
344
|
+
borderLeft: false,
|
|
345
|
+
borderRight: false,
|
|
346
|
+
borderStyle: "single",
|
|
347
|
+
paddingLeft: 2,
|
|
348
|
+
children: [
|
|
349
|
+
t15,
|
|
350
|
+
t16
|
|
351
|
+
]
|
|
352
|
+
}, undefined, true, undefined, this);
|
|
353
|
+
$[28] = t15;
|
|
354
|
+
$[29] = t17;
|
|
355
|
+
} else {
|
|
356
|
+
t17 = $[29];
|
|
357
|
+
}
|
|
358
|
+
let t18;
|
|
359
|
+
if ($[30] !== t12 || $[31] !== t17) {
|
|
360
|
+
t18 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
361
|
+
flexDirection: "column",
|
|
362
|
+
children: [
|
|
363
|
+
t12,
|
|
364
|
+
t17
|
|
365
|
+
]
|
|
366
|
+
}, undefined, true, undefined, this);
|
|
367
|
+
$[30] = t12;
|
|
368
|
+
$[31] = t17;
|
|
369
|
+
$[32] = t18;
|
|
370
|
+
} else {
|
|
371
|
+
t18 = $[32];
|
|
372
|
+
}
|
|
373
|
+
return t18;
|
|
374
|
+
}
|
|
375
|
+
var import_compiler_runtime, import_react, jsx_dev_runtime;
|
|
376
|
+
var init_SessionPreview = __esm(() => {
|
|
377
|
+
init_ink();
|
|
378
|
+
init_useKeybinding();
|
|
379
|
+
init_tools();
|
|
380
|
+
init_format();
|
|
381
|
+
init_sessionStorage();
|
|
382
|
+
init_ConfigurableShortcutHint();
|
|
383
|
+
init_Byline();
|
|
384
|
+
init_KeyboardShortcutHint();
|
|
385
|
+
init_LoadingState();
|
|
386
|
+
init_Messages();
|
|
387
|
+
import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
|
|
388
|
+
import_react = __toESM(require_react(), 1);
|
|
389
|
+
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
// src/components/TagTabs.tsx
|
|
393
|
+
function getTabWidth(tab, maxWidth) {
|
|
394
|
+
if (tab === ALL_TAB_LABEL) {
|
|
395
|
+
return ALL_TAB_LABEL.length + TAB_PADDING;
|
|
396
|
+
}
|
|
397
|
+
const tagWidth = stringWidth(tab);
|
|
398
|
+
const effectiveTagWidth = maxWidth ? Math.min(tagWidth, maxWidth - TAB_PADDING - HASH_PREFIX_LENGTH) : tagWidth;
|
|
399
|
+
return Math.max(0, effectiveTagWidth) + TAB_PADDING + HASH_PREFIX_LENGTH;
|
|
400
|
+
}
|
|
401
|
+
function truncateTag(tag, maxWidth) {
|
|
402
|
+
const availableForTag = maxWidth - TAB_PADDING - HASH_PREFIX_LENGTH;
|
|
403
|
+
if (stringWidth(tag) <= availableForTag) {
|
|
404
|
+
return tag;
|
|
405
|
+
}
|
|
406
|
+
if (availableForTag <= 1) {
|
|
407
|
+
return tag.charAt(0);
|
|
408
|
+
}
|
|
409
|
+
return truncateToWidth(tag, availableForTag);
|
|
410
|
+
}
|
|
411
|
+
function TagTabs({
|
|
412
|
+
tabs,
|
|
413
|
+
selectedIndex,
|
|
414
|
+
availableWidth,
|
|
415
|
+
showAllProjects = false
|
|
416
|
+
}) {
|
|
417
|
+
const resumeLabel = showAllProjects ? "Resume (All Projects)" : "Resume";
|
|
418
|
+
const resumeLabelWidth = resumeLabel.length + 1;
|
|
419
|
+
const rightHintWidth = Math.max(RIGHT_HINT_WIDTH_WITH_COUNT, RIGHT_HINT_WIDTH_NO_COUNT);
|
|
420
|
+
const maxTabsWidth = availableWidth - resumeLabelWidth - rightHintWidth - 2;
|
|
421
|
+
const safeSelectedIndex = Math.max(0, Math.min(selectedIndex, tabs.length - 1));
|
|
422
|
+
const maxSingleTabWidth = Math.max(20, Math.floor(maxTabsWidth / 2));
|
|
423
|
+
const tabWidths = tabs.map((tab) => getTabWidth(tab, maxSingleTabWidth));
|
|
424
|
+
let startIndex = 0;
|
|
425
|
+
let endIndex = tabs.length;
|
|
426
|
+
const totalTabsWidth = tabWidths.reduce((sum, w, i) => sum + w + (i < tabWidths.length - 1 ? 1 : 0), 0);
|
|
427
|
+
if (totalTabsWidth > maxTabsWidth) {
|
|
428
|
+
const effectiveMaxWidth = maxTabsWidth - LEFT_ARROW_WIDTH;
|
|
429
|
+
let windowWidth = tabWidths[safeSelectedIndex] ?? 0;
|
|
430
|
+
startIndex = safeSelectedIndex;
|
|
431
|
+
endIndex = safeSelectedIndex + 1;
|
|
432
|
+
while (startIndex > 0 || endIndex < tabs.length) {
|
|
433
|
+
const canExpandLeft = startIndex > 0;
|
|
434
|
+
const canExpandRight = endIndex < tabs.length;
|
|
435
|
+
if (canExpandLeft) {
|
|
436
|
+
const leftWidth = (tabWidths[startIndex - 1] ?? 0) + 1;
|
|
437
|
+
if (windowWidth + leftWidth <= effectiveMaxWidth) {
|
|
438
|
+
startIndex--;
|
|
439
|
+
windowWidth += leftWidth;
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
if (canExpandRight) {
|
|
444
|
+
const rightWidth = (tabWidths[endIndex] ?? 0) + 1;
|
|
445
|
+
if (windowWidth + rightWidth <= effectiveMaxWidth) {
|
|
446
|
+
endIndex++;
|
|
447
|
+
windowWidth += rightWidth;
|
|
448
|
+
continue;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
const hiddenLeft = startIndex;
|
|
455
|
+
const hiddenRight = tabs.length - endIndex;
|
|
456
|
+
const visibleTabs = tabs.slice(startIndex, endIndex);
|
|
457
|
+
const visibleIndices = visibleTabs.map((_, i_0) => startIndex + i_0);
|
|
458
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
459
|
+
flexDirection: "row",
|
|
460
|
+
gap: 1,
|
|
461
|
+
children: [
|
|
462
|
+
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
463
|
+
color: "suggestion",
|
|
464
|
+
children: resumeLabel
|
|
465
|
+
}, undefined, false, undefined, this),
|
|
466
|
+
hiddenLeft > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
467
|
+
dimColor: true,
|
|
468
|
+
children: [
|
|
469
|
+
LEFT_ARROW_PREFIX,
|
|
470
|
+
hiddenLeft
|
|
471
|
+
]
|
|
472
|
+
}, undefined, true, undefined, this),
|
|
473
|
+
visibleTabs.map((tab_0, i_1) => {
|
|
474
|
+
const actualIndex = visibleIndices[i_1];
|
|
475
|
+
const isSelected = actualIndex === safeSelectedIndex;
|
|
476
|
+
const displayText = tab_0 === ALL_TAB_LABEL ? tab_0 : `#${truncateTag(tab_0, maxSingleTabWidth - TAB_PADDING)}`;
|
|
477
|
+
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
478
|
+
backgroundColor: isSelected ? "suggestion" : undefined,
|
|
479
|
+
color: isSelected ? "inverseText" : undefined,
|
|
480
|
+
bold: isSelected,
|
|
481
|
+
children: [
|
|
482
|
+
" ",
|
|
483
|
+
displayText,
|
|
484
|
+
" "
|
|
485
|
+
]
|
|
486
|
+
}, tab_0, true, undefined, this);
|
|
487
|
+
}),
|
|
488
|
+
hiddenRight > 0 ? /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
489
|
+
dimColor: true,
|
|
490
|
+
children: [
|
|
491
|
+
RIGHT_HINT_WITH_COUNT_PREFIX,
|
|
492
|
+
hiddenRight,
|
|
493
|
+
RIGHT_HINT_SUFFIX
|
|
494
|
+
]
|
|
495
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
496
|
+
dimColor: true,
|
|
497
|
+
children: RIGHT_HINT_NO_COUNT
|
|
498
|
+
}, undefined, false, undefined, this)
|
|
499
|
+
]
|
|
500
|
+
}, undefined, true, undefined, this);
|
|
501
|
+
}
|
|
502
|
+
var jsx_dev_runtime2, ALL_TAB_LABEL = "All", TAB_PADDING = 2, HASH_PREFIX_LENGTH = 1, LEFT_ARROW_PREFIX = "\u2190 ", RIGHT_HINT_WITH_COUNT_PREFIX = "\u2192", RIGHT_HINT_SUFFIX = " (tab to cycle)", RIGHT_HINT_NO_COUNT = "(tab to cycle)", MAX_OVERFLOW_DIGITS = 2, LEFT_ARROW_WIDTH, RIGHT_HINT_WIDTH_WITH_COUNT, RIGHT_HINT_WIDTH_NO_COUNT;
|
|
503
|
+
var init_TagTabs = __esm(() => {
|
|
504
|
+
init_stringWidth();
|
|
505
|
+
init_ink();
|
|
506
|
+
init_format();
|
|
507
|
+
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
508
|
+
LEFT_ARROW_WIDTH = LEFT_ARROW_PREFIX.length + MAX_OVERFLOW_DIGITS + 1;
|
|
509
|
+
RIGHT_HINT_WIDTH_WITH_COUNT = RIGHT_HINT_WITH_COUNT_PREFIX.length + MAX_OVERFLOW_DIGITS + RIGHT_HINT_SUFFIX.length;
|
|
510
|
+
RIGHT_HINT_WIDTH_NO_COUNT = RIGHT_HINT_NO_COUNT.length;
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
// src/components/ui/TreeSelect.tsx
|
|
514
|
+
function TreeSelect(t0) {
|
|
515
|
+
const $ = import_compiler_runtime2.c(48);
|
|
516
|
+
const {
|
|
517
|
+
nodes,
|
|
518
|
+
onSelect,
|
|
519
|
+
onCancel,
|
|
520
|
+
onFocus,
|
|
521
|
+
focusNodeId,
|
|
522
|
+
visibleOptionCount,
|
|
523
|
+
layout: t1,
|
|
524
|
+
isDisabled: t2,
|
|
525
|
+
hideIndexes: t3,
|
|
526
|
+
isNodeExpanded,
|
|
527
|
+
onExpand,
|
|
528
|
+
onCollapse,
|
|
529
|
+
getParentPrefix,
|
|
530
|
+
getChildPrefix,
|
|
531
|
+
onUpFromFirstItem
|
|
532
|
+
} = t0;
|
|
533
|
+
const layout = t1 === undefined ? "expanded" : t1;
|
|
534
|
+
const isDisabled = t2 === undefined ? false : t2;
|
|
535
|
+
const hideIndexes = t3 === undefined ? false : t3;
|
|
536
|
+
let t4;
|
|
537
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
538
|
+
t4 = new Set;
|
|
539
|
+
$[0] = t4;
|
|
540
|
+
} else {
|
|
541
|
+
t4 = $[0];
|
|
542
|
+
}
|
|
543
|
+
const [internalExpandedIds, setInternalExpandedIds] = import_react2.default.useState(t4);
|
|
544
|
+
const isProgrammaticFocusRef = import_react2.default.useRef(false);
|
|
545
|
+
const lastFocusedIdRef = import_react2.default.useRef(null);
|
|
546
|
+
let t5;
|
|
547
|
+
if ($[1] !== internalExpandedIds || $[2] !== isNodeExpanded) {
|
|
548
|
+
t5 = (nodeId) => {
|
|
549
|
+
if (isNodeExpanded) {
|
|
550
|
+
return isNodeExpanded(nodeId);
|
|
551
|
+
}
|
|
552
|
+
return internalExpandedIds.has(nodeId);
|
|
553
|
+
};
|
|
554
|
+
$[1] = internalExpandedIds;
|
|
555
|
+
$[2] = isNodeExpanded;
|
|
556
|
+
$[3] = t5;
|
|
557
|
+
} else {
|
|
558
|
+
t5 = $[3];
|
|
559
|
+
}
|
|
560
|
+
const isExpanded = t5;
|
|
561
|
+
let result;
|
|
562
|
+
if ($[4] !== isExpanded || $[5] !== nodes) {
|
|
563
|
+
let traverse = function(node, depth, parentId) {
|
|
564
|
+
const hasChildren = !!node.children && node.children.length > 0;
|
|
565
|
+
const nodeIsExpanded = isExpanded(node.id);
|
|
566
|
+
result.push({
|
|
567
|
+
node,
|
|
568
|
+
depth,
|
|
569
|
+
isExpanded: nodeIsExpanded,
|
|
570
|
+
hasChildren,
|
|
571
|
+
parentId
|
|
572
|
+
});
|
|
573
|
+
if (hasChildren && nodeIsExpanded && node.children) {
|
|
574
|
+
for (const child of node.children) {
|
|
575
|
+
traverse(child, depth + 1, node.id);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
result = [];
|
|
580
|
+
for (const node_0 of nodes) {
|
|
581
|
+
traverse(node_0, 0, undefined);
|
|
582
|
+
}
|
|
583
|
+
$[4] = isExpanded;
|
|
584
|
+
$[5] = nodes;
|
|
585
|
+
$[6] = result;
|
|
586
|
+
} else {
|
|
587
|
+
result = $[6];
|
|
588
|
+
}
|
|
589
|
+
const flattenedNodes = result;
|
|
590
|
+
const defaultGetParentPrefix = _temp;
|
|
591
|
+
const defaultGetChildPrefix = _temp2;
|
|
592
|
+
const parentPrefixFn = getParentPrefix ?? defaultGetParentPrefix;
|
|
593
|
+
const childPrefixFn = getChildPrefix ?? defaultGetChildPrefix;
|
|
594
|
+
let t6;
|
|
595
|
+
if ($[7] !== childPrefixFn || $[8] !== parentPrefixFn) {
|
|
596
|
+
t6 = (flatNode) => {
|
|
597
|
+
let prefix = "";
|
|
598
|
+
if (flatNode.hasChildren) {
|
|
599
|
+
prefix = parentPrefixFn(flatNode.isExpanded);
|
|
600
|
+
} else {
|
|
601
|
+
if (flatNode.depth > 0) {
|
|
602
|
+
prefix = childPrefixFn(flatNode.depth);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
return prefix + flatNode.node.label;
|
|
606
|
+
};
|
|
607
|
+
$[7] = childPrefixFn;
|
|
608
|
+
$[8] = parentPrefixFn;
|
|
609
|
+
$[9] = t6;
|
|
610
|
+
} else {
|
|
611
|
+
t6 = $[9];
|
|
612
|
+
}
|
|
613
|
+
const buildLabel = t6;
|
|
614
|
+
let t7;
|
|
615
|
+
if ($[10] !== buildLabel || $[11] !== flattenedNodes) {
|
|
616
|
+
t7 = flattenedNodes.map((flatNode_0) => ({
|
|
617
|
+
label: buildLabel(flatNode_0),
|
|
618
|
+
description: flatNode_0.node.description,
|
|
619
|
+
dimDescription: flatNode_0.node.dimDescription ?? true,
|
|
620
|
+
value: flatNode_0.node.id
|
|
621
|
+
}));
|
|
622
|
+
$[10] = buildLabel;
|
|
623
|
+
$[11] = flattenedNodes;
|
|
624
|
+
$[12] = t7;
|
|
625
|
+
} else {
|
|
626
|
+
t7 = $[12];
|
|
627
|
+
}
|
|
628
|
+
const options = t7;
|
|
629
|
+
let map;
|
|
630
|
+
if ($[13] !== flattenedNodes) {
|
|
631
|
+
map = new Map;
|
|
632
|
+
flattenedNodes.forEach((fn) => map.set(fn.node.id, fn.node));
|
|
633
|
+
$[13] = flattenedNodes;
|
|
634
|
+
$[14] = map;
|
|
635
|
+
} else {
|
|
636
|
+
map = $[14];
|
|
637
|
+
}
|
|
638
|
+
const nodeMap = map;
|
|
639
|
+
let t8;
|
|
640
|
+
if ($[15] !== flattenedNodes) {
|
|
641
|
+
t8 = (nodeId_0) => flattenedNodes.find((fn_0) => fn_0.node.id === nodeId_0);
|
|
642
|
+
$[15] = flattenedNodes;
|
|
643
|
+
$[16] = t8;
|
|
644
|
+
} else {
|
|
645
|
+
t8 = $[16];
|
|
646
|
+
}
|
|
647
|
+
const findFlattenedNode = t8;
|
|
648
|
+
let t9;
|
|
649
|
+
if ($[17] !== findFlattenedNode || $[18] !== onCollapse || $[19] !== onExpand) {
|
|
650
|
+
t9 = (nodeId_1, shouldExpand) => {
|
|
651
|
+
const flatNode_1 = findFlattenedNode(nodeId_1);
|
|
652
|
+
if (!flatNode_1 || !flatNode_1.hasChildren) {
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
if (shouldExpand) {
|
|
656
|
+
if (onExpand) {
|
|
657
|
+
onExpand(nodeId_1);
|
|
658
|
+
} else {
|
|
659
|
+
setInternalExpandedIds((prev) => new Set(prev).add(nodeId_1));
|
|
660
|
+
}
|
|
661
|
+
} else {
|
|
662
|
+
if (onCollapse) {
|
|
663
|
+
onCollapse(nodeId_1);
|
|
664
|
+
} else {
|
|
665
|
+
setInternalExpandedIds((prev_0) => {
|
|
666
|
+
const newSet = new Set(prev_0);
|
|
667
|
+
newSet.delete(nodeId_1);
|
|
668
|
+
return newSet;
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
$[17] = findFlattenedNode;
|
|
674
|
+
$[18] = onCollapse;
|
|
675
|
+
$[19] = onExpand;
|
|
676
|
+
$[20] = t9;
|
|
677
|
+
} else {
|
|
678
|
+
t9 = $[20];
|
|
679
|
+
}
|
|
680
|
+
const toggleExpand = t9;
|
|
681
|
+
let t10;
|
|
682
|
+
if ($[21] !== findFlattenedNode || $[22] !== focusNodeId || $[23] !== isDisabled || $[24] !== nodeMap || $[25] !== onFocus || $[26] !== toggleExpand) {
|
|
683
|
+
t10 = (e) => {
|
|
684
|
+
if (!focusNodeId || isDisabled) {
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
const flatNode_2 = findFlattenedNode(focusNodeId);
|
|
688
|
+
if (!flatNode_2) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
if (e.key === "right" && flatNode_2.hasChildren) {
|
|
692
|
+
e.preventDefault();
|
|
693
|
+
toggleExpand(focusNodeId, true);
|
|
694
|
+
} else {
|
|
695
|
+
if (e.key === "left") {
|
|
696
|
+
if (flatNode_2.hasChildren && flatNode_2.isExpanded) {
|
|
697
|
+
e.preventDefault();
|
|
698
|
+
toggleExpand(focusNodeId, false);
|
|
699
|
+
} else {
|
|
700
|
+
if (flatNode_2.parentId !== undefined) {
|
|
701
|
+
e.preventDefault();
|
|
702
|
+
isProgrammaticFocusRef.current = true;
|
|
703
|
+
toggleExpand(flatNode_2.parentId, false);
|
|
704
|
+
if (onFocus) {
|
|
705
|
+
const parentNode = nodeMap.get(flatNode_2.parentId);
|
|
706
|
+
if (parentNode) {
|
|
707
|
+
onFocus(parentNode);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
$[21] = findFlattenedNode;
|
|
716
|
+
$[22] = focusNodeId;
|
|
717
|
+
$[23] = isDisabled;
|
|
718
|
+
$[24] = nodeMap;
|
|
719
|
+
$[25] = onFocus;
|
|
720
|
+
$[26] = toggleExpand;
|
|
721
|
+
$[27] = t10;
|
|
722
|
+
} else {
|
|
723
|
+
t10 = $[27];
|
|
724
|
+
}
|
|
725
|
+
const handleKeyDown = t10;
|
|
726
|
+
let t11;
|
|
727
|
+
if ($[28] !== nodeMap || $[29] !== onSelect) {
|
|
728
|
+
t11 = (nodeId_2) => {
|
|
729
|
+
const node_1 = nodeMap.get(nodeId_2);
|
|
730
|
+
if (!node_1) {
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
onSelect(node_1);
|
|
734
|
+
};
|
|
735
|
+
$[28] = nodeMap;
|
|
736
|
+
$[29] = onSelect;
|
|
737
|
+
$[30] = t11;
|
|
738
|
+
} else {
|
|
739
|
+
t11 = $[30];
|
|
740
|
+
}
|
|
741
|
+
const handleChange = t11;
|
|
742
|
+
let t12;
|
|
743
|
+
if ($[31] !== nodeMap || $[32] !== onFocus) {
|
|
744
|
+
t12 = (nodeId_3) => {
|
|
745
|
+
if (isProgrammaticFocusRef.current) {
|
|
746
|
+
isProgrammaticFocusRef.current = false;
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
if (lastFocusedIdRef.current === nodeId_3) {
|
|
750
|
+
return;
|
|
751
|
+
}
|
|
752
|
+
lastFocusedIdRef.current = nodeId_3;
|
|
753
|
+
if (onFocus) {
|
|
754
|
+
const node_2 = nodeMap.get(nodeId_3);
|
|
755
|
+
if (node_2) {
|
|
756
|
+
onFocus(node_2);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
$[31] = nodeMap;
|
|
761
|
+
$[32] = onFocus;
|
|
762
|
+
$[33] = t12;
|
|
763
|
+
} else {
|
|
764
|
+
t12 = $[33];
|
|
765
|
+
}
|
|
766
|
+
const handleFocus = t12;
|
|
767
|
+
let t13;
|
|
768
|
+
if ($[34] !== focusNodeId || $[35] !== handleChange || $[36] !== handleFocus || $[37] !== hideIndexes || $[38] !== isDisabled || $[39] !== layout || $[40] !== onCancel || $[41] !== onUpFromFirstItem || $[42] !== options || $[43] !== visibleOptionCount) {
|
|
769
|
+
t13 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Select, {
|
|
770
|
+
options,
|
|
771
|
+
onChange: handleChange,
|
|
772
|
+
onFocus: handleFocus,
|
|
773
|
+
onCancel,
|
|
774
|
+
defaultFocusValue: focusNodeId,
|
|
775
|
+
visibleOptionCount,
|
|
776
|
+
layout,
|
|
777
|
+
isDisabled,
|
|
778
|
+
hideIndexes,
|
|
779
|
+
onUpFromFirstItem
|
|
780
|
+
}, undefined, false, undefined, this);
|
|
781
|
+
$[34] = focusNodeId;
|
|
782
|
+
$[35] = handleChange;
|
|
783
|
+
$[36] = handleFocus;
|
|
784
|
+
$[37] = hideIndexes;
|
|
785
|
+
$[38] = isDisabled;
|
|
786
|
+
$[39] = layout;
|
|
787
|
+
$[40] = onCancel;
|
|
788
|
+
$[41] = onUpFromFirstItem;
|
|
789
|
+
$[42] = options;
|
|
790
|
+
$[43] = visibleOptionCount;
|
|
791
|
+
$[44] = t13;
|
|
792
|
+
} else {
|
|
793
|
+
t13 = $[44];
|
|
794
|
+
}
|
|
795
|
+
let t14;
|
|
796
|
+
if ($[45] !== handleKeyDown || $[46] !== t13) {
|
|
797
|
+
t14 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
798
|
+
tabIndex: 0,
|
|
799
|
+
autoFocus: true,
|
|
800
|
+
onKeyDown: handleKeyDown,
|
|
801
|
+
children: t13
|
|
802
|
+
}, undefined, false, undefined, this);
|
|
803
|
+
$[45] = handleKeyDown;
|
|
804
|
+
$[46] = t13;
|
|
805
|
+
$[47] = t14;
|
|
806
|
+
} else {
|
|
807
|
+
t14 = $[47];
|
|
808
|
+
}
|
|
809
|
+
return t14;
|
|
810
|
+
}
|
|
811
|
+
function _temp2(_depth) {
|
|
812
|
+
return " \u25B8 ";
|
|
813
|
+
}
|
|
814
|
+
function _temp(isExpanded_0) {
|
|
815
|
+
return isExpanded_0 ? "\u25BC " : "\u25B6 ";
|
|
816
|
+
}
|
|
817
|
+
var import_compiler_runtime2, import_react2, jsx_dev_runtime3;
|
|
818
|
+
var init_TreeSelect = __esm(() => {
|
|
819
|
+
init_ink();
|
|
820
|
+
init_select();
|
|
821
|
+
import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
|
|
822
|
+
import_react2 = __toESM(require_react(), 1);
|
|
823
|
+
jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
|
|
824
|
+
});
|
|
825
|
+
|
|
826
|
+
// src/components/LogSelector.tsx
|
|
827
|
+
function normalizeAndTruncateToWidth(text, maxWidth) {
|
|
828
|
+
const normalized = text.replace(/\s+/g, " ").trim();
|
|
829
|
+
return truncateToWidth(normalized, maxWidth);
|
|
830
|
+
}
|
|
831
|
+
function formatSnippet({
|
|
832
|
+
before,
|
|
833
|
+
match,
|
|
834
|
+
after
|
|
835
|
+
}, highlightColor) {
|
|
836
|
+
return source_default.dim(before) + highlightColor(match) + source_default.dim(after);
|
|
837
|
+
}
|
|
838
|
+
function extractSnippet(text, query, contextChars) {
|
|
839
|
+
const matchIndex = text.toLowerCase().indexOf(query.toLowerCase());
|
|
840
|
+
if (matchIndex === -1)
|
|
841
|
+
return null;
|
|
842
|
+
const matchEnd = matchIndex + query.length;
|
|
843
|
+
const snippetStart = Math.max(0, matchIndex - contextChars);
|
|
844
|
+
const snippetEnd = Math.min(text.length, matchEnd + contextChars);
|
|
845
|
+
const beforeRaw = text.slice(snippetStart, matchIndex);
|
|
846
|
+
const matchText = text.slice(matchIndex, matchEnd);
|
|
847
|
+
const afterRaw = text.slice(matchEnd, snippetEnd);
|
|
848
|
+
return {
|
|
849
|
+
before: (snippetStart > 0 ? "\u2026" : "") + beforeRaw.replace(/\s+/g, " ").trimStart(),
|
|
850
|
+
match: matchText.trim(),
|
|
851
|
+
after: afterRaw.replace(/\s+/g, " ").trimEnd() + (snippetEnd < text.length ? "\u2026" : "")
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
function buildLogLabel(log, maxLabelWidth, options) {
|
|
855
|
+
const {
|
|
856
|
+
isGroupHeader = false,
|
|
857
|
+
isChild = false,
|
|
858
|
+
forkCount = 0
|
|
859
|
+
} = options || {};
|
|
860
|
+
const prefixWidth = isGroupHeader && forkCount > 0 ? PARENT_PREFIX_WIDTH : isChild ? CHILD_PREFIX_WIDTH : 0;
|
|
861
|
+
const sessionCountSuffix = isGroupHeader && forkCount > 0 ? ` (+${forkCount} other ${forkCount === 1 ? "session" : "sessions"})` : "";
|
|
862
|
+
const sidechainSuffix = log.isSidechain ? " (sidechain)" : "";
|
|
863
|
+
const maxSummaryWidth = maxLabelWidth - prefixWidth - sidechainSuffix.length - sessionCountSuffix.length;
|
|
864
|
+
const truncatedSummary = normalizeAndTruncateToWidth(getLogDisplayTitle(log), maxSummaryWidth);
|
|
865
|
+
return `${truncatedSummary}${sidechainSuffix}${sessionCountSuffix}`;
|
|
866
|
+
}
|
|
867
|
+
function buildLogMetadata(log, options) {
|
|
868
|
+
const {
|
|
869
|
+
isChild = false,
|
|
870
|
+
showProjectPath = false
|
|
871
|
+
} = options || {};
|
|
872
|
+
const childPadding = isChild ? " " : "";
|
|
873
|
+
const baseMetadata = formatLogMetadata(log);
|
|
874
|
+
const projectSuffix = showProjectPath && log.projectPath ? ` \xB7 ${log.projectPath}` : "";
|
|
875
|
+
return childPadding + baseMetadata + projectSuffix;
|
|
876
|
+
}
|
|
877
|
+
function LogSelector(t0) {
|
|
878
|
+
const $ = import_compiler_runtime3.c(247);
|
|
879
|
+
const {
|
|
880
|
+
logs,
|
|
881
|
+
maxHeight: t1,
|
|
882
|
+
forceWidth,
|
|
883
|
+
onCancel,
|
|
884
|
+
onSelect,
|
|
885
|
+
onLogsChanged,
|
|
886
|
+
onLoadMore,
|
|
887
|
+
initialSearchQuery,
|
|
888
|
+
showAllProjects: t2,
|
|
889
|
+
onToggleAllProjects,
|
|
890
|
+
onAgenticSearch
|
|
891
|
+
} = t0;
|
|
892
|
+
const maxHeight = t1 === undefined ? Infinity : t1;
|
|
893
|
+
const showAllProjects = t2 === undefined ? false : t2;
|
|
894
|
+
const terminalSize = useTerminalSize();
|
|
895
|
+
const columns = forceWidth === undefined ? terminalSize.columns : forceWidth;
|
|
896
|
+
const exitState = useExitOnCtrlCDWithKeybindings(onCancel);
|
|
897
|
+
const isTerminalFocused = useTerminalFocus();
|
|
898
|
+
let t3;
|
|
899
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
900
|
+
t3 = isCustomTitleEnabled();
|
|
901
|
+
$[0] = t3;
|
|
902
|
+
} else {
|
|
903
|
+
t3 = $[0];
|
|
904
|
+
}
|
|
905
|
+
const isResumeWithRenameEnabled = t3;
|
|
906
|
+
const isDeepSearchEnabled = false;
|
|
907
|
+
const [themeName] = useTheme();
|
|
908
|
+
let t4;
|
|
909
|
+
if ($[1] !== themeName) {
|
|
910
|
+
t4 = getTheme(themeName);
|
|
911
|
+
$[1] = themeName;
|
|
912
|
+
$[2] = t4;
|
|
913
|
+
} else {
|
|
914
|
+
t4 = $[2];
|
|
915
|
+
}
|
|
916
|
+
const theme = t4;
|
|
917
|
+
let t5;
|
|
918
|
+
if ($[3] !== theme.warning) {
|
|
919
|
+
t5 = (text) => applyColor(text, theme.warning);
|
|
920
|
+
$[3] = theme.warning;
|
|
921
|
+
$[4] = t5;
|
|
922
|
+
} else {
|
|
923
|
+
t5 = $[4];
|
|
924
|
+
}
|
|
925
|
+
const highlightColor = t5;
|
|
926
|
+
const isAgenticSearchEnabled = false;
|
|
927
|
+
const [currentBranch, setCurrentBranch] = import_react3.default.useState(null);
|
|
928
|
+
const [branchFilterEnabled, setBranchFilterEnabled] = import_react3.default.useState(false);
|
|
929
|
+
const [showAllWorktrees, setShowAllWorktrees] = import_react3.default.useState(false);
|
|
930
|
+
const [hasMultipleWorktrees, setHasMultipleWorktrees] = import_react3.default.useState(false);
|
|
931
|
+
let t6;
|
|
932
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
933
|
+
t6 = getOriginalCwd();
|
|
934
|
+
$[5] = t6;
|
|
935
|
+
} else {
|
|
936
|
+
t6 = $[5];
|
|
937
|
+
}
|
|
938
|
+
const currentCwd = t6;
|
|
939
|
+
const [renameValue, setRenameValue] = import_react3.default.useState("");
|
|
940
|
+
const [renameCursorOffset, setRenameCursorOffset] = import_react3.default.useState(0);
|
|
941
|
+
let t7;
|
|
942
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
943
|
+
t7 = new Set;
|
|
944
|
+
$[6] = t7;
|
|
945
|
+
} else {
|
|
946
|
+
t7 = $[6];
|
|
947
|
+
}
|
|
948
|
+
const [expandedGroupSessionIds, setExpandedGroupSessionIds] = import_react3.default.useState(t7);
|
|
949
|
+
const [focusedNode, setFocusedNode] = import_react3.default.useState(null);
|
|
950
|
+
const [focusedIndex, setFocusedIndex] = import_react3.default.useState(1);
|
|
951
|
+
const [viewMode, setViewMode] = import_react3.default.useState("list");
|
|
952
|
+
const [previewLog, setPreviewLog] = import_react3.default.useState(null);
|
|
953
|
+
const prevFocusedIdRef = import_react3.default.useRef(null);
|
|
954
|
+
const [selectedTagIndex, setSelectedTagIndex] = import_react3.default.useState(0);
|
|
955
|
+
let t8;
|
|
956
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
957
|
+
t8 = {
|
|
958
|
+
status: "idle"
|
|
959
|
+
};
|
|
960
|
+
$[7] = t8;
|
|
961
|
+
} else {
|
|
962
|
+
t8 = $[7];
|
|
963
|
+
}
|
|
964
|
+
const [agenticSearchState, setAgenticSearchState] = import_react3.default.useState(t8);
|
|
965
|
+
const [isAgenticSearchOptionFocused, setIsAgenticSearchOptionFocused] = import_react3.default.useState(false);
|
|
966
|
+
const agenticSearchAbortRef = import_react3.default.useRef(null);
|
|
967
|
+
const t9 = viewMode === "search" && agenticSearchState.status !== "searching";
|
|
968
|
+
let t10;
|
|
969
|
+
let t11;
|
|
970
|
+
let t12;
|
|
971
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
972
|
+
t10 = () => {
|
|
973
|
+
setViewMode("list");
|
|
974
|
+
logEvent("tengu_session_search_toggled", {
|
|
975
|
+
enabled: false
|
|
976
|
+
});
|
|
977
|
+
};
|
|
978
|
+
t11 = () => {
|
|
979
|
+
setViewMode("list");
|
|
980
|
+
logEvent("tengu_session_search_toggled", {
|
|
981
|
+
enabled: false
|
|
982
|
+
});
|
|
983
|
+
};
|
|
984
|
+
t12 = ["n"];
|
|
985
|
+
$[8] = t10;
|
|
986
|
+
$[9] = t11;
|
|
987
|
+
$[10] = t12;
|
|
988
|
+
} else {
|
|
989
|
+
t10 = $[8];
|
|
990
|
+
t11 = $[9];
|
|
991
|
+
t12 = $[10];
|
|
992
|
+
}
|
|
993
|
+
const t13 = initialSearchQuery || "";
|
|
994
|
+
let t14;
|
|
995
|
+
if ($[11] !== t13 || $[12] !== t9) {
|
|
996
|
+
t14 = {
|
|
997
|
+
isActive: t9,
|
|
998
|
+
onExit: t10,
|
|
999
|
+
onExitUp: t11,
|
|
1000
|
+
passthroughCtrlKeys: t12,
|
|
1001
|
+
initialQuery: t13
|
|
1002
|
+
};
|
|
1003
|
+
$[11] = t13;
|
|
1004
|
+
$[12] = t9;
|
|
1005
|
+
$[13] = t14;
|
|
1006
|
+
} else {
|
|
1007
|
+
t14 = $[13];
|
|
1008
|
+
}
|
|
1009
|
+
const {
|
|
1010
|
+
query: searchQuery,
|
|
1011
|
+
setQuery: setSearchQuery,
|
|
1012
|
+
cursorOffset: searchCursorOffset
|
|
1013
|
+
} = useSearchInput(t14);
|
|
1014
|
+
const deferredSearchQuery = import_react3.default.useDeferredValue(searchQuery);
|
|
1015
|
+
const [debouncedDeepSearchQuery, setDebouncedDeepSearchQuery] = import_react3.default.useState("");
|
|
1016
|
+
let t15;
|
|
1017
|
+
let t16;
|
|
1018
|
+
if ($[14] !== deferredSearchQuery) {
|
|
1019
|
+
t15 = () => {
|
|
1020
|
+
if (!deferredSearchQuery) {
|
|
1021
|
+
setDebouncedDeepSearchQuery("");
|
|
1022
|
+
return;
|
|
1023
|
+
}
|
|
1024
|
+
const timeoutId = setTimeout(setDebouncedDeepSearchQuery, 300, deferredSearchQuery);
|
|
1025
|
+
return () => clearTimeout(timeoutId);
|
|
1026
|
+
};
|
|
1027
|
+
t16 = [deferredSearchQuery];
|
|
1028
|
+
$[14] = deferredSearchQuery;
|
|
1029
|
+
$[15] = t15;
|
|
1030
|
+
$[16] = t16;
|
|
1031
|
+
} else {
|
|
1032
|
+
t15 = $[15];
|
|
1033
|
+
t16 = $[16];
|
|
1034
|
+
}
|
|
1035
|
+
import_react3.default.useEffect(t15, t16);
|
|
1036
|
+
const [deepSearchResults, setDeepSearchResults] = import_react3.default.useState(null);
|
|
1037
|
+
const [isSearching, setIsSearching] = import_react3.default.useState(false);
|
|
1038
|
+
let t17;
|
|
1039
|
+
let t18;
|
|
1040
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1041
|
+
t17 = () => {
|
|
1042
|
+
getBranch().then((branch) => setCurrentBranch(branch));
|
|
1043
|
+
getWorktreePaths(currentCwd).then((paths) => {
|
|
1044
|
+
setHasMultipleWorktrees(paths.length > 1);
|
|
1045
|
+
});
|
|
1046
|
+
};
|
|
1047
|
+
t18 = [currentCwd];
|
|
1048
|
+
$[17] = t17;
|
|
1049
|
+
$[18] = t18;
|
|
1050
|
+
} else {
|
|
1051
|
+
t17 = $[17];
|
|
1052
|
+
t18 = $[18];
|
|
1053
|
+
}
|
|
1054
|
+
import_react3.default.useEffect(t17, t18);
|
|
1055
|
+
const searchableTextByLog = new Map(logs.map(_temp8));
|
|
1056
|
+
let t19;
|
|
1057
|
+
t19 = null;
|
|
1058
|
+
let t20;
|
|
1059
|
+
if ($[19] !== logs) {
|
|
1060
|
+
t20 = getUniqueTags(logs);
|
|
1061
|
+
$[19] = logs;
|
|
1062
|
+
$[20] = t20;
|
|
1063
|
+
} else {
|
|
1064
|
+
t20 = $[20];
|
|
1065
|
+
}
|
|
1066
|
+
const uniqueTags = t20;
|
|
1067
|
+
const hasTags = uniqueTags.length > 0;
|
|
1068
|
+
let t21;
|
|
1069
|
+
if ($[21] !== hasTags || $[22] !== uniqueTags) {
|
|
1070
|
+
t21 = hasTags ? ["All", ...uniqueTags] : [];
|
|
1071
|
+
$[21] = hasTags;
|
|
1072
|
+
$[22] = uniqueTags;
|
|
1073
|
+
$[23] = t21;
|
|
1074
|
+
} else {
|
|
1075
|
+
t21 = $[23];
|
|
1076
|
+
}
|
|
1077
|
+
const tagTabs = t21;
|
|
1078
|
+
const effectiveTagIndex = tagTabs.length > 0 && selectedTagIndex < tagTabs.length ? selectedTagIndex : 0;
|
|
1079
|
+
const selectedTab = tagTabs[effectiveTagIndex];
|
|
1080
|
+
const tagFilter = selectedTab === "All" ? undefined : selectedTab;
|
|
1081
|
+
const tagTabsLines = hasTags ? 1 : 0;
|
|
1082
|
+
let filtered = logs;
|
|
1083
|
+
if (isResumeWithRenameEnabled) {
|
|
1084
|
+
let t222;
|
|
1085
|
+
if ($[24] !== logs) {
|
|
1086
|
+
t222 = logs.filter(_temp22);
|
|
1087
|
+
$[24] = logs;
|
|
1088
|
+
$[25] = t222;
|
|
1089
|
+
} else {
|
|
1090
|
+
t222 = $[25];
|
|
1091
|
+
}
|
|
1092
|
+
filtered = t222;
|
|
1093
|
+
}
|
|
1094
|
+
if (tagFilter !== undefined) {
|
|
1095
|
+
let t222;
|
|
1096
|
+
if ($[26] !== filtered || $[27] !== tagFilter) {
|
|
1097
|
+
let t232;
|
|
1098
|
+
if ($[29] !== tagFilter) {
|
|
1099
|
+
t232 = (log_2) => log_2.tag === tagFilter;
|
|
1100
|
+
$[29] = tagFilter;
|
|
1101
|
+
$[30] = t232;
|
|
1102
|
+
} else {
|
|
1103
|
+
t232 = $[30];
|
|
1104
|
+
}
|
|
1105
|
+
t222 = filtered.filter(t232);
|
|
1106
|
+
$[26] = filtered;
|
|
1107
|
+
$[27] = tagFilter;
|
|
1108
|
+
$[28] = t222;
|
|
1109
|
+
} else {
|
|
1110
|
+
t222 = $[28];
|
|
1111
|
+
}
|
|
1112
|
+
filtered = t222;
|
|
1113
|
+
}
|
|
1114
|
+
if (branchFilterEnabled && currentBranch) {
|
|
1115
|
+
let t222;
|
|
1116
|
+
if ($[31] !== currentBranch || $[32] !== filtered) {
|
|
1117
|
+
let t232;
|
|
1118
|
+
if ($[34] !== currentBranch) {
|
|
1119
|
+
t232 = (log_3) => log_3.gitBranch === currentBranch;
|
|
1120
|
+
$[34] = currentBranch;
|
|
1121
|
+
$[35] = t232;
|
|
1122
|
+
} else {
|
|
1123
|
+
t232 = $[35];
|
|
1124
|
+
}
|
|
1125
|
+
t222 = filtered.filter(t232);
|
|
1126
|
+
$[31] = currentBranch;
|
|
1127
|
+
$[32] = filtered;
|
|
1128
|
+
$[33] = t222;
|
|
1129
|
+
} else {
|
|
1130
|
+
t222 = $[33];
|
|
1131
|
+
}
|
|
1132
|
+
filtered = t222;
|
|
1133
|
+
}
|
|
1134
|
+
if (hasMultipleWorktrees && !showAllWorktrees) {
|
|
1135
|
+
let t222;
|
|
1136
|
+
if ($[36] !== filtered) {
|
|
1137
|
+
let t232;
|
|
1138
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1139
|
+
t232 = (log_4) => log_4.projectPath === currentCwd;
|
|
1140
|
+
$[38] = t232;
|
|
1141
|
+
} else {
|
|
1142
|
+
t232 = $[38];
|
|
1143
|
+
}
|
|
1144
|
+
t222 = filtered.filter(t232);
|
|
1145
|
+
$[36] = filtered;
|
|
1146
|
+
$[37] = t222;
|
|
1147
|
+
} else {
|
|
1148
|
+
t222 = $[37];
|
|
1149
|
+
}
|
|
1150
|
+
filtered = t222;
|
|
1151
|
+
}
|
|
1152
|
+
const baseFilteredLogs = filtered;
|
|
1153
|
+
let t22;
|
|
1154
|
+
bb0: {
|
|
1155
|
+
if (!searchQuery) {
|
|
1156
|
+
t22 = baseFilteredLogs;
|
|
1157
|
+
break bb0;
|
|
1158
|
+
}
|
|
1159
|
+
let t232;
|
|
1160
|
+
if ($[39] !== baseFilteredLogs || $[40] !== searchQuery) {
|
|
1161
|
+
const query = searchQuery.toLowerCase();
|
|
1162
|
+
t232 = baseFilteredLogs.filter((log_5) => {
|
|
1163
|
+
const displayedTitle = getLogDisplayTitle(log_5).toLowerCase();
|
|
1164
|
+
const branch_0 = (log_5.gitBranch || "").toLowerCase();
|
|
1165
|
+
const tag = (log_5.tag || "").toLowerCase();
|
|
1166
|
+
const prInfo = log_5.prNumber ? `pr #${log_5.prNumber} ${log_5.prRepository || ""}`.toLowerCase() : "";
|
|
1167
|
+
return displayedTitle.includes(query) || branch_0.includes(query) || tag.includes(query) || prInfo.includes(query);
|
|
1168
|
+
});
|
|
1169
|
+
$[39] = baseFilteredLogs;
|
|
1170
|
+
$[40] = searchQuery;
|
|
1171
|
+
$[41] = t232;
|
|
1172
|
+
} else {
|
|
1173
|
+
t232 = $[41];
|
|
1174
|
+
}
|
|
1175
|
+
t22 = t232;
|
|
1176
|
+
}
|
|
1177
|
+
const titleFilteredLogs = t22;
|
|
1178
|
+
let t23;
|
|
1179
|
+
let t24;
|
|
1180
|
+
if ($[42] !== debouncedDeepSearchQuery || $[43] !== deferredSearchQuery) {
|
|
1181
|
+
t23 = () => {
|
|
1182
|
+
if (false) {}
|
|
1183
|
+
};
|
|
1184
|
+
t24 = [deferredSearchQuery, debouncedDeepSearchQuery, false];
|
|
1185
|
+
$[42] = debouncedDeepSearchQuery;
|
|
1186
|
+
$[43] = deferredSearchQuery;
|
|
1187
|
+
$[44] = t23;
|
|
1188
|
+
$[45] = t24;
|
|
1189
|
+
} else {
|
|
1190
|
+
t23 = $[44];
|
|
1191
|
+
t24 = $[45];
|
|
1192
|
+
}
|
|
1193
|
+
import_react3.default.useEffect(t23, t24);
|
|
1194
|
+
let t25;
|
|
1195
|
+
let t26;
|
|
1196
|
+
if ($[46] !== debouncedDeepSearchQuery) {
|
|
1197
|
+
t25 = () => {
|
|
1198
|
+
if (true) {
|
|
1199
|
+
setDeepSearchResults(null);
|
|
1200
|
+
setIsSearching(false);
|
|
1201
|
+
return;
|
|
1202
|
+
}
|
|
1203
|
+
const timeoutId_0 = setTimeout(_temp5, 0, null, debouncedDeepSearchQuery, setDeepSearchResults, setIsSearching);
|
|
1204
|
+
return () => {
|
|
1205
|
+
clearTimeout(timeoutId_0);
|
|
1206
|
+
};
|
|
1207
|
+
};
|
|
1208
|
+
t26 = [debouncedDeepSearchQuery, null, false];
|
|
1209
|
+
$[46] = debouncedDeepSearchQuery;
|
|
1210
|
+
$[47] = t25;
|
|
1211
|
+
$[48] = t26;
|
|
1212
|
+
} else {
|
|
1213
|
+
t25 = $[47];
|
|
1214
|
+
t26 = $[48];
|
|
1215
|
+
}
|
|
1216
|
+
import_react3.default.useEffect(t25, t26);
|
|
1217
|
+
let filtered_0;
|
|
1218
|
+
let snippetMap;
|
|
1219
|
+
if ($[49] !== debouncedDeepSearchQuery || $[50] !== deepSearchResults || $[51] !== titleFilteredLogs) {
|
|
1220
|
+
snippetMap = new Map;
|
|
1221
|
+
filtered_0 = titleFilteredLogs;
|
|
1222
|
+
if (deepSearchResults && debouncedDeepSearchQuery && deepSearchResults.query === debouncedDeepSearchQuery) {
|
|
1223
|
+
for (const result of deepSearchResults.results) {
|
|
1224
|
+
if (result.searchableText) {
|
|
1225
|
+
const snippet = extractSnippet(result.searchableText, debouncedDeepSearchQuery, SNIPPET_CONTEXT_CHARS);
|
|
1226
|
+
if (snippet) {
|
|
1227
|
+
snippetMap.set(result.log, snippet);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
let t272;
|
|
1232
|
+
if ($[54] !== filtered_0) {
|
|
1233
|
+
t272 = new Set(filtered_0.map(_temp6));
|
|
1234
|
+
$[54] = filtered_0;
|
|
1235
|
+
$[55] = t272;
|
|
1236
|
+
} else {
|
|
1237
|
+
t272 = $[55];
|
|
1238
|
+
}
|
|
1239
|
+
const titleMatchIds = t272;
|
|
1240
|
+
let t282;
|
|
1241
|
+
if ($[56] !== deepSearchResults.results || $[57] !== filtered_0 || $[58] !== titleMatchIds) {
|
|
1242
|
+
let t292;
|
|
1243
|
+
if ($[60] !== titleMatchIds) {
|
|
1244
|
+
t292 = (log_7) => !titleMatchIds.has(log_7.messages[0]?.uuid);
|
|
1245
|
+
$[60] = titleMatchIds;
|
|
1246
|
+
$[61] = t292;
|
|
1247
|
+
} else {
|
|
1248
|
+
t292 = $[61];
|
|
1249
|
+
}
|
|
1250
|
+
const transcriptOnlyMatches = deepSearchResults.results.map(_temp7).filter(t292);
|
|
1251
|
+
t282 = [...filtered_0, ...transcriptOnlyMatches];
|
|
1252
|
+
$[56] = deepSearchResults.results;
|
|
1253
|
+
$[57] = filtered_0;
|
|
1254
|
+
$[58] = titleMatchIds;
|
|
1255
|
+
$[59] = t282;
|
|
1256
|
+
} else {
|
|
1257
|
+
t282 = $[59];
|
|
1258
|
+
}
|
|
1259
|
+
filtered_0 = t282;
|
|
1260
|
+
}
|
|
1261
|
+
$[49] = debouncedDeepSearchQuery;
|
|
1262
|
+
$[50] = deepSearchResults;
|
|
1263
|
+
$[51] = titleFilteredLogs;
|
|
1264
|
+
$[52] = filtered_0;
|
|
1265
|
+
$[53] = snippetMap;
|
|
1266
|
+
} else {
|
|
1267
|
+
filtered_0 = $[52];
|
|
1268
|
+
snippetMap = $[53];
|
|
1269
|
+
}
|
|
1270
|
+
let t27;
|
|
1271
|
+
if ($[62] !== filtered_0 || $[63] !== snippetMap) {
|
|
1272
|
+
t27 = {
|
|
1273
|
+
filteredLogs: filtered_0,
|
|
1274
|
+
snippets: snippetMap
|
|
1275
|
+
};
|
|
1276
|
+
$[62] = filtered_0;
|
|
1277
|
+
$[63] = snippetMap;
|
|
1278
|
+
$[64] = t27;
|
|
1279
|
+
} else {
|
|
1280
|
+
t27 = $[64];
|
|
1281
|
+
}
|
|
1282
|
+
const {
|
|
1283
|
+
filteredLogs,
|
|
1284
|
+
snippets
|
|
1285
|
+
} = t27;
|
|
1286
|
+
let t28;
|
|
1287
|
+
bb1: {
|
|
1288
|
+
if (agenticSearchState.status === "results" && agenticSearchState.results.length > 0) {
|
|
1289
|
+
t28 = agenticSearchState.results;
|
|
1290
|
+
break bb1;
|
|
1291
|
+
}
|
|
1292
|
+
t28 = filteredLogs;
|
|
1293
|
+
}
|
|
1294
|
+
const displayedLogs = t28;
|
|
1295
|
+
const maxLabelWidth = Math.max(30, columns - 4);
|
|
1296
|
+
let t29;
|
|
1297
|
+
bb2: {
|
|
1298
|
+
if (!isResumeWithRenameEnabled) {
|
|
1299
|
+
let t303;
|
|
1300
|
+
if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1301
|
+
t303 = [];
|
|
1302
|
+
$[65] = t303;
|
|
1303
|
+
} else {
|
|
1304
|
+
t303 = $[65];
|
|
1305
|
+
}
|
|
1306
|
+
t29 = t303;
|
|
1307
|
+
break bb2;
|
|
1308
|
+
}
|
|
1309
|
+
let t302;
|
|
1310
|
+
if ($[66] !== displayedLogs || $[67] !== highlightColor || $[68] !== maxLabelWidth || $[69] !== showAllProjects || $[70] !== snippets) {
|
|
1311
|
+
const sessionGroups = groupLogsBySessionId(displayedLogs);
|
|
1312
|
+
t302 = Array.from(sessionGroups.entries()).map((t312) => {
|
|
1313
|
+
const [sessionId, groupLogs] = t312;
|
|
1314
|
+
const latestLog = groupLogs[0];
|
|
1315
|
+
const indexInFiltered = displayedLogs.indexOf(latestLog);
|
|
1316
|
+
const snippet_0 = snippets.get(latestLog);
|
|
1317
|
+
const snippetStr = snippet_0 ? formatSnippet(snippet_0, highlightColor) : null;
|
|
1318
|
+
if (groupLogs.length === 1) {
|
|
1319
|
+
const metadata = buildLogMetadata(latestLog, {
|
|
1320
|
+
showProjectPath: showAllProjects
|
|
1321
|
+
});
|
|
1322
|
+
return {
|
|
1323
|
+
id: `log:${sessionId}:0`,
|
|
1324
|
+
value: {
|
|
1325
|
+
log: latestLog,
|
|
1326
|
+
indexInFiltered
|
|
1327
|
+
},
|
|
1328
|
+
label: buildLogLabel(latestLog, maxLabelWidth),
|
|
1329
|
+
description: snippetStr ? `${metadata}
|
|
1330
|
+
${snippetStr}` : metadata,
|
|
1331
|
+
dimDescription: true
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
const forkCount = groupLogs.length - 1;
|
|
1335
|
+
const children = groupLogs.slice(1).map((log_8, index) => {
|
|
1336
|
+
const childIndexInFiltered = displayedLogs.indexOf(log_8);
|
|
1337
|
+
const childSnippet = snippets.get(log_8);
|
|
1338
|
+
const childSnippetStr = childSnippet ? formatSnippet(childSnippet, highlightColor) : null;
|
|
1339
|
+
const childMetadata = buildLogMetadata(log_8, {
|
|
1340
|
+
isChild: true,
|
|
1341
|
+
showProjectPath: showAllProjects
|
|
1342
|
+
});
|
|
1343
|
+
return {
|
|
1344
|
+
id: `log:${sessionId}:${index + 1}`,
|
|
1345
|
+
value: {
|
|
1346
|
+
log: log_8,
|
|
1347
|
+
indexInFiltered: childIndexInFiltered
|
|
1348
|
+
},
|
|
1349
|
+
label: buildLogLabel(log_8, maxLabelWidth, {
|
|
1350
|
+
isChild: true
|
|
1351
|
+
}),
|
|
1352
|
+
description: childSnippetStr ? `${childMetadata}
|
|
1353
|
+
${childSnippetStr}` : childMetadata,
|
|
1354
|
+
dimDescription: true
|
|
1355
|
+
};
|
|
1356
|
+
});
|
|
1357
|
+
const parentMetadata = buildLogMetadata(latestLog, {
|
|
1358
|
+
showProjectPath: showAllProjects
|
|
1359
|
+
});
|
|
1360
|
+
return {
|
|
1361
|
+
id: `group:${sessionId}`,
|
|
1362
|
+
value: {
|
|
1363
|
+
log: latestLog,
|
|
1364
|
+
indexInFiltered
|
|
1365
|
+
},
|
|
1366
|
+
label: buildLogLabel(latestLog, maxLabelWidth, {
|
|
1367
|
+
isGroupHeader: true,
|
|
1368
|
+
forkCount
|
|
1369
|
+
}),
|
|
1370
|
+
description: snippetStr ? `${parentMetadata}
|
|
1371
|
+
${snippetStr}` : parentMetadata,
|
|
1372
|
+
dimDescription: true,
|
|
1373
|
+
children
|
|
1374
|
+
};
|
|
1375
|
+
});
|
|
1376
|
+
$[66] = displayedLogs;
|
|
1377
|
+
$[67] = highlightColor;
|
|
1378
|
+
$[68] = maxLabelWidth;
|
|
1379
|
+
$[69] = showAllProjects;
|
|
1380
|
+
$[70] = snippets;
|
|
1381
|
+
$[71] = t302;
|
|
1382
|
+
} else {
|
|
1383
|
+
t302 = $[71];
|
|
1384
|
+
}
|
|
1385
|
+
t29 = t302;
|
|
1386
|
+
}
|
|
1387
|
+
const treeNodes = t29;
|
|
1388
|
+
let t30;
|
|
1389
|
+
bb3: {
|
|
1390
|
+
if (isResumeWithRenameEnabled) {
|
|
1391
|
+
let t313;
|
|
1392
|
+
if ($[72] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1393
|
+
t313 = [];
|
|
1394
|
+
$[72] = t313;
|
|
1395
|
+
} else {
|
|
1396
|
+
t313 = $[72];
|
|
1397
|
+
}
|
|
1398
|
+
t30 = t313;
|
|
1399
|
+
break bb3;
|
|
1400
|
+
}
|
|
1401
|
+
let t312;
|
|
1402
|
+
if ($[73] !== displayedLogs || $[74] !== highlightColor || $[75] !== maxLabelWidth || $[76] !== showAllProjects || $[77] !== snippets) {
|
|
1403
|
+
let t322;
|
|
1404
|
+
if ($[79] !== highlightColor || $[80] !== maxLabelWidth || $[81] !== showAllProjects || $[82] !== snippets) {
|
|
1405
|
+
t322 = (log_9, index_0) => {
|
|
1406
|
+
const rawSummary = getLogDisplayTitle(log_9);
|
|
1407
|
+
const summaryWithSidechain = rawSummary + (log_9.isSidechain ? " (sidechain)" : "");
|
|
1408
|
+
const summary = normalizeAndTruncateToWidth(summaryWithSidechain, maxLabelWidth);
|
|
1409
|
+
const baseDescription = formatLogMetadata(log_9);
|
|
1410
|
+
const projectSuffix = showAllProjects && log_9.projectPath ? ` \xB7 ${log_9.projectPath}` : "";
|
|
1411
|
+
const snippet_1 = snippets.get(log_9);
|
|
1412
|
+
const snippetStr_0 = snippet_1 ? formatSnippet(snippet_1, highlightColor) : null;
|
|
1413
|
+
return {
|
|
1414
|
+
label: summary,
|
|
1415
|
+
description: snippetStr_0 ? `${baseDescription}${projectSuffix}
|
|
1416
|
+
${snippetStr_0}` : baseDescription + projectSuffix,
|
|
1417
|
+
dimDescription: true,
|
|
1418
|
+
value: index_0.toString()
|
|
1419
|
+
};
|
|
1420
|
+
};
|
|
1421
|
+
$[79] = highlightColor;
|
|
1422
|
+
$[80] = maxLabelWidth;
|
|
1423
|
+
$[81] = showAllProjects;
|
|
1424
|
+
$[82] = snippets;
|
|
1425
|
+
$[83] = t322;
|
|
1426
|
+
} else {
|
|
1427
|
+
t322 = $[83];
|
|
1428
|
+
}
|
|
1429
|
+
t312 = displayedLogs.map(t322);
|
|
1430
|
+
$[73] = displayedLogs;
|
|
1431
|
+
$[74] = highlightColor;
|
|
1432
|
+
$[75] = maxLabelWidth;
|
|
1433
|
+
$[76] = showAllProjects;
|
|
1434
|
+
$[77] = snippets;
|
|
1435
|
+
$[78] = t312;
|
|
1436
|
+
} else {
|
|
1437
|
+
t312 = $[78];
|
|
1438
|
+
}
|
|
1439
|
+
t30 = t312;
|
|
1440
|
+
}
|
|
1441
|
+
const flatOptions = t30;
|
|
1442
|
+
const focusedLog = focusedNode?.value.log ?? null;
|
|
1443
|
+
let t31;
|
|
1444
|
+
if ($[84] !== displayedLogs || $[85] !== expandedGroupSessionIds || $[86] !== focusedLog) {
|
|
1445
|
+
t31 = () => {
|
|
1446
|
+
if (!isResumeWithRenameEnabled || !focusedLog) {
|
|
1447
|
+
return "";
|
|
1448
|
+
}
|
|
1449
|
+
const sessionId_0 = getSessionIdFromLog(focusedLog);
|
|
1450
|
+
if (!sessionId_0) {
|
|
1451
|
+
return "";
|
|
1452
|
+
}
|
|
1453
|
+
const sessionLogs = displayedLogs.filter((log_10) => getSessionIdFromLog(log_10) === sessionId_0);
|
|
1454
|
+
const hasMultipleLogs = sessionLogs.length > 1;
|
|
1455
|
+
if (!hasMultipleLogs) {
|
|
1456
|
+
return "";
|
|
1457
|
+
}
|
|
1458
|
+
const isExpanded = expandedGroupSessionIds.has(sessionId_0);
|
|
1459
|
+
const isChildNode = sessionLogs.indexOf(focusedLog) > 0;
|
|
1460
|
+
if (isChildNode) {
|
|
1461
|
+
return "\u2190 to collapse";
|
|
1462
|
+
}
|
|
1463
|
+
return isExpanded ? "\u2190 to collapse" : "\u2192 to expand";
|
|
1464
|
+
};
|
|
1465
|
+
$[84] = displayedLogs;
|
|
1466
|
+
$[85] = expandedGroupSessionIds;
|
|
1467
|
+
$[86] = focusedLog;
|
|
1468
|
+
$[87] = t31;
|
|
1469
|
+
} else {
|
|
1470
|
+
t31 = $[87];
|
|
1471
|
+
}
|
|
1472
|
+
const getExpandCollapseHint = t31;
|
|
1473
|
+
let t32;
|
|
1474
|
+
if ($[88] !== focusedLog || $[89] !== onLogsChanged || $[90] !== renameValue) {
|
|
1475
|
+
t32 = async () => {
|
|
1476
|
+
const sessionId_1 = focusedLog ? getSessionIdFromLog(focusedLog) : undefined;
|
|
1477
|
+
if (!focusedLog || !sessionId_1) {
|
|
1478
|
+
setViewMode("list");
|
|
1479
|
+
setRenameValue("");
|
|
1480
|
+
return;
|
|
1481
|
+
}
|
|
1482
|
+
if (renameValue.trim()) {
|
|
1483
|
+
await saveCustomTitle(sessionId_1, renameValue.trim(), focusedLog.fullPath);
|
|
1484
|
+
if (isResumeWithRenameEnabled && onLogsChanged) {
|
|
1485
|
+
onLogsChanged();
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
setViewMode("list");
|
|
1489
|
+
setRenameValue("");
|
|
1490
|
+
};
|
|
1491
|
+
$[88] = focusedLog;
|
|
1492
|
+
$[89] = onLogsChanged;
|
|
1493
|
+
$[90] = renameValue;
|
|
1494
|
+
$[91] = t32;
|
|
1495
|
+
} else {
|
|
1496
|
+
t32 = $[91];
|
|
1497
|
+
}
|
|
1498
|
+
const handleRenameSubmit = t32;
|
|
1499
|
+
let t33;
|
|
1500
|
+
if ($[92] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1501
|
+
t33 = () => {
|
|
1502
|
+
setViewMode("list");
|
|
1503
|
+
logEvent("tengu_session_search_toggled", {
|
|
1504
|
+
enabled: false
|
|
1505
|
+
});
|
|
1506
|
+
};
|
|
1507
|
+
$[92] = t33;
|
|
1508
|
+
} else {
|
|
1509
|
+
t33 = $[92];
|
|
1510
|
+
}
|
|
1511
|
+
const exitSearchMode = t33;
|
|
1512
|
+
let t34;
|
|
1513
|
+
if ($[93] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1514
|
+
t34 = () => {
|
|
1515
|
+
setViewMode("search");
|
|
1516
|
+
logEvent("tengu_session_search_toggled", {
|
|
1517
|
+
enabled: true
|
|
1518
|
+
});
|
|
1519
|
+
};
|
|
1520
|
+
$[93] = t34;
|
|
1521
|
+
} else {
|
|
1522
|
+
t34 = $[93];
|
|
1523
|
+
}
|
|
1524
|
+
const enterSearchMode = t34;
|
|
1525
|
+
let t35;
|
|
1526
|
+
if ($[94] !== logs || $[95] !== onAgenticSearch || $[96] !== searchQuery) {
|
|
1527
|
+
t35 = async () => {
|
|
1528
|
+
if (!searchQuery.trim() || !onAgenticSearch || true) {
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
agenticSearchAbortRef.current?.abort();
|
|
1532
|
+
const abortController = new AbortController;
|
|
1533
|
+
agenticSearchAbortRef.current = abortController;
|
|
1534
|
+
setAgenticSearchState({
|
|
1535
|
+
status: "searching"
|
|
1536
|
+
});
|
|
1537
|
+
logEvent("tengu_agentic_search_started", {
|
|
1538
|
+
query_length: searchQuery.length
|
|
1539
|
+
});
|
|
1540
|
+
try {
|
|
1541
|
+
const results_0 = await onAgenticSearch(searchQuery, logs, abortController.signal);
|
|
1542
|
+
if (abortController.signal.aborted) {
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
setAgenticSearchState({
|
|
1546
|
+
status: "results",
|
|
1547
|
+
results: results_0,
|
|
1548
|
+
query: searchQuery
|
|
1549
|
+
});
|
|
1550
|
+
logEvent("tengu_agentic_search_completed", {
|
|
1551
|
+
query_length: searchQuery.length,
|
|
1552
|
+
results_count: results_0.length
|
|
1553
|
+
});
|
|
1554
|
+
} catch (t362) {
|
|
1555
|
+
const error = t362;
|
|
1556
|
+
if (abortController.signal.aborted) {
|
|
1557
|
+
return;
|
|
1558
|
+
}
|
|
1559
|
+
setAgenticSearchState({
|
|
1560
|
+
status: "error",
|
|
1561
|
+
message: error instanceof Error ? error.message : "Search failed"
|
|
1562
|
+
});
|
|
1563
|
+
logEvent("tengu_agentic_search_error", {
|
|
1564
|
+
query_length: searchQuery.length
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
$[94] = logs;
|
|
1569
|
+
$[95] = onAgenticSearch;
|
|
1570
|
+
$[96] = searchQuery;
|
|
1571
|
+
$[97] = t35;
|
|
1572
|
+
} else {
|
|
1573
|
+
t35 = $[97];
|
|
1574
|
+
}
|
|
1575
|
+
const handleAgenticSearch = t35;
|
|
1576
|
+
let t36;
|
|
1577
|
+
if ($[98] !== agenticSearchState.query || $[99] !== agenticSearchState.status || $[100] !== searchQuery) {
|
|
1578
|
+
t36 = () => {
|
|
1579
|
+
if (agenticSearchState.status !== "idle" && agenticSearchState.status !== "searching") {
|
|
1580
|
+
if (agenticSearchState.status === "results" && agenticSearchState.query !== searchQuery || agenticSearchState.status === "error") {
|
|
1581
|
+
setAgenticSearchState({
|
|
1582
|
+
status: "idle"
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
};
|
|
1587
|
+
$[98] = agenticSearchState.query;
|
|
1588
|
+
$[99] = agenticSearchState.status;
|
|
1589
|
+
$[100] = searchQuery;
|
|
1590
|
+
$[101] = t36;
|
|
1591
|
+
} else {
|
|
1592
|
+
t36 = $[101];
|
|
1593
|
+
}
|
|
1594
|
+
let t37;
|
|
1595
|
+
if ($[102] !== agenticSearchState || $[103] !== searchQuery) {
|
|
1596
|
+
t37 = [searchQuery, agenticSearchState];
|
|
1597
|
+
$[102] = agenticSearchState;
|
|
1598
|
+
$[103] = searchQuery;
|
|
1599
|
+
$[104] = t37;
|
|
1600
|
+
} else {
|
|
1601
|
+
t37 = $[104];
|
|
1602
|
+
}
|
|
1603
|
+
import_react3.default.useEffect(t36, t37);
|
|
1604
|
+
let t38;
|
|
1605
|
+
let t39;
|
|
1606
|
+
if ($[105] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1607
|
+
t38 = () => () => {
|
|
1608
|
+
agenticSearchAbortRef.current?.abort();
|
|
1609
|
+
};
|
|
1610
|
+
t39 = [];
|
|
1611
|
+
$[105] = t38;
|
|
1612
|
+
$[106] = t39;
|
|
1613
|
+
} else {
|
|
1614
|
+
t38 = $[105];
|
|
1615
|
+
t39 = $[106];
|
|
1616
|
+
}
|
|
1617
|
+
import_react3.default.useEffect(t38, t39);
|
|
1618
|
+
const prevAgenticStatusRef = import_react3.default.useRef(agenticSearchState.status);
|
|
1619
|
+
let t40;
|
|
1620
|
+
if ($[107] !== agenticSearchState.status || $[108] !== displayedLogs[0] || $[109] !== displayedLogs.length || $[110] !== treeNodes) {
|
|
1621
|
+
t40 = () => {
|
|
1622
|
+
const prevStatus = prevAgenticStatusRef.current;
|
|
1623
|
+
prevAgenticStatusRef.current = agenticSearchState.status;
|
|
1624
|
+
if (prevStatus === "searching" && agenticSearchState.status === "results") {
|
|
1625
|
+
if (isResumeWithRenameEnabled && treeNodes.length > 0) {
|
|
1626
|
+
setFocusedNode(treeNodes[0]);
|
|
1627
|
+
} else {
|
|
1628
|
+
if (!isResumeWithRenameEnabled && displayedLogs.length > 0) {
|
|
1629
|
+
const firstLog = displayedLogs[0];
|
|
1630
|
+
setFocusedNode({
|
|
1631
|
+
id: "0",
|
|
1632
|
+
value: {
|
|
1633
|
+
log: firstLog,
|
|
1634
|
+
indexInFiltered: 0
|
|
1635
|
+
},
|
|
1636
|
+
label: ""
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
};
|
|
1642
|
+
$[107] = agenticSearchState.status;
|
|
1643
|
+
$[108] = displayedLogs[0];
|
|
1644
|
+
$[109] = displayedLogs.length;
|
|
1645
|
+
$[110] = treeNodes;
|
|
1646
|
+
$[111] = t40;
|
|
1647
|
+
} else {
|
|
1648
|
+
t40 = $[111];
|
|
1649
|
+
}
|
|
1650
|
+
let t41;
|
|
1651
|
+
if ($[112] !== agenticSearchState.status || $[113] !== displayedLogs || $[114] !== treeNodes) {
|
|
1652
|
+
t41 = [agenticSearchState.status, isResumeWithRenameEnabled, treeNodes, displayedLogs];
|
|
1653
|
+
$[112] = agenticSearchState.status;
|
|
1654
|
+
$[113] = displayedLogs;
|
|
1655
|
+
$[114] = treeNodes;
|
|
1656
|
+
$[115] = t41;
|
|
1657
|
+
} else {
|
|
1658
|
+
t41 = $[115];
|
|
1659
|
+
}
|
|
1660
|
+
import_react3.default.useEffect(t40, t41);
|
|
1661
|
+
let t42;
|
|
1662
|
+
if ($[116] !== displayedLogs) {
|
|
1663
|
+
t42 = (value) => {
|
|
1664
|
+
const index_1 = parseInt(value, 10);
|
|
1665
|
+
const log_11 = displayedLogs[index_1];
|
|
1666
|
+
if (!log_11 || prevFocusedIdRef.current === index_1.toString()) {
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
prevFocusedIdRef.current = index_1.toString();
|
|
1670
|
+
setFocusedNode({
|
|
1671
|
+
id: index_1.toString(),
|
|
1672
|
+
value: {
|
|
1673
|
+
log: log_11,
|
|
1674
|
+
indexInFiltered: index_1
|
|
1675
|
+
},
|
|
1676
|
+
label: ""
|
|
1677
|
+
});
|
|
1678
|
+
setFocusedIndex(index_1 + 1);
|
|
1679
|
+
};
|
|
1680
|
+
$[116] = displayedLogs;
|
|
1681
|
+
$[117] = t42;
|
|
1682
|
+
} else {
|
|
1683
|
+
t42 = $[117];
|
|
1684
|
+
}
|
|
1685
|
+
const handleFlatOptionsSelectFocus = t42;
|
|
1686
|
+
let t43;
|
|
1687
|
+
if ($[118] !== displayedLogs) {
|
|
1688
|
+
t43 = (node) => {
|
|
1689
|
+
setFocusedNode(node);
|
|
1690
|
+
const index_2 = displayedLogs.findIndex((log_12) => getSessionIdFromLog(log_12) === getSessionIdFromLog(node.value.log));
|
|
1691
|
+
if (index_2 >= 0) {
|
|
1692
|
+
setFocusedIndex(index_2 + 1);
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1695
|
+
$[118] = displayedLogs;
|
|
1696
|
+
$[119] = t43;
|
|
1697
|
+
} else {
|
|
1698
|
+
t43 = $[119];
|
|
1699
|
+
}
|
|
1700
|
+
const handleTreeSelectFocus = t43;
|
|
1701
|
+
let t44;
|
|
1702
|
+
if ($[120] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1703
|
+
t44 = () => {
|
|
1704
|
+
agenticSearchAbortRef.current?.abort();
|
|
1705
|
+
setAgenticSearchState({
|
|
1706
|
+
status: "idle"
|
|
1707
|
+
});
|
|
1708
|
+
logEvent("tengu_agentic_search_cancelled", {});
|
|
1709
|
+
};
|
|
1710
|
+
$[120] = t44;
|
|
1711
|
+
} else {
|
|
1712
|
+
t44 = $[120];
|
|
1713
|
+
}
|
|
1714
|
+
const t45 = viewMode !== "preview" && agenticSearchState.status === "searching";
|
|
1715
|
+
let t46;
|
|
1716
|
+
if ($[121] !== t45) {
|
|
1717
|
+
t46 = {
|
|
1718
|
+
context: "Confirmation",
|
|
1719
|
+
isActive: t45
|
|
1720
|
+
};
|
|
1721
|
+
$[121] = t45;
|
|
1722
|
+
$[122] = t46;
|
|
1723
|
+
} else {
|
|
1724
|
+
t46 = $[122];
|
|
1725
|
+
}
|
|
1726
|
+
useKeybinding("confirm:no", t44, t46);
|
|
1727
|
+
let t47;
|
|
1728
|
+
if ($[123] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1729
|
+
t47 = () => {
|
|
1730
|
+
setViewMode("list");
|
|
1731
|
+
setRenameValue("");
|
|
1732
|
+
};
|
|
1733
|
+
$[123] = t47;
|
|
1734
|
+
} else {
|
|
1735
|
+
t47 = $[123];
|
|
1736
|
+
}
|
|
1737
|
+
const t48 = viewMode === "rename" && agenticSearchState.status !== "searching";
|
|
1738
|
+
let t49;
|
|
1739
|
+
if ($[124] !== t48) {
|
|
1740
|
+
t49 = {
|
|
1741
|
+
context: "Settings",
|
|
1742
|
+
isActive: t48
|
|
1743
|
+
};
|
|
1744
|
+
$[124] = t48;
|
|
1745
|
+
$[125] = t49;
|
|
1746
|
+
} else {
|
|
1747
|
+
t49 = $[125];
|
|
1748
|
+
}
|
|
1749
|
+
useKeybinding("confirm:no", t47, t49);
|
|
1750
|
+
let t50;
|
|
1751
|
+
if ($[126] !== onCancel || $[127] !== setSearchQuery) {
|
|
1752
|
+
t50 = () => {
|
|
1753
|
+
setSearchQuery("");
|
|
1754
|
+
setIsAgenticSearchOptionFocused(false);
|
|
1755
|
+
onCancel?.();
|
|
1756
|
+
};
|
|
1757
|
+
$[126] = onCancel;
|
|
1758
|
+
$[127] = setSearchQuery;
|
|
1759
|
+
$[128] = t50;
|
|
1760
|
+
} else {
|
|
1761
|
+
t50 = $[128];
|
|
1762
|
+
}
|
|
1763
|
+
const t51 = viewMode !== "preview" && viewMode !== "rename" && viewMode !== "search" && isAgenticSearchOptionFocused && agenticSearchState.status !== "searching";
|
|
1764
|
+
let t52;
|
|
1765
|
+
if ($[129] !== t51) {
|
|
1766
|
+
t52 = {
|
|
1767
|
+
context: "Confirmation",
|
|
1768
|
+
isActive: t51
|
|
1769
|
+
};
|
|
1770
|
+
$[129] = t51;
|
|
1771
|
+
$[130] = t52;
|
|
1772
|
+
} else {
|
|
1773
|
+
t52 = $[130];
|
|
1774
|
+
}
|
|
1775
|
+
useKeybinding("confirm:no", t50, t52);
|
|
1776
|
+
let t53;
|
|
1777
|
+
if ($[131] !== agenticSearchState.status || $[132] !== branchFilterEnabled || $[133] !== focusedLog || $[134] !== handleAgenticSearch || $[135] !== hasMultipleWorktrees || $[136] !== hasTags || $[137] !== isAgenticSearchOptionFocused || $[138] !== onAgenticSearch || $[139] !== onToggleAllProjects || $[140] !== searchQuery || $[141] !== setSearchQuery || $[142] !== showAllProjects || $[143] !== showAllWorktrees || $[144] !== tagTabs || $[145] !== uniqueTags || $[146] !== viewMode) {
|
|
1778
|
+
t53 = (input, key) => {
|
|
1779
|
+
if (viewMode === "preview") {
|
|
1780
|
+
return;
|
|
1781
|
+
}
|
|
1782
|
+
if (agenticSearchState.status === "searching") {
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1785
|
+
if (viewMode === "rename") {} else {
|
|
1786
|
+
if (viewMode === "search") {
|
|
1787
|
+
if (input.toLowerCase() === "n" && key.ctrl) {
|
|
1788
|
+
exitSearchMode();
|
|
1789
|
+
} else {
|
|
1790
|
+
if (key.return || key.downArrow) {
|
|
1791
|
+
if (searchQuery.trim() && onAgenticSearch && false) {}
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
} else {
|
|
1795
|
+
if (isAgenticSearchOptionFocused) {
|
|
1796
|
+
if (key.return) {
|
|
1797
|
+
handleAgenticSearch();
|
|
1798
|
+
setIsAgenticSearchOptionFocused(false);
|
|
1799
|
+
return;
|
|
1800
|
+
} else {
|
|
1801
|
+
if (key.downArrow) {
|
|
1802
|
+
setIsAgenticSearchOptionFocused(false);
|
|
1803
|
+
return;
|
|
1804
|
+
} else {
|
|
1805
|
+
if (key.upArrow) {
|
|
1806
|
+
setViewMode("search");
|
|
1807
|
+
setIsAgenticSearchOptionFocused(false);
|
|
1808
|
+
return;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
if (hasTags && key.tab) {
|
|
1814
|
+
const offset = key.shift ? -1 : 1;
|
|
1815
|
+
setSelectedTagIndex((prev) => {
|
|
1816
|
+
const current = prev < tagTabs.length ? prev : 0;
|
|
1817
|
+
const newIndex = (current + tagTabs.length + offset) % tagTabs.length;
|
|
1818
|
+
const newTab = tagTabs[newIndex];
|
|
1819
|
+
logEvent("tengu_session_tag_filter_changed", {
|
|
1820
|
+
is_all: newTab === "All",
|
|
1821
|
+
tag_count: uniqueTags.length
|
|
1822
|
+
});
|
|
1823
|
+
return newIndex;
|
|
1824
|
+
});
|
|
1825
|
+
return;
|
|
1826
|
+
}
|
|
1827
|
+
const keyIsNotCtrlOrMeta = !key.ctrl && !key.meta;
|
|
1828
|
+
const lowerInput = input.toLowerCase();
|
|
1829
|
+
if (lowerInput === "a" && key.ctrl && onToggleAllProjects) {
|
|
1830
|
+
onToggleAllProjects();
|
|
1831
|
+
logEvent("tengu_session_all_projects_toggled", {
|
|
1832
|
+
enabled: !showAllProjects
|
|
1833
|
+
});
|
|
1834
|
+
} else {
|
|
1835
|
+
if (lowerInput === "b" && key.ctrl) {
|
|
1836
|
+
const newEnabled = !branchFilterEnabled;
|
|
1837
|
+
setBranchFilterEnabled(newEnabled);
|
|
1838
|
+
logEvent("tengu_session_branch_filter_toggled", {
|
|
1839
|
+
enabled: newEnabled
|
|
1840
|
+
});
|
|
1841
|
+
} else {
|
|
1842
|
+
if (lowerInput === "w" && key.ctrl && hasMultipleWorktrees) {
|
|
1843
|
+
const newValue = !showAllWorktrees;
|
|
1844
|
+
setShowAllWorktrees(newValue);
|
|
1845
|
+
logEvent("tengu_session_worktree_filter_toggled", {
|
|
1846
|
+
enabled: newValue
|
|
1847
|
+
});
|
|
1848
|
+
} else {
|
|
1849
|
+
if (lowerInput === "/" && keyIsNotCtrlOrMeta) {
|
|
1850
|
+
setViewMode("search");
|
|
1851
|
+
logEvent("tengu_session_search_toggled", {
|
|
1852
|
+
enabled: true
|
|
1853
|
+
});
|
|
1854
|
+
} else {
|
|
1855
|
+
if (lowerInput === "r" && key.ctrl && focusedLog) {
|
|
1856
|
+
setViewMode("rename");
|
|
1857
|
+
setRenameValue("");
|
|
1858
|
+
logEvent("tengu_session_rename_started", {});
|
|
1859
|
+
} else {
|
|
1860
|
+
if (lowerInput === "v" && key.ctrl && focusedLog) {
|
|
1861
|
+
setPreviewLog(focusedLog);
|
|
1862
|
+
setViewMode("preview");
|
|
1863
|
+
logEvent("tengu_session_preview_opened", {
|
|
1864
|
+
messageCount: focusedLog.messageCount
|
|
1865
|
+
});
|
|
1866
|
+
} else {
|
|
1867
|
+
if (focusedLog && keyIsNotCtrlOrMeta && input.length > 0 && !/^\s+$/.test(input)) {
|
|
1868
|
+
setViewMode("search");
|
|
1869
|
+
setSearchQuery(input);
|
|
1870
|
+
logEvent("tengu_session_search_toggled", {
|
|
1871
|
+
enabled: true
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
$[131] = agenticSearchState.status;
|
|
1884
|
+
$[132] = branchFilterEnabled;
|
|
1885
|
+
$[133] = focusedLog;
|
|
1886
|
+
$[134] = handleAgenticSearch;
|
|
1887
|
+
$[135] = hasMultipleWorktrees;
|
|
1888
|
+
$[136] = hasTags;
|
|
1889
|
+
$[137] = isAgenticSearchOptionFocused;
|
|
1890
|
+
$[138] = onAgenticSearch;
|
|
1891
|
+
$[139] = onToggleAllProjects;
|
|
1892
|
+
$[140] = searchQuery;
|
|
1893
|
+
$[141] = setSearchQuery;
|
|
1894
|
+
$[142] = showAllProjects;
|
|
1895
|
+
$[143] = showAllWorktrees;
|
|
1896
|
+
$[144] = tagTabs;
|
|
1897
|
+
$[145] = uniqueTags;
|
|
1898
|
+
$[146] = viewMode;
|
|
1899
|
+
$[147] = t53;
|
|
1900
|
+
} else {
|
|
1901
|
+
t53 = $[147];
|
|
1902
|
+
}
|
|
1903
|
+
let t54;
|
|
1904
|
+
if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1905
|
+
t54 = {
|
|
1906
|
+
isActive: true
|
|
1907
|
+
};
|
|
1908
|
+
$[148] = t54;
|
|
1909
|
+
} else {
|
|
1910
|
+
t54 = $[148];
|
|
1911
|
+
}
|
|
1912
|
+
use_input_default(t53, t54);
|
|
1913
|
+
let filterIndicators;
|
|
1914
|
+
if ($[149] !== branchFilterEnabled || $[150] !== currentBranch || $[151] !== hasMultipleWorktrees || $[152] !== showAllWorktrees) {
|
|
1915
|
+
filterIndicators = [];
|
|
1916
|
+
if (branchFilterEnabled && currentBranch) {
|
|
1917
|
+
filterIndicators.push(currentBranch);
|
|
1918
|
+
}
|
|
1919
|
+
if (hasMultipleWorktrees && !showAllWorktrees) {
|
|
1920
|
+
filterIndicators.push("current worktree");
|
|
1921
|
+
}
|
|
1922
|
+
$[149] = branchFilterEnabled;
|
|
1923
|
+
$[150] = currentBranch;
|
|
1924
|
+
$[151] = hasMultipleWorktrees;
|
|
1925
|
+
$[152] = showAllWorktrees;
|
|
1926
|
+
$[153] = filterIndicators;
|
|
1927
|
+
} else {
|
|
1928
|
+
filterIndicators = $[153];
|
|
1929
|
+
}
|
|
1930
|
+
const showAdditionalFilterLine = filterIndicators.length > 0 && viewMode !== "search";
|
|
1931
|
+
const headerLines = 8 + (showAdditionalFilterLine ? 1 : 0) + tagTabsLines;
|
|
1932
|
+
const visibleCount = Math.max(1, Math.floor((maxHeight - headerLines - 2) / 3));
|
|
1933
|
+
let t55;
|
|
1934
|
+
let t56;
|
|
1935
|
+
if ($[154] !== displayedLogs.length || $[155] !== focusedIndex || $[156] !== onLoadMore || $[157] !== visibleCount) {
|
|
1936
|
+
t55 = () => {
|
|
1937
|
+
if (!onLoadMore) {
|
|
1938
|
+
return;
|
|
1939
|
+
}
|
|
1940
|
+
const buffer = visibleCount * 2;
|
|
1941
|
+
if (focusedIndex + buffer >= displayedLogs.length) {
|
|
1942
|
+
onLoadMore(visibleCount * 3);
|
|
1943
|
+
}
|
|
1944
|
+
};
|
|
1945
|
+
t56 = [focusedIndex, visibleCount, displayedLogs.length, onLoadMore];
|
|
1946
|
+
$[154] = displayedLogs.length;
|
|
1947
|
+
$[155] = focusedIndex;
|
|
1948
|
+
$[156] = onLoadMore;
|
|
1949
|
+
$[157] = visibleCount;
|
|
1950
|
+
$[158] = t55;
|
|
1951
|
+
$[159] = t56;
|
|
1952
|
+
} else {
|
|
1953
|
+
t55 = $[158];
|
|
1954
|
+
t56 = $[159];
|
|
1955
|
+
}
|
|
1956
|
+
import_react3.default.useEffect(t55, t56);
|
|
1957
|
+
if (logs.length === 0) {
|
|
1958
|
+
return null;
|
|
1959
|
+
}
|
|
1960
|
+
if (viewMode === "preview" && previewLog && isResumeWithRenameEnabled) {
|
|
1961
|
+
let t572;
|
|
1962
|
+
if ($[160] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1963
|
+
t572 = () => {
|
|
1964
|
+
setViewMode("list");
|
|
1965
|
+
setPreviewLog(null);
|
|
1966
|
+
};
|
|
1967
|
+
$[160] = t572;
|
|
1968
|
+
} else {
|
|
1969
|
+
t572 = $[160];
|
|
1970
|
+
}
|
|
1971
|
+
let t582;
|
|
1972
|
+
if ($[161] !== onSelect || $[162] !== previewLog) {
|
|
1973
|
+
t582 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(SessionPreview, {
|
|
1974
|
+
log: previewLog,
|
|
1975
|
+
onExit: t572,
|
|
1976
|
+
onSelect
|
|
1977
|
+
}, undefined, false, undefined, this);
|
|
1978
|
+
$[161] = onSelect;
|
|
1979
|
+
$[162] = previewLog;
|
|
1980
|
+
$[163] = t582;
|
|
1981
|
+
} else {
|
|
1982
|
+
t582 = $[163];
|
|
1983
|
+
}
|
|
1984
|
+
return t582;
|
|
1985
|
+
}
|
|
1986
|
+
const t57 = maxHeight - 1;
|
|
1987
|
+
let t58;
|
|
1988
|
+
if ($[164] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1989
|
+
t58 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
1990
|
+
flexShrink: 0,
|
|
1991
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Divider, {
|
|
1992
|
+
color: "suggestion"
|
|
1993
|
+
}, undefined, false, undefined, this)
|
|
1994
|
+
}, undefined, false, undefined, this);
|
|
1995
|
+
$[164] = t58;
|
|
1996
|
+
} else {
|
|
1997
|
+
t58 = $[164];
|
|
1998
|
+
}
|
|
1999
|
+
let t59;
|
|
2000
|
+
if ($[165] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2001
|
+
t59 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2002
|
+
flexShrink: 0,
|
|
2003
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2004
|
+
children: " "
|
|
2005
|
+
}, undefined, false, undefined, this)
|
|
2006
|
+
}, undefined, false, undefined, this);
|
|
2007
|
+
$[165] = t59;
|
|
2008
|
+
} else {
|
|
2009
|
+
t59 = $[165];
|
|
2010
|
+
}
|
|
2011
|
+
let t60;
|
|
2012
|
+
if ($[166] !== columns || $[167] !== displayedLogs.length || $[168] !== effectiveTagIndex || $[169] !== focusedIndex || $[170] !== hasTags || $[171] !== showAllProjects || $[172] !== tagTabs || $[173] !== viewMode || $[174] !== visibleCount) {
|
|
2013
|
+
t60 = hasTags ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(TagTabs, {
|
|
2014
|
+
tabs: tagTabs,
|
|
2015
|
+
selectedIndex: effectiveTagIndex,
|
|
2016
|
+
availableWidth: columns,
|
|
2017
|
+
showAllProjects
|
|
2018
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2019
|
+
flexShrink: 0,
|
|
2020
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2021
|
+
bold: true,
|
|
2022
|
+
color: "suggestion",
|
|
2023
|
+
children: [
|
|
2024
|
+
"Resume Session",
|
|
2025
|
+
viewMode === "list" && displayedLogs.length > visibleCount && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2026
|
+
dimColor: true,
|
|
2027
|
+
children: [
|
|
2028
|
+
" ",
|
|
2029
|
+
"(",
|
|
2030
|
+
focusedIndex,
|
|
2031
|
+
" of ",
|
|
2032
|
+
displayedLogs.length,
|
|
2033
|
+
")"
|
|
2034
|
+
]
|
|
2035
|
+
}, undefined, true, undefined, this)
|
|
2036
|
+
]
|
|
2037
|
+
}, undefined, true, undefined, this)
|
|
2038
|
+
}, undefined, false, undefined, this);
|
|
2039
|
+
$[166] = columns;
|
|
2040
|
+
$[167] = displayedLogs.length;
|
|
2041
|
+
$[168] = effectiveTagIndex;
|
|
2042
|
+
$[169] = focusedIndex;
|
|
2043
|
+
$[170] = hasTags;
|
|
2044
|
+
$[171] = showAllProjects;
|
|
2045
|
+
$[172] = tagTabs;
|
|
2046
|
+
$[173] = viewMode;
|
|
2047
|
+
$[174] = visibleCount;
|
|
2048
|
+
$[175] = t60;
|
|
2049
|
+
} else {
|
|
2050
|
+
t60 = $[175];
|
|
2051
|
+
}
|
|
2052
|
+
const t61 = viewMode === "search";
|
|
2053
|
+
let t62;
|
|
2054
|
+
if ($[176] !== isTerminalFocused || $[177] !== searchCursorOffset || $[178] !== searchQuery || $[179] !== t61) {
|
|
2055
|
+
t62 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(SearchBox, {
|
|
2056
|
+
query: searchQuery,
|
|
2057
|
+
isFocused: t61,
|
|
2058
|
+
isTerminalFocused,
|
|
2059
|
+
cursorOffset: searchCursorOffset
|
|
2060
|
+
}, undefined, false, undefined, this);
|
|
2061
|
+
$[176] = isTerminalFocused;
|
|
2062
|
+
$[177] = searchCursorOffset;
|
|
2063
|
+
$[178] = searchQuery;
|
|
2064
|
+
$[179] = t61;
|
|
2065
|
+
$[180] = t62;
|
|
2066
|
+
} else {
|
|
2067
|
+
t62 = $[180];
|
|
2068
|
+
}
|
|
2069
|
+
let t63;
|
|
2070
|
+
if ($[181] !== filterIndicators || $[182] !== viewMode) {
|
|
2071
|
+
t63 = filterIndicators.length > 0 && viewMode !== "search" && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2072
|
+
flexShrink: 0,
|
|
2073
|
+
paddingLeft: 2,
|
|
2074
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2075
|
+
dimColor: true,
|
|
2076
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Byline, {
|
|
2077
|
+
children: filterIndicators
|
|
2078
|
+
}, undefined, false, undefined, this)
|
|
2079
|
+
}, undefined, false, undefined, this)
|
|
2080
|
+
}, undefined, false, undefined, this);
|
|
2081
|
+
$[181] = filterIndicators;
|
|
2082
|
+
$[182] = viewMode;
|
|
2083
|
+
$[183] = t63;
|
|
2084
|
+
} else {
|
|
2085
|
+
t63 = $[183];
|
|
2086
|
+
}
|
|
2087
|
+
let t64;
|
|
2088
|
+
if ($[184] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2089
|
+
t64 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2090
|
+
flexShrink: 0,
|
|
2091
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2092
|
+
children: " "
|
|
2093
|
+
}, undefined, false, undefined, this)
|
|
2094
|
+
}, undefined, false, undefined, this);
|
|
2095
|
+
$[184] = t64;
|
|
2096
|
+
} else {
|
|
2097
|
+
t64 = $[184];
|
|
2098
|
+
}
|
|
2099
|
+
let t65;
|
|
2100
|
+
if ($[185] !== agenticSearchState.status) {
|
|
2101
|
+
t65 = agenticSearchState.status === "searching" && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2102
|
+
paddingLeft: 1,
|
|
2103
|
+
flexShrink: 0,
|
|
2104
|
+
children: [
|
|
2105
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Spinner, {}, undefined, false, undefined, this),
|
|
2106
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2107
|
+
children: " Searching\u2026"
|
|
2108
|
+
}, undefined, false, undefined, this)
|
|
2109
|
+
]
|
|
2110
|
+
}, undefined, true, undefined, this);
|
|
2111
|
+
$[185] = agenticSearchState.status;
|
|
2112
|
+
$[186] = t65;
|
|
2113
|
+
} else {
|
|
2114
|
+
t65 = $[186];
|
|
2115
|
+
}
|
|
2116
|
+
let t66;
|
|
2117
|
+
if ($[187] !== agenticSearchState.results || $[188] !== agenticSearchState.status) {
|
|
2118
|
+
t66 = agenticSearchState.status === "results" && agenticSearchState.results.length > 0 && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2119
|
+
paddingLeft: 1,
|
|
2120
|
+
marginBottom: 1,
|
|
2121
|
+
flexShrink: 0,
|
|
2122
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2123
|
+
dimColor: true,
|
|
2124
|
+
italic: true,
|
|
2125
|
+
children: "Claude found these results:"
|
|
2126
|
+
}, undefined, false, undefined, this)
|
|
2127
|
+
}, undefined, false, undefined, this);
|
|
2128
|
+
$[187] = agenticSearchState.results;
|
|
2129
|
+
$[188] = agenticSearchState.status;
|
|
2130
|
+
$[189] = t66;
|
|
2131
|
+
} else {
|
|
2132
|
+
t66 = $[189];
|
|
2133
|
+
}
|
|
2134
|
+
let t67;
|
|
2135
|
+
if ($[190] !== agenticSearchState.results || $[191] !== agenticSearchState.status || $[192] !== filteredLogs) {
|
|
2136
|
+
t67 = agenticSearchState.status === "results" && agenticSearchState.results.length === 0 && filteredLogs.length === 0 && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2137
|
+
paddingLeft: 1,
|
|
2138
|
+
marginBottom: 1,
|
|
2139
|
+
flexShrink: 0,
|
|
2140
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2141
|
+
dimColor: true,
|
|
2142
|
+
italic: true,
|
|
2143
|
+
children: "No matching sessions found."
|
|
2144
|
+
}, undefined, false, undefined, this)
|
|
2145
|
+
}, undefined, false, undefined, this);
|
|
2146
|
+
$[190] = agenticSearchState.results;
|
|
2147
|
+
$[191] = agenticSearchState.status;
|
|
2148
|
+
$[192] = filteredLogs;
|
|
2149
|
+
$[193] = t67;
|
|
2150
|
+
} else {
|
|
2151
|
+
t67 = $[193];
|
|
2152
|
+
}
|
|
2153
|
+
let t68;
|
|
2154
|
+
if ($[194] !== agenticSearchState.status || $[195] !== filteredLogs) {
|
|
2155
|
+
t68 = agenticSearchState.status === "error" && filteredLogs.length === 0 && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2156
|
+
paddingLeft: 1,
|
|
2157
|
+
marginBottom: 1,
|
|
2158
|
+
flexShrink: 0,
|
|
2159
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2160
|
+
dimColor: true,
|
|
2161
|
+
italic: true,
|
|
2162
|
+
children: "No matching sessions found."
|
|
2163
|
+
}, undefined, false, undefined, this)
|
|
2164
|
+
}, undefined, false, undefined, this);
|
|
2165
|
+
$[194] = agenticSearchState.status;
|
|
2166
|
+
$[195] = filteredLogs;
|
|
2167
|
+
$[196] = t68;
|
|
2168
|
+
} else {
|
|
2169
|
+
t68 = $[196];
|
|
2170
|
+
}
|
|
2171
|
+
let t69;
|
|
2172
|
+
if ($[197] !== agenticSearchState.status || $[198] !== isAgenticSearchOptionFocused || $[199] !== onAgenticSearch || $[200] !== searchQuery) {
|
|
2173
|
+
t69 = Boolean(searchQuery.trim()) && onAgenticSearch && false;
|
|
2174
|
+
$[197] = agenticSearchState.status;
|
|
2175
|
+
$[198] = isAgenticSearchOptionFocused;
|
|
2176
|
+
$[199] = onAgenticSearch;
|
|
2177
|
+
$[200] = searchQuery;
|
|
2178
|
+
$[201] = t69;
|
|
2179
|
+
} else {
|
|
2180
|
+
t69 = $[201];
|
|
2181
|
+
}
|
|
2182
|
+
let t70;
|
|
2183
|
+
if ($[202] !== agenticSearchState.status || $[203] !== branchFilterEnabled || $[204] !== columns || $[205] !== displayedLogs || $[206] !== expandedGroupSessionIds || $[207] !== flatOptions || $[208] !== focusedLog || $[209] !== focusedNode?.id || $[210] !== handleFlatOptionsSelectFocus || $[211] !== handleRenameSubmit || $[212] !== handleTreeSelectFocus || $[213] !== isAgenticSearchOptionFocused || $[214] !== onCancel || $[215] !== onSelect || $[216] !== renameCursorOffset || $[217] !== renameValue || $[218] !== treeNodes || $[219] !== viewMode || $[220] !== visibleCount) {
|
|
2184
|
+
t70 = agenticSearchState.status === "searching" ? null : viewMode === "rename" && focusedLog ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2185
|
+
paddingLeft: 2,
|
|
2186
|
+
flexDirection: "column",
|
|
2187
|
+
children: [
|
|
2188
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2189
|
+
bold: true,
|
|
2190
|
+
children: "Rename session:"
|
|
2191
|
+
}, undefined, false, undefined, this),
|
|
2192
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2193
|
+
paddingTop: 1,
|
|
2194
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(TextInput, {
|
|
2195
|
+
value: renameValue,
|
|
2196
|
+
onChange: setRenameValue,
|
|
2197
|
+
onSubmit: handleRenameSubmit,
|
|
2198
|
+
placeholder: getLogDisplayTitle(focusedLog, "Enter new session name"),
|
|
2199
|
+
columns,
|
|
2200
|
+
cursorOffset: renameCursorOffset,
|
|
2201
|
+
onChangeCursorOffset: setRenameCursorOffset,
|
|
2202
|
+
showCursor: true
|
|
2203
|
+
}, undefined, false, undefined, this)
|
|
2204
|
+
}, undefined, false, undefined, this)
|
|
2205
|
+
]
|
|
2206
|
+
}, undefined, true, undefined, this) : isResumeWithRenameEnabled ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(TreeSelect, {
|
|
2207
|
+
nodes: treeNodes,
|
|
2208
|
+
onSelect: (node_0) => {
|
|
2209
|
+
onSelect(node_0.value.log);
|
|
2210
|
+
},
|
|
2211
|
+
onFocus: handleTreeSelectFocus,
|
|
2212
|
+
onCancel,
|
|
2213
|
+
focusNodeId: focusedNode?.id,
|
|
2214
|
+
visibleOptionCount: visibleCount,
|
|
2215
|
+
layout: "expanded",
|
|
2216
|
+
isDisabled: viewMode === "search" || isAgenticSearchOptionFocused,
|
|
2217
|
+
hideIndexes: false,
|
|
2218
|
+
isNodeExpanded: (nodeId) => {
|
|
2219
|
+
if (viewMode === "search" || branchFilterEnabled) {
|
|
2220
|
+
return true;
|
|
2221
|
+
}
|
|
2222
|
+
const sessionId_2 = typeof nodeId === "string" && nodeId.startsWith("group:") ? nodeId.substring(6) : null;
|
|
2223
|
+
return sessionId_2 ? expandedGroupSessionIds.has(sessionId_2) : false;
|
|
2224
|
+
},
|
|
2225
|
+
onExpand: (nodeId_0) => {
|
|
2226
|
+
const sessionId_3 = typeof nodeId_0 === "string" && nodeId_0.startsWith("group:") ? nodeId_0.substring(6) : null;
|
|
2227
|
+
if (sessionId_3) {
|
|
2228
|
+
setExpandedGroupSessionIds((prev_0) => new Set(prev_0).add(sessionId_3));
|
|
2229
|
+
logEvent("tengu_session_group_expanded", {});
|
|
2230
|
+
}
|
|
2231
|
+
},
|
|
2232
|
+
onCollapse: (nodeId_1) => {
|
|
2233
|
+
const sessionId_4 = typeof nodeId_1 === "string" && nodeId_1.startsWith("group:") ? nodeId_1.substring(6) : null;
|
|
2234
|
+
if (sessionId_4) {
|
|
2235
|
+
setExpandedGroupSessionIds((prev_1) => {
|
|
2236
|
+
const newSet = new Set(prev_1);
|
|
2237
|
+
newSet.delete(sessionId_4);
|
|
2238
|
+
return newSet;
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
onUpFromFirstItem: enterSearchMode
|
|
2243
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Select, {
|
|
2244
|
+
options: flatOptions,
|
|
2245
|
+
onChange: (value_0) => {
|
|
2246
|
+
const itemIndex = parseInt(value_0, 10);
|
|
2247
|
+
const log_13 = displayedLogs[itemIndex];
|
|
2248
|
+
if (log_13) {
|
|
2249
|
+
onSelect(log_13);
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
visibleOptionCount: visibleCount,
|
|
2253
|
+
onCancel,
|
|
2254
|
+
onFocus: handleFlatOptionsSelectFocus,
|
|
2255
|
+
defaultFocusValue: focusedNode?.id.toString(),
|
|
2256
|
+
layout: "expanded",
|
|
2257
|
+
isDisabled: viewMode === "search" || isAgenticSearchOptionFocused,
|
|
2258
|
+
onUpFromFirstItem: enterSearchMode
|
|
2259
|
+
}, undefined, false, undefined, this);
|
|
2260
|
+
$[202] = agenticSearchState.status;
|
|
2261
|
+
$[203] = branchFilterEnabled;
|
|
2262
|
+
$[204] = columns;
|
|
2263
|
+
$[205] = displayedLogs;
|
|
2264
|
+
$[206] = expandedGroupSessionIds;
|
|
2265
|
+
$[207] = flatOptions;
|
|
2266
|
+
$[208] = focusedLog;
|
|
2267
|
+
$[209] = focusedNode?.id;
|
|
2268
|
+
$[210] = handleFlatOptionsSelectFocus;
|
|
2269
|
+
$[211] = handleRenameSubmit;
|
|
2270
|
+
$[212] = handleTreeSelectFocus;
|
|
2271
|
+
$[213] = isAgenticSearchOptionFocused;
|
|
2272
|
+
$[214] = onCancel;
|
|
2273
|
+
$[215] = onSelect;
|
|
2274
|
+
$[216] = renameCursorOffset;
|
|
2275
|
+
$[217] = renameValue;
|
|
2276
|
+
$[218] = treeNodes;
|
|
2277
|
+
$[219] = viewMode;
|
|
2278
|
+
$[220] = visibleCount;
|
|
2279
|
+
$[221] = t70;
|
|
2280
|
+
} else {
|
|
2281
|
+
t70 = $[221];
|
|
2282
|
+
}
|
|
2283
|
+
let t71;
|
|
2284
|
+
if ($[222] !== agenticSearchState.status || $[223] !== currentBranch || $[224] !== exitState.keyName || $[225] !== exitState.pending || $[226] !== getExpandCollapseHint || $[227] !== hasMultipleWorktrees || $[228] !== isAgenticSearchOptionFocused || $[229] !== isSearching || $[230] !== onToggleAllProjects || $[231] !== showAllProjects || $[232] !== showAllWorktrees || $[233] !== viewMode) {
|
|
2285
|
+
t71 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2286
|
+
paddingLeft: 2,
|
|
2287
|
+
children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2288
|
+
dimColor: true,
|
|
2289
|
+
children: [
|
|
2290
|
+
"Press ",
|
|
2291
|
+
exitState.keyName,
|
|
2292
|
+
" again to exit"
|
|
2293
|
+
]
|
|
2294
|
+
}, undefined, true, undefined, this) : viewMode === "rename" ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2295
|
+
dimColor: true,
|
|
2296
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Byline, {
|
|
2297
|
+
children: [
|
|
2298
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2299
|
+
shortcut: "Enter",
|
|
2300
|
+
action: "save"
|
|
2301
|
+
}, undefined, false, undefined, this),
|
|
2302
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ConfigurableShortcutHint, {
|
|
2303
|
+
action: "confirm:no",
|
|
2304
|
+
context: "Confirmation",
|
|
2305
|
+
fallback: "Esc",
|
|
2306
|
+
description: "cancel"
|
|
2307
|
+
}, undefined, false, undefined, this)
|
|
2308
|
+
]
|
|
2309
|
+
}, undefined, true, undefined, this)
|
|
2310
|
+
}, undefined, false, undefined, this) : agenticSearchState.status === "searching" ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2311
|
+
dimColor: true,
|
|
2312
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Byline, {
|
|
2313
|
+
children: [
|
|
2314
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2315
|
+
children: "Searching with Claude\u2026"
|
|
2316
|
+
}, undefined, false, undefined, this),
|
|
2317
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ConfigurableShortcutHint, {
|
|
2318
|
+
action: "confirm:no",
|
|
2319
|
+
context: "Confirmation",
|
|
2320
|
+
fallback: "Esc",
|
|
2321
|
+
description: "cancel"
|
|
2322
|
+
}, undefined, false, undefined, this)
|
|
2323
|
+
]
|
|
2324
|
+
}, undefined, true, undefined, this)
|
|
2325
|
+
}, undefined, false, undefined, this) : isAgenticSearchOptionFocused ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2326
|
+
dimColor: true,
|
|
2327
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Byline, {
|
|
2328
|
+
children: [
|
|
2329
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2330
|
+
shortcut: "Enter",
|
|
2331
|
+
action: "search"
|
|
2332
|
+
}, undefined, false, undefined, this),
|
|
2333
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2334
|
+
shortcut: "\u2193",
|
|
2335
|
+
action: "skip"
|
|
2336
|
+
}, undefined, false, undefined, this),
|
|
2337
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ConfigurableShortcutHint, {
|
|
2338
|
+
action: "confirm:no",
|
|
2339
|
+
context: "Confirmation",
|
|
2340
|
+
fallback: "Esc",
|
|
2341
|
+
description: "cancel"
|
|
2342
|
+
}, undefined, false, undefined, this)
|
|
2343
|
+
]
|
|
2344
|
+
}, undefined, true, undefined, this)
|
|
2345
|
+
}, undefined, false, undefined, this) : viewMode === "search" ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2346
|
+
dimColor: true,
|
|
2347
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Byline, {
|
|
2348
|
+
children: [
|
|
2349
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2350
|
+
children: "Type to Search"
|
|
2351
|
+
}, undefined, false, undefined, this),
|
|
2352
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2353
|
+
shortcut: "Enter",
|
|
2354
|
+
action: "select"
|
|
2355
|
+
}, undefined, false, undefined, this),
|
|
2356
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ConfigurableShortcutHint, {
|
|
2357
|
+
action: "confirm:no",
|
|
2358
|
+
context: "Confirmation",
|
|
2359
|
+
fallback: "Esc",
|
|
2360
|
+
description: "clear"
|
|
2361
|
+
}, undefined, false, undefined, this)
|
|
2362
|
+
]
|
|
2363
|
+
}, undefined, true, undefined, this)
|
|
2364
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2365
|
+
dimColor: true,
|
|
2366
|
+
children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Byline, {
|
|
2367
|
+
children: [
|
|
2368
|
+
onToggleAllProjects && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2369
|
+
shortcut: "Ctrl+A",
|
|
2370
|
+
action: `show ${showAllProjects ? "current dir" : "all projects"}`
|
|
2371
|
+
}, undefined, false, undefined, this),
|
|
2372
|
+
currentBranch && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2373
|
+
shortcut: "Ctrl+B",
|
|
2374
|
+
action: "toggle branch"
|
|
2375
|
+
}, undefined, false, undefined, this),
|
|
2376
|
+
hasMultipleWorktrees && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2377
|
+
shortcut: "Ctrl+W",
|
|
2378
|
+
action: `show ${showAllWorktrees ? "current worktree" : "all worktrees"}`
|
|
2379
|
+
}, undefined, false, undefined, this),
|
|
2380
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2381
|
+
shortcut: "Ctrl+V",
|
|
2382
|
+
action: "preview"
|
|
2383
|
+
}, undefined, false, undefined, this),
|
|
2384
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(KeyboardShortcutHint, {
|
|
2385
|
+
shortcut: "Ctrl+R",
|
|
2386
|
+
action: "rename"
|
|
2387
|
+
}, undefined, false, undefined, this),
|
|
2388
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2389
|
+
children: "Type to search"
|
|
2390
|
+
}, undefined, false, undefined, this),
|
|
2391
|
+
/* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ConfigurableShortcutHint, {
|
|
2392
|
+
action: "confirm:no",
|
|
2393
|
+
context: "Confirmation",
|
|
2394
|
+
fallback: "Esc",
|
|
2395
|
+
description: "cancel"
|
|
2396
|
+
}, undefined, false, undefined, this),
|
|
2397
|
+
getExpandCollapseHint() && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
2398
|
+
children: getExpandCollapseHint()
|
|
2399
|
+
}, undefined, false, undefined, this)
|
|
2400
|
+
]
|
|
2401
|
+
}, undefined, true, undefined, this)
|
|
2402
|
+
}, undefined, false, undefined, this)
|
|
2403
|
+
}, undefined, false, undefined, this);
|
|
2404
|
+
$[222] = agenticSearchState.status;
|
|
2405
|
+
$[223] = currentBranch;
|
|
2406
|
+
$[224] = exitState.keyName;
|
|
2407
|
+
$[225] = exitState.pending;
|
|
2408
|
+
$[226] = getExpandCollapseHint;
|
|
2409
|
+
$[227] = hasMultipleWorktrees;
|
|
2410
|
+
$[228] = isAgenticSearchOptionFocused;
|
|
2411
|
+
$[229] = isSearching;
|
|
2412
|
+
$[230] = onToggleAllProjects;
|
|
2413
|
+
$[231] = showAllProjects;
|
|
2414
|
+
$[232] = showAllWorktrees;
|
|
2415
|
+
$[233] = viewMode;
|
|
2416
|
+
$[234] = t71;
|
|
2417
|
+
} else {
|
|
2418
|
+
t71 = $[234];
|
|
2419
|
+
}
|
|
2420
|
+
let t72;
|
|
2421
|
+
if ($[235] !== t57 || $[236] !== t60 || $[237] !== t62 || $[238] !== t63 || $[239] !== t65 || $[240] !== t66 || $[241] !== t67 || $[242] !== t68 || $[243] !== t69 || $[244] !== t70 || $[245] !== t71) {
|
|
2422
|
+
t72 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
|
|
2423
|
+
flexDirection: "column",
|
|
2424
|
+
height: t57,
|
|
2425
|
+
children: [
|
|
2426
|
+
t58,
|
|
2427
|
+
t59,
|
|
2428
|
+
t60,
|
|
2429
|
+
t62,
|
|
2430
|
+
t63,
|
|
2431
|
+
t64,
|
|
2432
|
+
t65,
|
|
2433
|
+
t66,
|
|
2434
|
+
t67,
|
|
2435
|
+
t68,
|
|
2436
|
+
t69,
|
|
2437
|
+
t70,
|
|
2438
|
+
t71
|
|
2439
|
+
]
|
|
2440
|
+
}, undefined, true, undefined, this);
|
|
2441
|
+
$[235] = t57;
|
|
2442
|
+
$[236] = t60;
|
|
2443
|
+
$[237] = t62;
|
|
2444
|
+
$[238] = t63;
|
|
2445
|
+
$[239] = t65;
|
|
2446
|
+
$[240] = t66;
|
|
2447
|
+
$[241] = t67;
|
|
2448
|
+
$[242] = t68;
|
|
2449
|
+
$[243] = t69;
|
|
2450
|
+
$[244] = t70;
|
|
2451
|
+
$[245] = t71;
|
|
2452
|
+
$[246] = t72;
|
|
2453
|
+
} else {
|
|
2454
|
+
t72 = $[246];
|
|
2455
|
+
}
|
|
2456
|
+
return t72;
|
|
2457
|
+
}
|
|
2458
|
+
function _temp7(r_0) {
|
|
2459
|
+
return r_0.log;
|
|
2460
|
+
}
|
|
2461
|
+
function _temp6(log_6) {
|
|
2462
|
+
return log_6.messages[0]?.uuid;
|
|
2463
|
+
}
|
|
2464
|
+
function _temp5(fuseIndex_0, debouncedDeepSearchQuery_0, setDeepSearchResults_0, setIsSearching_0) {
|
|
2465
|
+
const results = fuseIndex_0.search(debouncedDeepSearchQuery_0);
|
|
2466
|
+
results.sort(_temp3);
|
|
2467
|
+
setDeepSearchResults_0({
|
|
2468
|
+
results: results.map(_temp4),
|
|
2469
|
+
query: debouncedDeepSearchQuery_0
|
|
2470
|
+
});
|
|
2471
|
+
setIsSearching_0(false);
|
|
2472
|
+
}
|
|
2473
|
+
function _temp4(r) {
|
|
2474
|
+
return {
|
|
2475
|
+
log: r.item.log,
|
|
2476
|
+
score: r.score,
|
|
2477
|
+
searchableText: r.item.searchableText
|
|
2478
|
+
};
|
|
2479
|
+
}
|
|
2480
|
+
function _temp3(a, b) {
|
|
2481
|
+
const aTime = new Date(a.item.log.modified).getTime();
|
|
2482
|
+
const bTime = new Date(b.item.log.modified).getTime();
|
|
2483
|
+
const timeDiff = bTime - aTime;
|
|
2484
|
+
if (Math.abs(timeDiff) > DATE_TIE_THRESHOLD_MS) {
|
|
2485
|
+
return timeDiff;
|
|
2486
|
+
}
|
|
2487
|
+
return (a.score ?? 1) - (b.score ?? 1);
|
|
2488
|
+
}
|
|
2489
|
+
function _temp22(log_1) {
|
|
2490
|
+
const currentSessionId = getSessionId();
|
|
2491
|
+
const logSessionId = getSessionIdFromLog(log_1);
|
|
2492
|
+
const isCurrentSession = currentSessionId && logSessionId === currentSessionId;
|
|
2493
|
+
if (isCurrentSession) {
|
|
2494
|
+
return true;
|
|
2495
|
+
}
|
|
2496
|
+
if (log_1.customTitle) {
|
|
2497
|
+
return true;
|
|
2498
|
+
}
|
|
2499
|
+
const fromMessages = getFirstMeaningfulUserMessageTextContent(log_1.messages);
|
|
2500
|
+
if (fromMessages) {
|
|
2501
|
+
return true;
|
|
2502
|
+
}
|
|
2503
|
+
if (log_1.firstPrompt || log_1.customTitle) {
|
|
2504
|
+
return true;
|
|
2505
|
+
}
|
|
2506
|
+
return false;
|
|
2507
|
+
}
|
|
2508
|
+
function _temp8(log) {
|
|
2509
|
+
return [log, buildSearchableText(log)];
|
|
2510
|
+
}
|
|
2511
|
+
function extractSearchableText(message) {
|
|
2512
|
+
if (message.type !== "user" && message.type !== "assistant") {
|
|
2513
|
+
return "";
|
|
2514
|
+
}
|
|
2515
|
+
const content = "message" in message ? message.message?.content : undefined;
|
|
2516
|
+
if (!content)
|
|
2517
|
+
return "";
|
|
2518
|
+
if (typeof content === "string") {
|
|
2519
|
+
return content;
|
|
2520
|
+
}
|
|
2521
|
+
if (Array.isArray(content)) {
|
|
2522
|
+
return content.map((block) => {
|
|
2523
|
+
if (typeof block === "string")
|
|
2524
|
+
return block;
|
|
2525
|
+
if ("text" in block && typeof block.text === "string")
|
|
2526
|
+
return block.text;
|
|
2527
|
+
return "";
|
|
2528
|
+
}).filter(Boolean).join(" ");
|
|
2529
|
+
}
|
|
2530
|
+
return "";
|
|
2531
|
+
}
|
|
2532
|
+
function buildSearchableText(log) {
|
|
2533
|
+
const searchableMessages = log.messages.length <= DEEP_SEARCH_MAX_MESSAGES ? log.messages : [...log.messages.slice(0, DEEP_SEARCH_CROP_SIZE), ...log.messages.slice(-DEEP_SEARCH_CROP_SIZE)];
|
|
2534
|
+
const messageText = searchableMessages.map(extractSearchableText).filter(Boolean).join(" ");
|
|
2535
|
+
const metadata = [log.customTitle, log.summary, log.firstPrompt, log.gitBranch, log.tag, log.prNumber ? `PR #${log.prNumber}` : undefined, log.prRepository].filter(Boolean).join(" ");
|
|
2536
|
+
const fullText = `${metadata} ${messageText}`.trim();
|
|
2537
|
+
return fullText.length > DEEP_SEARCH_MAX_TEXT_LENGTH ? fullText.slice(0, DEEP_SEARCH_MAX_TEXT_LENGTH) : fullText;
|
|
2538
|
+
}
|
|
2539
|
+
function groupLogsBySessionId(filteredLogs) {
|
|
2540
|
+
const groups = new Map;
|
|
2541
|
+
for (const log of filteredLogs) {
|
|
2542
|
+
const sessionId = getSessionIdFromLog(log);
|
|
2543
|
+
if (sessionId) {
|
|
2544
|
+
const existing = groups.get(sessionId);
|
|
2545
|
+
if (existing) {
|
|
2546
|
+
existing.push(log);
|
|
2547
|
+
} else {
|
|
2548
|
+
groups.set(sessionId, [log]);
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
groups.forEach((logs) => logs.sort((a, b) => new Date(b.modified).getTime() - new Date(a.modified).getTime()));
|
|
2553
|
+
return groups;
|
|
2554
|
+
}
|
|
2555
|
+
function getUniqueTags(logs) {
|
|
2556
|
+
const tags = new Set;
|
|
2557
|
+
for (const log of logs) {
|
|
2558
|
+
if (log.tag) {
|
|
2559
|
+
tags.add(log.tag);
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2562
|
+
return Array.from(tags).sort((a, b) => a.localeCompare(b));
|
|
2563
|
+
}
|
|
2564
|
+
var import_compiler_runtime3, import_react3, jsx_dev_runtime4, PARENT_PREFIX_WIDTH = 2, CHILD_PREFIX_WIDTH = 4, DEEP_SEARCH_MAX_MESSAGES = 2000, DEEP_SEARCH_CROP_SIZE = 1000, DEEP_SEARCH_MAX_TEXT_LENGTH = 50000, DATE_TIE_THRESHOLD_MS, SNIPPET_CONTEXT_CHARS = 50;
|
|
2565
|
+
var init_LogSelector = __esm(() => {
|
|
2566
|
+
init_source();
|
|
2567
|
+
init_state();
|
|
2568
|
+
init_useExitOnCtrlCDWithKeybindings();
|
|
2569
|
+
init_useSearchInput();
|
|
2570
|
+
init_useTerminalSize();
|
|
2571
|
+
init_colorize();
|
|
2572
|
+
init_ink();
|
|
2573
|
+
init_useKeybinding();
|
|
2574
|
+
init_analytics();
|
|
2575
|
+
init_format();
|
|
2576
|
+
init_getWorktreePaths();
|
|
2577
|
+
init_git();
|
|
2578
|
+
init_log();
|
|
2579
|
+
init_sessionStorage();
|
|
2580
|
+
init_theme();
|
|
2581
|
+
init_ConfigurableShortcutHint();
|
|
2582
|
+
init_select();
|
|
2583
|
+
init_Byline();
|
|
2584
|
+
init_Divider();
|
|
2585
|
+
init_KeyboardShortcutHint();
|
|
2586
|
+
init_SearchBox();
|
|
2587
|
+
init_SessionPreview();
|
|
2588
|
+
init_Spinner();
|
|
2589
|
+
init_TagTabs();
|
|
2590
|
+
init_TextInput();
|
|
2591
|
+
init_TreeSelect();
|
|
2592
|
+
import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
|
|
2593
|
+
import_react3 = __toESM(require_react(), 1);
|
|
2594
|
+
jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
|
|
2595
|
+
DATE_TIE_THRESHOLD_MS = 60 * 1000;
|
|
2596
|
+
});
|
|
2597
|
+
|
|
2598
|
+
// src/utils/agenticSessionSearch.ts
|
|
2599
|
+
function extractMessageText(message) {
|
|
2600
|
+
if (message.type !== "user" && message.type !== "assistant") {
|
|
2601
|
+
return "";
|
|
2602
|
+
}
|
|
2603
|
+
const content = "message" in message ? message.message?.content : undefined;
|
|
2604
|
+
if (!content)
|
|
2605
|
+
return "";
|
|
2606
|
+
if (typeof content === "string") {
|
|
2607
|
+
return content;
|
|
2608
|
+
}
|
|
2609
|
+
if (Array.isArray(content)) {
|
|
2610
|
+
return content.map((block) => {
|
|
2611
|
+
if (typeof block === "string")
|
|
2612
|
+
return block;
|
|
2613
|
+
if ("text" in block && typeof block.text === "string")
|
|
2614
|
+
return block.text;
|
|
2615
|
+
return "";
|
|
2616
|
+
}).filter(Boolean).join(" ");
|
|
2617
|
+
}
|
|
2618
|
+
return "";
|
|
2619
|
+
}
|
|
2620
|
+
function extractTranscript(messages) {
|
|
2621
|
+
if (messages.length === 0)
|
|
2622
|
+
return "";
|
|
2623
|
+
const messagesToScan = messages.length <= MAX_MESSAGES_TO_SCAN ? messages : [
|
|
2624
|
+
...messages.slice(0, MAX_MESSAGES_TO_SCAN / 2),
|
|
2625
|
+
...messages.slice(-MAX_MESSAGES_TO_SCAN / 2)
|
|
2626
|
+
];
|
|
2627
|
+
const text = messagesToScan.map(extractMessageText).filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
2628
|
+
return text.length > MAX_TRANSCRIPT_CHARS ? text.slice(0, MAX_TRANSCRIPT_CHARS) + "\u2026" : text;
|
|
2629
|
+
}
|
|
2630
|
+
function logContainsQuery(log, queryLower) {
|
|
2631
|
+
const title = getLogDisplayTitle(log).toLowerCase();
|
|
2632
|
+
if (title.includes(queryLower))
|
|
2633
|
+
return true;
|
|
2634
|
+
if (log.customTitle?.toLowerCase().includes(queryLower))
|
|
2635
|
+
return true;
|
|
2636
|
+
if (log.tag?.toLowerCase().includes(queryLower))
|
|
2637
|
+
return true;
|
|
2638
|
+
if (log.gitBranch?.toLowerCase().includes(queryLower))
|
|
2639
|
+
return true;
|
|
2640
|
+
if (log.summary?.toLowerCase().includes(queryLower))
|
|
2641
|
+
return true;
|
|
2642
|
+
if (log.firstPrompt?.toLowerCase().includes(queryLower))
|
|
2643
|
+
return true;
|
|
2644
|
+
if (log.messages && log.messages.length > 0) {
|
|
2645
|
+
const transcript = extractTranscript(log.messages).toLowerCase();
|
|
2646
|
+
if (transcript.includes(queryLower))
|
|
2647
|
+
return true;
|
|
2648
|
+
}
|
|
2649
|
+
return false;
|
|
2650
|
+
}
|
|
2651
|
+
async function agenticSessionSearch(query, logs, signal) {
|
|
2652
|
+
if (!query.trim() || logs.length === 0) {
|
|
2653
|
+
return [];
|
|
2654
|
+
}
|
|
2655
|
+
const queryLower = query.toLowerCase();
|
|
2656
|
+
const matchingLogs = logs.filter((log) => logContainsQuery(log, queryLower));
|
|
2657
|
+
let logsToSearch;
|
|
2658
|
+
if (matchingLogs.length >= MAX_SESSIONS_TO_SEARCH) {
|
|
2659
|
+
logsToSearch = matchingLogs.slice(0, MAX_SESSIONS_TO_SEARCH);
|
|
2660
|
+
} else {
|
|
2661
|
+
const nonMatchingLogs = logs.filter((log) => !logContainsQuery(log, queryLower));
|
|
2662
|
+
const remainingSlots = MAX_SESSIONS_TO_SEARCH - matchingLogs.length;
|
|
2663
|
+
logsToSearch = [
|
|
2664
|
+
...matchingLogs,
|
|
2665
|
+
...nonMatchingLogs.slice(0, remainingSlots)
|
|
2666
|
+
];
|
|
2667
|
+
}
|
|
2668
|
+
logForDebugging(`Agentic search: ${logsToSearch.length}/${logs.length} logs, query="${query}", ` + `matching: ${matchingLogs.length}, with messages: ${count(logsToSearch, (l) => l.messages?.length > 0)}`);
|
|
2669
|
+
const logsWithTranscriptsPromises = logsToSearch.map(async (log) => {
|
|
2670
|
+
if (isLiteLog(log)) {
|
|
2671
|
+
try {
|
|
2672
|
+
return await loadFullLog(log);
|
|
2673
|
+
} catch (error) {
|
|
2674
|
+
logError(error);
|
|
2675
|
+
return log;
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
return log;
|
|
2679
|
+
});
|
|
2680
|
+
const logsWithTranscripts = await Promise.all(logsWithTranscriptsPromises);
|
|
2681
|
+
logForDebugging(`Agentic search: loaded ${count(logsWithTranscripts, (l) => l.messages?.length > 0)}/${logsToSearch.length} logs with transcripts`);
|
|
2682
|
+
const sessionList = logsWithTranscripts.map((log, index) => {
|
|
2683
|
+
const parts = [`${index}:`];
|
|
2684
|
+
const displayTitle = getLogDisplayTitle(log);
|
|
2685
|
+
parts.push(displayTitle);
|
|
2686
|
+
if (log.customTitle && log.customTitle !== displayTitle) {
|
|
2687
|
+
parts.push(`[custom title: ${log.customTitle}]`);
|
|
2688
|
+
}
|
|
2689
|
+
if (log.tag) {
|
|
2690
|
+
parts.push(`[tag: ${log.tag}]`);
|
|
2691
|
+
}
|
|
2692
|
+
if (log.gitBranch) {
|
|
2693
|
+
parts.push(`[branch: ${log.gitBranch}]`);
|
|
2694
|
+
}
|
|
2695
|
+
if (log.summary) {
|
|
2696
|
+
parts.push(`- Summary: ${log.summary}`);
|
|
2697
|
+
}
|
|
2698
|
+
if (log.firstPrompt && log.firstPrompt !== "No prompt") {
|
|
2699
|
+
parts.push(`- First message: ${log.firstPrompt.slice(0, 300)}`);
|
|
2700
|
+
}
|
|
2701
|
+
if (log.messages && log.messages.length > 0) {
|
|
2702
|
+
const transcript = extractTranscript(log.messages);
|
|
2703
|
+
if (transcript) {
|
|
2704
|
+
parts.push(`- Transcript: ${transcript}`);
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
return parts.join(" ");
|
|
2708
|
+
}).join(`
|
|
2709
|
+
`);
|
|
2710
|
+
const userMessage = `Sessions:
|
|
2711
|
+
${sessionList}
|
|
2712
|
+
|
|
2713
|
+
Search query: "${query}"
|
|
2714
|
+
|
|
2715
|
+
Find the sessions that are most relevant to this query.`;
|
|
2716
|
+
logForDebugging(`Agentic search prompt (first 500 chars): ${userMessage.slice(0, 500)}...`);
|
|
2717
|
+
try {
|
|
2718
|
+
const model = getSmallFastModel();
|
|
2719
|
+
logForDebugging(`Agentic search using model: ${model}`);
|
|
2720
|
+
const response = await sideQuery({
|
|
2721
|
+
model,
|
|
2722
|
+
system: SESSION_SEARCH_SYSTEM_PROMPT,
|
|
2723
|
+
messages: [{ role: "user", content: userMessage }],
|
|
2724
|
+
signal,
|
|
2725
|
+
querySource: "session_search"
|
|
2726
|
+
});
|
|
2727
|
+
const textContent = response.content.find((block) => block.type === "text");
|
|
2728
|
+
if (!textContent || textContent.type !== "text") {
|
|
2729
|
+
logForDebugging("No text content in agentic search response");
|
|
2730
|
+
return [];
|
|
2731
|
+
}
|
|
2732
|
+
logForDebugging(`Agentic search response: ${textContent.text}`);
|
|
2733
|
+
const jsonMatch = textContent.text.match(/\{[\s\S]*\}/);
|
|
2734
|
+
if (!jsonMatch) {
|
|
2735
|
+
logForDebugging("Could not find JSON in agentic search response");
|
|
2736
|
+
return [];
|
|
2737
|
+
}
|
|
2738
|
+
const result = jsonParse(jsonMatch[0]);
|
|
2739
|
+
const relevantIndices = result.relevant_indices || [];
|
|
2740
|
+
const relevantLogs = relevantIndices.filter((index) => index >= 0 && index < logsWithTranscripts.length).map((index) => logsWithTranscripts[index]);
|
|
2741
|
+
logForDebugging(`Agentic search found ${relevantLogs.length} relevant sessions`);
|
|
2742
|
+
return relevantLogs;
|
|
2743
|
+
} catch (error) {
|
|
2744
|
+
logError(error);
|
|
2745
|
+
logForDebugging(`Agentic search error: ${error}`);
|
|
2746
|
+
return [];
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
var MAX_TRANSCRIPT_CHARS = 2000, MAX_MESSAGES_TO_SCAN = 100, MAX_SESSIONS_TO_SEARCH = 100, SESSION_SEARCH_SYSTEM_PROMPT = `Your goal is to find relevant sessions based on a user's search query.
|
|
2750
|
+
|
|
2751
|
+
You will be given a list of sessions with their metadata and a search query. Identify which sessions are most relevant to the query.
|
|
2752
|
+
|
|
2753
|
+
Each session may include:
|
|
2754
|
+
- Title (display name or custom title)
|
|
2755
|
+
- Tag (user-assigned category, shown as [tag: name] - users tag sessions with /tag command to categorize them)
|
|
2756
|
+
- Branch (git branch name, shown as [branch: name])
|
|
2757
|
+
- Summary (AI-generated summary)
|
|
2758
|
+
- First message (beginning of the conversation)
|
|
2759
|
+
- Transcript (excerpt of conversation content)
|
|
2760
|
+
|
|
2761
|
+
IMPORTANT: Tags are user-assigned labels that indicate the session's topic or category. If the query matches a tag exactly or partially, those sessions should be highly prioritized.
|
|
2762
|
+
|
|
2763
|
+
For each session, consider (in order of priority):
|
|
2764
|
+
1. Exact tag matches (highest priority - user explicitly categorized this session)
|
|
2765
|
+
2. Partial tag matches or tag-related terms
|
|
2766
|
+
3. Title matches (custom titles or first message content)
|
|
2767
|
+
4. Branch name matches
|
|
2768
|
+
5. Summary and transcript content matches
|
|
2769
|
+
6. Semantic similarity and related concepts
|
|
2770
|
+
|
|
2771
|
+
CRITICAL: Be VERY inclusive in your matching. Include sessions that:
|
|
2772
|
+
- Contain the query term anywhere in any field
|
|
2773
|
+
- Are semantically related to the query (e.g., "testing" matches sessions about "tests", "unit tests", "QA", etc.)
|
|
2774
|
+
- Discuss topics that could be related to the query
|
|
2775
|
+
- Have transcripts that mention the concept even in passing
|
|
2776
|
+
|
|
2777
|
+
When in doubt, INCLUDE the session. It's better to return too many results than too few. The user can easily scan through results, but missing relevant sessions is frustrating.
|
|
2778
|
+
|
|
2779
|
+
Return sessions ordered by relevance (most relevant first). If truly no sessions have ANY connection to the query, return an empty array - but this should be rare.
|
|
2780
|
+
|
|
2781
|
+
Respond with ONLY the JSON object, no markdown formatting:
|
|
2782
|
+
{"relevant_indices": [2, 5, 0]}`;
|
|
2783
|
+
var init_agenticSessionSearch = __esm(() => {
|
|
2784
|
+
init_array();
|
|
2785
|
+
init_debug();
|
|
2786
|
+
init_log();
|
|
2787
|
+
init_model();
|
|
2788
|
+
init_sessionStorage();
|
|
2789
|
+
init_sideQuery();
|
|
2790
|
+
init_slowOperations();
|
|
2791
|
+
});
|
|
2792
|
+
|
|
2793
|
+
// src/utils/crossProjectResume.ts
|
|
2794
|
+
import { sep } from "path";
|
|
2795
|
+
function checkCrossProjectResume(log, showAllProjects, worktreePaths) {
|
|
2796
|
+
const currentCwd = getOriginalCwd();
|
|
2797
|
+
if (!showAllProjects || !log.projectPath || log.projectPath === currentCwd) {
|
|
2798
|
+
return { isCrossProject: false };
|
|
2799
|
+
}
|
|
2800
|
+
if (process.env.USER_TYPE !== "ant") {
|
|
2801
|
+
const sessionId2 = getSessionIdFromLog(log);
|
|
2802
|
+
const command2 = `cd ${quote([log.projectPath])} && claude --resume ${sessionId2}`;
|
|
2803
|
+
return {
|
|
2804
|
+
isCrossProject: true,
|
|
2805
|
+
isSameRepoWorktree: false,
|
|
2806
|
+
command: command2,
|
|
2807
|
+
projectPath: log.projectPath
|
|
2808
|
+
};
|
|
2809
|
+
}
|
|
2810
|
+
const isSameRepo = worktreePaths.some((wt) => log.projectPath === wt || log.projectPath.startsWith(wt + sep));
|
|
2811
|
+
if (isSameRepo) {
|
|
2812
|
+
return {
|
|
2813
|
+
isCrossProject: true,
|
|
2814
|
+
isSameRepoWorktree: true,
|
|
2815
|
+
projectPath: log.projectPath
|
|
2816
|
+
};
|
|
2817
|
+
}
|
|
2818
|
+
const sessionId = getSessionIdFromLog(log);
|
|
2819
|
+
const command = `cd ${quote([log.projectPath])} && claude --resume ${sessionId}`;
|
|
2820
|
+
return {
|
|
2821
|
+
isCrossProject: true,
|
|
2822
|
+
isSameRepoWorktree: false,
|
|
2823
|
+
command,
|
|
2824
|
+
projectPath: log.projectPath
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
var init_crossProjectResume = __esm(() => {
|
|
2828
|
+
init_state();
|
|
2829
|
+
init_shellQuote();
|
|
2830
|
+
init_sessionStorage();
|
|
2831
|
+
});
|
|
2832
|
+
|
|
2833
|
+
export { LogSelector, init_LogSelector, agenticSessionSearch, init_agenticSessionSearch, checkCrossProjectResume, init_crossProjectResume };
|