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,1551 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
PermissionDialog
|
|
4
|
+
} from "./chunk-xydyndkv.js";
|
|
5
|
+
import {
|
|
6
|
+
DesktopHandoff,
|
|
7
|
+
init_DesktopHandoff
|
|
8
|
+
} from "./chunk-2aa02aw6.js";
|
|
9
|
+
import {
|
|
10
|
+
init_OverageCreditUpsell,
|
|
11
|
+
shouldShowOverageCreditUpsell
|
|
12
|
+
} from "./chunk-ynednmqd.js";
|
|
13
|
+
import {
|
|
14
|
+
formatGrantAmount,
|
|
15
|
+
getCachedOverageCreditGrant,
|
|
16
|
+
init_overageCreditGrant
|
|
17
|
+
} from "./chunk-jmfr6h0n.js";
|
|
18
|
+
import {
|
|
19
|
+
OFFICIAL_MARKETPLACE_NAME,
|
|
20
|
+
Select,
|
|
21
|
+
countConcurrentSessions,
|
|
22
|
+
detectRunningIDEsCached,
|
|
23
|
+
fileHistoryEnabled,
|
|
24
|
+
getCurrentSessionAgentColor,
|
|
25
|
+
getEffortEnvOverride,
|
|
26
|
+
getShortcutDisplay,
|
|
27
|
+
getSortedIdeLockfiles,
|
|
28
|
+
init_concurrentSessions,
|
|
29
|
+
init_effort,
|
|
30
|
+
init_fileHistory,
|
|
31
|
+
init_ide,
|
|
32
|
+
init_installedPluginsManager,
|
|
33
|
+
init_marketplaceManager,
|
|
34
|
+
init_officialMarketplace,
|
|
35
|
+
init_prompt9 as init_prompt,
|
|
36
|
+
init_sample,
|
|
37
|
+
init_select,
|
|
38
|
+
init_sessionStorage,
|
|
39
|
+
init_shortcutFormat,
|
|
40
|
+
isCursorInstalled,
|
|
41
|
+
isCustomTitleEnabled,
|
|
42
|
+
isKairosCronEnabled,
|
|
43
|
+
isPluginInstalled,
|
|
44
|
+
isSupportedTerminal,
|
|
45
|
+
isSupportedVSCodeTerminal,
|
|
46
|
+
isVSCodeInstalled,
|
|
47
|
+
isWindsurfInstalled,
|
|
48
|
+
loadKnownMarketplacesConfigSafe,
|
|
49
|
+
modelSupportsEffort,
|
|
50
|
+
sample_default
|
|
51
|
+
} from "./chunk-ewsgsw9h.js";
|
|
52
|
+
import {
|
|
53
|
+
getTeamFilePath,
|
|
54
|
+
init_teamHelpers,
|
|
55
|
+
readTeamFile
|
|
56
|
+
} from "./chunk-x679thag.js";
|
|
57
|
+
import {
|
|
58
|
+
checkCachedPassesEligibility,
|
|
59
|
+
formatCreditAmount,
|
|
60
|
+
getCachedReferrerReward,
|
|
61
|
+
init_referral
|
|
62
|
+
} from "./chunk-7zsapntc.js";
|
|
63
|
+
import {
|
|
64
|
+
cacheKeys,
|
|
65
|
+
init_fileStateCache
|
|
66
|
+
} from "./chunk-9gbamk79.js";
|
|
67
|
+
import {
|
|
68
|
+
init_terminalSetup,
|
|
69
|
+
shouldOfferTerminalSetup
|
|
70
|
+
} from "./chunk-x0mwzt38.js";
|
|
71
|
+
import {
|
|
72
|
+
ThemedBox_default,
|
|
73
|
+
ThemedText,
|
|
74
|
+
color,
|
|
75
|
+
init_color,
|
|
76
|
+
init_ink,
|
|
77
|
+
require_compiler_runtime
|
|
78
|
+
} from "./chunk-s9mesaw0.js";
|
|
79
|
+
import {
|
|
80
|
+
require_jsx_dev_runtime,
|
|
81
|
+
require_react
|
|
82
|
+
} from "./chunk-g338npwr.js";
|
|
83
|
+
import {
|
|
84
|
+
init_api,
|
|
85
|
+
sendEventToRemoteSession
|
|
86
|
+
} from "./chunk-xe9cc860.js";
|
|
87
|
+
import {
|
|
88
|
+
getAPIProvider,
|
|
89
|
+
getCurrentProjectConfig,
|
|
90
|
+
getDynamicConfig_CACHED_MAY_BE_STALE,
|
|
91
|
+
getFeatureValue_CACHED_MAY_BE_STALE,
|
|
92
|
+
getGitEmail,
|
|
93
|
+
getGlobalConfig,
|
|
94
|
+
getInitialSettings,
|
|
95
|
+
getMainLoopModel,
|
|
96
|
+
getSettingsForSource,
|
|
97
|
+
getSettings_DEPRECATED,
|
|
98
|
+
getUserSpecifiedModelSetting,
|
|
99
|
+
init_auth,
|
|
100
|
+
init_config1 as init_config,
|
|
101
|
+
init_growthbook,
|
|
102
|
+
init_model,
|
|
103
|
+
init_providers,
|
|
104
|
+
init_settings1 as init_settings,
|
|
105
|
+
init_source,
|
|
106
|
+
init_user,
|
|
107
|
+
is1PApiCustomer,
|
|
108
|
+
saveCurrentProjectConfig,
|
|
109
|
+
saveGlobalConfig,
|
|
110
|
+
source_default
|
|
111
|
+
} from "./chunk-3f7rypmf.js";
|
|
112
|
+
import {
|
|
113
|
+
getDynamicTeamContext,
|
|
114
|
+
init_teammate
|
|
115
|
+
} from "./chunk-0e1xsncc.js";
|
|
116
|
+
import {
|
|
117
|
+
getPlatform,
|
|
118
|
+
init_platform
|
|
119
|
+
} from "./chunk-tjaqa99q.js";
|
|
120
|
+
import {
|
|
121
|
+
env,
|
|
122
|
+
init_env
|
|
123
|
+
} from "./chunk-w2z5pqd3.js";
|
|
124
|
+
import {
|
|
125
|
+
getOauthConfig,
|
|
126
|
+
init_oauth
|
|
127
|
+
} from "./chunk-7ymfj7m3.js";
|
|
128
|
+
import {
|
|
129
|
+
getWebSocketProxyAgent,
|
|
130
|
+
getWebSocketProxyUrl,
|
|
131
|
+
getWebSocketTLSOptions,
|
|
132
|
+
init_mtls,
|
|
133
|
+
init_proxy
|
|
134
|
+
} from "./chunk-1eapde8a.js";
|
|
135
|
+
import {
|
|
136
|
+
init_analytics,
|
|
137
|
+
logEvent
|
|
138
|
+
} from "./chunk-f2mhrmww.js";
|
|
139
|
+
import {
|
|
140
|
+
getIsGit,
|
|
141
|
+
getWorktreeCount,
|
|
142
|
+
gitExe,
|
|
143
|
+
init_git
|
|
144
|
+
} from "./chunk-hrzerbfw.js";
|
|
145
|
+
import {
|
|
146
|
+
execFileNoThrowWithCwd,
|
|
147
|
+
init_execFileNoThrow
|
|
148
|
+
} from "./chunk-hx2tr4ep.js";
|
|
149
|
+
import {
|
|
150
|
+
init_log,
|
|
151
|
+
logError
|
|
152
|
+
} from "./chunk-p7g7pf3f.js";
|
|
153
|
+
import {
|
|
154
|
+
getCwd,
|
|
155
|
+
init_cwd
|
|
156
|
+
} from "./chunk-8bedvdm1.js";
|
|
157
|
+
import {
|
|
158
|
+
errorMessage,
|
|
159
|
+
init_debug,
|
|
160
|
+
init_errors,
|
|
161
|
+
init_slowOperations,
|
|
162
|
+
jsonParse,
|
|
163
|
+
jsonStringify,
|
|
164
|
+
logForDebugging
|
|
165
|
+
} from "./chunk-nxsh6de2.js";
|
|
166
|
+
import {
|
|
167
|
+
init_memoize,
|
|
168
|
+
memoize_default
|
|
169
|
+
} from "./chunk-hqmz36b3.js";
|
|
170
|
+
import {
|
|
171
|
+
__require,
|
|
172
|
+
__toESM
|
|
173
|
+
} from "./chunk-qp2qdcda.js";
|
|
174
|
+
|
|
175
|
+
// src/utils/exampleCommands.ts
|
|
176
|
+
init_memoize();
|
|
177
|
+
init_sample();
|
|
178
|
+
init_cwd();
|
|
179
|
+
init_config();
|
|
180
|
+
init_env();
|
|
181
|
+
init_execFileNoThrow();
|
|
182
|
+
init_git();
|
|
183
|
+
init_log();
|
|
184
|
+
init_user();
|
|
185
|
+
var NON_CORE_PATTERNS = [
|
|
186
|
+
/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,
|
|
187
|
+
/\.generated\./,
|
|
188
|
+
/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,
|
|
189
|
+
/\.(?:min\.js|min\.css|map|pyc|pyo)$/,
|
|
190
|
+
/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,
|
|
191
|
+
/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,
|
|
192
|
+
/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,
|
|
193
|
+
/(?:^|\/)\.(?:github|vscode|idea|claude)\//,
|
|
194
|
+
/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i
|
|
195
|
+
];
|
|
196
|
+
function isCoreFile(path) {
|
|
197
|
+
return !NON_CORE_PATTERNS.some((p) => p.test(path));
|
|
198
|
+
}
|
|
199
|
+
function pickDiverseCoreFiles(sortedPaths, want) {
|
|
200
|
+
const picked = [];
|
|
201
|
+
const seenBasenames = new Set;
|
|
202
|
+
const dirTally = new Map;
|
|
203
|
+
for (let cap = 1;picked.length < want && cap <= want; cap++) {
|
|
204
|
+
for (const p of sortedPaths) {
|
|
205
|
+
if (picked.length >= want)
|
|
206
|
+
break;
|
|
207
|
+
if (!isCoreFile(p))
|
|
208
|
+
continue;
|
|
209
|
+
const lastSep = Math.max(p.lastIndexOf("/"), p.lastIndexOf("\\"));
|
|
210
|
+
const base = lastSep >= 0 ? p.slice(lastSep + 1) : p;
|
|
211
|
+
if (!base || seenBasenames.has(base))
|
|
212
|
+
continue;
|
|
213
|
+
const dir = lastSep >= 0 ? p.slice(0, lastSep) : ".";
|
|
214
|
+
if ((dirTally.get(dir) ?? 0) >= cap)
|
|
215
|
+
continue;
|
|
216
|
+
picked.push(base);
|
|
217
|
+
seenBasenames.add(base);
|
|
218
|
+
dirTally.set(dir, (dirTally.get(dir) ?? 0) + 1);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return picked.length >= want ? picked : [];
|
|
222
|
+
}
|
|
223
|
+
async function getFrequentlyModifiedFiles() {
|
|
224
|
+
if (false)
|
|
225
|
+
;
|
|
226
|
+
if (env.platform === "win32")
|
|
227
|
+
return [];
|
|
228
|
+
if (!await getIsGit())
|
|
229
|
+
return [];
|
|
230
|
+
try {
|
|
231
|
+
const userEmail = await getGitEmail();
|
|
232
|
+
const logArgs = [
|
|
233
|
+
"log",
|
|
234
|
+
"-n",
|
|
235
|
+
"1000",
|
|
236
|
+
"--pretty=format:",
|
|
237
|
+
"--name-only",
|
|
238
|
+
"--diff-filter=M"
|
|
239
|
+
];
|
|
240
|
+
const counts = new Map;
|
|
241
|
+
const tallyInto = (stdout) => {
|
|
242
|
+
for (const line of stdout.split(`
|
|
243
|
+
`)) {
|
|
244
|
+
const f = line.trim();
|
|
245
|
+
if (f)
|
|
246
|
+
counts.set(f, (counts.get(f) ?? 0) + 1);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
if (userEmail) {
|
|
250
|
+
const { stdout } = await execFileNoThrowWithCwd("git", [...logArgs, `--author=${userEmail}`], { cwd: getCwd() });
|
|
251
|
+
tallyInto(stdout);
|
|
252
|
+
}
|
|
253
|
+
if (counts.size < 10) {
|
|
254
|
+
const { stdout } = await execFileNoThrowWithCwd(gitExe(), logArgs, {
|
|
255
|
+
cwd: getCwd()
|
|
256
|
+
});
|
|
257
|
+
tallyInto(stdout);
|
|
258
|
+
}
|
|
259
|
+
const sorted = Array.from(counts.entries()).sort((a, b) => b[1] - a[1]).map(([p]) => p);
|
|
260
|
+
return pickDiverseCoreFiles(sorted, 5);
|
|
261
|
+
} catch (err) {
|
|
262
|
+
logError(err);
|
|
263
|
+
return [];
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
var ONE_WEEK_IN_MS = 7 * 24 * 60 * 60 * 1000;
|
|
267
|
+
var getExampleCommandFromCache = memoize_default(() => {
|
|
268
|
+
const projectConfig = getCurrentProjectConfig();
|
|
269
|
+
const frequentFile = projectConfig.exampleFiles?.length ? sample_default(projectConfig.exampleFiles) : "<filepath>";
|
|
270
|
+
const commands = [
|
|
271
|
+
"fix lint errors",
|
|
272
|
+
"fix typecheck errors",
|
|
273
|
+
`how does ${frequentFile} work?`,
|
|
274
|
+
`refactor ${frequentFile}`,
|
|
275
|
+
"how do I log an error?",
|
|
276
|
+
`edit ${frequentFile} to...`,
|
|
277
|
+
`write a test for ${frequentFile}`,
|
|
278
|
+
"create a util logging.py that..."
|
|
279
|
+
];
|
|
280
|
+
return `Try "${sample_default(commands)}"`;
|
|
281
|
+
});
|
|
282
|
+
var refreshExampleCommands = memoize_default(async () => {
|
|
283
|
+
const projectConfig = getCurrentProjectConfig();
|
|
284
|
+
const now = Date.now();
|
|
285
|
+
const lastGenerated = projectConfig.exampleFilesGeneratedAt ?? 0;
|
|
286
|
+
if (now - lastGenerated > ONE_WEEK_IN_MS) {
|
|
287
|
+
projectConfig.exampleFiles = [];
|
|
288
|
+
}
|
|
289
|
+
if (!projectConfig.exampleFiles?.length) {
|
|
290
|
+
getFrequentlyModifiedFiles().then((files) => {
|
|
291
|
+
if (files.length) {
|
|
292
|
+
saveCurrentProjectConfig((current) => ({
|
|
293
|
+
...current,
|
|
294
|
+
exampleFiles: files,
|
|
295
|
+
exampleFilesGeneratedAt: Date.now()
|
|
296
|
+
}));
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
// src/remote/RemoteSessionManager.ts
|
|
303
|
+
init_debug();
|
|
304
|
+
init_log();
|
|
305
|
+
init_api();
|
|
306
|
+
|
|
307
|
+
// src/remote/SessionsWebSocket.ts
|
|
308
|
+
init_oauth();
|
|
309
|
+
init_debug();
|
|
310
|
+
init_errors();
|
|
311
|
+
init_log();
|
|
312
|
+
init_mtls();
|
|
313
|
+
init_proxy();
|
|
314
|
+
init_slowOperations();
|
|
315
|
+
import { randomUUID } from "crypto";
|
|
316
|
+
var RECONNECT_DELAY_MS = 2000;
|
|
317
|
+
var MAX_RECONNECT_ATTEMPTS = 5;
|
|
318
|
+
var PING_INTERVAL_MS = 30000;
|
|
319
|
+
var MAX_SESSION_NOT_FOUND_RETRIES = 3;
|
|
320
|
+
var PERMANENT_CLOSE_CODES = new Set([
|
|
321
|
+
4003
|
|
322
|
+
]);
|
|
323
|
+
function isSessionsMessage(value) {
|
|
324
|
+
if (typeof value !== "object" || value === null || !("type" in value)) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
return typeof value.type === "string";
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
class SessionsWebSocket {
|
|
331
|
+
sessionId;
|
|
332
|
+
orgUuid;
|
|
333
|
+
getAccessToken;
|
|
334
|
+
callbacks;
|
|
335
|
+
ws = null;
|
|
336
|
+
state = "closed";
|
|
337
|
+
reconnectAttempts = 0;
|
|
338
|
+
sessionNotFoundRetries = 0;
|
|
339
|
+
pingInterval = null;
|
|
340
|
+
reconnectTimer = null;
|
|
341
|
+
constructor(sessionId, orgUuid, getAccessToken, callbacks) {
|
|
342
|
+
this.sessionId = sessionId;
|
|
343
|
+
this.orgUuid = orgUuid;
|
|
344
|
+
this.getAccessToken = getAccessToken;
|
|
345
|
+
this.callbacks = callbacks;
|
|
346
|
+
}
|
|
347
|
+
async connect() {
|
|
348
|
+
if (this.state === "connecting") {
|
|
349
|
+
logForDebugging("[SessionsWebSocket] Already connecting");
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
this.state = "connecting";
|
|
353
|
+
const baseUrl = getOauthConfig().BASE_API_URL.replace("https://", "wss://");
|
|
354
|
+
const url = `${baseUrl}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;
|
|
355
|
+
logForDebugging(`[SessionsWebSocket] Connecting to ${url}`);
|
|
356
|
+
const accessToken = this.getAccessToken();
|
|
357
|
+
const headers = {
|
|
358
|
+
Authorization: `Bearer ${accessToken}`,
|
|
359
|
+
"anthropic-version": "2023-06-01"
|
|
360
|
+
};
|
|
361
|
+
if (typeof Bun !== "undefined") {
|
|
362
|
+
const ws = new globalThis.WebSocket(url, {
|
|
363
|
+
headers,
|
|
364
|
+
proxy: getWebSocketProxyUrl(url),
|
|
365
|
+
tls: getWebSocketTLSOptions() || undefined
|
|
366
|
+
});
|
|
367
|
+
this.ws = ws;
|
|
368
|
+
ws.addEventListener("open", () => {
|
|
369
|
+
logForDebugging("[SessionsWebSocket] Connection opened, authenticated via headers");
|
|
370
|
+
this.state = "connected";
|
|
371
|
+
this.reconnectAttempts = 0;
|
|
372
|
+
this.sessionNotFoundRetries = 0;
|
|
373
|
+
this.startPingInterval();
|
|
374
|
+
this.callbacks.onConnected?.();
|
|
375
|
+
});
|
|
376
|
+
ws.addEventListener("message", (event) => {
|
|
377
|
+
const data = typeof event.data === "string" ? event.data : String(event.data);
|
|
378
|
+
this.handleMessage(data);
|
|
379
|
+
});
|
|
380
|
+
ws.addEventListener("error", () => {
|
|
381
|
+
const err = new Error("[SessionsWebSocket] WebSocket error");
|
|
382
|
+
logError(err);
|
|
383
|
+
this.callbacks.onError?.(err);
|
|
384
|
+
});
|
|
385
|
+
ws.addEventListener("close", (event) => {
|
|
386
|
+
logForDebugging(`[SessionsWebSocket] Closed: code=${event.code} reason=${event.reason}`);
|
|
387
|
+
this.handleClose(event.code);
|
|
388
|
+
});
|
|
389
|
+
ws.addEventListener("pong", () => {
|
|
390
|
+
logForDebugging("[SessionsWebSocket] Pong received");
|
|
391
|
+
});
|
|
392
|
+
} else {
|
|
393
|
+
const { default: WS } = await import("ws");
|
|
394
|
+
const ws = new WS(url, {
|
|
395
|
+
headers,
|
|
396
|
+
agent: getWebSocketProxyAgent(url),
|
|
397
|
+
...getWebSocketTLSOptions()
|
|
398
|
+
});
|
|
399
|
+
this.ws = ws;
|
|
400
|
+
ws.on("open", () => {
|
|
401
|
+
logForDebugging("[SessionsWebSocket] Connection opened, authenticated via headers");
|
|
402
|
+
this.state = "connected";
|
|
403
|
+
this.reconnectAttempts = 0;
|
|
404
|
+
this.sessionNotFoundRetries = 0;
|
|
405
|
+
this.startPingInterval();
|
|
406
|
+
this.callbacks.onConnected?.();
|
|
407
|
+
});
|
|
408
|
+
ws.on("message", (data) => {
|
|
409
|
+
this.handleMessage(data.toString());
|
|
410
|
+
});
|
|
411
|
+
ws.on("error", (err) => {
|
|
412
|
+
logError(new Error(`[SessionsWebSocket] Error: ${err.message}`));
|
|
413
|
+
this.callbacks.onError?.(err);
|
|
414
|
+
});
|
|
415
|
+
ws.on("close", (code, reason) => {
|
|
416
|
+
logForDebugging(`[SessionsWebSocket] Closed: code=${code} reason=${reason.toString()}`);
|
|
417
|
+
this.handleClose(code);
|
|
418
|
+
});
|
|
419
|
+
ws.on("pong", () => {
|
|
420
|
+
logForDebugging("[SessionsWebSocket] Pong received");
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
handleMessage(data) {
|
|
425
|
+
try {
|
|
426
|
+
const message = jsonParse(data);
|
|
427
|
+
if (isSessionsMessage(message)) {
|
|
428
|
+
this.callbacks.onMessage(message);
|
|
429
|
+
} else {
|
|
430
|
+
logForDebugging(`[SessionsWebSocket] Ignoring message type: ${typeof message === "object" && message !== null && "type" in message ? String(message.type) : "unknown"}`);
|
|
431
|
+
}
|
|
432
|
+
} catch (error) {
|
|
433
|
+
logError(new Error(`[SessionsWebSocket] Failed to parse message: ${errorMessage(error)}`));
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
handleClose(closeCode) {
|
|
437
|
+
this.stopPingInterval();
|
|
438
|
+
if (this.state === "closed") {
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
this.ws = null;
|
|
442
|
+
const previousState = this.state;
|
|
443
|
+
this.state = "closed";
|
|
444
|
+
if (PERMANENT_CLOSE_CODES.has(closeCode)) {
|
|
445
|
+
logForDebugging(`[SessionsWebSocket] Permanent close code ${closeCode}, not reconnecting`);
|
|
446
|
+
this.callbacks.onClose?.();
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
if (closeCode === 4001) {
|
|
450
|
+
this.sessionNotFoundRetries++;
|
|
451
|
+
if (this.sessionNotFoundRetries > MAX_SESSION_NOT_FOUND_RETRIES) {
|
|
452
|
+
logForDebugging(`[SessionsWebSocket] 4001 retry budget exhausted (${MAX_SESSION_NOT_FOUND_RETRIES}), not reconnecting`);
|
|
453
|
+
this.callbacks.onClose?.();
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
this.scheduleReconnect(RECONNECT_DELAY_MS * this.sessionNotFoundRetries, `4001 attempt ${this.sessionNotFoundRetries}/${MAX_SESSION_NOT_FOUND_RETRIES}`);
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
if (previousState === "connected" && this.reconnectAttempts < MAX_RECONNECT_ATTEMPTS) {
|
|
460
|
+
this.reconnectAttempts++;
|
|
461
|
+
this.scheduleReconnect(RECONNECT_DELAY_MS, `attempt ${this.reconnectAttempts}/${MAX_RECONNECT_ATTEMPTS}`);
|
|
462
|
+
} else {
|
|
463
|
+
logForDebugging("[SessionsWebSocket] Not reconnecting");
|
|
464
|
+
this.callbacks.onClose?.();
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
scheduleReconnect(delay, label) {
|
|
468
|
+
this.callbacks.onReconnecting?.();
|
|
469
|
+
logForDebugging(`[SessionsWebSocket] Scheduling reconnect (${label}) in ${delay}ms`);
|
|
470
|
+
this.reconnectTimer = setTimeout(() => {
|
|
471
|
+
this.reconnectTimer = null;
|
|
472
|
+
this.connect();
|
|
473
|
+
}, delay);
|
|
474
|
+
}
|
|
475
|
+
startPingInterval() {
|
|
476
|
+
this.stopPingInterval();
|
|
477
|
+
this.pingInterval = setInterval(() => {
|
|
478
|
+
if (this.ws && this.state === "connected") {
|
|
479
|
+
try {
|
|
480
|
+
this.ws.ping?.();
|
|
481
|
+
} catch {}
|
|
482
|
+
}
|
|
483
|
+
}, PING_INTERVAL_MS);
|
|
484
|
+
}
|
|
485
|
+
stopPingInterval() {
|
|
486
|
+
if (this.pingInterval) {
|
|
487
|
+
clearInterval(this.pingInterval);
|
|
488
|
+
this.pingInterval = null;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
sendControlResponse(response) {
|
|
492
|
+
if (!this.ws || this.state !== "connected") {
|
|
493
|
+
logError(new Error("[SessionsWebSocket] Cannot send: not connected"));
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
logForDebugging("[SessionsWebSocket] Sending control response");
|
|
497
|
+
this.ws.send(jsonStringify(response));
|
|
498
|
+
}
|
|
499
|
+
sendControlRequest(request) {
|
|
500
|
+
if (!this.ws || this.state !== "connected") {
|
|
501
|
+
logError(new Error("[SessionsWebSocket] Cannot send: not connected"));
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
const controlRequest = {
|
|
505
|
+
type: "control_request",
|
|
506
|
+
request_id: randomUUID(),
|
|
507
|
+
request
|
|
508
|
+
};
|
|
509
|
+
logForDebugging(`[SessionsWebSocket] Sending control request: ${request.subtype}`);
|
|
510
|
+
this.ws.send(jsonStringify(controlRequest));
|
|
511
|
+
}
|
|
512
|
+
isConnected() {
|
|
513
|
+
return this.state === "connected";
|
|
514
|
+
}
|
|
515
|
+
close() {
|
|
516
|
+
logForDebugging("[SessionsWebSocket] Closing connection");
|
|
517
|
+
this.state = "closed";
|
|
518
|
+
this.stopPingInterval();
|
|
519
|
+
if (this.reconnectTimer) {
|
|
520
|
+
clearTimeout(this.reconnectTimer);
|
|
521
|
+
this.reconnectTimer = null;
|
|
522
|
+
}
|
|
523
|
+
if (this.ws) {
|
|
524
|
+
this.ws.close();
|
|
525
|
+
this.ws = null;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
reconnect() {
|
|
529
|
+
logForDebugging("[SessionsWebSocket] Force reconnecting");
|
|
530
|
+
this.reconnectAttempts = 0;
|
|
531
|
+
this.sessionNotFoundRetries = 0;
|
|
532
|
+
this.close();
|
|
533
|
+
this.reconnectTimer = setTimeout(() => {
|
|
534
|
+
this.reconnectTimer = null;
|
|
535
|
+
this.connect();
|
|
536
|
+
}, 500);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// src/remote/RemoteSessionManager.ts
|
|
541
|
+
function isSDKMessage(message) {
|
|
542
|
+
return message.type !== "control_request" && message.type !== "control_response" && message.type !== "control_cancel_request";
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
class RemoteSessionManager {
|
|
546
|
+
config;
|
|
547
|
+
callbacks;
|
|
548
|
+
websocket = null;
|
|
549
|
+
pendingPermissionRequests = new Map;
|
|
550
|
+
constructor(config, callbacks) {
|
|
551
|
+
this.config = config;
|
|
552
|
+
this.callbacks = callbacks;
|
|
553
|
+
}
|
|
554
|
+
connect() {
|
|
555
|
+
logForDebugging(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);
|
|
556
|
+
const wsCallbacks = {
|
|
557
|
+
onMessage: (message) => this.handleMessage(message),
|
|
558
|
+
onConnected: () => {
|
|
559
|
+
logForDebugging("[RemoteSessionManager] Connected");
|
|
560
|
+
this.callbacks.onConnected?.();
|
|
561
|
+
},
|
|
562
|
+
onClose: () => {
|
|
563
|
+
logForDebugging("[RemoteSessionManager] Disconnected");
|
|
564
|
+
this.callbacks.onDisconnected?.();
|
|
565
|
+
},
|
|
566
|
+
onReconnecting: () => {
|
|
567
|
+
logForDebugging("[RemoteSessionManager] Reconnecting");
|
|
568
|
+
this.callbacks.onReconnecting?.();
|
|
569
|
+
},
|
|
570
|
+
onError: (error) => {
|
|
571
|
+
logError(error);
|
|
572
|
+
this.callbacks.onError?.(error);
|
|
573
|
+
}
|
|
574
|
+
};
|
|
575
|
+
this.websocket = new SessionsWebSocket(this.config.sessionId, this.config.orgUuid, this.config.getAccessToken, wsCallbacks);
|
|
576
|
+
this.websocket.connect();
|
|
577
|
+
}
|
|
578
|
+
handleMessage(message) {
|
|
579
|
+
if (message.type === "control_request") {
|
|
580
|
+
this.handleControlRequest(message);
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
if (message.type === "control_cancel_request") {
|
|
584
|
+
const { request_id } = message;
|
|
585
|
+
const pendingRequest = this.pendingPermissionRequests.get(request_id);
|
|
586
|
+
logForDebugging(`[RemoteSessionManager] Permission request cancelled: ${request_id}`);
|
|
587
|
+
this.pendingPermissionRequests.delete(request_id);
|
|
588
|
+
this.callbacks.onPermissionCancelled?.(request_id, pendingRequest?.tool_use_id);
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
if (message.type === "control_response") {
|
|
592
|
+
logForDebugging("[RemoteSessionManager] Received control response");
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
if (isSDKMessage(message)) {
|
|
596
|
+
this.callbacks.onMessage(message);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
handleControlRequest(request) {
|
|
600
|
+
const requestId = request.request_id;
|
|
601
|
+
const inner = request.request;
|
|
602
|
+
if (inner.subtype === "can_use_tool") {
|
|
603
|
+
logForDebugging(`[RemoteSessionManager] Permission request for tool: ${inner.tool_name}`);
|
|
604
|
+
this.pendingPermissionRequests.set(requestId, inner);
|
|
605
|
+
this.callbacks.onPermissionRequest(inner, requestId);
|
|
606
|
+
} else {
|
|
607
|
+
logForDebugging(`[RemoteSessionManager] Unsupported control request subtype: ${inner.subtype}`);
|
|
608
|
+
const response = {
|
|
609
|
+
type: "control_response",
|
|
610
|
+
response: {
|
|
611
|
+
subtype: "error",
|
|
612
|
+
request_id: requestId,
|
|
613
|
+
error: `Unsupported control request subtype: ${inner.subtype}`
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
this.websocket?.sendControlResponse(response);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
async sendMessage(content, opts) {
|
|
620
|
+
logForDebugging(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);
|
|
621
|
+
const success = await sendEventToRemoteSession(this.config.sessionId, content, opts);
|
|
622
|
+
if (!success) {
|
|
623
|
+
logError(new Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`));
|
|
624
|
+
}
|
|
625
|
+
return success;
|
|
626
|
+
}
|
|
627
|
+
respondToPermissionRequest(requestId, result) {
|
|
628
|
+
const pendingRequest = this.pendingPermissionRequests.get(requestId);
|
|
629
|
+
if (!pendingRequest) {
|
|
630
|
+
logError(new Error(`[RemoteSessionManager] No pending permission request with ID: ${requestId}`));
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
this.pendingPermissionRequests.delete(requestId);
|
|
634
|
+
const response = {
|
|
635
|
+
type: "control_response",
|
|
636
|
+
response: {
|
|
637
|
+
subtype: "success",
|
|
638
|
+
request_id: requestId,
|
|
639
|
+
response: {
|
|
640
|
+
behavior: result.behavior,
|
|
641
|
+
...result.behavior === "allow" ? { updatedInput: result.updatedInput } : { message: result.message }
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
logForDebugging(`[RemoteSessionManager] Sending permission response: ${result.behavior}`);
|
|
646
|
+
this.websocket?.sendControlResponse(response);
|
|
647
|
+
}
|
|
648
|
+
isConnected() {
|
|
649
|
+
return this.websocket?.isConnected() ?? false;
|
|
650
|
+
}
|
|
651
|
+
cancelSession() {
|
|
652
|
+
logForDebugging("[RemoteSessionManager] Sending interrupt signal");
|
|
653
|
+
this.websocket?.sendControlRequest({ subtype: "interrupt" });
|
|
654
|
+
}
|
|
655
|
+
getSessionId() {
|
|
656
|
+
return this.config.sessionId;
|
|
657
|
+
}
|
|
658
|
+
disconnect() {
|
|
659
|
+
logForDebugging("[RemoteSessionManager] Disconnecting");
|
|
660
|
+
this.websocket?.close();
|
|
661
|
+
this.websocket = null;
|
|
662
|
+
this.pendingPermissionRequests.clear();
|
|
663
|
+
}
|
|
664
|
+
reconnect() {
|
|
665
|
+
logForDebugging("[RemoteSessionManager] Reconnecting WebSocket");
|
|
666
|
+
this.websocket?.reconnect();
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
function createRemoteSessionConfig(sessionId, getAccessToken, orgUuid, hasInitialPrompt = false, viewerOnly = false) {
|
|
670
|
+
return {
|
|
671
|
+
sessionId,
|
|
672
|
+
getAccessToken,
|
|
673
|
+
orgUuid,
|
|
674
|
+
hasInitialPrompt,
|
|
675
|
+
viewerOnly
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// src/utils/swarm/reconnection.ts
|
|
680
|
+
init_debug();
|
|
681
|
+
init_log();
|
|
682
|
+
init_teammate();
|
|
683
|
+
init_teamHelpers();
|
|
684
|
+
function computeInitialTeamContext() {
|
|
685
|
+
const context = getDynamicTeamContext();
|
|
686
|
+
if (!context?.teamName || !context?.agentName) {
|
|
687
|
+
logForDebugging("[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)");
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
const { teamName, agentId, agentName } = context;
|
|
691
|
+
const teamFile = readTeamFile(teamName);
|
|
692
|
+
if (!teamFile) {
|
|
693
|
+
logError(new Error(`[computeInitialTeamContext] Could not read team file for ${teamName}`));
|
|
694
|
+
return;
|
|
695
|
+
}
|
|
696
|
+
const teamFilePath = getTeamFilePath(teamName);
|
|
697
|
+
const isLeader = !agentId;
|
|
698
|
+
logForDebugging(`[Reconnection] Computed initial team context for ${isLeader ? "leader" : `teammate ${agentName}`} in team ${teamName}`);
|
|
699
|
+
return {
|
|
700
|
+
teamName,
|
|
701
|
+
teamFilePath,
|
|
702
|
+
leadAgentId: teamFile.leadAgentId,
|
|
703
|
+
selfAgentId: agentId,
|
|
704
|
+
selfAgentName: agentName,
|
|
705
|
+
isLeader,
|
|
706
|
+
teammates: {}
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
function initializeTeammateContextFromSession(setAppState, teamName, agentName) {
|
|
710
|
+
const teamFile = readTeamFile(teamName);
|
|
711
|
+
if (!teamFile) {
|
|
712
|
+
logError(new Error(`[initializeTeammateContextFromSession] Could not read team file for ${teamName} (agent: ${agentName})`));
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
const member = teamFile.members.find((m) => m.name === agentName);
|
|
716
|
+
if (!member) {
|
|
717
|
+
logForDebugging(`[Reconnection] Member ${agentName} not found in team ${teamName} - may have been removed`);
|
|
718
|
+
}
|
|
719
|
+
const agentId = member?.agentId;
|
|
720
|
+
const teamFilePath = getTeamFilePath(teamName);
|
|
721
|
+
setAppState((prev) => ({
|
|
722
|
+
...prev,
|
|
723
|
+
teamContext: {
|
|
724
|
+
teamName,
|
|
725
|
+
teamFilePath,
|
|
726
|
+
leadAgentId: teamFile.leadAgentId,
|
|
727
|
+
selfAgentId: agentId,
|
|
728
|
+
selfAgentName: agentName,
|
|
729
|
+
isLeader: false,
|
|
730
|
+
teammates: {}
|
|
731
|
+
}
|
|
732
|
+
}));
|
|
733
|
+
logForDebugging(`[Reconnection] Initialized agent context from session for ${agentName} in team ${teamName}`);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
// src/components/DesktopUpsell/DesktopUpsellStartup.tsx
|
|
737
|
+
init_ink();
|
|
738
|
+
init_growthbook();
|
|
739
|
+
init_analytics();
|
|
740
|
+
init_config();
|
|
741
|
+
init_select();
|
|
742
|
+
init_DesktopHandoff();
|
|
743
|
+
var import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
|
|
744
|
+
var import_react = __toESM(require_react(), 1);
|
|
745
|
+
var jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
746
|
+
var DESKTOP_UPSELL_DEFAULT = {
|
|
747
|
+
enable_shortcut_tip: false,
|
|
748
|
+
enable_startup_dialog: false
|
|
749
|
+
};
|
|
750
|
+
function getDesktopUpsellConfig() {
|
|
751
|
+
return getDynamicConfig_CACHED_MAY_BE_STALE("tengu_desktop_upsell", DESKTOP_UPSELL_DEFAULT);
|
|
752
|
+
}
|
|
753
|
+
function isSupportedPlatform() {
|
|
754
|
+
return process.platform === "darwin" || process.platform === "win32" && process.arch === "x64";
|
|
755
|
+
}
|
|
756
|
+
function shouldShowDesktopUpsellStartup() {
|
|
757
|
+
if (!isSupportedPlatform())
|
|
758
|
+
return false;
|
|
759
|
+
if (!getDesktopUpsellConfig().enable_startup_dialog)
|
|
760
|
+
return false;
|
|
761
|
+
const config = getGlobalConfig();
|
|
762
|
+
if (config.desktopUpsellDismissed)
|
|
763
|
+
return false;
|
|
764
|
+
if ((config.desktopUpsellSeenCount ?? 0) >= 3)
|
|
765
|
+
return false;
|
|
766
|
+
return true;
|
|
767
|
+
}
|
|
768
|
+
function DesktopUpsellStartup(t0) {
|
|
769
|
+
const $ = import_compiler_runtime.c(14);
|
|
770
|
+
const {
|
|
771
|
+
onDone
|
|
772
|
+
} = t0;
|
|
773
|
+
const [showHandoff, setShowHandoff] = import_react.useState(false);
|
|
774
|
+
let t1;
|
|
775
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
776
|
+
t1 = [];
|
|
777
|
+
$[0] = t1;
|
|
778
|
+
} else {
|
|
779
|
+
t1 = $[0];
|
|
780
|
+
}
|
|
781
|
+
import_react.useEffect(_temp, t1);
|
|
782
|
+
if (showHandoff) {
|
|
783
|
+
let t22;
|
|
784
|
+
if ($[1] !== onDone) {
|
|
785
|
+
t22 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(DesktopHandoff, {
|
|
786
|
+
onDone: () => onDone()
|
|
787
|
+
}, undefined, false, undefined, this);
|
|
788
|
+
$[1] = onDone;
|
|
789
|
+
$[2] = t22;
|
|
790
|
+
} else {
|
|
791
|
+
t22 = $[2];
|
|
792
|
+
}
|
|
793
|
+
return t22;
|
|
794
|
+
}
|
|
795
|
+
let t2;
|
|
796
|
+
if ($[3] !== onDone) {
|
|
797
|
+
t2 = function handleSelect2(value) {
|
|
798
|
+
switch (value) {
|
|
799
|
+
case "try": {
|
|
800
|
+
setShowHandoff(true);
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
case "never": {
|
|
804
|
+
saveGlobalConfig(_temp2);
|
|
805
|
+
onDone();
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
case "not-now": {
|
|
809
|
+
onDone();
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
$[3] = onDone;
|
|
815
|
+
$[4] = t2;
|
|
816
|
+
} else {
|
|
817
|
+
t2 = $[4];
|
|
818
|
+
}
|
|
819
|
+
const handleSelect = t2;
|
|
820
|
+
let t3;
|
|
821
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
822
|
+
t3 = {
|
|
823
|
+
label: "Open in \u5609\u9675\u6C5F-code Desktop",
|
|
824
|
+
value: "try"
|
|
825
|
+
};
|
|
826
|
+
$[5] = t3;
|
|
827
|
+
} else {
|
|
828
|
+
t3 = $[5];
|
|
829
|
+
}
|
|
830
|
+
let t4;
|
|
831
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
832
|
+
t4 = {
|
|
833
|
+
label: "Not now",
|
|
834
|
+
value: "not-now"
|
|
835
|
+
};
|
|
836
|
+
$[6] = t4;
|
|
837
|
+
} else {
|
|
838
|
+
t4 = $[6];
|
|
839
|
+
}
|
|
840
|
+
let t5;
|
|
841
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
842
|
+
t5 = [t3, t4, {
|
|
843
|
+
label: "Don't ask again",
|
|
844
|
+
value: "never"
|
|
845
|
+
}];
|
|
846
|
+
$[7] = t5;
|
|
847
|
+
} else {
|
|
848
|
+
t5 = $[7];
|
|
849
|
+
}
|
|
850
|
+
const options = t5;
|
|
851
|
+
let t6;
|
|
852
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
853
|
+
t6 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
854
|
+
marginBottom: 1,
|
|
855
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
856
|
+
children: "Same \u5609\u9675\u6C5F-code with visual diffs, live app preview, parallel sessions, and more."
|
|
857
|
+
}, undefined, false, undefined, this)
|
|
858
|
+
}, undefined, false, undefined, this);
|
|
859
|
+
$[8] = t6;
|
|
860
|
+
} else {
|
|
861
|
+
t6 = $[8];
|
|
862
|
+
}
|
|
863
|
+
let t7;
|
|
864
|
+
if ($[9] !== handleSelect) {
|
|
865
|
+
t7 = () => handleSelect("not-now");
|
|
866
|
+
$[9] = handleSelect;
|
|
867
|
+
$[10] = t7;
|
|
868
|
+
} else {
|
|
869
|
+
t7 = $[10];
|
|
870
|
+
}
|
|
871
|
+
let t8;
|
|
872
|
+
if ($[11] !== handleSelect || $[12] !== t7) {
|
|
873
|
+
t8 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(PermissionDialog, {
|
|
874
|
+
title: "Try Claude Code Desktop",
|
|
875
|
+
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
876
|
+
flexDirection: "column",
|
|
877
|
+
paddingX: 2,
|
|
878
|
+
paddingY: 1,
|
|
879
|
+
children: [
|
|
880
|
+
t6,
|
|
881
|
+
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
|
|
882
|
+
options,
|
|
883
|
+
onChange: handleSelect,
|
|
884
|
+
onCancel: t7
|
|
885
|
+
}, undefined, false, undefined, this)
|
|
886
|
+
]
|
|
887
|
+
}, undefined, true, undefined, this)
|
|
888
|
+
}, undefined, false, undefined, this);
|
|
889
|
+
$[11] = handleSelect;
|
|
890
|
+
$[12] = t7;
|
|
891
|
+
$[13] = t8;
|
|
892
|
+
} else {
|
|
893
|
+
t8 = $[13];
|
|
894
|
+
}
|
|
895
|
+
return t8;
|
|
896
|
+
}
|
|
897
|
+
function _temp2(prev_0) {
|
|
898
|
+
if (prev_0.desktopUpsellDismissed) {
|
|
899
|
+
return prev_0;
|
|
900
|
+
}
|
|
901
|
+
return {
|
|
902
|
+
...prev_0,
|
|
903
|
+
desktopUpsellDismissed: true
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
function _temp() {
|
|
907
|
+
const newCount = (getGlobalConfig().desktopUpsellSeenCount ?? 0) + 1;
|
|
908
|
+
saveGlobalConfig((prev) => {
|
|
909
|
+
if ((prev.desktopUpsellSeenCount ?? 0) >= newCount) {
|
|
910
|
+
return prev;
|
|
911
|
+
}
|
|
912
|
+
return {
|
|
913
|
+
...prev,
|
|
914
|
+
desktopUpsellSeenCount: newCount
|
|
915
|
+
};
|
|
916
|
+
});
|
|
917
|
+
logEvent("tengu_desktop_upsell_shown", {
|
|
918
|
+
seen_count: newCount
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
// src/services/tips/tipRegistry.ts
|
|
923
|
+
init_source();
|
|
924
|
+
init_debug();
|
|
925
|
+
init_fileHistory();
|
|
926
|
+
init_settings();
|
|
927
|
+
init_terminalSetup();
|
|
928
|
+
init_color();
|
|
929
|
+
init_OverageCreditUpsell();
|
|
930
|
+
init_shortcutFormat();
|
|
931
|
+
init_prompt();
|
|
932
|
+
init_auth();
|
|
933
|
+
init_concurrentSessions();
|
|
934
|
+
init_config();
|
|
935
|
+
init_effort();
|
|
936
|
+
init_env();
|
|
937
|
+
init_fileStateCache();
|
|
938
|
+
init_git();
|
|
939
|
+
init_ide();
|
|
940
|
+
init_model();
|
|
941
|
+
init_platform();
|
|
942
|
+
init_installedPluginsManager();
|
|
943
|
+
init_marketplaceManager();
|
|
944
|
+
init_officialMarketplace();
|
|
945
|
+
init_sessionStorage();
|
|
946
|
+
init_growthbook();
|
|
947
|
+
init_overageCreditGrant();
|
|
948
|
+
init_referral();
|
|
949
|
+
|
|
950
|
+
// src/services/tips/tipHistory.ts
|
|
951
|
+
init_config();
|
|
952
|
+
function recordTipShown(tipId) {
|
|
953
|
+
const numStartups = getGlobalConfig().numStartups;
|
|
954
|
+
saveGlobalConfig((c) => {
|
|
955
|
+
const history = c.tipsHistory ?? {};
|
|
956
|
+
if (history[tipId] === numStartups)
|
|
957
|
+
return c;
|
|
958
|
+
return { ...c, tipsHistory: { ...history, [tipId]: numStartups } };
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
function getSessionsSinceLastShown(tipId) {
|
|
962
|
+
const config = getGlobalConfig();
|
|
963
|
+
const lastShown = config.tipsHistory?.[tipId];
|
|
964
|
+
if (!lastShown)
|
|
965
|
+
return Infinity;
|
|
966
|
+
return config.numStartups - lastShown;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
// src/services/tips/tipRegistry.ts
|
|
970
|
+
var _isOfficialMarketplaceInstalledCache;
|
|
971
|
+
async function isOfficialMarketplaceInstalled() {
|
|
972
|
+
if (_isOfficialMarketplaceInstalledCache !== undefined) {
|
|
973
|
+
return _isOfficialMarketplaceInstalledCache;
|
|
974
|
+
}
|
|
975
|
+
const config = await loadKnownMarketplacesConfigSafe();
|
|
976
|
+
_isOfficialMarketplaceInstalledCache = OFFICIAL_MARKETPLACE_NAME in config;
|
|
977
|
+
return _isOfficialMarketplaceInstalledCache;
|
|
978
|
+
}
|
|
979
|
+
async function isMarketplacePluginRelevant(pluginName, context, signals) {
|
|
980
|
+
if (!await isOfficialMarketplaceInstalled()) {
|
|
981
|
+
return false;
|
|
982
|
+
}
|
|
983
|
+
if (isPluginInstalled(`${pluginName}@${OFFICIAL_MARKETPLACE_NAME}`)) {
|
|
984
|
+
return false;
|
|
985
|
+
}
|
|
986
|
+
const { bashTools } = context ?? {};
|
|
987
|
+
if (signals.cli && bashTools?.size) {
|
|
988
|
+
if (signals.cli.some((cmd) => bashTools.has(cmd))) {
|
|
989
|
+
return true;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
if (signals.filePath && context?.readFileState) {
|
|
993
|
+
const readFiles = cacheKeys(context.readFileState);
|
|
994
|
+
if (readFiles.some((fp) => signals.filePath.test(fp))) {
|
|
995
|
+
return true;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
return false;
|
|
999
|
+
}
|
|
1000
|
+
var externalTips = [
|
|
1001
|
+
{
|
|
1002
|
+
id: "new-user-warmup",
|
|
1003
|
+
content: async () => `Start with small features or bug fixes, tell Claude to propose a plan, and verify its suggested edits`,
|
|
1004
|
+
cooldownSessions: 3,
|
|
1005
|
+
async isRelevant() {
|
|
1006
|
+
const config = getGlobalConfig();
|
|
1007
|
+
return config.numStartups < 10;
|
|
1008
|
+
}
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
id: "plan-mode-for-complex-tasks",
|
|
1012
|
+
content: async () => `Use Plan Mode to prepare for a complex request before making changes. Press ${getShortcutDisplay("chat:cycleMode", "Chat", "shift+tab")} twice to enable.`,
|
|
1013
|
+
cooldownSessions: 5,
|
|
1014
|
+
isRelevant: async () => {
|
|
1015
|
+
if (process.env.USER_TYPE === "ant")
|
|
1016
|
+
return false;
|
|
1017
|
+
const config = getGlobalConfig();
|
|
1018
|
+
const daysSinceLastUse = config.lastPlanModeUse ? (Date.now() - config.lastPlanModeUse) / (1000 * 60 * 60 * 24) : Infinity;
|
|
1019
|
+
return daysSinceLastUse > 7;
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
id: "default-permission-mode-config",
|
|
1024
|
+
content: async () => `Use /config to change your default permission mode (including Plan Mode)`,
|
|
1025
|
+
cooldownSessions: 10,
|
|
1026
|
+
isRelevant: async () => {
|
|
1027
|
+
try {
|
|
1028
|
+
const config = getGlobalConfig();
|
|
1029
|
+
const settings = getSettings_DEPRECATED();
|
|
1030
|
+
const hasUsedPlanMode = Boolean(config.lastPlanModeUse);
|
|
1031
|
+
const hasDefaultMode = Boolean(settings?.permissions?.defaultMode);
|
|
1032
|
+
return hasUsedPlanMode && !hasDefaultMode;
|
|
1033
|
+
} catch (error) {
|
|
1034
|
+
logForDebugging(`Failed to check default-permission-mode-config tip relevance: ${error}`, { level: "warn" });
|
|
1035
|
+
return false;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
id: "git-worktrees",
|
|
1041
|
+
content: async () => "Use git worktrees to run multiple Claude sessions in parallel.",
|
|
1042
|
+
cooldownSessions: 10,
|
|
1043
|
+
isRelevant: async () => {
|
|
1044
|
+
try {
|
|
1045
|
+
const config = getGlobalConfig();
|
|
1046
|
+
const worktreeCount = await getWorktreeCount();
|
|
1047
|
+
return worktreeCount <= 1 && config.numStartups > 50;
|
|
1048
|
+
} catch (_) {
|
|
1049
|
+
return false;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
id: "color-when-multi-clauding",
|
|
1055
|
+
content: async () => "Running multiple Claude sessions? Use /color and /rename to tell them apart at a glance.",
|
|
1056
|
+
cooldownSessions: 10,
|
|
1057
|
+
isRelevant: async () => {
|
|
1058
|
+
if (getCurrentSessionAgentColor())
|
|
1059
|
+
return false;
|
|
1060
|
+
const count = await countConcurrentSessions();
|
|
1061
|
+
return count >= 2;
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
id: "terminal-setup",
|
|
1066
|
+
content: async () => env.terminal === "Apple_Terminal" ? "Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more" : "Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more",
|
|
1067
|
+
cooldownSessions: 10,
|
|
1068
|
+
async isRelevant() {
|
|
1069
|
+
const config = getGlobalConfig();
|
|
1070
|
+
if (env.terminal === "Apple_Terminal") {
|
|
1071
|
+
return !config.optionAsMetaKeyInstalled;
|
|
1072
|
+
}
|
|
1073
|
+
return !config.shiftEnterKeyBindingInstalled;
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
id: "shift-enter",
|
|
1078
|
+
content: async () => env.terminal === "Apple_Terminal" ? "Press Option+Enter to send a multi-line message" : "Press Shift+Enter to send a multi-line message",
|
|
1079
|
+
cooldownSessions: 10,
|
|
1080
|
+
async isRelevant() {
|
|
1081
|
+
const config = getGlobalConfig();
|
|
1082
|
+
return Boolean((env.terminal === "Apple_Terminal" ? config.optionAsMetaKeyInstalled : config.shiftEnterKeyBindingInstalled) && config.numStartups > 3);
|
|
1083
|
+
}
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
id: "shift-enter-setup",
|
|
1087
|
+
content: async () => env.terminal === "Apple_Terminal" ? "Run /terminal-setup to enable Option+Enter for new lines" : "Run /terminal-setup to enable Shift+Enter for new lines",
|
|
1088
|
+
cooldownSessions: 10,
|
|
1089
|
+
async isRelevant() {
|
|
1090
|
+
if (!shouldOfferTerminalSetup()) {
|
|
1091
|
+
return false;
|
|
1092
|
+
}
|
|
1093
|
+
const config = getGlobalConfig();
|
|
1094
|
+
return !(env.terminal === "Apple_Terminal" ? config.optionAsMetaKeyInstalled : config.shiftEnterKeyBindingInstalled);
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
id: "memory-command",
|
|
1099
|
+
content: async () => "Use /memory to view and manage Claude memory",
|
|
1100
|
+
cooldownSessions: 15,
|
|
1101
|
+
async isRelevant() {
|
|
1102
|
+
const config = getGlobalConfig();
|
|
1103
|
+
return config.memoryUsageCount <= 0;
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
id: "theme-command",
|
|
1108
|
+
content: async () => "Use /theme to change the color theme",
|
|
1109
|
+
cooldownSessions: 20,
|
|
1110
|
+
isRelevant: async () => true
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
id: "colorterm-truecolor",
|
|
1114
|
+
content: async () => "Try setting environment variable COLORTERM=truecolor for richer colors",
|
|
1115
|
+
cooldownSessions: 30,
|
|
1116
|
+
isRelevant: async () => !process.env.COLORTERM && source_default.level < 3
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
id: "powershell-tool-env",
|
|
1120
|
+
content: async () => "Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)",
|
|
1121
|
+
cooldownSessions: 10,
|
|
1122
|
+
isRelevant: async () => getPlatform() === "windows" && process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL === undefined
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
id: "status-line",
|
|
1126
|
+
content: async () => "Use /statusline to set up a custom status line that will display beneath the input box",
|
|
1127
|
+
cooldownSessions: 25,
|
|
1128
|
+
isRelevant: async () => getSettings_DEPRECATED().statusLine === undefined
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
id: "prompt-queue",
|
|
1132
|
+
content: async () => "Hit Enter to queue up additional messages while Claude is working.",
|
|
1133
|
+
cooldownSessions: 5,
|
|
1134
|
+
async isRelevant() {
|
|
1135
|
+
const config = getGlobalConfig();
|
|
1136
|
+
return config.promptQueueUseCount <= 3;
|
|
1137
|
+
}
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
id: "enter-to-steer-in-relatime",
|
|
1141
|
+
content: async () => "Send messages to Claude while it works to steer Claude in real-time",
|
|
1142
|
+
cooldownSessions: 20,
|
|
1143
|
+
isRelevant: async () => true
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
id: "todo-list",
|
|
1147
|
+
content: async () => "Ask Claude to create a todo list when working on complex tasks to track progress and remain on track",
|
|
1148
|
+
cooldownSessions: 20,
|
|
1149
|
+
isRelevant: async () => true
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
id: "vscode-command-install",
|
|
1153
|
+
content: async () => `Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${env.terminal === "vscode" ? "code" : env.terminal}' command in PATH" to enable IDE integration`,
|
|
1154
|
+
cooldownSessions: 0,
|
|
1155
|
+
async isRelevant() {
|
|
1156
|
+
if (!isSupportedVSCodeTerminal()) {
|
|
1157
|
+
return false;
|
|
1158
|
+
}
|
|
1159
|
+
if (getPlatform() !== "macos") {
|
|
1160
|
+
return false;
|
|
1161
|
+
}
|
|
1162
|
+
switch (env.terminal) {
|
|
1163
|
+
case "vscode":
|
|
1164
|
+
return !await isVSCodeInstalled();
|
|
1165
|
+
case "cursor":
|
|
1166
|
+
return !await isCursorInstalled();
|
|
1167
|
+
case "windsurf":
|
|
1168
|
+
return !await isWindsurfInstalled();
|
|
1169
|
+
default:
|
|
1170
|
+
return false;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
id: "ide-upsell-external-terminal",
|
|
1176
|
+
content: async () => "Connect Claude to your IDE \xB7 /ide",
|
|
1177
|
+
cooldownSessions: 4,
|
|
1178
|
+
async isRelevant() {
|
|
1179
|
+
if (isSupportedTerminal()) {
|
|
1180
|
+
return false;
|
|
1181
|
+
}
|
|
1182
|
+
const lockfiles = await getSortedIdeLockfiles();
|
|
1183
|
+
if (lockfiles.length !== 0) {
|
|
1184
|
+
return false;
|
|
1185
|
+
}
|
|
1186
|
+
const runningIDEs = await detectRunningIDEsCached();
|
|
1187
|
+
return runningIDEs.length > 0;
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
id: "install-github-app",
|
|
1192
|
+
content: async () => "Run /install-github-app to tag @claude right from your Github issues and PRs",
|
|
1193
|
+
cooldownSessions: 10,
|
|
1194
|
+
isRelevant: async () => !getGlobalConfig().githubActionSetupCount
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
id: "install-slack-app",
|
|
1198
|
+
content: async () => "Run /install-slack-app to use Claude in Slack",
|
|
1199
|
+
cooldownSessions: 10,
|
|
1200
|
+
isRelevant: async () => !getGlobalConfig().slackAppInstallCount
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
id: "permissions",
|
|
1204
|
+
content: async () => "Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools",
|
|
1205
|
+
cooldownSessions: 10,
|
|
1206
|
+
async isRelevant() {
|
|
1207
|
+
const config = getGlobalConfig();
|
|
1208
|
+
return config.numStartups > 10;
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
id: "drag-and-drop-images",
|
|
1213
|
+
content: async () => "Did you know you can drag and drop image files into your terminal?",
|
|
1214
|
+
cooldownSessions: 10,
|
|
1215
|
+
isRelevant: async () => !env.isSSH()
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
id: "paste-images-mac",
|
|
1219
|
+
content: async () => "Paste images into Claude Code using control+v (not cmd+v!)",
|
|
1220
|
+
cooldownSessions: 10,
|
|
1221
|
+
isRelevant: async () => getPlatform() === "macos"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
id: "double-esc",
|
|
1225
|
+
content: async () => "Double-tap esc to rewind the conversation to a previous point in time",
|
|
1226
|
+
cooldownSessions: 10,
|
|
1227
|
+
isRelevant: async () => !fileHistoryEnabled()
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
id: "double-esc-code-restore",
|
|
1231
|
+
content: async () => "Double-tap esc to rewind the code and/or conversation to a previous point in time",
|
|
1232
|
+
cooldownSessions: 10,
|
|
1233
|
+
isRelevant: async () => fileHistoryEnabled()
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
id: "continue",
|
|
1237
|
+
content: async () => "Run claude --continue or claude --resume to resume a conversation",
|
|
1238
|
+
cooldownSessions: 10,
|
|
1239
|
+
isRelevant: async () => true
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
id: "rename-conversation",
|
|
1243
|
+
content: async () => "Name your conversations with /rename to find them easily in /resume later",
|
|
1244
|
+
cooldownSessions: 15,
|
|
1245
|
+
isRelevant: async () => isCustomTitleEnabled() && getGlobalConfig().numStartups > 10
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
id: "custom-commands",
|
|
1249
|
+
content: async () => "Create skills by adding .md files to .claude/skills/ in your project or ~/.claude/skills/ for skills that work in any project",
|
|
1250
|
+
cooldownSessions: 15,
|
|
1251
|
+
async isRelevant() {
|
|
1252
|
+
const config = getGlobalConfig();
|
|
1253
|
+
return config.numStartups > 10;
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
id: "shift-tab",
|
|
1258
|
+
content: async () => process.env.USER_TYPE === "ant" ? `Hit ${getShortcutDisplay("chat:cycleMode", "Chat", "shift+tab")} to cycle between default mode and auto mode` : `Hit ${getShortcutDisplay("chat:cycleMode", "Chat", "shift+tab")} to cycle between default mode, auto-accept edit mode, and plan mode`,
|
|
1259
|
+
cooldownSessions: 10,
|
|
1260
|
+
isRelevant: async () => true
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
id: "image-paste",
|
|
1264
|
+
content: async () => `Use ${getShortcutDisplay("chat:imagePaste", "Chat", "ctrl+v")} to paste images from your clipboard`,
|
|
1265
|
+
cooldownSessions: 20,
|
|
1266
|
+
isRelevant: async () => true
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
id: "custom-agents",
|
|
1270
|
+
content: async () => "Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer",
|
|
1271
|
+
cooldownSessions: 15,
|
|
1272
|
+
async isRelevant() {
|
|
1273
|
+
const config = getGlobalConfig();
|
|
1274
|
+
return config.numStartups > 5;
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
id: "agent-flag",
|
|
1279
|
+
content: async () => "Use --agent <agent_name> to directly start a conversation with a subagent",
|
|
1280
|
+
cooldownSessions: 15,
|
|
1281
|
+
async isRelevant() {
|
|
1282
|
+
const config = getGlobalConfig();
|
|
1283
|
+
return config.numStartups > 5;
|
|
1284
|
+
}
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
id: "desktop-app",
|
|
1288
|
+
content: async () => "Run Claude Code locally or remotely using the Claude desktop app: clau.de/desktop",
|
|
1289
|
+
cooldownSessions: 15,
|
|
1290
|
+
isRelevant: async () => getPlatform() !== "linux"
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
id: "desktop-shortcut",
|
|
1294
|
+
content: async (ctx) => {
|
|
1295
|
+
const blue = color("suggestion", ctx.theme);
|
|
1296
|
+
return `Continue your session in Claude Code Desktop with ${blue("/desktop")}`;
|
|
1297
|
+
},
|
|
1298
|
+
cooldownSessions: 15,
|
|
1299
|
+
isRelevant: async () => {
|
|
1300
|
+
if (!getDesktopUpsellConfig().enable_shortcut_tip)
|
|
1301
|
+
return false;
|
|
1302
|
+
return process.platform === "darwin" || process.platform === "win32" && process.arch === "x64";
|
|
1303
|
+
}
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
id: "web-app",
|
|
1307
|
+
content: async () => "Run tasks in the cloud while you keep coding locally \xB7 clau.de/web",
|
|
1308
|
+
cooldownSessions: 15,
|
|
1309
|
+
isRelevant: async () => true
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
id: "mobile-app",
|
|
1313
|
+
content: async () => "/mobile to use Claude Code from the Claude app on your phone",
|
|
1314
|
+
cooldownSessions: 15,
|
|
1315
|
+
isRelevant: async () => true
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
id: "opusplan-mode-reminder",
|
|
1319
|
+
content: async () => `Your default model setting is Opus Plan Mode. Press ${getShortcutDisplay("chat:cycleMode", "Chat", "shift+tab")} twice to activate Plan Mode and plan with Claude Opus.`,
|
|
1320
|
+
cooldownSessions: 2,
|
|
1321
|
+
async isRelevant() {
|
|
1322
|
+
if (process.env.USER_TYPE === "ant")
|
|
1323
|
+
return false;
|
|
1324
|
+
const config = getGlobalConfig();
|
|
1325
|
+
const modelSetting = getUserSpecifiedModelSetting();
|
|
1326
|
+
const hasOpusPlanMode = modelSetting === "opusplan";
|
|
1327
|
+
const daysSinceLastUse = config.lastPlanModeUse ? (Date.now() - config.lastPlanModeUse) / (1000 * 60 * 60 * 24) : Infinity;
|
|
1328
|
+
return hasOpusPlanMode && daysSinceLastUse > 3;
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
id: "frontend-design-plugin",
|
|
1333
|
+
content: async (ctx) => {
|
|
1334
|
+
const blue = color("suggestion", ctx.theme);
|
|
1335
|
+
return `Working with HTML/CSS? Install the frontend-design plugin:
|
|
1336
|
+
${blue(`/plugin install frontend-design@${OFFICIAL_MARKETPLACE_NAME}`)}`;
|
|
1337
|
+
},
|
|
1338
|
+
cooldownSessions: 3,
|
|
1339
|
+
isRelevant: async (context) => isMarketplacePluginRelevant("frontend-design", context, {
|
|
1340
|
+
filePath: /\.(html|css|htm)$/i
|
|
1341
|
+
})
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
id: "vercel-plugin",
|
|
1345
|
+
content: async (ctx) => {
|
|
1346
|
+
const blue = color("suggestion", ctx.theme);
|
|
1347
|
+
return `Working with Vercel? Install the vercel plugin:
|
|
1348
|
+
${blue(`/plugin install vercel@${OFFICIAL_MARKETPLACE_NAME}`)}`;
|
|
1349
|
+
},
|
|
1350
|
+
cooldownSessions: 3,
|
|
1351
|
+
isRelevant: async (context) => isMarketplacePluginRelevant("vercel", context, {
|
|
1352
|
+
filePath: /(?:^|[/\\])vercel\.json$/i,
|
|
1353
|
+
cli: ["vercel"]
|
|
1354
|
+
})
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
id: "effort-high-nudge",
|
|
1358
|
+
content: async (ctx) => {
|
|
1359
|
+
const blue = color("suggestion", ctx.theme);
|
|
1360
|
+
const cmd = blue("/effort high");
|
|
1361
|
+
const variant = getFeatureValue_CACHED_MAY_BE_STALE("tengu_tide_elm", "off");
|
|
1362
|
+
return variant === "copy_b" ? `Use ${cmd} for better one-shot answers. Claude thinks it through first.` : `Working on something tricky? ${cmd} gives better first answers`;
|
|
1363
|
+
},
|
|
1364
|
+
cooldownSessions: 3,
|
|
1365
|
+
isRelevant: async () => {
|
|
1366
|
+
if (!is1PApiCustomer())
|
|
1367
|
+
return false;
|
|
1368
|
+
if (!modelSupportsEffort(getMainLoopModel()))
|
|
1369
|
+
return false;
|
|
1370
|
+
if (getSettingsForSource("policySettings")?.effortLevel !== undefined) {
|
|
1371
|
+
return false;
|
|
1372
|
+
}
|
|
1373
|
+
if (getEffortEnvOverride() !== undefined)
|
|
1374
|
+
return false;
|
|
1375
|
+
const persisted = getInitialSettings().effortLevel;
|
|
1376
|
+
if (persisted === "high" || persisted === "max")
|
|
1377
|
+
return false;
|
|
1378
|
+
return getFeatureValue_CACHED_MAY_BE_STALE("tengu_tide_elm", "off") !== "off";
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
id: "subagent-fanout-nudge",
|
|
1383
|
+
content: async (ctx) => {
|
|
1384
|
+
const blue = color("suggestion", ctx.theme);
|
|
1385
|
+
const variant = getFeatureValue_CACHED_MAY_BE_STALE("tengu_tern_alloy", "off");
|
|
1386
|
+
return variant === "copy_b" ? `For big tasks, tell Claude to ${blue("use subagents")}. They work in parallel and keep your main thread clean.` : `Say ${blue('"fan out subagents"')} and Claude sends a team. Each one digs deep so nothing gets missed.`;
|
|
1387
|
+
},
|
|
1388
|
+
cooldownSessions: 3,
|
|
1389
|
+
isRelevant: async () => {
|
|
1390
|
+
if (!is1PApiCustomer())
|
|
1391
|
+
return false;
|
|
1392
|
+
return getFeatureValue_CACHED_MAY_BE_STALE("tengu_tern_alloy", "off") !== "off";
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
id: "loop-command-nudge",
|
|
1397
|
+
content: async (ctx) => {
|
|
1398
|
+
const blue = color("suggestion", ctx.theme);
|
|
1399
|
+
const variant = getFeatureValue_CACHED_MAY_BE_STALE("tengu_timber_lark", "off");
|
|
1400
|
+
return variant === "copy_b" ? `Use ${blue("/loop 5m check the deploy")} to run any prompt on a schedule. Set it and forget it.` : `${blue("/loop")} runs any prompt on a recurring schedule. Great for monitoring deploys, babysitting PRs, or polling status.`;
|
|
1401
|
+
},
|
|
1402
|
+
cooldownSessions: 3,
|
|
1403
|
+
isRelevant: async () => {
|
|
1404
|
+
if (!is1PApiCustomer())
|
|
1405
|
+
return false;
|
|
1406
|
+
if (!isKairosCronEnabled())
|
|
1407
|
+
return false;
|
|
1408
|
+
return getFeatureValue_CACHED_MAY_BE_STALE("tengu_timber_lark", "off") !== "off";
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
id: "guest-passes",
|
|
1413
|
+
content: async (ctx) => {
|
|
1414
|
+
const claude = color("claude", ctx.theme);
|
|
1415
|
+
const reward = getCachedReferrerReward();
|
|
1416
|
+
return reward ? `Share Claude Code and earn ${claude(formatCreditAmount(reward))} of extra usage \xB7 ${claude("/passes")}` : `You have free guest passes to share \xB7 ${claude("/passes")}`;
|
|
1417
|
+
},
|
|
1418
|
+
cooldownSessions: 3,
|
|
1419
|
+
isRelevant: async () => {
|
|
1420
|
+
const config = getGlobalConfig();
|
|
1421
|
+
if (config.hasVisitedPasses) {
|
|
1422
|
+
return false;
|
|
1423
|
+
}
|
|
1424
|
+
const { eligible } = checkCachedPassesEligibility();
|
|
1425
|
+
return eligible;
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
id: "overage-credit",
|
|
1430
|
+
content: async (ctx) => {
|
|
1431
|
+
const claude = color("claude", ctx.theme);
|
|
1432
|
+
const info = getCachedOverageCreditGrant();
|
|
1433
|
+
const amount = info ? formatGrantAmount(info) : null;
|
|
1434
|
+
if (!amount)
|
|
1435
|
+
return "";
|
|
1436
|
+
return `${claude(`${amount} in extra usage, on us`)} \xB7 third-party apps \xB7 ${claude("/extra-usage")}`;
|
|
1437
|
+
},
|
|
1438
|
+
cooldownSessions: 3,
|
|
1439
|
+
isRelevant: async () => shouldShowOverageCreditUpsell()
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
id: "feedback-command",
|
|
1443
|
+
content: async () => "Use /feedback to help us improve!",
|
|
1444
|
+
cooldownSessions: 15,
|
|
1445
|
+
async isRelevant() {
|
|
1446
|
+
if (process.env.USER_TYPE === "ant") {
|
|
1447
|
+
return false;
|
|
1448
|
+
}
|
|
1449
|
+
const config = getGlobalConfig();
|
|
1450
|
+
return config.numStartups > 5;
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
];
|
|
1454
|
+
var internalOnlyTips = process.env.USER_TYPE === "ant" ? [
|
|
1455
|
+
{
|
|
1456
|
+
id: "important-claudemd",
|
|
1457
|
+
content: async () => '[ANT-ONLY] Use "IMPORTANT:" prefix for must-follow CLAUDE.md rules',
|
|
1458
|
+
cooldownSessions: 30,
|
|
1459
|
+
isRelevant: async () => true
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
id: "skillify",
|
|
1463
|
+
content: async () => "[ANT-ONLY] Use /skillify at the end of a workflow to turn it into a reusable skill",
|
|
1464
|
+
cooldownSessions: 15,
|
|
1465
|
+
isRelevant: async () => true
|
|
1466
|
+
}
|
|
1467
|
+
] : [];
|
|
1468
|
+
function getCustomTips() {
|
|
1469
|
+
const settings = getInitialSettings();
|
|
1470
|
+
const override = settings.spinnerTipsOverride;
|
|
1471
|
+
if (!override?.tips?.length)
|
|
1472
|
+
return [];
|
|
1473
|
+
return override.tips.map((content, i) => ({
|
|
1474
|
+
id: `custom-tip-${i}`,
|
|
1475
|
+
content: async () => content,
|
|
1476
|
+
cooldownSessions: 0,
|
|
1477
|
+
isRelevant: async () => true
|
|
1478
|
+
}));
|
|
1479
|
+
}
|
|
1480
|
+
async function getRelevantTips(context) {
|
|
1481
|
+
const settings = getInitialSettings();
|
|
1482
|
+
const override = settings.spinnerTipsOverride;
|
|
1483
|
+
const customTips = getCustomTips();
|
|
1484
|
+
if (override?.excludeDefault && customTips.length > 0) {
|
|
1485
|
+
return customTips;
|
|
1486
|
+
}
|
|
1487
|
+
const tips = [...externalTips, ...internalOnlyTips];
|
|
1488
|
+
const isRelevant = await Promise.all(tips.map((_) => _.isRelevant(context)));
|
|
1489
|
+
const filtered = tips.filter((_, index) => isRelevant[index]).filter((_) => getSessionsSinceLastShown(_.id) >= _.cooldownSessions);
|
|
1490
|
+
return [...filtered, ...customTips];
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
// src/utils/model/deprecation.ts
|
|
1494
|
+
init_providers();
|
|
1495
|
+
var DEPRECATED_MODELS = {
|
|
1496
|
+
"claude-3-opus": {
|
|
1497
|
+
modelName: "Claude 3 Opus",
|
|
1498
|
+
retirementDates: {
|
|
1499
|
+
firstParty: "January 5, 2026",
|
|
1500
|
+
bedrock: "January 15, 2026",
|
|
1501
|
+
vertex: "January 5, 2026",
|
|
1502
|
+
foundry: "January 5, 2026"
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
"claude-3-7-sonnet": {
|
|
1506
|
+
modelName: "Claude 3.7 Sonnet",
|
|
1507
|
+
retirementDates: {
|
|
1508
|
+
firstParty: "February 19, 2026",
|
|
1509
|
+
bedrock: "April 28, 2026",
|
|
1510
|
+
vertex: "May 11, 2026",
|
|
1511
|
+
foundry: "February 19, 2026"
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
"claude-3-5-haiku": {
|
|
1515
|
+
modelName: "Claude 3.5 Haiku",
|
|
1516
|
+
retirementDates: {
|
|
1517
|
+
firstParty: "February 19, 2026",
|
|
1518
|
+
bedrock: null,
|
|
1519
|
+
vertex: null,
|
|
1520
|
+
foundry: null
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
};
|
|
1524
|
+
function getDeprecatedModelInfo(modelId) {
|
|
1525
|
+
const lowercaseModelId = modelId.toLowerCase();
|
|
1526
|
+
const provider = getAPIProvider();
|
|
1527
|
+
for (const [key, value] of Object.entries(DEPRECATED_MODELS)) {
|
|
1528
|
+
const retirementDate = value.retirementDates[provider];
|
|
1529
|
+
if (!lowercaseModelId.includes(key) || !retirementDate) {
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1532
|
+
return {
|
|
1533
|
+
isDeprecated: true,
|
|
1534
|
+
modelName: value.modelName,
|
|
1535
|
+
retirementDate
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
return { isDeprecated: false };
|
|
1539
|
+
}
|
|
1540
|
+
function getModelDeprecationWarning(modelId) {
|
|
1541
|
+
if (!modelId) {
|
|
1542
|
+
return null;
|
|
1543
|
+
}
|
|
1544
|
+
const info = getDeprecatedModelInfo(modelId);
|
|
1545
|
+
if (!info.isDeprecated) {
|
|
1546
|
+
return null;
|
|
1547
|
+
}
|
|
1548
|
+
return `\u26A0 ${info.modelName} will be retired on ${info.retirementDate}. Consider switching to a newer model.`;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
export { getExampleCommandFromCache, refreshExampleCommands, RemoteSessionManager, createRemoteSessionConfig, computeInitialTeamContext, initializeTeammateContextFromSession, recordTipShown, getSessionsSinceLastShown, shouldShowDesktopUpsellStartup, DesktopUpsellStartup, getRelevantTips, getModelDeprecationWarning };
|