@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.
Files changed (539) hide show
  1. package/README.md +104 -369
  2. package/dist/{chunk-4t7n5hfg.js → chunk-0318ehfm.js} +8 -8
  3. package/dist/chunk-050fe4m3.js +68 -0
  4. package/dist/chunk-06v69x0b.js +127 -0
  5. package/dist/chunk-07069jq1.js +30 -0
  6. package/dist/chunk-0c9xpqm8.js +106 -0
  7. package/dist/chunk-0hxxwcs1.js +107 -0
  8. package/dist/chunk-0nsb3kxz.js +440 -0
  9. package/dist/{chunk-1cbn5kxf.js → chunk-0rpb2bdp.js} +3 -2
  10. package/dist/{chunk-vykgfhrb.js → chunk-0svbkpfn.js} +5 -5
  11. package/dist/chunk-0vg07894.js +121 -0
  12. package/dist/{chunk-e4vsvf0r.js → chunk-0zefjhrg.js} +4 -4
  13. package/dist/chunk-0zfmj5y2.js +106 -0
  14. package/dist/{chunk-czkshaff.js → chunk-107p04a0.js} +13 -11
  15. package/dist/{chunk-z4dm354d.js → chunk-13f30tg0.js} +1 -1
  16. package/dist/{chunk-44fpr6jq.js → chunk-168xb8v1.js} +4 -2
  17. package/dist/{chunk-0w63x62y.js → chunk-181q7ysj.js} +79 -63
  18. package/dist/{chunk-6mapphaq.js → chunk-18jc5efa.js} +8 -8
  19. package/dist/chunk-19j7nkpy.js +133 -0
  20. package/dist/chunk-1c2qp0ks.js +33068 -0
  21. package/dist/{chunk-0e1xsncc.js → chunk-1cwdhk7a.js} +1 -1
  22. package/dist/{chunk-7m2nd8da.js → chunk-1erfksyp.js} +6 -9
  23. package/dist/{chunk-rs45skes.js → chunk-1h1tc4mw.js} +13 -10
  24. package/dist/{chunk-91rcbmch.js → chunk-1rngm3yy.js} +155 -184
  25. package/dist/{chunk-3gqdqmzb.js → chunk-1vthytca.js} +16 -12
  26. package/dist/{chunk-xe6z85xc.js → chunk-1xbs4yb6.js} +19 -16
  27. package/dist/chunk-1xj1yz5n.js +109 -0
  28. package/dist/chunk-21mfpnva.js +85 -0
  29. package/dist/chunk-2361j94t.js +1811 -0
  30. package/dist/chunk-238g70xa.js +1 -1
  31. package/dist/chunk-250f5ce1.js +108 -0
  32. package/dist/{chunk-8yx1trkj.js → chunk-29r4exv2.js} +105 -211
  33. package/dist/chunk-2a8yf5ct.js +72 -0
  34. package/dist/{chunk-h3fqb66h.js → chunk-2bnerkhs.js} +110 -135
  35. package/dist/{chunk-0nt9md2b.js → chunk-2cctz9ww.js} +101 -8
  36. package/dist/chunk-2fwze72g.js +24 -0
  37. package/dist/{chunk-h3qa8f5w.js → chunk-2jvpw0q1.js} +229 -363
  38. package/dist/{chunk-9wm5e9e9.js → chunk-2mj88mnr.js} +42 -31
  39. package/dist/chunk-2q0schcc.js +133 -0
  40. package/dist/{chunk-r66hz8j6.js → chunk-2qp2hc02.js} +14 -12
  41. package/dist/chunk-2t0xa4dt.js +145 -0
  42. package/dist/chunk-2tzxsnha.js +360 -0
  43. package/dist/chunk-2v8cya3p.js +54 -0
  44. package/dist/chunk-2w00z1ct.js +105 -0
  45. package/dist/{chunk-2md1yavs.js → chunk-2wpfdv2t.js} +43 -32
  46. package/dist/chunk-2xcr3eqt.js +65 -0
  47. package/dist/chunk-30bpz5m2.js +34 -0
  48. package/dist/{chunk-hrzerbfw.js → chunk-36b2q5fg.js} +14 -14
  49. package/dist/{chunk-edg1yhec.js → chunk-3aady5e2.js} +2 -2
  50. package/dist/chunk-3ewzhjyb.js +207 -0
  51. package/dist/{chunk-z47tm067.js → chunk-3kpptrnz.js} +54 -47
  52. package/dist/{chunk-yd3av9a3.js → chunk-3na967x3.js} +2 -2
  53. package/dist/chunk-3nk79af8.js +8 -0
  54. package/dist/{chunk-z0cm9r7f.js → chunk-3r66czp1.js} +10 -10
  55. package/dist/{chunk-rnjbczcy.js → chunk-3y3qasy6.js} +13 -11
  56. package/dist/{chunk-nxsh6de2.js → chunk-404qm8xt.js} +16 -12
  57. package/dist/{chunk-mhqthgdg.js → chunk-41grdp0q.js} +5 -5
  58. package/dist/chunk-4cp6193g.js +9076 -0
  59. package/dist/chunk-4g18phg9.js +2535 -0
  60. package/dist/{chunk-6n2qgm9v.js → chunk-4hv90qcz.js} +1 -1
  61. package/dist/chunk-4jkfzf6g.js +81 -0
  62. package/dist/{chunk-5frcqxsv.js → chunk-4m6k7588.js} +127117 -138842
  63. package/dist/chunk-4nspekjp.js +69 -0
  64. package/dist/chunk-4x29t96w.js +119 -0
  65. package/dist/{chunk-40b8p5em.js → chunk-585cb3h6.js} +14 -12
  66. package/dist/{chunk-5dbar61y.js → chunk-59qz55py.js} +77 -61
  67. package/dist/chunk-5bta6qne.js +1030 -0
  68. package/dist/chunk-5dmczs66.js +123 -0
  69. package/dist/{chunk-9e2kqv5g.js → chunk-5pevjsyw.js} +3 -10
  70. package/dist/{chunk-5ndexvh1.js → chunk-5py41v61.js} +10226 -16961
  71. package/dist/{chunk-d5e75scx.js → chunk-5q2gm8dt.js} +5 -5
  72. package/dist/{chunk-893mewv4.js → chunk-5rpyh7nn.js} +1 -1
  73. package/dist/{chunk-hx2tr4ep.js → chunk-5z28bqne.js} +34 -475
  74. package/dist/chunk-5zzwydag.js +1170 -0
  75. package/dist/{chunk-4tyxyfsv.js → chunk-61gm3j90.js} +2 -2
  76. package/dist/chunk-64c1avct.js +13 -0
  77. package/dist/chunk-64hks9ax.js +456 -0
  78. package/dist/{chunk-bw9a5v0b.js → chunk-64m7ax9d.js} +4 -4
  79. package/dist/{chunk-cha1tdry.js → chunk-66hjztcb.js} +1 -1
  80. package/dist/{chunk-q25bjaev.js → chunk-677as3nh.js} +2 -2
  81. package/dist/chunk-69v14ada.js +76 -0
  82. package/dist/chunk-6eahnbxj.js +101 -0
  83. package/dist/chunk-6eg4c33n.js +196 -0
  84. package/dist/chunk-6fjfwj7q.js +214 -0
  85. package/dist/{chunk-70qb5sds.js → chunk-6kwwke3r.js} +2 -2
  86. package/dist/chunk-6m0pc6py.js +311 -0
  87. package/dist/chunk-6mpw9h55.js +1071 -0
  88. package/dist/{chunk-v1mgv1et.js → chunk-6p4cyhb3.js} +4 -3
  89. package/dist/chunk-6r1dx518.js +111 -0
  90. package/dist/{chunk-1n1xqxv5.js → chunk-713bh4cd.js} +1072 -1736
  91. package/dist/{chunk-nstbdz07.js → chunk-7246q965.js} +85 -69
  92. package/dist/{chunk-w6q6a1qj.js → chunk-74mdk2e7.js} +564 -864
  93. package/dist/{chunk-77czbpcq.js → chunk-76pa90ge.js} +104 -90
  94. package/dist/chunk-77nkh0x1.js +82 -0
  95. package/dist/chunk-7bsbnzpm.js +65 -0
  96. package/dist/chunk-7r3v46aq.js +167 -0
  97. package/dist/chunk-7vf8s593.js +235 -0
  98. package/dist/chunk-7x6ng8fp.js +64 -0
  99. package/dist/chunk-7xy990yb.js +81 -0
  100. package/dist/chunk-7xyswgjh.js +8 -0
  101. package/dist/chunk-80p18mf8.js +228 -0
  102. package/dist/{chunk-dv1wfr85.js → chunk-8225arm6.js} +5 -4
  103. package/dist/{chunk-vdbes184.js → chunk-82rh5hpz.js} +70 -10
  104. package/dist/chunk-84nf3k34.js +73 -0
  105. package/dist/chunk-85v0yx5b.js +106 -0
  106. package/dist/{chunk-x5j50p5x.js → chunk-86f4vq6n.js} +5 -5
  107. package/dist/{chunk-e5ga3s0y.js → chunk-86vec0h6.js} +148 -421
  108. package/dist/chunk-8az1n4zt.js +110 -0
  109. package/dist/{chunk-ctw5jwcd.js → chunk-8bwqtasa.js} +10 -10
  110. package/dist/chunk-8c9jtmsm.js +100 -0
  111. package/dist/{chunk-fqc5mcw7.js → chunk-8ca80ew2.js} +9 -9
  112. package/dist/chunk-8g5pe1gr.js +37 -0
  113. package/dist/{chunk-g0j0t6qk.js → chunk-8g747a8x.js} +1 -1
  114. package/dist/{chunk-3vzs2gbq.js → chunk-8gxztyqd.js} +4 -4
  115. package/dist/{chunk-45kxdsp8.js → chunk-8h6sdj66.js} +13 -10
  116. package/dist/{chunk-s8amjdwf.js → chunk-8ht15c7w.js} +7 -7
  117. package/dist/{chunk-ywxd4qw4.js → chunk-8mm8b6dd.js} +2 -5
  118. package/dist/{chunk-sdj9b9wh.js → chunk-8pn8tvgg.js} +9 -154
  119. package/dist/{chunk-pxrffn0w.js → chunk-8vnxjgz9.js} +11 -5
  120. package/dist/chunk-9525p9tg.js +401 -0
  121. package/dist/{chunk-y47cg3kz.js → chunk-9a0rsdre.js} +17 -13
  122. package/dist/chunk-9a2pa53f.js +308 -0
  123. package/dist/chunk-9es2dav7.js +507 -0
  124. package/dist/chunk-9pq45ycx.js +217 -0
  125. package/dist/chunk-9qwkw406.js +121 -0
  126. package/dist/chunk-9rf1x0z9.js +109 -0
  127. package/dist/{chunk-ghmbr193.js → chunk-9rvqx05m.js} +9 -9
  128. package/dist/{chunk-dchkdhzs.js → chunk-9sd3tz3p.js} +91 -75
  129. package/dist/chunk-9x5zgy22.js +12 -0
  130. package/dist/{chunk-q6b51yc5.js → chunk-9z4vq44b.js} +3 -3
  131. package/dist/chunk-a136cvvz.js +27 -0
  132. package/dist/{chunk-8hq5kk3y.js → chunk-a4twdmhf.js} +3 -2
  133. package/dist/{chunk-d18z9pna.js → chunk-a7rhvq9b.js} +2 -2
  134. package/dist/{chunk-pmjqdasm.js → chunk-a8jbqb9f.js} +2313 -4199
  135. package/dist/chunk-a9xhsth1.js +1068 -0
  136. package/dist/{chunk-kd63fbhw.js → chunk-achjqrhd.js} +81 -65
  137. package/dist/{chunk-67kbbt9h.js → chunk-af2vfhm4.js} +42 -31
  138. package/dist/{chunk-js8rvgs1.js → chunk-ahn9tgz7.js} +3 -3
  139. package/dist/chunk-ajets2e9.js +103 -0
  140. package/dist/chunk-akxywws0.js +79 -0
  141. package/dist/{chunk-meefz2g4.js → chunk-aqvgkvsq.js} +7 -7
  142. package/dist/{chunk-r6b58y3x.js → chunk-ase86y73.js} +1 -3
  143. package/dist/{chunk-hjhc4cpt.js → chunk-awb4vc41.js} +2 -2
  144. package/dist/{chunk-1jrcb7cs.js → chunk-b0mt3wzx.js} +37 -82
  145. package/dist/chunk-b4zy6y92.js +105 -0
  146. package/dist/{chunk-ax83mpvw.js → chunk-b65yxs9e.js} +26 -26
  147. package/dist/{chunk-wzx6mmft.js → chunk-b7b39zx2.js} +120 -118
  148. package/dist/{chunk-8bedvdm1.js → chunk-b81hd3m6.js} +1 -1
  149. package/dist/chunk-bbr7mwpv.js +117 -0
  150. package/dist/{chunk-1a61g8t2.js → chunk-bdzqt6gy.js} +83 -64
  151. package/dist/chunk-bkm0zms8.js +110 -0
  152. package/dist/{chunk-0vvej174.js → chunk-bs8r4665.js} +5 -5
  153. package/dist/{chunk-xvc4gp3x.js → chunk-bszdmr4k.js} +24 -24
  154. package/dist/{chunk-8ngxagxq.js → chunk-bt64sq5y.js} +4 -3
  155. package/dist/chunk-bvcpr8qa.js +909 -0
  156. package/dist/chunk-bx811wk6.js +118 -0
  157. package/dist/{chunk-3be7ka25.js → chunk-bxcfz5gy.js} +1 -1
  158. package/dist/{chunk-77g09znh.js → chunk-byv2p9hn.js} +22 -16
  159. package/dist/{chunk-wbkahkdc.js → chunk-c03am3es.js} +8 -6
  160. package/dist/chunk-c1x69s30.js +116 -0
  161. package/dist/chunk-c5vkve4j.js +68 -0
  162. package/dist/chunk-c6sjhj89.js +1284 -0
  163. package/dist/chunk-cb0wxajw.js +142 -0
  164. package/dist/{chunk-vyc0rjyx.js → chunk-cbrt5vsb.js} +1 -1
  165. package/dist/{chunk-4kxr1pwz.js → chunk-cgmy7r62.js} +30 -17
  166. package/dist/chunk-chsyvavm.js +3435 -0
  167. package/dist/{chunk-z72st5c8.js → chunk-cmsknj6n.js} +4774 -3386
  168. package/dist/{chunk-cdz5yb0r.js → chunk-crmjpsqe.js} +13 -2
  169. package/dist/chunk-cs039fnj.js +123 -0
  170. package/dist/{chunk-e7393td6.js → chunk-cznf6k4g.js} +13 -9
  171. package/dist/{chunk-fw49pe3p.js → chunk-cztjpxq4.js} +6 -6
  172. package/dist/{chunk-n8sjmqba.js → chunk-d0n93ge4.js} +141 -100
  173. package/dist/{chunk-spde0bf5.js → chunk-d14ygn80.js} +3 -3
  174. package/dist/chunk-d4mdda98.js +94 -0
  175. package/dist/chunk-d5qggsbm.js +137 -0
  176. package/dist/{chunk-55wgxwa9.js → chunk-d7886r6a.js} +6928 -6935
  177. package/dist/{chunk-eh8h36nt.js → chunk-d9gxtzmz.js} +42 -31
  178. package/dist/{chunk-xk66xrkk.js → chunk-da312cj9.js} +54 -72
  179. package/dist/{chunk-j287ctwr.js → chunk-df19zqjj.js} +77 -61
  180. package/dist/chunk-dm3n2qgd.js +24 -0
  181. package/dist/{chunk-m21hvkn4.js → chunk-dncgrfdt.js} +2 -2
  182. package/dist/{chunk-0nz8sqg4.js → chunk-dq3rw4b5.js} +1294 -873
  183. package/dist/{chunk-ey03t39w.js → chunk-dw1f4b7e.js} +257 -194
  184. package/dist/chunk-dx1jrvdz.js +339 -0
  185. package/dist/{chunk-0ragr30c.js → chunk-dxeadbxq.js} +12 -12
  186. package/dist/{chunk-gdp8wgnd.js → chunk-e8b9gcwf.js} +88 -72
  187. package/dist/chunk-e9k5a3cy.js +409 -0
  188. package/dist/chunk-e9mer45h.js +64 -0
  189. package/dist/{chunk-5qbwrz8m.js → chunk-ea2f7wt3.js} +13 -13
  190. package/dist/chunk-eak7m65m.js +1182 -0
  191. package/dist/chunk-ebhgmeyk.js +245 -0
  192. package/dist/chunk-eg93k7ac.js +117 -0
  193. package/dist/{chunk-jgv78tv0.js → chunk-ej1yvp43.js} +8 -8
  194. package/dist/chunk-ekr8pwpv.js +1408 -0
  195. package/dist/{chunk-m4edbpcz.js → chunk-epg124e3.js} +117 -143
  196. package/dist/chunk-eyqnj23w.js +5368 -0
  197. package/dist/chunk-f2bvkxbw.js +267 -0
  198. package/dist/chunk-f537x96t.js +295 -0
  199. package/dist/chunk-f6wdmebb.js +108 -0
  200. package/dist/chunk-feyzykye.js +10 -0
  201. package/dist/{chunk-ep47dy22.js → chunk-fj3ywwqv.js} +7 -7
  202. package/dist/{chunk-9gttd1xq.js → chunk-fjv7p1kc.js} +4 -4
  203. package/dist/{chunk-1rnkpxy4.js → chunk-fpe5nywt.js} +10 -115
  204. package/dist/chunk-fvpgrg19.js +434 -0
  205. package/dist/{chunk-9xmsmn93.js → chunk-fvqrkmtn.js} +5 -5
  206. package/dist/{chunk-6g62sjpf.js → chunk-fz0ch109.js} +4 -3
  207. package/dist/{chunk-5xz7ts0k.js → chunk-g0vh71q6.js} +188 -339
  208. package/dist/chunk-g1gtvtv8.js +384 -0
  209. package/dist/chunk-g5g9wm20.js +66 -0
  210. package/dist/{chunk-v399mzxk.js → chunk-g63tgj4f.js} +2 -2
  211. package/dist/{chunk-kkkneeg1.js → chunk-gay98970.js} +21 -16
  212. package/dist/chunk-gey7mwcw.js +36 -0
  213. package/dist/{chunk-w5ctjgmx.js → chunk-gtyh1yd1.js} +2 -2
  214. package/dist/{chunk-tjaqa99q.js → chunk-gx8016vp.js} +3 -3
  215. package/dist/{chunk-f2mhrmww.js → chunk-h0rbjg6x.js} +1 -8
  216. package/dist/{chunk-7z8j9qfn.js → chunk-h1mr3371.js} +3 -3
  217. package/dist/chunk-h2yxyeq4.js +132 -0
  218. package/dist/{chunk-qqfa0dqg.js → chunk-h4b85amj.js} +20 -32
  219. package/dist/chunk-h707k8xq.js +64 -0
  220. package/dist/{chunk-3z6rf0m3.js → chunk-h7rcjx8d.js} +5 -5
  221. package/dist/chunk-hch5yeq8.js +121 -0
  222. package/dist/{chunk-4anyx5bv.js → chunk-hd4azb7x.js} +5 -5
  223. package/dist/chunk-hjnbg9qw.js +32 -0
  224. package/dist/{chunk-e2yv57c2.js → chunk-hk9mmkba.js} +8 -8
  225. package/dist/{chunk-f1rrxxcf.js → chunk-hs9w0p45.js} +7 -131
  226. package/dist/{chunk-9f7xza5r.js → chunk-htaan7k0.js} +11 -11
  227. package/dist/chunk-htg84hvs.js +300 -0
  228. package/dist/chunk-hvyr6p4r.js +433 -0
  229. package/dist/chunk-j0r5vkvw.js +267 -0
  230. package/dist/{chunk-9gbamk79.js → chunk-j5bth84e.js} +5 -1
  231. package/dist/{chunk-vratq94g.js → chunk-j9gxwbe3.js} +1 -1
  232. package/dist/{chunk-3r24h7t6.js → chunk-jaaxk89e.js} +1 -1
  233. package/dist/chunk-je7jake4.js +3584 -0
  234. package/dist/chunk-jeqhpyxr.js +126 -0
  235. package/dist/chunk-jngf0nar.js +135 -0
  236. package/dist/chunk-jqjbc5ef.js +795 -0
  237. package/dist/{chunk-xf4wsjdm.js → chunk-jwrmmv7j.js} +9 -7
  238. package/dist/{chunk-j9wpkwjj.js → chunk-jwyzy83k.js} +6 -6
  239. package/dist/chunk-jz8v9sn3.js +228 -0
  240. package/dist/{chunk-bqfnp99q.js → chunk-k3s4yk22.js} +1 -1
  241. package/dist/chunk-k5c09bzv.js +443 -0
  242. package/dist/chunk-kbktwsms.js +372 -0
  243. package/dist/chunk-ke0hn0xr.js +260 -0
  244. package/dist/chunk-kehe7a71.js +41 -0
  245. package/dist/{chunk-1xkekb9y.js → chunk-kfd89dsd.js} +5 -3
  246. package/dist/chunk-ktjjb0k9.js +104 -0
  247. package/dist/{chunk-b74ht3xj.js → chunk-kxgcshx1.js} +78 -62
  248. package/dist/chunk-kz2fpejx.js +651 -0
  249. package/dist/{chunk-zvbpaaa1.js → chunk-kz3ctzg3.js} +110 -115
  250. package/dist/{chunk-72p24c9k.js → chunk-m268mm4c.js} +127 -188
  251. package/dist/{chunk-jafes477.js → chunk-m2bcpk8j.js} +4 -3
  252. package/dist/{chunk-4qv4z794.js → chunk-m32mdkts.js} +42 -31
  253. package/dist/chunk-m74w3187.js +164 -0
  254. package/dist/chunk-m7s7j422.js +166 -0
  255. package/dist/chunk-majhpxx5.js +594 -0
  256. package/dist/{chunk-q6av622g.js → chunk-mdk3xgya.js} +17 -13
  257. package/dist/{chunk-8bw3ft0x.js → chunk-mfcbez9a.js} +4 -4
  258. package/dist/{chunk-df6bwb4a.js → chunk-mj6w3ttg.js} +2 -2
  259. package/dist/{chunk-drrw55jr.js → chunk-mk6kj3q2.js} +1336 -2840
  260. package/dist/{chunk-vqr58rfh.js → chunk-mky388t4.js} +27 -67
  261. package/dist/chunk-mn61mk4v.js +351 -0
  262. package/dist/chunk-mx28h61f.js +1147 -0
  263. package/dist/chunk-my57sgky.js +883 -0
  264. package/dist/{chunk-k48thqgp.js → chunk-myk8saf6.js} +95 -190
  265. package/dist/chunk-n2zdmx4g.js +66 -0
  266. package/dist/{chunk-720qpv6d.js → chunk-n833arxq.js} +79 -63
  267. package/dist/{chunk-w2z5pqd3.js → chunk-n9ktjngj.js} +6 -6
  268. package/dist/{chunk-2tw2ve8h.js → chunk-nb2ntesh.js} +14 -10
  269. package/dist/{chunk-y18mc4m4.js → chunk-nbqv8ref.js} +10 -10
  270. package/dist/{chunk-74v9z7z4.js → chunk-nd4rncgd.js} +3 -13
  271. package/dist/chunk-nda50ze4.js +341 -0
  272. package/dist/{chunk-gb2q3nvc.js → chunk-nea2sah6.js} +5 -5
  273. package/dist/{chunk-t36rb2a8.js → chunk-nefsxetf.js} +294 -500
  274. package/dist/chunk-netzwgv1.js +154 -0
  275. package/dist/chunk-nfk9e540.js +107 -0
  276. package/dist/{chunk-xszk7n10.js → chunk-nh3cd07f.js} +1 -1
  277. package/dist/chunk-njq2hmjy.js +270 -0
  278. package/dist/chunk-nn5j7h8a.js +156 -0
  279. package/dist/{chunk-6fjab2dp.js → chunk-nrvkwzmq.js} +2 -2
  280. package/dist/chunk-nsextsmp.js +360 -0
  281. package/dist/{chunk-amhzxqj4.js → chunk-nt90fta7.js} +5 -5
  282. package/dist/{chunk-qbx1rq4f.js → chunk-p6sqbnqb.js} +193 -327
  283. package/dist/chunk-p8c23zr7.js +61 -0
  284. package/dist/chunk-p8enbwjk.js +183 -0
  285. package/dist/chunk-p8yggvgf.js +436 -0
  286. package/dist/{chunk-96awg5tc.js → chunk-pcfhe19b.js} +80 -17
  287. package/dist/{chunk-sfq65q9w.js → chunk-pgv9sa3a.js} +10 -14
  288. package/dist/chunk-ppwjyveh.js +8 -0
  289. package/dist/chunk-ppxvfp6m.js +424 -0
  290. package/dist/{chunk-zsfxha74.js → chunk-pshjyzq4.js} +8 -7
  291. package/dist/{chunk-35x3tjnr.js → chunk-pwr83fyy.js} +14 -8
  292. package/dist/chunk-q1976kze.js +473 -0
  293. package/dist/chunk-q387p8pp.js +943 -0
  294. package/dist/{chunk-b6av9ny9.js → chunk-q3ffkhnp.js} +132 -20
  295. package/dist/{chunk-w7wgpqcp.js → chunk-q50q8mc5.js} +7 -7
  296. package/dist/{chunk-e5pntxye.js → chunk-q7tpyeb3.js} +6 -4
  297. package/dist/{chunk-7ymfj7m3.js → chunk-q82r31er.js} +1 -1
  298. package/dist/chunk-qajrkk97.js +298 -0
  299. package/dist/chunk-qdazcrd7.js +362 -0
  300. package/dist/chunk-qhwvhgty.js +61 -0
  301. package/dist/{chunk-455a8z6g.js → chunk-qqk0kvsw.js} +138 -98
  302. package/dist/chunk-qqya1xyt.js +513 -0
  303. package/dist/{chunk-mzdwvbb0.js → chunk-qs6wypj1.js} +2 -2
  304. package/dist/chunk-qtahf5s5.js +113 -0
  305. package/dist/{chunk-tj79kfmn.js → chunk-qv9phqbv.js} +7 -7
  306. package/dist/{chunk-r5k04v8g.js → chunk-qyygv221.js} +13 -9
  307. package/dist/{chunk-zfc67eqj.js → chunk-r34f6vwc.js} +4 -4
  308. package/dist/{chunk-nerv0jvx.js → chunk-r59rgjxq.js} +1 -1
  309. package/dist/{chunk-7sb5axvf.js → chunk-r7j395t6.js} +2 -2
  310. package/dist/chunk-rb31sqzm.js +106 -0
  311. package/dist/{chunk-twsxz9ph.js → chunk-rbwy1qmm.js} +42 -31
  312. package/dist/{chunk-99t8enmg.js → chunk-re3crc6t.js} +10 -7
  313. package/dist/chunk-rhw4ayb1.js +6851 -0
  314. package/dist/{chunk-h6wtwdk0.js → chunk-rm31ynek.js} +8 -8
  315. package/dist/{chunk-eqrh0yjm.js → chunk-rr4e4axp.js} +2 -2
  316. package/dist/{chunk-neh2frnn.js → chunk-rs8304k5.js} +6 -6
  317. package/dist/{chunk-gax0fcbx.js → chunk-s1s8qfdh.js} +5 -5
  318. package/dist/{chunk-src9fqj8.js → chunk-s2483y2h.js} +3 -3
  319. package/dist/chunk-s2nhzjmt.js +113 -0
  320. package/dist/{chunk-7jma9mhn.js → chunk-sfhws681.js} +77 -61
  321. package/dist/{chunk-e3g8q4cn.js → chunk-sg66v252.js} +10 -8
  322. package/dist/{chunk-vp25xhav.js → chunk-szyt0xvf.js} +69 -78
  323. package/dist/{chunk-v7455ztd.js → chunk-t7j91et3.js} +86 -67
  324. package/dist/{chunk-mt25echc.js → chunk-tezak8rx.js} +1 -1
  325. package/dist/chunk-tf1p9trz.js +190 -0
  326. package/dist/{chunk-05gxvwvf.js → chunk-tm82sqkr.js} +96 -79
  327. package/dist/chunk-tpjetyb0.js +106 -0
  328. package/dist/chunk-trxvrrac.js +149 -0
  329. package/dist/chunk-tv9pcdnz.js +51 -0
  330. package/dist/{chunk-e5tfw9f7.js → chunk-twh7pzm8.js} +248 -307
  331. package/dist/{chunk-1x2wb3tc.js → chunk-txfvkh0w.js} +8 -8
  332. package/dist/chunk-var1et7e.js +66 -0
  333. package/dist/{chunk-se7v9emp.js → chunk-vbhvx4ma.js} +12 -10
  334. package/dist/{chunk-hqmz36b3.js → chunk-vf612n57.js} +21 -101
  335. package/dist/{chunk-3sdp7ds7.js → chunk-vfcty2ga.js} +10 -10
  336. package/dist/chunk-vhhyv8z8.js +147 -0
  337. package/dist/{chunk-48z7dgy1.js → chunk-vjcxs86z.js} +3 -3
  338. package/dist/{chunk-k5bpc8d5.js → chunk-vmnf3h9c.js} +43 -32
  339. package/dist/{chunk-fpjeh2em.js → chunk-vr7wmmyn.js} +17 -13
  340. package/dist/{chunk-9ewmqkgb.js → chunk-vxp2mhqy.js} +8 -8
  341. package/dist/{chunk-d238zp4m.js → chunk-w4gwnrwa.js} +2 -2
  342. package/dist/{chunk-jhsywyw8.js → chunk-wahkzh83.js} +9 -9
  343. package/dist/chunk-wdd4en5q.js +117 -0
  344. package/dist/{chunk-gm2m2yba.js → chunk-wgfnd174.js} +43 -32
  345. package/dist/chunk-wk1jw4dm.js +139 -0
  346. package/dist/chunk-wnpjc8hg.js +1018 -0
  347. package/dist/chunk-wv1t041q.js +151 -0
  348. package/dist/chunk-wvtmrmaj.js +130 -0
  349. package/dist/chunk-wyavftcj.js +103 -0
  350. package/dist/{chunk-4589pec2.js → chunk-x2dp18yj.js} +18 -46
  351. package/dist/{chunk-fj4hkg6k.js → chunk-x474ybns.js} +79 -110
  352. package/dist/chunk-x67cvhb8.js +134 -0
  353. package/dist/chunk-x6r4v44b.js +8 -0
  354. package/dist/{chunk-s0xfxkys.js → chunk-xk9pxqqx.js} +6 -6
  355. package/dist/{chunk-m06q12hg.js → chunk-xkt36p6r.js} +1 -1
  356. package/dist/{chunk-g653q217.js → chunk-xnav6j8h.js} +62 -374
  357. package/dist/chunk-xrjb0zyc.js +146 -0
  358. package/dist/chunk-xv3era3s.js +8 -0
  359. package/dist/{chunk-p7g7pf3f.js → chunk-y3r7v9pq.js} +4 -4
  360. package/dist/{chunk-3sagmdbp.js → chunk-y4szkj7r.js} +80 -64
  361. package/dist/{chunk-7d2700y8.js → chunk-y8syxjw1.js} +24 -54
  362. package/dist/chunk-y98z50mm.js +158 -0
  363. package/dist/chunk-ycrfxq10.js +123 -0
  364. package/dist/{chunk-8440dz44.js → chunk-yfjzdc0q.js} +9 -9
  365. package/dist/{chunk-cejskpky.js → chunk-ygf7pmmr.js} +145 -153
  366. package/dist/chunk-yha3z3ab.js +259 -0
  367. package/dist/chunk-ym5r3jnk.js +2007 -0
  368. package/dist/{chunk-28r6z9br.js → chunk-ys2gtqb0.js} +1 -3
  369. package/dist/{chunk-rzgtgtaf.js → chunk-ytg2n0dd.js} +7 -7
  370. package/dist/{chunk-q5hb65kq.js → chunk-ytzw9kw1.js} +78 -62
  371. package/dist/chunk-yzx3mhfd.js +110 -0
  372. package/dist/chunk-z1bs6d7k.js +24 -0
  373. package/dist/{chunk-6h9zcxaa.js → chunk-z1mvcq39.js} +4 -4
  374. package/dist/{chunk-gbq6jz9a.js → chunk-z3qhctbk.js} +134 -170
  375. package/dist/chunk-z9jn3442.js +146 -0
  376. package/dist/{chunk-5q7c8vt9.js → chunk-zbsz51qa.js} +41 -32
  377. package/dist/{chunk-n1erf6kh.js → chunk-ze6zvkg6.js} +5 -5
  378. package/dist/{chunk-t0rgmccj.js → chunk-zejm280k.js} +1 -1
  379. package/dist/{chunk-gfkppe34.js → chunk-zf47p99b.js} +10 -10
  380. package/dist/{chunk-53nbpp47.js → chunk-zhtrjznv.js} +557 -1502
  381. package/dist/{chunk-das977za.js → chunk-zq6tz1zv.js} +61 -100
  382. package/dist/chunk-zrw9gm80.js +264 -0
  383. package/dist/chunk-zseb1639.js +37 -0
  384. package/dist/{chunk-spqaamnc.js → chunk-zsgha506.js} +2 -2
  385. package/dist/chunk-zst7b4sp.js +2840 -0
  386. package/dist/{chunk-0xn1zr3e.js → chunk-zxkzzpgd.js} +145 -121
  387. package/dist/{chunk-g3t0act8.js → chunk-zzm33q8x.js} +1 -1
  388. package/dist/cli.js +20 -117
  389. package/dist/download-ripgrep.js +24821 -0
  390. package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
  391. package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
  392. package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
  393. package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
  394. package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
  395. package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
  396. package/package.json +22 -14
  397. package/scripts/download-ripgrep.ts +335 -0
  398. package/scripts/postinstall.cjs +319 -0
  399. package/dist/chunk-0gemty6d.js +0 -70
  400. package/dist/chunk-0pjw8y9z.js +0 -2833
  401. package/dist/chunk-1c8z1b5v.js +0 -16
  402. package/dist/chunk-1ebedmba.js +0 -90
  403. package/dist/chunk-1rvz0433.js +0 -722
  404. package/dist/chunk-1wfb8e3m.js +0 -107
  405. package/dist/chunk-2qjywwq4.js +0 -3445
  406. package/dist/chunk-2y659zbj.js +0 -103
  407. package/dist/chunk-41md7gny.js +0 -91
  408. package/dist/chunk-45m062tx.js +0 -2058
  409. package/dist/chunk-4br37gsw.js +0 -107
  410. package/dist/chunk-4nfrc6sq.js +0 -2431
  411. package/dist/chunk-4pdedeb4.js +0 -2644
  412. package/dist/chunk-4wzyhqbt.js +0 -444
  413. package/dist/chunk-4zsw4fhp.js +0 -67
  414. package/dist/chunk-52wv09zw.js +0 -102
  415. package/dist/chunk-55sfqnz4.js +0 -1921
  416. package/dist/chunk-5cd9cptq.js +0 -110
  417. package/dist/chunk-5dbk24zg.js +0 -890
  418. package/dist/chunk-5tfppbkq.js +0 -55
  419. package/dist/chunk-60xyrp86.js +0 -117
  420. package/dist/chunk-6deqb0mc.js +0 -376
  421. package/dist/chunk-6kpbgc5w.js +0 -23
  422. package/dist/chunk-6ndpfxcn.js +0 -222
  423. package/dist/chunk-7nvpa5ex.js +0 -123
  424. package/dist/chunk-7va8tw32.js +0 -128
  425. package/dist/chunk-7z3tkgec.js +0 -66
  426. package/dist/chunk-8e8set87.js +0 -281
  427. package/dist/chunk-8fg1egbv.js +0 -107
  428. package/dist/chunk-8thd6sgk.js +0 -106
  429. package/dist/chunk-8ytkb7k9.js +0 -84
  430. package/dist/chunk-9s5nkgsg.js +0 -699
  431. package/dist/chunk-9wce9hrc.js +0 -1015
  432. package/dist/chunk-9y91z69v.js +0 -44
  433. package/dist/chunk-ae76ded0.js +0 -30
  434. package/dist/chunk-b0eez8w0.js +0 -169
  435. package/dist/chunk-b57sb1dw.js +0 -642
  436. package/dist/chunk-bg3mt9bm.js +0 -28
  437. package/dist/chunk-bhdt6k7w.js +0 -15
  438. package/dist/chunk-bm1qb16p.js +0 -17
  439. package/dist/chunk-bsbmmfyt.js +0 -17
  440. package/dist/chunk-c7q12yes.js +0 -269
  441. package/dist/chunk-cv6y320h.js +0 -299
  442. package/dist/chunk-cvy3vntc.js +0 -65
  443. package/dist/chunk-cy2hswr1.js +0 -15
  444. package/dist/chunk-d5d398m4.js +0 -184
  445. package/dist/chunk-d7q4zp2z.js +0 -89
  446. package/dist/chunk-dnk519qv.js +0 -94
  447. package/dist/chunk-dqqde43e.js +0 -93
  448. package/dist/chunk-dy4ayw0p.js +0 -522
  449. package/dist/chunk-e4ak3jfc.js +0 -1154
  450. package/dist/chunk-e64spn53.js +0 -283
  451. package/dist/chunk-e8pk14j0.js +0 -527
  452. package/dist/chunk-eashsrsv.js +0 -88
  453. package/dist/chunk-eb90vwvr.js +0 -152
  454. package/dist/chunk-ese2g7hc.js +0 -92
  455. package/dist/chunk-et4jnyb5.js +0 -713
  456. package/dist/chunk-fdy0651p.js +0 -212
  457. package/dist/chunk-frsyts9j.js +0 -1170
  458. package/dist/chunk-ft2jssz4.js +0 -424
  459. package/dist/chunk-g41hzcy2.js +0 -101
  460. package/dist/chunk-g8dr8vvj.js +0 -111
  461. package/dist/chunk-gj71pd83.js +0 -5395
  462. package/dist/chunk-gjdwtdch.js +0 -154
  463. package/dist/chunk-gyj242zr.js +0 -20
  464. package/dist/chunk-hr719wjg.js +0 -144
  465. package/dist/chunk-hs8ph4p8.js +0 -8
  466. package/dist/chunk-j7gpr82p.js +0 -105
  467. package/dist/chunk-jczedp5x.js +0 -91
  468. package/dist/chunk-jd0t67a6.js +0 -259
  469. package/dist/chunk-jgyp3mzg.js +0 -1318
  470. package/dist/chunk-jq1kp9yy.js +0 -90
  471. package/dist/chunk-jskhn7bz.js +0 -71
  472. package/dist/chunk-k5aas9d3.js +0 -6108
  473. package/dist/chunk-k8jcy7mj.js +0 -48
  474. package/dist/chunk-ka22ccvm.js +0 -1581
  475. package/dist/chunk-ka6jav10.js +0 -91
  476. package/dist/chunk-kq6j096k.js +0 -538
  477. package/dist/chunk-kqd0e3xj.js +0 -463
  478. package/dist/chunk-kqjrsah4.js +0 -85
  479. package/dist/chunk-m390jta5.js +0 -114
  480. package/dist/chunk-m44a9yfj.js +0 -90
  481. package/dist/chunk-m5c8ng6v.js +0 -328
  482. package/dist/chunk-meag7bbe.js +0 -89
  483. package/dist/chunk-mnsrmwn8.js +0 -604
  484. package/dist/chunk-mzj4mtye.js +0 -115
  485. package/dist/chunk-mzy911jq.js +0 -128
  486. package/dist/chunk-n0fwapk6.js +0 -347
  487. package/dist/chunk-nt0mgsh6.js +0 -496
  488. package/dist/chunk-nwcfrws3.js +0 -273
  489. package/dist/chunk-pa2xksyb.js +0 -57
  490. package/dist/chunk-pnhs96g8.js +0 -140
  491. package/dist/chunk-ps4c75j7.js +0 -105
  492. package/dist/chunk-q0yg73za.js +0 -490
  493. package/dist/chunk-q5by3da6.js +0 -8
  494. package/dist/chunk-qbmhde47.js +0 -92
  495. package/dist/chunk-qp3dw7b4.js +0 -100
  496. package/dist/chunk-qt0b9x2w.js +0 -42
  497. package/dist/chunk-qxe98jgk.js +0 -584
  498. package/dist/chunk-r7n42k56.js +0 -756
  499. package/dist/chunk-radsjrmv.js +0 -55
  500. package/dist/chunk-rckj9gd1.js +0 -55
  501. package/dist/chunk-rn4kqfvd.js +0 -99
  502. package/dist/chunk-rngmdt2v.js +0 -97
  503. package/dist/chunk-rs5e0520.js +0 -87
  504. package/dist/chunk-s274nv8k.js +0 -8
  505. package/dist/chunk-s7t2e2tw.js +0 -1493
  506. package/dist/chunk-sbbt0ct3.js +0 -90
  507. package/dist/chunk-t0mnk0qp.js +0 -105
  508. package/dist/chunk-t1qmy36p.js +0 -94
  509. package/dist/chunk-tdy66rf9.js +0 -116
  510. package/dist/chunk-tf40vqky.js +0 -70
  511. package/dist/chunk-tmcxeatp.js +0 -116
  512. package/dist/chunk-v3gm2day.js +0 -8
  513. package/dist/chunk-v496te8v.js +0 -192
  514. package/dist/chunk-vd2hwk8d.js +0 -61
  515. package/dist/chunk-vdsmt7v0.js +0 -998
  516. package/dist/chunk-vf3qxte3.js +0 -93
  517. package/dist/chunk-vfqe1jqj.js +0 -643
  518. package/dist/chunk-vk3270s6.js +0 -119
  519. package/dist/chunk-vsr9mbnq.js +0 -195
  520. package/dist/chunk-w18zryr9.js +0 -348
  521. package/dist/chunk-wdxcgk6m.js +0 -196
  522. package/dist/chunk-wef07p3j.js +0 -131
  523. package/dist/chunk-wf4q1xj3.js +0 -62
  524. package/dist/chunk-wjq4zq3t.js +0 -162
  525. package/dist/chunk-wp4hc4n7.js +0 -133
  526. package/dist/chunk-x0rjttct.js +0 -420
  527. package/dist/chunk-xdw5dv00.js +0 -8
  528. package/dist/chunk-xm8fv5c9.js +0 -469
  529. package/dist/chunk-xq5ztz4g.js +0 -130
  530. package/dist/chunk-xvcdtezw.js +0 -401
  531. package/dist/chunk-y7njq3z3.js +0 -1866
  532. package/dist/chunk-ycxwftfh.js +0 -97
  533. package/dist/chunk-yn38f69a.js +0 -105
  534. package/dist/chunk-yp5kc8hq.js +0 -372
  535. package/dist/chunk-z09n2krq.js +0 -752
  536. package/dist/chunk-zerg8qwf.js +0 -96
  537. package/dist/{chunk-p452k1xp.js → chunk-57s5mr32.js} +9 -9
  538. package/dist/{chunk-27xc1csx.js → chunk-dggvswz1.js} +3 -3
  539. package/dist/{chunk-zxzwfa0b.js → chunk-pbyq1tm3.js} +3 -3
@@ -1,2644 +0,0 @@
1
- // @bun
2
- import {
3
- getAutoModeDenials,
4
- init_autoModeDenials
5
- } from "./chunk-0paqc2yw.js";
6
- import {
7
- detectUnreachableRules,
8
- init_shadowedRuleDetection
9
- } from "./chunk-cha1tdry.js";
10
- import {
11
- SearchBox,
12
- init_SearchBox,
13
- init_useSearchInput,
14
- useSearchInput
15
- } from "./chunk-f1rrxxcf.js";
16
- import {
17
- Tab,
18
- Tabs,
19
- init_Tabs,
20
- useTabHeaderFocus,
21
- useTabsWidth
22
- } from "./chunk-yp5kc8hq.js";
23
- import {
24
- StatusIcon,
25
- init_StatusIcon
26
- } from "./chunk-8ytkb7k9.js";
27
- import {
28
- AddWorkspaceDirectory,
29
- init_AddWorkspaceDirectory
30
- } from "./chunk-nt0mgsh6.js";
31
- import"./chunk-w7wgpqcp.js";
32
- import"./chunk-m5c8ng6v.js";
33
- import"./chunk-b0eez8w0.js";
34
- import {
35
- BashTool,
36
- SandboxManager,
37
- Select,
38
- TextInput,
39
- WebFetchTool,
40
- applyPermissionUpdate,
41
- createPermissionRetryMessage,
42
- deletePermissionRule,
43
- getAllowRules,
44
- getAskRules,
45
- getDenyRules,
46
- init_AppState,
47
- init_BashTool,
48
- init_PermissionUpdate,
49
- init_TextInput,
50
- init_WebFetchTool,
51
- init_messages1 as init_messages,
52
- init_permissions,
53
- init_sandbox_adapter,
54
- init_select,
55
- permissionRuleSourceDisplayString,
56
- persistPermissionUpdate,
57
- useAppState,
58
- useSetAppState
59
- } from "./chunk-5frcqxsv.js";
60
- import"./chunk-t0rgmccj.js";
61
- import"./chunk-gb2q3nvc.js";
62
- import"./chunk-neh2frnn.js";
63
- import"./chunk-q6b51yc5.js";
64
- import"./chunk-gfkppe34.js";
65
- import {
66
- Dialog,
67
- init_Dialog
68
- } from "./chunk-kqd0e3xj.js";
69
- import"./chunk-ehtwnxpg.js";
70
- import"./chunk-3be7ka25.js";
71
- import"./chunk-xe6z85xc.js";
72
- import"./chunk-2gzv8nrw.js";
73
- import"./chunk-cgfdkzhb.js";
74
- import"./chunk-bhdt6k7w.js";
75
- import"./chunk-45kxdsp8.js";
76
- import"./chunk-5dbk24zg.js";
77
- import"./chunk-pxrffn0w.js";
78
- import"./chunk-0nt9md2b.js";
79
- import {
80
- init_useExitOnCtrlCDWithKeybindings,
81
- useExitOnCtrlCDWithKeybindings
82
- } from "./chunk-rn4kqfvd.js";
83
- import"./chunk-9gbamk79.js";
84
- import"./chunk-n8sjmqba.js";
85
- import"./chunk-9e2kqv5g.js";
86
- import {
87
- Pane,
88
- init_Pane,
89
- init_useKeybinding,
90
- init_useTerminalSize,
91
- useKeybinding,
92
- useTerminalSize
93
- } from "./chunk-g653q217.js";
94
- import {
95
- Newline,
96
- ThemedBox_default,
97
- ThemedText,
98
- init_ink,
99
- require_compiler_runtime,
100
- useTerminalFocus,
101
- use_input_default
102
- } from "./chunk-z72st5c8.js";
103
- import"./chunk-7m2nd8da.js";
104
- import"./chunk-ps49ymvj.js";
105
- import {
106
- require_jsx_dev_runtime,
107
- require_react
108
- } from "./chunk-g338npwr.js";
109
- import"./chunk-zk2wsm7d.js";
110
- import"./chunk-35x3tjnr.js";
111
- import"./chunk-m06q12hg.js";
112
- import"./chunk-40b8p5em.js";
113
- import"./chunk-s0xfxkys.js";
114
- import"./chunk-spqaamnc.js";
115
- import"./chunk-4jm600zv.js";
116
- import"./chunk-7sb5axvf.js";
117
- import"./chunk-v9smspw2.js";
118
- import"./chunk-qz2x630m.js";
119
- import {
120
- SOURCES,
121
- getRelativeSettingsFilePathForSource,
122
- init_constants,
123
- init_permissionRuleParser,
124
- init_settings1 as init_settings,
125
- init_source,
126
- init_stringUtils,
127
- permissionRuleValueFromString,
128
- permissionRuleValueToString,
129
- plural,
130
- source_default
131
- } from "./chunk-53nbpp47.js";
132
- import"./chunk-e3g8q4cn.js";
133
- import"./chunk-ctw5jwcd.js";
134
- import"./chunk-fw49pe3p.js";
135
- import"./chunk-0e1xsncc.js";
136
- import"./chunk-vratq94g.js";
137
- import"./chunk-g0j0t6qk.js";
138
- import"./chunk-6kpbgc5w.js";
139
- import"./chunk-3c25bcsw.js";
140
- import"./chunk-tjaqa99q.js";
141
- import"./chunk-55wgxwa9.js";
142
- import"./chunk-w2z5pqd3.js";
143
- import"./chunk-7ymfj7m3.js";
144
- import"./chunk-f5ma3nh5.js";
145
- import"./chunk-v1kzp02e.js";
146
- import"./chunk-p2816w9z.js";
147
- import"./chunk-0vkfrmqm.js";
148
- import"./chunk-0xjaqda8.js";
149
- import"./chunk-1rvz0433.js";
150
- import"./chunk-cdz5yb0r.js";
151
- import"./chunk-f2mhrmww.js";
152
- import"./chunk-7z8j9qfn.js";
153
- import"./chunk-hrzerbfw.js";
154
- import"./chunk-d18z9pna.js";
155
- import"./chunk-qnfx3qtx.js";
156
- import"./chunk-hjhc4cpt.js";
157
- import"./chunk-vyc0rjyx.js";
158
- import {
159
- figures_default,
160
- init_figures
161
- } from "./chunk-hx2tr4ep.js";
162
- import"./chunk-p7g7pf3f.js";
163
- import"./chunk-8tnsngw2.js";
164
- import"./chunk-8bedvdm1.js";
165
- import"./chunk-7wm5s02e.js";
166
- import {
167
- init_slowOperations,
168
- jsonStringify
169
- } from "./chunk-nxsh6de2.js";
170
- import"./chunk-fbv4apne.js";
171
- import"./chunk-3r24h7t6.js";
172
- import {
173
- getOriginalCwd,
174
- init_state
175
- } from "./chunk-qqfa0dqg.js";
176
- import"./chunk-hqmz36b3.js";
177
- import"./chunk-4g3v8y12.js";
178
- import"./chunk-7739pg2c.js";
179
- import"./chunk-xszk7n10.js";
180
- import"./chunk-sdj9b9wh.js";
181
- import {
182
- __esm,
183
- __toESM
184
- } from "./chunk-qp2qdcda.js";
185
-
186
- // src/components/permissions/rules/PermissionRuleDescription.tsx
187
- function PermissionRuleDescription(t0) {
188
- const $ = import_compiler_runtime.c(9);
189
- const {
190
- ruleValue
191
- } = t0;
192
- switch (ruleValue.toolName) {
193
- case BashTool.name: {
194
- if (ruleValue.ruleContent) {
195
- if (ruleValue.ruleContent.endsWith(":*")) {
196
- let t1;
197
- if ($[0] !== ruleValue.ruleContent) {
198
- t1 = ruleValue.ruleContent.slice(0, -2);
199
- $[0] = ruleValue.ruleContent;
200
- $[1] = t1;
201
- } else {
202
- t1 = $[1];
203
- }
204
- let t2;
205
- if ($[2] !== t1) {
206
- t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
207
- dimColor: true,
208
- children: [
209
- "Any Bash command starting with",
210
- " ",
211
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
212
- bold: true,
213
- children: t1
214
- }, undefined, false, undefined, this)
215
- ]
216
- }, undefined, true, undefined, this);
217
- $[2] = t1;
218
- $[3] = t2;
219
- } else {
220
- t2 = $[3];
221
- }
222
- return t2;
223
- } else {
224
- let t1;
225
- if ($[4] !== ruleValue.ruleContent) {
226
- t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
227
- dimColor: true,
228
- children: [
229
- "The Bash command ",
230
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
231
- bold: true,
232
- children: ruleValue.ruleContent
233
- }, undefined, false, undefined, this)
234
- ]
235
- }, undefined, true, undefined, this);
236
- $[4] = ruleValue.ruleContent;
237
- $[5] = t1;
238
- } else {
239
- t1 = $[5];
240
- }
241
- return t1;
242
- }
243
- } else {
244
- let t1;
245
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
246
- t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
247
- dimColor: true,
248
- children: "Any Bash command"
249
- }, undefined, false, undefined, this);
250
- $[6] = t1;
251
- } else {
252
- t1 = $[6];
253
- }
254
- return t1;
255
- }
256
- }
257
- default: {
258
- if (!ruleValue.ruleContent) {
259
- let t1;
260
- if ($[7] !== ruleValue.toolName) {
261
- t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
262
- dimColor: true,
263
- children: [
264
- "Any use of the ",
265
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
266
- bold: true,
267
- children: ruleValue.toolName
268
- }, undefined, false, undefined, this),
269
- " tool"
270
- ]
271
- }, undefined, true, undefined, this);
272
- $[7] = ruleValue.toolName;
273
- $[8] = t1;
274
- } else {
275
- t1 = $[8];
276
- }
277
- return t1;
278
- } else {
279
- return null;
280
- }
281
- }
282
- }
283
- }
284
- var import_compiler_runtime, jsx_dev_runtime;
285
- var init_PermissionRuleDescription = __esm(() => {
286
- init_ink();
287
- init_BashTool();
288
- import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
289
- jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
290
- });
291
-
292
- // src/components/permissions/rules/AddPermissionRules.tsx
293
- function optionForPermissionSaveDestination(saveDestination) {
294
- switch (saveDestination) {
295
- case "localSettings":
296
- return {
297
- label: "Project settings (local)",
298
- description: `Saved in ${getRelativeSettingsFilePathForSource("localSettings")}`,
299
- value: saveDestination
300
- };
301
- case "projectSettings":
302
- return {
303
- label: "Project settings",
304
- description: `Checked in at ${getRelativeSettingsFilePathForSource("projectSettings")}`,
305
- value: saveDestination
306
- };
307
- case "userSettings":
308
- return {
309
- label: "User settings",
310
- description: `Saved in at ~/.claude/settings.json`,
311
- value: saveDestination
312
- };
313
- }
314
- }
315
- function AddPermissionRules(t0) {
316
- const $ = import_compiler_runtime2.c(26);
317
- const {
318
- onAddRules,
319
- onCancel,
320
- ruleValues,
321
- ruleBehavior,
322
- initialContext,
323
- setToolPermissionContext
324
- } = t0;
325
- let t1;
326
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
327
- t1 = SOURCES.map(optionForPermissionSaveDestination);
328
- $[0] = t1;
329
- } else {
330
- t1 = $[0];
331
- }
332
- const allOptions = t1;
333
- let t2;
334
- if ($[1] !== initialContext || $[2] !== onAddRules || $[3] !== onCancel || $[4] !== ruleBehavior || $[5] !== ruleValues || $[6] !== setToolPermissionContext) {
335
- t2 = (selectedValue) => {
336
- if (selectedValue === "cancel") {
337
- onCancel();
338
- return;
339
- } else {
340
- if (SOURCES.includes(selectedValue)) {
341
- const destination = selectedValue;
342
- const updatedContext = applyPermissionUpdate(initialContext, {
343
- type: "addRules",
344
- rules: ruleValues,
345
- behavior: ruleBehavior,
346
- destination
347
- });
348
- persistPermissionUpdate({
349
- type: "addRules",
350
- rules: ruleValues,
351
- behavior: ruleBehavior,
352
- destination
353
- });
354
- setToolPermissionContext(updatedContext);
355
- const rules = ruleValues.map((ruleValue) => ({
356
- ruleValue,
357
- ruleBehavior,
358
- source: destination
359
- }));
360
- const sandboxAutoAllowEnabled = SandboxManager.isSandboxingEnabled() && SandboxManager.isAutoAllowBashIfSandboxedEnabled();
361
- const allUnreachable = detectUnreachableRules(updatedContext, {
362
- sandboxAutoAllowEnabled
363
- });
364
- const newUnreachable = allUnreachable.filter((u) => ruleValues.some((rv) => rv.toolName === u.rule.ruleValue.toolName && rv.ruleContent === u.rule.ruleValue.ruleContent));
365
- onAddRules(rules, newUnreachable.length > 0 ? newUnreachable : undefined);
366
- }
367
- }
368
- };
369
- $[1] = initialContext;
370
- $[2] = onAddRules;
371
- $[3] = onCancel;
372
- $[4] = ruleBehavior;
373
- $[5] = ruleValues;
374
- $[6] = setToolPermissionContext;
375
- $[7] = t2;
376
- } else {
377
- t2 = $[7];
378
- }
379
- const onSelect = t2;
380
- let t3;
381
- if ($[8] !== ruleValues.length) {
382
- t3 = plural(ruleValues.length, "rule");
383
- $[8] = ruleValues.length;
384
- $[9] = t3;
385
- } else {
386
- t3 = $[9];
387
- }
388
- const title = `Add ${ruleBehavior} permission ${t3}`;
389
- let t4;
390
- if ($[10] !== ruleValues) {
391
- t4 = ruleValues.map(_temp);
392
- $[10] = ruleValues;
393
- $[11] = t4;
394
- } else {
395
- t4 = $[11];
396
- }
397
- let t5;
398
- if ($[12] !== t4) {
399
- t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
400
- flexDirection: "column",
401
- paddingX: 2,
402
- children: t4
403
- }, undefined, false, undefined, this);
404
- $[12] = t4;
405
- $[13] = t5;
406
- } else {
407
- t5 = $[13];
408
- }
409
- const t6 = ruleValues.length === 1 ? "Where should this rule be saved?" : "Where should these rules be saved?";
410
- let t7;
411
- if ($[14] !== t6) {
412
- t7 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
413
- children: t6
414
- }, undefined, false, undefined, this);
415
- $[14] = t6;
416
- $[15] = t7;
417
- } else {
418
- t7 = $[15];
419
- }
420
- let t8;
421
- if ($[16] !== onSelect) {
422
- t8 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
423
- options: allOptions,
424
- onChange: onSelect
425
- }, undefined, false, undefined, this);
426
- $[16] = onSelect;
427
- $[17] = t8;
428
- } else {
429
- t8 = $[17];
430
- }
431
- let t9;
432
- if ($[18] !== t7 || $[19] !== t8) {
433
- t9 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
434
- flexDirection: "column",
435
- marginY: 1,
436
- children: [
437
- t7,
438
- t8
439
- ]
440
- }, undefined, true, undefined, this);
441
- $[18] = t7;
442
- $[19] = t8;
443
- $[20] = t9;
444
- } else {
445
- t9 = $[20];
446
- }
447
- let t10;
448
- if ($[21] !== onCancel || $[22] !== t5 || $[23] !== t9 || $[24] !== title) {
449
- t10 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
450
- title,
451
- onCancel,
452
- color: "permission",
453
- children: [
454
- t5,
455
- t9
456
- ]
457
- }, undefined, true, undefined, this);
458
- $[21] = onCancel;
459
- $[22] = t5;
460
- $[23] = t9;
461
- $[24] = title;
462
- $[25] = t10;
463
- } else {
464
- t10 = $[25];
465
- }
466
- return t10;
467
- }
468
- function _temp(ruleValue_0) {
469
- return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
470
- flexDirection: "column",
471
- children: [
472
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
473
- bold: true,
474
- children: permissionRuleValueToString(ruleValue_0)
475
- }, undefined, false, undefined, this),
476
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(PermissionRuleDescription, {
477
- ruleValue: ruleValue_0
478
- }, undefined, false, undefined, this)
479
- ]
480
- }, permissionRuleValueToString(ruleValue_0), true, undefined, this);
481
- }
482
- var import_compiler_runtime2, jsx_dev_runtime2;
483
- var init_AddPermissionRules = __esm(() => {
484
- init_select();
485
- init_ink();
486
- init_PermissionUpdate();
487
- init_permissionRuleParser();
488
- init_shadowedRuleDetection();
489
- init_sandbox_adapter();
490
- init_constants();
491
- init_settings();
492
- init_stringUtils();
493
- init_Dialog();
494
- init_PermissionRuleDescription();
495
- import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
496
- jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
497
- });
498
-
499
- // src/components/permissions/rules/PermissionRuleInput.tsx
500
- function PermissionRuleInput(t0) {
501
- const $ = import_compiler_runtime3.c(24);
502
- const {
503
- onCancel,
504
- onSubmit,
505
- ruleBehavior
506
- } = t0;
507
- const [inputValue, setInputValue] = import_react.useState("");
508
- const [cursorOffset, setCursorOffset] = import_react.useState(0);
509
- const exitState = useExitOnCtrlCDWithKeybindings();
510
- let t1;
511
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
512
- t1 = {
513
- context: "Settings"
514
- };
515
- $[0] = t1;
516
- } else {
517
- t1 = $[0];
518
- }
519
- useKeybinding("confirm:no", onCancel, t1);
520
- const {
521
- columns
522
- } = useTerminalSize();
523
- const textInputColumns = columns - 6;
524
- let t2;
525
- if ($[1] !== onSubmit || $[2] !== ruleBehavior) {
526
- t2 = (value) => {
527
- const trimmedValue = value.trim();
528
- if (trimmedValue.length === 0) {
529
- return;
530
- }
531
- const ruleValue = permissionRuleValueFromString(trimmedValue);
532
- onSubmit(ruleValue, ruleBehavior);
533
- };
534
- $[1] = onSubmit;
535
- $[2] = ruleBehavior;
536
- $[3] = t2;
537
- } else {
538
- t2 = $[3];
539
- }
540
- const handleSubmit = t2;
541
- let t3;
542
- if ($[4] !== ruleBehavior) {
543
- t3 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
544
- bold: true,
545
- color: "permission",
546
- children: [
547
- "Add ",
548
- ruleBehavior,
549
- " permission rule"
550
- ]
551
- }, undefined, true, undefined, this);
552
- $[4] = ruleBehavior;
553
- $[5] = t3;
554
- } else {
555
- t3 = $[5];
556
- }
557
- let t4;
558
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
559
- t4 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Newline, {}, undefined, false, undefined, this);
560
- $[6] = t4;
561
- } else {
562
- t4 = $[6];
563
- }
564
- let t5;
565
- let t6;
566
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
567
- t5 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
568
- bold: true,
569
- children: permissionRuleValueToString({
570
- toolName: WebFetchTool.name
571
- })
572
- }, undefined, false, undefined, this);
573
- t6 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
574
- bold: false,
575
- children: " or "
576
- }, undefined, false, undefined, this);
577
- $[7] = t5;
578
- $[8] = t6;
579
- } else {
580
- t5 = $[7];
581
- t6 = $[8];
582
- }
583
- let t7;
584
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
585
- t7 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
586
- children: [
587
- "Permission rules are a tool name, optionally followed by a specifier in parentheses.",
588
- t4,
589
- "e.g.,",
590
- " ",
591
- t5,
592
- t6,
593
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
594
- bold: true,
595
- children: permissionRuleValueToString({
596
- toolName: BashTool.name,
597
- ruleContent: "ls:*"
598
- })
599
- }, undefined, false, undefined, this)
600
- ]
601
- }, undefined, true, undefined, this);
602
- $[9] = t7;
603
- } else {
604
- t7 = $[9];
605
- }
606
- let t8;
607
- if ($[10] !== cursorOffset || $[11] !== handleSubmit || $[12] !== inputValue || $[13] !== textInputColumns) {
608
- t8 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
609
- flexDirection: "column",
610
- children: [
611
- t7,
612
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
613
- borderDimColor: true,
614
- borderStyle: "round",
615
- marginY: 1,
616
- paddingLeft: 1,
617
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(TextInput, {
618
- showCursor: true,
619
- value: inputValue,
620
- onChange: setInputValue,
621
- onSubmit: handleSubmit,
622
- placeholder: `Enter permission rule${figures_default.ellipsis}`,
623
- columns: textInputColumns,
624
- cursorOffset,
625
- onChangeCursorOffset: setCursorOffset
626
- }, undefined, false, undefined, this)
627
- }, undefined, false, undefined, this)
628
- ]
629
- }, undefined, true, undefined, this);
630
- $[10] = cursorOffset;
631
- $[11] = handleSubmit;
632
- $[12] = inputValue;
633
- $[13] = textInputColumns;
634
- $[14] = t8;
635
- } else {
636
- t8 = $[14];
637
- }
638
- let t9;
639
- if ($[15] !== t3 || $[16] !== t8) {
640
- t9 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
641
- flexDirection: "column",
642
- gap: 1,
643
- borderStyle: "round",
644
- paddingLeft: 1,
645
- paddingRight: 1,
646
- borderColor: "permission",
647
- children: [
648
- t3,
649
- t8
650
- ]
651
- }, undefined, true, undefined, this);
652
- $[15] = t3;
653
- $[16] = t8;
654
- $[17] = t9;
655
- } else {
656
- t9 = $[17];
657
- }
658
- let t10;
659
- if ($[18] !== exitState.keyName || $[19] !== exitState.pending) {
660
- t10 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
661
- marginLeft: 3,
662
- children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
663
- dimColor: true,
664
- children: [
665
- "Press ",
666
- exitState.keyName,
667
- " again to exit"
668
- ]
669
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
670
- dimColor: true,
671
- children: "Enter to submit \xB7 Esc to cancel"
672
- }, undefined, false, undefined, this)
673
- }, undefined, false, undefined, this);
674
- $[18] = exitState.keyName;
675
- $[19] = exitState.pending;
676
- $[20] = t10;
677
- } else {
678
- t10 = $[20];
679
- }
680
- let t11;
681
- if ($[21] !== t10 || $[22] !== t9) {
682
- t11 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
683
- children: [
684
- t9,
685
- t10
686
- ]
687
- }, undefined, true, undefined, this);
688
- $[21] = t10;
689
- $[22] = t9;
690
- $[23] = t11;
691
- } else {
692
- t11 = $[23];
693
- }
694
- return t11;
695
- }
696
- var import_compiler_runtime3, import_react, jsx_dev_runtime3;
697
- var init_PermissionRuleInput = __esm(() => {
698
- init_figures();
699
- init_TextInput();
700
- init_useExitOnCtrlCDWithKeybindings();
701
- init_useTerminalSize();
702
- init_ink();
703
- init_useKeybinding();
704
- init_BashTool();
705
- init_WebFetchTool();
706
- init_permissionRuleParser();
707
- import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
708
- import_react = __toESM(require_react(), 1);
709
- jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
710
- });
711
-
712
- // src/components/permissions/rules/RecentDenialsTab.tsx
713
- function RecentDenialsTab(t0) {
714
- const $ = import_compiler_runtime4.c(30);
715
- const {
716
- onHeaderFocusChange,
717
- onStateChange
718
- } = t0;
719
- const {
720
- headerFocused,
721
- focusHeader
722
- } = useTabHeaderFocus();
723
- let t1;
724
- let t2;
725
- if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
726
- t1 = () => {
727
- onHeaderFocusChange?.(headerFocused);
728
- };
729
- t2 = [headerFocused, onHeaderFocusChange];
730
- $[0] = headerFocused;
731
- $[1] = onHeaderFocusChange;
732
- $[2] = t1;
733
- $[3] = t2;
734
- } else {
735
- t1 = $[2];
736
- t2 = $[3];
737
- }
738
- import_react2.useEffect(t1, t2);
739
- const [denials] = import_react2.useState(_temp4);
740
- const [approved, setApproved] = import_react2.useState(_temp2);
741
- const [retry, setRetry] = import_react2.useState(_temp3);
742
- const [focusedIdx, setFocusedIdx] = import_react2.useState(0);
743
- let t3;
744
- let t4;
745
- if ($[4] !== approved || $[5] !== denials || $[6] !== onStateChange || $[7] !== retry) {
746
- t3 = () => {
747
- onStateChange({
748
- approved,
749
- retry,
750
- denials
751
- });
752
- };
753
- t4 = [approved, retry, denials, onStateChange];
754
- $[4] = approved;
755
- $[5] = denials;
756
- $[6] = onStateChange;
757
- $[7] = retry;
758
- $[8] = t3;
759
- $[9] = t4;
760
- } else {
761
- t3 = $[8];
762
- t4 = $[9];
763
- }
764
- import_react2.useEffect(t3, t4);
765
- let t5;
766
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
767
- t5 = (value) => {
768
- const idx = Number(value);
769
- setApproved((prev) => {
770
- const next = new Set(prev);
771
- if (next.has(idx)) {
772
- next.delete(idx);
773
- } else {
774
- next.add(idx);
775
- }
776
- return next;
777
- });
778
- };
779
- $[10] = t5;
780
- } else {
781
- t5 = $[10];
782
- }
783
- const handleSelect = t5;
784
- let t6;
785
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
786
- t6 = (value_0) => {
787
- setFocusedIdx(Number(value_0));
788
- };
789
- $[11] = t6;
790
- } else {
791
- t6 = $[11];
792
- }
793
- const handleFocus = t6;
794
- let t7;
795
- if ($[12] !== focusedIdx) {
796
- t7 = (input, _key) => {
797
- if (input === "r") {
798
- setRetry((prev_0) => {
799
- const next_0 = new Set(prev_0);
800
- if (next_0.has(focusedIdx)) {
801
- next_0.delete(focusedIdx);
802
- } else {
803
- next_0.add(focusedIdx);
804
- }
805
- return next_0;
806
- });
807
- setApproved((prev_1) => {
808
- if (prev_1.has(focusedIdx)) {
809
- return prev_1;
810
- }
811
- const next_1 = new Set(prev_1);
812
- next_1.add(focusedIdx);
813
- return next_1;
814
- });
815
- }
816
- };
817
- $[12] = focusedIdx;
818
- $[13] = t7;
819
- } else {
820
- t7 = $[13];
821
- }
822
- const t8 = denials.length > 0;
823
- let t9;
824
- if ($[14] !== t8) {
825
- t9 = {
826
- isActive: t8
827
- };
828
- $[14] = t8;
829
- $[15] = t9;
830
- } else {
831
- t9 = $[15];
832
- }
833
- use_input_default(t7, t9);
834
- if (denials.length === 0) {
835
- let t102;
836
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
837
- t102 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
838
- dimColor: true,
839
- children: "No recent denials. Commands denied by the auto mode classifier will appear here."
840
- }, undefined, false, undefined, this);
841
- $[16] = t102;
842
- } else {
843
- t102 = $[16];
844
- }
845
- return t102;
846
- }
847
- let t10;
848
- if ($[17] !== approved || $[18] !== denials || $[19] !== retry) {
849
- let t112;
850
- if ($[21] !== approved || $[22] !== retry) {
851
- t112 = (d, idx_0) => {
852
- const isApproved = approved.has(idx_0);
853
- const suffix = retry.has(idx_0) ? " (retry)" : "";
854
- return {
855
- label: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
856
- children: [
857
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(StatusIcon, {
858
- status: isApproved ? "success" : "error",
859
- withSpace: true
860
- }, undefined, false, undefined, this),
861
- d.display,
862
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
863
- dimColor: true,
864
- children: suffix
865
- }, undefined, false, undefined, this)
866
- ]
867
- }, undefined, true, undefined, this),
868
- value: String(idx_0)
869
- };
870
- };
871
- $[21] = approved;
872
- $[22] = retry;
873
- $[23] = t112;
874
- } else {
875
- t112 = $[23];
876
- }
877
- t10 = denials.map(t112);
878
- $[17] = approved;
879
- $[18] = denials;
880
- $[19] = retry;
881
- $[20] = t10;
882
- } else {
883
- t10 = $[20];
884
- }
885
- const options = t10;
886
- let t11;
887
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
888
- t11 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
889
- children: "Commands recently denied by the auto mode classifier."
890
- }, undefined, false, undefined, this);
891
- $[24] = t11;
892
- } else {
893
- t11 = $[24];
894
- }
895
- const t12 = Math.min(10, options.length);
896
- let t13;
897
- if ($[25] !== focusHeader || $[26] !== headerFocused || $[27] !== options || $[28] !== t12) {
898
- t13 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
899
- flexDirection: "column",
900
- children: [
901
- t11,
902
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
903
- marginTop: 1,
904
- children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Select, {
905
- options,
906
- onChange: handleSelect,
907
- onFocus: handleFocus,
908
- visibleOptionCount: t12,
909
- isDisabled: headerFocused,
910
- onUpFromFirstItem: focusHeader
911
- }, undefined, false, undefined, this)
912
- }, undefined, false, undefined, this)
913
- ]
914
- }, undefined, true, undefined, this);
915
- $[25] = focusHeader;
916
- $[26] = headerFocused;
917
- $[27] = options;
918
- $[28] = t12;
919
- $[29] = t13;
920
- } else {
921
- t13 = $[29];
922
- }
923
- return t13;
924
- }
925
- function _temp3() {
926
- return new Set;
927
- }
928
- function _temp2() {
929
- return new Set;
930
- }
931
- function _temp4() {
932
- return getAutoModeDenials();
933
- }
934
- var import_compiler_runtime4, import_react2, jsx_dev_runtime4;
935
- var init_RecentDenialsTab = __esm(() => {
936
- init_ink();
937
- init_autoModeDenials();
938
- init_select();
939
- init_StatusIcon();
940
- init_Tabs();
941
- import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
942
- import_react2 = __toESM(require_react(), 1);
943
- jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
944
- });
945
-
946
- // src/components/permissions/rules/RemoveWorkspaceDirectory.tsx
947
- function RemoveWorkspaceDirectory(t0) {
948
- const $ = import_compiler_runtime5.c(19);
949
- const {
950
- directoryPath,
951
- onRemove,
952
- onCancel,
953
- permissionContext,
954
- setPermissionContext
955
- } = t0;
956
- let t1;
957
- if ($[0] !== directoryPath || $[1] !== onRemove || $[2] !== permissionContext || $[3] !== setPermissionContext) {
958
- t1 = () => {
959
- const updatedContext = applyPermissionUpdate(permissionContext, {
960
- type: "removeDirectories",
961
- directories: [directoryPath],
962
- destination: "session"
963
- });
964
- setPermissionContext(updatedContext);
965
- onRemove();
966
- };
967
- $[0] = directoryPath;
968
- $[1] = onRemove;
969
- $[2] = permissionContext;
970
- $[3] = setPermissionContext;
971
- $[4] = t1;
972
- } else {
973
- t1 = $[4];
974
- }
975
- const handleRemove = t1;
976
- let t2;
977
- if ($[5] !== handleRemove || $[6] !== onCancel) {
978
- t2 = (value) => {
979
- if (value === "yes") {
980
- handleRemove();
981
- } else {
982
- onCancel();
983
- }
984
- };
985
- $[5] = handleRemove;
986
- $[6] = onCancel;
987
- $[7] = t2;
988
- } else {
989
- t2 = $[7];
990
- }
991
- const handleSelect = t2;
992
- let t3;
993
- if ($[8] !== directoryPath) {
994
- t3 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
995
- marginX: 2,
996
- flexDirection: "column",
997
- children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
998
- bold: true,
999
- children: directoryPath
1000
- }, undefined, false, undefined, this)
1001
- }, undefined, false, undefined, this);
1002
- $[8] = directoryPath;
1003
- $[9] = t3;
1004
- } else {
1005
- t3 = $[9];
1006
- }
1007
- let t4;
1008
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1009
- t4 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1010
- children: "Claude Code will no longer have access to files in this directory."
1011
- }, undefined, false, undefined, this);
1012
- $[10] = t4;
1013
- } else {
1014
- t4 = $[10];
1015
- }
1016
- let t5;
1017
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
1018
- t5 = [{
1019
- label: "Yes",
1020
- value: "yes"
1021
- }, {
1022
- label: "No",
1023
- value: "no"
1024
- }];
1025
- $[11] = t5;
1026
- } else {
1027
- t5 = $[11];
1028
- }
1029
- let t6;
1030
- if ($[12] !== handleSelect || $[13] !== onCancel) {
1031
- t6 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
1032
- onChange: handleSelect,
1033
- onCancel,
1034
- options: t5
1035
- }, undefined, false, undefined, this);
1036
- $[12] = handleSelect;
1037
- $[13] = onCancel;
1038
- $[14] = t6;
1039
- } else {
1040
- t6 = $[14];
1041
- }
1042
- let t7;
1043
- if ($[15] !== onCancel || $[16] !== t3 || $[17] !== t6) {
1044
- t7 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
1045
- title: "Remove directory from workspace?",
1046
- onCancel,
1047
- color: "error",
1048
- children: [
1049
- t3,
1050
- t4,
1051
- t6
1052
- ]
1053
- }, undefined, true, undefined, this);
1054
- $[15] = onCancel;
1055
- $[16] = t3;
1056
- $[17] = t6;
1057
- $[18] = t7;
1058
- } else {
1059
- t7 = $[18];
1060
- }
1061
- return t7;
1062
- }
1063
- var import_compiler_runtime5, jsx_dev_runtime5;
1064
- var init_RemoveWorkspaceDirectory = __esm(() => {
1065
- init_select();
1066
- init_ink();
1067
- init_PermissionUpdate();
1068
- init_Dialog();
1069
- import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
1070
- jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
1071
- });
1072
-
1073
- // src/components/permissions/rules/WorkspaceTab.tsx
1074
- function WorkspaceTab(t0) {
1075
- const $ = import_compiler_runtime6.c(23);
1076
- const {
1077
- onExit,
1078
- toolPermissionContext,
1079
- onRequestAddDirectory,
1080
- onRequestRemoveDirectory,
1081
- onHeaderFocusChange
1082
- } = t0;
1083
- const {
1084
- headerFocused,
1085
- focusHeader
1086
- } = useTabHeaderFocus();
1087
- let t1;
1088
- let t2;
1089
- if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
1090
- t1 = () => {
1091
- onHeaderFocusChange?.(headerFocused);
1092
- };
1093
- t2 = [headerFocused, onHeaderFocusChange];
1094
- $[0] = headerFocused;
1095
- $[1] = onHeaderFocusChange;
1096
- $[2] = t1;
1097
- $[3] = t2;
1098
- } else {
1099
- t1 = $[2];
1100
- t2 = $[3];
1101
- }
1102
- import_react3.useEffect(t1, t2);
1103
- let t3;
1104
- if ($[4] !== toolPermissionContext.additionalWorkingDirectories) {
1105
- t3 = Array.from(toolPermissionContext.additionalWorkingDirectories.keys()).map(_temp6);
1106
- $[4] = toolPermissionContext.additionalWorkingDirectories;
1107
- $[5] = t3;
1108
- } else {
1109
- t3 = $[5];
1110
- }
1111
- const additionalDirectories = t3;
1112
- let t4;
1113
- if ($[6] !== additionalDirectories || $[7] !== onRequestAddDirectory || $[8] !== onRequestRemoveDirectory) {
1114
- t4 = (selectedValue) => {
1115
- if (selectedValue === "add-directory") {
1116
- onRequestAddDirectory();
1117
- return;
1118
- }
1119
- const directory = additionalDirectories.find((d) => d.path === selectedValue);
1120
- if (directory && directory.isDeletable) {
1121
- onRequestRemoveDirectory(directory.path);
1122
- }
1123
- };
1124
- $[6] = additionalDirectories;
1125
- $[7] = onRequestAddDirectory;
1126
- $[8] = onRequestRemoveDirectory;
1127
- $[9] = t4;
1128
- } else {
1129
- t4 = $[9];
1130
- }
1131
- const handleDirectorySelect = t4;
1132
- let t5;
1133
- if ($[10] !== onExit) {
1134
- t5 = () => onExit("Workspace dialog dismissed", {
1135
- display: "system"
1136
- });
1137
- $[10] = onExit;
1138
- $[11] = t5;
1139
- } else {
1140
- t5 = $[11];
1141
- }
1142
- const handleCancel = t5;
1143
- let opts;
1144
- if ($[12] !== additionalDirectories) {
1145
- opts = additionalDirectories.map(_temp22);
1146
- let t62;
1147
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
1148
- t62 = {
1149
- label: `Add directory${figures_default.ellipsis}`,
1150
- value: "add-directory"
1151
- };
1152
- $[14] = t62;
1153
- } else {
1154
- t62 = $[14];
1155
- }
1156
- opts.push(t62);
1157
- $[12] = additionalDirectories;
1158
- $[13] = opts;
1159
- } else {
1160
- opts = $[13];
1161
- }
1162
- const options = opts;
1163
- let t6;
1164
- if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1165
- t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1166
- flexDirection: "row",
1167
- marginTop: 1,
1168
- marginLeft: 2,
1169
- gap: 1,
1170
- children: [
1171
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1172
- children: `- ${getOriginalCwd()}`
1173
- }, undefined, false, undefined, this),
1174
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1175
- dimColor: true,
1176
- children: "(Original working directory)"
1177
- }, undefined, false, undefined, this)
1178
- ]
1179
- }, undefined, true, undefined, this);
1180
- $[15] = t6;
1181
- } else {
1182
- t6 = $[15];
1183
- }
1184
- const t7 = Math.min(10, options.length);
1185
- let t8;
1186
- if ($[16] !== focusHeader || $[17] !== handleCancel || $[18] !== handleDirectorySelect || $[19] !== headerFocused || $[20] !== options || $[21] !== t7) {
1187
- t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1188
- flexDirection: "column",
1189
- marginBottom: 1,
1190
- children: [
1191
- t6,
1192
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Select, {
1193
- options,
1194
- onChange: handleDirectorySelect,
1195
- onCancel: handleCancel,
1196
- visibleOptionCount: t7,
1197
- onUpFromFirstItem: focusHeader,
1198
- isDisabled: headerFocused
1199
- }, undefined, false, undefined, this)
1200
- ]
1201
- }, undefined, true, undefined, this);
1202
- $[16] = focusHeader;
1203
- $[17] = handleCancel;
1204
- $[18] = handleDirectorySelect;
1205
- $[19] = headerFocused;
1206
- $[20] = options;
1207
- $[21] = t7;
1208
- $[22] = t8;
1209
- } else {
1210
- t8 = $[22];
1211
- }
1212
- return t8;
1213
- }
1214
- function _temp22(dir) {
1215
- return {
1216
- label: dir.path,
1217
- value: dir.path
1218
- };
1219
- }
1220
- function _temp6(path) {
1221
- return {
1222
- path,
1223
- isCurrent: false,
1224
- isDeletable: true
1225
- };
1226
- }
1227
- var import_compiler_runtime6, import_react3, jsx_dev_runtime6;
1228
- var init_WorkspaceTab = __esm(() => {
1229
- init_figures();
1230
- init_state();
1231
- init_select();
1232
- init_ink();
1233
- init_Tabs();
1234
- import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
1235
- import_react3 = __toESM(require_react(), 1);
1236
- jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
1237
- });
1238
-
1239
- // src/components/permissions/rules/PermissionRuleList.tsx
1240
- function RuleSourceText(t0) {
1241
- const $ = import_compiler_runtime7.c(4);
1242
- const {
1243
- rule
1244
- } = t0;
1245
- let t1;
1246
- if ($[0] !== rule.source) {
1247
- t1 = permissionRuleSourceDisplayString(rule.source);
1248
- $[0] = rule.source;
1249
- $[1] = t1;
1250
- } else {
1251
- t1 = $[1];
1252
- }
1253
- const t2 = `From ${t1}`;
1254
- let t3;
1255
- if ($[2] !== t2) {
1256
- t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1257
- dimColor: true,
1258
- children: t2
1259
- }, undefined, false, undefined, this);
1260
- $[2] = t2;
1261
- $[3] = t3;
1262
- } else {
1263
- t3 = $[3];
1264
- }
1265
- return t3;
1266
- }
1267
- function getRuleBehaviorLabel(ruleBehavior) {
1268
- switch (ruleBehavior) {
1269
- case "allow":
1270
- return "allowed";
1271
- case "deny":
1272
- return "denied";
1273
- case "ask":
1274
- return "ask";
1275
- }
1276
- }
1277
- function RuleDetails(t0) {
1278
- const $ = import_compiler_runtime7.c(42);
1279
- const {
1280
- rule,
1281
- onDelete,
1282
- onCancel
1283
- } = t0;
1284
- const exitState = useExitOnCtrlCDWithKeybindings();
1285
- let t1;
1286
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1287
- t1 = {
1288
- context: "Confirmation"
1289
- };
1290
- $[0] = t1;
1291
- } else {
1292
- t1 = $[0];
1293
- }
1294
- useKeybinding("confirm:no", onCancel, t1);
1295
- let t2;
1296
- if ($[1] !== rule.ruleValue) {
1297
- t2 = permissionRuleValueToString(rule.ruleValue);
1298
- $[1] = rule.ruleValue;
1299
- $[2] = t2;
1300
- } else {
1301
- t2 = $[2];
1302
- }
1303
- let t3;
1304
- if ($[3] !== t2) {
1305
- t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1306
- bold: true,
1307
- children: t2
1308
- }, undefined, false, undefined, this);
1309
- $[3] = t2;
1310
- $[4] = t3;
1311
- } else {
1312
- t3 = $[4];
1313
- }
1314
- let t4;
1315
- if ($[5] !== rule.ruleValue) {
1316
- t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleDescription, {
1317
- ruleValue: rule.ruleValue
1318
- }, undefined, false, undefined, this);
1319
- $[5] = rule.ruleValue;
1320
- $[6] = t4;
1321
- } else {
1322
- t4 = $[6];
1323
- }
1324
- let t5;
1325
- if ($[7] !== rule) {
1326
- t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleSourceText, {
1327
- rule
1328
- }, undefined, false, undefined, this);
1329
- $[7] = rule;
1330
- $[8] = t5;
1331
- } else {
1332
- t5 = $[8];
1333
- }
1334
- let t6;
1335
- if ($[9] !== t3 || $[10] !== t4 || $[11] !== t5) {
1336
- t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1337
- flexDirection: "column",
1338
- marginX: 2,
1339
- children: [
1340
- t3,
1341
- t4,
1342
- t5
1343
- ]
1344
- }, undefined, true, undefined, this);
1345
- $[9] = t3;
1346
- $[10] = t4;
1347
- $[11] = t5;
1348
- $[12] = t6;
1349
- } else {
1350
- t6 = $[12];
1351
- }
1352
- const ruleDescription = t6;
1353
- let t7;
1354
- if ($[13] !== exitState.keyName || $[14] !== exitState.pending) {
1355
- t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1356
- marginLeft: 3,
1357
- children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1358
- dimColor: true,
1359
- children: [
1360
- "Press ",
1361
- exitState.keyName,
1362
- " again to exit"
1363
- ]
1364
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1365
- dimColor: true,
1366
- children: "Esc to cancel"
1367
- }, undefined, false, undefined, this)
1368
- }, undefined, false, undefined, this);
1369
- $[13] = exitState.keyName;
1370
- $[14] = exitState.pending;
1371
- $[15] = t7;
1372
- } else {
1373
- t7 = $[15];
1374
- }
1375
- const footer = t7;
1376
- if (rule.source === "policySettings") {
1377
- let t82;
1378
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
1379
- t82 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1380
- bold: true,
1381
- color: "permission",
1382
- children: "Rule details"
1383
- }, undefined, false, undefined, this);
1384
- $[16] = t82;
1385
- } else {
1386
- t82 = $[16];
1387
- }
1388
- let t92;
1389
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
1390
- t92 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1391
- italic: true,
1392
- children: [
1393
- "This rule is configured by managed settings and cannot be modified.",
1394
- `
1395
- `,
1396
- "Contact your system administrator for more information."
1397
- ]
1398
- }, undefined, true, undefined, this);
1399
- $[17] = t92;
1400
- } else {
1401
- t92 = $[17];
1402
- }
1403
- let t102;
1404
- if ($[18] !== ruleDescription) {
1405
- t102 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1406
- flexDirection: "column",
1407
- gap: 1,
1408
- borderStyle: "round",
1409
- paddingLeft: 1,
1410
- paddingRight: 1,
1411
- borderColor: "permission",
1412
- children: [
1413
- t82,
1414
- ruleDescription,
1415
- t92
1416
- ]
1417
- }, undefined, true, undefined, this);
1418
- $[18] = ruleDescription;
1419
- $[19] = t102;
1420
- } else {
1421
- t102 = $[19];
1422
- }
1423
- let t112;
1424
- if ($[20] !== footer || $[21] !== t102) {
1425
- t112 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1426
- children: [
1427
- t102,
1428
- footer
1429
- ]
1430
- }, undefined, true, undefined, this);
1431
- $[20] = footer;
1432
- $[21] = t102;
1433
- $[22] = t112;
1434
- } else {
1435
- t112 = $[22];
1436
- }
1437
- return t112;
1438
- }
1439
- let t8;
1440
- if ($[23] !== rule.ruleBehavior) {
1441
- t8 = getRuleBehaviorLabel(rule.ruleBehavior);
1442
- $[23] = rule.ruleBehavior;
1443
- $[24] = t8;
1444
- } else {
1445
- t8 = $[24];
1446
- }
1447
- let t9;
1448
- if ($[25] !== t8) {
1449
- t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1450
- bold: true,
1451
- color: "error",
1452
- children: [
1453
- "Delete ",
1454
- t8,
1455
- " tool?"
1456
- ]
1457
- }, undefined, true, undefined, this);
1458
- $[25] = t8;
1459
- $[26] = t9;
1460
- } else {
1461
- t9 = $[26];
1462
- }
1463
- let t10;
1464
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1465
- t10 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1466
- children: "Are you sure you want to delete this permission rule?"
1467
- }, undefined, false, undefined, this);
1468
- $[27] = t10;
1469
- } else {
1470
- t10 = $[27];
1471
- }
1472
- let t11;
1473
- if ($[28] !== onCancel || $[29] !== onDelete) {
1474
- t11 = (_) => _ === "yes" ? onDelete() : onCancel();
1475
- $[28] = onCancel;
1476
- $[29] = onDelete;
1477
- $[30] = t11;
1478
- } else {
1479
- t11 = $[30];
1480
- }
1481
- let t12;
1482
- if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
1483
- t12 = [{
1484
- label: "Yes",
1485
- value: "yes"
1486
- }, {
1487
- label: "No",
1488
- value: "no"
1489
- }];
1490
- $[31] = t12;
1491
- } else {
1492
- t12 = $[31];
1493
- }
1494
- let t13;
1495
- if ($[32] !== onCancel || $[33] !== t11) {
1496
- t13 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1497
- onChange: t11,
1498
- onCancel,
1499
- options: t12
1500
- }, undefined, false, undefined, this);
1501
- $[32] = onCancel;
1502
- $[33] = t11;
1503
- $[34] = t13;
1504
- } else {
1505
- t13 = $[34];
1506
- }
1507
- let t14;
1508
- if ($[35] !== ruleDescription || $[36] !== t13 || $[37] !== t9) {
1509
- t14 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1510
- flexDirection: "column",
1511
- gap: 1,
1512
- borderStyle: "round",
1513
- paddingLeft: 1,
1514
- paddingRight: 1,
1515
- borderColor: "error",
1516
- children: [
1517
- t9,
1518
- ruleDescription,
1519
- t10,
1520
- t13
1521
- ]
1522
- }, undefined, true, undefined, this);
1523
- $[35] = ruleDescription;
1524
- $[36] = t13;
1525
- $[37] = t9;
1526
- $[38] = t14;
1527
- } else {
1528
- t14 = $[38];
1529
- }
1530
- let t15;
1531
- if ($[39] !== footer || $[40] !== t14) {
1532
- t15 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1533
- children: [
1534
- t14,
1535
- footer
1536
- ]
1537
- }, undefined, true, undefined, this);
1538
- $[39] = footer;
1539
- $[40] = t14;
1540
- $[41] = t15;
1541
- } else {
1542
- t15 = $[41];
1543
- }
1544
- return t15;
1545
- }
1546
- function RulesTabContent(props) {
1547
- const $ = import_compiler_runtime7.c(26);
1548
- const {
1549
- options,
1550
- searchQuery,
1551
- isSearchMode,
1552
- isFocused,
1553
- onSelect,
1554
- onCancel,
1555
- lastFocusedRuleKey,
1556
- cursorOffset,
1557
- onHeaderFocusChange
1558
- } = props;
1559
- const tabWidth = useTabsWidth();
1560
- const {
1561
- headerFocused,
1562
- focusHeader,
1563
- blurHeader
1564
- } = useTabHeaderFocus();
1565
- let t0;
1566
- let t1;
1567
- if ($[0] !== blurHeader || $[1] !== headerFocused || $[2] !== isSearchMode) {
1568
- t0 = () => {
1569
- if (isSearchMode && headerFocused) {
1570
- blurHeader();
1571
- }
1572
- };
1573
- t1 = [isSearchMode, headerFocused, blurHeader];
1574
- $[0] = blurHeader;
1575
- $[1] = headerFocused;
1576
- $[2] = isSearchMode;
1577
- $[3] = t0;
1578
- $[4] = t1;
1579
- } else {
1580
- t0 = $[3];
1581
- t1 = $[4];
1582
- }
1583
- import_react4.useEffect(t0, t1);
1584
- let t2;
1585
- let t3;
1586
- if ($[5] !== headerFocused || $[6] !== onHeaderFocusChange) {
1587
- t2 = () => {
1588
- onHeaderFocusChange?.(headerFocused);
1589
- };
1590
- t3 = [headerFocused, onHeaderFocusChange];
1591
- $[5] = headerFocused;
1592
- $[6] = onHeaderFocusChange;
1593
- $[7] = t2;
1594
- $[8] = t3;
1595
- } else {
1596
- t2 = $[7];
1597
- t3 = $[8];
1598
- }
1599
- import_react4.useEffect(t2, t3);
1600
- const t4 = isSearchMode && !headerFocused;
1601
- let t5;
1602
- if ($[9] !== cursorOffset || $[10] !== isFocused || $[11] !== searchQuery || $[12] !== t4 || $[13] !== tabWidth) {
1603
- t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1604
- marginBottom: 1,
1605
- flexDirection: "column",
1606
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(SearchBox, {
1607
- query: searchQuery,
1608
- isFocused: t4,
1609
- isTerminalFocused: isFocused,
1610
- width: tabWidth,
1611
- cursorOffset
1612
- }, undefined, false, undefined, this)
1613
- }, undefined, false, undefined, this);
1614
- $[9] = cursorOffset;
1615
- $[10] = isFocused;
1616
- $[11] = searchQuery;
1617
- $[12] = t4;
1618
- $[13] = tabWidth;
1619
- $[14] = t5;
1620
- } else {
1621
- t5 = $[14];
1622
- }
1623
- const t6 = Math.min(10, options.length);
1624
- const t7 = isSearchMode || headerFocused;
1625
- let t8;
1626
- if ($[15] !== focusHeader || $[16] !== lastFocusedRuleKey || $[17] !== onCancel || $[18] !== onSelect || $[19] !== options || $[20] !== t6 || $[21] !== t7) {
1627
- t8 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1628
- options,
1629
- onChange: onSelect,
1630
- onCancel,
1631
- visibleOptionCount: t6,
1632
- isDisabled: t7,
1633
- defaultFocusValue: lastFocusedRuleKey,
1634
- onUpFromFirstItem: focusHeader
1635
- }, undefined, false, undefined, this);
1636
- $[15] = focusHeader;
1637
- $[16] = lastFocusedRuleKey;
1638
- $[17] = onCancel;
1639
- $[18] = onSelect;
1640
- $[19] = options;
1641
- $[20] = t6;
1642
- $[21] = t7;
1643
- $[22] = t8;
1644
- } else {
1645
- t8 = $[22];
1646
- }
1647
- let t9;
1648
- if ($[23] !== t5 || $[24] !== t8) {
1649
- t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1650
- flexDirection: "column",
1651
- children: [
1652
- t5,
1653
- t8
1654
- ]
1655
- }, undefined, true, undefined, this);
1656
- $[23] = t5;
1657
- $[24] = t8;
1658
- $[25] = t9;
1659
- } else {
1660
- t9 = $[25];
1661
- }
1662
- return t9;
1663
- }
1664
- function PermissionRulesTab(t0) {
1665
- const $ = import_compiler_runtime7.c(27);
1666
- let T0;
1667
- let T1;
1668
- let handleToolSelect;
1669
- let rulesProps;
1670
- let t1;
1671
- let t2;
1672
- let t3;
1673
- let t4;
1674
- let tab;
1675
- if ($[0] !== t0) {
1676
- const {
1677
- tab: t52,
1678
- getRulesOptions,
1679
- handleToolSelect: t62,
1680
- ...t72
1681
- } = t0;
1682
- tab = t52;
1683
- handleToolSelect = t62;
1684
- rulesProps = t72;
1685
- T1 = ThemedBox_default;
1686
- t2 = "column";
1687
- t3 = tab === "allow" ? 0 : undefined;
1688
- let t8;
1689
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1690
- t8 = {
1691
- allow: "Claude Code won't ask before using allowed tools.",
1692
- ask: "Claude Code will always ask for confirmation before using these tools.",
1693
- deny: "Claude Code will always reject requests to use denied tools."
1694
- };
1695
- $[10] = t8;
1696
- } else {
1697
- t8 = $[10];
1698
- }
1699
- const t9 = t8[tab];
1700
- if ($[11] !== t9) {
1701
- t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1702
- children: t9
1703
- }, undefined, false, undefined, this);
1704
- $[11] = t9;
1705
- $[12] = t4;
1706
- } else {
1707
- t4 = $[12];
1708
- }
1709
- T0 = RulesTabContent;
1710
- t1 = getRulesOptions(tab, rulesProps.searchQuery);
1711
- $[0] = t0;
1712
- $[1] = T0;
1713
- $[2] = T1;
1714
- $[3] = handleToolSelect;
1715
- $[4] = rulesProps;
1716
- $[5] = t1;
1717
- $[6] = t2;
1718
- $[7] = t3;
1719
- $[8] = t4;
1720
- $[9] = tab;
1721
- } else {
1722
- T0 = $[1];
1723
- T1 = $[2];
1724
- handleToolSelect = $[3];
1725
- rulesProps = $[4];
1726
- t1 = $[5];
1727
- t2 = $[6];
1728
- t3 = $[7];
1729
- t4 = $[8];
1730
- tab = $[9];
1731
- }
1732
- let t5;
1733
- if ($[13] !== handleToolSelect || $[14] !== tab) {
1734
- t5 = (v) => handleToolSelect(v, tab);
1735
- $[13] = handleToolSelect;
1736
- $[14] = tab;
1737
- $[15] = t5;
1738
- } else {
1739
- t5 = $[15];
1740
- }
1741
- let t6;
1742
- if ($[16] !== T0 || $[17] !== rulesProps || $[18] !== t1.options || $[19] !== t5) {
1743
- t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T0, {
1744
- options: t1.options,
1745
- onSelect: t5,
1746
- ...rulesProps
1747
- }, undefined, false, undefined, this);
1748
- $[16] = T0;
1749
- $[17] = rulesProps;
1750
- $[18] = t1.options;
1751
- $[19] = t5;
1752
- $[20] = t6;
1753
- } else {
1754
- t6 = $[20];
1755
- }
1756
- let t7;
1757
- if ($[21] !== T1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t6) {
1758
- t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T1, {
1759
- flexDirection: t2,
1760
- flexShrink: t3,
1761
- children: [
1762
- t4,
1763
- t6
1764
- ]
1765
- }, undefined, true, undefined, this);
1766
- $[21] = T1;
1767
- $[22] = t2;
1768
- $[23] = t3;
1769
- $[24] = t4;
1770
- $[25] = t6;
1771
- $[26] = t7;
1772
- } else {
1773
- t7 = $[26];
1774
- }
1775
- return t7;
1776
- }
1777
- function PermissionRuleList(t0) {
1778
- const $ = import_compiler_runtime7.c(113);
1779
- const {
1780
- onExit,
1781
- initialTab,
1782
- onRetryDenials
1783
- } = t0;
1784
- let t1;
1785
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1786
- t1 = getAutoModeDenials();
1787
- $[0] = t1;
1788
- } else {
1789
- t1 = $[0];
1790
- }
1791
- const hasDenials = t1.length > 0;
1792
- const defaultTab = initialTab ?? (hasDenials ? "recent" : "allow");
1793
- let t2;
1794
- if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1795
- t2 = [];
1796
- $[1] = t2;
1797
- } else {
1798
- t2 = $[1];
1799
- }
1800
- const [changes, setChanges] = import_react4.useState(t2);
1801
- const toolPermissionContext = useAppState(_temp7);
1802
- const setAppState = useSetAppState();
1803
- const isTerminalFocused = useTerminalFocus();
1804
- let t3;
1805
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1806
- t3 = {
1807
- approved: new Set,
1808
- retry: new Set,
1809
- denials: []
1810
- };
1811
- $[2] = t3;
1812
- } else {
1813
- t3 = $[2];
1814
- }
1815
- const denialStateRef = import_react4.useRef(t3);
1816
- let t4;
1817
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1818
- t4 = (s_0) => {
1819
- denialStateRef.current = s_0;
1820
- };
1821
- $[3] = t4;
1822
- } else {
1823
- t4 = $[3];
1824
- }
1825
- const handleDenialStateChange = t4;
1826
- const [selectedRule, setSelectedRule] = import_react4.useState();
1827
- const [lastFocusedRuleKey, setLastFocusedRuleKey] = import_react4.useState();
1828
- const [addingRuleToTab, setAddingRuleToTab] = import_react4.useState(null);
1829
- const [validatedRule, setValidatedRule] = import_react4.useState(null);
1830
- const [isAddingWorkspaceDirectory, setIsAddingWorkspaceDirectory] = import_react4.useState(false);
1831
- const [removingDirectory, setRemovingDirectory] = import_react4.useState(null);
1832
- const [isSearchMode, setIsSearchMode] = import_react4.useState(false);
1833
- const [headerFocused, setHeaderFocused] = import_react4.useState(true);
1834
- let t5;
1835
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
1836
- t5 = (focused) => {
1837
- setHeaderFocused(focused);
1838
- };
1839
- $[4] = t5;
1840
- } else {
1841
- t5 = $[4];
1842
- }
1843
- const handleHeaderFocusChange = t5;
1844
- let map;
1845
- if ($[5] !== toolPermissionContext) {
1846
- map = new Map;
1847
- getAllowRules(toolPermissionContext).forEach((rule) => {
1848
- map.set(jsonStringify(rule), rule);
1849
- });
1850
- $[5] = toolPermissionContext;
1851
- $[6] = map;
1852
- } else {
1853
- map = $[6];
1854
- }
1855
- const allowRulesByKey = map;
1856
- let map_0;
1857
- if ($[7] !== toolPermissionContext) {
1858
- map_0 = new Map;
1859
- getDenyRules(toolPermissionContext).forEach((rule_0) => {
1860
- map_0.set(jsonStringify(rule_0), rule_0);
1861
- });
1862
- $[7] = toolPermissionContext;
1863
- $[8] = map_0;
1864
- } else {
1865
- map_0 = $[8];
1866
- }
1867
- const denyRulesByKey = map_0;
1868
- let map_1;
1869
- if ($[9] !== toolPermissionContext) {
1870
- map_1 = new Map;
1871
- getAskRules(toolPermissionContext).forEach((rule_1) => {
1872
- map_1.set(jsonStringify(rule_1), rule_1);
1873
- });
1874
- $[9] = toolPermissionContext;
1875
- $[10] = map_1;
1876
- } else {
1877
- map_1 = $[10];
1878
- }
1879
- const askRulesByKey = map_1;
1880
- let t6;
1881
- if ($[11] !== allowRulesByKey || $[12] !== askRulesByKey || $[13] !== denyRulesByKey) {
1882
- t6 = (tab, t72) => {
1883
- const query = t72 === undefined ? "" : t72;
1884
- const rulesByKey = (() => {
1885
- switch (tab) {
1886
- case "allow": {
1887
- return allowRulesByKey;
1888
- }
1889
- case "deny": {
1890
- return denyRulesByKey;
1891
- }
1892
- case "ask": {
1893
- return askRulesByKey;
1894
- }
1895
- case "workspace":
1896
- case "recent": {
1897
- return new Map;
1898
- }
1899
- }
1900
- })();
1901
- const options = [];
1902
- if (tab !== "workspace" && tab !== "recent" && !query) {
1903
- options.push({
1904
- label: `Add a new rule${figures_default.ellipsis}`,
1905
- value: "add-new-rule"
1906
- });
1907
- }
1908
- const sortedRuleKeys = Array.from(rulesByKey.keys()).sort((a, b) => {
1909
- const ruleA = rulesByKey.get(a);
1910
- const ruleB = rulesByKey.get(b);
1911
- if (ruleA && ruleB) {
1912
- const ruleAString = permissionRuleValueToString(ruleA.ruleValue).toLowerCase();
1913
- const ruleBString = permissionRuleValueToString(ruleB.ruleValue).toLowerCase();
1914
- return ruleAString.localeCompare(ruleBString);
1915
- }
1916
- return 0;
1917
- });
1918
- const lowerQuery = query.toLowerCase();
1919
- for (const ruleKey of sortedRuleKeys) {
1920
- const rule_2 = rulesByKey.get(ruleKey);
1921
- if (rule_2) {
1922
- const ruleString = permissionRuleValueToString(rule_2.ruleValue);
1923
- if (query && !ruleString.toLowerCase().includes(lowerQuery)) {
1924
- continue;
1925
- }
1926
- options.push({
1927
- label: ruleString,
1928
- value: ruleKey
1929
- });
1930
- }
1931
- }
1932
- return {
1933
- options,
1934
- rulesByKey
1935
- };
1936
- };
1937
- $[11] = allowRulesByKey;
1938
- $[12] = askRulesByKey;
1939
- $[13] = denyRulesByKey;
1940
- $[14] = t6;
1941
- } else {
1942
- t6 = $[14];
1943
- }
1944
- const getRulesOptions = t6;
1945
- const exitState = useExitOnCtrlCDWithKeybindings();
1946
- const isSearchModeActive = !selectedRule && !addingRuleToTab && !validatedRule && !isAddingWorkspaceDirectory && !removingDirectory;
1947
- const t7 = isSearchModeActive && isSearchMode;
1948
- let t8;
1949
- if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1950
- t8 = () => {
1951
- setIsSearchMode(false);
1952
- };
1953
- $[15] = t8;
1954
- } else {
1955
- t8 = $[15];
1956
- }
1957
- let t9;
1958
- if ($[16] !== t7) {
1959
- t9 = {
1960
- isActive: t7,
1961
- onExit: t8
1962
- };
1963
- $[16] = t7;
1964
- $[17] = t9;
1965
- } else {
1966
- t9 = $[17];
1967
- }
1968
- const {
1969
- query: searchQuery,
1970
- setQuery: setSearchQuery,
1971
- cursorOffset: searchCursorOffset
1972
- } = useSearchInput(t9);
1973
- let t10;
1974
- if ($[18] !== isSearchMode || $[19] !== isSearchModeActive || $[20] !== setSearchQuery) {
1975
- t10 = (e) => {
1976
- if (!isSearchModeActive) {
1977
- return;
1978
- }
1979
- if (isSearchMode) {
1980
- return;
1981
- }
1982
- if (e.ctrl || e.meta) {
1983
- return;
1984
- }
1985
- if (e.key === "/") {
1986
- e.preventDefault();
1987
- setIsSearchMode(true);
1988
- setSearchQuery("");
1989
- } else {
1990
- if (e.key.length === 1 && e.key !== "j" && e.key !== "k" && e.key !== "m" && e.key !== "i" && e.key !== "r" && e.key !== " ") {
1991
- e.preventDefault();
1992
- setIsSearchMode(true);
1993
- setSearchQuery(e.key);
1994
- }
1995
- }
1996
- };
1997
- $[18] = isSearchMode;
1998
- $[19] = isSearchModeActive;
1999
- $[20] = setSearchQuery;
2000
- $[21] = t10;
2001
- } else {
2002
- t10 = $[21];
2003
- }
2004
- const handleKeyDown = t10;
2005
- let t11;
2006
- if ($[22] !== getRulesOptions) {
2007
- t11 = (selectedValue, tab_0) => {
2008
- const {
2009
- rulesByKey: rulesByKey_0
2010
- } = getRulesOptions(tab_0);
2011
- if (selectedValue === "add-new-rule") {
2012
- setAddingRuleToTab(tab_0);
2013
- return;
2014
- } else {
2015
- setSelectedRule(rulesByKey_0.get(selectedValue));
2016
- return;
2017
- }
2018
- };
2019
- $[22] = getRulesOptions;
2020
- $[23] = t11;
2021
- } else {
2022
- t11 = $[23];
2023
- }
2024
- const handleToolSelect = t11;
2025
- let t12;
2026
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
2027
- t12 = () => {
2028
- setAddingRuleToTab(null);
2029
- };
2030
- $[24] = t12;
2031
- } else {
2032
- t12 = $[24];
2033
- }
2034
- const handleRuleInputCancel = t12;
2035
- let t13;
2036
- if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
2037
- t13 = (ruleValue, ruleBehavior) => {
2038
- setValidatedRule({
2039
- ruleValue,
2040
- ruleBehavior
2041
- });
2042
- setAddingRuleToTab(null);
2043
- };
2044
- $[25] = t13;
2045
- } else {
2046
- t13 = $[25];
2047
- }
2048
- const handleRuleInputSubmit = t13;
2049
- let t14;
2050
- if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
2051
- t14 = (rules, unreachable) => {
2052
- setValidatedRule(null);
2053
- for (const rule_3 of rules) {
2054
- setChanges((prev) => [...prev, `Added ${rule_3.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(rule_3.ruleValue))}`]);
2055
- }
2056
- if (unreachable && unreachable.length > 0) {
2057
- for (const u of unreachable) {
2058
- const severity = u.shadowType === "deny" ? "blocked" : "shadowed";
2059
- setChanges((prev_0) => [...prev_0, source_default.yellow(`${figures_default.warning} Warning: ${permissionRuleValueToString(u.rule.ruleValue)} is ${severity}`), source_default.dim(` ${u.reason}`), source_default.dim(` Fix: ${u.fix}`)]);
2060
- }
2061
- }
2062
- };
2063
- $[26] = t14;
2064
- } else {
2065
- t14 = $[26];
2066
- }
2067
- const handleAddRulesSuccess = t14;
2068
- let t15;
2069
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
2070
- t15 = () => {
2071
- setValidatedRule(null);
2072
- };
2073
- $[27] = t15;
2074
- } else {
2075
- t15 = $[27];
2076
- }
2077
- const handleAddRuleCancel = t15;
2078
- let t16;
2079
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
2080
- t16 = () => setIsAddingWorkspaceDirectory(true);
2081
- $[28] = t16;
2082
- } else {
2083
- t16 = $[28];
2084
- }
2085
- const handleRequestAddDirectory = t16;
2086
- let t17;
2087
- if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
2088
- t17 = (path) => setRemovingDirectory(path);
2089
- $[29] = t17;
2090
- } else {
2091
- t17 = $[29];
2092
- }
2093
- const handleRequestRemoveDirectory = t17;
2094
- let t18;
2095
- if ($[30] !== changes || $[31] !== onExit || $[32] !== onRetryDenials) {
2096
- t18 = () => {
2097
- const s_1 = denialStateRef.current;
2098
- const denialsFor = (set) => Array.from(set).map((idx) => s_1.denials[idx]).filter(_temp23);
2099
- const retryDenials = denialsFor(s_1.retry);
2100
- if (retryDenials.length > 0) {
2101
- const commands = retryDenials.map(_temp32);
2102
- onRetryDenials?.(commands);
2103
- onExit(undefined, {
2104
- shouldQuery: true,
2105
- metaMessages: [`Permission granted for: ${commands.join(", ")}. You may now retry ${commands.length === 1 ? "this command" : "these commands"} if you would like.`]
2106
- });
2107
- return;
2108
- }
2109
- const approvedDenials = denialsFor(s_1.approved);
2110
- if (approvedDenials.length > 0 || changes.length > 0) {
2111
- const approvedMsg = approvedDenials.length > 0 ? [`Approved ${approvedDenials.map(_temp42).join(", ")}`] : [];
2112
- onExit([...approvedMsg, ...changes].join(`
2113
- `));
2114
- } else {
2115
- onExit("Permissions dialog dismissed", {
2116
- display: "system"
2117
- });
2118
- }
2119
- };
2120
- $[30] = changes;
2121
- $[31] = onExit;
2122
- $[32] = onRetryDenials;
2123
- $[33] = t18;
2124
- } else {
2125
- t18 = $[33];
2126
- }
2127
- const handleRulesCancel = t18;
2128
- const t19 = isSearchModeActive && !isSearchMode;
2129
- let t20;
2130
- if ($[34] !== t19) {
2131
- t20 = {
2132
- context: "Settings",
2133
- isActive: t19
2134
- };
2135
- $[34] = t19;
2136
- $[35] = t20;
2137
- } else {
2138
- t20 = $[35];
2139
- }
2140
- useKeybinding("confirm:no", handleRulesCancel, t20);
2141
- let t21;
2142
- if ($[36] !== getRulesOptions || $[37] !== selectedRule || $[38] !== setAppState || $[39] !== toolPermissionContext) {
2143
- t21 = () => {
2144
- if (!selectedRule) {
2145
- return;
2146
- }
2147
- const {
2148
- options: options_0
2149
- } = getRulesOptions(selectedRule.ruleBehavior);
2150
- const selectedKey = jsonStringify(selectedRule);
2151
- const ruleKeys = options_0.filter(_temp5).map(_temp62);
2152
- const currentIndex = ruleKeys.indexOf(selectedKey);
2153
- let nextFocusKey;
2154
- if (currentIndex !== -1) {
2155
- if (currentIndex < ruleKeys.length - 1) {
2156
- nextFocusKey = ruleKeys[currentIndex + 1];
2157
- } else {
2158
- if (currentIndex > 0) {
2159
- nextFocusKey = ruleKeys[currentIndex - 1];
2160
- }
2161
- }
2162
- }
2163
- setLastFocusedRuleKey(nextFocusKey);
2164
- deletePermissionRule({
2165
- rule: selectedRule,
2166
- initialContext: toolPermissionContext,
2167
- setToolPermissionContext(toolPermissionContext_0) {
2168
- setAppState((prev_1) => ({
2169
- ...prev_1,
2170
- toolPermissionContext: toolPermissionContext_0
2171
- }));
2172
- }
2173
- });
2174
- setChanges((prev_2) => [...prev_2, `Deleted ${selectedRule.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(selectedRule.ruleValue))}`]);
2175
- setSelectedRule(undefined);
2176
- };
2177
- $[36] = getRulesOptions;
2178
- $[37] = selectedRule;
2179
- $[38] = setAppState;
2180
- $[39] = toolPermissionContext;
2181
- $[40] = t21;
2182
- } else {
2183
- t21 = $[40];
2184
- }
2185
- const handleDeleteRule = t21;
2186
- if (selectedRule) {
2187
- let t222;
2188
- if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
2189
- t222 = () => setSelectedRule(undefined);
2190
- $[41] = t222;
2191
- } else {
2192
- t222 = $[41];
2193
- }
2194
- let t232;
2195
- if ($[42] !== handleDeleteRule || $[43] !== selectedRule) {
2196
- t232 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleDetails, {
2197
- rule: selectedRule,
2198
- onDelete: handleDeleteRule,
2199
- onCancel: t222
2200
- }, undefined, false, undefined, this);
2201
- $[42] = handleDeleteRule;
2202
- $[43] = selectedRule;
2203
- $[44] = t232;
2204
- } else {
2205
- t232 = $[44];
2206
- }
2207
- return t232;
2208
- }
2209
- if (addingRuleToTab && addingRuleToTab !== "workspace" && addingRuleToTab !== "recent") {
2210
- let t222;
2211
- if ($[45] !== addingRuleToTab) {
2212
- t222 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleInput, {
2213
- onCancel: handleRuleInputCancel,
2214
- onSubmit: handleRuleInputSubmit,
2215
- ruleBehavior: addingRuleToTab
2216
- }, undefined, false, undefined, this);
2217
- $[45] = addingRuleToTab;
2218
- $[46] = t222;
2219
- } else {
2220
- t222 = $[46];
2221
- }
2222
- return t222;
2223
- }
2224
- if (validatedRule) {
2225
- let t222;
2226
- if ($[47] !== validatedRule.ruleValue) {
2227
- t222 = [validatedRule.ruleValue];
2228
- $[47] = validatedRule.ruleValue;
2229
- $[48] = t222;
2230
- } else {
2231
- t222 = $[48];
2232
- }
2233
- let t232;
2234
- if ($[49] !== setAppState) {
2235
- t232 = (toolPermissionContext_1) => {
2236
- setAppState((prev_3) => ({
2237
- ...prev_3,
2238
- toolPermissionContext: toolPermissionContext_1
2239
- }));
2240
- };
2241
- $[49] = setAppState;
2242
- $[50] = t232;
2243
- } else {
2244
- t232 = $[50];
2245
- }
2246
- let t242;
2247
- if ($[51] !== t222 || $[52] !== t232 || $[53] !== toolPermissionContext || $[54] !== validatedRule.ruleBehavior) {
2248
- t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddPermissionRules, {
2249
- onAddRules: handleAddRulesSuccess,
2250
- onCancel: handleAddRuleCancel,
2251
- ruleValues: t222,
2252
- ruleBehavior: validatedRule.ruleBehavior,
2253
- initialContext: toolPermissionContext,
2254
- setToolPermissionContext: t232
2255
- }, undefined, false, undefined, this);
2256
- $[51] = t222;
2257
- $[52] = t232;
2258
- $[53] = toolPermissionContext;
2259
- $[54] = validatedRule.ruleBehavior;
2260
- $[55] = t242;
2261
- } else {
2262
- t242 = $[55];
2263
- }
2264
- return t242;
2265
- }
2266
- if (isAddingWorkspaceDirectory) {
2267
- let t222;
2268
- if ($[56] !== setAppState || $[57] !== toolPermissionContext) {
2269
- t222 = (path_0, remember) => {
2270
- const destination = remember ? "localSettings" : "session";
2271
- const permissionUpdate = {
2272
- type: "addDirectories",
2273
- directories: [path_0],
2274
- destination
2275
- };
2276
- const updatedContext = applyPermissionUpdate(toolPermissionContext, permissionUpdate);
2277
- setAppState((prev_4) => ({
2278
- ...prev_4,
2279
- toolPermissionContext: updatedContext
2280
- }));
2281
- if (remember) {
2282
- persistPermissionUpdate(permissionUpdate);
2283
- }
2284
- setChanges((prev_5) => [...prev_5, `Added directory ${source_default.bold(path_0)} to workspace${remember ? " and saved to local settings" : " for this session"}`]);
2285
- setIsAddingWorkspaceDirectory(false);
2286
- };
2287
- $[56] = setAppState;
2288
- $[57] = toolPermissionContext;
2289
- $[58] = t222;
2290
- } else {
2291
- t222 = $[58];
2292
- }
2293
- let t232;
2294
- if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
2295
- t232 = () => setIsAddingWorkspaceDirectory(false);
2296
- $[59] = t232;
2297
- } else {
2298
- t232 = $[59];
2299
- }
2300
- let t242;
2301
- if ($[60] !== t222 || $[61] !== toolPermissionContext) {
2302
- t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddWorkspaceDirectory, {
2303
- onAddDirectory: t222,
2304
- onCancel: t232,
2305
- permissionContext: toolPermissionContext
2306
- }, undefined, false, undefined, this);
2307
- $[60] = t222;
2308
- $[61] = toolPermissionContext;
2309
- $[62] = t242;
2310
- } else {
2311
- t242 = $[62];
2312
- }
2313
- return t242;
2314
- }
2315
- if (removingDirectory) {
2316
- let t222;
2317
- if ($[63] !== removingDirectory) {
2318
- t222 = () => {
2319
- setChanges((prev_6) => [...prev_6, `Removed directory ${source_default.bold(removingDirectory)} from workspace`]);
2320
- setRemovingDirectory(null);
2321
- };
2322
- $[63] = removingDirectory;
2323
- $[64] = t222;
2324
- } else {
2325
- t222 = $[64];
2326
- }
2327
- let t232;
2328
- if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
2329
- t232 = () => setRemovingDirectory(null);
2330
- $[65] = t232;
2331
- } else {
2332
- t232 = $[65];
2333
- }
2334
- let t242;
2335
- if ($[66] !== setAppState) {
2336
- t242 = (toolPermissionContext_2) => {
2337
- setAppState((prev_7) => ({
2338
- ...prev_7,
2339
- toolPermissionContext: toolPermissionContext_2
2340
- }));
2341
- };
2342
- $[66] = setAppState;
2343
- $[67] = t242;
2344
- } else {
2345
- t242 = $[67];
2346
- }
2347
- let t252;
2348
- if ($[68] !== removingDirectory || $[69] !== t222 || $[70] !== t242 || $[71] !== toolPermissionContext) {
2349
- t252 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RemoveWorkspaceDirectory, {
2350
- directoryPath: removingDirectory,
2351
- onRemove: t222,
2352
- onCancel: t232,
2353
- permissionContext: toolPermissionContext,
2354
- setPermissionContext: t242
2355
- }, undefined, false, undefined, this);
2356
- $[68] = removingDirectory;
2357
- $[69] = t222;
2358
- $[70] = t242;
2359
- $[71] = toolPermissionContext;
2360
- $[72] = t252;
2361
- } else {
2362
- t252 = $[72];
2363
- }
2364
- return t252;
2365
- }
2366
- let t22;
2367
- if ($[73] !== getRulesOptions || $[74] !== handleRulesCancel || $[75] !== handleToolSelect || $[76] !== isSearchMode || $[77] !== isTerminalFocused || $[78] !== lastFocusedRuleKey || $[79] !== searchCursorOffset || $[80] !== searchQuery) {
2368
- t22 = {
2369
- searchQuery,
2370
- isSearchMode,
2371
- isFocused: isTerminalFocused,
2372
- onCancel: handleRulesCancel,
2373
- lastFocusedRuleKey,
2374
- cursorOffset: searchCursorOffset,
2375
- getRulesOptions,
2376
- handleToolSelect,
2377
- onHeaderFocusChange: handleHeaderFocusChange
2378
- };
2379
- $[73] = getRulesOptions;
2380
- $[74] = handleRulesCancel;
2381
- $[75] = handleToolSelect;
2382
- $[76] = isSearchMode;
2383
- $[77] = isTerminalFocused;
2384
- $[78] = lastFocusedRuleKey;
2385
- $[79] = searchCursorOffset;
2386
- $[80] = searchQuery;
2387
- $[81] = t22;
2388
- } else {
2389
- t22 = $[81];
2390
- }
2391
- const sharedRulesProps = t22;
2392
- const isHidden = !!selectedRule || !!addingRuleToTab || !!validatedRule || isAddingWorkspaceDirectory || !!removingDirectory;
2393
- const t23 = !isSearchMode;
2394
- let t24;
2395
- if ($[82] === Symbol.for("react.memo_cache_sentinel")) {
2396
- t24 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2397
- id: "recent",
2398
- title: "Recently denied",
2399
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RecentDenialsTab, {
2400
- onHeaderFocusChange: handleHeaderFocusChange,
2401
- onStateChange: handleDenialStateChange
2402
- }, undefined, false, undefined, this)
2403
- }, undefined, false, undefined, this);
2404
- $[82] = t24;
2405
- } else {
2406
- t24 = $[82];
2407
- }
2408
- let t25;
2409
- if ($[83] !== sharedRulesProps) {
2410
- t25 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2411
- id: "allow",
2412
- title: "Allow",
2413
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2414
- tab: "allow",
2415
- ...sharedRulesProps
2416
- }, undefined, false, undefined, this)
2417
- }, undefined, false, undefined, this);
2418
- $[83] = sharedRulesProps;
2419
- $[84] = t25;
2420
- } else {
2421
- t25 = $[84];
2422
- }
2423
- let t26;
2424
- if ($[85] !== sharedRulesProps) {
2425
- t26 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2426
- id: "ask",
2427
- title: "Ask",
2428
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2429
- tab: "ask",
2430
- ...sharedRulesProps
2431
- }, undefined, false, undefined, this)
2432
- }, undefined, false, undefined, this);
2433
- $[85] = sharedRulesProps;
2434
- $[86] = t26;
2435
- } else {
2436
- t26 = $[86];
2437
- }
2438
- let t27;
2439
- if ($[87] !== sharedRulesProps) {
2440
- t27 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2441
- id: "deny",
2442
- title: "Deny",
2443
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2444
- tab: "deny",
2445
- ...sharedRulesProps
2446
- }, undefined, false, undefined, this)
2447
- }, undefined, false, undefined, this);
2448
- $[87] = sharedRulesProps;
2449
- $[88] = t27;
2450
- } else {
2451
- t27 = $[88];
2452
- }
2453
- let t28;
2454
- if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
2455
- t28 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2456
- children: "Claude Code can read files in the workspace, and make edits when auto-accept edits is on."
2457
- }, undefined, false, undefined, this);
2458
- $[89] = t28;
2459
- } else {
2460
- t28 = $[89];
2461
- }
2462
- let t29;
2463
- if ($[90] !== onExit || $[91] !== toolPermissionContext) {
2464
- t29 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2465
- id: "workspace",
2466
- title: "Workspace",
2467
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2468
- flexDirection: "column",
2469
- children: [
2470
- t28,
2471
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(WorkspaceTab, {
2472
- onExit,
2473
- toolPermissionContext,
2474
- onRequestAddDirectory: handleRequestAddDirectory,
2475
- onRequestRemoveDirectory: handleRequestRemoveDirectory,
2476
- onHeaderFocusChange: handleHeaderFocusChange
2477
- }, undefined, false, undefined, this)
2478
- ]
2479
- }, undefined, true, undefined, this)
2480
- }, undefined, false, undefined, this);
2481
- $[90] = onExit;
2482
- $[91] = toolPermissionContext;
2483
- $[92] = t29;
2484
- } else {
2485
- t29 = $[92];
2486
- }
2487
- let t30;
2488
- if ($[93] !== defaultTab || $[94] !== isHidden || $[95] !== t23 || $[96] !== t25 || $[97] !== t26 || $[98] !== t27 || $[99] !== t29) {
2489
- t30 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
2490
- title: "Permissions:",
2491
- color: "permission",
2492
- defaultTab,
2493
- hidden: isHidden,
2494
- initialHeaderFocused: !hasDenials,
2495
- navFromContent: t23,
2496
- children: [
2497
- t24,
2498
- t25,
2499
- t26,
2500
- t27,
2501
- t29
2502
- ]
2503
- }, undefined, true, undefined, this);
2504
- $[93] = defaultTab;
2505
- $[94] = isHidden;
2506
- $[95] = t23;
2507
- $[96] = t25;
2508
- $[97] = t26;
2509
- $[98] = t27;
2510
- $[99] = t29;
2511
- $[100] = t30;
2512
- } else {
2513
- t30 = $[100];
2514
- }
2515
- let t31;
2516
- if ($[101] !== defaultTab || $[102] !== exitState.keyName || $[103] !== exitState.pending || $[104] !== headerFocused || $[105] !== isSearchMode) {
2517
- t31 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2518
- marginTop: 1,
2519
- paddingLeft: 1,
2520
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2521
- dimColor: true,
2522
- children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2523
- children: [
2524
- "Press ",
2525
- exitState.keyName,
2526
- " again to exit"
2527
- ]
2528
- }, undefined, true, undefined, this) : headerFocused ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2529
- children: "\u2190/\u2192 tab switch \xB7 \u2193 return \xB7 Esc cancel"
2530
- }, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2531
- children: "Type to filter \xB7 Enter/\u2193 select \xB7 \u2191 tabs \xB7 Esc clear"
2532
- }, undefined, false, undefined, this) : hasDenials && defaultTab === "recent" ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2533
- children: "Enter approve \xB7 r retry \xB7 \u2191\u2193 navigate \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2534
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2535
- children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Type to search \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2536
- }, undefined, false, undefined, this)
2537
- }, undefined, false, undefined, this)
2538
- }, undefined, false, undefined, this);
2539
- $[101] = defaultTab;
2540
- $[102] = exitState.keyName;
2541
- $[103] = exitState.pending;
2542
- $[104] = headerFocused;
2543
- $[105] = isSearchMode;
2544
- $[106] = t31;
2545
- } else {
2546
- t31 = $[106];
2547
- }
2548
- let t32;
2549
- if ($[107] !== t30 || $[108] !== t31) {
2550
- t32 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
2551
- color: "permission",
2552
- children: [
2553
- t30,
2554
- t31
2555
- ]
2556
- }, undefined, true, undefined, this);
2557
- $[107] = t30;
2558
- $[108] = t31;
2559
- $[109] = t32;
2560
- } else {
2561
- t32 = $[109];
2562
- }
2563
- let t33;
2564
- if ($[110] !== handleKeyDown || $[111] !== t32) {
2565
- t33 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2566
- flexDirection: "column",
2567
- onKeyDown: handleKeyDown,
2568
- children: t32
2569
- }, undefined, false, undefined, this);
2570
- $[110] = handleKeyDown;
2571
- $[111] = t32;
2572
- $[112] = t33;
2573
- } else {
2574
- t33 = $[112];
2575
- }
2576
- return t33;
2577
- }
2578
- function _temp62(opt_0) {
2579
- return opt_0.value;
2580
- }
2581
- function _temp5(opt) {
2582
- return opt.value !== "add-new-rule";
2583
- }
2584
- function _temp42(d_1) {
2585
- return source_default.bold(d_1.display);
2586
- }
2587
- function _temp32(d_0) {
2588
- return d_0.display;
2589
- }
2590
- function _temp23(d) {
2591
- return d !== undefined;
2592
- }
2593
- function _temp7(s) {
2594
- return s.toolPermissionContext;
2595
- }
2596
- var import_compiler_runtime7, import_react4, jsx_dev_runtime7;
2597
- var init_PermissionRuleList = __esm(() => {
2598
- init_source();
2599
- init_figures();
2600
- init_AppState();
2601
- init_PermissionUpdate();
2602
- init_select();
2603
- init_useExitOnCtrlCDWithKeybindings();
2604
- init_useSearchInput();
2605
- init_ink();
2606
- init_useKeybinding();
2607
- init_autoModeDenials();
2608
- init_permissionRuleParser();
2609
- init_permissions();
2610
- init_slowOperations();
2611
- init_Pane();
2612
- init_Tabs();
2613
- init_SearchBox();
2614
- init_AddPermissionRules();
2615
- init_AddWorkspaceDirectory();
2616
- init_PermissionRuleDescription();
2617
- init_PermissionRuleInput();
2618
- init_RecentDenialsTab();
2619
- init_RemoveWorkspaceDirectory();
2620
- init_WorkspaceTab();
2621
- import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
2622
- import_react4 = __toESM(require_react(), 1);
2623
- jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
2624
- });
2625
-
2626
- // src/commands/permissions/permissions.tsx
2627
- var jsx_dev_runtime8, call = async (onDone, context) => {
2628
- return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(PermissionRuleList, {
2629
- onExit: onDone,
2630
- onRetryDenials: (commands) => {
2631
- context.setMessages((prev) => [...prev, createPermissionRetryMessage(commands)]);
2632
- }
2633
- }, undefined, false, undefined, this);
2634
- };
2635
- var init_permissions2 = __esm(() => {
2636
- init_PermissionRuleList();
2637
- init_messages();
2638
- jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
2639
- });
2640
- init_permissions2();
2641
-
2642
- export {
2643
- call
2644
- };