@jdi-code/claude-code 1.0.3 → 1.2.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 +104 -369
- package/dist/{chunk-4t7n5hfg.js → chunk-0318ehfm.js} +8 -8
- package/dist/chunk-050fe4m3.js +68 -0
- package/dist/chunk-06v69x0b.js +127 -0
- package/dist/chunk-07069jq1.js +30 -0
- package/dist/chunk-0c9xpqm8.js +106 -0
- package/dist/chunk-0hxxwcs1.js +107 -0
- package/dist/chunk-0nsb3kxz.js +440 -0
- package/dist/{chunk-1cbn5kxf.js → chunk-0rpb2bdp.js} +3 -2
- package/dist/{chunk-vykgfhrb.js → chunk-0svbkpfn.js} +5 -5
- package/dist/chunk-0vg07894.js +121 -0
- package/dist/{chunk-e4vsvf0r.js → chunk-0zefjhrg.js} +4 -4
- package/dist/chunk-0zfmj5y2.js +106 -0
- package/dist/{chunk-czkshaff.js → chunk-107p04a0.js} +13 -11
- package/dist/{chunk-z4dm354d.js → chunk-13f30tg0.js} +1 -1
- package/dist/{chunk-44fpr6jq.js → chunk-168xb8v1.js} +4 -2
- package/dist/{chunk-0w63x62y.js → chunk-181q7ysj.js} +79 -63
- package/dist/{chunk-6mapphaq.js → chunk-18jc5efa.js} +8 -8
- package/dist/chunk-19j7nkpy.js +133 -0
- package/dist/chunk-1c2qp0ks.js +33068 -0
- package/dist/{chunk-0e1xsncc.js → chunk-1cwdhk7a.js} +1 -1
- package/dist/{chunk-7m2nd8da.js → chunk-1erfksyp.js} +6 -9
- package/dist/{chunk-rs45skes.js → chunk-1h1tc4mw.js} +13 -10
- package/dist/{chunk-91rcbmch.js → chunk-1rngm3yy.js} +155 -184
- package/dist/{chunk-3gqdqmzb.js → chunk-1vthytca.js} +16 -12
- package/dist/{chunk-xe6z85xc.js → chunk-1xbs4yb6.js} +19 -16
- package/dist/chunk-1xj1yz5n.js +109 -0
- package/dist/chunk-21mfpnva.js +85 -0
- package/dist/chunk-2361j94t.js +1811 -0
- package/dist/chunk-238g70xa.js +1 -1
- package/dist/chunk-250f5ce1.js +108 -0
- package/dist/{chunk-8yx1trkj.js → chunk-29r4exv2.js} +105 -211
- package/dist/chunk-2a8yf5ct.js +72 -0
- package/dist/{chunk-h3fqb66h.js → chunk-2bnerkhs.js} +110 -135
- package/dist/{chunk-0nt9md2b.js → chunk-2cctz9ww.js} +101 -8
- package/dist/chunk-2fwze72g.js +24 -0
- package/dist/{chunk-h3qa8f5w.js → chunk-2jvpw0q1.js} +229 -363
- package/dist/{chunk-9wm5e9e9.js → chunk-2mj88mnr.js} +42 -31
- package/dist/chunk-2q0schcc.js +133 -0
- package/dist/{chunk-r66hz8j6.js → chunk-2qp2hc02.js} +14 -12
- package/dist/chunk-2t0xa4dt.js +145 -0
- package/dist/chunk-2tzxsnha.js +360 -0
- package/dist/chunk-2v8cya3p.js +54 -0
- package/dist/chunk-2w00z1ct.js +105 -0
- package/dist/{chunk-2md1yavs.js → chunk-2wpfdv2t.js} +43 -32
- package/dist/chunk-2xcr3eqt.js +65 -0
- package/dist/chunk-30bpz5m2.js +34 -0
- package/dist/{chunk-hrzerbfw.js → chunk-36b2q5fg.js} +14 -14
- package/dist/{chunk-edg1yhec.js → chunk-3aady5e2.js} +2 -2
- package/dist/chunk-3ewzhjyb.js +207 -0
- package/dist/{chunk-z47tm067.js → chunk-3kpptrnz.js} +54 -47
- package/dist/{chunk-yd3av9a3.js → chunk-3na967x3.js} +2 -2
- package/dist/chunk-3nk79af8.js +8 -0
- package/dist/{chunk-z0cm9r7f.js → chunk-3r66czp1.js} +10 -10
- package/dist/{chunk-rnjbczcy.js → chunk-3y3qasy6.js} +13 -11
- package/dist/{chunk-nxsh6de2.js → chunk-404qm8xt.js} +16 -12
- package/dist/{chunk-mhqthgdg.js → chunk-41grdp0q.js} +5 -5
- package/dist/chunk-4cp6193g.js +9076 -0
- package/dist/chunk-4g18phg9.js +2535 -0
- package/dist/{chunk-6n2qgm9v.js → chunk-4hv90qcz.js} +1 -1
- package/dist/chunk-4jkfzf6g.js +81 -0
- package/dist/{chunk-5frcqxsv.js → chunk-4m6k7588.js} +127117 -138842
- package/dist/chunk-4nspekjp.js +69 -0
- package/dist/chunk-4x29t96w.js +119 -0
- package/dist/{chunk-40b8p5em.js → chunk-585cb3h6.js} +14 -12
- package/dist/{chunk-5dbar61y.js → chunk-59qz55py.js} +77 -61
- package/dist/chunk-5bta6qne.js +1030 -0
- package/dist/chunk-5dmczs66.js +123 -0
- package/dist/{chunk-9e2kqv5g.js → chunk-5pevjsyw.js} +3 -10
- package/dist/{chunk-5ndexvh1.js → chunk-5py41v61.js} +10226 -16961
- package/dist/{chunk-d5e75scx.js → chunk-5q2gm8dt.js} +5 -5
- package/dist/{chunk-893mewv4.js → chunk-5rpyh7nn.js} +1 -1
- package/dist/{chunk-hx2tr4ep.js → chunk-5z28bqne.js} +34 -475
- package/dist/chunk-5zzwydag.js +1170 -0
- package/dist/{chunk-4tyxyfsv.js → chunk-61gm3j90.js} +2 -2
- package/dist/chunk-64c1avct.js +13 -0
- package/dist/chunk-64hks9ax.js +456 -0
- package/dist/{chunk-bw9a5v0b.js → chunk-64m7ax9d.js} +4 -4
- package/dist/{chunk-cha1tdry.js → chunk-66hjztcb.js} +1 -1
- package/dist/{chunk-q25bjaev.js → chunk-677as3nh.js} +2 -2
- package/dist/chunk-69v14ada.js +76 -0
- package/dist/chunk-6eahnbxj.js +101 -0
- package/dist/chunk-6eg4c33n.js +196 -0
- package/dist/chunk-6fjfwj7q.js +214 -0
- package/dist/{chunk-70qb5sds.js → chunk-6kwwke3r.js} +2 -2
- package/dist/chunk-6m0pc6py.js +311 -0
- package/dist/chunk-6mpw9h55.js +1071 -0
- package/dist/{chunk-v1mgv1et.js → chunk-6p4cyhb3.js} +4 -3
- package/dist/chunk-6r1dx518.js +111 -0
- package/dist/{chunk-1n1xqxv5.js → chunk-713bh4cd.js} +1072 -1736
- package/dist/{chunk-nstbdz07.js → chunk-7246q965.js} +85 -69
- package/dist/{chunk-w6q6a1qj.js → chunk-74mdk2e7.js} +564 -864
- package/dist/{chunk-77czbpcq.js → chunk-76pa90ge.js} +104 -90
- package/dist/chunk-77nkh0x1.js +82 -0
- package/dist/chunk-7bsbnzpm.js +65 -0
- package/dist/chunk-7r3v46aq.js +167 -0
- package/dist/chunk-7vf8s593.js +235 -0
- package/dist/chunk-7x6ng8fp.js +64 -0
- package/dist/chunk-7xy990yb.js +81 -0
- package/dist/chunk-7xyswgjh.js +8 -0
- package/dist/chunk-80p18mf8.js +228 -0
- package/dist/{chunk-dv1wfr85.js → chunk-8225arm6.js} +5 -4
- package/dist/{chunk-vdbes184.js → chunk-82rh5hpz.js} +70 -10
- package/dist/chunk-84nf3k34.js +73 -0
- package/dist/chunk-85v0yx5b.js +106 -0
- package/dist/{chunk-x5j50p5x.js → chunk-86f4vq6n.js} +5 -5
- package/dist/{chunk-e5ga3s0y.js → chunk-86vec0h6.js} +148 -421
- package/dist/chunk-8az1n4zt.js +110 -0
- package/dist/{chunk-ctw5jwcd.js → chunk-8bwqtasa.js} +10 -10
- package/dist/chunk-8c9jtmsm.js +100 -0
- package/dist/{chunk-fqc5mcw7.js → chunk-8ca80ew2.js} +9 -9
- package/dist/chunk-8g5pe1gr.js +37 -0
- package/dist/{chunk-g0j0t6qk.js → chunk-8g747a8x.js} +1 -1
- package/dist/{chunk-3vzs2gbq.js → chunk-8gxztyqd.js} +4 -4
- package/dist/{chunk-45kxdsp8.js → chunk-8h6sdj66.js} +13 -10
- package/dist/{chunk-s8amjdwf.js → chunk-8ht15c7w.js} +7 -7
- package/dist/{chunk-ywxd4qw4.js → chunk-8mm8b6dd.js} +2 -5
- package/dist/{chunk-sdj9b9wh.js → chunk-8pn8tvgg.js} +9 -154
- package/dist/{chunk-pxrffn0w.js → chunk-8vnxjgz9.js} +11 -5
- package/dist/chunk-9525p9tg.js +401 -0
- package/dist/{chunk-y47cg3kz.js → chunk-9a0rsdre.js} +17 -13
- package/dist/chunk-9a2pa53f.js +308 -0
- package/dist/chunk-9es2dav7.js +507 -0
- package/dist/chunk-9pq45ycx.js +217 -0
- package/dist/chunk-9qwkw406.js +121 -0
- package/dist/chunk-9rf1x0z9.js +109 -0
- package/dist/{chunk-ghmbr193.js → chunk-9rvqx05m.js} +9 -9
- package/dist/{chunk-dchkdhzs.js → chunk-9sd3tz3p.js} +91 -75
- package/dist/chunk-9x5zgy22.js +12 -0
- package/dist/{chunk-q6b51yc5.js → chunk-9z4vq44b.js} +3 -3
- package/dist/chunk-a136cvvz.js +27 -0
- package/dist/{chunk-8hq5kk3y.js → chunk-a4twdmhf.js} +3 -2
- package/dist/{chunk-d18z9pna.js → chunk-a7rhvq9b.js} +2 -2
- package/dist/{chunk-pmjqdasm.js → chunk-a8jbqb9f.js} +2313 -4199
- package/dist/chunk-a9xhsth1.js +1068 -0
- package/dist/{chunk-kd63fbhw.js → chunk-achjqrhd.js} +81 -65
- package/dist/{chunk-67kbbt9h.js → chunk-af2vfhm4.js} +42 -31
- package/dist/{chunk-js8rvgs1.js → chunk-ahn9tgz7.js} +3 -3
- package/dist/chunk-ajets2e9.js +103 -0
- package/dist/chunk-akxywws0.js +79 -0
- package/dist/{chunk-meefz2g4.js → chunk-aqvgkvsq.js} +7 -7
- package/dist/{chunk-r6b58y3x.js → chunk-ase86y73.js} +1 -3
- package/dist/{chunk-hjhc4cpt.js → chunk-awb4vc41.js} +2 -2
- package/dist/{chunk-1jrcb7cs.js → chunk-b0mt3wzx.js} +37 -82
- package/dist/chunk-b4zy6y92.js +105 -0
- package/dist/{chunk-ax83mpvw.js → chunk-b65yxs9e.js} +26 -26
- package/dist/{chunk-wzx6mmft.js → chunk-b7b39zx2.js} +120 -118
- package/dist/{chunk-8bedvdm1.js → chunk-b81hd3m6.js} +1 -1
- package/dist/chunk-bbr7mwpv.js +117 -0
- package/dist/{chunk-1a61g8t2.js → chunk-bdzqt6gy.js} +83 -64
- package/dist/chunk-bkm0zms8.js +110 -0
- package/dist/{chunk-0vvej174.js → chunk-bs8r4665.js} +5 -5
- package/dist/{chunk-xvc4gp3x.js → chunk-bszdmr4k.js} +24 -24
- package/dist/{chunk-8ngxagxq.js → chunk-bt64sq5y.js} +4 -3
- package/dist/chunk-bvcpr8qa.js +909 -0
- package/dist/chunk-bx811wk6.js +118 -0
- package/dist/{chunk-3be7ka25.js → chunk-bxcfz5gy.js} +1 -1
- package/dist/{chunk-77g09znh.js → chunk-byv2p9hn.js} +22 -16
- package/dist/{chunk-wbkahkdc.js → chunk-c03am3es.js} +8 -6
- package/dist/chunk-c1x69s30.js +116 -0
- package/dist/chunk-c5vkve4j.js +68 -0
- package/dist/chunk-c6sjhj89.js +1284 -0
- package/dist/chunk-cb0wxajw.js +142 -0
- package/dist/{chunk-vyc0rjyx.js → chunk-cbrt5vsb.js} +1 -1
- package/dist/{chunk-4kxr1pwz.js → chunk-cgmy7r62.js} +30 -17
- package/dist/chunk-chsyvavm.js +3435 -0
- package/dist/{chunk-z72st5c8.js → chunk-cmsknj6n.js} +4774 -3386
- package/dist/{chunk-cdz5yb0r.js → chunk-crmjpsqe.js} +13 -2
- package/dist/chunk-cs039fnj.js +123 -0
- package/dist/{chunk-e7393td6.js → chunk-cznf6k4g.js} +13 -9
- package/dist/{chunk-fw49pe3p.js → chunk-cztjpxq4.js} +6 -6
- package/dist/{chunk-n8sjmqba.js → chunk-d0n93ge4.js} +141 -100
- package/dist/{chunk-spde0bf5.js → chunk-d14ygn80.js} +3 -3
- package/dist/chunk-d4mdda98.js +94 -0
- package/dist/chunk-d5qggsbm.js +137 -0
- package/dist/{chunk-55wgxwa9.js → chunk-d7886r6a.js} +6928 -6935
- package/dist/{chunk-eh8h36nt.js → chunk-d9gxtzmz.js} +42 -31
- package/dist/{chunk-xk66xrkk.js → chunk-da312cj9.js} +54 -72
- package/dist/{chunk-j287ctwr.js → chunk-df19zqjj.js} +77 -61
- package/dist/chunk-dm3n2qgd.js +24 -0
- package/dist/{chunk-m21hvkn4.js → chunk-dncgrfdt.js} +2 -2
- package/dist/{chunk-0nz8sqg4.js → chunk-dq3rw4b5.js} +1294 -873
- package/dist/{chunk-ey03t39w.js → chunk-dw1f4b7e.js} +257 -194
- package/dist/chunk-dx1jrvdz.js +339 -0
- package/dist/{chunk-0ragr30c.js → chunk-dxeadbxq.js} +12 -12
- package/dist/{chunk-gdp8wgnd.js → chunk-e8b9gcwf.js} +88 -72
- package/dist/chunk-e9k5a3cy.js +409 -0
- package/dist/chunk-e9mer45h.js +64 -0
- package/dist/{chunk-5qbwrz8m.js → chunk-ea2f7wt3.js} +13 -13
- package/dist/chunk-eak7m65m.js +1182 -0
- package/dist/chunk-ebhgmeyk.js +245 -0
- package/dist/chunk-eg93k7ac.js +117 -0
- package/dist/{chunk-jgv78tv0.js → chunk-ej1yvp43.js} +8 -8
- package/dist/chunk-ekr8pwpv.js +1408 -0
- package/dist/{chunk-m4edbpcz.js → chunk-epg124e3.js} +117 -143
- package/dist/chunk-eyqnj23w.js +5368 -0
- package/dist/chunk-f2bvkxbw.js +267 -0
- package/dist/chunk-f537x96t.js +295 -0
- package/dist/chunk-f6wdmebb.js +108 -0
- package/dist/chunk-feyzykye.js +10 -0
- package/dist/{chunk-ep47dy22.js → chunk-fj3ywwqv.js} +7 -7
- package/dist/{chunk-9gttd1xq.js → chunk-fjv7p1kc.js} +4 -4
- package/dist/{chunk-1rnkpxy4.js → chunk-fpe5nywt.js} +10 -115
- package/dist/chunk-fvpgrg19.js +434 -0
- package/dist/{chunk-9xmsmn93.js → chunk-fvqrkmtn.js} +5 -5
- package/dist/{chunk-6g62sjpf.js → chunk-fz0ch109.js} +4 -3
- package/dist/{chunk-5xz7ts0k.js → chunk-g0vh71q6.js} +188 -339
- package/dist/chunk-g1gtvtv8.js +384 -0
- package/dist/chunk-g5g9wm20.js +66 -0
- package/dist/{chunk-v399mzxk.js → chunk-g63tgj4f.js} +2 -2
- package/dist/{chunk-kkkneeg1.js → chunk-gay98970.js} +21 -16
- package/dist/chunk-gey7mwcw.js +36 -0
- package/dist/{chunk-w5ctjgmx.js → chunk-gtyh1yd1.js} +2 -2
- package/dist/{chunk-tjaqa99q.js → chunk-gx8016vp.js} +3 -3
- package/dist/{chunk-f2mhrmww.js → chunk-h0rbjg6x.js} +1 -8
- package/dist/{chunk-7z8j9qfn.js → chunk-h1mr3371.js} +3 -3
- package/dist/chunk-h2yxyeq4.js +132 -0
- package/dist/{chunk-qqfa0dqg.js → chunk-h4b85amj.js} +20 -32
- package/dist/chunk-h707k8xq.js +64 -0
- package/dist/{chunk-3z6rf0m3.js → chunk-h7rcjx8d.js} +5 -5
- package/dist/chunk-hch5yeq8.js +121 -0
- package/dist/{chunk-4anyx5bv.js → chunk-hd4azb7x.js} +5 -5
- package/dist/chunk-hjnbg9qw.js +32 -0
- package/dist/{chunk-e2yv57c2.js → chunk-hk9mmkba.js} +8 -8
- package/dist/{chunk-f1rrxxcf.js → chunk-hs9w0p45.js} +7 -131
- package/dist/{chunk-9f7xza5r.js → chunk-htaan7k0.js} +11 -11
- package/dist/chunk-htg84hvs.js +300 -0
- package/dist/chunk-hvyr6p4r.js +433 -0
- package/dist/chunk-j0r5vkvw.js +267 -0
- package/dist/{chunk-9gbamk79.js → chunk-j5bth84e.js} +5 -1
- package/dist/{chunk-vratq94g.js → chunk-j9gxwbe3.js} +1 -1
- package/dist/{chunk-3r24h7t6.js → chunk-jaaxk89e.js} +1 -1
- package/dist/chunk-je7jake4.js +3584 -0
- package/dist/chunk-jeqhpyxr.js +126 -0
- package/dist/chunk-jngf0nar.js +135 -0
- package/dist/chunk-jqjbc5ef.js +795 -0
- package/dist/{chunk-xf4wsjdm.js → chunk-jwrmmv7j.js} +9 -7
- package/dist/{chunk-j9wpkwjj.js → chunk-jwyzy83k.js} +6 -6
- package/dist/chunk-jz8v9sn3.js +228 -0
- package/dist/{chunk-bqfnp99q.js → chunk-k3s4yk22.js} +1 -1
- package/dist/chunk-k5c09bzv.js +443 -0
- package/dist/chunk-kbktwsms.js +372 -0
- package/dist/chunk-ke0hn0xr.js +260 -0
- package/dist/chunk-kehe7a71.js +41 -0
- package/dist/{chunk-1xkekb9y.js → chunk-kfd89dsd.js} +5 -3
- package/dist/chunk-ktjjb0k9.js +104 -0
- package/dist/{chunk-b74ht3xj.js → chunk-kxgcshx1.js} +78 -62
- package/dist/chunk-kz2fpejx.js +651 -0
- package/dist/{chunk-zvbpaaa1.js → chunk-kz3ctzg3.js} +110 -115
- package/dist/{chunk-72p24c9k.js → chunk-m268mm4c.js} +127 -188
- package/dist/{chunk-jafes477.js → chunk-m2bcpk8j.js} +4 -3
- package/dist/{chunk-4qv4z794.js → chunk-m32mdkts.js} +42 -31
- package/dist/chunk-m74w3187.js +164 -0
- package/dist/chunk-m7s7j422.js +166 -0
- package/dist/chunk-majhpxx5.js +594 -0
- package/dist/{chunk-q6av622g.js → chunk-mdk3xgya.js} +17 -13
- package/dist/{chunk-8bw3ft0x.js → chunk-mfcbez9a.js} +4 -4
- package/dist/{chunk-df6bwb4a.js → chunk-mj6w3ttg.js} +2 -2
- package/dist/{chunk-drrw55jr.js → chunk-mk6kj3q2.js} +1336 -2840
- package/dist/{chunk-vqr58rfh.js → chunk-mky388t4.js} +27 -67
- package/dist/chunk-mn61mk4v.js +351 -0
- package/dist/chunk-mx28h61f.js +1147 -0
- package/dist/chunk-my57sgky.js +883 -0
- package/dist/{chunk-k48thqgp.js → chunk-myk8saf6.js} +95 -190
- package/dist/chunk-n2zdmx4g.js +66 -0
- package/dist/{chunk-720qpv6d.js → chunk-n833arxq.js} +79 -63
- package/dist/{chunk-w2z5pqd3.js → chunk-n9ktjngj.js} +6 -6
- package/dist/{chunk-2tw2ve8h.js → chunk-nb2ntesh.js} +14 -10
- package/dist/{chunk-y18mc4m4.js → chunk-nbqv8ref.js} +10 -10
- package/dist/{chunk-74v9z7z4.js → chunk-nd4rncgd.js} +3 -13
- package/dist/chunk-nda50ze4.js +341 -0
- package/dist/{chunk-gb2q3nvc.js → chunk-nea2sah6.js} +5 -5
- package/dist/{chunk-t36rb2a8.js → chunk-nefsxetf.js} +294 -500
- package/dist/chunk-netzwgv1.js +154 -0
- package/dist/chunk-nfk9e540.js +107 -0
- package/dist/{chunk-xszk7n10.js → chunk-nh3cd07f.js} +1 -1
- package/dist/chunk-njq2hmjy.js +270 -0
- package/dist/chunk-nn5j7h8a.js +156 -0
- package/dist/{chunk-6fjab2dp.js → chunk-nrvkwzmq.js} +2 -2
- package/dist/chunk-nsextsmp.js +360 -0
- package/dist/{chunk-amhzxqj4.js → chunk-nt90fta7.js} +5 -5
- package/dist/{chunk-qbx1rq4f.js → chunk-p6sqbnqb.js} +193 -327
- package/dist/chunk-p8c23zr7.js +61 -0
- package/dist/chunk-p8enbwjk.js +183 -0
- package/dist/chunk-p8yggvgf.js +436 -0
- package/dist/{chunk-96awg5tc.js → chunk-pcfhe19b.js} +80 -17
- package/dist/{chunk-sfq65q9w.js → chunk-pgv9sa3a.js} +10 -14
- package/dist/chunk-ppwjyveh.js +8 -0
- package/dist/chunk-ppxvfp6m.js +424 -0
- package/dist/{chunk-zsfxha74.js → chunk-pshjyzq4.js} +8 -7
- package/dist/{chunk-35x3tjnr.js → chunk-pwr83fyy.js} +14 -8
- package/dist/chunk-q1976kze.js +473 -0
- package/dist/chunk-q387p8pp.js +943 -0
- package/dist/{chunk-b6av9ny9.js → chunk-q3ffkhnp.js} +132 -20
- package/dist/{chunk-w7wgpqcp.js → chunk-q50q8mc5.js} +7 -7
- package/dist/{chunk-e5pntxye.js → chunk-q7tpyeb3.js} +6 -4
- package/dist/{chunk-7ymfj7m3.js → chunk-q82r31er.js} +1 -1
- package/dist/chunk-qajrkk97.js +298 -0
- package/dist/chunk-qdazcrd7.js +362 -0
- package/dist/chunk-qhwvhgty.js +61 -0
- package/dist/{chunk-455a8z6g.js → chunk-qqk0kvsw.js} +138 -98
- package/dist/chunk-qqya1xyt.js +513 -0
- package/dist/{chunk-mzdwvbb0.js → chunk-qs6wypj1.js} +2 -2
- package/dist/chunk-qtahf5s5.js +113 -0
- package/dist/{chunk-tj79kfmn.js → chunk-qv9phqbv.js} +7 -7
- package/dist/{chunk-r5k04v8g.js → chunk-qyygv221.js} +13 -9
- package/dist/{chunk-zfc67eqj.js → chunk-r34f6vwc.js} +4 -4
- package/dist/{chunk-nerv0jvx.js → chunk-r59rgjxq.js} +1 -1
- package/dist/{chunk-7sb5axvf.js → chunk-r7j395t6.js} +2 -2
- package/dist/chunk-rb31sqzm.js +106 -0
- package/dist/{chunk-twsxz9ph.js → chunk-rbwy1qmm.js} +42 -31
- package/dist/{chunk-99t8enmg.js → chunk-re3crc6t.js} +10 -7
- package/dist/chunk-rhw4ayb1.js +6851 -0
- package/dist/{chunk-h6wtwdk0.js → chunk-rm31ynek.js} +8 -8
- package/dist/{chunk-eqrh0yjm.js → chunk-rr4e4axp.js} +2 -2
- package/dist/{chunk-neh2frnn.js → chunk-rs8304k5.js} +6 -6
- package/dist/{chunk-gax0fcbx.js → chunk-s1s8qfdh.js} +5 -5
- package/dist/{chunk-src9fqj8.js → chunk-s2483y2h.js} +3 -3
- package/dist/chunk-s2nhzjmt.js +113 -0
- package/dist/{chunk-7jma9mhn.js → chunk-sfhws681.js} +77 -61
- package/dist/{chunk-e3g8q4cn.js → chunk-sg66v252.js} +10 -8
- package/dist/{chunk-vp25xhav.js → chunk-szyt0xvf.js} +69 -78
- package/dist/{chunk-v7455ztd.js → chunk-t7j91et3.js} +86 -67
- package/dist/{chunk-mt25echc.js → chunk-tezak8rx.js} +1 -1
- package/dist/chunk-tf1p9trz.js +190 -0
- package/dist/{chunk-05gxvwvf.js → chunk-tm82sqkr.js} +96 -79
- package/dist/chunk-tpjetyb0.js +106 -0
- package/dist/chunk-trxvrrac.js +149 -0
- package/dist/chunk-tv9pcdnz.js +51 -0
- package/dist/{chunk-e5tfw9f7.js → chunk-twh7pzm8.js} +248 -307
- package/dist/{chunk-1x2wb3tc.js → chunk-txfvkh0w.js} +8 -8
- package/dist/chunk-var1et7e.js +66 -0
- package/dist/{chunk-se7v9emp.js → chunk-vbhvx4ma.js} +12 -10
- package/dist/{chunk-hqmz36b3.js → chunk-vf612n57.js} +21 -101
- package/dist/{chunk-3sdp7ds7.js → chunk-vfcty2ga.js} +10 -10
- package/dist/chunk-vhhyv8z8.js +147 -0
- package/dist/{chunk-48z7dgy1.js → chunk-vjcxs86z.js} +3 -3
- package/dist/{chunk-k5bpc8d5.js → chunk-vmnf3h9c.js} +43 -32
- package/dist/{chunk-fpjeh2em.js → chunk-vr7wmmyn.js} +17 -13
- package/dist/{chunk-9ewmqkgb.js → chunk-vxp2mhqy.js} +8 -8
- package/dist/{chunk-d238zp4m.js → chunk-w4gwnrwa.js} +2 -2
- package/dist/{chunk-jhsywyw8.js → chunk-wahkzh83.js} +9 -9
- package/dist/chunk-wdd4en5q.js +117 -0
- package/dist/{chunk-gm2m2yba.js → chunk-wgfnd174.js} +43 -32
- package/dist/chunk-wk1jw4dm.js +139 -0
- package/dist/chunk-wnpjc8hg.js +1018 -0
- package/dist/chunk-wv1t041q.js +151 -0
- package/dist/chunk-wvtmrmaj.js +130 -0
- package/dist/chunk-wyavftcj.js +103 -0
- package/dist/{chunk-4589pec2.js → chunk-x2dp18yj.js} +18 -46
- package/dist/{chunk-fj4hkg6k.js → chunk-x474ybns.js} +79 -110
- package/dist/chunk-x67cvhb8.js +134 -0
- package/dist/chunk-x6r4v44b.js +8 -0
- package/dist/{chunk-s0xfxkys.js → chunk-xk9pxqqx.js} +6 -6
- package/dist/{chunk-m06q12hg.js → chunk-xkt36p6r.js} +1 -1
- package/dist/{chunk-g653q217.js → chunk-xnav6j8h.js} +62 -374
- package/dist/chunk-xrjb0zyc.js +146 -0
- package/dist/chunk-xv3era3s.js +8 -0
- package/dist/{chunk-p7g7pf3f.js → chunk-y3r7v9pq.js} +4 -4
- package/dist/{chunk-3sagmdbp.js → chunk-y4szkj7r.js} +80 -64
- package/dist/{chunk-7d2700y8.js → chunk-y8syxjw1.js} +24 -54
- package/dist/chunk-y98z50mm.js +158 -0
- package/dist/chunk-ycrfxq10.js +123 -0
- package/dist/{chunk-8440dz44.js → chunk-yfjzdc0q.js} +9 -9
- package/dist/{chunk-cejskpky.js → chunk-ygf7pmmr.js} +145 -153
- package/dist/chunk-yha3z3ab.js +259 -0
- package/dist/chunk-ym5r3jnk.js +2007 -0
- package/dist/{chunk-28r6z9br.js → chunk-ys2gtqb0.js} +1 -3
- package/dist/{chunk-rzgtgtaf.js → chunk-ytg2n0dd.js} +7 -7
- package/dist/{chunk-q5hb65kq.js → chunk-ytzw9kw1.js} +78 -62
- package/dist/chunk-yzx3mhfd.js +110 -0
- package/dist/chunk-z1bs6d7k.js +24 -0
- package/dist/{chunk-6h9zcxaa.js → chunk-z1mvcq39.js} +4 -4
- package/dist/{chunk-gbq6jz9a.js → chunk-z3qhctbk.js} +134 -170
- package/dist/chunk-z9jn3442.js +146 -0
- package/dist/{chunk-5q7c8vt9.js → chunk-zbsz51qa.js} +41 -32
- package/dist/{chunk-n1erf6kh.js → chunk-ze6zvkg6.js} +5 -5
- package/dist/{chunk-t0rgmccj.js → chunk-zejm280k.js} +1 -1
- package/dist/{chunk-gfkppe34.js → chunk-zf47p99b.js} +10 -10
- package/dist/{chunk-53nbpp47.js → chunk-zhtrjznv.js} +557 -1502
- package/dist/{chunk-das977za.js → chunk-zq6tz1zv.js} +61 -100
- package/dist/chunk-zrw9gm80.js +264 -0
- package/dist/chunk-zseb1639.js +37 -0
- package/dist/{chunk-spqaamnc.js → chunk-zsgha506.js} +2 -2
- package/dist/chunk-zst7b4sp.js +2840 -0
- package/dist/{chunk-0xn1zr3e.js → chunk-zxkzzpgd.js} +145 -121
- package/dist/{chunk-g3t0act8.js → chunk-zzm33q8x.js} +1 -1
- package/dist/cli.js +20 -117
- package/dist/download-ripgrep.js +24821 -0
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/package.json +22 -14
- package/scripts/download-ripgrep.ts +335 -0
- package/scripts/postinstall.cjs +319 -0
- package/dist/chunk-0gemty6d.js +0 -70
- package/dist/chunk-0pjw8y9z.js +0 -2833
- package/dist/chunk-1c8z1b5v.js +0 -16
- package/dist/chunk-1ebedmba.js +0 -90
- package/dist/chunk-1rvz0433.js +0 -722
- package/dist/chunk-1wfb8e3m.js +0 -107
- package/dist/chunk-2qjywwq4.js +0 -3445
- package/dist/chunk-2y659zbj.js +0 -103
- package/dist/chunk-41md7gny.js +0 -91
- package/dist/chunk-45m062tx.js +0 -2058
- package/dist/chunk-4br37gsw.js +0 -107
- package/dist/chunk-4nfrc6sq.js +0 -2431
- package/dist/chunk-4pdedeb4.js +0 -2644
- package/dist/chunk-4wzyhqbt.js +0 -444
- package/dist/chunk-4zsw4fhp.js +0 -67
- package/dist/chunk-52wv09zw.js +0 -102
- package/dist/chunk-55sfqnz4.js +0 -1921
- package/dist/chunk-5cd9cptq.js +0 -110
- package/dist/chunk-5dbk24zg.js +0 -890
- package/dist/chunk-5tfppbkq.js +0 -55
- package/dist/chunk-60xyrp86.js +0 -117
- package/dist/chunk-6deqb0mc.js +0 -376
- package/dist/chunk-6kpbgc5w.js +0 -23
- package/dist/chunk-6ndpfxcn.js +0 -222
- package/dist/chunk-7nvpa5ex.js +0 -123
- package/dist/chunk-7va8tw32.js +0 -128
- package/dist/chunk-7z3tkgec.js +0 -66
- package/dist/chunk-8e8set87.js +0 -281
- package/dist/chunk-8fg1egbv.js +0 -107
- package/dist/chunk-8thd6sgk.js +0 -106
- package/dist/chunk-8ytkb7k9.js +0 -84
- package/dist/chunk-9s5nkgsg.js +0 -699
- package/dist/chunk-9wce9hrc.js +0 -1015
- package/dist/chunk-9y91z69v.js +0 -44
- package/dist/chunk-ae76ded0.js +0 -30
- package/dist/chunk-b0eez8w0.js +0 -169
- package/dist/chunk-b57sb1dw.js +0 -642
- package/dist/chunk-bg3mt9bm.js +0 -28
- package/dist/chunk-bhdt6k7w.js +0 -15
- package/dist/chunk-bm1qb16p.js +0 -17
- package/dist/chunk-bsbmmfyt.js +0 -17
- package/dist/chunk-c7q12yes.js +0 -269
- package/dist/chunk-cv6y320h.js +0 -299
- package/dist/chunk-cvy3vntc.js +0 -65
- package/dist/chunk-cy2hswr1.js +0 -15
- package/dist/chunk-d5d398m4.js +0 -184
- package/dist/chunk-d7q4zp2z.js +0 -89
- package/dist/chunk-dnk519qv.js +0 -94
- package/dist/chunk-dqqde43e.js +0 -93
- package/dist/chunk-dy4ayw0p.js +0 -522
- package/dist/chunk-e4ak3jfc.js +0 -1154
- package/dist/chunk-e64spn53.js +0 -283
- package/dist/chunk-e8pk14j0.js +0 -527
- package/dist/chunk-eashsrsv.js +0 -88
- package/dist/chunk-eb90vwvr.js +0 -152
- package/dist/chunk-ese2g7hc.js +0 -92
- package/dist/chunk-et4jnyb5.js +0 -713
- package/dist/chunk-fdy0651p.js +0 -212
- package/dist/chunk-frsyts9j.js +0 -1170
- package/dist/chunk-ft2jssz4.js +0 -424
- package/dist/chunk-g41hzcy2.js +0 -101
- package/dist/chunk-g8dr8vvj.js +0 -111
- package/dist/chunk-gj71pd83.js +0 -5395
- package/dist/chunk-gjdwtdch.js +0 -154
- package/dist/chunk-gyj242zr.js +0 -20
- package/dist/chunk-hr719wjg.js +0 -144
- package/dist/chunk-hs8ph4p8.js +0 -8
- package/dist/chunk-j7gpr82p.js +0 -105
- package/dist/chunk-jczedp5x.js +0 -91
- package/dist/chunk-jd0t67a6.js +0 -259
- package/dist/chunk-jgyp3mzg.js +0 -1318
- package/dist/chunk-jq1kp9yy.js +0 -90
- package/dist/chunk-jskhn7bz.js +0 -71
- package/dist/chunk-k5aas9d3.js +0 -6108
- package/dist/chunk-k8jcy7mj.js +0 -48
- package/dist/chunk-ka22ccvm.js +0 -1581
- package/dist/chunk-ka6jav10.js +0 -91
- package/dist/chunk-kq6j096k.js +0 -538
- package/dist/chunk-kqd0e3xj.js +0 -463
- package/dist/chunk-kqjrsah4.js +0 -85
- package/dist/chunk-m390jta5.js +0 -114
- package/dist/chunk-m44a9yfj.js +0 -90
- package/dist/chunk-m5c8ng6v.js +0 -328
- package/dist/chunk-meag7bbe.js +0 -89
- package/dist/chunk-mnsrmwn8.js +0 -604
- package/dist/chunk-mzj4mtye.js +0 -115
- package/dist/chunk-mzy911jq.js +0 -128
- package/dist/chunk-n0fwapk6.js +0 -347
- package/dist/chunk-nt0mgsh6.js +0 -496
- package/dist/chunk-nwcfrws3.js +0 -273
- package/dist/chunk-pa2xksyb.js +0 -57
- package/dist/chunk-pnhs96g8.js +0 -140
- package/dist/chunk-ps4c75j7.js +0 -105
- package/dist/chunk-q0yg73za.js +0 -490
- package/dist/chunk-q5by3da6.js +0 -8
- package/dist/chunk-qbmhde47.js +0 -92
- package/dist/chunk-qp3dw7b4.js +0 -100
- package/dist/chunk-qt0b9x2w.js +0 -42
- package/dist/chunk-qxe98jgk.js +0 -584
- package/dist/chunk-r7n42k56.js +0 -756
- package/dist/chunk-radsjrmv.js +0 -55
- package/dist/chunk-rckj9gd1.js +0 -55
- package/dist/chunk-rn4kqfvd.js +0 -99
- package/dist/chunk-rngmdt2v.js +0 -97
- package/dist/chunk-rs5e0520.js +0 -87
- package/dist/chunk-s274nv8k.js +0 -8
- package/dist/chunk-s7t2e2tw.js +0 -1493
- package/dist/chunk-sbbt0ct3.js +0 -90
- package/dist/chunk-t0mnk0qp.js +0 -105
- package/dist/chunk-t1qmy36p.js +0 -94
- package/dist/chunk-tdy66rf9.js +0 -116
- package/dist/chunk-tf40vqky.js +0 -70
- package/dist/chunk-tmcxeatp.js +0 -116
- package/dist/chunk-v3gm2day.js +0 -8
- package/dist/chunk-v496te8v.js +0 -192
- package/dist/chunk-vd2hwk8d.js +0 -61
- package/dist/chunk-vdsmt7v0.js +0 -998
- package/dist/chunk-vf3qxte3.js +0 -93
- package/dist/chunk-vfqe1jqj.js +0 -643
- package/dist/chunk-vk3270s6.js +0 -119
- package/dist/chunk-vsr9mbnq.js +0 -195
- package/dist/chunk-w18zryr9.js +0 -348
- package/dist/chunk-wdxcgk6m.js +0 -196
- package/dist/chunk-wef07p3j.js +0 -131
- package/dist/chunk-wf4q1xj3.js +0 -62
- package/dist/chunk-wjq4zq3t.js +0 -162
- package/dist/chunk-wp4hc4n7.js +0 -133
- package/dist/chunk-x0rjttct.js +0 -420
- package/dist/chunk-xdw5dv00.js +0 -8
- package/dist/chunk-xm8fv5c9.js +0 -469
- package/dist/chunk-xq5ztz4g.js +0 -130
- package/dist/chunk-xvcdtezw.js +0 -401
- package/dist/chunk-y7njq3z3.js +0 -1866
- package/dist/chunk-ycxwftfh.js +0 -97
- package/dist/chunk-yn38f69a.js +0 -105
- package/dist/chunk-yp5kc8hq.js +0 -372
- package/dist/chunk-z09n2krq.js +0 -752
- package/dist/chunk-zerg8qwf.js +0 -96
- package/dist/{chunk-p452k1xp.js → chunk-57s5mr32.js} +9 -9
- package/dist/{chunk-27xc1csx.js → chunk-dggvswz1.js} +3 -3
- package/dist/{chunk-zxzwfa0b.js → chunk-pbyq1tm3.js} +3 -3
package/dist/chunk-2qjywwq4.js
DELETED
|
@@ -1,3445 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
OAuthService,
|
|
4
|
-
Select,
|
|
5
|
-
SelectMulti,
|
|
6
|
-
Spinner,
|
|
7
|
-
TextInput,
|
|
8
|
-
init_CustomSelect,
|
|
9
|
-
init_SelectMulti,
|
|
10
|
-
init_Spinner,
|
|
11
|
-
init_TextInput,
|
|
12
|
-
init_oauth
|
|
13
|
-
} from "./chunk-5frcqxsv.js";
|
|
14
|
-
import"./chunk-t0rgmccj.js";
|
|
15
|
-
import"./chunk-gb2q3nvc.js";
|
|
16
|
-
import"./chunk-neh2frnn.js";
|
|
17
|
-
import"./chunk-q6b51yc5.js";
|
|
18
|
-
import"./chunk-gfkppe34.js";
|
|
19
|
-
import {
|
|
20
|
-
Byline,
|
|
21
|
-
ConfigurableShortcutHint,
|
|
22
|
-
Dialog,
|
|
23
|
-
KeyboardShortcutHint,
|
|
24
|
-
init_Byline,
|
|
25
|
-
init_ConfigurableShortcutHint,
|
|
26
|
-
init_Dialog,
|
|
27
|
-
init_KeyboardShortcutHint
|
|
28
|
-
} from "./chunk-kqd0e3xj.js";
|
|
29
|
-
import"./chunk-ehtwnxpg.js";
|
|
30
|
-
import"./chunk-3be7ka25.js";
|
|
31
|
-
import"./chunk-xe6z85xc.js";
|
|
32
|
-
import"./chunk-2gzv8nrw.js";
|
|
33
|
-
import"./chunk-cgfdkzhb.js";
|
|
34
|
-
import"./chunk-bhdt6k7w.js";
|
|
35
|
-
import"./chunk-45kxdsp8.js";
|
|
36
|
-
import"./chunk-5dbk24zg.js";
|
|
37
|
-
import"./chunk-pxrffn0w.js";
|
|
38
|
-
import"./chunk-0nt9md2b.js";
|
|
39
|
-
import {
|
|
40
|
-
init_useExitOnCtrlCDWithKeybindings,
|
|
41
|
-
useExitOnCtrlCDWithKeybindings
|
|
42
|
-
} from "./chunk-rn4kqfvd.js";
|
|
43
|
-
import"./chunk-9gbamk79.js";
|
|
44
|
-
import"./chunk-n8sjmqba.js";
|
|
45
|
-
import"./chunk-9e2kqv5g.js";
|
|
46
|
-
import {
|
|
47
|
-
init_useKeybinding,
|
|
48
|
-
init_useTerminalSize,
|
|
49
|
-
useKeybinding,
|
|
50
|
-
useKeybindings,
|
|
51
|
-
useTerminalSize
|
|
52
|
-
} from "./chunk-g653q217.js";
|
|
53
|
-
import {
|
|
54
|
-
Link,
|
|
55
|
-
ThemedBox_default,
|
|
56
|
-
ThemedText,
|
|
57
|
-
color,
|
|
58
|
-
init_ink,
|
|
59
|
-
init_osc,
|
|
60
|
-
require_compiler_runtime,
|
|
61
|
-
setClipboard,
|
|
62
|
-
useTheme
|
|
63
|
-
} from "./chunk-z72st5c8.js";
|
|
64
|
-
import"./chunk-7m2nd8da.js";
|
|
65
|
-
import"./chunk-ps49ymvj.js";
|
|
66
|
-
import {
|
|
67
|
-
require_jsx_dev_runtime,
|
|
68
|
-
require_react
|
|
69
|
-
} from "./chunk-g338npwr.js";
|
|
70
|
-
import"./chunk-zk2wsm7d.js";
|
|
71
|
-
import"./chunk-35x3tjnr.js";
|
|
72
|
-
import {
|
|
73
|
-
init_browser,
|
|
74
|
-
openBrowser
|
|
75
|
-
} from "./chunk-m06q12hg.js";
|
|
76
|
-
import"./chunk-40b8p5em.js";
|
|
77
|
-
import"./chunk-s0xfxkys.js";
|
|
78
|
-
import"./chunk-spqaamnc.js";
|
|
79
|
-
import"./chunk-4jm600zv.js";
|
|
80
|
-
import"./chunk-7sb5axvf.js";
|
|
81
|
-
import"./chunk-v9smspw2.js";
|
|
82
|
-
import"./chunk-qz2x630m.js";
|
|
83
|
-
import {
|
|
84
|
-
getAnthropicApiKey,
|
|
85
|
-
init_auth,
|
|
86
|
-
init_config1 as init_config,
|
|
87
|
-
init_stringUtils,
|
|
88
|
-
isAnthropicAuthEnabled,
|
|
89
|
-
plural,
|
|
90
|
-
saveGlobalConfig,
|
|
91
|
-
saveOAuthTokensIfNeeded
|
|
92
|
-
} from "./chunk-53nbpp47.js";
|
|
93
|
-
import"./chunk-e3g8q4cn.js";
|
|
94
|
-
import"./chunk-ctw5jwcd.js";
|
|
95
|
-
import"./chunk-fw49pe3p.js";
|
|
96
|
-
import"./chunk-0e1xsncc.js";
|
|
97
|
-
import"./chunk-vratq94g.js";
|
|
98
|
-
import"./chunk-g0j0t6qk.js";
|
|
99
|
-
import"./chunk-6kpbgc5w.js";
|
|
100
|
-
import"./chunk-3c25bcsw.js";
|
|
101
|
-
import"./chunk-tjaqa99q.js";
|
|
102
|
-
import"./chunk-55wgxwa9.js";
|
|
103
|
-
import"./chunk-w2z5pqd3.js";
|
|
104
|
-
import"./chunk-7ymfj7m3.js";
|
|
105
|
-
import"./chunk-f5ma3nh5.js";
|
|
106
|
-
import"./chunk-v1kzp02e.js";
|
|
107
|
-
import"./chunk-p2816w9z.js";
|
|
108
|
-
import"./chunk-0vkfrmqm.js";
|
|
109
|
-
import"./chunk-0xjaqda8.js";
|
|
110
|
-
import"./chunk-1rvz0433.js";
|
|
111
|
-
import"./chunk-cdz5yb0r.js";
|
|
112
|
-
import {
|
|
113
|
-
init_analytics,
|
|
114
|
-
logEvent
|
|
115
|
-
} from "./chunk-f2mhrmww.js";
|
|
116
|
-
import"./chunk-7z8j9qfn.js";
|
|
117
|
-
import {
|
|
118
|
-
getGithubRepo,
|
|
119
|
-
init_git
|
|
120
|
-
} from "./chunk-hrzerbfw.js";
|
|
121
|
-
import"./chunk-d18z9pna.js";
|
|
122
|
-
import"./chunk-qnfx3qtx.js";
|
|
123
|
-
import"./chunk-hjhc4cpt.js";
|
|
124
|
-
import"./chunk-vyc0rjyx.js";
|
|
125
|
-
import {
|
|
126
|
-
execFileNoThrow,
|
|
127
|
-
execa,
|
|
128
|
-
figures_default,
|
|
129
|
-
init_execFileNoThrow,
|
|
130
|
-
init_execa,
|
|
131
|
-
init_figures
|
|
132
|
-
} from "./chunk-hx2tr4ep.js";
|
|
133
|
-
import {
|
|
134
|
-
init_log,
|
|
135
|
-
logError
|
|
136
|
-
} from "./chunk-p7g7pf3f.js";
|
|
137
|
-
import"./chunk-8tnsngw2.js";
|
|
138
|
-
import"./chunk-8bedvdm1.js";
|
|
139
|
-
import"./chunk-7wm5s02e.js";
|
|
140
|
-
import"./chunk-nxsh6de2.js";
|
|
141
|
-
import"./chunk-fbv4apne.js";
|
|
142
|
-
import"./chunk-3r24h7t6.js";
|
|
143
|
-
import"./chunk-qqfa0dqg.js";
|
|
144
|
-
import"./chunk-hqmz36b3.js";
|
|
145
|
-
import"./chunk-4g3v8y12.js";
|
|
146
|
-
import"./chunk-7739pg2c.js";
|
|
147
|
-
import"./chunk-xszk7n10.js";
|
|
148
|
-
import"./chunk-sdj9b9wh.js";
|
|
149
|
-
import {
|
|
150
|
-
__esm,
|
|
151
|
-
__toESM
|
|
152
|
-
} from "./chunk-qp2qdcda.js";
|
|
153
|
-
|
|
154
|
-
// src/components/WorkflowMultiselectDialog.tsx
|
|
155
|
-
function renderInputGuide(exitState) {
|
|
156
|
-
if (exitState.pending) {
|
|
157
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
158
|
-
children: [
|
|
159
|
-
"Press ",
|
|
160
|
-
exitState.keyName,
|
|
161
|
-
" again to exit"
|
|
162
|
-
]
|
|
163
|
-
}, undefined, true, undefined, this);
|
|
164
|
-
}
|
|
165
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Byline, {
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(KeyboardShortcutHint, {
|
|
168
|
-
shortcut: "\u2191\u2193",
|
|
169
|
-
action: "navigate"
|
|
170
|
-
}, undefined, false, undefined, this),
|
|
171
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(KeyboardShortcutHint, {
|
|
172
|
-
shortcut: "Space",
|
|
173
|
-
action: "toggle"
|
|
174
|
-
}, undefined, false, undefined, this),
|
|
175
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(KeyboardShortcutHint, {
|
|
176
|
-
shortcut: "Enter",
|
|
177
|
-
action: "confirm"
|
|
178
|
-
}, undefined, false, undefined, this),
|
|
179
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ConfigurableShortcutHint, {
|
|
180
|
-
action: "confirm:no",
|
|
181
|
-
context: "Confirmation",
|
|
182
|
-
fallback: "Esc",
|
|
183
|
-
description: "cancel"
|
|
184
|
-
}, undefined, false, undefined, this)
|
|
185
|
-
]
|
|
186
|
-
}, undefined, true, undefined, this);
|
|
187
|
-
}
|
|
188
|
-
function WorkflowMultiselectDialog(t0) {
|
|
189
|
-
const $ = import_compiler_runtime.c(14);
|
|
190
|
-
const {
|
|
191
|
-
onSubmit,
|
|
192
|
-
defaultSelections
|
|
193
|
-
} = t0;
|
|
194
|
-
const [showError, setShowError] = import_react.useState(false);
|
|
195
|
-
let t1;
|
|
196
|
-
if ($[0] !== onSubmit) {
|
|
197
|
-
t1 = (selectedValues) => {
|
|
198
|
-
if (selectedValues.length === 0) {
|
|
199
|
-
setShowError(true);
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
setShowError(false);
|
|
203
|
-
onSubmit(selectedValues);
|
|
204
|
-
};
|
|
205
|
-
$[0] = onSubmit;
|
|
206
|
-
$[1] = t1;
|
|
207
|
-
} else {
|
|
208
|
-
t1 = $[1];
|
|
209
|
-
}
|
|
210
|
-
const handleSubmit = t1;
|
|
211
|
-
let t2;
|
|
212
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
213
|
-
t2 = () => {
|
|
214
|
-
setShowError(false);
|
|
215
|
-
};
|
|
216
|
-
$[2] = t2;
|
|
217
|
-
} else {
|
|
218
|
-
t2 = $[2];
|
|
219
|
-
}
|
|
220
|
-
const handleChange = t2;
|
|
221
|
-
let t3;
|
|
222
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
223
|
-
t3 = () => {
|
|
224
|
-
setShowError(true);
|
|
225
|
-
};
|
|
226
|
-
$[3] = t3;
|
|
227
|
-
} else {
|
|
228
|
-
t3 = $[3];
|
|
229
|
-
}
|
|
230
|
-
const handleCancel = t3;
|
|
231
|
-
let t4;
|
|
232
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
233
|
-
t4 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
234
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
235
|
-
dimColor: true,
|
|
236
|
-
children: [
|
|
237
|
-
"More workflow examples (issue triage, CI fixes, etc.) at:",
|
|
238
|
-
" ",
|
|
239
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Link, {
|
|
240
|
-
url: "https://github.com/anthropics/claude-code-action/blob/main/examples/",
|
|
241
|
-
children: "https://github.com/anthropics/claude-code-action/blob/main/examples/"
|
|
242
|
-
}, undefined, false, undefined, this)
|
|
243
|
-
]
|
|
244
|
-
}, undefined, true, undefined, this)
|
|
245
|
-
}, undefined, false, undefined, this);
|
|
246
|
-
$[4] = t4;
|
|
247
|
-
} else {
|
|
248
|
-
t4 = $[4];
|
|
249
|
-
}
|
|
250
|
-
let t5;
|
|
251
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
252
|
-
t5 = WORKFLOWS.map(_temp);
|
|
253
|
-
$[5] = t5;
|
|
254
|
-
} else {
|
|
255
|
-
t5 = $[5];
|
|
256
|
-
}
|
|
257
|
-
let t6;
|
|
258
|
-
if ($[6] !== defaultSelections || $[7] !== handleSubmit) {
|
|
259
|
-
t6 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(SelectMulti, {
|
|
260
|
-
options: t5,
|
|
261
|
-
defaultValue: defaultSelections,
|
|
262
|
-
onSubmit: handleSubmit,
|
|
263
|
-
onChange: handleChange,
|
|
264
|
-
onCancel: handleCancel,
|
|
265
|
-
hideIndexes: true
|
|
266
|
-
}, undefined, false, undefined, this);
|
|
267
|
-
$[6] = defaultSelections;
|
|
268
|
-
$[7] = handleSubmit;
|
|
269
|
-
$[8] = t6;
|
|
270
|
-
} else {
|
|
271
|
-
t6 = $[8];
|
|
272
|
-
}
|
|
273
|
-
let t7;
|
|
274
|
-
if ($[9] !== showError) {
|
|
275
|
-
t7 = showError && /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedBox_default, {
|
|
276
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
277
|
-
color: "error",
|
|
278
|
-
children: "You must select at least one workflow to continue"
|
|
279
|
-
}, undefined, false, undefined, this)
|
|
280
|
-
}, undefined, false, undefined, this);
|
|
281
|
-
$[9] = showError;
|
|
282
|
-
$[10] = t7;
|
|
283
|
-
} else {
|
|
284
|
-
t7 = $[10];
|
|
285
|
-
}
|
|
286
|
-
let t8;
|
|
287
|
-
if ($[11] !== t6 || $[12] !== t7) {
|
|
288
|
-
t8 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
|
|
289
|
-
title: "Select GitHub workflows to install",
|
|
290
|
-
subtitle: "We'll create a workflow file in your repository for each one you select.",
|
|
291
|
-
onCancel: handleCancel,
|
|
292
|
-
inputGuide: renderInputGuide,
|
|
293
|
-
children: [
|
|
294
|
-
t4,
|
|
295
|
-
t6,
|
|
296
|
-
t7
|
|
297
|
-
]
|
|
298
|
-
}, undefined, true, undefined, this);
|
|
299
|
-
$[11] = t6;
|
|
300
|
-
$[12] = t7;
|
|
301
|
-
$[13] = t8;
|
|
302
|
-
} else {
|
|
303
|
-
t8 = $[13];
|
|
304
|
-
}
|
|
305
|
-
return t8;
|
|
306
|
-
}
|
|
307
|
-
function _temp(workflow) {
|
|
308
|
-
return {
|
|
309
|
-
label: workflow.label,
|
|
310
|
-
value: workflow.value
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
var import_compiler_runtime, import_react, jsx_dev_runtime, WORKFLOWS;
|
|
314
|
-
var init_WorkflowMultiselectDialog = __esm(() => {
|
|
315
|
-
init_ink();
|
|
316
|
-
init_ConfigurableShortcutHint();
|
|
317
|
-
init_SelectMulti();
|
|
318
|
-
init_Byline();
|
|
319
|
-
init_Dialog();
|
|
320
|
-
init_KeyboardShortcutHint();
|
|
321
|
-
import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
|
|
322
|
-
import_react = __toESM(require_react(), 1);
|
|
323
|
-
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
324
|
-
WORKFLOWS = [{
|
|
325
|
-
value: "claude",
|
|
326
|
-
label: "@Claude Code - Tag @claude in issues and PR comments"
|
|
327
|
-
}, {
|
|
328
|
-
value: "claude-review",
|
|
329
|
-
label: "Claude Code Review - Automated code review on new PRs"
|
|
330
|
-
}];
|
|
331
|
-
});
|
|
332
|
-
|
|
333
|
-
// src/constants/github-app.ts
|
|
334
|
-
var PR_TITLE = "Add Claude Code GitHub Workflow", GITHUB_ACTION_SETUP_DOCS_URL = "https://github.com/anthropics/claude-code-action/blob/main/docs/setup.md", WORKFLOW_CONTENT = `name: Claude Code
|
|
335
|
-
|
|
336
|
-
on:
|
|
337
|
-
issue_comment:
|
|
338
|
-
types: [created]
|
|
339
|
-
pull_request_review_comment:
|
|
340
|
-
types: [created]
|
|
341
|
-
issues:
|
|
342
|
-
types: [opened, assigned]
|
|
343
|
-
pull_request_review:
|
|
344
|
-
types: [submitted]
|
|
345
|
-
|
|
346
|
-
jobs:
|
|
347
|
-
claude:
|
|
348
|
-
if: |
|
|
349
|
-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
350
|
-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
351
|
-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
352
|
-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
|
353
|
-
runs-on: ubuntu-latest
|
|
354
|
-
permissions:
|
|
355
|
-
contents: read
|
|
356
|
-
pull-requests: read
|
|
357
|
-
issues: read
|
|
358
|
-
id-token: write
|
|
359
|
-
actions: read # Required for Claude to read CI results on PRs
|
|
360
|
-
steps:
|
|
361
|
-
- name: Checkout repository
|
|
362
|
-
uses: actions/checkout@v4
|
|
363
|
-
with:
|
|
364
|
-
fetch-depth: 1
|
|
365
|
-
|
|
366
|
-
- name: Run Claude Code
|
|
367
|
-
id: claude
|
|
368
|
-
uses: anthropics/claude-code-action@v1
|
|
369
|
-
with:
|
|
370
|
-
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
371
|
-
|
|
372
|
-
# This is an optional setting that allows Claude to read CI results on PRs
|
|
373
|
-
additional_permissions: |
|
|
374
|
-
actions: read
|
|
375
|
-
|
|
376
|
-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
|
377
|
-
# prompt: 'Update the pull request description to include a summary of changes.'
|
|
378
|
-
|
|
379
|
-
# Optional: Add claude_args to customize behavior and configuration
|
|
380
|
-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
381
|
-
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
382
|
-
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
|
383
|
-
|
|
384
|
-
`, PR_BODY = `## \uD83E\uDD16 Installing Claude Code GitHub App
|
|
385
|
-
|
|
386
|
-
This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.
|
|
387
|
-
|
|
388
|
-
### What is Claude Code?
|
|
389
|
-
|
|
390
|
-
[Claude Code](https://claude.com/claude-code) is an AI coding agent that can help with:
|
|
391
|
-
- Bug fixes and improvements
|
|
392
|
-
- Documentation updates
|
|
393
|
-
- Implementing new features
|
|
394
|
-
- Code reviews and suggestions
|
|
395
|
-
- Writing tests
|
|
396
|
-
- And more!
|
|
397
|
-
|
|
398
|
-
### How it works
|
|
399
|
-
|
|
400
|
-
Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
|
|
401
|
-
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
|
|
402
|
-
|
|
403
|
-
### Important Notes
|
|
404
|
-
|
|
405
|
-
- **This workflow won't take effect until this PR is merged**
|
|
406
|
-
- **@claude mentions won't work until after the merge is complete**
|
|
407
|
-
- The workflow runs automatically whenever Claude is mentioned in PR or issue comments
|
|
408
|
-
- Claude gets access to the entire PR or issue context including files, diffs, and previous comments
|
|
409
|
-
|
|
410
|
-
### Security
|
|
411
|
-
|
|
412
|
-
- Our Anthropic API key is securely stored as a GitHub Actions secret
|
|
413
|
-
- Only users with write access to the repository can trigger the workflow
|
|
414
|
-
- All Claude runs are stored in the GitHub Actions run history
|
|
415
|
-
- Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
|
|
416
|
-
- We can add more allowed tools by adding them to the workflow file like:
|
|
417
|
-
|
|
418
|
-
\`\`\`
|
|
419
|
-
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)
|
|
420
|
-
\`\`\`
|
|
421
|
-
|
|
422
|
-
There's more information in the [Claude Code action repo](https://github.com/anthropics/claude-code-action).
|
|
423
|
-
|
|
424
|
-
After merging this PR, let's try mentioning @claude in a comment on any PR to get started!`, CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT = `name: Claude Code Review
|
|
425
|
-
|
|
426
|
-
on:
|
|
427
|
-
pull_request:
|
|
428
|
-
types: [opened, synchronize, ready_for_review, reopened]
|
|
429
|
-
# Optional: Only run on specific file changes
|
|
430
|
-
# paths:
|
|
431
|
-
# - "src/**/*.ts"
|
|
432
|
-
# - "src/**/*.tsx"
|
|
433
|
-
# - "src/**/*.js"
|
|
434
|
-
# - "src/**/*.jsx"
|
|
435
|
-
|
|
436
|
-
jobs:
|
|
437
|
-
claude-review:
|
|
438
|
-
# Optional: Filter by PR author
|
|
439
|
-
# if: |
|
|
440
|
-
# github.event.pull_request.user.login == 'external-contributor' ||
|
|
441
|
-
# github.event.pull_request.user.login == 'new-developer' ||
|
|
442
|
-
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
|
443
|
-
|
|
444
|
-
runs-on: ubuntu-latest
|
|
445
|
-
permissions:
|
|
446
|
-
contents: read
|
|
447
|
-
pull-requests: read
|
|
448
|
-
issues: read
|
|
449
|
-
id-token: write
|
|
450
|
-
|
|
451
|
-
steps:
|
|
452
|
-
- name: Checkout repository
|
|
453
|
-
uses: actions/checkout@v4
|
|
454
|
-
with:
|
|
455
|
-
fetch-depth: 1
|
|
456
|
-
|
|
457
|
-
- name: Run Claude Code Review
|
|
458
|
-
id: claude-review
|
|
459
|
-
uses: anthropics/claude-code-action@v1
|
|
460
|
-
with:
|
|
461
|
-
anthropic_api_key: \${{ secrets.ANTHROPIC_API_KEY }}
|
|
462
|
-
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
|
463
|
-
plugins: 'code-review@claude-code-plugins'
|
|
464
|
-
prompt: '/code-review:code-review \${{ github.repository }}/pull/\${{ github.event.pull_request.number }}'
|
|
465
|
-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
466
|
-
# or https://code.claude.com/docs/en/cli-reference for available options
|
|
467
|
-
|
|
468
|
-
`;
|
|
469
|
-
var init_github_app = () => {};
|
|
470
|
-
|
|
471
|
-
// src/commands/install-github-app/ApiKeyStep.tsx
|
|
472
|
-
function ApiKeyStep(t0) {
|
|
473
|
-
const $ = import_compiler_runtime2.c(55);
|
|
474
|
-
const {
|
|
475
|
-
existingApiKey,
|
|
476
|
-
apiKeyOrOAuthToken,
|
|
477
|
-
onApiKeyChange,
|
|
478
|
-
onSubmit,
|
|
479
|
-
onToggleUseExistingKey,
|
|
480
|
-
onCreateOAuthToken,
|
|
481
|
-
selectedOption: t1,
|
|
482
|
-
onSelectOption
|
|
483
|
-
} = t0;
|
|
484
|
-
const selectedOption = t1 === undefined ? existingApiKey ? "existing" : onCreateOAuthToken ? "oauth" : "new" : t1;
|
|
485
|
-
const [cursorOffset, setCursorOffset] = import_react2.useState(0);
|
|
486
|
-
const terminalSize = useTerminalSize();
|
|
487
|
-
const [theme] = useTheme();
|
|
488
|
-
let t2;
|
|
489
|
-
if ($[0] !== existingApiKey || $[1] !== onCreateOAuthToken || $[2] !== onSelectOption || $[3] !== onToggleUseExistingKey || $[4] !== selectedOption) {
|
|
490
|
-
t2 = () => {
|
|
491
|
-
if (selectedOption === "new" && onCreateOAuthToken) {
|
|
492
|
-
onSelectOption?.("oauth");
|
|
493
|
-
} else {
|
|
494
|
-
if (selectedOption === "oauth" && existingApiKey) {
|
|
495
|
-
onSelectOption?.("existing");
|
|
496
|
-
onToggleUseExistingKey(true);
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
|
-
$[0] = existingApiKey;
|
|
501
|
-
$[1] = onCreateOAuthToken;
|
|
502
|
-
$[2] = onSelectOption;
|
|
503
|
-
$[3] = onToggleUseExistingKey;
|
|
504
|
-
$[4] = selectedOption;
|
|
505
|
-
$[5] = t2;
|
|
506
|
-
} else {
|
|
507
|
-
t2 = $[5];
|
|
508
|
-
}
|
|
509
|
-
const handlePrevious = t2;
|
|
510
|
-
let t3;
|
|
511
|
-
if ($[6] !== onCreateOAuthToken || $[7] !== onSelectOption || $[8] !== onToggleUseExistingKey || $[9] !== selectedOption) {
|
|
512
|
-
t3 = () => {
|
|
513
|
-
if (selectedOption === "existing") {
|
|
514
|
-
onSelectOption?.(onCreateOAuthToken ? "oauth" : "new");
|
|
515
|
-
onToggleUseExistingKey(false);
|
|
516
|
-
} else {
|
|
517
|
-
if (selectedOption === "oauth") {
|
|
518
|
-
onSelectOption?.("new");
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
$[6] = onCreateOAuthToken;
|
|
523
|
-
$[7] = onSelectOption;
|
|
524
|
-
$[8] = onToggleUseExistingKey;
|
|
525
|
-
$[9] = selectedOption;
|
|
526
|
-
$[10] = t3;
|
|
527
|
-
} else {
|
|
528
|
-
t3 = $[10];
|
|
529
|
-
}
|
|
530
|
-
const handleNext = t3;
|
|
531
|
-
let t4;
|
|
532
|
-
if ($[11] !== onCreateOAuthToken || $[12] !== onSubmit || $[13] !== selectedOption) {
|
|
533
|
-
t4 = () => {
|
|
534
|
-
if (selectedOption === "oauth" && onCreateOAuthToken) {
|
|
535
|
-
onCreateOAuthToken();
|
|
536
|
-
} else {
|
|
537
|
-
onSubmit();
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
$[11] = onCreateOAuthToken;
|
|
541
|
-
$[12] = onSubmit;
|
|
542
|
-
$[13] = selectedOption;
|
|
543
|
-
$[14] = t4;
|
|
544
|
-
} else {
|
|
545
|
-
t4 = $[14];
|
|
546
|
-
}
|
|
547
|
-
const handleConfirm = t4;
|
|
548
|
-
const isTextInputVisible = selectedOption === "new";
|
|
549
|
-
let t5;
|
|
550
|
-
if ($[15] !== handleConfirm || $[16] !== handleNext || $[17] !== handlePrevious) {
|
|
551
|
-
t5 = {
|
|
552
|
-
"confirm:previous": handlePrevious,
|
|
553
|
-
"confirm:next": handleNext,
|
|
554
|
-
"confirm:yes": handleConfirm
|
|
555
|
-
};
|
|
556
|
-
$[15] = handleConfirm;
|
|
557
|
-
$[16] = handleNext;
|
|
558
|
-
$[17] = handlePrevious;
|
|
559
|
-
$[18] = t5;
|
|
560
|
-
} else {
|
|
561
|
-
t5 = $[18];
|
|
562
|
-
}
|
|
563
|
-
const t6 = !isTextInputVisible;
|
|
564
|
-
let t7;
|
|
565
|
-
if ($[19] !== t6) {
|
|
566
|
-
t7 = {
|
|
567
|
-
context: "Confirmation",
|
|
568
|
-
isActive: t6
|
|
569
|
-
};
|
|
570
|
-
$[19] = t6;
|
|
571
|
-
$[20] = t7;
|
|
572
|
-
} else {
|
|
573
|
-
t7 = $[20];
|
|
574
|
-
}
|
|
575
|
-
useKeybindings(t5, t7);
|
|
576
|
-
let t8;
|
|
577
|
-
if ($[21] !== handleNext || $[22] !== handlePrevious) {
|
|
578
|
-
t8 = {
|
|
579
|
-
"confirm:previous": handlePrevious,
|
|
580
|
-
"confirm:next": handleNext
|
|
581
|
-
};
|
|
582
|
-
$[21] = handleNext;
|
|
583
|
-
$[22] = handlePrevious;
|
|
584
|
-
$[23] = t8;
|
|
585
|
-
} else {
|
|
586
|
-
t8 = $[23];
|
|
587
|
-
}
|
|
588
|
-
let t9;
|
|
589
|
-
if ($[24] !== isTextInputVisible) {
|
|
590
|
-
t9 = {
|
|
591
|
-
context: "Confirmation",
|
|
592
|
-
isActive: isTextInputVisible
|
|
593
|
-
};
|
|
594
|
-
$[24] = isTextInputVisible;
|
|
595
|
-
$[25] = t9;
|
|
596
|
-
} else {
|
|
597
|
-
t9 = $[25];
|
|
598
|
-
}
|
|
599
|
-
useKeybindings(t8, t9);
|
|
600
|
-
let t10;
|
|
601
|
-
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
602
|
-
t10 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
603
|
-
flexDirection: "column",
|
|
604
|
-
marginBottom: 1,
|
|
605
|
-
children: [
|
|
606
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
607
|
-
bold: true,
|
|
608
|
-
children: "Install GitHub App"
|
|
609
|
-
}, undefined, false, undefined, this),
|
|
610
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
611
|
-
dimColor: true,
|
|
612
|
-
children: "Choose API key"
|
|
613
|
-
}, undefined, false, undefined, this)
|
|
614
|
-
]
|
|
615
|
-
}, undefined, true, undefined, this);
|
|
616
|
-
$[26] = t10;
|
|
617
|
-
} else {
|
|
618
|
-
t10 = $[26];
|
|
619
|
-
}
|
|
620
|
-
let t11;
|
|
621
|
-
if ($[27] !== existingApiKey || $[28] !== selectedOption || $[29] !== theme) {
|
|
622
|
-
t11 = existingApiKey && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
623
|
-
marginBottom: 1,
|
|
624
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
625
|
-
children: [
|
|
626
|
-
selectedOption === "existing" ? color("success", theme)("> ") : " ",
|
|
627
|
-
"Use your existing Claude Code API key"
|
|
628
|
-
]
|
|
629
|
-
}, undefined, true, undefined, this)
|
|
630
|
-
}, undefined, false, undefined, this);
|
|
631
|
-
$[27] = existingApiKey;
|
|
632
|
-
$[28] = selectedOption;
|
|
633
|
-
$[29] = theme;
|
|
634
|
-
$[30] = t11;
|
|
635
|
-
} else {
|
|
636
|
-
t11 = $[30];
|
|
637
|
-
}
|
|
638
|
-
let t12;
|
|
639
|
-
if ($[31] !== onCreateOAuthToken || $[32] !== selectedOption || $[33] !== theme) {
|
|
640
|
-
t12 = onCreateOAuthToken && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
641
|
-
marginBottom: 1,
|
|
642
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
643
|
-
children: [
|
|
644
|
-
selectedOption === "oauth" ? color("success", theme)("> ") : " ",
|
|
645
|
-
"Create a long-lived token with your Claude subscription"
|
|
646
|
-
]
|
|
647
|
-
}, undefined, true, undefined, this)
|
|
648
|
-
}, undefined, false, undefined, this);
|
|
649
|
-
$[31] = onCreateOAuthToken;
|
|
650
|
-
$[32] = selectedOption;
|
|
651
|
-
$[33] = theme;
|
|
652
|
-
$[34] = t12;
|
|
653
|
-
} else {
|
|
654
|
-
t12 = $[34];
|
|
655
|
-
}
|
|
656
|
-
let t13;
|
|
657
|
-
if ($[35] !== selectedOption || $[36] !== theme) {
|
|
658
|
-
t13 = selectedOption === "new" ? color("success", theme)("> ") : " ";
|
|
659
|
-
$[35] = selectedOption;
|
|
660
|
-
$[36] = theme;
|
|
661
|
-
$[37] = t13;
|
|
662
|
-
} else {
|
|
663
|
-
t13 = $[37];
|
|
664
|
-
}
|
|
665
|
-
let t14;
|
|
666
|
-
if ($[38] !== t13) {
|
|
667
|
-
t14 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
668
|
-
marginBottom: 1,
|
|
669
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
670
|
-
children: [
|
|
671
|
-
t13,
|
|
672
|
-
"Enter a new API key"
|
|
673
|
-
]
|
|
674
|
-
}, undefined, true, undefined, this)
|
|
675
|
-
}, undefined, false, undefined, this);
|
|
676
|
-
$[38] = t13;
|
|
677
|
-
$[39] = t14;
|
|
678
|
-
} else {
|
|
679
|
-
t14 = $[39];
|
|
680
|
-
}
|
|
681
|
-
let t15;
|
|
682
|
-
if ($[40] !== apiKeyOrOAuthToken || $[41] !== cursorOffset || $[42] !== onApiKeyChange || $[43] !== onSubmit || $[44] !== selectedOption || $[45] !== terminalSize) {
|
|
683
|
-
t15 = selectedOption === "new" && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(TextInput, {
|
|
684
|
-
value: apiKeyOrOAuthToken,
|
|
685
|
-
onChange: onApiKeyChange,
|
|
686
|
-
onSubmit,
|
|
687
|
-
onPaste: onApiKeyChange,
|
|
688
|
-
focus: true,
|
|
689
|
-
placeholder: "sk-ant\u2026 (Create a new key at https://platform.claude.com/settings/keys)",
|
|
690
|
-
mask: "*",
|
|
691
|
-
columns: terminalSize.columns,
|
|
692
|
-
cursorOffset,
|
|
693
|
-
onChangeCursorOffset: setCursorOffset,
|
|
694
|
-
showCursor: true
|
|
695
|
-
}, undefined, false, undefined, this);
|
|
696
|
-
$[40] = apiKeyOrOAuthToken;
|
|
697
|
-
$[41] = cursorOffset;
|
|
698
|
-
$[42] = onApiKeyChange;
|
|
699
|
-
$[43] = onSubmit;
|
|
700
|
-
$[44] = selectedOption;
|
|
701
|
-
$[45] = terminalSize;
|
|
702
|
-
$[46] = t15;
|
|
703
|
-
} else {
|
|
704
|
-
t15 = $[46];
|
|
705
|
-
}
|
|
706
|
-
let t16;
|
|
707
|
-
if ($[47] !== t11 || $[48] !== t12 || $[49] !== t14 || $[50] !== t15) {
|
|
708
|
-
t16 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
709
|
-
flexDirection: "column",
|
|
710
|
-
borderStyle: "round",
|
|
711
|
-
paddingX: 1,
|
|
712
|
-
children: [
|
|
713
|
-
t10,
|
|
714
|
-
t11,
|
|
715
|
-
t12,
|
|
716
|
-
t14,
|
|
717
|
-
t15
|
|
718
|
-
]
|
|
719
|
-
}, undefined, true, undefined, this);
|
|
720
|
-
$[47] = t11;
|
|
721
|
-
$[48] = t12;
|
|
722
|
-
$[49] = t14;
|
|
723
|
-
$[50] = t15;
|
|
724
|
-
$[51] = t16;
|
|
725
|
-
} else {
|
|
726
|
-
t16 = $[51];
|
|
727
|
-
}
|
|
728
|
-
let t17;
|
|
729
|
-
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
730
|
-
t17 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
731
|
-
marginLeft: 3,
|
|
732
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
733
|
-
dimColor: true,
|
|
734
|
-
children: "\u2191/\u2193 to select \xB7 Enter to continue"
|
|
735
|
-
}, undefined, false, undefined, this)
|
|
736
|
-
}, undefined, false, undefined, this);
|
|
737
|
-
$[52] = t17;
|
|
738
|
-
} else {
|
|
739
|
-
t17 = $[52];
|
|
740
|
-
}
|
|
741
|
-
let t18;
|
|
742
|
-
if ($[53] !== t16) {
|
|
743
|
-
t18 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(jsx_dev_runtime2.Fragment, {
|
|
744
|
-
children: [
|
|
745
|
-
t16,
|
|
746
|
-
t17
|
|
747
|
-
]
|
|
748
|
-
}, undefined, true, undefined, this);
|
|
749
|
-
$[53] = t16;
|
|
750
|
-
$[54] = t18;
|
|
751
|
-
} else {
|
|
752
|
-
t18 = $[54];
|
|
753
|
-
}
|
|
754
|
-
return t18;
|
|
755
|
-
}
|
|
756
|
-
var import_compiler_runtime2, import_react2, jsx_dev_runtime2;
|
|
757
|
-
var init_ApiKeyStep = __esm(() => {
|
|
758
|
-
init_TextInput();
|
|
759
|
-
init_useTerminalSize();
|
|
760
|
-
init_ink();
|
|
761
|
-
init_useKeybinding();
|
|
762
|
-
import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
|
|
763
|
-
import_react2 = __toESM(require_react(), 1);
|
|
764
|
-
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
765
|
-
});
|
|
766
|
-
|
|
767
|
-
// src/commands/install-github-app/CheckExistingSecretStep.tsx
|
|
768
|
-
function CheckExistingSecretStep(t0) {
|
|
769
|
-
const $ = import_compiler_runtime3.c(42);
|
|
770
|
-
const {
|
|
771
|
-
useExistingSecret,
|
|
772
|
-
secretName,
|
|
773
|
-
onToggleUseExistingSecret,
|
|
774
|
-
onSecretNameChange,
|
|
775
|
-
onSubmit
|
|
776
|
-
} = t0;
|
|
777
|
-
const [cursorOffset, setCursorOffset] = import_react3.useState(0);
|
|
778
|
-
const terminalSize = useTerminalSize();
|
|
779
|
-
const [theme] = useTheme();
|
|
780
|
-
let t1;
|
|
781
|
-
if ($[0] !== onToggleUseExistingSecret) {
|
|
782
|
-
t1 = () => onToggleUseExistingSecret(true);
|
|
783
|
-
$[0] = onToggleUseExistingSecret;
|
|
784
|
-
$[1] = t1;
|
|
785
|
-
} else {
|
|
786
|
-
t1 = $[1];
|
|
787
|
-
}
|
|
788
|
-
const handlePrevious = t1;
|
|
789
|
-
let t2;
|
|
790
|
-
if ($[2] !== onToggleUseExistingSecret) {
|
|
791
|
-
t2 = () => onToggleUseExistingSecret(false);
|
|
792
|
-
$[2] = onToggleUseExistingSecret;
|
|
793
|
-
$[3] = t2;
|
|
794
|
-
} else {
|
|
795
|
-
t2 = $[3];
|
|
796
|
-
}
|
|
797
|
-
const handleNext = t2;
|
|
798
|
-
let t3;
|
|
799
|
-
if ($[4] !== handleNext || $[5] !== handlePrevious || $[6] !== onSubmit) {
|
|
800
|
-
t3 = {
|
|
801
|
-
"confirm:previous": handlePrevious,
|
|
802
|
-
"confirm:next": handleNext,
|
|
803
|
-
"confirm:yes": onSubmit
|
|
804
|
-
};
|
|
805
|
-
$[4] = handleNext;
|
|
806
|
-
$[5] = handlePrevious;
|
|
807
|
-
$[6] = onSubmit;
|
|
808
|
-
$[7] = t3;
|
|
809
|
-
} else {
|
|
810
|
-
t3 = $[7];
|
|
811
|
-
}
|
|
812
|
-
let t4;
|
|
813
|
-
if ($[8] !== useExistingSecret) {
|
|
814
|
-
t4 = {
|
|
815
|
-
context: "Confirmation",
|
|
816
|
-
isActive: useExistingSecret
|
|
817
|
-
};
|
|
818
|
-
$[8] = useExistingSecret;
|
|
819
|
-
$[9] = t4;
|
|
820
|
-
} else {
|
|
821
|
-
t4 = $[9];
|
|
822
|
-
}
|
|
823
|
-
useKeybindings(t3, t4);
|
|
824
|
-
let t5;
|
|
825
|
-
if ($[10] !== handleNext || $[11] !== handlePrevious) {
|
|
826
|
-
t5 = {
|
|
827
|
-
"confirm:previous": handlePrevious,
|
|
828
|
-
"confirm:next": handleNext
|
|
829
|
-
};
|
|
830
|
-
$[10] = handleNext;
|
|
831
|
-
$[11] = handlePrevious;
|
|
832
|
-
$[12] = t5;
|
|
833
|
-
} else {
|
|
834
|
-
t5 = $[12];
|
|
835
|
-
}
|
|
836
|
-
const t6 = !useExistingSecret;
|
|
837
|
-
let t7;
|
|
838
|
-
if ($[13] !== t6) {
|
|
839
|
-
t7 = {
|
|
840
|
-
context: "Confirmation",
|
|
841
|
-
isActive: t6
|
|
842
|
-
};
|
|
843
|
-
$[13] = t6;
|
|
844
|
-
$[14] = t7;
|
|
845
|
-
} else {
|
|
846
|
-
t7 = $[14];
|
|
847
|
-
}
|
|
848
|
-
useKeybindings(t5, t7);
|
|
849
|
-
let t8;
|
|
850
|
-
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
851
|
-
t8 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
852
|
-
flexDirection: "column",
|
|
853
|
-
marginBottom: 1,
|
|
854
|
-
children: [
|
|
855
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
856
|
-
bold: true,
|
|
857
|
-
children: "Install GitHub App"
|
|
858
|
-
}, undefined, false, undefined, this),
|
|
859
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
860
|
-
dimColor: true,
|
|
861
|
-
children: "Setup API key secret"
|
|
862
|
-
}, undefined, false, undefined, this)
|
|
863
|
-
]
|
|
864
|
-
}, undefined, true, undefined, this);
|
|
865
|
-
$[15] = t8;
|
|
866
|
-
} else {
|
|
867
|
-
t8 = $[15];
|
|
868
|
-
}
|
|
869
|
-
let t9;
|
|
870
|
-
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
871
|
-
t9 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
872
|
-
marginBottom: 1,
|
|
873
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
874
|
-
color: "warning",
|
|
875
|
-
children: "ANTHROPIC_API_KEY already exists in repository secrets!"
|
|
876
|
-
}, undefined, false, undefined, this)
|
|
877
|
-
}, undefined, false, undefined, this);
|
|
878
|
-
$[16] = t9;
|
|
879
|
-
} else {
|
|
880
|
-
t9 = $[16];
|
|
881
|
-
}
|
|
882
|
-
let t10;
|
|
883
|
-
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
884
|
-
t10 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
885
|
-
marginBottom: 1,
|
|
886
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
887
|
-
children: "Would you like to:"
|
|
888
|
-
}, undefined, false, undefined, this)
|
|
889
|
-
}, undefined, false, undefined, this);
|
|
890
|
-
$[17] = t10;
|
|
891
|
-
} else {
|
|
892
|
-
t10 = $[17];
|
|
893
|
-
}
|
|
894
|
-
let t11;
|
|
895
|
-
if ($[18] !== theme || $[19] !== useExistingSecret) {
|
|
896
|
-
t11 = useExistingSecret ? color("success", theme)("> ") : " ";
|
|
897
|
-
$[18] = theme;
|
|
898
|
-
$[19] = useExistingSecret;
|
|
899
|
-
$[20] = t11;
|
|
900
|
-
} else {
|
|
901
|
-
t11 = $[20];
|
|
902
|
-
}
|
|
903
|
-
let t12;
|
|
904
|
-
if ($[21] !== t11) {
|
|
905
|
-
t12 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
906
|
-
marginBottom: 1,
|
|
907
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
908
|
-
children: [
|
|
909
|
-
t11,
|
|
910
|
-
"Use the existing API key"
|
|
911
|
-
]
|
|
912
|
-
}, undefined, true, undefined, this)
|
|
913
|
-
}, undefined, false, undefined, this);
|
|
914
|
-
$[21] = t11;
|
|
915
|
-
$[22] = t12;
|
|
916
|
-
} else {
|
|
917
|
-
t12 = $[22];
|
|
918
|
-
}
|
|
919
|
-
let t13;
|
|
920
|
-
if ($[23] !== theme || $[24] !== useExistingSecret) {
|
|
921
|
-
t13 = !useExistingSecret ? color("success", theme)("> ") : " ";
|
|
922
|
-
$[23] = theme;
|
|
923
|
-
$[24] = useExistingSecret;
|
|
924
|
-
$[25] = t13;
|
|
925
|
-
} else {
|
|
926
|
-
t13 = $[25];
|
|
927
|
-
}
|
|
928
|
-
let t14;
|
|
929
|
-
if ($[26] !== t13) {
|
|
930
|
-
t14 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
931
|
-
marginBottom: 1,
|
|
932
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
933
|
-
children: [
|
|
934
|
-
t13,
|
|
935
|
-
"Create a new secret with a different name"
|
|
936
|
-
]
|
|
937
|
-
}, undefined, true, undefined, this)
|
|
938
|
-
}, undefined, false, undefined, this);
|
|
939
|
-
$[26] = t13;
|
|
940
|
-
$[27] = t14;
|
|
941
|
-
} else {
|
|
942
|
-
t14 = $[27];
|
|
943
|
-
}
|
|
944
|
-
let t15;
|
|
945
|
-
if ($[28] !== cursorOffset || $[29] !== onSecretNameChange || $[30] !== onSubmit || $[31] !== secretName || $[32] !== terminalSize || $[33] !== useExistingSecret) {
|
|
946
|
-
t15 = !useExistingSecret && /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
947
|
-
children: [
|
|
948
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
949
|
-
marginBottom: 1,
|
|
950
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
951
|
-
children: "Enter new secret name (alphanumeric with underscores):"
|
|
952
|
-
}, undefined, false, undefined, this)
|
|
953
|
-
}, undefined, false, undefined, this),
|
|
954
|
-
/* @__PURE__ */ jsx_dev_runtime3.jsxDEV(TextInput, {
|
|
955
|
-
value: secretName,
|
|
956
|
-
onChange: onSecretNameChange,
|
|
957
|
-
onSubmit,
|
|
958
|
-
focus: true,
|
|
959
|
-
placeholder: "e.g., CLAUDE_API_KEY",
|
|
960
|
-
columns: terminalSize.columns,
|
|
961
|
-
cursorOffset,
|
|
962
|
-
onChangeCursorOffset: setCursorOffset,
|
|
963
|
-
showCursor: true
|
|
964
|
-
}, undefined, false, undefined, this)
|
|
965
|
-
]
|
|
966
|
-
}, undefined, true, undefined, this);
|
|
967
|
-
$[28] = cursorOffset;
|
|
968
|
-
$[29] = onSecretNameChange;
|
|
969
|
-
$[30] = onSubmit;
|
|
970
|
-
$[31] = secretName;
|
|
971
|
-
$[32] = terminalSize;
|
|
972
|
-
$[33] = useExistingSecret;
|
|
973
|
-
$[34] = t15;
|
|
974
|
-
} else {
|
|
975
|
-
t15 = $[34];
|
|
976
|
-
}
|
|
977
|
-
let t16;
|
|
978
|
-
if ($[35] !== t12 || $[36] !== t14 || $[37] !== t15) {
|
|
979
|
-
t16 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
980
|
-
flexDirection: "column",
|
|
981
|
-
borderStyle: "round",
|
|
982
|
-
paddingX: 1,
|
|
983
|
-
children: [
|
|
984
|
-
t8,
|
|
985
|
-
t9,
|
|
986
|
-
t10,
|
|
987
|
-
t12,
|
|
988
|
-
t14,
|
|
989
|
-
t15
|
|
990
|
-
]
|
|
991
|
-
}, undefined, true, undefined, this);
|
|
992
|
-
$[35] = t12;
|
|
993
|
-
$[36] = t14;
|
|
994
|
-
$[37] = t15;
|
|
995
|
-
$[38] = t16;
|
|
996
|
-
} else {
|
|
997
|
-
t16 = $[38];
|
|
998
|
-
}
|
|
999
|
-
let t17;
|
|
1000
|
-
if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1001
|
-
t17 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
|
|
1002
|
-
marginLeft: 3,
|
|
1003
|
-
children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
|
|
1004
|
-
dimColor: true,
|
|
1005
|
-
children: "\u2191/\u2193 to select \xB7 Enter to continue"
|
|
1006
|
-
}, undefined, false, undefined, this)
|
|
1007
|
-
}, undefined, false, undefined, this);
|
|
1008
|
-
$[39] = t17;
|
|
1009
|
-
} else {
|
|
1010
|
-
t17 = $[39];
|
|
1011
|
-
}
|
|
1012
|
-
let t18;
|
|
1013
|
-
if ($[40] !== t16) {
|
|
1014
|
-
t18 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
|
|
1015
|
-
children: [
|
|
1016
|
-
t16,
|
|
1017
|
-
t17
|
|
1018
|
-
]
|
|
1019
|
-
}, undefined, true, undefined, this);
|
|
1020
|
-
$[40] = t16;
|
|
1021
|
-
$[41] = t18;
|
|
1022
|
-
} else {
|
|
1023
|
-
t18 = $[41];
|
|
1024
|
-
}
|
|
1025
|
-
return t18;
|
|
1026
|
-
}
|
|
1027
|
-
var import_compiler_runtime3, import_react3, jsx_dev_runtime3;
|
|
1028
|
-
var init_CheckExistingSecretStep = __esm(() => {
|
|
1029
|
-
init_TextInput();
|
|
1030
|
-
init_useTerminalSize();
|
|
1031
|
-
init_ink();
|
|
1032
|
-
init_useKeybinding();
|
|
1033
|
-
import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
|
|
1034
|
-
import_react3 = __toESM(require_react(), 1);
|
|
1035
|
-
jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1036
|
-
});
|
|
1037
|
-
|
|
1038
|
-
// src/commands/install-github-app/CheckGitHubStep.tsx
|
|
1039
|
-
function CheckGitHubStep() {
|
|
1040
|
-
const $ = import_compiler_runtime4.c(1);
|
|
1041
|
-
let t0;
|
|
1042
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1043
|
-
t0 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
|
|
1044
|
-
children: "Checking GitHub CLI installation\u2026"
|
|
1045
|
-
}, undefined, false, undefined, this);
|
|
1046
|
-
$[0] = t0;
|
|
1047
|
-
} else {
|
|
1048
|
-
t0 = $[0];
|
|
1049
|
-
}
|
|
1050
|
-
return t0;
|
|
1051
|
-
}
|
|
1052
|
-
var import_compiler_runtime4, jsx_dev_runtime4;
|
|
1053
|
-
var init_CheckGitHubStep = __esm(() => {
|
|
1054
|
-
init_ink();
|
|
1055
|
-
import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
|
|
1056
|
-
jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1057
|
-
});
|
|
1058
|
-
|
|
1059
|
-
// src/commands/install-github-app/ChooseRepoStep.tsx
|
|
1060
|
-
function ChooseRepoStep(t0) {
|
|
1061
|
-
const $ = import_compiler_runtime5.c(49);
|
|
1062
|
-
const {
|
|
1063
|
-
currentRepo,
|
|
1064
|
-
useCurrentRepo,
|
|
1065
|
-
repoUrl,
|
|
1066
|
-
onRepoUrlChange,
|
|
1067
|
-
onSubmit,
|
|
1068
|
-
onToggleUseCurrentRepo
|
|
1069
|
-
} = t0;
|
|
1070
|
-
const [cursorOffset, setCursorOffset] = import_react4.useState(0);
|
|
1071
|
-
const [showEmptyError, setShowEmptyError] = import_react4.useState(false);
|
|
1072
|
-
const terminalSize = useTerminalSize();
|
|
1073
|
-
const textInputColumns = terminalSize.columns;
|
|
1074
|
-
let t1;
|
|
1075
|
-
if ($[0] !== currentRepo || $[1] !== onSubmit || $[2] !== repoUrl || $[3] !== useCurrentRepo) {
|
|
1076
|
-
t1 = () => {
|
|
1077
|
-
const repoName = useCurrentRepo ? currentRepo : repoUrl;
|
|
1078
|
-
if (!repoName?.trim()) {
|
|
1079
|
-
setShowEmptyError(true);
|
|
1080
|
-
return;
|
|
1081
|
-
}
|
|
1082
|
-
onSubmit();
|
|
1083
|
-
};
|
|
1084
|
-
$[0] = currentRepo;
|
|
1085
|
-
$[1] = onSubmit;
|
|
1086
|
-
$[2] = repoUrl;
|
|
1087
|
-
$[3] = useCurrentRepo;
|
|
1088
|
-
$[4] = t1;
|
|
1089
|
-
} else {
|
|
1090
|
-
t1 = $[4];
|
|
1091
|
-
}
|
|
1092
|
-
const handleSubmit = t1;
|
|
1093
|
-
const isTextInputVisible = !useCurrentRepo || !currentRepo;
|
|
1094
|
-
let t2;
|
|
1095
|
-
if ($[5] !== onToggleUseCurrentRepo) {
|
|
1096
|
-
t2 = () => {
|
|
1097
|
-
onToggleUseCurrentRepo(true);
|
|
1098
|
-
setShowEmptyError(false);
|
|
1099
|
-
};
|
|
1100
|
-
$[5] = onToggleUseCurrentRepo;
|
|
1101
|
-
$[6] = t2;
|
|
1102
|
-
} else {
|
|
1103
|
-
t2 = $[6];
|
|
1104
|
-
}
|
|
1105
|
-
const handlePrevious = t2;
|
|
1106
|
-
let t3;
|
|
1107
|
-
if ($[7] !== onToggleUseCurrentRepo) {
|
|
1108
|
-
t3 = () => {
|
|
1109
|
-
onToggleUseCurrentRepo(false);
|
|
1110
|
-
setShowEmptyError(false);
|
|
1111
|
-
};
|
|
1112
|
-
$[7] = onToggleUseCurrentRepo;
|
|
1113
|
-
$[8] = t3;
|
|
1114
|
-
} else {
|
|
1115
|
-
t3 = $[8];
|
|
1116
|
-
}
|
|
1117
|
-
const handleNext = t3;
|
|
1118
|
-
let t4;
|
|
1119
|
-
if ($[9] !== handleNext || $[10] !== handlePrevious || $[11] !== handleSubmit) {
|
|
1120
|
-
t4 = {
|
|
1121
|
-
"confirm:previous": handlePrevious,
|
|
1122
|
-
"confirm:next": handleNext,
|
|
1123
|
-
"confirm:yes": handleSubmit
|
|
1124
|
-
};
|
|
1125
|
-
$[9] = handleNext;
|
|
1126
|
-
$[10] = handlePrevious;
|
|
1127
|
-
$[11] = handleSubmit;
|
|
1128
|
-
$[12] = t4;
|
|
1129
|
-
} else {
|
|
1130
|
-
t4 = $[12];
|
|
1131
|
-
}
|
|
1132
|
-
const t5 = !isTextInputVisible;
|
|
1133
|
-
let t6;
|
|
1134
|
-
if ($[13] !== t5) {
|
|
1135
|
-
t6 = {
|
|
1136
|
-
context: "Confirmation",
|
|
1137
|
-
isActive: t5
|
|
1138
|
-
};
|
|
1139
|
-
$[13] = t5;
|
|
1140
|
-
$[14] = t6;
|
|
1141
|
-
} else {
|
|
1142
|
-
t6 = $[14];
|
|
1143
|
-
}
|
|
1144
|
-
useKeybindings(t4, t6);
|
|
1145
|
-
let t7;
|
|
1146
|
-
if ($[15] !== handleNext || $[16] !== handlePrevious) {
|
|
1147
|
-
t7 = {
|
|
1148
|
-
"confirm:previous": handlePrevious,
|
|
1149
|
-
"confirm:next": handleNext
|
|
1150
|
-
};
|
|
1151
|
-
$[15] = handleNext;
|
|
1152
|
-
$[16] = handlePrevious;
|
|
1153
|
-
$[17] = t7;
|
|
1154
|
-
} else {
|
|
1155
|
-
t7 = $[17];
|
|
1156
|
-
}
|
|
1157
|
-
let t8;
|
|
1158
|
-
if ($[18] !== isTextInputVisible) {
|
|
1159
|
-
t8 = {
|
|
1160
|
-
context: "Confirmation",
|
|
1161
|
-
isActive: isTextInputVisible
|
|
1162
|
-
};
|
|
1163
|
-
$[18] = isTextInputVisible;
|
|
1164
|
-
$[19] = t8;
|
|
1165
|
-
} else {
|
|
1166
|
-
t8 = $[19];
|
|
1167
|
-
}
|
|
1168
|
-
useKeybindings(t7, t8);
|
|
1169
|
-
let t9;
|
|
1170
|
-
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1171
|
-
t9 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1172
|
-
flexDirection: "column",
|
|
1173
|
-
marginBottom: 1,
|
|
1174
|
-
children: [
|
|
1175
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1176
|
-
bold: true,
|
|
1177
|
-
children: "Install GitHub App"
|
|
1178
|
-
}, undefined, false, undefined, this),
|
|
1179
|
-
/* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1180
|
-
dimColor: true,
|
|
1181
|
-
children: "Select GitHub repository"
|
|
1182
|
-
}, undefined, false, undefined, this)
|
|
1183
|
-
]
|
|
1184
|
-
}, undefined, true, undefined, this);
|
|
1185
|
-
$[20] = t9;
|
|
1186
|
-
} else {
|
|
1187
|
-
t9 = $[20];
|
|
1188
|
-
}
|
|
1189
|
-
let t10;
|
|
1190
|
-
if ($[21] !== currentRepo || $[22] !== useCurrentRepo) {
|
|
1191
|
-
t10 = currentRepo && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1192
|
-
marginBottom: 1,
|
|
1193
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1194
|
-
bold: useCurrentRepo,
|
|
1195
|
-
color: useCurrentRepo ? "permission" : undefined,
|
|
1196
|
-
children: [
|
|
1197
|
-
useCurrentRepo ? "> " : " ",
|
|
1198
|
-
"Use current repository: ",
|
|
1199
|
-
currentRepo
|
|
1200
|
-
]
|
|
1201
|
-
}, undefined, true, undefined, this)
|
|
1202
|
-
}, undefined, false, undefined, this);
|
|
1203
|
-
$[21] = currentRepo;
|
|
1204
|
-
$[22] = useCurrentRepo;
|
|
1205
|
-
$[23] = t10;
|
|
1206
|
-
} else {
|
|
1207
|
-
t10 = $[23];
|
|
1208
|
-
}
|
|
1209
|
-
const t11 = !useCurrentRepo || !currentRepo;
|
|
1210
|
-
const t12 = !useCurrentRepo || !currentRepo ? "permission" : undefined;
|
|
1211
|
-
const t13 = !useCurrentRepo || !currentRepo ? "> " : " ";
|
|
1212
|
-
const t14 = currentRepo ? "Enter a different repository" : "Enter repository";
|
|
1213
|
-
let t15;
|
|
1214
|
-
if ($[24] !== t11 || $[25] !== t12 || $[26] !== t13 || $[27] !== t14) {
|
|
1215
|
-
t15 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1216
|
-
marginBottom: 1,
|
|
1217
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1218
|
-
bold: t11,
|
|
1219
|
-
color: t12,
|
|
1220
|
-
children: [
|
|
1221
|
-
t13,
|
|
1222
|
-
t14
|
|
1223
|
-
]
|
|
1224
|
-
}, undefined, true, undefined, this)
|
|
1225
|
-
}, undefined, false, undefined, this);
|
|
1226
|
-
$[24] = t11;
|
|
1227
|
-
$[25] = t12;
|
|
1228
|
-
$[26] = t13;
|
|
1229
|
-
$[27] = t14;
|
|
1230
|
-
$[28] = t15;
|
|
1231
|
-
} else {
|
|
1232
|
-
t15 = $[28];
|
|
1233
|
-
}
|
|
1234
|
-
let t16;
|
|
1235
|
-
if ($[29] !== currentRepo || $[30] !== cursorOffset || $[31] !== handleSubmit || $[32] !== onRepoUrlChange || $[33] !== repoUrl || $[34] !== textInputColumns || $[35] !== useCurrentRepo) {
|
|
1236
|
-
t16 = (!useCurrentRepo || !currentRepo) && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1237
|
-
marginLeft: 2,
|
|
1238
|
-
marginBottom: 1,
|
|
1239
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(TextInput, {
|
|
1240
|
-
value: repoUrl,
|
|
1241
|
-
onChange: (value) => {
|
|
1242
|
-
onRepoUrlChange(value);
|
|
1243
|
-
setShowEmptyError(false);
|
|
1244
|
-
},
|
|
1245
|
-
onSubmit: handleSubmit,
|
|
1246
|
-
focus: true,
|
|
1247
|
-
placeholder: "Enter a repo as owner/repo or https://github.com/owner/repo\u2026",
|
|
1248
|
-
columns: textInputColumns,
|
|
1249
|
-
cursorOffset,
|
|
1250
|
-
onChangeCursorOffset: setCursorOffset,
|
|
1251
|
-
showCursor: true
|
|
1252
|
-
}, undefined, false, undefined, this)
|
|
1253
|
-
}, undefined, false, undefined, this);
|
|
1254
|
-
$[29] = currentRepo;
|
|
1255
|
-
$[30] = cursorOffset;
|
|
1256
|
-
$[31] = handleSubmit;
|
|
1257
|
-
$[32] = onRepoUrlChange;
|
|
1258
|
-
$[33] = repoUrl;
|
|
1259
|
-
$[34] = textInputColumns;
|
|
1260
|
-
$[35] = useCurrentRepo;
|
|
1261
|
-
$[36] = t16;
|
|
1262
|
-
} else {
|
|
1263
|
-
t16 = $[36];
|
|
1264
|
-
}
|
|
1265
|
-
let t17;
|
|
1266
|
-
if ($[37] !== t10 || $[38] !== t15 || $[39] !== t16) {
|
|
1267
|
-
t17 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1268
|
-
flexDirection: "column",
|
|
1269
|
-
borderStyle: "round",
|
|
1270
|
-
paddingX: 1,
|
|
1271
|
-
children: [
|
|
1272
|
-
t9,
|
|
1273
|
-
t10,
|
|
1274
|
-
t15,
|
|
1275
|
-
t16
|
|
1276
|
-
]
|
|
1277
|
-
}, undefined, true, undefined, this);
|
|
1278
|
-
$[37] = t10;
|
|
1279
|
-
$[38] = t15;
|
|
1280
|
-
$[39] = t16;
|
|
1281
|
-
$[40] = t17;
|
|
1282
|
-
} else {
|
|
1283
|
-
t17 = $[40];
|
|
1284
|
-
}
|
|
1285
|
-
let t18;
|
|
1286
|
-
if ($[41] !== showEmptyError) {
|
|
1287
|
-
t18 = showEmptyError && /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1288
|
-
marginLeft: 3,
|
|
1289
|
-
marginBottom: 1,
|
|
1290
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1291
|
-
color: "error",
|
|
1292
|
-
children: "Please enter a repository name to continue"
|
|
1293
|
-
}, undefined, false, undefined, this)
|
|
1294
|
-
}, undefined, false, undefined, this);
|
|
1295
|
-
$[41] = showEmptyError;
|
|
1296
|
-
$[42] = t18;
|
|
1297
|
-
} else {
|
|
1298
|
-
t18 = $[42];
|
|
1299
|
-
}
|
|
1300
|
-
const t19 = currentRepo ? "\u2191/\u2193 to select \xB7 " : "";
|
|
1301
|
-
let t20;
|
|
1302
|
-
if ($[43] !== t19) {
|
|
1303
|
-
t20 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
|
|
1304
|
-
marginLeft: 3,
|
|
1305
|
-
children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
|
|
1306
|
-
dimColor: true,
|
|
1307
|
-
children: [
|
|
1308
|
-
t19,
|
|
1309
|
-
"Enter to continue"
|
|
1310
|
-
]
|
|
1311
|
-
}, undefined, true, undefined, this)
|
|
1312
|
-
}, undefined, false, undefined, this);
|
|
1313
|
-
$[43] = t19;
|
|
1314
|
-
$[44] = t20;
|
|
1315
|
-
} else {
|
|
1316
|
-
t20 = $[44];
|
|
1317
|
-
}
|
|
1318
|
-
let t21;
|
|
1319
|
-
if ($[45] !== t17 || $[46] !== t18 || $[47] !== t20) {
|
|
1320
|
-
t21 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(jsx_dev_runtime5.Fragment, {
|
|
1321
|
-
children: [
|
|
1322
|
-
t17,
|
|
1323
|
-
t18,
|
|
1324
|
-
t20
|
|
1325
|
-
]
|
|
1326
|
-
}, undefined, true, undefined, this);
|
|
1327
|
-
$[45] = t17;
|
|
1328
|
-
$[46] = t18;
|
|
1329
|
-
$[47] = t20;
|
|
1330
|
-
$[48] = t21;
|
|
1331
|
-
} else {
|
|
1332
|
-
t21 = $[48];
|
|
1333
|
-
}
|
|
1334
|
-
return t21;
|
|
1335
|
-
}
|
|
1336
|
-
var import_compiler_runtime5, import_react4, jsx_dev_runtime5;
|
|
1337
|
-
var init_ChooseRepoStep = __esm(() => {
|
|
1338
|
-
init_TextInput();
|
|
1339
|
-
init_useTerminalSize();
|
|
1340
|
-
init_ink();
|
|
1341
|
-
init_useKeybinding();
|
|
1342
|
-
import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
|
|
1343
|
-
import_react4 = __toESM(require_react(), 1);
|
|
1344
|
-
jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1345
|
-
});
|
|
1346
|
-
|
|
1347
|
-
// src/commands/install-github-app/CreatingStep.tsx
|
|
1348
|
-
function CreatingStep(t0) {
|
|
1349
|
-
const $ = import_compiler_runtime6.c(10);
|
|
1350
|
-
const {
|
|
1351
|
-
currentWorkflowInstallStep,
|
|
1352
|
-
secretExists,
|
|
1353
|
-
useExistingSecret,
|
|
1354
|
-
secretName,
|
|
1355
|
-
skipWorkflow: t1,
|
|
1356
|
-
selectedWorkflows
|
|
1357
|
-
} = t0;
|
|
1358
|
-
const skipWorkflow = t1 === undefined ? false : t1;
|
|
1359
|
-
let t2;
|
|
1360
|
-
if ($[0] !== secretExists || $[1] !== secretName || $[2] !== selectedWorkflows || $[3] !== skipWorkflow || $[4] !== useExistingSecret) {
|
|
1361
|
-
t2 = skipWorkflow ? ["Getting repository information", secretExists && useExistingSecret ? "Using existing API key secret" : `Setting up ${secretName} secret`] : ["Getting repository information", "Creating branch", selectedWorkflows.length > 1 ? "Creating workflow files" : "Creating workflow file", secretExists && useExistingSecret ? "Using existing API key secret" : `Setting up ${secretName} secret`, "Opening pull request page"];
|
|
1362
|
-
$[0] = secretExists;
|
|
1363
|
-
$[1] = secretName;
|
|
1364
|
-
$[2] = selectedWorkflows;
|
|
1365
|
-
$[3] = skipWorkflow;
|
|
1366
|
-
$[4] = useExistingSecret;
|
|
1367
|
-
$[5] = t2;
|
|
1368
|
-
} else {
|
|
1369
|
-
t2 = $[5];
|
|
1370
|
-
}
|
|
1371
|
-
const progressSteps = t2;
|
|
1372
|
-
let t3;
|
|
1373
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1374
|
-
t3 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
1375
|
-
flexDirection: "column",
|
|
1376
|
-
marginBottom: 1,
|
|
1377
|
-
children: [
|
|
1378
|
-
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
1379
|
-
bold: true,
|
|
1380
|
-
children: "Install GitHub App"
|
|
1381
|
-
}, undefined, false, undefined, this),
|
|
1382
|
-
/* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
1383
|
-
dimColor: true,
|
|
1384
|
-
children: "Create GitHub Actions workflow"
|
|
1385
|
-
}, undefined, false, undefined, this)
|
|
1386
|
-
]
|
|
1387
|
-
}, undefined, true, undefined, this);
|
|
1388
|
-
$[6] = t3;
|
|
1389
|
-
} else {
|
|
1390
|
-
t3 = $[6];
|
|
1391
|
-
}
|
|
1392
|
-
let t4;
|
|
1393
|
-
if ($[7] !== currentWorkflowInstallStep || $[8] !== progressSteps) {
|
|
1394
|
-
t4 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(jsx_dev_runtime6.Fragment, {
|
|
1395
|
-
children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
1396
|
-
flexDirection: "column",
|
|
1397
|
-
borderStyle: "round",
|
|
1398
|
-
paddingX: 1,
|
|
1399
|
-
children: [
|
|
1400
|
-
t3,
|
|
1401
|
-
progressSteps.map((stepText, index) => {
|
|
1402
|
-
let status = "pending";
|
|
1403
|
-
if (index < currentWorkflowInstallStep) {
|
|
1404
|
-
status = "completed";
|
|
1405
|
-
} else {
|
|
1406
|
-
if (index === currentWorkflowInstallStep) {
|
|
1407
|
-
status = "in-progress";
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
return /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
|
|
1411
|
-
children: /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
|
|
1412
|
-
color: status === "completed" ? "success" : status === "in-progress" ? "warning" : undefined,
|
|
1413
|
-
children: [
|
|
1414
|
-
status === "completed" ? "\u2713 " : "",
|
|
1415
|
-
stepText,
|
|
1416
|
-
status === "in-progress" ? "\u2026" : ""
|
|
1417
|
-
]
|
|
1418
|
-
}, undefined, true, undefined, this)
|
|
1419
|
-
}, index, false, undefined, this);
|
|
1420
|
-
})
|
|
1421
|
-
]
|
|
1422
|
-
}, undefined, true, undefined, this)
|
|
1423
|
-
}, undefined, false, undefined, this);
|
|
1424
|
-
$[7] = currentWorkflowInstallStep;
|
|
1425
|
-
$[8] = progressSteps;
|
|
1426
|
-
$[9] = t4;
|
|
1427
|
-
} else {
|
|
1428
|
-
t4 = $[9];
|
|
1429
|
-
}
|
|
1430
|
-
return t4;
|
|
1431
|
-
}
|
|
1432
|
-
var import_compiler_runtime6, jsx_dev_runtime6;
|
|
1433
|
-
var init_CreatingStep = __esm(() => {
|
|
1434
|
-
init_ink();
|
|
1435
|
-
import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
|
|
1436
|
-
jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1437
|
-
});
|
|
1438
|
-
|
|
1439
|
-
// src/commands/install-github-app/ErrorStep.tsx
|
|
1440
|
-
function ErrorStep(t0) {
|
|
1441
|
-
const $ = import_compiler_runtime7.c(15);
|
|
1442
|
-
const {
|
|
1443
|
-
error,
|
|
1444
|
-
errorReason,
|
|
1445
|
-
errorInstructions
|
|
1446
|
-
} = t0;
|
|
1447
|
-
let t1;
|
|
1448
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1449
|
-
t1 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1450
|
-
flexDirection: "column",
|
|
1451
|
-
marginBottom: 1,
|
|
1452
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1453
|
-
bold: true,
|
|
1454
|
-
children: "Install GitHub App"
|
|
1455
|
-
}, undefined, false, undefined, this)
|
|
1456
|
-
}, undefined, false, undefined, this);
|
|
1457
|
-
$[0] = t1;
|
|
1458
|
-
} else {
|
|
1459
|
-
t1 = $[0];
|
|
1460
|
-
}
|
|
1461
|
-
let t2;
|
|
1462
|
-
if ($[1] !== error) {
|
|
1463
|
-
t2 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1464
|
-
color: "error",
|
|
1465
|
-
children: [
|
|
1466
|
-
"Error: ",
|
|
1467
|
-
error
|
|
1468
|
-
]
|
|
1469
|
-
}, undefined, true, undefined, this);
|
|
1470
|
-
$[1] = error;
|
|
1471
|
-
$[2] = t2;
|
|
1472
|
-
} else {
|
|
1473
|
-
t2 = $[2];
|
|
1474
|
-
}
|
|
1475
|
-
let t3;
|
|
1476
|
-
if ($[3] !== errorReason) {
|
|
1477
|
-
t3 = errorReason && /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1478
|
-
marginTop: 1,
|
|
1479
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1480
|
-
dimColor: true,
|
|
1481
|
-
children: [
|
|
1482
|
-
"Reason: ",
|
|
1483
|
-
errorReason
|
|
1484
|
-
]
|
|
1485
|
-
}, undefined, true, undefined, this)
|
|
1486
|
-
}, undefined, false, undefined, this);
|
|
1487
|
-
$[3] = errorReason;
|
|
1488
|
-
$[4] = t3;
|
|
1489
|
-
} else {
|
|
1490
|
-
t3 = $[4];
|
|
1491
|
-
}
|
|
1492
|
-
let t4;
|
|
1493
|
-
if ($[5] !== errorInstructions) {
|
|
1494
|
-
t4 = errorInstructions && errorInstructions.length > 0 && /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1495
|
-
flexDirection: "column",
|
|
1496
|
-
marginTop: 1,
|
|
1497
|
-
children: [
|
|
1498
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1499
|
-
dimColor: true,
|
|
1500
|
-
children: "How to fix:"
|
|
1501
|
-
}, undefined, false, undefined, this),
|
|
1502
|
-
errorInstructions.map(_temp2)
|
|
1503
|
-
]
|
|
1504
|
-
}, undefined, true, undefined, this);
|
|
1505
|
-
$[5] = errorInstructions;
|
|
1506
|
-
$[6] = t4;
|
|
1507
|
-
} else {
|
|
1508
|
-
t4 = $[6];
|
|
1509
|
-
}
|
|
1510
|
-
let t5;
|
|
1511
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1512
|
-
t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1513
|
-
marginTop: 1,
|
|
1514
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1515
|
-
dimColor: true,
|
|
1516
|
-
children: [
|
|
1517
|
-
"For manual setup instructions, see:",
|
|
1518
|
-
" ",
|
|
1519
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1520
|
-
color: "claude",
|
|
1521
|
-
children: GITHUB_ACTION_SETUP_DOCS_URL
|
|
1522
|
-
}, undefined, false, undefined, this)
|
|
1523
|
-
]
|
|
1524
|
-
}, undefined, true, undefined, this)
|
|
1525
|
-
}, undefined, false, undefined, this);
|
|
1526
|
-
$[7] = t5;
|
|
1527
|
-
} else {
|
|
1528
|
-
t5 = $[7];
|
|
1529
|
-
}
|
|
1530
|
-
let t6;
|
|
1531
|
-
if ($[8] !== t2 || $[9] !== t3 || $[10] !== t4) {
|
|
1532
|
-
t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1533
|
-
flexDirection: "column",
|
|
1534
|
-
borderStyle: "round",
|
|
1535
|
-
paddingX: 1,
|
|
1536
|
-
children: [
|
|
1537
|
-
t1,
|
|
1538
|
-
t2,
|
|
1539
|
-
t3,
|
|
1540
|
-
t4,
|
|
1541
|
-
t5
|
|
1542
|
-
]
|
|
1543
|
-
}, undefined, true, undefined, this);
|
|
1544
|
-
$[8] = t2;
|
|
1545
|
-
$[9] = t3;
|
|
1546
|
-
$[10] = t4;
|
|
1547
|
-
$[11] = t6;
|
|
1548
|
-
} else {
|
|
1549
|
-
t6 = $[11];
|
|
1550
|
-
}
|
|
1551
|
-
let t7;
|
|
1552
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1553
|
-
t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1554
|
-
marginLeft: 3,
|
|
1555
|
-
children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1556
|
-
dimColor: true,
|
|
1557
|
-
children: "Press any key to exit"
|
|
1558
|
-
}, undefined, false, undefined, this)
|
|
1559
|
-
}, undefined, false, undefined, this);
|
|
1560
|
-
$[12] = t7;
|
|
1561
|
-
} else {
|
|
1562
|
-
t7 = $[12];
|
|
1563
|
-
}
|
|
1564
|
-
let t8;
|
|
1565
|
-
if ($[13] !== t6) {
|
|
1566
|
-
t8 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
|
|
1567
|
-
children: [
|
|
1568
|
-
t6,
|
|
1569
|
-
t7
|
|
1570
|
-
]
|
|
1571
|
-
}, undefined, true, undefined, this);
|
|
1572
|
-
$[13] = t6;
|
|
1573
|
-
$[14] = t8;
|
|
1574
|
-
} else {
|
|
1575
|
-
t8 = $[14];
|
|
1576
|
-
}
|
|
1577
|
-
return t8;
|
|
1578
|
-
}
|
|
1579
|
-
function _temp2(instruction, index) {
|
|
1580
|
-
return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
|
|
1581
|
-
marginLeft: 2,
|
|
1582
|
-
children: [
|
|
1583
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1584
|
-
dimColor: true,
|
|
1585
|
-
children: "\u2022 "
|
|
1586
|
-
}, undefined, false, undefined, this),
|
|
1587
|
-
/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
|
|
1588
|
-
children: instruction
|
|
1589
|
-
}, undefined, false, undefined, this)
|
|
1590
|
-
]
|
|
1591
|
-
}, index, true, undefined, this);
|
|
1592
|
-
}
|
|
1593
|
-
var import_compiler_runtime7, jsx_dev_runtime7;
|
|
1594
|
-
var init_ErrorStep = __esm(() => {
|
|
1595
|
-
init_github_app();
|
|
1596
|
-
init_ink();
|
|
1597
|
-
import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
|
|
1598
|
-
jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1599
|
-
});
|
|
1600
|
-
|
|
1601
|
-
// src/commands/install-github-app/ExistingWorkflowStep.tsx
|
|
1602
|
-
function ExistingWorkflowStep(t0) {
|
|
1603
|
-
const $ = import_compiler_runtime8.c(16);
|
|
1604
|
-
const {
|
|
1605
|
-
repoName,
|
|
1606
|
-
onSelectAction
|
|
1607
|
-
} = t0;
|
|
1608
|
-
let t1;
|
|
1609
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1610
|
-
t1 = [{
|
|
1611
|
-
label: "Update workflow file with latest version",
|
|
1612
|
-
value: "update"
|
|
1613
|
-
}, {
|
|
1614
|
-
label: "Skip workflow update (configure secrets only)",
|
|
1615
|
-
value: "skip"
|
|
1616
|
-
}, {
|
|
1617
|
-
label: "Exit without making changes",
|
|
1618
|
-
value: "exit"
|
|
1619
|
-
}];
|
|
1620
|
-
$[0] = t1;
|
|
1621
|
-
} else {
|
|
1622
|
-
t1 = $[0];
|
|
1623
|
-
}
|
|
1624
|
-
const options = t1;
|
|
1625
|
-
let t2;
|
|
1626
|
-
if ($[1] !== onSelectAction) {
|
|
1627
|
-
t2 = (value) => {
|
|
1628
|
-
onSelectAction(value);
|
|
1629
|
-
};
|
|
1630
|
-
$[1] = onSelectAction;
|
|
1631
|
-
$[2] = t2;
|
|
1632
|
-
} else {
|
|
1633
|
-
t2 = $[2];
|
|
1634
|
-
}
|
|
1635
|
-
const handleSelect = t2;
|
|
1636
|
-
let t3;
|
|
1637
|
-
if ($[3] !== onSelectAction) {
|
|
1638
|
-
t3 = () => {
|
|
1639
|
-
onSelectAction("exit");
|
|
1640
|
-
};
|
|
1641
|
-
$[3] = onSelectAction;
|
|
1642
|
-
$[4] = t3;
|
|
1643
|
-
} else {
|
|
1644
|
-
t3 = $[4];
|
|
1645
|
-
}
|
|
1646
|
-
const handleCancel = t3;
|
|
1647
|
-
let t4;
|
|
1648
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1649
|
-
t4 = /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1650
|
-
bold: true,
|
|
1651
|
-
children: "Existing Workflow Found"
|
|
1652
|
-
}, undefined, false, undefined, this);
|
|
1653
|
-
$[5] = t4;
|
|
1654
|
-
} else {
|
|
1655
|
-
t4 = $[5];
|
|
1656
|
-
}
|
|
1657
|
-
let t5;
|
|
1658
|
-
if ($[6] !== repoName) {
|
|
1659
|
-
t5 = /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1660
|
-
flexDirection: "column",
|
|
1661
|
-
marginBottom: 1,
|
|
1662
|
-
children: [
|
|
1663
|
-
t4,
|
|
1664
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1665
|
-
dimColor: true,
|
|
1666
|
-
children: [
|
|
1667
|
-
"Repository: ",
|
|
1668
|
-
repoName
|
|
1669
|
-
]
|
|
1670
|
-
}, undefined, true, undefined, this)
|
|
1671
|
-
]
|
|
1672
|
-
}, undefined, true, undefined, this);
|
|
1673
|
-
$[6] = repoName;
|
|
1674
|
-
$[7] = t5;
|
|
1675
|
-
} else {
|
|
1676
|
-
t5 = $[7];
|
|
1677
|
-
}
|
|
1678
|
-
let t6;
|
|
1679
|
-
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1680
|
-
t6 = /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1681
|
-
flexDirection: "column",
|
|
1682
|
-
marginBottom: 1,
|
|
1683
|
-
children: [
|
|
1684
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1685
|
-
children: [
|
|
1686
|
-
"A Claude workflow file already exists at",
|
|
1687
|
-
" ",
|
|
1688
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1689
|
-
color: "claude",
|
|
1690
|
-
children: ".github/workflows/claude.yml"
|
|
1691
|
-
}, undefined, false, undefined, this)
|
|
1692
|
-
]
|
|
1693
|
-
}, undefined, true, undefined, this),
|
|
1694
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1695
|
-
dimColor: true,
|
|
1696
|
-
children: "What would you like to do?"
|
|
1697
|
-
}, undefined, false, undefined, this)
|
|
1698
|
-
]
|
|
1699
|
-
}, undefined, true, undefined, this);
|
|
1700
|
-
$[8] = t6;
|
|
1701
|
-
} else {
|
|
1702
|
-
t6 = $[8];
|
|
1703
|
-
}
|
|
1704
|
-
let t7;
|
|
1705
|
-
if ($[9] !== handleCancel || $[10] !== handleSelect) {
|
|
1706
|
-
t7 = /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1707
|
-
flexDirection: "column",
|
|
1708
|
-
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Select, {
|
|
1709
|
-
options,
|
|
1710
|
-
onChange: handleSelect,
|
|
1711
|
-
onCancel: handleCancel
|
|
1712
|
-
}, undefined, false, undefined, this)
|
|
1713
|
-
}, undefined, false, undefined, this);
|
|
1714
|
-
$[9] = handleCancel;
|
|
1715
|
-
$[10] = handleSelect;
|
|
1716
|
-
$[11] = t7;
|
|
1717
|
-
} else {
|
|
1718
|
-
t7 = $[11];
|
|
1719
|
-
}
|
|
1720
|
-
let t8;
|
|
1721
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1722
|
-
t8 = /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1723
|
-
marginTop: 1,
|
|
1724
|
-
children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1725
|
-
dimColor: true,
|
|
1726
|
-
children: [
|
|
1727
|
-
"View the latest workflow template at:",
|
|
1728
|
-
" ",
|
|
1729
|
-
/* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedText, {
|
|
1730
|
-
color: "claude",
|
|
1731
|
-
children: "https://github.com/anthropics/claude-code-action/blob/main/examples/claude.yml"
|
|
1732
|
-
}, undefined, false, undefined, this)
|
|
1733
|
-
]
|
|
1734
|
-
}, undefined, true, undefined, this)
|
|
1735
|
-
}, undefined, false, undefined, this);
|
|
1736
|
-
$[12] = t8;
|
|
1737
|
-
} else {
|
|
1738
|
-
t8 = $[12];
|
|
1739
|
-
}
|
|
1740
|
-
let t9;
|
|
1741
|
-
if ($[13] !== t5 || $[14] !== t7) {
|
|
1742
|
-
t9 = /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ThemedBox_default, {
|
|
1743
|
-
flexDirection: "column",
|
|
1744
|
-
borderStyle: "round",
|
|
1745
|
-
borderDimColor: true,
|
|
1746
|
-
paddingX: 1,
|
|
1747
|
-
children: [
|
|
1748
|
-
t5,
|
|
1749
|
-
t6,
|
|
1750
|
-
t7,
|
|
1751
|
-
t8
|
|
1752
|
-
]
|
|
1753
|
-
}, undefined, true, undefined, this);
|
|
1754
|
-
$[13] = t5;
|
|
1755
|
-
$[14] = t7;
|
|
1756
|
-
$[15] = t9;
|
|
1757
|
-
} else {
|
|
1758
|
-
t9 = $[15];
|
|
1759
|
-
}
|
|
1760
|
-
return t9;
|
|
1761
|
-
}
|
|
1762
|
-
var import_compiler_runtime8, jsx_dev_runtime8;
|
|
1763
|
-
var init_ExistingWorkflowStep = __esm(() => {
|
|
1764
|
-
init_CustomSelect();
|
|
1765
|
-
init_ink();
|
|
1766
|
-
import_compiler_runtime8 = __toESM(require_compiler_runtime(), 1);
|
|
1767
|
-
jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1768
|
-
});
|
|
1769
|
-
|
|
1770
|
-
// src/commands/install-github-app/InstallAppStep.tsx
|
|
1771
|
-
function InstallAppStep(t0) {
|
|
1772
|
-
const $ = import_compiler_runtime9.c(12);
|
|
1773
|
-
const {
|
|
1774
|
-
repoUrl,
|
|
1775
|
-
onSubmit
|
|
1776
|
-
} = t0;
|
|
1777
|
-
let t1;
|
|
1778
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1779
|
-
t1 = {
|
|
1780
|
-
context: "Confirmation"
|
|
1781
|
-
};
|
|
1782
|
-
$[0] = t1;
|
|
1783
|
-
} else {
|
|
1784
|
-
t1 = $[0];
|
|
1785
|
-
}
|
|
1786
|
-
useKeybinding("confirm:yes", onSubmit, t1);
|
|
1787
|
-
let t2;
|
|
1788
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1789
|
-
t2 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1790
|
-
flexDirection: "column",
|
|
1791
|
-
marginBottom: 1,
|
|
1792
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1793
|
-
bold: true,
|
|
1794
|
-
children: "Install the Claude GitHub App"
|
|
1795
|
-
}, undefined, false, undefined, this)
|
|
1796
|
-
}, undefined, false, undefined, this);
|
|
1797
|
-
$[1] = t2;
|
|
1798
|
-
} else {
|
|
1799
|
-
t2 = $[1];
|
|
1800
|
-
}
|
|
1801
|
-
let t3;
|
|
1802
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1803
|
-
t3 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1804
|
-
marginBottom: 1,
|
|
1805
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1806
|
-
children: "Opening browser to install the Claude GitHub App\u2026"
|
|
1807
|
-
}, undefined, false, undefined, this)
|
|
1808
|
-
}, undefined, false, undefined, this);
|
|
1809
|
-
$[2] = t3;
|
|
1810
|
-
} else {
|
|
1811
|
-
t3 = $[2];
|
|
1812
|
-
}
|
|
1813
|
-
let t4;
|
|
1814
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1815
|
-
t4 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1816
|
-
marginBottom: 1,
|
|
1817
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1818
|
-
children: "If your browser doesn't open automatically, visit:"
|
|
1819
|
-
}, undefined, false, undefined, this)
|
|
1820
|
-
}, undefined, false, undefined, this);
|
|
1821
|
-
$[3] = t4;
|
|
1822
|
-
} else {
|
|
1823
|
-
t4 = $[3];
|
|
1824
|
-
}
|
|
1825
|
-
let t5;
|
|
1826
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1827
|
-
t5 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1828
|
-
marginBottom: 1,
|
|
1829
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1830
|
-
underline: true,
|
|
1831
|
-
children: "https://github.com/apps/claude"
|
|
1832
|
-
}, undefined, false, undefined, this)
|
|
1833
|
-
}, undefined, false, undefined, this);
|
|
1834
|
-
$[4] = t5;
|
|
1835
|
-
} else {
|
|
1836
|
-
t5 = $[4];
|
|
1837
|
-
}
|
|
1838
|
-
let t6;
|
|
1839
|
-
if ($[5] !== repoUrl) {
|
|
1840
|
-
t6 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1841
|
-
marginBottom: 1,
|
|
1842
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1843
|
-
children: [
|
|
1844
|
-
"Please install the app for repository: ",
|
|
1845
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1846
|
-
bold: true,
|
|
1847
|
-
children: repoUrl
|
|
1848
|
-
}, undefined, false, undefined, this)
|
|
1849
|
-
]
|
|
1850
|
-
}, undefined, true, undefined, this)
|
|
1851
|
-
}, undefined, false, undefined, this);
|
|
1852
|
-
$[5] = repoUrl;
|
|
1853
|
-
$[6] = t6;
|
|
1854
|
-
} else {
|
|
1855
|
-
t6 = $[6];
|
|
1856
|
-
}
|
|
1857
|
-
let t7;
|
|
1858
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1859
|
-
t7 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1860
|
-
marginBottom: 1,
|
|
1861
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1862
|
-
dimColor: true,
|
|
1863
|
-
children: "Important: Make sure to grant access to this specific repository"
|
|
1864
|
-
}, undefined, false, undefined, this)
|
|
1865
|
-
}, undefined, false, undefined, this);
|
|
1866
|
-
$[7] = t7;
|
|
1867
|
-
} else {
|
|
1868
|
-
t7 = $[7];
|
|
1869
|
-
}
|
|
1870
|
-
let t8;
|
|
1871
|
-
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1872
|
-
t8 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1873
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1874
|
-
bold: true,
|
|
1875
|
-
color: "permission",
|
|
1876
|
-
children: [
|
|
1877
|
-
"Press Enter once you've installed the app",
|
|
1878
|
-
figures_default.ellipsis
|
|
1879
|
-
]
|
|
1880
|
-
}, undefined, true, undefined, this)
|
|
1881
|
-
}, undefined, false, undefined, this);
|
|
1882
|
-
$[8] = t8;
|
|
1883
|
-
} else {
|
|
1884
|
-
t8 = $[8];
|
|
1885
|
-
}
|
|
1886
|
-
let t9;
|
|
1887
|
-
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1888
|
-
t9 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1889
|
-
marginTop: 1,
|
|
1890
|
-
children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1891
|
-
dimColor: true,
|
|
1892
|
-
children: [
|
|
1893
|
-
"Having trouble? See manual setup instructions at:",
|
|
1894
|
-
" ",
|
|
1895
|
-
/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedText, {
|
|
1896
|
-
color: "claude",
|
|
1897
|
-
children: GITHUB_ACTION_SETUP_DOCS_URL
|
|
1898
|
-
}, undefined, false, undefined, this)
|
|
1899
|
-
]
|
|
1900
|
-
}, undefined, true, undefined, this)
|
|
1901
|
-
}, undefined, false, undefined, this);
|
|
1902
|
-
$[9] = t9;
|
|
1903
|
-
} else {
|
|
1904
|
-
t9 = $[9];
|
|
1905
|
-
}
|
|
1906
|
-
let t10;
|
|
1907
|
-
if ($[10] !== t6) {
|
|
1908
|
-
t10 = /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ThemedBox_default, {
|
|
1909
|
-
flexDirection: "column",
|
|
1910
|
-
borderStyle: "round",
|
|
1911
|
-
borderDimColor: true,
|
|
1912
|
-
paddingX: 1,
|
|
1913
|
-
children: [
|
|
1914
|
-
t2,
|
|
1915
|
-
t3,
|
|
1916
|
-
t4,
|
|
1917
|
-
t5,
|
|
1918
|
-
t6,
|
|
1919
|
-
t7,
|
|
1920
|
-
t8,
|
|
1921
|
-
t9
|
|
1922
|
-
]
|
|
1923
|
-
}, undefined, true, undefined, this);
|
|
1924
|
-
$[10] = t6;
|
|
1925
|
-
$[11] = t10;
|
|
1926
|
-
} else {
|
|
1927
|
-
t10 = $[11];
|
|
1928
|
-
}
|
|
1929
|
-
return t10;
|
|
1930
|
-
}
|
|
1931
|
-
var import_compiler_runtime9, jsx_dev_runtime9;
|
|
1932
|
-
var init_InstallAppStep = __esm(() => {
|
|
1933
|
-
init_figures();
|
|
1934
|
-
init_github_app();
|
|
1935
|
-
init_ink();
|
|
1936
|
-
init_useKeybinding();
|
|
1937
|
-
import_compiler_runtime9 = __toESM(require_compiler_runtime(), 1);
|
|
1938
|
-
jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
|
|
1939
|
-
});
|
|
1940
|
-
|
|
1941
|
-
// src/commands/install-github-app/OAuthFlowStep.tsx
|
|
1942
|
-
function OAuthFlowStep({
|
|
1943
|
-
onSuccess,
|
|
1944
|
-
onCancel
|
|
1945
|
-
}) {
|
|
1946
|
-
const [oauthStatus, setOAuthStatus] = import_react5.useState({
|
|
1947
|
-
state: "starting"
|
|
1948
|
-
});
|
|
1949
|
-
const [oauthService] = import_react5.useState(() => new OAuthService);
|
|
1950
|
-
const [pastedCode, setPastedCode] = import_react5.useState("");
|
|
1951
|
-
const [cursorOffset, setCursorOffset] = import_react5.useState(0);
|
|
1952
|
-
const [showPastePrompt, setShowPastePrompt] = import_react5.useState(false);
|
|
1953
|
-
const [urlCopied, setUrlCopied] = import_react5.useState(false);
|
|
1954
|
-
const timersRef = import_react5.useRef(new Set);
|
|
1955
|
-
const urlCopiedTimerRef = import_react5.useRef(undefined);
|
|
1956
|
-
const terminalSize = useTerminalSize();
|
|
1957
|
-
const textInputColumns = Math.max(50, terminalSize.columns - PASTE_HERE_MSG.length - 4);
|
|
1958
|
-
function handleKeyDown(e) {
|
|
1959
|
-
if (oauthStatus.state !== "error")
|
|
1960
|
-
return;
|
|
1961
|
-
e.preventDefault();
|
|
1962
|
-
if (e.key === "return" && oauthStatus.toRetry) {
|
|
1963
|
-
setPastedCode("");
|
|
1964
|
-
setCursorOffset(0);
|
|
1965
|
-
setOAuthStatus({
|
|
1966
|
-
state: "about_to_retry",
|
|
1967
|
-
nextState: oauthStatus.toRetry
|
|
1968
|
-
});
|
|
1969
|
-
} else {
|
|
1970
|
-
onCancel();
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
async function handleSubmitCode(value, url) {
|
|
1974
|
-
try {
|
|
1975
|
-
const [authorizationCode, state] = value.split("#");
|
|
1976
|
-
if (!authorizationCode || !state) {
|
|
1977
|
-
setOAuthStatus({
|
|
1978
|
-
state: "error",
|
|
1979
|
-
message: "Invalid code. Please make sure the full code was copied",
|
|
1980
|
-
toRetry: {
|
|
1981
|
-
state: "waiting_for_login",
|
|
1982
|
-
url
|
|
1983
|
-
}
|
|
1984
|
-
});
|
|
1985
|
-
return;
|
|
1986
|
-
}
|
|
1987
|
-
logEvent("tengu_oauth_manual_entry", {});
|
|
1988
|
-
oauthService.handleManualAuthCodeInput({
|
|
1989
|
-
authorizationCode,
|
|
1990
|
-
state
|
|
1991
|
-
});
|
|
1992
|
-
} catch (err) {
|
|
1993
|
-
logError(err);
|
|
1994
|
-
setOAuthStatus({
|
|
1995
|
-
state: "error",
|
|
1996
|
-
message: err.message,
|
|
1997
|
-
toRetry: {
|
|
1998
|
-
state: "waiting_for_login",
|
|
1999
|
-
url
|
|
2000
|
-
}
|
|
2001
|
-
});
|
|
2002
|
-
}
|
|
2003
|
-
}
|
|
2004
|
-
const startOAuth = import_react5.useCallback(async () => {
|
|
2005
|
-
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
2006
|
-
timersRef.current.clear();
|
|
2007
|
-
try {
|
|
2008
|
-
const result = await oauthService.startOAuthFlow(async (url_0) => {
|
|
2009
|
-
setOAuthStatus({
|
|
2010
|
-
state: "waiting_for_login",
|
|
2011
|
-
url: url_0
|
|
2012
|
-
});
|
|
2013
|
-
const timer_0 = setTimeout(setShowPastePrompt, 3000, true);
|
|
2014
|
-
timersRef.current.add(timer_0);
|
|
2015
|
-
}, {
|
|
2016
|
-
loginWithClaudeAi: true,
|
|
2017
|
-
inferenceOnly: true,
|
|
2018
|
-
expiresIn: 365 * 24 * 60 * 60
|
|
2019
|
-
});
|
|
2020
|
-
setOAuthStatus({
|
|
2021
|
-
state: "processing"
|
|
2022
|
-
});
|
|
2023
|
-
saveOAuthTokensIfNeeded(result);
|
|
2024
|
-
const timer1 = setTimeout((setOAuthStatus_0, accessToken, onSuccess_0, timersRef_0) => {
|
|
2025
|
-
setOAuthStatus_0({
|
|
2026
|
-
state: "success",
|
|
2027
|
-
token: accessToken
|
|
2028
|
-
});
|
|
2029
|
-
const timer2 = setTimeout(onSuccess_0, 1000, accessToken);
|
|
2030
|
-
timersRef_0.current.add(timer2);
|
|
2031
|
-
}, 100, setOAuthStatus, result.accessToken, onSuccess, timersRef);
|
|
2032
|
-
timersRef.current.add(timer1);
|
|
2033
|
-
} catch (err_0) {
|
|
2034
|
-
const errorMessage = err_0.message;
|
|
2035
|
-
setOAuthStatus({
|
|
2036
|
-
state: "error",
|
|
2037
|
-
message: errorMessage,
|
|
2038
|
-
toRetry: {
|
|
2039
|
-
state: "starting"
|
|
2040
|
-
}
|
|
2041
|
-
});
|
|
2042
|
-
logError(err_0);
|
|
2043
|
-
logEvent("tengu_oauth_error", {
|
|
2044
|
-
error: errorMessage
|
|
2045
|
-
});
|
|
2046
|
-
}
|
|
2047
|
-
}, [oauthService, onSuccess]);
|
|
2048
|
-
import_react5.useEffect(() => {
|
|
2049
|
-
if (oauthStatus.state === "starting") {
|
|
2050
|
-
startOAuth();
|
|
2051
|
-
}
|
|
2052
|
-
}, [oauthStatus.state, startOAuth]);
|
|
2053
|
-
import_react5.useEffect(() => {
|
|
2054
|
-
if (oauthStatus.state === "about_to_retry") {
|
|
2055
|
-
const timer_1 = setTimeout((nextState, setShowPastePrompt_0, setOAuthStatus_1) => {
|
|
2056
|
-
setShowPastePrompt_0(nextState.state === "waiting_for_login");
|
|
2057
|
-
setOAuthStatus_1(nextState);
|
|
2058
|
-
}, 500, oauthStatus.nextState, setShowPastePrompt, setOAuthStatus);
|
|
2059
|
-
timersRef.current.add(timer_1);
|
|
2060
|
-
}
|
|
2061
|
-
}, [oauthStatus]);
|
|
2062
|
-
import_react5.useEffect(() => {
|
|
2063
|
-
if (pastedCode === "c" && oauthStatus.state === "waiting_for_login" && showPastePrompt && !urlCopied) {
|
|
2064
|
-
setClipboard(oauthStatus.url).then((raw) => {
|
|
2065
|
-
if (raw)
|
|
2066
|
-
process.stdout.write(raw);
|
|
2067
|
-
setUrlCopied(true);
|
|
2068
|
-
clearTimeout(urlCopiedTimerRef.current);
|
|
2069
|
-
urlCopiedTimerRef.current = setTimeout(setUrlCopied, 2000, false);
|
|
2070
|
-
});
|
|
2071
|
-
setPastedCode("");
|
|
2072
|
-
}
|
|
2073
|
-
}, [pastedCode, oauthStatus, showPastePrompt, urlCopied]);
|
|
2074
|
-
import_react5.useEffect(() => {
|
|
2075
|
-
const timers = timersRef.current;
|
|
2076
|
-
return () => {
|
|
2077
|
-
oauthService.cleanup();
|
|
2078
|
-
timers.forEach((timer_2) => clearTimeout(timer_2));
|
|
2079
|
-
timers.clear();
|
|
2080
|
-
clearTimeout(urlCopiedTimerRef.current);
|
|
2081
|
-
};
|
|
2082
|
-
}, [oauthService]);
|
|
2083
|
-
function renderStatusMessage() {
|
|
2084
|
-
switch (oauthStatus.state) {
|
|
2085
|
-
case "starting":
|
|
2086
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2087
|
-
children: [
|
|
2088
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Spinner, {}, undefined, false, undefined, this),
|
|
2089
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2090
|
-
children: "Starting authentication\u2026"
|
|
2091
|
-
}, undefined, false, undefined, this)
|
|
2092
|
-
]
|
|
2093
|
-
}, undefined, true, undefined, this);
|
|
2094
|
-
case "waiting_for_login":
|
|
2095
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2096
|
-
flexDirection: "column",
|
|
2097
|
-
gap: 1,
|
|
2098
|
-
children: [
|
|
2099
|
-
!showPastePrompt && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2100
|
-
children: [
|
|
2101
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Spinner, {}, undefined, false, undefined, this),
|
|
2102
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2103
|
-
children: "Opening browser to sign in with your Claude account\u2026"
|
|
2104
|
-
}, undefined, false, undefined, this)
|
|
2105
|
-
]
|
|
2106
|
-
}, undefined, true, undefined, this),
|
|
2107
|
-
showPastePrompt && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2108
|
-
children: [
|
|
2109
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2110
|
-
children: PASTE_HERE_MSG
|
|
2111
|
-
}, undefined, false, undefined, this),
|
|
2112
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(TextInput, {
|
|
2113
|
-
value: pastedCode,
|
|
2114
|
-
onChange: setPastedCode,
|
|
2115
|
-
onSubmit: (value_0) => handleSubmitCode(value_0, oauthStatus.url),
|
|
2116
|
-
cursorOffset,
|
|
2117
|
-
onChangeCursorOffset: setCursorOffset,
|
|
2118
|
-
columns: textInputColumns
|
|
2119
|
-
}, undefined, false, undefined, this)
|
|
2120
|
-
]
|
|
2121
|
-
}, undefined, true, undefined, this)
|
|
2122
|
-
]
|
|
2123
|
-
}, undefined, true, undefined, this);
|
|
2124
|
-
case "processing":
|
|
2125
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2126
|
-
children: [
|
|
2127
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Spinner, {}, undefined, false, undefined, this),
|
|
2128
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2129
|
-
children: "Processing authentication\u2026"
|
|
2130
|
-
}, undefined, false, undefined, this)
|
|
2131
|
-
]
|
|
2132
|
-
}, undefined, true, undefined, this);
|
|
2133
|
-
case "success":
|
|
2134
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2135
|
-
flexDirection: "column",
|
|
2136
|
-
gap: 1,
|
|
2137
|
-
children: [
|
|
2138
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2139
|
-
color: "success",
|
|
2140
|
-
children: "\u2713 Authentication token created successfully!"
|
|
2141
|
-
}, undefined, false, undefined, this),
|
|
2142
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2143
|
-
dimColor: true,
|
|
2144
|
-
children: "Using token for GitHub Actions setup\u2026"
|
|
2145
|
-
}, undefined, false, undefined, this)
|
|
2146
|
-
]
|
|
2147
|
-
}, undefined, true, undefined, this);
|
|
2148
|
-
case "error":
|
|
2149
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2150
|
-
flexDirection: "column",
|
|
2151
|
-
gap: 1,
|
|
2152
|
-
children: [
|
|
2153
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2154
|
-
color: "error",
|
|
2155
|
-
children: [
|
|
2156
|
-
"OAuth error: ",
|
|
2157
|
-
oauthStatus.message
|
|
2158
|
-
]
|
|
2159
|
-
}, undefined, true, undefined, this),
|
|
2160
|
-
oauthStatus.toRetry ? /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2161
|
-
dimColor: true,
|
|
2162
|
-
children: "Press Enter to try again, or any other key to cancel"
|
|
2163
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2164
|
-
dimColor: true,
|
|
2165
|
-
children: "Press any key to return to API key selection"
|
|
2166
|
-
}, undefined, false, undefined, this)
|
|
2167
|
-
]
|
|
2168
|
-
}, undefined, true, undefined, this);
|
|
2169
|
-
case "about_to_retry":
|
|
2170
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2171
|
-
flexDirection: "column",
|
|
2172
|
-
gap: 1,
|
|
2173
|
-
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2174
|
-
color: "permission",
|
|
2175
|
-
children: "Retrying\u2026"
|
|
2176
|
-
}, undefined, false, undefined, this)
|
|
2177
|
-
}, undefined, false, undefined, this);
|
|
2178
|
-
default:
|
|
2179
|
-
return null;
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
return /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2183
|
-
flexDirection: "column",
|
|
2184
|
-
gap: 1,
|
|
2185
|
-
tabIndex: 0,
|
|
2186
|
-
autoFocus: true,
|
|
2187
|
-
onKeyDown: handleKeyDown,
|
|
2188
|
-
children: [
|
|
2189
|
-
oauthStatus.state === "starting" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2190
|
-
flexDirection: "column",
|
|
2191
|
-
gap: 1,
|
|
2192
|
-
paddingBottom: 1,
|
|
2193
|
-
children: [
|
|
2194
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2195
|
-
bold: true,
|
|
2196
|
-
children: "Create Authentication Token"
|
|
2197
|
-
}, undefined, false, undefined, this),
|
|
2198
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2199
|
-
dimColor: true,
|
|
2200
|
-
children: "Creating a long-lived token for GitHub Actions"
|
|
2201
|
-
}, undefined, false, undefined, this)
|
|
2202
|
-
]
|
|
2203
|
-
}, undefined, true, undefined, this),
|
|
2204
|
-
oauthStatus.state !== "success" && oauthStatus.state !== "starting" && oauthStatus.state !== "processing" && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2205
|
-
flexDirection: "column",
|
|
2206
|
-
gap: 1,
|
|
2207
|
-
paddingBottom: 1,
|
|
2208
|
-
children: [
|
|
2209
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2210
|
-
bold: true,
|
|
2211
|
-
children: "Create Authentication Token"
|
|
2212
|
-
}, undefined, false, undefined, this),
|
|
2213
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2214
|
-
dimColor: true,
|
|
2215
|
-
children: "Creating a long-lived token for GitHub Actions"
|
|
2216
|
-
}, undefined, false, undefined, this)
|
|
2217
|
-
]
|
|
2218
|
-
}, "header", true, undefined, this),
|
|
2219
|
-
oauthStatus.state === "waiting_for_login" && showPastePrompt && /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2220
|
-
flexDirection: "column",
|
|
2221
|
-
gap: 1,
|
|
2222
|
-
paddingBottom: 1,
|
|
2223
|
-
children: [
|
|
2224
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2225
|
-
paddingX: 1,
|
|
2226
|
-
children: [
|
|
2227
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2228
|
-
dimColor: true,
|
|
2229
|
-
children: [
|
|
2230
|
-
"Browser didn't open? Use the url below to sign in",
|
|
2231
|
-
" "
|
|
2232
|
-
]
|
|
2233
|
-
}, undefined, true, undefined, this),
|
|
2234
|
-
urlCopied ? /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2235
|
-
color: "success",
|
|
2236
|
-
children: "(Copied!)"
|
|
2237
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2238
|
-
dimColor: true,
|
|
2239
|
-
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(KeyboardShortcutHint, {
|
|
2240
|
-
shortcut: "c",
|
|
2241
|
-
action: "copy",
|
|
2242
|
-
parens: true
|
|
2243
|
-
}, undefined, false, undefined, this)
|
|
2244
|
-
}, undefined, false, undefined, this)
|
|
2245
|
-
]
|
|
2246
|
-
}, undefined, true, undefined, this),
|
|
2247
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(Link, {
|
|
2248
|
-
url: oauthStatus.url,
|
|
2249
|
-
children: /* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedText, {
|
|
2250
|
-
dimColor: true,
|
|
2251
|
-
children: oauthStatus.url
|
|
2252
|
-
}, undefined, false, undefined, this)
|
|
2253
|
-
}, undefined, false, undefined, this)
|
|
2254
|
-
]
|
|
2255
|
-
}, "urlToCopy", true, undefined, this),
|
|
2256
|
-
/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(ThemedBox_default, {
|
|
2257
|
-
paddingLeft: 1,
|
|
2258
|
-
flexDirection: "column",
|
|
2259
|
-
gap: 1,
|
|
2260
|
-
children: renderStatusMessage()
|
|
2261
|
-
}, undefined, false, undefined, this)
|
|
2262
|
-
]
|
|
2263
|
-
}, undefined, true, undefined, this);
|
|
2264
|
-
}
|
|
2265
|
-
var import_react5, jsx_dev_runtime10, PASTE_HERE_MSG = "Paste code here if prompted > ";
|
|
2266
|
-
var init_OAuthFlowStep = __esm(() => {
|
|
2267
|
-
init_analytics();
|
|
2268
|
-
init_KeyboardShortcutHint();
|
|
2269
|
-
init_Spinner();
|
|
2270
|
-
init_TextInput();
|
|
2271
|
-
init_useTerminalSize();
|
|
2272
|
-
init_osc();
|
|
2273
|
-
init_ink();
|
|
2274
|
-
init_oauth();
|
|
2275
|
-
init_auth();
|
|
2276
|
-
init_log();
|
|
2277
|
-
import_react5 = __toESM(require_react(), 1);
|
|
2278
|
-
jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
|
|
2279
|
-
});
|
|
2280
|
-
|
|
2281
|
-
// src/commands/install-github-app/SuccessStep.tsx
|
|
2282
|
-
function SuccessStep(t0) {
|
|
2283
|
-
const $ = import_compiler_runtime10.c(21);
|
|
2284
|
-
const {
|
|
2285
|
-
secretExists,
|
|
2286
|
-
useExistingSecret,
|
|
2287
|
-
secretName,
|
|
2288
|
-
skipWorkflow: t1
|
|
2289
|
-
} = t0;
|
|
2290
|
-
const skipWorkflow = t1 === undefined ? false : t1;
|
|
2291
|
-
let t2;
|
|
2292
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2293
|
-
t2 = /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
2294
|
-
flexDirection: "column",
|
|
2295
|
-
marginBottom: 1,
|
|
2296
|
-
children: [
|
|
2297
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2298
|
-
bold: true,
|
|
2299
|
-
children: "Install GitHub App"
|
|
2300
|
-
}, undefined, false, undefined, this),
|
|
2301
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2302
|
-
dimColor: true,
|
|
2303
|
-
children: "Success"
|
|
2304
|
-
}, undefined, false, undefined, this)
|
|
2305
|
-
]
|
|
2306
|
-
}, undefined, true, undefined, this);
|
|
2307
|
-
$[0] = t2;
|
|
2308
|
-
} else {
|
|
2309
|
-
t2 = $[0];
|
|
2310
|
-
}
|
|
2311
|
-
let t3;
|
|
2312
|
-
if ($[1] !== skipWorkflow) {
|
|
2313
|
-
t3 = !skipWorkflow && /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2314
|
-
color: "success",
|
|
2315
|
-
children: "\u2713 GitHub Actions workflow created!"
|
|
2316
|
-
}, undefined, false, undefined, this);
|
|
2317
|
-
$[1] = skipWorkflow;
|
|
2318
|
-
$[2] = t3;
|
|
2319
|
-
} else {
|
|
2320
|
-
t3 = $[2];
|
|
2321
|
-
}
|
|
2322
|
-
let t4;
|
|
2323
|
-
if ($[3] !== secretExists || $[4] !== useExistingSecret) {
|
|
2324
|
-
t4 = secretExists && useExistingSecret && /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
2325
|
-
marginTop: 1,
|
|
2326
|
-
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2327
|
-
color: "success",
|
|
2328
|
-
children: "\u2713 Using existing ANTHROPIC_API_KEY secret"
|
|
2329
|
-
}, undefined, false, undefined, this)
|
|
2330
|
-
}, undefined, false, undefined, this);
|
|
2331
|
-
$[3] = secretExists;
|
|
2332
|
-
$[4] = useExistingSecret;
|
|
2333
|
-
$[5] = t4;
|
|
2334
|
-
} else {
|
|
2335
|
-
t4 = $[5];
|
|
2336
|
-
}
|
|
2337
|
-
let t5;
|
|
2338
|
-
if ($[6] !== secretExists || $[7] !== secretName || $[8] !== useExistingSecret) {
|
|
2339
|
-
t5 = (!secretExists || !useExistingSecret) && /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
2340
|
-
marginTop: 1,
|
|
2341
|
-
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2342
|
-
color: "success",
|
|
2343
|
-
children: [
|
|
2344
|
-
"\u2713 API key saved as ",
|
|
2345
|
-
secretName,
|
|
2346
|
-
" secret"
|
|
2347
|
-
]
|
|
2348
|
-
}, undefined, true, undefined, this)
|
|
2349
|
-
}, undefined, false, undefined, this);
|
|
2350
|
-
$[6] = secretExists;
|
|
2351
|
-
$[7] = secretName;
|
|
2352
|
-
$[8] = useExistingSecret;
|
|
2353
|
-
$[9] = t5;
|
|
2354
|
-
} else {
|
|
2355
|
-
t5 = $[9];
|
|
2356
|
-
}
|
|
2357
|
-
let t6;
|
|
2358
|
-
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2359
|
-
t6 = /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
2360
|
-
marginTop: 1,
|
|
2361
|
-
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2362
|
-
children: "Next steps:"
|
|
2363
|
-
}, undefined, false, undefined, this)
|
|
2364
|
-
}, undefined, false, undefined, this);
|
|
2365
|
-
$[10] = t6;
|
|
2366
|
-
} else {
|
|
2367
|
-
t6 = $[10];
|
|
2368
|
-
}
|
|
2369
|
-
let t7;
|
|
2370
|
-
if ($[11] !== skipWorkflow) {
|
|
2371
|
-
t7 = skipWorkflow ? /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(jsx_dev_runtime11.Fragment, {
|
|
2372
|
-
children: [
|
|
2373
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2374
|
-
children: "1. Install the Claude GitHub App if you haven't already"
|
|
2375
|
-
}, undefined, false, undefined, this),
|
|
2376
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2377
|
-
children: "2. Your workflow file was kept unchanged"
|
|
2378
|
-
}, undefined, false, undefined, this),
|
|
2379
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2380
|
-
children: "3. API key is configured and ready to use"
|
|
2381
|
-
}, undefined, false, undefined, this)
|
|
2382
|
-
]
|
|
2383
|
-
}, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(jsx_dev_runtime11.Fragment, {
|
|
2384
|
-
children: [
|
|
2385
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2386
|
-
children: "1. A pre-filled PR page has been created"
|
|
2387
|
-
}, undefined, false, undefined, this),
|
|
2388
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2389
|
-
children: "2. Install the Claude GitHub App if you haven't already"
|
|
2390
|
-
}, undefined, false, undefined, this),
|
|
2391
|
-
/* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2392
|
-
children: "3. Merge the PR to enable Claude PR assistance"
|
|
2393
|
-
}, undefined, false, undefined, this)
|
|
2394
|
-
]
|
|
2395
|
-
}, undefined, true, undefined, this);
|
|
2396
|
-
$[11] = skipWorkflow;
|
|
2397
|
-
$[12] = t7;
|
|
2398
|
-
} else {
|
|
2399
|
-
t7 = $[12];
|
|
2400
|
-
}
|
|
2401
|
-
let t8;
|
|
2402
|
-
if ($[13] !== t3 || $[14] !== t4 || $[15] !== t5 || $[16] !== t7) {
|
|
2403
|
-
t8 = /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
2404
|
-
flexDirection: "column",
|
|
2405
|
-
borderStyle: "round",
|
|
2406
|
-
paddingX: 1,
|
|
2407
|
-
children: [
|
|
2408
|
-
t2,
|
|
2409
|
-
t3,
|
|
2410
|
-
t4,
|
|
2411
|
-
t5,
|
|
2412
|
-
t6,
|
|
2413
|
-
t7
|
|
2414
|
-
]
|
|
2415
|
-
}, undefined, true, undefined, this);
|
|
2416
|
-
$[13] = t3;
|
|
2417
|
-
$[14] = t4;
|
|
2418
|
-
$[15] = t5;
|
|
2419
|
-
$[16] = t7;
|
|
2420
|
-
$[17] = t8;
|
|
2421
|
-
} else {
|
|
2422
|
-
t8 = $[17];
|
|
2423
|
-
}
|
|
2424
|
-
let t9;
|
|
2425
|
-
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2426
|
-
t9 = /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedBox_default, {
|
|
2427
|
-
marginLeft: 3,
|
|
2428
|
-
children: /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(ThemedText, {
|
|
2429
|
-
dimColor: true,
|
|
2430
|
-
children: "Press any key to exit"
|
|
2431
|
-
}, undefined, false, undefined, this)
|
|
2432
|
-
}, undefined, false, undefined, this);
|
|
2433
|
-
$[18] = t9;
|
|
2434
|
-
} else {
|
|
2435
|
-
t9 = $[18];
|
|
2436
|
-
}
|
|
2437
|
-
let t10;
|
|
2438
|
-
if ($[19] !== t8) {
|
|
2439
|
-
t10 = /* @__PURE__ */ jsx_dev_runtime11.jsxDEV(jsx_dev_runtime11.Fragment, {
|
|
2440
|
-
children: [
|
|
2441
|
-
t8,
|
|
2442
|
-
t9
|
|
2443
|
-
]
|
|
2444
|
-
}, undefined, true, undefined, this);
|
|
2445
|
-
$[19] = t8;
|
|
2446
|
-
$[20] = t10;
|
|
2447
|
-
} else {
|
|
2448
|
-
t10 = $[20];
|
|
2449
|
-
}
|
|
2450
|
-
return t10;
|
|
2451
|
-
}
|
|
2452
|
-
var import_compiler_runtime10, jsx_dev_runtime11;
|
|
2453
|
-
var init_SuccessStep = __esm(() => {
|
|
2454
|
-
init_ink();
|
|
2455
|
-
import_compiler_runtime10 = __toESM(require_compiler_runtime(), 1);
|
|
2456
|
-
jsx_dev_runtime11 = __toESM(require_jsx_dev_runtime(), 1);
|
|
2457
|
-
});
|
|
2458
|
-
|
|
2459
|
-
// src/commands/install-github-app/setupGitHubActions.ts
|
|
2460
|
-
async function createWorkflowFile(repoName, branchName, workflowPath, workflowContent, secretName, message, context) {
|
|
2461
|
-
const checkFileResult = await execFileNoThrow("gh", [
|
|
2462
|
-
"api",
|
|
2463
|
-
`repos/${repoName}/contents/${workflowPath}`,
|
|
2464
|
-
"--jq",
|
|
2465
|
-
".sha"
|
|
2466
|
-
]);
|
|
2467
|
-
let fileSha = null;
|
|
2468
|
-
if (checkFileResult.code === 0) {
|
|
2469
|
-
fileSha = checkFileResult.stdout.trim();
|
|
2470
|
-
}
|
|
2471
|
-
let content = workflowContent;
|
|
2472
|
-
if (secretName === "CLAUDE_CODE_OAUTH_TOKEN") {
|
|
2473
|
-
content = workflowContent.replace(/anthropic_api_key: \$\{\{ secrets\.ANTHROPIC_API_KEY \}\}/g, `claude_code_oauth_token: \${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}`);
|
|
2474
|
-
} else if (secretName !== "ANTHROPIC_API_KEY") {
|
|
2475
|
-
content = workflowContent.replace(/anthropic_api_key: \$\{\{ secrets\.ANTHROPIC_API_KEY \}\}/g, `anthropic_api_key: \${{ secrets.${secretName} }}`);
|
|
2476
|
-
}
|
|
2477
|
-
const base64Content = Buffer.from(content).toString("base64");
|
|
2478
|
-
const apiParams = [
|
|
2479
|
-
"api",
|
|
2480
|
-
"--method",
|
|
2481
|
-
"PUT",
|
|
2482
|
-
`repos/${repoName}/contents/${workflowPath}`,
|
|
2483
|
-
"-f",
|
|
2484
|
-
`message=${fileSha ? `"Update ${message}"` : `"${message}"`}`,
|
|
2485
|
-
"-f",
|
|
2486
|
-
`content=${base64Content}`,
|
|
2487
|
-
"-f",
|
|
2488
|
-
`branch=${branchName}`
|
|
2489
|
-
];
|
|
2490
|
-
if (fileSha) {
|
|
2491
|
-
apiParams.push("-f", `sha=${fileSha}`);
|
|
2492
|
-
}
|
|
2493
|
-
const createFileResult = await execFileNoThrow("gh", apiParams);
|
|
2494
|
-
if (createFileResult.code !== 0) {
|
|
2495
|
-
if (createFileResult.stderr.includes("422") && createFileResult.stderr.includes("sha")) {
|
|
2496
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2497
|
-
reason: "failed_to_create_workflow_file",
|
|
2498
|
-
exit_code: createFileResult.code,
|
|
2499
|
-
...context
|
|
2500
|
-
});
|
|
2501
|
-
throw new Error(`Failed to create workflow file ${workflowPath}: A Claude workflow file already exists in this repository. Please remove it first or update it manually.`);
|
|
2502
|
-
}
|
|
2503
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2504
|
-
reason: "failed_to_create_workflow_file",
|
|
2505
|
-
exit_code: createFileResult.code,
|
|
2506
|
-
...context
|
|
2507
|
-
});
|
|
2508
|
-
const helpText = `
|
|
2509
|
-
|
|
2510
|
-
Need help? Common issues:
|
|
2511
|
-
` + `\xB7 Permission denied \u2192 Run: gh auth refresh -h github.com -s repo,workflow
|
|
2512
|
-
` + `\xB7 Not authorized \u2192 Ensure you have admin access to the repository
|
|
2513
|
-
` + "\xB7 For manual setup \u2192 Visit: https://github.com/anthropics/claude-code-action";
|
|
2514
|
-
throw new Error(`Failed to create workflow file ${workflowPath}: ${createFileResult.stderr}${helpText}`);
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
|
-
async function setupGitHubActions(repoName, apiKeyOrOAuthToken, secretName, updateProgress, skipWorkflow = false, selectedWorkflows, authType, context) {
|
|
2518
|
-
try {
|
|
2519
|
-
logEvent("tengu_setup_github_actions_started", {
|
|
2520
|
-
skip_workflow: skipWorkflow,
|
|
2521
|
-
has_api_key: !!apiKeyOrOAuthToken,
|
|
2522
|
-
using_default_secret_name: secretName === "ANTHROPIC_API_KEY",
|
|
2523
|
-
selected_claude_workflow: selectedWorkflows.includes("claude"),
|
|
2524
|
-
selected_claude_review_workflow: selectedWorkflows.includes("claude-review"),
|
|
2525
|
-
...context
|
|
2526
|
-
});
|
|
2527
|
-
const repoCheckResult = await execFileNoThrow("gh", [
|
|
2528
|
-
"api",
|
|
2529
|
-
`repos/${repoName}`,
|
|
2530
|
-
"--jq",
|
|
2531
|
-
".id"
|
|
2532
|
-
]);
|
|
2533
|
-
if (repoCheckResult.code !== 0) {
|
|
2534
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2535
|
-
reason: "repo_not_found",
|
|
2536
|
-
exit_code: repoCheckResult.code,
|
|
2537
|
-
...context
|
|
2538
|
-
});
|
|
2539
|
-
throw new Error(`Failed to access repository ${repoName}: ${repoCheckResult.stderr}`);
|
|
2540
|
-
}
|
|
2541
|
-
const defaultBranchResult = await execFileNoThrow("gh", [
|
|
2542
|
-
"api",
|
|
2543
|
-
`repos/${repoName}`,
|
|
2544
|
-
"--jq",
|
|
2545
|
-
".default_branch"
|
|
2546
|
-
]);
|
|
2547
|
-
if (defaultBranchResult.code !== 0) {
|
|
2548
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2549
|
-
reason: "failed_to_get_default_branch",
|
|
2550
|
-
exit_code: defaultBranchResult.code,
|
|
2551
|
-
...context
|
|
2552
|
-
});
|
|
2553
|
-
throw new Error(`Failed to get default branch: ${defaultBranchResult.stderr}`);
|
|
2554
|
-
}
|
|
2555
|
-
const defaultBranch = defaultBranchResult.stdout.trim();
|
|
2556
|
-
const shaResult = await execFileNoThrow("gh", [
|
|
2557
|
-
"api",
|
|
2558
|
-
`repos/${repoName}/git/ref/heads/${defaultBranch}`,
|
|
2559
|
-
"--jq",
|
|
2560
|
-
".object.sha"
|
|
2561
|
-
]);
|
|
2562
|
-
if (shaResult.code !== 0) {
|
|
2563
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2564
|
-
reason: "failed_to_get_branch_sha",
|
|
2565
|
-
exit_code: shaResult.code,
|
|
2566
|
-
...context
|
|
2567
|
-
});
|
|
2568
|
-
throw new Error(`Failed to get branch SHA: ${shaResult.stderr}`);
|
|
2569
|
-
}
|
|
2570
|
-
const sha = shaResult.stdout.trim();
|
|
2571
|
-
let branchName = null;
|
|
2572
|
-
if (!skipWorkflow) {
|
|
2573
|
-
updateProgress();
|
|
2574
|
-
branchName = `add-claude-github-actions-${Date.now()}`;
|
|
2575
|
-
const createBranchResult = await execFileNoThrow("gh", [
|
|
2576
|
-
"api",
|
|
2577
|
-
"--method",
|
|
2578
|
-
"POST",
|
|
2579
|
-
`repos/${repoName}/git/refs`,
|
|
2580
|
-
"-f",
|
|
2581
|
-
`ref=refs/heads/${branchName}`,
|
|
2582
|
-
"-f",
|
|
2583
|
-
`sha=${sha}`
|
|
2584
|
-
]);
|
|
2585
|
-
if (createBranchResult.code !== 0) {
|
|
2586
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2587
|
-
reason: "failed_to_create_branch",
|
|
2588
|
-
exit_code: createBranchResult.code,
|
|
2589
|
-
...context
|
|
2590
|
-
});
|
|
2591
|
-
throw new Error(`Failed to create branch: ${createBranchResult.stderr}`);
|
|
2592
|
-
}
|
|
2593
|
-
updateProgress();
|
|
2594
|
-
const workflows = [];
|
|
2595
|
-
if (selectedWorkflows.includes("claude")) {
|
|
2596
|
-
workflows.push({
|
|
2597
|
-
path: ".github/workflows/claude.yml",
|
|
2598
|
-
content: WORKFLOW_CONTENT,
|
|
2599
|
-
message: "Claude PR Assistant workflow"
|
|
2600
|
-
});
|
|
2601
|
-
}
|
|
2602
|
-
if (selectedWorkflows.includes("claude-review")) {
|
|
2603
|
-
workflows.push({
|
|
2604
|
-
path: ".github/workflows/claude-code-review.yml",
|
|
2605
|
-
content: CODE_REVIEW_PLUGIN_WORKFLOW_CONTENT,
|
|
2606
|
-
message: "Claude Code Review workflow"
|
|
2607
|
-
});
|
|
2608
|
-
}
|
|
2609
|
-
for (const workflow of workflows) {
|
|
2610
|
-
await createWorkflowFile(repoName, branchName, workflow.path, workflow.content, secretName, workflow.message, context);
|
|
2611
|
-
}
|
|
2612
|
-
}
|
|
2613
|
-
updateProgress();
|
|
2614
|
-
if (apiKeyOrOAuthToken) {
|
|
2615
|
-
const setSecretResult = await execFileNoThrow("gh", [
|
|
2616
|
-
"secret",
|
|
2617
|
-
"set",
|
|
2618
|
-
secretName,
|
|
2619
|
-
"--body",
|
|
2620
|
-
apiKeyOrOAuthToken,
|
|
2621
|
-
"--repo",
|
|
2622
|
-
repoName
|
|
2623
|
-
]);
|
|
2624
|
-
if (setSecretResult.code !== 0) {
|
|
2625
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2626
|
-
reason: "failed_to_set_api_key_secret",
|
|
2627
|
-
exit_code: setSecretResult.code,
|
|
2628
|
-
...context
|
|
2629
|
-
});
|
|
2630
|
-
const helpText = `
|
|
2631
|
-
|
|
2632
|
-
Need help? Common issues:
|
|
2633
|
-
` + `\xB7 Permission denied \u2192 Run: gh auth refresh -h github.com -s repo
|
|
2634
|
-
` + `\xB7 Not authorized \u2192 Ensure you have admin access to the repository
|
|
2635
|
-
` + "\xB7 For manual setup \u2192 Visit: https://github.com/anthropics/claude-code-action";
|
|
2636
|
-
throw new Error(`Failed to set API key secret: ${setSecretResult.stderr || "Unknown error"}${helpText}`);
|
|
2637
|
-
}
|
|
2638
|
-
}
|
|
2639
|
-
if (!skipWorkflow && branchName) {
|
|
2640
|
-
updateProgress();
|
|
2641
|
-
const compareUrl = `https://github.com/${repoName}/compare/${defaultBranch}...${branchName}?quick_pull=1&title=${encodeURIComponent(PR_TITLE)}&body=${encodeURIComponent(PR_BODY)}`;
|
|
2642
|
-
await openBrowser(compareUrl);
|
|
2643
|
-
}
|
|
2644
|
-
logEvent("tengu_setup_github_actions_completed", {
|
|
2645
|
-
skip_workflow: skipWorkflow,
|
|
2646
|
-
has_api_key: !!apiKeyOrOAuthToken,
|
|
2647
|
-
auth_type: authType,
|
|
2648
|
-
using_default_secret_name: secretName === "ANTHROPIC_API_KEY",
|
|
2649
|
-
selected_claude_workflow: selectedWorkflows.includes("claude"),
|
|
2650
|
-
selected_claude_review_workflow: selectedWorkflows.includes("claude-review"),
|
|
2651
|
-
...context
|
|
2652
|
-
});
|
|
2653
|
-
saveGlobalConfig((current) => ({
|
|
2654
|
-
...current,
|
|
2655
|
-
githubActionSetupCount: (current.githubActionSetupCount ?? 0) + 1
|
|
2656
|
-
}));
|
|
2657
|
-
} catch (error) {
|
|
2658
|
-
if (!error || !(error instanceof Error) || !error.message.includes("Failed to")) {
|
|
2659
|
-
logEvent("tengu_setup_github_actions_failed", {
|
|
2660
|
-
reason: "unexpected_error",
|
|
2661
|
-
...context
|
|
2662
|
-
});
|
|
2663
|
-
}
|
|
2664
|
-
if (error instanceof Error) {
|
|
2665
|
-
logError(error);
|
|
2666
|
-
}
|
|
2667
|
-
throw error;
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
var init_setupGitHubActions = __esm(() => {
|
|
2671
|
-
init_analytics();
|
|
2672
|
-
init_config();
|
|
2673
|
-
init_github_app();
|
|
2674
|
-
init_browser();
|
|
2675
|
-
init_execFileNoThrow();
|
|
2676
|
-
init_log();
|
|
2677
|
-
});
|
|
2678
|
-
|
|
2679
|
-
// src/commands/install-github-app/WarningsStep.tsx
|
|
2680
|
-
function WarningsStep(t0) {
|
|
2681
|
-
const $ = import_compiler_runtime11.c(8);
|
|
2682
|
-
const {
|
|
2683
|
-
warnings,
|
|
2684
|
-
onContinue
|
|
2685
|
-
} = t0;
|
|
2686
|
-
let t1;
|
|
2687
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2688
|
-
t1 = {
|
|
2689
|
-
context: "Confirmation"
|
|
2690
|
-
};
|
|
2691
|
-
$[0] = t1;
|
|
2692
|
-
} else {
|
|
2693
|
-
t1 = $[0];
|
|
2694
|
-
}
|
|
2695
|
-
useKeybinding("confirm:yes", onContinue, t1);
|
|
2696
|
-
let t2;
|
|
2697
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2698
|
-
t2 = /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2699
|
-
flexDirection: "column",
|
|
2700
|
-
marginBottom: 1,
|
|
2701
|
-
children: [
|
|
2702
|
-
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2703
|
-
bold: true,
|
|
2704
|
-
children: [
|
|
2705
|
-
figures_default.warning,
|
|
2706
|
-
" Setup Warnings"
|
|
2707
|
-
]
|
|
2708
|
-
}, undefined, true, undefined, this),
|
|
2709
|
-
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2710
|
-
dimColor: true,
|
|
2711
|
-
children: "We found some potential issues, but you can continue anyway"
|
|
2712
|
-
}, undefined, false, undefined, this)
|
|
2713
|
-
]
|
|
2714
|
-
}, undefined, true, undefined, this);
|
|
2715
|
-
$[1] = t2;
|
|
2716
|
-
} else {
|
|
2717
|
-
t2 = $[1];
|
|
2718
|
-
}
|
|
2719
|
-
let t3;
|
|
2720
|
-
if ($[2] !== warnings) {
|
|
2721
|
-
t3 = warnings.map(_temp22);
|
|
2722
|
-
$[2] = warnings;
|
|
2723
|
-
$[3] = t3;
|
|
2724
|
-
} else {
|
|
2725
|
-
t3 = $[3];
|
|
2726
|
-
}
|
|
2727
|
-
let t4;
|
|
2728
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2729
|
-
t4 = /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2730
|
-
marginTop: 1,
|
|
2731
|
-
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2732
|
-
bold: true,
|
|
2733
|
-
color: "permission",
|
|
2734
|
-
children: "Press Enter to continue anyway, or Ctrl+C to exit and fix issues"
|
|
2735
|
-
}, undefined, false, undefined, this)
|
|
2736
|
-
}, undefined, false, undefined, this);
|
|
2737
|
-
$[4] = t4;
|
|
2738
|
-
} else {
|
|
2739
|
-
t4 = $[4];
|
|
2740
|
-
}
|
|
2741
|
-
let t5;
|
|
2742
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2743
|
-
t5 = /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2744
|
-
marginTop: 1,
|
|
2745
|
-
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2746
|
-
dimColor: true,
|
|
2747
|
-
children: [
|
|
2748
|
-
"You can also try the manual setup steps if needed:",
|
|
2749
|
-
" ",
|
|
2750
|
-
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2751
|
-
color: "claude",
|
|
2752
|
-
children: GITHUB_ACTION_SETUP_DOCS_URL
|
|
2753
|
-
}, undefined, false, undefined, this)
|
|
2754
|
-
]
|
|
2755
|
-
}, undefined, true, undefined, this)
|
|
2756
|
-
}, undefined, false, undefined, this);
|
|
2757
|
-
$[5] = t5;
|
|
2758
|
-
} else {
|
|
2759
|
-
t5 = $[5];
|
|
2760
|
-
}
|
|
2761
|
-
let t6;
|
|
2762
|
-
if ($[6] !== t3) {
|
|
2763
|
-
t6 = /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(jsx_dev_runtime12.Fragment, {
|
|
2764
|
-
children: /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2765
|
-
flexDirection: "column",
|
|
2766
|
-
borderStyle: "round",
|
|
2767
|
-
paddingX: 1,
|
|
2768
|
-
children: [
|
|
2769
|
-
t2,
|
|
2770
|
-
t3,
|
|
2771
|
-
t4,
|
|
2772
|
-
t5
|
|
2773
|
-
]
|
|
2774
|
-
}, undefined, true, undefined, this)
|
|
2775
|
-
}, undefined, false, undefined, this);
|
|
2776
|
-
$[6] = t3;
|
|
2777
|
-
$[7] = t6;
|
|
2778
|
-
} else {
|
|
2779
|
-
t6 = $[7];
|
|
2780
|
-
}
|
|
2781
|
-
return t6;
|
|
2782
|
-
}
|
|
2783
|
-
function _temp22(warning, index) {
|
|
2784
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2785
|
-
flexDirection: "column",
|
|
2786
|
-
marginBottom: 1,
|
|
2787
|
-
children: [
|
|
2788
|
-
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2789
|
-
color: "warning",
|
|
2790
|
-
bold: true,
|
|
2791
|
-
children: warning.title
|
|
2792
|
-
}, undefined, false, undefined, this),
|
|
2793
|
-
/* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2794
|
-
children: warning.message
|
|
2795
|
-
}, undefined, false, undefined, this),
|
|
2796
|
-
warning.instructions.length > 0 && /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedBox_default, {
|
|
2797
|
-
flexDirection: "column",
|
|
2798
|
-
marginLeft: 2,
|
|
2799
|
-
marginTop: 1,
|
|
2800
|
-
children: warning.instructions.map(_temp3)
|
|
2801
|
-
}, undefined, false, undefined, this)
|
|
2802
|
-
]
|
|
2803
|
-
}, index, true, undefined, this);
|
|
2804
|
-
}
|
|
2805
|
-
function _temp3(instruction, i) {
|
|
2806
|
-
return /* @__PURE__ */ jsx_dev_runtime12.jsxDEV(ThemedText, {
|
|
2807
|
-
dimColor: true,
|
|
2808
|
-
children: [
|
|
2809
|
-
"\u2022 ",
|
|
2810
|
-
instruction
|
|
2811
|
-
]
|
|
2812
|
-
}, i, true, undefined, this);
|
|
2813
|
-
}
|
|
2814
|
-
var import_compiler_runtime11, jsx_dev_runtime12;
|
|
2815
|
-
var init_WarningsStep = __esm(() => {
|
|
2816
|
-
init_figures();
|
|
2817
|
-
init_github_app();
|
|
2818
|
-
init_ink();
|
|
2819
|
-
init_useKeybinding();
|
|
2820
|
-
import_compiler_runtime11 = __toESM(require_compiler_runtime(), 1);
|
|
2821
|
-
jsx_dev_runtime12 = __toESM(require_jsx_dev_runtime(), 1);
|
|
2822
|
-
});
|
|
2823
|
-
|
|
2824
|
-
// src/commands/install-github-app/install-github-app.tsx
|
|
2825
|
-
function InstallGitHubApp(props) {
|
|
2826
|
-
const [existingApiKey] = import_react6.useState(() => getAnthropicApiKey());
|
|
2827
|
-
const [state, setState] = import_react6.useState({
|
|
2828
|
-
...INITIAL_STATE,
|
|
2829
|
-
useExistingKey: !!existingApiKey,
|
|
2830
|
-
selectedApiKeyOption: existingApiKey ? "existing" : isAnthropicAuthEnabled() ? "oauth" : "new"
|
|
2831
|
-
});
|
|
2832
|
-
useExitOnCtrlCDWithKeybindings();
|
|
2833
|
-
import_react6.default.useEffect(() => {
|
|
2834
|
-
logEvent("tengu_install_github_app_started", {});
|
|
2835
|
-
}, []);
|
|
2836
|
-
const checkGitHubCLI = import_react6.useCallback(async () => {
|
|
2837
|
-
const warnings = [];
|
|
2838
|
-
const ghVersionResult = await execa("gh --version", {
|
|
2839
|
-
shell: true,
|
|
2840
|
-
reject: false
|
|
2841
|
-
});
|
|
2842
|
-
if (ghVersionResult.exitCode !== 0) {
|
|
2843
|
-
warnings.push({
|
|
2844
|
-
title: "GitHub CLI not found",
|
|
2845
|
-
message: "GitHub CLI (gh) does not appear to be installed or accessible.",
|
|
2846
|
-
instructions: ["Install GitHub CLI from https://cli.github.com/", "macOS: brew install gh", "Windows: winget install --id GitHub.cli", "Linux: See installation instructions at https://github.com/cli/cli#installation"]
|
|
2847
|
-
});
|
|
2848
|
-
}
|
|
2849
|
-
const authResult = await execa("gh auth status -a", {
|
|
2850
|
-
shell: true,
|
|
2851
|
-
reject: false
|
|
2852
|
-
});
|
|
2853
|
-
if (authResult.exitCode !== 0) {
|
|
2854
|
-
warnings.push({
|
|
2855
|
-
title: "GitHub CLI not authenticated",
|
|
2856
|
-
message: "GitHub CLI does not appear to be authenticated.",
|
|
2857
|
-
instructions: ["Run: gh auth login", "Follow the prompts to authenticate with GitHub", "Or set up authentication using environment variables or other methods"]
|
|
2858
|
-
});
|
|
2859
|
-
} else {
|
|
2860
|
-
const tokenScopesMatch = authResult.stdout.match(/Token scopes:.*$/m);
|
|
2861
|
-
if (tokenScopesMatch) {
|
|
2862
|
-
const scopes = tokenScopesMatch[0];
|
|
2863
|
-
const missingScopes = [];
|
|
2864
|
-
if (!scopes.includes("repo")) {
|
|
2865
|
-
missingScopes.push("repo");
|
|
2866
|
-
}
|
|
2867
|
-
if (!scopes.includes("workflow")) {
|
|
2868
|
-
missingScopes.push("workflow");
|
|
2869
|
-
}
|
|
2870
|
-
if (missingScopes.length > 0) {
|
|
2871
|
-
setState((prev) => ({
|
|
2872
|
-
...prev,
|
|
2873
|
-
step: "error",
|
|
2874
|
-
error: `GitHub CLI is missing required permissions: ${missingScopes.join(", ")}.`,
|
|
2875
|
-
errorReason: "Missing required scopes",
|
|
2876
|
-
errorInstructions: [`Your GitHub CLI authentication is missing the "${missingScopes.join('" and "')}" ${plural(missingScopes.length, "scope")} needed to manage GitHub Actions and secrets.`, "", "To fix this, run:", " gh auth refresh -h github.com -s repo,workflow", "", "This will add the necessary permissions to manage workflows and secrets."]
|
|
2877
|
-
}));
|
|
2878
|
-
return;
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
}
|
|
2882
|
-
const currentRepo = await getGithubRepo() ?? "";
|
|
2883
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
2884
|
-
step: "check-gh"
|
|
2885
|
-
});
|
|
2886
|
-
setState((prev_0) => ({
|
|
2887
|
-
...prev_0,
|
|
2888
|
-
warnings,
|
|
2889
|
-
currentRepo,
|
|
2890
|
-
selectedRepoName: currentRepo,
|
|
2891
|
-
useCurrentRepo: !!currentRepo,
|
|
2892
|
-
step: warnings.length > 0 ? "warnings" : "choose-repo"
|
|
2893
|
-
}));
|
|
2894
|
-
}, []);
|
|
2895
|
-
import_react6.default.useEffect(() => {
|
|
2896
|
-
if (state.step === "check-gh") {
|
|
2897
|
-
checkGitHubCLI();
|
|
2898
|
-
}
|
|
2899
|
-
}, [state.step, checkGitHubCLI]);
|
|
2900
|
-
const runSetupGitHubActions = import_react6.useCallback(async (apiKeyOrOAuthToken, secretName) => {
|
|
2901
|
-
setState((prev_1) => ({
|
|
2902
|
-
...prev_1,
|
|
2903
|
-
step: "creating",
|
|
2904
|
-
currentWorkflowInstallStep: 0
|
|
2905
|
-
}));
|
|
2906
|
-
try {
|
|
2907
|
-
await setupGitHubActions(state.selectedRepoName, apiKeyOrOAuthToken, secretName, () => {
|
|
2908
|
-
setState((prev_4) => ({
|
|
2909
|
-
...prev_4,
|
|
2910
|
-
currentWorkflowInstallStep: prev_4.currentWorkflowInstallStep + 1
|
|
2911
|
-
}));
|
|
2912
|
-
}, state.workflowAction === "skip", state.selectedWorkflows, state.authType, {
|
|
2913
|
-
useCurrentRepo: state.useCurrentRepo,
|
|
2914
|
-
workflowExists: state.workflowExists,
|
|
2915
|
-
secretExists: state.secretExists
|
|
2916
|
-
});
|
|
2917
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
2918
|
-
step: "creating"
|
|
2919
|
-
});
|
|
2920
|
-
setState((prev_5) => ({
|
|
2921
|
-
...prev_5,
|
|
2922
|
-
step: "success"
|
|
2923
|
-
}));
|
|
2924
|
-
} catch (error) {
|
|
2925
|
-
const errorMessage = error instanceof Error ? error.message : "Failed to set up GitHub Actions";
|
|
2926
|
-
if (errorMessage.includes("workflow file already exists")) {
|
|
2927
|
-
logEvent("tengu_install_github_app_error", {
|
|
2928
|
-
reason: "workflow_file_exists"
|
|
2929
|
-
});
|
|
2930
|
-
setState((prev_2) => ({
|
|
2931
|
-
...prev_2,
|
|
2932
|
-
step: "error",
|
|
2933
|
-
error: "A Claude workflow file already exists in this repository.",
|
|
2934
|
-
errorReason: "Workflow file conflict",
|
|
2935
|
-
errorInstructions: ["The file .github/workflows/claude.yml already exists", "You can either:", " 1. Delete the existing file and run this command again", " 2. Update the existing file manually using the template from:", ` ${GITHUB_ACTION_SETUP_DOCS_URL}`]
|
|
2936
|
-
}));
|
|
2937
|
-
} else {
|
|
2938
|
-
logEvent("tengu_install_github_app_error", {
|
|
2939
|
-
reason: "setup_github_actions_failed"
|
|
2940
|
-
});
|
|
2941
|
-
setState((prev_3) => ({
|
|
2942
|
-
...prev_3,
|
|
2943
|
-
step: "error",
|
|
2944
|
-
error: errorMessage,
|
|
2945
|
-
errorReason: "GitHub Actions setup failed",
|
|
2946
|
-
errorInstructions: []
|
|
2947
|
-
}));
|
|
2948
|
-
}
|
|
2949
|
-
}
|
|
2950
|
-
}, [state.selectedRepoName, state.workflowAction, state.selectedWorkflows, state.useCurrentRepo, state.workflowExists, state.secretExists, state.authType]);
|
|
2951
|
-
async function openGitHubAppInstallation() {
|
|
2952
|
-
const installUrl = "https://github.com/apps/claude";
|
|
2953
|
-
await openBrowser(installUrl);
|
|
2954
|
-
}
|
|
2955
|
-
async function checkRepositoryPermissions(repoName) {
|
|
2956
|
-
try {
|
|
2957
|
-
const result = await execFileNoThrow("gh", ["api", `repos/${repoName}`, "--jq", ".permissions.admin"]);
|
|
2958
|
-
if (result.code === 0) {
|
|
2959
|
-
const hasAdmin = result.stdout.trim() === "true";
|
|
2960
|
-
return {
|
|
2961
|
-
hasAccess: hasAdmin
|
|
2962
|
-
};
|
|
2963
|
-
}
|
|
2964
|
-
if (result.stderr.includes("404") || result.stderr.includes("Not Found")) {
|
|
2965
|
-
return {
|
|
2966
|
-
hasAccess: false,
|
|
2967
|
-
error: "repository_not_found"
|
|
2968
|
-
};
|
|
2969
|
-
}
|
|
2970
|
-
return {
|
|
2971
|
-
hasAccess: false
|
|
2972
|
-
};
|
|
2973
|
-
} catch {
|
|
2974
|
-
return {
|
|
2975
|
-
hasAccess: false
|
|
2976
|
-
};
|
|
2977
|
-
}
|
|
2978
|
-
}
|
|
2979
|
-
async function checkExistingWorkflowFile(repoName_0) {
|
|
2980
|
-
const checkFileResult = await execFileNoThrow("gh", ["api", `repos/${repoName_0}/contents/.github/workflows/claude.yml`, "--jq", ".sha"]);
|
|
2981
|
-
return checkFileResult.code === 0;
|
|
2982
|
-
}
|
|
2983
|
-
async function checkExistingSecret() {
|
|
2984
|
-
const checkSecretsResult = await execFileNoThrow("gh", ["secret", "list", "--app", "actions", "--repo", state.selectedRepoName]);
|
|
2985
|
-
if (checkSecretsResult.code === 0) {
|
|
2986
|
-
const lines = checkSecretsResult.stdout.split(`
|
|
2987
|
-
`);
|
|
2988
|
-
const hasAnthropicKey = lines.some((line) => {
|
|
2989
|
-
return /^ANTHROPIC_API_KEY\s+/.test(line);
|
|
2990
|
-
});
|
|
2991
|
-
if (hasAnthropicKey) {
|
|
2992
|
-
setState((prev_6) => ({
|
|
2993
|
-
...prev_6,
|
|
2994
|
-
secretExists: true,
|
|
2995
|
-
step: "check-existing-secret"
|
|
2996
|
-
}));
|
|
2997
|
-
} else {
|
|
2998
|
-
if (existingApiKey) {
|
|
2999
|
-
setState((prev_7) => ({
|
|
3000
|
-
...prev_7,
|
|
3001
|
-
apiKeyOrOAuthToken: existingApiKey,
|
|
3002
|
-
useExistingKey: true
|
|
3003
|
-
}));
|
|
3004
|
-
await runSetupGitHubActions(existingApiKey, state.secretName);
|
|
3005
|
-
} else {
|
|
3006
|
-
setState((prev_8) => ({
|
|
3007
|
-
...prev_8,
|
|
3008
|
-
step: "api-key"
|
|
3009
|
-
}));
|
|
3010
|
-
}
|
|
3011
|
-
}
|
|
3012
|
-
} else {
|
|
3013
|
-
if (existingApiKey) {
|
|
3014
|
-
setState((prev_9) => ({
|
|
3015
|
-
...prev_9,
|
|
3016
|
-
apiKeyOrOAuthToken: existingApiKey,
|
|
3017
|
-
useExistingKey: true
|
|
3018
|
-
}));
|
|
3019
|
-
await runSetupGitHubActions(existingApiKey, state.secretName);
|
|
3020
|
-
} else {
|
|
3021
|
-
setState((prev_10) => ({
|
|
3022
|
-
...prev_10,
|
|
3023
|
-
step: "api-key"
|
|
3024
|
-
}));
|
|
3025
|
-
}
|
|
3026
|
-
}
|
|
3027
|
-
}
|
|
3028
|
-
const handleSubmit = async () => {
|
|
3029
|
-
if (state.step === "warnings") {
|
|
3030
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3031
|
-
step: "warnings"
|
|
3032
|
-
});
|
|
3033
|
-
setState((prev_11) => ({
|
|
3034
|
-
...prev_11,
|
|
3035
|
-
step: "install-app"
|
|
3036
|
-
}));
|
|
3037
|
-
setTimeout(openGitHubAppInstallation, 0);
|
|
3038
|
-
} else if (state.step === "choose-repo") {
|
|
3039
|
-
let repoName_1 = state.useCurrentRepo ? state.currentRepo : state.selectedRepoName;
|
|
3040
|
-
if (!repoName_1.trim()) {
|
|
3041
|
-
return;
|
|
3042
|
-
}
|
|
3043
|
-
const repoWarnings = [];
|
|
3044
|
-
if (repoName_1.includes("github.com")) {
|
|
3045
|
-
const match = repoName_1.match(/github\.com[:/]([^/]+\/[^/]+)(\.git)?$/);
|
|
3046
|
-
if (!match) {
|
|
3047
|
-
repoWarnings.push({
|
|
3048
|
-
title: "Invalid GitHub URL format",
|
|
3049
|
-
message: "The repository URL format appears to be invalid.",
|
|
3050
|
-
instructions: ["Use format: owner/repo or https://github.com/owner/repo", "Example: anthropics/claude-cli"]
|
|
3051
|
-
});
|
|
3052
|
-
} else {
|
|
3053
|
-
repoName_1 = match[1]?.replace(/\.git$/, "") || "";
|
|
3054
|
-
}
|
|
3055
|
-
}
|
|
3056
|
-
if (!repoName_1.includes("/")) {
|
|
3057
|
-
repoWarnings.push({
|
|
3058
|
-
title: "Repository format warning",
|
|
3059
|
-
message: 'Repository should be in format "owner/repo"',
|
|
3060
|
-
instructions: ["Use format: owner/repo", "Example: anthropics/claude-cli"]
|
|
3061
|
-
});
|
|
3062
|
-
}
|
|
3063
|
-
const permissionCheck = await checkRepositoryPermissions(repoName_1);
|
|
3064
|
-
if (permissionCheck.error === "repository_not_found") {
|
|
3065
|
-
repoWarnings.push({
|
|
3066
|
-
title: "Repository not found",
|
|
3067
|
-
message: `Repository ${repoName_1} was not found or you don't have access.`,
|
|
3068
|
-
instructions: [`Check that the repository name is correct: ${repoName_1}`, "Ensure you have access to this repository", 'For private repositories, make sure your GitHub token has the "repo" scope', "You can add the repo scope with: gh auth refresh -h github.com -s repo,workflow"]
|
|
3069
|
-
});
|
|
3070
|
-
} else if (!permissionCheck.hasAccess) {
|
|
3071
|
-
repoWarnings.push({
|
|
3072
|
-
title: "Admin permissions required",
|
|
3073
|
-
message: `You might need admin permissions on ${repoName_1} to set up GitHub Actions.`,
|
|
3074
|
-
instructions: ["Repository admins can install GitHub Apps and set secrets", "Ask a repository admin to run this command if setup fails", "Alternatively, you can use the manual setup instructions"]
|
|
3075
|
-
});
|
|
3076
|
-
}
|
|
3077
|
-
const workflowExists = await checkExistingWorkflowFile(repoName_1);
|
|
3078
|
-
if (repoWarnings.length > 0) {
|
|
3079
|
-
const allWarnings = [...state.warnings, ...repoWarnings];
|
|
3080
|
-
setState((prev_12) => ({
|
|
3081
|
-
...prev_12,
|
|
3082
|
-
selectedRepoName: repoName_1,
|
|
3083
|
-
workflowExists,
|
|
3084
|
-
warnings: allWarnings,
|
|
3085
|
-
step: "warnings"
|
|
3086
|
-
}));
|
|
3087
|
-
} else {
|
|
3088
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3089
|
-
step: "choose-repo"
|
|
3090
|
-
});
|
|
3091
|
-
setState((prev_13) => ({
|
|
3092
|
-
...prev_13,
|
|
3093
|
-
selectedRepoName: repoName_1,
|
|
3094
|
-
workflowExists,
|
|
3095
|
-
step: "install-app"
|
|
3096
|
-
}));
|
|
3097
|
-
setTimeout(openGitHubAppInstallation, 0);
|
|
3098
|
-
}
|
|
3099
|
-
} else if (state.step === "install-app") {
|
|
3100
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3101
|
-
step: "install-app"
|
|
3102
|
-
});
|
|
3103
|
-
if (state.workflowExists) {
|
|
3104
|
-
setState((prev_14) => ({
|
|
3105
|
-
...prev_14,
|
|
3106
|
-
step: "check-existing-workflow"
|
|
3107
|
-
}));
|
|
3108
|
-
} else {
|
|
3109
|
-
setState((prev_15) => ({
|
|
3110
|
-
...prev_15,
|
|
3111
|
-
step: "select-workflows"
|
|
3112
|
-
}));
|
|
3113
|
-
}
|
|
3114
|
-
} else if (state.step === "check-existing-workflow") {
|
|
3115
|
-
return;
|
|
3116
|
-
} else if (state.step === "select-workflows") {
|
|
3117
|
-
return;
|
|
3118
|
-
} else if (state.step === "check-existing-secret") {
|
|
3119
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3120
|
-
step: "check-existing-secret"
|
|
3121
|
-
});
|
|
3122
|
-
if (state.useExistingSecret) {
|
|
3123
|
-
await runSetupGitHubActions(null, state.secretName);
|
|
3124
|
-
} else {
|
|
3125
|
-
await runSetupGitHubActions(state.apiKeyOrOAuthToken, state.secretName);
|
|
3126
|
-
}
|
|
3127
|
-
} else if (state.step === "api-key") {
|
|
3128
|
-
if (state.selectedApiKeyOption === "oauth") {
|
|
3129
|
-
return;
|
|
3130
|
-
}
|
|
3131
|
-
const apiKeyToUse = state.selectedApiKeyOption === "existing" ? existingApiKey : state.apiKeyOrOAuthToken;
|
|
3132
|
-
if (!apiKeyToUse) {
|
|
3133
|
-
logEvent("tengu_install_github_app_error", {
|
|
3134
|
-
reason: "api_key_missing"
|
|
3135
|
-
});
|
|
3136
|
-
setState((prev_16) => ({
|
|
3137
|
-
...prev_16,
|
|
3138
|
-
step: "error",
|
|
3139
|
-
error: "API key is required"
|
|
3140
|
-
}));
|
|
3141
|
-
return;
|
|
3142
|
-
}
|
|
3143
|
-
setState((prev_17) => ({
|
|
3144
|
-
...prev_17,
|
|
3145
|
-
apiKeyOrOAuthToken: apiKeyToUse,
|
|
3146
|
-
useExistingKey: state.selectedApiKeyOption === "existing"
|
|
3147
|
-
}));
|
|
3148
|
-
const checkSecretsResult_0 = await execFileNoThrow("gh", ["secret", "list", "--app", "actions", "--repo", state.selectedRepoName]);
|
|
3149
|
-
if (checkSecretsResult_0.code === 0) {
|
|
3150
|
-
const lines_0 = checkSecretsResult_0.stdout.split(`
|
|
3151
|
-
`);
|
|
3152
|
-
const hasAnthropicKey_0 = lines_0.some((line_0) => {
|
|
3153
|
-
return /^ANTHROPIC_API_KEY\s+/.test(line_0);
|
|
3154
|
-
});
|
|
3155
|
-
if (hasAnthropicKey_0) {
|
|
3156
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3157
|
-
step: "api-key"
|
|
3158
|
-
});
|
|
3159
|
-
setState((prev_18) => ({
|
|
3160
|
-
...prev_18,
|
|
3161
|
-
secretExists: true,
|
|
3162
|
-
step: "check-existing-secret"
|
|
3163
|
-
}));
|
|
3164
|
-
} else {
|
|
3165
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3166
|
-
step: "api-key"
|
|
3167
|
-
});
|
|
3168
|
-
await runSetupGitHubActions(apiKeyToUse, state.secretName);
|
|
3169
|
-
}
|
|
3170
|
-
} else {
|
|
3171
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3172
|
-
step: "api-key"
|
|
3173
|
-
});
|
|
3174
|
-
await runSetupGitHubActions(apiKeyToUse, state.secretName);
|
|
3175
|
-
}
|
|
3176
|
-
}
|
|
3177
|
-
};
|
|
3178
|
-
const handleRepoUrlChange = (value) => {
|
|
3179
|
-
setState((prev_19) => ({
|
|
3180
|
-
...prev_19,
|
|
3181
|
-
selectedRepoName: value
|
|
3182
|
-
}));
|
|
3183
|
-
};
|
|
3184
|
-
const handleApiKeyChange = (value_0) => {
|
|
3185
|
-
setState((prev_20) => ({
|
|
3186
|
-
...prev_20,
|
|
3187
|
-
apiKeyOrOAuthToken: value_0
|
|
3188
|
-
}));
|
|
3189
|
-
};
|
|
3190
|
-
const handleApiKeyOptionChange = (option) => {
|
|
3191
|
-
setState((prev_21) => ({
|
|
3192
|
-
...prev_21,
|
|
3193
|
-
selectedApiKeyOption: option
|
|
3194
|
-
}));
|
|
3195
|
-
};
|
|
3196
|
-
const handleCreateOAuthToken = import_react6.useCallback(() => {
|
|
3197
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3198
|
-
step: "api-key"
|
|
3199
|
-
});
|
|
3200
|
-
setState((prev_22) => ({
|
|
3201
|
-
...prev_22,
|
|
3202
|
-
step: "oauth-flow"
|
|
3203
|
-
}));
|
|
3204
|
-
}, []);
|
|
3205
|
-
const handleOAuthSuccess = import_react6.useCallback((token) => {
|
|
3206
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3207
|
-
step: "oauth-flow"
|
|
3208
|
-
});
|
|
3209
|
-
setState((prev_23) => ({
|
|
3210
|
-
...prev_23,
|
|
3211
|
-
apiKeyOrOAuthToken: token,
|
|
3212
|
-
useExistingKey: false,
|
|
3213
|
-
secretName: "CLAUDE_CODE_OAUTH_TOKEN",
|
|
3214
|
-
authType: "oauth_token"
|
|
3215
|
-
}));
|
|
3216
|
-
runSetupGitHubActions(token, "CLAUDE_CODE_OAUTH_TOKEN");
|
|
3217
|
-
}, [runSetupGitHubActions]);
|
|
3218
|
-
const handleOAuthCancel = import_react6.useCallback(() => {
|
|
3219
|
-
setState((prev_24) => ({
|
|
3220
|
-
...prev_24,
|
|
3221
|
-
step: "api-key"
|
|
3222
|
-
}));
|
|
3223
|
-
}, []);
|
|
3224
|
-
const handleSecretNameChange = (value_1) => {
|
|
3225
|
-
if (value_1 && !/^[a-zA-Z0-9_]+$/.test(value_1))
|
|
3226
|
-
return;
|
|
3227
|
-
setState((prev_25) => ({
|
|
3228
|
-
...prev_25,
|
|
3229
|
-
secretName: value_1
|
|
3230
|
-
}));
|
|
3231
|
-
};
|
|
3232
|
-
const handleToggleUseCurrentRepo = (useCurrentRepo) => {
|
|
3233
|
-
setState((prev_26) => ({
|
|
3234
|
-
...prev_26,
|
|
3235
|
-
useCurrentRepo,
|
|
3236
|
-
selectedRepoName: useCurrentRepo ? prev_26.currentRepo : ""
|
|
3237
|
-
}));
|
|
3238
|
-
};
|
|
3239
|
-
const handleToggleUseExistingKey = (useExistingKey) => {
|
|
3240
|
-
setState((prev_27) => ({
|
|
3241
|
-
...prev_27,
|
|
3242
|
-
useExistingKey
|
|
3243
|
-
}));
|
|
3244
|
-
};
|
|
3245
|
-
const handleToggleUseExistingSecret = (useExistingSecret) => {
|
|
3246
|
-
setState((prev_28) => ({
|
|
3247
|
-
...prev_28,
|
|
3248
|
-
useExistingSecret,
|
|
3249
|
-
secretName: useExistingSecret ? "ANTHROPIC_API_KEY" : ""
|
|
3250
|
-
}));
|
|
3251
|
-
};
|
|
3252
|
-
const handleWorkflowAction = async (action) => {
|
|
3253
|
-
if (action === "exit") {
|
|
3254
|
-
props.onDone("Installation cancelled by user");
|
|
3255
|
-
return;
|
|
3256
|
-
}
|
|
3257
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3258
|
-
step: "check-existing-workflow"
|
|
3259
|
-
});
|
|
3260
|
-
setState((prev_29) => ({
|
|
3261
|
-
...prev_29,
|
|
3262
|
-
workflowAction: action
|
|
3263
|
-
}));
|
|
3264
|
-
if (action === "skip" || action === "update") {
|
|
3265
|
-
if (existingApiKey) {
|
|
3266
|
-
await checkExistingSecret();
|
|
3267
|
-
} else {
|
|
3268
|
-
setState((prev_30) => ({
|
|
3269
|
-
...prev_30,
|
|
3270
|
-
step: "api-key"
|
|
3271
|
-
}));
|
|
3272
|
-
}
|
|
3273
|
-
}
|
|
3274
|
-
};
|
|
3275
|
-
function handleDismissKeyDown(e) {
|
|
3276
|
-
e.preventDefault();
|
|
3277
|
-
if (state.step === "success") {
|
|
3278
|
-
logEvent("tengu_install_github_app_completed", {});
|
|
3279
|
-
}
|
|
3280
|
-
props.onDone(state.step === "success" ? "GitHub Actions setup complete!" : state.error ? `Couldn't install GitHub App: ${state.error}
|
|
3281
|
-
For manual setup instructions, see: ${GITHUB_ACTION_SETUP_DOCS_URL}` : `GitHub App installation failed
|
|
3282
|
-
For manual setup instructions, see: ${GITHUB_ACTION_SETUP_DOCS_URL}`);
|
|
3283
|
-
}
|
|
3284
|
-
switch (state.step) {
|
|
3285
|
-
case "check-gh":
|
|
3286
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(CheckGitHubStep, {}, undefined, false, undefined, this);
|
|
3287
|
-
case "warnings":
|
|
3288
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(WarningsStep, {
|
|
3289
|
-
warnings: state.warnings,
|
|
3290
|
-
onContinue: handleSubmit
|
|
3291
|
-
}, undefined, false, undefined, this);
|
|
3292
|
-
case "choose-repo":
|
|
3293
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(ChooseRepoStep, {
|
|
3294
|
-
currentRepo: state.currentRepo,
|
|
3295
|
-
useCurrentRepo: state.useCurrentRepo,
|
|
3296
|
-
repoUrl: state.selectedRepoName,
|
|
3297
|
-
onRepoUrlChange: handleRepoUrlChange,
|
|
3298
|
-
onToggleUseCurrentRepo: handleToggleUseCurrentRepo,
|
|
3299
|
-
onSubmit: handleSubmit
|
|
3300
|
-
}, undefined, false, undefined, this);
|
|
3301
|
-
case "install-app":
|
|
3302
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(InstallAppStep, {
|
|
3303
|
-
repoUrl: state.selectedRepoName,
|
|
3304
|
-
onSubmit: handleSubmit
|
|
3305
|
-
}, undefined, false, undefined, this);
|
|
3306
|
-
case "check-existing-workflow":
|
|
3307
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(ExistingWorkflowStep, {
|
|
3308
|
-
repoName: state.selectedRepoName,
|
|
3309
|
-
onSelectAction: handleWorkflowAction
|
|
3310
|
-
}, undefined, false, undefined, this);
|
|
3311
|
-
case "check-existing-secret":
|
|
3312
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(CheckExistingSecretStep, {
|
|
3313
|
-
useExistingSecret: state.useExistingSecret,
|
|
3314
|
-
secretName: state.secretName,
|
|
3315
|
-
onToggleUseExistingSecret: handleToggleUseExistingSecret,
|
|
3316
|
-
onSecretNameChange: handleSecretNameChange,
|
|
3317
|
-
onSubmit: handleSubmit
|
|
3318
|
-
}, undefined, false, undefined, this);
|
|
3319
|
-
case "api-key":
|
|
3320
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(ApiKeyStep, {
|
|
3321
|
-
existingApiKey,
|
|
3322
|
-
useExistingKey: state.useExistingKey,
|
|
3323
|
-
apiKeyOrOAuthToken: state.apiKeyOrOAuthToken,
|
|
3324
|
-
onApiKeyChange: handleApiKeyChange,
|
|
3325
|
-
onToggleUseExistingKey: handleToggleUseExistingKey,
|
|
3326
|
-
onSubmit: handleSubmit,
|
|
3327
|
-
onCreateOAuthToken: isAnthropicAuthEnabled() ? handleCreateOAuthToken : undefined,
|
|
3328
|
-
selectedOption: state.selectedApiKeyOption,
|
|
3329
|
-
onSelectOption: handleApiKeyOptionChange
|
|
3330
|
-
}, undefined, false, undefined, this);
|
|
3331
|
-
case "creating":
|
|
3332
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(CreatingStep, {
|
|
3333
|
-
currentWorkflowInstallStep: state.currentWorkflowInstallStep,
|
|
3334
|
-
secretExists: state.secretExists,
|
|
3335
|
-
useExistingSecret: state.useExistingSecret,
|
|
3336
|
-
secretName: state.secretName,
|
|
3337
|
-
skipWorkflow: state.workflowAction === "skip",
|
|
3338
|
-
selectedWorkflows: state.selectedWorkflows
|
|
3339
|
-
}, undefined, false, undefined, this);
|
|
3340
|
-
case "success":
|
|
3341
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(ThemedBox_default, {
|
|
3342
|
-
tabIndex: 0,
|
|
3343
|
-
autoFocus: true,
|
|
3344
|
-
onKeyDown: handleDismissKeyDown,
|
|
3345
|
-
children: /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(SuccessStep, {
|
|
3346
|
-
secretExists: state.secretExists,
|
|
3347
|
-
useExistingSecret: state.useExistingSecret,
|
|
3348
|
-
secretName: state.secretName,
|
|
3349
|
-
skipWorkflow: state.workflowAction === "skip"
|
|
3350
|
-
}, undefined, false, undefined, this)
|
|
3351
|
-
}, undefined, false, undefined, this);
|
|
3352
|
-
case "error":
|
|
3353
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(ThemedBox_default, {
|
|
3354
|
-
tabIndex: 0,
|
|
3355
|
-
autoFocus: true,
|
|
3356
|
-
onKeyDown: handleDismissKeyDown,
|
|
3357
|
-
children: /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(ErrorStep, {
|
|
3358
|
-
error: state.error,
|
|
3359
|
-
errorReason: state.errorReason,
|
|
3360
|
-
errorInstructions: state.errorInstructions
|
|
3361
|
-
}, undefined, false, undefined, this)
|
|
3362
|
-
}, undefined, false, undefined, this);
|
|
3363
|
-
case "select-workflows":
|
|
3364
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(WorkflowMultiselectDialog, {
|
|
3365
|
-
defaultSelections: state.selectedWorkflows,
|
|
3366
|
-
onSubmit: (selectedWorkflows) => {
|
|
3367
|
-
logEvent("tengu_install_github_app_step_completed", {
|
|
3368
|
-
step: "select-workflows"
|
|
3369
|
-
});
|
|
3370
|
-
setState((prev_31) => ({
|
|
3371
|
-
...prev_31,
|
|
3372
|
-
selectedWorkflows
|
|
3373
|
-
}));
|
|
3374
|
-
if (existingApiKey) {
|
|
3375
|
-
checkExistingSecret();
|
|
3376
|
-
} else {
|
|
3377
|
-
setState((prev_32) => ({
|
|
3378
|
-
...prev_32,
|
|
3379
|
-
step: "api-key"
|
|
3380
|
-
}));
|
|
3381
|
-
}
|
|
3382
|
-
}
|
|
3383
|
-
}, undefined, false, undefined, this);
|
|
3384
|
-
case "oauth-flow":
|
|
3385
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(OAuthFlowStep, {
|
|
3386
|
-
onSuccess: handleOAuthSuccess,
|
|
3387
|
-
onCancel: handleOAuthCancel
|
|
3388
|
-
}, undefined, false, undefined, this);
|
|
3389
|
-
}
|
|
3390
|
-
}
|
|
3391
|
-
async function call(onDone) {
|
|
3392
|
-
return /* @__PURE__ */ jsx_dev_runtime13.jsxDEV(InstallGitHubApp, {
|
|
3393
|
-
onDone
|
|
3394
|
-
}, undefined, false, undefined, this);
|
|
3395
|
-
}
|
|
3396
|
-
var import_react6, jsx_dev_runtime13, INITIAL_STATE;
|
|
3397
|
-
var init_install_github_app = __esm(() => {
|
|
3398
|
-
init_execa();
|
|
3399
|
-
init_analytics();
|
|
3400
|
-
init_WorkflowMultiselectDialog();
|
|
3401
|
-
init_github_app();
|
|
3402
|
-
init_useExitOnCtrlCDWithKeybindings();
|
|
3403
|
-
init_ink();
|
|
3404
|
-
init_auth();
|
|
3405
|
-
init_browser();
|
|
3406
|
-
init_execFileNoThrow();
|
|
3407
|
-
init_git();
|
|
3408
|
-
init_stringUtils();
|
|
3409
|
-
init_ApiKeyStep();
|
|
3410
|
-
init_CheckExistingSecretStep();
|
|
3411
|
-
init_CheckGitHubStep();
|
|
3412
|
-
init_ChooseRepoStep();
|
|
3413
|
-
init_CreatingStep();
|
|
3414
|
-
init_ErrorStep();
|
|
3415
|
-
init_ExistingWorkflowStep();
|
|
3416
|
-
init_InstallAppStep();
|
|
3417
|
-
init_OAuthFlowStep();
|
|
3418
|
-
init_SuccessStep();
|
|
3419
|
-
init_setupGitHubActions();
|
|
3420
|
-
init_WarningsStep();
|
|
3421
|
-
import_react6 = __toESM(require_react(), 1);
|
|
3422
|
-
jsx_dev_runtime13 = __toESM(require_jsx_dev_runtime(), 1);
|
|
3423
|
-
INITIAL_STATE = {
|
|
3424
|
-
step: "check-gh",
|
|
3425
|
-
selectedRepoName: "",
|
|
3426
|
-
currentRepo: "",
|
|
3427
|
-
useCurrentRepo: false,
|
|
3428
|
-
apiKeyOrOAuthToken: "",
|
|
3429
|
-
useExistingKey: true,
|
|
3430
|
-
currentWorkflowInstallStep: 0,
|
|
3431
|
-
warnings: [],
|
|
3432
|
-
secretExists: false,
|
|
3433
|
-
secretName: "ANTHROPIC_API_KEY",
|
|
3434
|
-
useExistingSecret: true,
|
|
3435
|
-
workflowExists: false,
|
|
3436
|
-
selectedWorkflows: ["claude", "claude-review"],
|
|
3437
|
-
selectedApiKeyOption: "new",
|
|
3438
|
-
authType: "api_key"
|
|
3439
|
-
};
|
|
3440
|
-
});
|
|
3441
|
-
init_install_github_app();
|
|
3442
|
-
|
|
3443
|
-
export {
|
|
3444
|
-
call
|
|
3445
|
-
};
|