@caspian2026/agent-sdk 0.0.24 → 0.0.26
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/dist/gateway/index.js +98 -22
- package/dist/gateway/worker.js +196 -47
- package/dist/sdk/query.cjs +2 -362
- package/dist/sdk/query.js +2 -367
- package/package.json +4 -6
- package/dist/chunk-05kvhzd7.js +0 -3561
- package/dist/chunk-07069jq1.js +0 -30
- package/dist/chunk-0731m51q.js +0 -8
- package/dist/chunk-08bspa4b.js +0 -673
- package/dist/chunk-0brkf8q8.js +0 -89
- package/dist/chunk-0n843xh7.js +0 -261
- package/dist/chunk-0nbp5jwx.js +0 -8583
- package/dist/chunk-0nj16az9.js +0 -169
- package/dist/chunk-0paqc2yw.js +0 -15
- package/dist/chunk-0q6b50ps.js +0 -111
- package/dist/chunk-0r5bb9j4.js +0 -477
- package/dist/chunk-0rpz1wgn.js +0 -1030
- package/dist/chunk-0t81d427.js +0 -41
- package/dist/chunk-0vaw02wq.js +0 -24
- package/dist/chunk-0vkfrmqm.js +0 -690
- package/dist/chunk-0vp3wfab.js +0 -12
- package/dist/chunk-0vr10742.js +0 -1809
- package/dist/chunk-0xjaqda8.js +0 -1124
- package/dist/chunk-13ehyphg.js +0 -223
- package/dist/chunk-15jsw9bb.js +0 -349
- package/dist/chunk-16m7eyyw.js +0 -1385
- package/dist/chunk-1ae3nt9j.js +0 -31
- package/dist/chunk-1gq4r3v1.js +0 -308
- package/dist/chunk-1gx78081.js +0 -66
- package/dist/chunk-1h2famwb.js +0 -49
- package/dist/chunk-1n546sfg.js +0 -200
- package/dist/chunk-1qg06d60.js +0 -494
- package/dist/chunk-1t0rqstn.js +0 -146
- package/dist/chunk-1z8p2eqd.js +0 -40
- package/dist/chunk-1zjh9cc5.js +0 -266
- package/dist/chunk-20ahkkrb.js +0 -132
- package/dist/chunk-21pbfch8.js +0 -105
- package/dist/chunk-26wtxbdc.js +0 -13870
- package/dist/chunk-2fwze72g.js +0 -24
- package/dist/chunk-2gcbr1c7.js +0 -107
- package/dist/chunk-2grc1yr8.js +0 -654
- package/dist/chunk-2gzv8nrw.js +0 -205
- package/dist/chunk-2r212cvt.js +0 -253
- package/dist/chunk-2s74bt6e.js +0 -317
- package/dist/chunk-2v385w7r.js +0 -7422
- package/dist/chunk-2wtkvpp2.js +0 -167
- package/dist/chunk-31rsspfr.js +0 -418
- package/dist/chunk-3c25bcsw.js +0 -17
- package/dist/chunk-3jm08aaw.js +0 -91
- package/dist/chunk-3mgywd32.js +0 -8
- package/dist/chunk-3nk79af8.js +0 -8
- package/dist/chunk-3v4sk2py.js +0 -101
- package/dist/chunk-3vwft0eh.js +0 -349
- package/dist/chunk-3vy1jt9p.js +0 -1010
- package/dist/chunk-3wvqzq9w.js +0 -92
- package/dist/chunk-3wvv2s8d.js +0 -336
- package/dist/chunk-4060b3s2.js +0 -108
- package/dist/chunk-434e0vh4.js +0 -275
- package/dist/chunk-46dm23zs.js +0 -344
- package/dist/chunk-4bh4qs70.js +0 -209
- package/dist/chunk-4cxzbqws.js +0 -94
- package/dist/chunk-4jm600zv.js +0 -13
- package/dist/chunk-4k9d7gxv.js +0 -118
- package/dist/chunk-4nc3t6ms.js +0 -396
- package/dist/chunk-4pbx3g7s.js +0 -26
- package/dist/chunk-4qhh8bpa.js +0 -54
- package/dist/chunk-4v63px9y.js +0 -133
- package/dist/chunk-4xnnzt3j.js +0 -74
- package/dist/chunk-4zchh01h.js +0 -201
- package/dist/chunk-5216fha8.js +0 -1163
- package/dist/chunk-55raexh7.js +0 -14358
- package/dist/chunk-5bffhf64.js +0 -81
- package/dist/chunk-5ccdsxgy.js +0 -74
- package/dist/chunk-5ddh2hyn.js +0 -91
- package/dist/chunk-5e6ncq5j.js +0 -61
- package/dist/chunk-5ekyhb1w.js +0 -422
- package/dist/chunk-5fy4r8rv.js +0 -52
- package/dist/chunk-5h5kx2jd.js +0 -34
- package/dist/chunk-5mbgdvyz.js +0 -847
- package/dist/chunk-5n1jc02d.js +0 -87
- package/dist/chunk-5pysjah8.js +0 -1543
- package/dist/chunk-5ssfz438.js +0 -323
- package/dist/chunk-5z28bqne.js +0 -6748
- package/dist/chunk-603y0mmg.js +0 -50
- package/dist/chunk-62v5kkff.js +0 -90
- package/dist/chunk-64c1avct.js +0 -13
- package/dist/chunk-64r16v22.js +0 -162
- package/dist/chunk-64smdx4a.js +0 -418
- package/dist/chunk-66zry909.js +0 -11
- package/dist/chunk-68ffk5qa.js +0 -14
- package/dist/chunk-69n11zng.js +0 -436
- package/dist/chunk-6dj5t602.js +0 -341
- package/dist/chunk-6dngjwkh.js +0 -63
- package/dist/chunk-6nsd9606.js +0 -790
- package/dist/chunk-6pkh8frk.js +0 -253
- package/dist/chunk-6qcmt5eb.js +0 -251
- package/dist/chunk-6ww7451s.js +0 -60
- package/dist/chunk-6xgb0kqz.js +0 -90
- package/dist/chunk-72ys9m07.js +0 -121
- package/dist/chunk-741sgvtx.js +0 -121
- package/dist/chunk-7aw745vx.js +0 -40175
- package/dist/chunk-7c8b8cfb.js +0 -219
- package/dist/chunk-7mwt4e1z.js +0 -234
- package/dist/chunk-7sgtxrsc.js +0 -1059
- package/dist/chunk-7wm5s02e.js +0 -216
- package/dist/chunk-7xyswgjh.js +0 -8
- package/dist/chunk-80a197ez.js +0 -1438
- package/dist/chunk-83hfzbx3.js +0 -10
- package/dist/chunk-8akrsgad.js +0 -55
- package/dist/chunk-8g5pe1gr.js +0 -37
- package/dist/chunk-8s07t4k7.js +0 -40
- package/dist/chunk-8yhf030a.js +0 -69
- package/dist/chunk-928tzaa8.js +0 -107
- package/dist/chunk-949pjzj9.js +0 -266
- package/dist/chunk-9aycd4z9.js +0 -490
- package/dist/chunk-9bzqvsz5.js +0 -211
- package/dist/chunk-9q3xfy27.js +0 -460
- package/dist/chunk-9vzg1360.js +0 -153
- package/dist/chunk-9wbh8n1y.js +0 -63
- package/dist/chunk-9x5zgy22.js +0 -12
- package/dist/chunk-9zdj4ypz.js +0 -206
- package/dist/chunk-a0bvcgyd.js +0 -127
- package/dist/chunk-a4m3yr2q.js +0 -117
- package/dist/chunk-a8jd4gee.js +0 -227
- package/dist/chunk-ase86y73.js +0 -15
- package/dist/chunk-atfzpm6r.js +0 -325
- package/dist/chunk-awqsddp2.js +0 -338
- package/dist/chunk-awrgzpk6.js +0 -29
- package/dist/chunk-b0kf00ff.js +0 -637
- package/dist/chunk-b1kcd3ss.js +0 -27
- package/dist/chunk-b4hy21c4.js +0 -140
- package/dist/chunk-b9mkm8mg.js +0 -111
- package/dist/chunk-bdjx14rd.js +0 -594
- package/dist/chunk-bfb41q9h.js +0 -295
- package/dist/chunk-bg4x9ex0.js +0 -21
- package/dist/chunk-bh5zqvyc.js +0 -36
- package/dist/chunk-bn0zv2y2.js +0 -1154
- package/dist/chunk-bn7t681c.js +0 -2669
- package/dist/chunk-br4wgffc.js +0 -393
- package/dist/chunk-brjd9zmk.js +0 -42
- package/dist/chunk-byfawrfx.js +0 -121
- package/dist/chunk-c6sjhj89.js +0 -1284
- package/dist/chunk-c7jwbe76.js +0 -29030
- package/dist/chunk-cdef9v7b.js +0 -27
- package/dist/chunk-cdz5yb0r.js +0 -57
- package/dist/chunk-cevq1787.js +0 -2718
- package/dist/chunk-cgfdkzhb.js +0 -12
- package/dist/chunk-cgqw4x5z.js +0 -155
- package/dist/chunk-cmmmc8e0.js +0 -212
- package/dist/chunk-cnsj3vq2.js +0 -35
- package/dist/chunk-cxrktb5g.js +0 -51
- package/dist/chunk-cyhrb0bk.js +0 -251
- package/dist/chunk-d23rmn8r.js +0 -62
- package/dist/chunk-d4mdda98.js +0 -94
- package/dist/chunk-dcwp94cj.js +0 -152
- package/dist/chunk-ddsjkqs4.js +0 -39
- package/dist/chunk-ddv56j39.js +0 -148
- package/dist/chunk-dfq6pbq7.js +0 -5822
- package/dist/chunk-dfzkwynj.js +0 -5368
- package/dist/chunk-dkgkd8b7.js +0 -516
- package/dist/chunk-dpnmf0pq.js +0 -312
- package/dist/chunk-dygx7vcc.js +0 -226
- package/dist/chunk-e0abab5b.js +0 -445
- package/dist/chunk-e5qhvhjy.js +0 -168
- package/dist/chunk-e60y6r1n.js +0 -20
- package/dist/chunk-e68kgvcq.js +0 -79
- package/dist/chunk-e9w9zc0g.js +0 -392
- package/dist/chunk-ecj9w6tm.js +0 -558
- package/dist/chunk-ehtwnxpg.js +0 -1591
- package/dist/chunk-eqp1rfft.js +0 -17
- package/dist/chunk-etdt1xz3.js +0 -19
- package/dist/chunk-ewadzrm8.js +0 -103
- package/dist/chunk-f03s83vj.js +0 -91
- package/dist/chunk-f3kk0p3s.js +0 -150
- package/dist/chunk-f3pjerx4.js +0 -4265
- package/dist/chunk-f6h5weh6.js +0 -61
- package/dist/chunk-fajg8x36.js +0 -8158
- package/dist/chunk-fbv4apne.js +0 -51
- package/dist/chunk-fcynwjpm.js +0 -1072
- package/dist/chunk-fdvaf6nn.js +0 -20
- package/dist/chunk-feyzykye.js +0 -10
- package/dist/chunk-ff85rwvc.js +0 -180
- package/dist/chunk-fqak69ft.js +0 -458
- package/dist/chunk-fxdkbabd.js +0 -195
- package/dist/chunk-fyc5fepv.js +0 -10
- package/dist/chunk-g78c6ztj.js +0 -89
- package/dist/chunk-g8ee7yza.js +0 -105
- package/dist/chunk-g9f19ttm.js +0 -15
- package/dist/chunk-gcktsbxb.js +0 -77
- package/dist/chunk-gdwdqewd.js +0 -19
- package/dist/chunk-gg55fns0.js +0 -6440
- package/dist/chunk-gnpt1t6q.js +0 -209364
- package/dist/chunk-gsbw2j2b.js +0 -276
- package/dist/chunk-gybt680f.js +0 -9114
- package/dist/chunk-gz1e8y1w.js +0 -33
- package/dist/chunk-gz7vn2gg.js +0 -114
- package/dist/chunk-h0d5eat0.js +0 -101
- package/dist/chunk-h27tjbp3.js +0 -33118
- package/dist/chunk-h2yy8k4c.js +0 -58
- package/dist/chunk-h5acpdqt.js +0 -103
- package/dist/chunk-h63r8vps.js +0 -2840
- package/dist/chunk-h64x5b04.js +0 -860
- package/dist/chunk-h92snc84.js +0 -420
- package/dist/chunk-h9n54swm.js +0 -27
- package/dist/chunk-hafcrnpc.js +0 -145
- package/dist/chunk-hakdhagh.js +0 -16606
- package/dist/chunk-hk4phsaw.js +0 -388
- package/dist/chunk-hph1bmqw.js +0 -65
- package/dist/chunk-hvnztnp3.js +0 -71
- package/dist/chunk-hwfknpxv.js +0 -39
- package/dist/chunk-j2xxd002.js +0 -1052
- package/dist/chunk-j3qbygme.js +0 -105
- package/dist/chunk-j5bth84e.js +0 -97
- package/dist/chunk-j64ga6ta.js +0 -8035
- package/dist/chunk-jbwgyskk.js +0 -385
- package/dist/chunk-jd32zbps.js +0 -15
- package/dist/chunk-jdhkh2bb.js +0 -618
- package/dist/chunk-jeqcwgt7.js +0 -177
- package/dist/chunk-jf75p9ap.js +0 -445
- package/dist/chunk-jgvk0za1.js +0 -260
- package/dist/chunk-jhpaevah.js +0 -565
- package/dist/chunk-jmjwrbwd.js +0 -635
- package/dist/chunk-jpdbfwvq.js +0 -100
- package/dist/chunk-jps4m6sz.js +0 -183
- package/dist/chunk-jwf0s51s.js +0 -867
- package/dist/chunk-jxge4dgh.js +0 -83
- package/dist/chunk-jz71gv95.js +0 -1161
- package/dist/chunk-jzthz1bx.js +0 -15
- package/dist/chunk-jzvd2ycp.js +0 -120
- package/dist/chunk-k0p9w03v.js +0 -4957
- package/dist/chunk-k4dcreh0.js +0 -442
- package/dist/chunk-k7akhwkn.js +0 -151
- package/dist/chunk-k8vp0atq.js +0 -2331
- package/dist/chunk-kgd7gfvk.js +0 -407
- package/dist/chunk-km5ycg1j.js +0 -87
- package/dist/chunk-kvyrxzj8.js +0 -26
- package/dist/chunk-kwekc97v.js +0 -18
- package/dist/chunk-ky1z78ve.js +0 -119
- package/dist/chunk-mcws22k3.js +0 -42
- package/dist/chunk-mjazvyd8.js +0 -528
- package/dist/chunk-mswx2nma.js +0 -103
- package/dist/chunk-mz6a0phh.js +0 -2962
- package/dist/chunk-n2tg12hg.js +0 -374
- package/dist/chunk-n3fv4ya7.js +0 -146
- package/dist/chunk-n4eabmqd.js +0 -93
- package/dist/chunk-n4tx7baq.js +0 -193
- package/dist/chunk-n6g4jbeh.js +0 -289
- package/dist/chunk-n6wzfxf1.js +0 -100
- package/dist/chunk-ndcmqfkv.js +0 -244
- package/dist/chunk-netzwgv1.js +0 -154
- package/dist/chunk-nhcg04jt.js +0 -120
- package/dist/chunk-nhsm3ntd.js +0 -439
- package/dist/chunk-njev89d1.js +0 -2335
- package/dist/chunk-nmgj86tt.js +0 -24
- package/dist/chunk-ns7x6xam.js +0 -22820
- package/dist/chunk-p7vkh4wx.js +0 -15
- package/dist/chunk-p8na2wwp.js +0 -14
- package/dist/chunk-p97fd5af.js +0 -684
- package/dist/chunk-pe3rkfp2.js +0 -74
- package/dist/chunk-pgtnj1mt.js +0 -705
- package/dist/chunk-phmnkw9y.js +0 -283
- package/dist/chunk-pnds7g1q.js +0 -130
- package/dist/chunk-ppwjyveh.js +0 -8
- package/dist/chunk-pqqxdk5f.js +0 -543
- package/dist/chunk-ps49ymvj.js +0 -43
- package/dist/chunk-pwwa7s62.js +0 -11
- package/dist/chunk-q3hfrat2.js +0 -313
- package/dist/chunk-qajrkk97.js +0 -298
- package/dist/chunk-qatfdxvd.js +0 -34
- package/dist/chunk-qb5qcctj.js +0 -206
- package/dist/chunk-qb6k2afy.js +0 -153
- package/dist/chunk-qgk93a75.js +0 -85
- package/dist/chunk-qkczt8cr.js +0 -24
- package/dist/chunk-qn1be1vf.js +0 -267
- package/dist/chunk-qnfx3qtx.js +0 -617
- package/dist/chunk-qnwne2m4.js +0 -87
- package/dist/chunk-qp2qdcda.js +0 -100
- package/dist/chunk-qpp3wwh5.js +0 -697
- package/dist/chunk-r0bx1gc7.js +0 -174
- package/dist/chunk-radnwk8x.js +0 -107
- package/dist/chunk-rkv5jq0y.js +0 -71
- package/dist/chunk-rmbbmd3s.js +0 -68
- package/dist/chunk-rmgbs5an.js +0 -640
- package/dist/chunk-rn0v1hk8.js +0 -34
- package/dist/chunk-rnxctq9p.js +0 -1646
- package/dist/chunk-rtd39n81.js +0 -95
- package/dist/chunk-s8gy4ky9.js +0 -122
- package/dist/chunk-s8kj6ajy.js +0 -32
- package/dist/chunk-sd36yzx8.js +0 -954
- package/dist/chunk-sdenh194.js +0 -121
- package/dist/chunk-sdtqp75c.js +0 -55
- package/dist/chunk-sedbc8ep.js +0 -212
- package/dist/chunk-sfrb15b2.js +0 -321
- package/dist/chunk-sgpmpn90.js +0 -35
- package/dist/chunk-sh02d2qn.js +0 -38
- package/dist/chunk-shd4yhsf.js +0 -32
- package/dist/chunk-shkycj1q.js +0 -178
- package/dist/chunk-sk7h93je.js +0 -153
- package/dist/chunk-sm8g6fsm.js +0 -122
- package/dist/chunk-snrjy66h.js +0 -671
- package/dist/chunk-sq4a0yjh.js +0 -116
- package/dist/chunk-sr3t4thh.js +0 -895
- package/dist/chunk-srj6qnf6.js +0 -107
- package/dist/chunk-sz62n77p.js +0 -155
- package/dist/chunk-szj5wvdy.js +0 -28
- package/dist/chunk-t29a6zb5.js +0 -45
- package/dist/chunk-t2ecddwj.js +0 -731
- package/dist/chunk-t33hmmmm.js +0 -113
- package/dist/chunk-t4khqff1.js +0 -16
- package/dist/chunk-t9p85zff.js +0 -24
- package/dist/chunk-ta3jyvxs.js +0 -984
- package/dist/chunk-tkx5eec8.js +0 -54
- package/dist/chunk-v1kzp02e.js +0 -785
- package/dist/chunk-v4t6dyyh.js +0 -9076
- package/dist/chunk-v78fj8by.js +0 -145
- package/dist/chunk-v8kjswxt.js +0 -61
- package/dist/chunk-v9smspw2.js +0 -4301
- package/dist/chunk-vf612n57.js +0 -472
- package/dist/chunk-vkhrrvfq.js +0 -44
- package/dist/chunk-vt5wm07k.js +0 -74
- package/dist/chunk-vvvrv61g.js +0 -875
- package/dist/chunk-vyjeh50y.js +0 -2149
- package/dist/chunk-w0kxcv73.js +0 -97
- package/dist/chunk-w6m6trzq.js +0 -58
- package/dist/chunk-wa8yn2p0.js +0 -2007
- package/dist/chunk-wb18cecv.js +0 -995
- package/dist/chunk-wgk9sxk7.js +0 -329
- package/dist/chunk-wh0ev1bw.js +0 -111
- package/dist/chunk-wka1647p.js +0 -98
- package/dist/chunk-wnwfwyj4.js +0 -90
- package/dist/chunk-wpdchyy2.js +0 -97
- package/dist/chunk-x3g44n7k.js +0 -114
- package/dist/chunk-x47h283a.js +0 -56
- package/dist/chunk-x6r4v44b.js +0 -8
- package/dist/chunk-x7fdwq3d.js +0 -33
- package/dist/chunk-x8d2ehd7.js +0 -19
- package/dist/chunk-xbeg2hej.js +0 -257
- package/dist/chunk-xeb6075z.js +0 -3435
- package/dist/chunk-xhfmdq1y.js +0 -147
- package/dist/chunk-xhscn33a.js +0 -138
- package/dist/chunk-xv3era3s.js +0 -8
- package/dist/chunk-xz5gbhc3.js +0 -93
- package/dist/chunk-y1784krc.js +0 -19
- package/dist/chunk-y1vyezct.js +0 -123
- package/dist/chunk-y45ecntg.js +0 -942
- package/dist/chunk-y4ca9kqz.js +0 -3830
- package/dist/chunk-y9bhjjdz.js +0 -145
- package/dist/chunk-yb3bxv3w.js +0 -30
- package/dist/chunk-ye2q9gqj.js +0 -332
- package/dist/chunk-yfg3adfq.js +0 -88
- package/dist/chunk-yst0wmgw.js +0 -269
- package/dist/chunk-ywe9dbnz.js +0 -460
- package/dist/chunk-yyex5gsf.js +0 -269
- package/dist/chunk-yz2kzqk5.js +0 -439
- package/dist/chunk-z263ehpg.js +0 -131
- package/dist/chunk-z2dp53wn.js +0 -17
- package/dist/chunk-zaq348h2.js +0 -281
- package/dist/chunk-zr0qx9q0.js +0 -642
- package/dist/chunk-zxh62ved.js +0 -31
- package/dist/chunk-zy5vn8sd.js +0 -329
- package/dist/chunk-zzm33q8x.js +0 -8
- package/dist/cli.js +0 -91
package/dist/chunk-jmjwrbwd.js
DELETED
|
@@ -1,635 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
Select,
|
|
4
|
-
clearServerCache,
|
|
5
|
-
detectIDEs,
|
|
6
|
-
detectRunningIDEs,
|
|
7
|
-
getCurrentWorktreeSession,
|
|
8
|
-
init_AppState,
|
|
9
|
-
init_CustomSelect,
|
|
10
|
-
init_client,
|
|
11
|
-
init_ide,
|
|
12
|
-
init_worktree,
|
|
13
|
-
isJetBrainsIde,
|
|
14
|
-
isSupportedJetBrainsTerminal,
|
|
15
|
-
isSupportedTerminal,
|
|
16
|
-
toIDEDisplayName,
|
|
17
|
-
useAppState,
|
|
18
|
-
useSetAppState
|
|
19
|
-
} from "./chunk-gnpt1t6q.js";
|
|
20
|
-
import"./chunk-mcws22k3.js";
|
|
21
|
-
import"./chunk-jzthz1bx.js";
|
|
22
|
-
import"./chunk-f6h5weh6.js";
|
|
23
|
-
import"./chunk-hwfknpxv.js";
|
|
24
|
-
import"./chunk-1gx78081.js";
|
|
25
|
-
import"./chunk-ehtwnxpg.js";
|
|
26
|
-
import"./chunk-e68kgvcq.js";
|
|
27
|
-
import"./chunk-p97fd5af.js";
|
|
28
|
-
import"./chunk-x47h283a.js";
|
|
29
|
-
import"./chunk-wb18cecv.js";
|
|
30
|
-
import"./chunk-2gzv8nrw.js";
|
|
31
|
-
import"./chunk-e0abab5b.js";
|
|
32
|
-
import"./chunk-cgfdkzhb.js";
|
|
33
|
-
import"./chunk-4k9d7gxv.js";
|
|
34
|
-
import"./chunk-j5bth84e.js";
|
|
35
|
-
import"./chunk-t2ecddwj.js";
|
|
36
|
-
import"./chunk-68ffk5qa.js";
|
|
37
|
-
import"./chunk-ps49ymvj.js";
|
|
38
|
-
import"./chunk-dkgkd8b7.js";
|
|
39
|
-
import"./chunk-5pysjah8.js";
|
|
40
|
-
import"./chunk-pgtnj1mt.js";
|
|
41
|
-
import"./chunk-hph1bmqw.js";
|
|
42
|
-
import"./chunk-p7vkh4wx.js";
|
|
43
|
-
import"./chunk-y9bhjjdz.js";
|
|
44
|
-
import"./chunk-dcwp94cj.js";
|
|
45
|
-
import"./chunk-tkx5eec8.js";
|
|
46
|
-
import"./chunk-dfzkwynj.js";
|
|
47
|
-
import"./chunk-xeb6075z.js";
|
|
48
|
-
import"./chunk-fcynwjpm.js";
|
|
49
|
-
import"./chunk-v4t6dyyh.js";
|
|
50
|
-
import"./chunk-zy5vn8sd.js";
|
|
51
|
-
import"./chunk-v8kjswxt.js";
|
|
52
|
-
import {
|
|
53
|
-
getGlobalConfig,
|
|
54
|
-
init_config,
|
|
55
|
-
saveGlobalConfig
|
|
56
|
-
} from "./chunk-dfq6pbq7.js";
|
|
57
|
-
import"./chunk-rnxctq9p.js";
|
|
58
|
-
import"./chunk-pqqxdk5f.js";
|
|
59
|
-
import"./chunk-6nsd9606.js";
|
|
60
|
-
import"./chunk-64c1avct.js";
|
|
61
|
-
import"./chunk-8g5pe1gr.js";
|
|
62
|
-
import"./chunk-4pbx3g7s.js";
|
|
63
|
-
import"./chunk-26wtxbdc.js";
|
|
64
|
-
import"./chunk-6dngjwkh.js";
|
|
65
|
-
import"./chunk-4jm600zv.js";
|
|
66
|
-
import"./chunk-s8gy4ky9.js";
|
|
67
|
-
import"./chunk-cxrktb5g.js";
|
|
68
|
-
import"./chunk-3c25bcsw.js";
|
|
69
|
-
import"./chunk-5ekyhb1w.js";
|
|
70
|
-
import"./chunk-fqak69ft.js";
|
|
71
|
-
import"./chunk-cdz5yb0r.js";
|
|
72
|
-
import {
|
|
73
|
-
Dialog,
|
|
74
|
-
ThemedBox_default,
|
|
75
|
-
ThemedText,
|
|
76
|
-
init_source,
|
|
77
|
-
init_src,
|
|
78
|
-
source_default
|
|
79
|
-
} from "./chunk-c7jwbe76.js";
|
|
80
|
-
import"./chunk-0vkfrmqm.js";
|
|
81
|
-
import {
|
|
82
|
-
require_jsx_dev_runtime,
|
|
83
|
-
require_react
|
|
84
|
-
} from "./chunk-7sgtxrsc.js";
|
|
85
|
-
import"./chunk-0xjaqda8.js";
|
|
86
|
-
import {
|
|
87
|
-
init_analytics,
|
|
88
|
-
logEvent
|
|
89
|
-
} from "./chunk-x8d2ehd7.js";
|
|
90
|
-
import"./chunk-byfawrfx.js";
|
|
91
|
-
import"./chunk-3vy1jt9p.js";
|
|
92
|
-
import"./chunk-vkhrrvfq.js";
|
|
93
|
-
import"./chunk-qnfx3qtx.js";
|
|
94
|
-
import {
|
|
95
|
-
execFileNoThrow,
|
|
96
|
-
init_execFileNoThrow
|
|
97
|
-
} from "./chunk-64r16v22.js";
|
|
98
|
-
import {
|
|
99
|
-
getCwd,
|
|
100
|
-
init_cwd
|
|
101
|
-
} from "./chunk-s8kj6ajy.js";
|
|
102
|
-
import"./chunk-8yhf030a.js";
|
|
103
|
-
import"./chunk-zxh62ved.js";
|
|
104
|
-
import"./chunk-5z28bqne.js";
|
|
105
|
-
import"./chunk-qajrkk97.js";
|
|
106
|
-
import"./chunk-gg55fns0.js";
|
|
107
|
-
import"./chunk-5n1jc02d.js";
|
|
108
|
-
import"./chunk-fbv4apne.js";
|
|
109
|
-
import"./chunk-k8vp0atq.js";
|
|
110
|
-
import"./chunk-vf612n57.js";
|
|
111
|
-
import"./chunk-07069jq1.js";
|
|
112
|
-
import"./chunk-d4mdda98.js";
|
|
113
|
-
import"./chunk-55raexh7.js";
|
|
114
|
-
import"./chunk-v9smspw2.js";
|
|
115
|
-
import"./chunk-v1kzp02e.js";
|
|
116
|
-
import"./chunk-7wm5s02e.js";
|
|
117
|
-
import"./chunk-b0kf00ff.js";
|
|
118
|
-
import"./chunk-netzwgv1.js";
|
|
119
|
-
import {
|
|
120
|
-
__esm,
|
|
121
|
-
__toESM
|
|
122
|
-
} from "./chunk-qp2qdcda.js";
|
|
123
|
-
|
|
124
|
-
// src/components/IdeAutoConnectDialog.tsx
|
|
125
|
-
function IdeAutoConnectDialog({
|
|
126
|
-
onComplete
|
|
127
|
-
}) {
|
|
128
|
-
const handleSelect = import_react.useCallback(async (value) => {
|
|
129
|
-
const autoConnect = value === "yes";
|
|
130
|
-
saveGlobalConfig((current) => ({
|
|
131
|
-
...current,
|
|
132
|
-
autoConnectIde: autoConnect,
|
|
133
|
-
hasIdeAutoConnectDialogBeenShown: true
|
|
134
|
-
}));
|
|
135
|
-
onComplete();
|
|
136
|
-
}, [onComplete]);
|
|
137
|
-
const options = [
|
|
138
|
-
{ label: "Yes", value: "yes" },
|
|
139
|
-
{ label: "No", value: "no" }
|
|
140
|
-
];
|
|
141
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
|
|
142
|
-
title: "Do you wish to enable auto-connect to IDE?",
|
|
143
|
-
color: "ide",
|
|
144
|
-
onCancel: onComplete,
|
|
145
|
-
children: [
|
|
146
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
|
|
147
|
-
options,
|
|
148
|
-
onChange: handleSelect,
|
|
149
|
-
defaultValue: "yes"
|
|
150
|
-
}, undefined, false, undefined, this),
|
|
151
|
-
/* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
|
|
152
|
-
dimColor: true,
|
|
153
|
-
children: "You can also configure this in /config or with the --ide flag"
|
|
154
|
-
}, undefined, false, undefined, this)
|
|
155
|
-
]
|
|
156
|
-
}, undefined, true, undefined, this);
|
|
157
|
-
}
|
|
158
|
-
function shouldShowAutoConnectDialog() {
|
|
159
|
-
const config = getGlobalConfig();
|
|
160
|
-
return !isSupportedTerminal() && config.autoConnectIde !== true && config.hasIdeAutoConnectDialogBeenShown !== true;
|
|
161
|
-
}
|
|
162
|
-
function IdeDisableAutoConnectDialog({
|
|
163
|
-
onComplete
|
|
164
|
-
}) {
|
|
165
|
-
const handleSelect = import_react.useCallback((value) => {
|
|
166
|
-
const disableAutoConnect = value === "yes";
|
|
167
|
-
if (disableAutoConnect) {
|
|
168
|
-
saveGlobalConfig((current) => ({
|
|
169
|
-
...current,
|
|
170
|
-
autoConnectIde: false
|
|
171
|
-
}));
|
|
172
|
-
}
|
|
173
|
-
onComplete(disableAutoConnect);
|
|
174
|
-
}, [onComplete]);
|
|
175
|
-
const handleCancel = import_react.useCallback(() => {
|
|
176
|
-
onComplete(false);
|
|
177
|
-
}, [onComplete]);
|
|
178
|
-
const options = [
|
|
179
|
-
{ label: "No", value: "no" },
|
|
180
|
-
{ label: "Yes", value: "yes" }
|
|
181
|
-
];
|
|
182
|
-
return /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Dialog, {
|
|
183
|
-
title: "Do you wish to disable auto-connect to IDE?",
|
|
184
|
-
subtitle: "You can also configure this in /config",
|
|
185
|
-
onCancel: handleCancel,
|
|
186
|
-
color: "ide",
|
|
187
|
-
children: /* @__PURE__ */ jsx_dev_runtime.jsxDEV(Select, {
|
|
188
|
-
options,
|
|
189
|
-
onChange: handleSelect,
|
|
190
|
-
defaultValue: "no"
|
|
191
|
-
}, undefined, false, undefined, this)
|
|
192
|
-
}, undefined, false, undefined, this);
|
|
193
|
-
}
|
|
194
|
-
function shouldShowDisableAutoConnectDialog() {
|
|
195
|
-
const config = getGlobalConfig();
|
|
196
|
-
return !isSupportedTerminal() && config.autoConnectIde === true;
|
|
197
|
-
}
|
|
198
|
-
var import_react, jsx_dev_runtime;
|
|
199
|
-
var init_IdeAutoConnectDialog = __esm(() => {
|
|
200
|
-
init_src();
|
|
201
|
-
init_config();
|
|
202
|
-
init_ide();
|
|
203
|
-
init_CustomSelect();
|
|
204
|
-
import_react = __toESM(require_react(), 1);
|
|
205
|
-
jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
// src/commands/ide/ide.tsx
|
|
209
|
-
import * as path from "path";
|
|
210
|
-
function IDEScreen({
|
|
211
|
-
availableIDEs,
|
|
212
|
-
unavailableIDEs,
|
|
213
|
-
selectedIDE,
|
|
214
|
-
onClose,
|
|
215
|
-
onSelect
|
|
216
|
-
}) {
|
|
217
|
-
const [selectedValue, setSelectedValue] = import_react2.useState(selectedIDE?.port?.toString() ?? "None");
|
|
218
|
-
const [showAutoConnectDialog, setShowAutoConnectDialog] = import_react2.useState(false);
|
|
219
|
-
const [showDisableAutoConnectDialog, setShowDisableAutoConnectDialog] = import_react2.useState(false);
|
|
220
|
-
const handleSelectIDE = import_react2.useCallback((value) => {
|
|
221
|
-
if (value !== "None" && shouldShowAutoConnectDialog()) {
|
|
222
|
-
setShowAutoConnectDialog(true);
|
|
223
|
-
} else if (value === "None" && shouldShowDisableAutoConnectDialog()) {
|
|
224
|
-
setShowDisableAutoConnectDialog(true);
|
|
225
|
-
} else {
|
|
226
|
-
onSelect(availableIDEs.find((ide) => ide.port === parseInt(value)));
|
|
227
|
-
}
|
|
228
|
-
}, [availableIDEs, onSelect]);
|
|
229
|
-
const ideCounts = availableIDEs.reduce((acc, ide) => {
|
|
230
|
-
acc[ide.name] = (acc[ide.name] || 0) + 1;
|
|
231
|
-
return acc;
|
|
232
|
-
}, {});
|
|
233
|
-
const options = availableIDEs.map((ide) => {
|
|
234
|
-
const hasMultipleInstances = (ideCounts[ide.name] || 0) > 1;
|
|
235
|
-
const showWorkspace = hasMultipleInstances && ide.workspaceFolders.length > 0;
|
|
236
|
-
return {
|
|
237
|
-
label: ide.name,
|
|
238
|
-
value: ide.port.toString(),
|
|
239
|
-
description: showWorkspace ? formatWorkspaceFolders(ide.workspaceFolders) : undefined
|
|
240
|
-
};
|
|
241
|
-
}).concat([{ label: "None", value: "None", description: undefined }]);
|
|
242
|
-
if (showAutoConnectDialog) {
|
|
243
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(IdeAutoConnectDialog, {
|
|
244
|
-
onComplete: () => handleSelectIDE(selectedValue)
|
|
245
|
-
}, undefined, false, undefined, this);
|
|
246
|
-
}
|
|
247
|
-
if (showDisableAutoConnectDialog) {
|
|
248
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(IdeDisableAutoConnectDialog, {
|
|
249
|
-
onComplete: () => {
|
|
250
|
-
onSelect(undefined);
|
|
251
|
-
}
|
|
252
|
-
}, undefined, false, undefined, this);
|
|
253
|
-
}
|
|
254
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
|
|
255
|
-
title: "Select IDE",
|
|
256
|
-
subtitle: "Connect to an IDE for integrated development features.",
|
|
257
|
-
onCancel: onClose,
|
|
258
|
-
color: "ide",
|
|
259
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
260
|
-
flexDirection: "column",
|
|
261
|
-
children: [
|
|
262
|
-
availableIDEs.length === 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
263
|
-
dimColor: true,
|
|
264
|
-
children: isSupportedJetBrainsTerminal() ? `No available IDEs detected. Please install the plugin and restart your IDE:
|
|
265
|
-
` + "https://docs.claude.com/s/claude-code-jetbrains" : "No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running."
|
|
266
|
-
}, undefined, false, undefined, this),
|
|
267
|
-
availableIDEs.length !== 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
|
|
268
|
-
defaultValue: selectedValue,
|
|
269
|
-
defaultFocusValue: selectedValue,
|
|
270
|
-
options,
|
|
271
|
-
onChange: (value) => {
|
|
272
|
-
setSelectedValue(value);
|
|
273
|
-
handleSelectIDE(value);
|
|
274
|
-
}
|
|
275
|
-
}, undefined, false, undefined, this),
|
|
276
|
-
availableIDEs.length !== 0 && availableIDEs.some((ide) => ide.name === "VS Code" || ide.name === "Visual Studio Code") && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
277
|
-
marginTop: 1,
|
|
278
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
279
|
-
color: "warning",
|
|
280
|
-
children: "Note: Only one Claude Code instance can be connected to VS Code at a time."
|
|
281
|
-
}, undefined, false, undefined, this)
|
|
282
|
-
}, undefined, false, undefined, this),
|
|
283
|
-
availableIDEs.length !== 0 && !isSupportedTerminal() && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
284
|
-
marginTop: 1,
|
|
285
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
286
|
-
dimColor: true,
|
|
287
|
-
children: "Tip: You can enable auto-connect to IDE in /config or with the --ide flag"
|
|
288
|
-
}, undefined, false, undefined, this)
|
|
289
|
-
}, undefined, false, undefined, this),
|
|
290
|
-
unavailableIDEs.length > 0 && /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
291
|
-
marginTop: 1,
|
|
292
|
-
flexDirection: "column",
|
|
293
|
-
children: [
|
|
294
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
295
|
-
dimColor: true,
|
|
296
|
-
children: [
|
|
297
|
-
"Found ",
|
|
298
|
-
unavailableIDEs.length,
|
|
299
|
-
" other running IDE(s). However, their workspace/project directories do not match the current cwd."
|
|
300
|
-
]
|
|
301
|
-
}, undefined, true, undefined, this),
|
|
302
|
-
/* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
303
|
-
marginTop: 1,
|
|
304
|
-
flexDirection: "column",
|
|
305
|
-
children: unavailableIDEs.map((ide, index) => /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
|
|
306
|
-
paddingLeft: 3,
|
|
307
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
308
|
-
dimColor: true,
|
|
309
|
-
children: [
|
|
310
|
-
"\u2022 ",
|
|
311
|
-
ide.name,
|
|
312
|
-
": ",
|
|
313
|
-
formatWorkspaceFolders(ide.workspaceFolders)
|
|
314
|
-
]
|
|
315
|
-
}, undefined, true, undefined, this)
|
|
316
|
-
}, index, false, undefined, this))
|
|
317
|
-
}, undefined, false, undefined, this)
|
|
318
|
-
]
|
|
319
|
-
}, undefined, true, undefined, this)
|
|
320
|
-
]
|
|
321
|
-
}, undefined, true, undefined, this)
|
|
322
|
-
}, undefined, false, undefined, this);
|
|
323
|
-
}
|
|
324
|
-
async function findCurrentIDE(availableIDEs, dynamicMcpConfig) {
|
|
325
|
-
const currentConfig = dynamicMcpConfig?.ide;
|
|
326
|
-
if (!currentConfig || currentConfig.type !== "sse-ide" && currentConfig.type !== "ws-ide") {
|
|
327
|
-
return null;
|
|
328
|
-
}
|
|
329
|
-
for (const ide of availableIDEs) {
|
|
330
|
-
if (ide.url === currentConfig.url) {
|
|
331
|
-
return ide;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
return null;
|
|
335
|
-
}
|
|
336
|
-
function IDEOpenSelection({
|
|
337
|
-
availableIDEs,
|
|
338
|
-
onSelectIDE,
|
|
339
|
-
onDone
|
|
340
|
-
}) {
|
|
341
|
-
const [selectedValue, setSelectedValue] = import_react2.useState(availableIDEs[0]?.port?.toString() ?? "");
|
|
342
|
-
const handleSelectIDE = import_react2.useCallback((value) => {
|
|
343
|
-
const selectedIDE = availableIDEs.find((ide) => ide.port === parseInt(value));
|
|
344
|
-
onSelectIDE(selectedIDE);
|
|
345
|
-
}, [availableIDEs, onSelectIDE]);
|
|
346
|
-
const options = availableIDEs.map((ide) => ({
|
|
347
|
-
label: ide.name,
|
|
348
|
-
value: ide.port.toString()
|
|
349
|
-
}));
|
|
350
|
-
function handleCancel() {
|
|
351
|
-
onDone("IDE selection cancelled", { display: "system" });
|
|
352
|
-
}
|
|
353
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
|
|
354
|
-
title: "Select an IDE to open the project",
|
|
355
|
-
onCancel: handleCancel,
|
|
356
|
-
color: "ide",
|
|
357
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
|
|
358
|
-
defaultValue: selectedValue,
|
|
359
|
-
defaultFocusValue: selectedValue,
|
|
360
|
-
options,
|
|
361
|
-
onChange: (value) => {
|
|
362
|
-
setSelectedValue(value);
|
|
363
|
-
handleSelectIDE(value);
|
|
364
|
-
}
|
|
365
|
-
}, undefined, false, undefined, this)
|
|
366
|
-
}, undefined, false, undefined, this);
|
|
367
|
-
}
|
|
368
|
-
function RunningIDESelector({
|
|
369
|
-
runningIDEs,
|
|
370
|
-
onSelectIDE,
|
|
371
|
-
onDone
|
|
372
|
-
}) {
|
|
373
|
-
const [selectedValue, setSelectedValue] = import_react2.useState(runningIDEs[0] ?? "");
|
|
374
|
-
const handleSelectIDE = import_react2.useCallback((value) => {
|
|
375
|
-
onSelectIDE(value);
|
|
376
|
-
}, [onSelectIDE]);
|
|
377
|
-
const options = runningIDEs.map((ide) => ({
|
|
378
|
-
label: toIDEDisplayName(ide),
|
|
379
|
-
value: ide
|
|
380
|
-
}));
|
|
381
|
-
function handleCancel() {
|
|
382
|
-
onDone("IDE selection cancelled", { display: "system" });
|
|
383
|
-
}
|
|
384
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
|
|
385
|
-
title: "Select IDE to install extension",
|
|
386
|
-
onCancel: handleCancel,
|
|
387
|
-
color: "ide",
|
|
388
|
-
children: /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
|
|
389
|
-
defaultFocusValue: selectedValue,
|
|
390
|
-
options,
|
|
391
|
-
onChange: (value) => {
|
|
392
|
-
setSelectedValue(value);
|
|
393
|
-
handleSelectIDE(value);
|
|
394
|
-
}
|
|
395
|
-
}, undefined, false, undefined, this)
|
|
396
|
-
}, undefined, false, undefined, this);
|
|
397
|
-
}
|
|
398
|
-
function InstallOnMount({
|
|
399
|
-
ide,
|
|
400
|
-
onInstall
|
|
401
|
-
}) {
|
|
402
|
-
import_react2.useEffect(() => {
|
|
403
|
-
onInstall(ide);
|
|
404
|
-
}, [ide, onInstall]);
|
|
405
|
-
return null;
|
|
406
|
-
}
|
|
407
|
-
async function call(onDone, context, args) {
|
|
408
|
-
logEvent("tengu_ext_ide_command", {});
|
|
409
|
-
const {
|
|
410
|
-
options: { dynamicMcpConfig },
|
|
411
|
-
onChangeDynamicMcpConfig
|
|
412
|
-
} = context;
|
|
413
|
-
if (args?.trim() === "open") {
|
|
414
|
-
const worktreeSession = getCurrentWorktreeSession();
|
|
415
|
-
const targetPath = worktreeSession ? worktreeSession.worktreePath : getCwd();
|
|
416
|
-
const detectedIDEs2 = await detectIDEs(true);
|
|
417
|
-
const availableIDEs2 = detectedIDEs2.filter((ide) => ide.isValid);
|
|
418
|
-
if (availableIDEs2.length === 0) {
|
|
419
|
-
onDone("No IDEs with Claude Code extension detected.");
|
|
420
|
-
return null;
|
|
421
|
-
}
|
|
422
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(IDEOpenSelection, {
|
|
423
|
-
availableIDEs: availableIDEs2,
|
|
424
|
-
onSelectIDE: async (selectedIDE) => {
|
|
425
|
-
if (!selectedIDE) {
|
|
426
|
-
onDone("No IDE selected.");
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
if (selectedIDE.name.toLowerCase().includes("vscode") || selectedIDE.name.toLowerCase().includes("cursor") || selectedIDE.name.toLowerCase().includes("windsurf")) {
|
|
430
|
-
const { code } = await execFileNoThrow("code", [targetPath]);
|
|
431
|
-
if (code === 0) {
|
|
432
|
-
onDone(`Opened ${worktreeSession ? "worktree" : "project"} in ${source_default.bold(selectedIDE.name)}`);
|
|
433
|
-
} else {
|
|
434
|
-
onDone(`Failed to open in ${selectedIDE.name}. Try opening manually: ${targetPath}`);
|
|
435
|
-
}
|
|
436
|
-
} else if (isSupportedJetBrainsTerminal()) {
|
|
437
|
-
onDone(`Please open the ${worktreeSession ? "worktree" : "project"} manually in ${source_default.bold(selectedIDE.name)}: ${targetPath}`);
|
|
438
|
-
} else {
|
|
439
|
-
onDone(`Please open the ${worktreeSession ? "worktree" : "project"} manually in ${source_default.bold(selectedIDE.name)}: ${targetPath}`);
|
|
440
|
-
}
|
|
441
|
-
},
|
|
442
|
-
onDone: () => {
|
|
443
|
-
onDone("Exited without opening IDE", { display: "system" });
|
|
444
|
-
}
|
|
445
|
-
}, undefined, false, undefined, this);
|
|
446
|
-
}
|
|
447
|
-
const detectedIDEs = await detectIDEs(true);
|
|
448
|
-
if (detectedIDEs.length === 0 && context.onInstallIDEExtension && !isSupportedTerminal()) {
|
|
449
|
-
const runningIDEs = await detectRunningIDEs();
|
|
450
|
-
const onInstall = (ide) => {
|
|
451
|
-
if (context.onInstallIDEExtension) {
|
|
452
|
-
context.onInstallIDEExtension(ide);
|
|
453
|
-
if (isJetBrainsIde(ide)) {
|
|
454
|
-
onDone(`Installed plugin to ${source_default.bold(toIDEDisplayName(ide))}
|
|
455
|
-
` + `Please ${source_default.bold("restart your IDE")} completely for it to take effect`);
|
|
456
|
-
} else {
|
|
457
|
-
onDone(`Installed extension to ${source_default.bold(toIDEDisplayName(ide))}`);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
};
|
|
461
|
-
if (runningIDEs.length > 1) {
|
|
462
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(RunningIDESelector, {
|
|
463
|
-
runningIDEs,
|
|
464
|
-
onSelectIDE: onInstall,
|
|
465
|
-
onDone: () => {
|
|
466
|
-
onDone("No IDE selected.", { display: "system" });
|
|
467
|
-
}
|
|
468
|
-
}, undefined, false, undefined, this);
|
|
469
|
-
} else if (runningIDEs.length === 1) {
|
|
470
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(InstallOnMount, {
|
|
471
|
-
ide: runningIDEs[0],
|
|
472
|
-
onInstall
|
|
473
|
-
}, undefined, false, undefined, this);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
const availableIDEs = detectedIDEs.filter((ide) => ide.isValid);
|
|
477
|
-
const unavailableIDEs = detectedIDEs.filter((ide) => !ide.isValid);
|
|
478
|
-
const currentIDE = await findCurrentIDE(availableIDEs, dynamicMcpConfig);
|
|
479
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(IDECommandFlow, {
|
|
480
|
-
availableIDEs,
|
|
481
|
-
unavailableIDEs,
|
|
482
|
-
currentIDE,
|
|
483
|
-
dynamicMcpConfig,
|
|
484
|
-
onChangeDynamicMcpConfig,
|
|
485
|
-
onDone
|
|
486
|
-
}, undefined, false, undefined, this);
|
|
487
|
-
}
|
|
488
|
-
function IDECommandFlow({
|
|
489
|
-
availableIDEs,
|
|
490
|
-
unavailableIDEs,
|
|
491
|
-
currentIDE,
|
|
492
|
-
dynamicMcpConfig,
|
|
493
|
-
onChangeDynamicMcpConfig,
|
|
494
|
-
onDone
|
|
495
|
-
}) {
|
|
496
|
-
const [connectingIDE, setConnectingIDE] = import_react2.useState(null);
|
|
497
|
-
const ideClient = useAppState((s) => s.mcp.clients.find((c) => c.name === "ide"));
|
|
498
|
-
const setAppState = useSetAppState();
|
|
499
|
-
const isFirstCheckRef = import_react2.useRef(true);
|
|
500
|
-
import_react2.useEffect(() => {
|
|
501
|
-
if (!connectingIDE)
|
|
502
|
-
return;
|
|
503
|
-
if (isFirstCheckRef.current) {
|
|
504
|
-
isFirstCheckRef.current = false;
|
|
505
|
-
return;
|
|
506
|
-
}
|
|
507
|
-
if (!ideClient || ideClient.type === "pending")
|
|
508
|
-
return;
|
|
509
|
-
if (ideClient.type === "connected") {
|
|
510
|
-
onDone(`Connected to ${connectingIDE.name}.`);
|
|
511
|
-
} else if (ideClient.type === "failed") {
|
|
512
|
-
onDone(`Failed to connect to ${connectingIDE.name}.`);
|
|
513
|
-
}
|
|
514
|
-
}, [ideClient, connectingIDE, onDone]);
|
|
515
|
-
import_react2.useEffect(() => {
|
|
516
|
-
if (!connectingIDE)
|
|
517
|
-
return;
|
|
518
|
-
const timer = setTimeout(onDone, IDE_CONNECTION_TIMEOUT_MS, `Connection to ${connectingIDE.name} timed out.`);
|
|
519
|
-
return () => clearTimeout(timer);
|
|
520
|
-
}, [connectingIDE, onDone]);
|
|
521
|
-
const handleSelectIDE = import_react2.useCallback((selectedIDE) => {
|
|
522
|
-
if (!onChangeDynamicMcpConfig) {
|
|
523
|
-
onDone("Error connecting to IDE.");
|
|
524
|
-
return;
|
|
525
|
-
}
|
|
526
|
-
const newConfig = { ...dynamicMcpConfig || {} };
|
|
527
|
-
if (currentIDE) {
|
|
528
|
-
delete newConfig.ide;
|
|
529
|
-
}
|
|
530
|
-
if (!selectedIDE) {
|
|
531
|
-
if (ideClient && ideClient.type === "connected" && currentIDE) {
|
|
532
|
-
ideClient.client.onclose = () => {};
|
|
533
|
-
clearServerCache("ide", ideClient.config);
|
|
534
|
-
setAppState((prev) => ({
|
|
535
|
-
...prev,
|
|
536
|
-
mcp: {
|
|
537
|
-
...prev.mcp,
|
|
538
|
-
clients: prev.mcp.clients.filter((c) => c.name !== "ide"),
|
|
539
|
-
tools: prev.mcp.tools.filter((t) => !t.name?.startsWith("mcp__ide__")),
|
|
540
|
-
commands: prev.mcp.commands.filter((c) => !c.name?.startsWith("mcp__ide__"))
|
|
541
|
-
}
|
|
542
|
-
}));
|
|
543
|
-
}
|
|
544
|
-
onChangeDynamicMcpConfig(newConfig);
|
|
545
|
-
onDone(currentIDE ? `Disconnected from ${currentIDE.name}.` : "No IDE selected.");
|
|
546
|
-
return;
|
|
547
|
-
}
|
|
548
|
-
const url = selectedIDE.url;
|
|
549
|
-
newConfig.ide = {
|
|
550
|
-
type: url.startsWith("ws:") ? "ws-ide" : "sse-ide",
|
|
551
|
-
url,
|
|
552
|
-
ideName: selectedIDE.name,
|
|
553
|
-
authToken: selectedIDE.authToken,
|
|
554
|
-
ideRunningInWindows: selectedIDE.ideRunningInWindows,
|
|
555
|
-
scope: "dynamic"
|
|
556
|
-
};
|
|
557
|
-
isFirstCheckRef.current = true;
|
|
558
|
-
setConnectingIDE(selectedIDE);
|
|
559
|
-
onChangeDynamicMcpConfig(newConfig);
|
|
560
|
-
}, [
|
|
561
|
-
dynamicMcpConfig,
|
|
562
|
-
currentIDE,
|
|
563
|
-
ideClient,
|
|
564
|
-
setAppState,
|
|
565
|
-
onChangeDynamicMcpConfig,
|
|
566
|
-
onDone
|
|
567
|
-
]);
|
|
568
|
-
if (connectingIDE) {
|
|
569
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
|
|
570
|
-
dimColor: true,
|
|
571
|
-
children: [
|
|
572
|
-
"Connecting to ",
|
|
573
|
-
connectingIDE.name,
|
|
574
|
-
"\u2026"
|
|
575
|
-
]
|
|
576
|
-
}, undefined, true, undefined, this);
|
|
577
|
-
}
|
|
578
|
-
return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(IDEScreen, {
|
|
579
|
-
availableIDEs,
|
|
580
|
-
unavailableIDEs,
|
|
581
|
-
selectedIDE: currentIDE,
|
|
582
|
-
onClose: () => onDone("IDE selection cancelled", { display: "system" }),
|
|
583
|
-
onSelect: handleSelectIDE
|
|
584
|
-
}, undefined, false, undefined, this);
|
|
585
|
-
}
|
|
586
|
-
function formatWorkspaceFolders(folders, maxLength = 100) {
|
|
587
|
-
if (folders.length === 0)
|
|
588
|
-
return "";
|
|
589
|
-
const cwd = getCwd();
|
|
590
|
-
const foldersToShow = folders.slice(0, 2);
|
|
591
|
-
const hasMore = folders.length > 2;
|
|
592
|
-
const ellipsisOverhead = hasMore ? 3 : 0;
|
|
593
|
-
const separatorOverhead = (foldersToShow.length - 1) * 2;
|
|
594
|
-
const availableLength = maxLength - separatorOverhead - ellipsisOverhead;
|
|
595
|
-
const maxLengthPerPath = Math.floor(availableLength / foldersToShow.length);
|
|
596
|
-
const cwdNFC = cwd.normalize("NFC");
|
|
597
|
-
const formattedFolders = foldersToShow.map((folder) => {
|
|
598
|
-
const folderNFC = folder.normalize("NFC");
|
|
599
|
-
if (folderNFC.startsWith(cwdNFC + path.sep)) {
|
|
600
|
-
folder = folderNFC.slice(cwdNFC.length + 1);
|
|
601
|
-
}
|
|
602
|
-
if (folder.length <= maxLengthPerPath) {
|
|
603
|
-
return folder;
|
|
604
|
-
}
|
|
605
|
-
return "\u2026" + folder.slice(-(maxLengthPerPath - 1));
|
|
606
|
-
});
|
|
607
|
-
let result = formattedFolders.join(", ");
|
|
608
|
-
if (hasMore) {
|
|
609
|
-
result += ", \u2026";
|
|
610
|
-
}
|
|
611
|
-
return result;
|
|
612
|
-
}
|
|
613
|
-
var import_react2, jsx_dev_runtime2, IDE_CONNECTION_TIMEOUT_MS = 35000;
|
|
614
|
-
var init_ide2 = __esm(() => {
|
|
615
|
-
init_source();
|
|
616
|
-
init_analytics();
|
|
617
|
-
init_CustomSelect();
|
|
618
|
-
init_src();
|
|
619
|
-
init_IdeAutoConnectDialog();
|
|
620
|
-
init_src();
|
|
621
|
-
init_client();
|
|
622
|
-
init_AppState();
|
|
623
|
-
init_cwd();
|
|
624
|
-
init_execFileNoThrow();
|
|
625
|
-
init_ide();
|
|
626
|
-
init_worktree();
|
|
627
|
-
import_react2 = __toESM(require_react(), 1);
|
|
628
|
-
jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
629
|
-
});
|
|
630
|
-
init_ide2();
|
|
631
|
-
|
|
632
|
-
export {
|
|
633
|
-
formatWorkspaceFolders,
|
|
634
|
-
call
|
|
635
|
-
};
|