claude-code-best 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 (522) hide show
  1. package/README.md +104 -369
  2. package/dist/{chunk-5wxspfct.js → chunk-01qzvbp3.js} +8 -2
  3. package/dist/chunk-053bj0m0.js +247 -0
  4. package/dist/chunk-05tt9tt1.js +653 -0
  5. package/dist/chunk-06sq1vz3.js +403 -0
  6. package/dist/chunk-07069jq1.js +30 -0
  7. package/dist/chunk-0dac8msw.js +135 -0
  8. package/dist/{chunk-52n4py3b.js → chunk-0ja0y3at.js} +6 -6
  9. package/dist/chunk-0jzdwbdc.js +14 -0
  10. package/dist/chunk-0nrq46nf.js +313 -0
  11. package/dist/chunk-0qz705wz.js +192 -0
  12. package/dist/{chunk-by7ezad6.js → chunk-0rn4v8sg.js} +42 -28
  13. package/dist/{chunk-1cbn5kxf.js → chunk-0rpb2bdp.js} +3 -2
  14. package/dist/{chunk-zz21rvr7.js → chunk-127cmycn.js} +8 -5
  15. package/dist/chunk-12vk6z7z.js +109 -0
  16. package/dist/chunk-15y014gg.js +102 -0
  17. package/dist/{chunk-44fpr6jq.js → chunk-168xb8v1.js} +4 -2
  18. package/dist/{chunk-8fmbf525.js → chunk-16bnxyz0.js} +1 -1
  19. package/dist/{chunk-wsqhnjj3.js → chunk-1atfzck5.js} +24 -24
  20. package/dist/chunk-1cbhkqxg.js +310 -0
  21. package/dist/chunk-1csq8bf1.js +295 -0
  22. package/dist/{chunk-0e1xsncc.js → chunk-1cwdhk7a.js} +1 -1
  23. package/dist/{chunk-36k3f7pn.js → chunk-1ebqpwhn.js} +79 -59
  24. package/dist/{chunk-ap2a2er6.js → chunk-1mh5vt6v.js} +102 -80
  25. package/dist/chunk-1qf125vg.js +123 -0
  26. package/dist/{chunk-fcz5eche.js → chunk-1sp6713v.js} +139 -170
  27. package/dist/{chunk-d18z9pna.js → chunk-1thgdca1.js} +2 -2
  28. package/dist/chunk-1z1gfx2c.js +443 -0
  29. package/dist/{chunk-7z8j9qfn.js → chunk-21z7acxh.js} +3 -3
  30. package/dist/chunk-229pcf6p.js +509 -0
  31. package/dist/chunk-238g70xa.js +1 -1
  32. package/dist/{chunk-vpb723tx.js → chunk-23ad5t92.js} +5 -5
  33. package/dist/chunk-28043j1k.js +68 -0
  34. package/dist/chunk-299r6d9v.js +141 -0
  35. package/dist/{chunk-5r3ak65p.js → chunk-2bw5nqsw.js} +4 -4
  36. package/dist/chunk-2mxstrx5.js +445 -0
  37. package/dist/{chunk-w2z5pqd3.js → chunk-2q39ej51.js} +6 -6
  38. package/dist/chunk-2qwgfjcj.js +5370 -0
  39. package/dist/chunk-2ss23j0q.js +3587 -0
  40. package/dist/{chunk-k9c3888e.js → chunk-2wvxddsg.js} +9 -7
  41. package/dist/chunk-2x2aznpc.js +134 -0
  42. package/dist/{chunk-bqq4zamw.js → chunk-2ys5wcxk.js} +3 -3
  43. package/dist/{chunk-2kbk09sb.js → chunk-3cvcwgsr.js} +79 -59
  44. package/dist/{chunk-rs45skes.js → chunk-3xv7rjsy.js} +15 -11
  45. package/dist/chunk-42x5tjk2.js +42 -0
  46. package/dist/{chunk-n78qmqpq.js → chunk-436r0x2n.js} +8 -8
  47. package/dist/{chunk-k3vpzx3c.js → chunk-44q4jkwa.js} +27 -67
  48. package/dist/{chunk-qnbdekts.js → chunk-44w22kyx.js} +111 -132
  49. package/dist/{chunk-7m2nd8da.js → chunk-46fcr28b.js} +31 -10
  50. package/dist/{chunk-wm2f2f1z.js → chunk-474y75ga.js} +2 -2
  51. package/dist/{chunk-6fkwz9yk.js → chunk-478rpnqm.js} +8 -8
  52. package/dist/chunk-48w0df8a.js +32 -0
  53. package/dist/chunk-4cp6193g.js +9076 -0
  54. package/dist/chunk-4d0de73v.js +436 -0
  55. package/dist/chunk-4eecm90d.js +1030 -0
  56. package/dist/{chunk-jfv3zczw.js → chunk-4f4ccg1h.js} +10 -115
  57. package/dist/chunk-4h102wt5.js +65 -0
  58. package/dist/{chunk-6n2qgm9v.js → chunk-4hv90qcz.js} +1 -1
  59. package/dist/{chunk-4gj6zzg1.js → chunk-4jcqmf9w.js} +43 -29
  60. package/dist/{chunk-067wa5sn.js → chunk-4kk7vxed.js} +8 -6
  61. package/dist/chunk-4nspekjp.js +69 -0
  62. package/dist/chunk-4xmb7bvy.js +125 -0
  63. package/dist/{chunk-nrp9yaq6.js → chunk-4xy0c1dz.js} +16 -12
  64. package/dist/{chunk-77g09znh.js → chunk-53c9gb9c.js} +23 -16
  65. package/dist/{chunk-03nqtgyr.js → chunk-53zsn91p.js} +42 -30
  66. package/dist/{chunk-gkrx7ptx.js → chunk-548g1d6z.js} +113 -114
  67. package/dist/chunk-559yvwh1.js +63 -0
  68. package/dist/chunk-5a6ahhvy.js +594 -0
  69. package/dist/{chunk-h2j4t3fk.js → chunk-5c6man70.js} +9692 -17630
  70. package/dist/chunk-5hb5ev7b.js +74 -0
  71. package/dist/{chunk-hx2tr4ep.js → chunk-5z28bqne.js} +34 -475
  72. package/dist/{chunk-p7g7pf3f.js → chunk-61ahbn23.js} +8 -6
  73. package/dist/chunk-64c1avct.js +13 -0
  74. package/dist/{chunk-0sb5scxx.js → chunk-652wnf1z.js} +5 -5
  75. package/dist/{chunk-1w361mz1.js → chunk-66jkaz3q.js} +109 -213
  76. package/dist/{chunk-q25bjaev.js → chunk-677as3nh.js} +2 -2
  77. package/dist/chunk-68ksfahx.js +386 -0
  78. package/dist/{chunk-xs0hwvpa.js → chunk-68pfxvxt.js} +14 -9
  79. package/dist/{chunk-epmheefa.js → chunk-69hys77v.js} +8 -8
  80. package/dist/{chunk-404wc7d4.js → chunk-6ayqcq3h.js} +126 -119
  81. package/dist/chunk-6kpbgc5w.js +23 -0
  82. package/dist/chunk-6mpsxxsf.js +362 -0
  83. package/dist/chunk-6nze0g86.js +119 -0
  84. package/dist/{chunk-v1mgv1et.js → chunk-6p4cyhb3.js} +4 -3
  85. package/dist/{chunk-w2qfgzzh.js → chunk-6t62dbnb.js} +61 -100
  86. package/dist/chunk-6t87a3q6.js +2842 -0
  87. package/dist/{chunk-q6av622g.js → chunk-6xana182.js} +18 -13
  88. package/dist/{chunk-fpf4cgbt.js → chunk-7bfach0x.js} +9 -9
  89. package/dist/{chunk-g6e1ab2k.js → chunk-7f1ggjr2.js} +81 -61
  90. package/dist/chunk-7fxjmmfw.js +1172 -0
  91. package/dist/{chunk-ckcagq32.js → chunk-7gqf9wej.js} +5 -5
  92. package/dist/chunk-7j3dkjqq.js +38 -0
  93. package/dist/chunk-7ns74x0q.js +475 -0
  94. package/dist/chunk-7qmknpkq.js +272 -0
  95. package/dist/chunk-7rzepn9c.js +83 -0
  96. package/dist/chunk-7tdcwje9.js +68 -0
  97. package/dist/{chunk-201dvaa3.js → chunk-8201tnhf.js} +11 -5
  98. package/dist/{chunk-dv1wfr85.js → chunk-8225arm6.js} +5 -4
  99. package/dist/chunk-822wfv88.js +70 -0
  100. package/dist/chunk-837tm8ht.js +183 -0
  101. package/dist/chunk-8a2ajt5d.js +878 -0
  102. package/dist/{chunk-drv8qvwz.js → chunk-8bymxfn4.js} +43 -29
  103. package/dist/chunk-8cwbzk7h.js +118 -0
  104. package/dist/chunk-8d0ev0m2.js +111 -0
  105. package/dist/chunk-8g5pe1gr.js +37 -0
  106. package/dist/{chunk-g0j0t6qk.js → chunk-8g747a8x.js} +1 -1
  107. package/dist/chunk-8kfwb79z.js +436 -0
  108. package/dist/{chunk-xyqr1cww.js → chunk-8me0yq6v.js} +12 -12
  109. package/dist/{chunk-qdrwxg3e.js → chunk-8n8285ax.js} +91 -71
  110. package/dist/{chunk-sdj9b9wh.js → chunk-8pn8tvgg.js} +9 -154
  111. package/dist/{chunk-ha0xq3e9.js → chunk-8qhr4n77.js} +64 -106
  112. package/dist/{chunk-fpjzr5jj.js → chunk-8s9bbk3r.js} +62 -45
  113. package/dist/{chunk-e3g8q4cn.js → chunk-905d2hee.js} +10 -8
  114. package/dist/{chunk-3psth3ez.js → chunk-91xq5y4a.js} +9 -9
  115. package/dist/{chunk-rq1kckze.js → chunk-93xsyzsp.js} +1 -1
  116. package/dist/chunk-99pmbfqp.js +230 -0
  117. package/dist/chunk-9f14bkn9.js +33068 -0
  118. package/dist/{chunk-ex978bsn.js → chunk-9m78gjpd.js} +1 -1
  119. package/dist/{chunk-hpwa620w.js → chunk-9pm2d2gv.js} +251 -306
  120. package/dist/chunk-a136cvvz.js +27 -0
  121. package/dist/{chunk-n5t9m8h9.js → chunk-a1bjde7d.js} +7 -7
  122. package/dist/chunk-a2evk7n1.js +168 -0
  123. package/dist/{chunk-6heqkcjx.js → chunk-a3k4w4cm.js} +42 -28
  124. package/dist/chunk-a3mcc1sb.js +1403 -0
  125. package/dist/{chunk-8hq5kk3y.js → chunk-a4twdmhf.js} +3 -2
  126. package/dist/chunk-a8eaey19.js +66 -0
  127. package/dist/chunk-abkb5pw6.js +426 -0
  128. package/dist/chunk-ae76ded0.js +30 -0
  129. package/dist/{chunk-2v1br2x0.js → chunk-agx5w9ce.js} +14 -8
  130. package/dist/chunk-ah46h8rp.js +70 -0
  131. package/dist/chunk-aj3azy6z.js +409 -0
  132. package/dist/chunk-an6z4rzv.js +158 -0
  133. package/dist/{chunk-r6b58y3x.js → chunk-ase86y73.js} +1 -3
  134. package/dist/{chunk-e6s36z54.js → chunk-avfjb6pd.js} +17 -557
  135. package/dist/{chunk-1hhdpn3t.js → chunk-az5x70pn.js} +8 -5
  136. package/dist/{chunk-91gk0g2y.js → chunk-b6rg3egp.js} +33 -18
  137. package/dist/chunk-b73r6ngr.js +125 -0
  138. package/dist/{chunk-8bedvdm1.js → chunk-b81hd3m6.js} +1 -1
  139. package/dist/{chunk-ebfsjcvm.js → chunk-b9mhpc0v.js} +3 -3
  140. package/dist/chunk-b9ndqcdv.js +139 -0
  141. package/dist/{chunk-w7wgpqcp.js → chunk-bd8zk9tn.js} +7 -7
  142. package/dist/chunk-bdy6n17s.js +343 -0
  143. package/dist/{chunk-s8y2tfzf.js → chunk-bf1j3azq.js} +156 -119
  144. package/dist/{chunk-j5j6nrfq.js → chunk-bfcet2mw.js} +2 -2
  145. package/dist/{chunk-jy35mvy3.js → chunk-bmjmrk76.js} +7 -7
  146. package/dist/{chunk-ra0r65nx.js → chunk-bsj8e2mb.js} +11 -11
  147. package/dist/{chunk-jce5r25x.js → chunk-bt64sq5y.js} +5 -4
  148. package/dist/{chunk-vyc0rjyx.js → chunk-bwg7582d.js} +1 -1
  149. package/dist/{chunk-3be7ka25.js → chunk-bxcfz5gy.js} +1 -1
  150. package/dist/{chunk-7wm1rjfm.js → chunk-c1k9tg7h.js} +518 -810
  151. package/dist/{chunk-qwvrkydc.js → chunk-c5pxerks.js} +13 -11
  152. package/dist/chunk-c6sjhj89.js +1284 -0
  153. package/dist/{chunk-brcnd1j0.js → chunk-c9q0phsg.js} +9 -6
  154. package/dist/chunk-caj0ab74.js +129 -0
  155. package/dist/chunk-chsyvavm.js +3435 -0
  156. package/dist/chunk-cjpt035a.js +269 -0
  157. package/dist/chunk-cmcbatgz.js +147 -0
  158. package/dist/chunk-cnsj3vq2.js +35 -0
  159. package/dist/chunk-cqjmxeqv.js +269 -0
  160. package/dist/{chunk-cdz5yb0r.js → chunk-crmjpsqe.js} +13 -2
  161. package/dist/{chunk-2mcp388c.js → chunk-cvb1v08x.js} +38 -32
  162. package/dist/{chunk-w0r5627q.js → chunk-cxhvyf7c.js} +234 -363
  163. package/dist/{chunk-s0wvh65m.js → chunk-cxx0e4nv.js} +1343 -2839
  164. package/dist/chunk-cy2hswr1.js +15 -0
  165. package/dist/{chunk-g9q2cznf.js → chunk-cy6ezb6j.js} +125994 -138958
  166. package/dist/{chunk-ks0m9njy.js → chunk-d2jekryq.js} +8 -8
  167. package/dist/chunk-d4mdda98.js +94 -0
  168. package/dist/{chunk-hgtf13es.js → chunk-d6ve5pze.js} +10 -10
  169. package/dist/{chunk-55wgxwa9.js → chunk-d7886r6a.js} +6928 -6935
  170. package/dist/{chunk-4bgz02m1.js → chunk-d83tmb5h.js} +87 -64
  171. package/dist/{chunk-hdwh7ncw.js → chunk-d8meetqc.js} +84 -63
  172. package/dist/{chunk-128nh5j9.js → chunk-d8r0q4ps.js} +547 -866
  173. package/dist/chunk-d95k8xkm.js +84 -0
  174. package/dist/chunk-dd4m7t1v.js +112 -0
  175. package/dist/{chunk-rcdpvnxh.js → chunk-dekbr08w.js} +24 -20
  176. package/dist/{chunk-cvge4pvp.js → chunk-dk8287aa.js} +1 -1
  177. package/dist/chunk-dm3n2qgd.js +24 -0
  178. package/dist/{chunk-b0105v1f.js → chunk-dmxte86x.js} +3 -3
  179. package/dist/{chunk-zkmxtgc3.js → chunk-dqvwn28p.js} +19 -15
  180. package/dist/chunk-drkm8yx2.js +34 -0
  181. package/dist/chunk-dsbewdgm.js +148 -0
  182. package/dist/{chunk-w7h2yphx.js → chunk-dwekpr47.js} +2 -2
  183. package/dist/{chunk-hg776v69.js → chunk-e3299veq.js} +16 -68
  184. package/dist/{chunk-wqpr7002.js → chunk-e5hcyxae.js} +132 -18
  185. package/dist/chunk-e7h0nd5w.js +106 -0
  186. package/dist/{chunk-7qwme3ab.js → chunk-eaemyebz.js} +5 -5
  187. package/dist/{chunk-hjhc4cpt.js → chunk-edzkkadh.js} +2 -2
  188. package/dist/chunk-em99fnet.js +128 -0
  189. package/dist/{chunk-hfzj1m07.js → chunk-epyaq1z0.js} +13 -4
  190. package/dist/{chunk-r8f13sz1.js → chunk-eqmkajs4.js} +102 -195
  191. package/dist/{chunk-gax0fcbx.js → chunk-ergam9ft.js} +5 -5
  192. package/dist/chunk-es2fdse0.js +63 -0
  193. package/dist/{chunk-grdvmq7q.js → chunk-esn3tgm2.js} +8 -6
  194. package/dist/{chunk-ptmcaxqn.js → chunk-et8ybmt2.js} +9 -7
  195. package/dist/chunk-ew9rp41b.js +300 -0
  196. package/dist/{chunk-dvfb4qwt.js → chunk-ewx6xfzb.js} +2 -2
  197. package/dist/chunk-eyjtbtt0.js +137 -0
  198. package/dist/chunk-f0jd2p9n.js +797 -0
  199. package/dist/{chunk-vzqrbsd1.js → chunk-f69rgsm2.js} +5 -5
  200. package/dist/{chunk-45kxdsp8.js → chunk-f6rbj3gz.js} +17 -12
  201. package/dist/chunk-fbhyqxdg.js +1182 -0
  202. package/dist/chunk-feyzykye.js +10 -0
  203. package/dist/chunk-ffhejx56.js +107 -0
  204. package/dist/{chunk-cpe70sxw.js → chunk-fhx6nt2a.js} +42 -28
  205. package/dist/chunk-fkkysfev.js +158 -0
  206. package/dist/chunk-fn510gqw.js +216 -0
  207. package/dist/chunk-ftsg8bjm.js +117 -0
  208. package/dist/{chunk-s39js2d3.js → chunk-fyts9grb.js} +2 -2
  209. package/dist/{chunk-bjqw6798.js → chunk-fz0ch109.js} +6 -5
  210. package/dist/{chunk-q1e6pzwh.js → chunk-g1jarkx9.js} +38 -8
  211. package/dist/chunk-g9f19ttm.js +15 -0
  212. package/dist/chunk-g9qte35t.js +341 -0
  213. package/dist/chunk-gaav53dc.js +105 -0
  214. package/dist/chunk-gfx3cwrk.js +75 -0
  215. package/dist/chunk-gk2d1x2a.js +946 -0
  216. package/dist/chunk-gkbat1p9.js +121 -0
  217. package/dist/{chunk-cg43nnpk.js → chunk-gmnyk2t8.js} +8 -6
  218. package/dist/{chunk-m23b51r2.js → chunk-gnmdprq3.js} +191 -338
  219. package/dist/{chunk-bq6x1ehp.js → chunk-gpz0ddyz.js} +8 -8
  220. package/dist/{chunk-yt6z8030.js → chunk-gv1csnc3.js} +217 -355
  221. package/dist/{chunk-nx6nds18.js → chunk-gv37c8ax.js} +3 -3
  222. package/dist/{chunk-h6c8cms4.js → chunk-gzr2601k.js} +10 -10
  223. package/dist/{chunk-2tkt52mz.js → chunk-h3pda469.js} +37 -82
  224. package/dist/{chunk-qqfa0dqg.js → chunk-h4b85amj.js} +20 -32
  225. package/dist/chunk-h5zv78zq.js +352 -0
  226. package/dist/{chunk-2x3gmbws.js → chunk-h7edytkc.js} +5 -5
  227. package/dist/{chunk-as261f01.js → chunk-ha0wbzc3.js} +13 -11
  228. package/dist/{chunk-nxsh6de2.js → chunk-hcgkak1j.js} +20 -125
  229. package/dist/{chunk-tjaqa99q.js → chunk-hezj20qy.js} +3 -3
  230. package/dist/{chunk-7ahman84.js → chunk-hf85ht0m.js} +2 -2
  231. package/dist/{chunk-w0hx9v3y.js → chunk-ht1nfygk.js} +42 -28
  232. package/dist/chunk-j316jjby.js +108 -0
  233. package/dist/chunk-j3fge71v.js +115 -0
  234. package/dist/{chunk-v4h5psgs.js → chunk-j4x0t6k2.js} +46 -31
  235. package/dist/{chunk-9gbamk79.js → chunk-j5bth84e.js} +5 -1
  236. package/dist/chunk-j783d5af.js +134 -0
  237. package/dist/chunk-j7pbwf9x.js +108 -0
  238. package/dist/{chunk-rf2w4x97.js → chunk-j8rnrm5n.js} +120 -142
  239. package/dist/{chunk-vratq94g.js → chunk-j9gxwbe3.js} +1 -1
  240. package/dist/{chunk-3r24h7t6.js → chunk-jaaxk89e.js} +1 -1
  241. package/dist/{chunk-y47cg3kz.js → chunk-jaew3662.js} +18 -13
  242. package/dist/{chunk-q1txr206.js → chunk-jbbj16w2.js} +128 -185
  243. package/dist/chunk-jerew25v.js +148 -0
  244. package/dist/{chunk-v399mzxk.js → chunk-jf0p00fz.js} +2 -2
  245. package/dist/{chunk-97r68x5g.js → chunk-jfsah2w3.js} +1065 -1762
  246. package/dist/{chunk-av73dywf.js → chunk-jna2tcvj.js} +8 -8
  247. package/dist/{chunk-yym1e1dr.js → chunk-jng0mb4r.js} +10 -10
  248. package/dist/chunk-jrrmwfp4.js +66 -0
  249. package/dist/{chunk-0rc2rn3b.js → chunk-jt6fa514.js} +14 -12
  250. package/dist/chunk-jvkyx1b7.js +911 -0
  251. package/dist/{chunk-41xeh3t9.js → chunk-jy6c07wa.js} +4 -4
  252. package/dist/chunk-k1fvb16y.js +269 -0
  253. package/dist/{chunk-bqfnp99q.js → chunk-k3s4yk22.js} +1 -1
  254. package/dist/{chunk-madfgr3n.js → chunk-k46gxg21.js} +68 -8
  255. package/dist/chunk-k8wwyz2t.js +110 -0
  256. package/dist/{chunk-mnx3wyv4.js → chunk-ka3fdfyb.js} +83 -62
  257. package/dist/{chunk-k5c8ssc6.js → chunk-ka4x7mhn.js} +42 -28
  258. package/dist/chunk-kb99zpps.js +216 -0
  259. package/dist/{chunk-1dyeexvn.js → chunk-kd3mmsd2.js} +4 -4
  260. package/dist/{chunk-1xkekb9y.js → chunk-kfd89dsd.js} +5 -3
  261. package/dist/{chunk-g7fxbqsc.js → chunk-km1wcchx.js} +87 -68
  262. package/dist/{chunk-248szg6m.js → chunk-kmhwx18d.js} +3 -3
  263. package/dist/{chunk-pabnr66n.js → chunk-kq91dwkq.js} +8 -6
  264. package/dist/chunk-m17m84b7.js +111 -0
  265. package/dist/chunk-m1a0s9fd.js +1070 -0
  266. package/dist/{chunk-jafes477.js → chunk-m2bcpk8j.js} +4 -3
  267. package/dist/{chunk-t0brxw87.js → chunk-m7jtn7dk.js} +80 -60
  268. package/dist/chunk-mq2mgyt9.js +103 -0
  269. package/dist/chunk-msv3w4qp.js +1811 -0
  270. package/dist/chunk-mx28h61f.js +1147 -0
  271. package/dist/{chunk-wf7yz2j0.js → chunk-mxe1f4jg.js} +13 -11
  272. package/dist/{chunk-n5crdyay.js → chunk-mzwjvfr2.js} +137 -124
  273. package/dist/{chunk-gf96dtb6.js → chunk-n2n0sq7r.js} +71 -77
  274. package/dist/{chunk-m06q12hg.js → chunk-n8mpqdje.js} +1 -1
  275. package/dist/chunk-n9e984ba.js +132 -0
  276. package/dist/chunk-netzwgv1.js +154 -0
  277. package/dist/{chunk-xszk7n10.js → chunk-nh3cd07f.js} +1 -1
  278. package/dist/chunk-njrz6mbe.js +66 -0
  279. package/dist/{chunk-sb2sew2f.js → chunk-nv7pfr7k.js} +2 -2
  280. package/dist/{chunk-g9xf7jc4.js → chunk-nwd8pb55.js} +85 -65
  281. package/dist/{chunk-5hva0tsg.js → chunk-p2yv7m0g.js} +6 -6
  282. package/dist/chunk-p5t2vy90.js +259 -0
  283. package/dist/{chunk-zk2wsm7d.js → chunk-p7vkh4wx.js} +2 -2
  284. package/dist/{chunk-da4ve9t5.js → chunk-p8crqj70.js} +10 -10
  285. package/dist/{chunk-02y0y853.js → chunk-pcngtzr8.js} +12 -6
  286. package/dist/{chunk-3vpqaqc6.js → chunk-pdjem6h1.js} +53 -71
  287. package/dist/{chunk-7rgwp44r.js → chunk-pmxdzjq0.js} +11 -9
  288. package/dist/{chunk-3s5r02ps.js → chunk-pnkcecq2.js} +31 -57
  289. package/dist/{chunk-zsfxha74.js → chunk-pshjyzq4.js} +8 -7
  290. package/dist/chunk-pt1yj9zf.js +107 -0
  291. package/dist/{chunk-rxwb7b78.js → chunk-py6b9d5b.js} +2331 -4219
  292. package/dist/chunk-q7n8d91g.js +67 -0
  293. package/dist/{chunk-e5pntxye.js → chunk-q7tpyeb3.js} +6 -4
  294. package/dist/{chunk-7ymfj7m3.js → chunk-q82r31er.js} +1 -1
  295. package/dist/chunk-qajrkk97.js +298 -0
  296. package/dist/chunk-qbrh24cn.js +119 -0
  297. package/dist/chunk-qd9ntz7c.js +230 -0
  298. package/dist/chunk-qfr5tcd5.js +2537 -0
  299. package/dist/chunk-qpzfmkct.js +456 -0
  300. package/dist/{chunk-ywxd4qw4.js → chunk-qtfc6wdh.js} +2 -5
  301. package/dist/chunk-r032587e.js +83 -0
  302. package/dist/chunk-r2k2jy0y.js +51 -0
  303. package/dist/{chunk-8mqwac85.js → chunk-r4dnnggx.js} +22 -16
  304. package/dist/{chunk-5wnn3t3a.js → chunk-r5n8fvw0.js} +7 -7
  305. package/dist/{chunk-pxvatg16.js → chunk-r7kh03er.js} +231 -190
  306. package/dist/{chunk-z4wtem3z.js → chunk-rfs0mfg8.js} +147 -151
  307. package/dist/{chunk-hrzerbfw.js → chunk-rgbbtszq.js} +14 -14
  308. package/dist/{chunk-ctw5jwcd.js → chunk-rkak3kjw.js} +10 -10
  309. package/dist/chunk-rp568bfw.js +111 -0
  310. package/dist/chunk-rtv718sv.js +146 -0
  311. package/dist/{chunk-8d5eyjse.js → chunk-rvkvehat.js} +5284 -3093
  312. package/dist/chunk-s1baskk7.js +14 -0
  313. package/dist/{chunk-tse7q7k1.js → chunk-s1eb67v3.js} +79 -59
  314. package/dist/{chunk-7rn4t7tx.js → chunk-s59kx26r.js} +87 -64
  315. package/dist/chunk-s6yk6m3b.js +109 -0
  316. package/dist/{chunk-bsk44136.js → chunk-sca71yv8.js} +11 -9
  317. package/dist/chunk-sfrwm87k.js +151 -0
  318. package/dist/chunk-sgaknx21.js +123 -0
  319. package/dist/{chunk-4y62603j.js → chunk-snyaz093.js} +9 -15
  320. package/dist/{chunk-ytg914ra.js → chunk-sq8wkk3z.js} +1 -3
  321. package/dist/chunk-sxqj7s2h.js +54 -0
  322. package/dist/chunk-t2m6cjp1.js +264 -0
  323. package/dist/chunk-t6hmvb6k.js +1021 -0
  324. package/dist/chunk-t72x960a.js +125 -0
  325. package/dist/chunk-t9kashay.js +440 -0
  326. package/dist/chunk-t9wzf009.js +151 -0
  327. package/dist/chunk-ta1dgyj1.js +154 -0
  328. package/dist/chunk-tavxhayf.js +149 -0
  329. package/dist/{chunk-2tw2ve8h.js → chunk-tcdv4gp8.js} +18 -12
  330. package/dist/chunk-td3b74vm.js +362 -0
  331. package/dist/{chunk-mt25echc.js → chunk-tezak8rx.js} +1 -1
  332. package/dist/chunk-tgcw0rzx.js +262 -0
  333. package/dist/{chunk-9rcbyag3.js → chunk-tmdbrszg.js} +2 -2
  334. package/dist/{chunk-avwewk4v.js → chunk-v17qee2y.js} +12 -8
  335. package/dist/{chunk-njtjmsx7.js → chunk-v1jd31dw.js} +2 -2
  336. package/dist/chunk-var1et7e.js +66 -0
  337. package/dist/{chunk-j5zq8axt.js → chunk-ve9wswz4.js} +7 -131
  338. package/dist/{chunk-hqmz36b3.js → chunk-vf612n57.js} +21 -101
  339. package/dist/chunk-vfhabc5j.js +109 -0
  340. package/dist/{chunk-wszmas1q.js → chunk-vgy0w6tt.js} +2 -2
  341. package/dist/chunk-vh02fvz1.js +375 -0
  342. package/dist/{chunk-jz6sqm8m.js → chunk-vm935era.js} +1083 -881
  343. package/dist/{chunk-e7393td6.js → chunk-vtb8z6as.js} +14 -9
  344. package/dist/chunk-w2kf9sxn.js +115 -0
  345. package/dist/chunk-w7trx259.js +132 -0
  346. package/dist/chunk-w92b262y.js +1072 -0
  347. package/dist/chunk-w9zqjhvm.js +103 -0
  348. package/dist/{chunk-0he1tqj5.js → chunk-wb2fvy1k.js} +81 -61
  349. package/dist/chunk-ws2d81aj.js +123 -0
  350. package/dist/{chunk-k808gmhk.js → chunk-wssgdcck.js} +2 -2
  351. package/dist/{chunk-t9z6njcr.js → chunk-wtycm8km.js} +9 -9
  352. package/dist/chunk-wz0d8mna.js +108 -0
  353. package/dist/chunk-x01wtn3p.js +144 -0
  354. package/dist/{chunk-ze747xz6.js → chunk-x2sp7rcv.js} +73 -105
  355. package/dist/{chunk-7vtykt4v.js → chunk-xbprynsc.js} +18 -46
  356. package/dist/{chunk-p196v9d0.js → chunk-xext3y2y.js} +8 -6
  357. package/dist/{chunk-r66hz8j6.js → chunk-xycy3c8q.js} +15 -12
  358. package/dist/{chunk-npv8q5qr.js → chunk-y01ys1vm.js} +25 -74
  359. package/dist/{chunk-spqaamnc.js → chunk-y78t50v0.js} +2 -2
  360. package/dist/chunk-y9bgt2k1.js +78 -0
  361. package/dist/{chunk-j8rw3m89.js → chunk-ydm0nfsv.js} +6 -6
  362. package/dist/{chunk-3cn070p7.js → chunk-yetebjek.js} +291 -502
  363. package/dist/chunk-ym5r3jnk.js +2007 -0
  364. package/dist/chunk-ysks0ewj.js +237 -0
  365. package/dist/chunk-yv3evkgg.js +68 -0
  366. package/dist/chunk-yw79dz62.js +164 -0
  367. package/dist/{chunk-ea18z8vr.js → chunk-yy59gvs4.js} +159 -183
  368. package/dist/{chunk-def1dc97.js → chunk-yyax4hdg.js} +10 -8
  369. package/dist/chunk-yzx3mhfd.js +110 -0
  370. package/dist/chunk-z0q85m5f.js +108 -0
  371. package/dist/chunk-z1bs6d7k.js +24 -0
  372. package/dist/chunk-z6e5jp2w.js +119 -0
  373. package/dist/chunk-z7ssqvt6.js +6886 -0
  374. package/dist/chunk-z95yxwyb.js +61 -0
  375. package/dist/{chunk-5a3cw988.js → chunk-z9aqj026.js} +5 -5
  376. package/dist/chunk-zc6dxhk9.js +169 -0
  377. package/dist/{chunk-2t3vw4tx.js → chunk-ze6zvkg6.js} +10 -10
  378. package/dist/{chunk-t0rgmccj.js → chunk-zejm280k.js} +1 -1
  379. package/dist/chunk-zfapazzd.js +37 -0
  380. package/dist/chunk-zj4fqmnc.js +219 -0
  381. package/dist/chunk-zkrpbswn.js +1608 -0
  382. package/dist/chunk-zktbb38m.js +112 -0
  383. package/dist/{chunk-2mcrd0rj.js → chunk-zptcqa7t.js} +92 -71
  384. package/dist/{chunk-a3csma98.js → chunk-zvnsjbt8.js} +1 -1
  385. package/dist/chunk-zwaanw8y.js +110 -0
  386. package/dist/{chunk-g3t0act8.js → chunk-zzm33q8x.js} +1 -1
  387. package/dist/{chunk-3gqdqmzb.js → chunk-zzzc1ead.js} +17 -12
  388. package/dist/cli.js +39 -10
  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 +25 -15
  397. package/scripts/download-ripgrep.ts +335 -0
  398. package/scripts/postinstall.cjs +319 -0
  399. package/dist/chunk-07ysf2mw.js +0 -184
  400. package/dist/chunk-0ewgfms5.js +0 -117
  401. package/dist/chunk-165b9y9k.js +0 -70
  402. package/dist/chunk-17g3drrw.js +0 -121
  403. package/dist/chunk-1jv1ckhg.js +0 -1152
  404. package/dist/chunk-1pxd1xfp.js +0 -103
  405. package/dist/chunk-1tzexy7d.js +0 -258
  406. package/dist/chunk-271zt54b.js +0 -1871
  407. package/dist/chunk-2a27tvzp.js +0 -281
  408. package/dist/chunk-2g1zxpt7.js +0 -2833
  409. package/dist/chunk-2jb48txn.js +0 -98
  410. package/dist/chunk-2kc13eta.js +0 -88
  411. package/dist/chunk-2tme3s1c.js +0 -114
  412. package/dist/chunk-4491abz9.js +0 -99
  413. package/dist/chunk-4dfmgx6h.js +0 -69
  414. package/dist/chunk-4fbyr2hm.js +0 -279
  415. package/dist/chunk-5dsvtbwb.js +0 -87
  416. package/dist/chunk-5t59fqg3.js +0 -127
  417. package/dist/chunk-60nc5bh3.js +0 -1579
  418. package/dist/chunk-6dcq96a3.js +0 -128
  419. package/dist/chunk-6tm5941a.js +0 -152
  420. package/dist/chunk-79zmgkg5.js +0 -750
  421. package/dist/chunk-7d35rxr3.js +0 -69
  422. package/dist/chunk-7enxknwt.js +0 -442
  423. package/dist/chunk-7j0wpf4m.js +0 -89
  424. package/dist/chunk-7q6pjeyp.js +0 -1493
  425. package/dist/chunk-7whgbwhx.js +0 -584
  426. package/dist/chunk-9egdc8n4.js +0 -463
  427. package/dist/chunk-9rr0wepz.js +0 -56
  428. package/dist/chunk-ajp7hmws.js +0 -422
  429. package/dist/chunk-bm1qb16p.js +0 -17
  430. package/dist/chunk-bmvzacx5.js +0 -998
  431. package/dist/chunk-bw093kge.js +0 -129
  432. package/dist/chunk-c4q9x8t2.js +0 -105
  433. package/dist/chunk-c6421kme.js +0 -54
  434. package/dist/chunk-cdajcgne.js +0 -195
  435. package/dist/chunk-ch8avrbh.js +0 -86
  436. package/dist/chunk-chkyv40s.js +0 -2642
  437. package/dist/chunk-d049dd11.js +0 -348
  438. package/dist/chunk-d7tw94h4.js +0 -114
  439. package/dist/chunk-daeav7vb.js +0 -418
  440. package/dist/chunk-dxnv8hfn.js +0 -536
  441. package/dist/chunk-dy3tzxgq.js +0 -91
  442. package/dist/chunk-exy9bnjf.js +0 -212
  443. package/dist/chunk-f1f3dmd5.js +0 -713
  444. package/dist/chunk-f7yg1atj.js +0 -47
  445. package/dist/chunk-fakajzny.js +0 -372
  446. package/dist/chunk-ftrm87vt.js +0 -467
  447. package/dist/chunk-ftsp0cj3.js +0 -105
  448. package/dist/chunk-fv7hhcns.js +0 -345
  449. package/dist/chunk-fvcwxb8x.js +0 -83
  450. package/dist/chunk-g00hs992.js +0 -90
  451. package/dist/chunk-g5fpkpeg.js +0 -520
  452. package/dist/chunk-g9qyg278.js +0 -88
  453. package/dist/chunk-gkjdjqfs.js +0 -112
  454. package/dist/chunk-gqk545se.js +0 -6107
  455. package/dist/chunk-gyj242zr.js +0 -20
  456. package/dist/chunk-gzmjp1eb.js +0 -696
  457. package/dist/chunk-hbh17tng.js +0 -1013
  458. package/dist/chunk-hdfzyzk4.js +0 -85
  459. package/dist/chunk-hdtb5jce.js +0 -101
  460. package/dist/chunk-j99mjxam.js +0 -220
  461. package/dist/chunk-jaqg0k7h.js +0 -271
  462. package/dist/chunk-jdew773m.js +0 -115
  463. package/dist/chunk-jjsx6t78.js +0 -169
  464. package/dist/chunk-jpr8js4w.js +0 -328
  465. package/dist/chunk-jx817w05.js +0 -11
  466. package/dist/chunk-k0g3jve7.js +0 -89
  467. package/dist/chunk-k1g3g183.js +0 -128
  468. package/dist/chunk-k1p54aq6.js +0 -54
  469. package/dist/chunk-kexj9c6y.js +0 -5398
  470. package/dist/chunk-kgg1gq3t.js +0 -113
  471. package/dist/chunk-kwkrek4t.js +0 -95
  472. package/dist/chunk-m4gcjpj3.js +0 -103
  473. package/dist/chunk-m6rk1r6q.js +0 -194
  474. package/dist/chunk-mb2xmb0d.js +0 -53
  475. package/dist/chunk-mv1pbf3a.js +0 -297
  476. package/dist/chunk-my7r0cca.js +0 -469
  477. package/dist/chunk-nprycdaa.js +0 -525
  478. package/dist/chunk-p2pztr2r.js +0 -104
  479. package/dist/chunk-p68nf56z.js +0 -92
  480. package/dist/chunk-p6pc9xrz.js +0 -3443
  481. package/dist/chunk-p7skftb4.js +0 -108
  482. package/dist/chunk-pa2235xc.js +0 -160
  483. package/dist/chunk-pmzbyaat.js +0 -99
  484. package/dist/chunk-pqzk7nbh.js +0 -91
  485. package/dist/chunk-pvvew193.js +0 -802
  486. package/dist/chunk-pvx0x5zm.js +0 -2057
  487. package/dist/chunk-py77warv.js +0 -66
  488. package/dist/chunk-q43gccx5.js +0 -92
  489. package/dist/chunk-rse6x10x.js +0 -89
  490. package/dist/chunk-rxdhy7ve.js +0 -131
  491. package/dist/chunk-scb48p4v.js +0 -496
  492. package/dist/chunk-sjqtqj35.js +0 -28
  493. package/dist/chunk-sq0wf7jj.js +0 -1919
  494. package/dist/chunk-sy1hkkty.js +0 -400
  495. package/dist/chunk-sy9jf9v2.js +0 -109
  496. package/dist/chunk-t2km9bn3.js +0 -87
  497. package/dist/chunk-t4afbt2j.js +0 -88
  498. package/dist/chunk-t4c5qtdc.js +0 -42
  499. package/dist/chunk-t94jxd0x.js +0 -100
  500. package/dist/chunk-tb2g2bba.js +0 -192
  501. package/dist/chunk-tdpvdzbf.js +0 -97
  502. package/dist/chunk-tf4dw2e2.js +0 -142
  503. package/dist/chunk-tp40437d.js +0 -90
  504. package/dist/chunk-vabm7x8v.js +0 -61
  505. package/dist/chunk-veaq13qy.js +0 -490
  506. package/dist/chunk-vmz3wcnv.js +0 -641
  507. package/dist/chunk-vsgv16zj.js +0 -756
  508. package/dist/chunk-vxa0avb0.js +0 -105
  509. package/dist/chunk-x14dq3v1.js +0 -722
  510. package/dist/chunk-x6bg700t.js +0 -88
  511. package/dist/chunk-x8b7vft8.js +0 -132
  512. package/dist/chunk-xmdcxa8r.js +0 -374
  513. package/dist/chunk-y42a2xmv.js +0 -1316
  514. package/dist/chunk-y56ckcf8.js +0 -44
  515. package/dist/chunk-ybgghjqa.js +0 -602
  516. package/dist/chunk-zacq47b2.js +0 -84
  517. package/dist/chunk-zv3hxg5y.js +0 -267
  518. package/dist/chunk-zw2x3xxq.js +0 -96
  519. package/dist/chunk-zyf9epwn.js +0 -642
  520. package/dist/{chunk-whvdag1y.js → chunk-3bfs3x0h.js} +9 -9
  521. package/dist/{chunk-27xc1csx.js → chunk-dggvswz1.js} +3 -3
  522. package/dist/{chunk-0wftg29n.js → chunk-f9nt10jh.js} +3 -3
@@ -1,2642 +0,0 @@
1
- // @bun
2
- import {
3
- getAutoModeDenials,
4
- init_autoModeDenials
5
- } from "./chunk-0paqc2yw.js";
6
- import {
7
- SearchBox,
8
- init_SearchBox,
9
- init_useSearchInput,
10
- useSearchInput
11
- } from "./chunk-j5zq8axt.js";
12
- import {
13
- Tab,
14
- Tabs,
15
- init_Tabs,
16
- useTabHeaderFocus,
17
- useTabsWidth
18
- } from "./chunk-fakajzny.js";
19
- import {
20
- StatusIcon,
21
- init_StatusIcon
22
- } from "./chunk-zacq47b2.js";
23
- import {
24
- detectUnreachableRules,
25
- init_shadowedRuleDetection
26
- } from "./chunk-8fmbf525.js";
27
- import {
28
- AddWorkspaceDirectory,
29
- init_AddWorkspaceDirectory
30
- } from "./chunk-scb48p4v.js";
31
- import"./chunk-w7wgpqcp.js";
32
- import"./chunk-jpr8js4w.js";
33
- import"./chunk-jjsx6t78.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-g9q2cznf.js";
60
- import"./chunk-q1e6pzwh.js";
61
- import"./chunk-201dvaa3.js";
62
- import"./chunk-248szg6m.js";
63
- import"./chunk-t0rgmccj.js";
64
- import"./chunk-def1dc97.js";
65
- import {
66
- Dialog,
67
- init_Dialog
68
- } from "./chunk-9egdc8n4.js";
69
- import"./chunk-ehtwnxpg.js";
70
- import"./chunk-b0105v1f.js";
71
- import"./chunk-hgtf13es.js";
72
- import"./chunk-3be7ka25.js";
73
- import"./chunk-rcdpvnxh.js";
74
- import"./chunk-2gzv8nrw.js";
75
- import"./chunk-45kxdsp8.js";
76
- import"./chunk-cgfdkzhb.js";
77
- import"./chunk-madfgr3n.js";
78
- import {
79
- init_useExitOnCtrlCDWithKeybindings,
80
- useExitOnCtrlCDWithKeybindings
81
- } from "./chunk-pmzbyaat.js";
82
- import"./chunk-9gbamk79.js";
83
- import"./chunk-ha0xq3e9.js";
84
- import"./chunk-hfzj1m07.js";
85
- import {
86
- Pane,
87
- init_Pane,
88
- init_useKeybinding,
89
- init_useTerminalSize,
90
- useKeybinding,
91
- useTerminalSize
92
- } from "./chunk-pvvew193.js";
93
- import {
94
- Newline,
95
- ThemedBox_default,
96
- ThemedText,
97
- init_ink,
98
- require_compiler_runtime,
99
- useTerminalFocus,
100
- use_input_default
101
- } from "./chunk-8d5eyjse.js";
102
- import"./chunk-7m2nd8da.js";
103
- import"./chunk-ps49ymvj.js";
104
- import {
105
- require_jsx_dev_runtime,
106
- require_react
107
- } from "./chunk-g338npwr.js";
108
- import"./chunk-2v1br2x0.js";
109
- import"./chunk-zk2wsm7d.js";
110
- import"./chunk-zkmxtgc3.js";
111
- import"./chunk-m06q12hg.js";
112
- import"./chunk-grdvmq7q.js";
113
- import {
114
- SOURCES,
115
- getRelativeSettingsFilePathForSource,
116
- init_constants,
117
- init_permissionRuleParser,
118
- init_settings1 as init_settings,
119
- init_source,
120
- init_stringUtils,
121
- permissionRuleValueFromString,
122
- permissionRuleValueToString,
123
- plural,
124
- source_default
125
- } from "./chunk-7wm1rjfm.js";
126
- import"./chunk-e3g8q4cn.js";
127
- import"./chunk-ctw5jwcd.js";
128
- import"./chunk-vratq94g.js";
129
- import"./chunk-5hva0tsg.js";
130
- import"./chunk-0e1xsncc.js";
131
- import"./chunk-g0j0t6qk.js";
132
- import"./chunk-3c25bcsw.js";
133
- import"./chunk-tjaqa99q.js";
134
- import"./chunk-55wgxwa9.js";
135
- import"./chunk-spqaamnc.js";
136
- import"./chunk-4jm600zv.js";
137
- import"./chunk-w2z5pqd3.js";
138
- import"./chunk-7ymfj7m3.js";
139
- import"./chunk-f5ma3nh5.js";
140
- import"./chunk-qz2x630m.js";
141
- import"./chunk-cvge4pvp.js";
142
- import"./chunk-p2816w9z.js";
143
- import"./chunk-v9smspw2.js";
144
- import"./chunk-v1kzp02e.js";
145
- import"./chunk-0vkfrmqm.js";
146
- import"./chunk-0xjaqda8.js";
147
- import"./chunk-x14dq3v1.js";
148
- import"./chunk-cdz5yb0r.js";
149
- import"./chunk-h0rbjg6x.js";
150
- import"./chunk-7z8j9qfn.js";
151
- import"./chunk-hrzerbfw.js";
152
- import"./chunk-d18z9pna.js";
153
- import"./chunk-qnfx3qtx.js";
154
- import"./chunk-hjhc4cpt.js";
155
- import"./chunk-vyc0rjyx.js";
156
- import {
157
- figures_default,
158
- init_figures
159
- } from "./chunk-hx2tr4ep.js";
160
- import"./chunk-p7g7pf3f.js";
161
- import"./chunk-8tnsngw2.js";
162
- import"./chunk-8bedvdm1.js";
163
- import"./chunk-7wm5s02e.js";
164
- import {
165
- init_slowOperations,
166
- jsonStringify
167
- } from "./chunk-nxsh6de2.js";
168
- import"./chunk-fbv4apne.js";
169
- import"./chunk-3r24h7t6.js";
170
- import {
171
- getOriginalCwd,
172
- init_state
173
- } from "./chunk-qqfa0dqg.js";
174
- import"./chunk-hqmz36b3.js";
175
- import"./chunk-4g3v8y12.js";
176
- import"./chunk-7739pg2c.js";
177
- import"./chunk-xszk7n10.js";
178
- import"./chunk-sdj9b9wh.js";
179
- import {
180
- __esm,
181
- __toESM
182
- } from "./chunk-qp2qdcda.js";
183
-
184
- // src/components/permissions/rules/PermissionRuleDescription.tsx
185
- function PermissionRuleDescription(t0) {
186
- const $ = import_compiler_runtime.c(9);
187
- const {
188
- ruleValue
189
- } = t0;
190
- switch (ruleValue.toolName) {
191
- case BashTool.name: {
192
- if (ruleValue.ruleContent) {
193
- if (ruleValue.ruleContent.endsWith(":*")) {
194
- let t1;
195
- if ($[0] !== ruleValue.ruleContent) {
196
- t1 = ruleValue.ruleContent.slice(0, -2);
197
- $[0] = ruleValue.ruleContent;
198
- $[1] = t1;
199
- } else {
200
- t1 = $[1];
201
- }
202
- let t2;
203
- if ($[2] !== t1) {
204
- t2 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
205
- dimColor: true,
206
- children: [
207
- "Any Bash command starting with",
208
- " ",
209
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
210
- bold: true,
211
- children: t1
212
- }, undefined, false, undefined, this)
213
- ]
214
- }, undefined, true, undefined, this);
215
- $[2] = t1;
216
- $[3] = t2;
217
- } else {
218
- t2 = $[3];
219
- }
220
- return t2;
221
- } else {
222
- let t1;
223
- if ($[4] !== ruleValue.ruleContent) {
224
- t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
225
- dimColor: true,
226
- children: [
227
- "The Bash command ",
228
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
229
- bold: true,
230
- children: ruleValue.ruleContent
231
- }, undefined, false, undefined, this)
232
- ]
233
- }, undefined, true, undefined, this);
234
- $[4] = ruleValue.ruleContent;
235
- $[5] = t1;
236
- } else {
237
- t1 = $[5];
238
- }
239
- return t1;
240
- }
241
- } else {
242
- let t1;
243
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
244
- t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
245
- dimColor: true,
246
- children: "Any Bash command"
247
- }, undefined, false, undefined, this);
248
- $[6] = t1;
249
- } else {
250
- t1 = $[6];
251
- }
252
- return t1;
253
- }
254
- }
255
- default: {
256
- if (!ruleValue.ruleContent) {
257
- let t1;
258
- if ($[7] !== ruleValue.toolName) {
259
- t1 = /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
260
- dimColor: true,
261
- children: [
262
- "Any use of the ",
263
- /* @__PURE__ */ jsx_dev_runtime.jsxDEV(ThemedText, {
264
- bold: true,
265
- children: ruleValue.toolName
266
- }, undefined, false, undefined, this),
267
- " tool"
268
- ]
269
- }, undefined, true, undefined, this);
270
- $[7] = ruleValue.toolName;
271
- $[8] = t1;
272
- } else {
273
- t1 = $[8];
274
- }
275
- return t1;
276
- } else {
277
- return null;
278
- }
279
- }
280
- }
281
- }
282
- var import_compiler_runtime, jsx_dev_runtime;
283
- var init_PermissionRuleDescription = __esm(() => {
284
- init_ink();
285
- init_BashTool();
286
- import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
287
- jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
288
- });
289
-
290
- // src/components/permissions/rules/AddPermissionRules.tsx
291
- function optionForPermissionSaveDestination(saveDestination) {
292
- switch (saveDestination) {
293
- case "localSettings":
294
- return {
295
- label: "Project settings (local)",
296
- description: `Saved in ${getRelativeSettingsFilePathForSource("localSettings")}`,
297
- value: saveDestination
298
- };
299
- case "projectSettings":
300
- return {
301
- label: "Project settings",
302
- description: `Checked in at ${getRelativeSettingsFilePathForSource("projectSettings")}`,
303
- value: saveDestination
304
- };
305
- case "userSettings":
306
- return {
307
- label: "User settings",
308
- description: `Saved in at ~/.claude/settings.json`,
309
- value: saveDestination
310
- };
311
- }
312
- }
313
- function AddPermissionRules(t0) {
314
- const $ = import_compiler_runtime2.c(26);
315
- const {
316
- onAddRules,
317
- onCancel,
318
- ruleValues,
319
- ruleBehavior,
320
- initialContext,
321
- setToolPermissionContext
322
- } = t0;
323
- let t1;
324
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
325
- t1 = SOURCES.map(optionForPermissionSaveDestination);
326
- $[0] = t1;
327
- } else {
328
- t1 = $[0];
329
- }
330
- const allOptions = t1;
331
- let t2;
332
- if ($[1] !== initialContext || $[2] !== onAddRules || $[3] !== onCancel || $[4] !== ruleBehavior || $[5] !== ruleValues || $[6] !== setToolPermissionContext) {
333
- t2 = (selectedValue) => {
334
- if (selectedValue === "cancel") {
335
- onCancel();
336
- return;
337
- } else {
338
- if (SOURCES.includes(selectedValue)) {
339
- const destination = selectedValue;
340
- const updatedContext = applyPermissionUpdate(initialContext, {
341
- type: "addRules",
342
- rules: ruleValues,
343
- behavior: ruleBehavior,
344
- destination
345
- });
346
- persistPermissionUpdate({
347
- type: "addRules",
348
- rules: ruleValues,
349
- behavior: ruleBehavior,
350
- destination
351
- });
352
- setToolPermissionContext(updatedContext);
353
- const rules = ruleValues.map((ruleValue) => ({
354
- ruleValue,
355
- ruleBehavior,
356
- source: destination
357
- }));
358
- const sandboxAutoAllowEnabled = SandboxManager.isSandboxingEnabled() && SandboxManager.isAutoAllowBashIfSandboxedEnabled();
359
- const allUnreachable = detectUnreachableRules(updatedContext, {
360
- sandboxAutoAllowEnabled
361
- });
362
- const newUnreachable = allUnreachable.filter((u) => ruleValues.some((rv) => rv.toolName === u.rule.ruleValue.toolName && rv.ruleContent === u.rule.ruleValue.ruleContent));
363
- onAddRules(rules, newUnreachable.length > 0 ? newUnreachable : undefined);
364
- }
365
- }
366
- };
367
- $[1] = initialContext;
368
- $[2] = onAddRules;
369
- $[3] = onCancel;
370
- $[4] = ruleBehavior;
371
- $[5] = ruleValues;
372
- $[6] = setToolPermissionContext;
373
- $[7] = t2;
374
- } else {
375
- t2 = $[7];
376
- }
377
- const onSelect = t2;
378
- let t3;
379
- if ($[8] !== ruleValues.length) {
380
- t3 = plural(ruleValues.length, "rule");
381
- $[8] = ruleValues.length;
382
- $[9] = t3;
383
- } else {
384
- t3 = $[9];
385
- }
386
- const title = `Add ${ruleBehavior} permission ${t3}`;
387
- let t4;
388
- if ($[10] !== ruleValues) {
389
- t4 = ruleValues.map(_temp);
390
- $[10] = ruleValues;
391
- $[11] = t4;
392
- } else {
393
- t4 = $[11];
394
- }
395
- let t5;
396
- if ($[12] !== t4) {
397
- t5 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
398
- flexDirection: "column",
399
- paddingX: 2,
400
- children: t4
401
- }, undefined, false, undefined, this);
402
- $[12] = t4;
403
- $[13] = t5;
404
- } else {
405
- t5 = $[13];
406
- }
407
- const t6 = ruleValues.length === 1 ? "Where should this rule be saved?" : "Where should these rules be saved?";
408
- let t7;
409
- if ($[14] !== t6) {
410
- t7 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
411
- children: t6
412
- }, undefined, false, undefined, this);
413
- $[14] = t6;
414
- $[15] = t7;
415
- } else {
416
- t7 = $[15];
417
- }
418
- let t8;
419
- if ($[16] !== onSelect) {
420
- t8 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Select, {
421
- options: allOptions,
422
- onChange: onSelect
423
- }, undefined, false, undefined, this);
424
- $[16] = onSelect;
425
- $[17] = t8;
426
- } else {
427
- t8 = $[17];
428
- }
429
- let t9;
430
- if ($[18] !== t7 || $[19] !== t8) {
431
- t9 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
432
- flexDirection: "column",
433
- marginY: 1,
434
- children: [
435
- t7,
436
- t8
437
- ]
438
- }, undefined, true, undefined, this);
439
- $[18] = t7;
440
- $[19] = t8;
441
- $[20] = t9;
442
- } else {
443
- t9 = $[20];
444
- }
445
- let t10;
446
- if ($[21] !== onCancel || $[22] !== t5 || $[23] !== t9 || $[24] !== title) {
447
- t10 = /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(Dialog, {
448
- title,
449
- onCancel,
450
- color: "permission",
451
- children: [
452
- t5,
453
- t9
454
- ]
455
- }, undefined, true, undefined, this);
456
- $[21] = onCancel;
457
- $[22] = t5;
458
- $[23] = t9;
459
- $[24] = title;
460
- $[25] = t10;
461
- } else {
462
- t10 = $[25];
463
- }
464
- return t10;
465
- }
466
- function _temp(ruleValue_0) {
467
- return /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedBox_default, {
468
- flexDirection: "column",
469
- children: [
470
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(ThemedText, {
471
- bold: true,
472
- children: permissionRuleValueToString(ruleValue_0)
473
- }, undefined, false, undefined, this),
474
- /* @__PURE__ */ jsx_dev_runtime2.jsxDEV(PermissionRuleDescription, {
475
- ruleValue: ruleValue_0
476
- }, undefined, false, undefined, this)
477
- ]
478
- }, permissionRuleValueToString(ruleValue_0), true, undefined, this);
479
- }
480
- var import_compiler_runtime2, jsx_dev_runtime2;
481
- var init_AddPermissionRules = __esm(() => {
482
- init_select();
483
- init_ink();
484
- init_PermissionUpdate();
485
- init_permissionRuleParser();
486
- init_shadowedRuleDetection();
487
- init_sandbox_adapter();
488
- init_constants();
489
- init_settings();
490
- init_stringUtils();
491
- init_Dialog();
492
- init_PermissionRuleDescription();
493
- import_compiler_runtime2 = __toESM(require_compiler_runtime(), 1);
494
- jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
495
- });
496
-
497
- // src/components/permissions/rules/PermissionRuleInput.tsx
498
- function PermissionRuleInput(t0) {
499
- const $ = import_compiler_runtime3.c(24);
500
- const {
501
- onCancel,
502
- onSubmit,
503
- ruleBehavior
504
- } = t0;
505
- const [inputValue, setInputValue] = import_react.useState("");
506
- const [cursorOffset, setCursorOffset] = import_react.useState(0);
507
- const exitState = useExitOnCtrlCDWithKeybindings();
508
- let t1;
509
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
510
- t1 = {
511
- context: "Settings"
512
- };
513
- $[0] = t1;
514
- } else {
515
- t1 = $[0];
516
- }
517
- useKeybinding("confirm:no", onCancel, t1);
518
- const {
519
- columns
520
- } = useTerminalSize();
521
- const textInputColumns = columns - 6;
522
- let t2;
523
- if ($[1] !== onSubmit || $[2] !== ruleBehavior) {
524
- t2 = (value) => {
525
- const trimmedValue = value.trim();
526
- if (trimmedValue.length === 0) {
527
- return;
528
- }
529
- const ruleValue = permissionRuleValueFromString(trimmedValue);
530
- onSubmit(ruleValue, ruleBehavior);
531
- };
532
- $[1] = onSubmit;
533
- $[2] = ruleBehavior;
534
- $[3] = t2;
535
- } else {
536
- t2 = $[3];
537
- }
538
- const handleSubmit = t2;
539
- let t3;
540
- if ($[4] !== ruleBehavior) {
541
- t3 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
542
- bold: true,
543
- color: "permission",
544
- children: [
545
- "Add ",
546
- ruleBehavior,
547
- " permission rule"
548
- ]
549
- }, undefined, true, undefined, this);
550
- $[4] = ruleBehavior;
551
- $[5] = t3;
552
- } else {
553
- t3 = $[5];
554
- }
555
- let t4;
556
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
557
- t4 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(Newline, {}, undefined, false, undefined, this);
558
- $[6] = t4;
559
- } else {
560
- t4 = $[6];
561
- }
562
- let t5;
563
- let t6;
564
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
565
- t5 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
566
- bold: true,
567
- children: permissionRuleValueToString({
568
- toolName: WebFetchTool.name
569
- })
570
- }, undefined, false, undefined, this);
571
- t6 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
572
- bold: false,
573
- children: " or "
574
- }, undefined, false, undefined, this);
575
- $[7] = t5;
576
- $[8] = t6;
577
- } else {
578
- t5 = $[7];
579
- t6 = $[8];
580
- }
581
- let t7;
582
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
583
- t7 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
584
- children: [
585
- "Permission rules are a tool name, optionally followed by a specifier in parentheses.",
586
- t4,
587
- "e.g.,",
588
- " ",
589
- t5,
590
- t6,
591
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
592
- bold: true,
593
- children: permissionRuleValueToString({
594
- toolName: BashTool.name,
595
- ruleContent: "ls:*"
596
- })
597
- }, undefined, false, undefined, this)
598
- ]
599
- }, undefined, true, undefined, this);
600
- $[9] = t7;
601
- } else {
602
- t7 = $[9];
603
- }
604
- let t8;
605
- if ($[10] !== cursorOffset || $[11] !== handleSubmit || $[12] !== inputValue || $[13] !== textInputColumns) {
606
- t8 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
607
- flexDirection: "column",
608
- children: [
609
- t7,
610
- /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
611
- borderDimColor: true,
612
- borderStyle: "round",
613
- marginY: 1,
614
- paddingLeft: 1,
615
- children: /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(TextInput, {
616
- showCursor: true,
617
- value: inputValue,
618
- onChange: setInputValue,
619
- onSubmit: handleSubmit,
620
- placeholder: `Enter permission rule${figures_default.ellipsis}`,
621
- columns: textInputColumns,
622
- cursorOffset,
623
- onChangeCursorOffset: setCursorOffset
624
- }, undefined, false, undefined, this)
625
- }, undefined, false, undefined, this)
626
- ]
627
- }, undefined, true, undefined, this);
628
- $[10] = cursorOffset;
629
- $[11] = handleSubmit;
630
- $[12] = inputValue;
631
- $[13] = textInputColumns;
632
- $[14] = t8;
633
- } else {
634
- t8 = $[14];
635
- }
636
- let t9;
637
- if ($[15] !== t3 || $[16] !== t8) {
638
- t9 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
639
- flexDirection: "column",
640
- gap: 1,
641
- borderStyle: "round",
642
- paddingLeft: 1,
643
- paddingRight: 1,
644
- borderColor: "permission",
645
- children: [
646
- t3,
647
- t8
648
- ]
649
- }, undefined, true, undefined, this);
650
- $[15] = t3;
651
- $[16] = t8;
652
- $[17] = t9;
653
- } else {
654
- t9 = $[17];
655
- }
656
- let t10;
657
- if ($[18] !== exitState.keyName || $[19] !== exitState.pending) {
658
- t10 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedBox_default, {
659
- marginLeft: 3,
660
- children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
661
- dimColor: true,
662
- children: [
663
- "Press ",
664
- exitState.keyName,
665
- " again to exit"
666
- ]
667
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(ThemedText, {
668
- dimColor: true,
669
- children: "Enter to submit \xB7 Esc to cancel"
670
- }, undefined, false, undefined, this)
671
- }, undefined, false, undefined, this);
672
- $[18] = exitState.keyName;
673
- $[19] = exitState.pending;
674
- $[20] = t10;
675
- } else {
676
- t10 = $[20];
677
- }
678
- let t11;
679
- if ($[21] !== t10 || $[22] !== t9) {
680
- t11 = /* @__PURE__ */ jsx_dev_runtime3.jsxDEV(jsx_dev_runtime3.Fragment, {
681
- children: [
682
- t9,
683
- t10
684
- ]
685
- }, undefined, true, undefined, this);
686
- $[21] = t10;
687
- $[22] = t9;
688
- $[23] = t11;
689
- } else {
690
- t11 = $[23];
691
- }
692
- return t11;
693
- }
694
- var import_compiler_runtime3, import_react, jsx_dev_runtime3;
695
- var init_PermissionRuleInput = __esm(() => {
696
- init_figures();
697
- init_TextInput();
698
- init_useExitOnCtrlCDWithKeybindings();
699
- init_useTerminalSize();
700
- init_ink();
701
- init_useKeybinding();
702
- init_BashTool();
703
- init_WebFetchTool();
704
- init_permissionRuleParser();
705
- import_compiler_runtime3 = __toESM(require_compiler_runtime(), 1);
706
- import_react = __toESM(require_react(), 1);
707
- jsx_dev_runtime3 = __toESM(require_jsx_dev_runtime(), 1);
708
- });
709
-
710
- // src/components/permissions/rules/RecentDenialsTab.tsx
711
- function RecentDenialsTab(t0) {
712
- const $ = import_compiler_runtime4.c(30);
713
- const {
714
- onHeaderFocusChange,
715
- onStateChange
716
- } = t0;
717
- const {
718
- headerFocused,
719
- focusHeader
720
- } = useTabHeaderFocus();
721
- let t1;
722
- let t2;
723
- if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
724
- t1 = () => {
725
- onHeaderFocusChange?.(headerFocused);
726
- };
727
- t2 = [headerFocused, onHeaderFocusChange];
728
- $[0] = headerFocused;
729
- $[1] = onHeaderFocusChange;
730
- $[2] = t1;
731
- $[3] = t2;
732
- } else {
733
- t1 = $[2];
734
- t2 = $[3];
735
- }
736
- import_react2.useEffect(t1, t2);
737
- const [denials] = import_react2.useState(_temp4);
738
- const [approved, setApproved] = import_react2.useState(_temp2);
739
- const [retry, setRetry] = import_react2.useState(_temp3);
740
- const [focusedIdx, setFocusedIdx] = import_react2.useState(0);
741
- let t3;
742
- let t4;
743
- if ($[4] !== approved || $[5] !== denials || $[6] !== onStateChange || $[7] !== retry) {
744
- t3 = () => {
745
- onStateChange({
746
- approved,
747
- retry,
748
- denials
749
- });
750
- };
751
- t4 = [approved, retry, denials, onStateChange];
752
- $[4] = approved;
753
- $[5] = denials;
754
- $[6] = onStateChange;
755
- $[7] = retry;
756
- $[8] = t3;
757
- $[9] = t4;
758
- } else {
759
- t3 = $[8];
760
- t4 = $[9];
761
- }
762
- import_react2.useEffect(t3, t4);
763
- let t5;
764
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
765
- t5 = (value) => {
766
- const idx = Number(value);
767
- setApproved((prev) => {
768
- const next = new Set(prev);
769
- if (next.has(idx)) {
770
- next.delete(idx);
771
- } else {
772
- next.add(idx);
773
- }
774
- return next;
775
- });
776
- };
777
- $[10] = t5;
778
- } else {
779
- t5 = $[10];
780
- }
781
- const handleSelect = t5;
782
- let t6;
783
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
784
- t6 = (value_0) => {
785
- setFocusedIdx(Number(value_0));
786
- };
787
- $[11] = t6;
788
- } else {
789
- t6 = $[11];
790
- }
791
- const handleFocus = t6;
792
- let t7;
793
- if ($[12] !== focusedIdx) {
794
- t7 = (input, _key) => {
795
- if (input === "r") {
796
- setRetry((prev_0) => {
797
- const next_0 = new Set(prev_0);
798
- if (next_0.has(focusedIdx)) {
799
- next_0.delete(focusedIdx);
800
- } else {
801
- next_0.add(focusedIdx);
802
- }
803
- return next_0;
804
- });
805
- setApproved((prev_1) => {
806
- if (prev_1.has(focusedIdx)) {
807
- return prev_1;
808
- }
809
- const next_1 = new Set(prev_1);
810
- next_1.add(focusedIdx);
811
- return next_1;
812
- });
813
- }
814
- };
815
- $[12] = focusedIdx;
816
- $[13] = t7;
817
- } else {
818
- t7 = $[13];
819
- }
820
- const t8 = denials.length > 0;
821
- let t9;
822
- if ($[14] !== t8) {
823
- t9 = {
824
- isActive: t8
825
- };
826
- $[14] = t8;
827
- $[15] = t9;
828
- } else {
829
- t9 = $[15];
830
- }
831
- use_input_default(t7, t9);
832
- if (denials.length === 0) {
833
- let t102;
834
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
835
- t102 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
836
- dimColor: true,
837
- children: "No recent denials. Commands denied by the auto mode classifier will appear here."
838
- }, undefined, false, undefined, this);
839
- $[16] = t102;
840
- } else {
841
- t102 = $[16];
842
- }
843
- return t102;
844
- }
845
- let t10;
846
- if ($[17] !== approved || $[18] !== denials || $[19] !== retry) {
847
- let t112;
848
- if ($[21] !== approved || $[22] !== retry) {
849
- t112 = (d, idx_0) => {
850
- const isApproved = approved.has(idx_0);
851
- const suffix = retry.has(idx_0) ? " (retry)" : "";
852
- return {
853
- label: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
854
- children: [
855
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(StatusIcon, {
856
- status: isApproved ? "success" : "error",
857
- withSpace: true
858
- }, undefined, false, undefined, this),
859
- d.display,
860
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
861
- dimColor: true,
862
- children: suffix
863
- }, undefined, false, undefined, this)
864
- ]
865
- }, undefined, true, undefined, this),
866
- value: String(idx_0)
867
- };
868
- };
869
- $[21] = approved;
870
- $[22] = retry;
871
- $[23] = t112;
872
- } else {
873
- t112 = $[23];
874
- }
875
- t10 = denials.map(t112);
876
- $[17] = approved;
877
- $[18] = denials;
878
- $[19] = retry;
879
- $[20] = t10;
880
- } else {
881
- t10 = $[20];
882
- }
883
- const options = t10;
884
- let t11;
885
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
886
- t11 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedText, {
887
- children: "Commands recently denied by the auto mode classifier."
888
- }, undefined, false, undefined, this);
889
- $[24] = t11;
890
- } else {
891
- t11 = $[24];
892
- }
893
- const t12 = Math.min(10, options.length);
894
- let t13;
895
- if ($[25] !== focusHeader || $[26] !== headerFocused || $[27] !== options || $[28] !== t12) {
896
- t13 = /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
897
- flexDirection: "column",
898
- children: [
899
- t11,
900
- /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ThemedBox_default, {
901
- marginTop: 1,
902
- children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Select, {
903
- options,
904
- onChange: handleSelect,
905
- onFocus: handleFocus,
906
- visibleOptionCount: t12,
907
- isDisabled: headerFocused,
908
- onUpFromFirstItem: focusHeader
909
- }, undefined, false, undefined, this)
910
- }, undefined, false, undefined, this)
911
- ]
912
- }, undefined, true, undefined, this);
913
- $[25] = focusHeader;
914
- $[26] = headerFocused;
915
- $[27] = options;
916
- $[28] = t12;
917
- $[29] = t13;
918
- } else {
919
- t13 = $[29];
920
- }
921
- return t13;
922
- }
923
- function _temp3() {
924
- return new Set;
925
- }
926
- function _temp2() {
927
- return new Set;
928
- }
929
- function _temp4() {
930
- return getAutoModeDenials();
931
- }
932
- var import_compiler_runtime4, import_react2, jsx_dev_runtime4;
933
- var init_RecentDenialsTab = __esm(() => {
934
- init_ink();
935
- init_autoModeDenials();
936
- init_select();
937
- init_StatusIcon();
938
- init_Tabs();
939
- import_compiler_runtime4 = __toESM(require_compiler_runtime(), 1);
940
- import_react2 = __toESM(require_react(), 1);
941
- jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
942
- });
943
-
944
- // src/components/permissions/rules/RemoveWorkspaceDirectory.tsx
945
- function RemoveWorkspaceDirectory(t0) {
946
- const $ = import_compiler_runtime5.c(19);
947
- const {
948
- directoryPath,
949
- onRemove,
950
- onCancel,
951
- permissionContext,
952
- setPermissionContext
953
- } = t0;
954
- let t1;
955
- if ($[0] !== directoryPath || $[1] !== onRemove || $[2] !== permissionContext || $[3] !== setPermissionContext) {
956
- t1 = () => {
957
- const updatedContext = applyPermissionUpdate(permissionContext, {
958
- type: "removeDirectories",
959
- directories: [directoryPath],
960
- destination: "session"
961
- });
962
- setPermissionContext(updatedContext);
963
- onRemove();
964
- };
965
- $[0] = directoryPath;
966
- $[1] = onRemove;
967
- $[2] = permissionContext;
968
- $[3] = setPermissionContext;
969
- $[4] = t1;
970
- } else {
971
- t1 = $[4];
972
- }
973
- const handleRemove = t1;
974
- let t2;
975
- if ($[5] !== handleRemove || $[6] !== onCancel) {
976
- t2 = (value) => {
977
- if (value === "yes") {
978
- handleRemove();
979
- } else {
980
- onCancel();
981
- }
982
- };
983
- $[5] = handleRemove;
984
- $[6] = onCancel;
985
- $[7] = t2;
986
- } else {
987
- t2 = $[7];
988
- }
989
- const handleSelect = t2;
990
- let t3;
991
- if ($[8] !== directoryPath) {
992
- t3 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedBox_default, {
993
- marginX: 2,
994
- flexDirection: "column",
995
- children: /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
996
- bold: true,
997
- children: directoryPath
998
- }, undefined, false, undefined, this)
999
- }, undefined, false, undefined, this);
1000
- $[8] = directoryPath;
1001
- $[9] = t3;
1002
- } else {
1003
- t3 = $[9];
1004
- }
1005
- let t4;
1006
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1007
- t4 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(ThemedText, {
1008
- children: "Claude Code will no longer have access to files in this directory."
1009
- }, undefined, false, undefined, this);
1010
- $[10] = t4;
1011
- } else {
1012
- t4 = $[10];
1013
- }
1014
- let t5;
1015
- if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
1016
- t5 = [{
1017
- label: "Yes",
1018
- value: "yes"
1019
- }, {
1020
- label: "No",
1021
- value: "no"
1022
- }];
1023
- $[11] = t5;
1024
- } else {
1025
- t5 = $[11];
1026
- }
1027
- let t6;
1028
- if ($[12] !== handleSelect || $[13] !== onCancel) {
1029
- t6 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Select, {
1030
- onChange: handleSelect,
1031
- onCancel,
1032
- options: t5
1033
- }, undefined, false, undefined, this);
1034
- $[12] = handleSelect;
1035
- $[13] = onCancel;
1036
- $[14] = t6;
1037
- } else {
1038
- t6 = $[14];
1039
- }
1040
- let t7;
1041
- if ($[15] !== onCancel || $[16] !== t3 || $[17] !== t6) {
1042
- t7 = /* @__PURE__ */ jsx_dev_runtime5.jsxDEV(Dialog, {
1043
- title: "Remove directory from workspace?",
1044
- onCancel,
1045
- color: "error",
1046
- children: [
1047
- t3,
1048
- t4,
1049
- t6
1050
- ]
1051
- }, undefined, true, undefined, this);
1052
- $[15] = onCancel;
1053
- $[16] = t3;
1054
- $[17] = t6;
1055
- $[18] = t7;
1056
- } else {
1057
- t7 = $[18];
1058
- }
1059
- return t7;
1060
- }
1061
- var import_compiler_runtime5, jsx_dev_runtime5;
1062
- var init_RemoveWorkspaceDirectory = __esm(() => {
1063
- init_select();
1064
- init_ink();
1065
- init_PermissionUpdate();
1066
- init_Dialog();
1067
- import_compiler_runtime5 = __toESM(require_compiler_runtime(), 1);
1068
- jsx_dev_runtime5 = __toESM(require_jsx_dev_runtime(), 1);
1069
- });
1070
-
1071
- // src/components/permissions/rules/WorkspaceTab.tsx
1072
- function WorkspaceTab(t0) {
1073
- const $ = import_compiler_runtime6.c(23);
1074
- const {
1075
- onExit,
1076
- toolPermissionContext,
1077
- onRequestAddDirectory,
1078
- onRequestRemoveDirectory,
1079
- onHeaderFocusChange
1080
- } = t0;
1081
- const {
1082
- headerFocused,
1083
- focusHeader
1084
- } = useTabHeaderFocus();
1085
- let t1;
1086
- let t2;
1087
- if ($[0] !== headerFocused || $[1] !== onHeaderFocusChange) {
1088
- t1 = () => {
1089
- onHeaderFocusChange?.(headerFocused);
1090
- };
1091
- t2 = [headerFocused, onHeaderFocusChange];
1092
- $[0] = headerFocused;
1093
- $[1] = onHeaderFocusChange;
1094
- $[2] = t1;
1095
- $[3] = t2;
1096
- } else {
1097
- t1 = $[2];
1098
- t2 = $[3];
1099
- }
1100
- import_react3.useEffect(t1, t2);
1101
- let t3;
1102
- if ($[4] !== toolPermissionContext.additionalWorkingDirectories) {
1103
- t3 = Array.from(toolPermissionContext.additionalWorkingDirectories.keys()).map(_temp6);
1104
- $[4] = toolPermissionContext.additionalWorkingDirectories;
1105
- $[5] = t3;
1106
- } else {
1107
- t3 = $[5];
1108
- }
1109
- const additionalDirectories = t3;
1110
- let t4;
1111
- if ($[6] !== additionalDirectories || $[7] !== onRequestAddDirectory || $[8] !== onRequestRemoveDirectory) {
1112
- t4 = (selectedValue) => {
1113
- if (selectedValue === "add-directory") {
1114
- onRequestAddDirectory();
1115
- return;
1116
- }
1117
- const directory = additionalDirectories.find((d) => d.path === selectedValue);
1118
- if (directory && directory.isDeletable) {
1119
- onRequestRemoveDirectory(directory.path);
1120
- }
1121
- };
1122
- $[6] = additionalDirectories;
1123
- $[7] = onRequestAddDirectory;
1124
- $[8] = onRequestRemoveDirectory;
1125
- $[9] = t4;
1126
- } else {
1127
- t4 = $[9];
1128
- }
1129
- const handleDirectorySelect = t4;
1130
- let t5;
1131
- if ($[10] !== onExit) {
1132
- t5 = () => onExit("Workspace dialog dismissed", {
1133
- display: "system"
1134
- });
1135
- $[10] = onExit;
1136
- $[11] = t5;
1137
- } else {
1138
- t5 = $[11];
1139
- }
1140
- const handleCancel = t5;
1141
- let opts;
1142
- if ($[12] !== additionalDirectories) {
1143
- opts = additionalDirectories.map(_temp22);
1144
- let t62;
1145
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
1146
- t62 = {
1147
- label: `Add directory${figures_default.ellipsis}`,
1148
- value: "add-directory"
1149
- };
1150
- $[14] = t62;
1151
- } else {
1152
- t62 = $[14];
1153
- }
1154
- opts.push(t62);
1155
- $[12] = additionalDirectories;
1156
- $[13] = opts;
1157
- } else {
1158
- opts = $[13];
1159
- }
1160
- const options = opts;
1161
- let t6;
1162
- if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1163
- t6 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1164
- flexDirection: "row",
1165
- marginTop: 1,
1166
- marginLeft: 2,
1167
- gap: 1,
1168
- children: [
1169
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1170
- children: `- ${getOriginalCwd()}`
1171
- }, undefined, false, undefined, this),
1172
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedText, {
1173
- dimColor: true,
1174
- children: "(Original working directory)"
1175
- }, undefined, false, undefined, this)
1176
- ]
1177
- }, undefined, true, undefined, this);
1178
- $[15] = t6;
1179
- } else {
1180
- t6 = $[15];
1181
- }
1182
- const t7 = Math.min(10, options.length);
1183
- let t8;
1184
- if ($[16] !== focusHeader || $[17] !== handleCancel || $[18] !== handleDirectorySelect || $[19] !== headerFocused || $[20] !== options || $[21] !== t7) {
1185
- t8 = /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(ThemedBox_default, {
1186
- flexDirection: "column",
1187
- marginBottom: 1,
1188
- children: [
1189
- t6,
1190
- /* @__PURE__ */ jsx_dev_runtime6.jsxDEV(Select, {
1191
- options,
1192
- onChange: handleDirectorySelect,
1193
- onCancel: handleCancel,
1194
- visibleOptionCount: t7,
1195
- onUpFromFirstItem: focusHeader,
1196
- isDisabled: headerFocused
1197
- }, undefined, false, undefined, this)
1198
- ]
1199
- }, undefined, true, undefined, this);
1200
- $[16] = focusHeader;
1201
- $[17] = handleCancel;
1202
- $[18] = handleDirectorySelect;
1203
- $[19] = headerFocused;
1204
- $[20] = options;
1205
- $[21] = t7;
1206
- $[22] = t8;
1207
- } else {
1208
- t8 = $[22];
1209
- }
1210
- return t8;
1211
- }
1212
- function _temp22(dir) {
1213
- return {
1214
- label: dir.path,
1215
- value: dir.path
1216
- };
1217
- }
1218
- function _temp6(path) {
1219
- return {
1220
- path,
1221
- isCurrent: false,
1222
- isDeletable: true
1223
- };
1224
- }
1225
- var import_compiler_runtime6, import_react3, jsx_dev_runtime6;
1226
- var init_WorkspaceTab = __esm(() => {
1227
- init_figures();
1228
- init_state();
1229
- init_select();
1230
- init_ink();
1231
- init_Tabs();
1232
- import_compiler_runtime6 = __toESM(require_compiler_runtime(), 1);
1233
- import_react3 = __toESM(require_react(), 1);
1234
- jsx_dev_runtime6 = __toESM(require_jsx_dev_runtime(), 1);
1235
- });
1236
-
1237
- // src/components/permissions/rules/PermissionRuleList.tsx
1238
- function RuleSourceText(t0) {
1239
- const $ = import_compiler_runtime7.c(4);
1240
- const {
1241
- rule
1242
- } = t0;
1243
- let t1;
1244
- if ($[0] !== rule.source) {
1245
- t1 = permissionRuleSourceDisplayString(rule.source);
1246
- $[0] = rule.source;
1247
- $[1] = t1;
1248
- } else {
1249
- t1 = $[1];
1250
- }
1251
- const t2 = `From ${t1}`;
1252
- let t3;
1253
- if ($[2] !== t2) {
1254
- t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1255
- dimColor: true,
1256
- children: t2
1257
- }, undefined, false, undefined, this);
1258
- $[2] = t2;
1259
- $[3] = t3;
1260
- } else {
1261
- t3 = $[3];
1262
- }
1263
- return t3;
1264
- }
1265
- function getRuleBehaviorLabel(ruleBehavior) {
1266
- switch (ruleBehavior) {
1267
- case "allow":
1268
- return "allowed";
1269
- case "deny":
1270
- return "denied";
1271
- case "ask":
1272
- return "ask";
1273
- }
1274
- }
1275
- function RuleDetails(t0) {
1276
- const $ = import_compiler_runtime7.c(42);
1277
- const {
1278
- rule,
1279
- onDelete,
1280
- onCancel
1281
- } = t0;
1282
- const exitState = useExitOnCtrlCDWithKeybindings();
1283
- let t1;
1284
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1285
- t1 = {
1286
- context: "Confirmation"
1287
- };
1288
- $[0] = t1;
1289
- } else {
1290
- t1 = $[0];
1291
- }
1292
- useKeybinding("confirm:no", onCancel, t1);
1293
- let t2;
1294
- if ($[1] !== rule.ruleValue) {
1295
- t2 = permissionRuleValueToString(rule.ruleValue);
1296
- $[1] = rule.ruleValue;
1297
- $[2] = t2;
1298
- } else {
1299
- t2 = $[2];
1300
- }
1301
- let t3;
1302
- if ($[3] !== t2) {
1303
- t3 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1304
- bold: true,
1305
- children: t2
1306
- }, undefined, false, undefined, this);
1307
- $[3] = t2;
1308
- $[4] = t3;
1309
- } else {
1310
- t3 = $[4];
1311
- }
1312
- let t4;
1313
- if ($[5] !== rule.ruleValue) {
1314
- t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleDescription, {
1315
- ruleValue: rule.ruleValue
1316
- }, undefined, false, undefined, this);
1317
- $[5] = rule.ruleValue;
1318
- $[6] = t4;
1319
- } else {
1320
- t4 = $[6];
1321
- }
1322
- let t5;
1323
- if ($[7] !== rule) {
1324
- t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleSourceText, {
1325
- rule
1326
- }, undefined, false, undefined, this);
1327
- $[7] = rule;
1328
- $[8] = t5;
1329
- } else {
1330
- t5 = $[8];
1331
- }
1332
- let t6;
1333
- if ($[9] !== t3 || $[10] !== t4 || $[11] !== t5) {
1334
- t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1335
- flexDirection: "column",
1336
- marginX: 2,
1337
- children: [
1338
- t3,
1339
- t4,
1340
- t5
1341
- ]
1342
- }, undefined, true, undefined, this);
1343
- $[9] = t3;
1344
- $[10] = t4;
1345
- $[11] = t5;
1346
- $[12] = t6;
1347
- } else {
1348
- t6 = $[12];
1349
- }
1350
- const ruleDescription = t6;
1351
- let t7;
1352
- if ($[13] !== exitState.keyName || $[14] !== exitState.pending) {
1353
- t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1354
- marginLeft: 3,
1355
- children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1356
- dimColor: true,
1357
- children: [
1358
- "Press ",
1359
- exitState.keyName,
1360
- " again to exit"
1361
- ]
1362
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1363
- dimColor: true,
1364
- children: "Esc to cancel"
1365
- }, undefined, false, undefined, this)
1366
- }, undefined, false, undefined, this);
1367
- $[13] = exitState.keyName;
1368
- $[14] = exitState.pending;
1369
- $[15] = t7;
1370
- } else {
1371
- t7 = $[15];
1372
- }
1373
- const footer = t7;
1374
- if (rule.source === "policySettings") {
1375
- let t82;
1376
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
1377
- t82 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1378
- bold: true,
1379
- color: "permission",
1380
- children: "Rule details"
1381
- }, undefined, false, undefined, this);
1382
- $[16] = t82;
1383
- } else {
1384
- t82 = $[16];
1385
- }
1386
- let t92;
1387
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
1388
- t92 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1389
- italic: true,
1390
- children: [
1391
- "This rule is configured by managed settings and cannot be modified.",
1392
- `
1393
- `,
1394
- "Contact your system administrator for more information."
1395
- ]
1396
- }, undefined, true, undefined, this);
1397
- $[17] = t92;
1398
- } else {
1399
- t92 = $[17];
1400
- }
1401
- let t102;
1402
- if ($[18] !== ruleDescription) {
1403
- t102 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1404
- flexDirection: "column",
1405
- gap: 1,
1406
- borderStyle: "round",
1407
- paddingLeft: 1,
1408
- paddingRight: 1,
1409
- borderColor: "permission",
1410
- children: [
1411
- t82,
1412
- ruleDescription,
1413
- t92
1414
- ]
1415
- }, undefined, true, undefined, this);
1416
- $[18] = ruleDescription;
1417
- $[19] = t102;
1418
- } else {
1419
- t102 = $[19];
1420
- }
1421
- let t112;
1422
- if ($[20] !== footer || $[21] !== t102) {
1423
- t112 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1424
- children: [
1425
- t102,
1426
- footer
1427
- ]
1428
- }, undefined, true, undefined, this);
1429
- $[20] = footer;
1430
- $[21] = t102;
1431
- $[22] = t112;
1432
- } else {
1433
- t112 = $[22];
1434
- }
1435
- return t112;
1436
- }
1437
- let t8;
1438
- if ($[23] !== rule.ruleBehavior) {
1439
- t8 = getRuleBehaviorLabel(rule.ruleBehavior);
1440
- $[23] = rule.ruleBehavior;
1441
- $[24] = t8;
1442
- } else {
1443
- t8 = $[24];
1444
- }
1445
- let t9;
1446
- if ($[25] !== t8) {
1447
- t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1448
- bold: true,
1449
- color: "error",
1450
- children: [
1451
- "Delete ",
1452
- t8,
1453
- " tool?"
1454
- ]
1455
- }, undefined, true, undefined, this);
1456
- $[25] = t8;
1457
- $[26] = t9;
1458
- } else {
1459
- t9 = $[26];
1460
- }
1461
- let t10;
1462
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1463
- t10 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1464
- children: "Are you sure you want to delete this permission rule?"
1465
- }, undefined, false, undefined, this);
1466
- $[27] = t10;
1467
- } else {
1468
- t10 = $[27];
1469
- }
1470
- let t11;
1471
- if ($[28] !== onCancel || $[29] !== onDelete) {
1472
- t11 = (_) => _ === "yes" ? onDelete() : onCancel();
1473
- $[28] = onCancel;
1474
- $[29] = onDelete;
1475
- $[30] = t11;
1476
- } else {
1477
- t11 = $[30];
1478
- }
1479
- let t12;
1480
- if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
1481
- t12 = [{
1482
- label: "Yes",
1483
- value: "yes"
1484
- }, {
1485
- label: "No",
1486
- value: "no"
1487
- }];
1488
- $[31] = t12;
1489
- } else {
1490
- t12 = $[31];
1491
- }
1492
- let t13;
1493
- if ($[32] !== onCancel || $[33] !== t11) {
1494
- t13 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1495
- onChange: t11,
1496
- onCancel,
1497
- options: t12
1498
- }, undefined, false, undefined, this);
1499
- $[32] = onCancel;
1500
- $[33] = t11;
1501
- $[34] = t13;
1502
- } else {
1503
- t13 = $[34];
1504
- }
1505
- let t14;
1506
- if ($[35] !== ruleDescription || $[36] !== t13 || $[37] !== t9) {
1507
- t14 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1508
- flexDirection: "column",
1509
- gap: 1,
1510
- borderStyle: "round",
1511
- paddingLeft: 1,
1512
- paddingRight: 1,
1513
- borderColor: "error",
1514
- children: [
1515
- t9,
1516
- ruleDescription,
1517
- t10,
1518
- t13
1519
- ]
1520
- }, undefined, true, undefined, this);
1521
- $[35] = ruleDescription;
1522
- $[36] = t13;
1523
- $[37] = t9;
1524
- $[38] = t14;
1525
- } else {
1526
- t14 = $[38];
1527
- }
1528
- let t15;
1529
- if ($[39] !== footer || $[40] !== t14) {
1530
- t15 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
1531
- children: [
1532
- t14,
1533
- footer
1534
- ]
1535
- }, undefined, true, undefined, this);
1536
- $[39] = footer;
1537
- $[40] = t14;
1538
- $[41] = t15;
1539
- } else {
1540
- t15 = $[41];
1541
- }
1542
- return t15;
1543
- }
1544
- function RulesTabContent(props) {
1545
- const $ = import_compiler_runtime7.c(26);
1546
- const {
1547
- options,
1548
- searchQuery,
1549
- isSearchMode,
1550
- isFocused,
1551
- onSelect,
1552
- onCancel,
1553
- lastFocusedRuleKey,
1554
- cursorOffset,
1555
- onHeaderFocusChange
1556
- } = props;
1557
- const tabWidth = useTabsWidth();
1558
- const {
1559
- headerFocused,
1560
- focusHeader,
1561
- blurHeader
1562
- } = useTabHeaderFocus();
1563
- let t0;
1564
- let t1;
1565
- if ($[0] !== blurHeader || $[1] !== headerFocused || $[2] !== isSearchMode) {
1566
- t0 = () => {
1567
- if (isSearchMode && headerFocused) {
1568
- blurHeader();
1569
- }
1570
- };
1571
- t1 = [isSearchMode, headerFocused, blurHeader];
1572
- $[0] = blurHeader;
1573
- $[1] = headerFocused;
1574
- $[2] = isSearchMode;
1575
- $[3] = t0;
1576
- $[4] = t1;
1577
- } else {
1578
- t0 = $[3];
1579
- t1 = $[4];
1580
- }
1581
- import_react4.useEffect(t0, t1);
1582
- let t2;
1583
- let t3;
1584
- if ($[5] !== headerFocused || $[6] !== onHeaderFocusChange) {
1585
- t2 = () => {
1586
- onHeaderFocusChange?.(headerFocused);
1587
- };
1588
- t3 = [headerFocused, onHeaderFocusChange];
1589
- $[5] = headerFocused;
1590
- $[6] = onHeaderFocusChange;
1591
- $[7] = t2;
1592
- $[8] = t3;
1593
- } else {
1594
- t2 = $[7];
1595
- t3 = $[8];
1596
- }
1597
- import_react4.useEffect(t2, t3);
1598
- const t4 = isSearchMode && !headerFocused;
1599
- let t5;
1600
- if ($[9] !== cursorOffset || $[10] !== isFocused || $[11] !== searchQuery || $[12] !== t4 || $[13] !== tabWidth) {
1601
- t5 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1602
- marginBottom: 1,
1603
- flexDirection: "column",
1604
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(SearchBox, {
1605
- query: searchQuery,
1606
- isFocused: t4,
1607
- isTerminalFocused: isFocused,
1608
- width: tabWidth,
1609
- cursorOffset
1610
- }, undefined, false, undefined, this)
1611
- }, undefined, false, undefined, this);
1612
- $[9] = cursorOffset;
1613
- $[10] = isFocused;
1614
- $[11] = searchQuery;
1615
- $[12] = t4;
1616
- $[13] = tabWidth;
1617
- $[14] = t5;
1618
- } else {
1619
- t5 = $[14];
1620
- }
1621
- const t6 = Math.min(10, options.length);
1622
- const t7 = isSearchMode || headerFocused;
1623
- let t8;
1624
- if ($[15] !== focusHeader || $[16] !== lastFocusedRuleKey || $[17] !== onCancel || $[18] !== onSelect || $[19] !== options || $[20] !== t6 || $[21] !== t7) {
1625
- t8 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Select, {
1626
- options,
1627
- onChange: onSelect,
1628
- onCancel,
1629
- visibleOptionCount: t6,
1630
- isDisabled: t7,
1631
- defaultFocusValue: lastFocusedRuleKey,
1632
- onUpFromFirstItem: focusHeader
1633
- }, undefined, false, undefined, this);
1634
- $[15] = focusHeader;
1635
- $[16] = lastFocusedRuleKey;
1636
- $[17] = onCancel;
1637
- $[18] = onSelect;
1638
- $[19] = options;
1639
- $[20] = t6;
1640
- $[21] = t7;
1641
- $[22] = t8;
1642
- } else {
1643
- t8 = $[22];
1644
- }
1645
- let t9;
1646
- if ($[23] !== t5 || $[24] !== t8) {
1647
- t9 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
1648
- flexDirection: "column",
1649
- children: [
1650
- t5,
1651
- t8
1652
- ]
1653
- }, undefined, true, undefined, this);
1654
- $[23] = t5;
1655
- $[24] = t8;
1656
- $[25] = t9;
1657
- } else {
1658
- t9 = $[25];
1659
- }
1660
- return t9;
1661
- }
1662
- function PermissionRulesTab(t0) {
1663
- const $ = import_compiler_runtime7.c(27);
1664
- let T0;
1665
- let T1;
1666
- let handleToolSelect;
1667
- let rulesProps;
1668
- let t1;
1669
- let t2;
1670
- let t3;
1671
- let t4;
1672
- let tab;
1673
- if ($[0] !== t0) {
1674
- const {
1675
- tab: t52,
1676
- getRulesOptions,
1677
- handleToolSelect: t62,
1678
- ...t72
1679
- } = t0;
1680
- tab = t52;
1681
- handleToolSelect = t62;
1682
- rulesProps = t72;
1683
- T1 = ThemedBox_default;
1684
- t2 = "column";
1685
- t3 = tab === "allow" ? 0 : undefined;
1686
- let t8;
1687
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
1688
- t8 = {
1689
- allow: "Claude Code won't ask before using allowed tools.",
1690
- ask: "Claude Code will always ask for confirmation before using these tools.",
1691
- deny: "Claude Code will always reject requests to use denied tools."
1692
- };
1693
- $[10] = t8;
1694
- } else {
1695
- t8 = $[10];
1696
- }
1697
- const t9 = t8[tab];
1698
- if ($[11] !== t9) {
1699
- t4 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
1700
- children: t9
1701
- }, undefined, false, undefined, this);
1702
- $[11] = t9;
1703
- $[12] = t4;
1704
- } else {
1705
- t4 = $[12];
1706
- }
1707
- T0 = RulesTabContent;
1708
- t1 = getRulesOptions(tab, rulesProps.searchQuery);
1709
- $[0] = t0;
1710
- $[1] = T0;
1711
- $[2] = T1;
1712
- $[3] = handleToolSelect;
1713
- $[4] = rulesProps;
1714
- $[5] = t1;
1715
- $[6] = t2;
1716
- $[7] = t3;
1717
- $[8] = t4;
1718
- $[9] = tab;
1719
- } else {
1720
- T0 = $[1];
1721
- T1 = $[2];
1722
- handleToolSelect = $[3];
1723
- rulesProps = $[4];
1724
- t1 = $[5];
1725
- t2 = $[6];
1726
- t3 = $[7];
1727
- t4 = $[8];
1728
- tab = $[9];
1729
- }
1730
- let t5;
1731
- if ($[13] !== handleToolSelect || $[14] !== tab) {
1732
- t5 = (v) => handleToolSelect(v, tab);
1733
- $[13] = handleToolSelect;
1734
- $[14] = tab;
1735
- $[15] = t5;
1736
- } else {
1737
- t5 = $[15];
1738
- }
1739
- let t6;
1740
- if ($[16] !== T0 || $[17] !== rulesProps || $[18] !== t1.options || $[19] !== t5) {
1741
- t6 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T0, {
1742
- options: t1.options,
1743
- onSelect: t5,
1744
- ...rulesProps
1745
- }, undefined, false, undefined, this);
1746
- $[16] = T0;
1747
- $[17] = rulesProps;
1748
- $[18] = t1.options;
1749
- $[19] = t5;
1750
- $[20] = t6;
1751
- } else {
1752
- t6 = $[20];
1753
- }
1754
- let t7;
1755
- if ($[21] !== T1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t6) {
1756
- t7 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(T1, {
1757
- flexDirection: t2,
1758
- flexShrink: t3,
1759
- children: [
1760
- t4,
1761
- t6
1762
- ]
1763
- }, undefined, true, undefined, this);
1764
- $[21] = T1;
1765
- $[22] = t2;
1766
- $[23] = t3;
1767
- $[24] = t4;
1768
- $[25] = t6;
1769
- $[26] = t7;
1770
- } else {
1771
- t7 = $[26];
1772
- }
1773
- return t7;
1774
- }
1775
- function PermissionRuleList(t0) {
1776
- const $ = import_compiler_runtime7.c(113);
1777
- const {
1778
- onExit,
1779
- initialTab,
1780
- onRetryDenials
1781
- } = t0;
1782
- let t1;
1783
- if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1784
- t1 = getAutoModeDenials();
1785
- $[0] = t1;
1786
- } else {
1787
- t1 = $[0];
1788
- }
1789
- const hasDenials = t1.length > 0;
1790
- const defaultTab = initialTab ?? (hasDenials ? "recent" : "allow");
1791
- let t2;
1792
- if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
1793
- t2 = [];
1794
- $[1] = t2;
1795
- } else {
1796
- t2 = $[1];
1797
- }
1798
- const [changes, setChanges] = import_react4.useState(t2);
1799
- const toolPermissionContext = useAppState(_temp7);
1800
- const setAppState = useSetAppState();
1801
- const isTerminalFocused = useTerminalFocus();
1802
- let t3;
1803
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1804
- t3 = {
1805
- approved: new Set,
1806
- retry: new Set,
1807
- denials: []
1808
- };
1809
- $[2] = t3;
1810
- } else {
1811
- t3 = $[2];
1812
- }
1813
- const denialStateRef = import_react4.useRef(t3);
1814
- let t4;
1815
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1816
- t4 = (s_0) => {
1817
- denialStateRef.current = s_0;
1818
- };
1819
- $[3] = t4;
1820
- } else {
1821
- t4 = $[3];
1822
- }
1823
- const handleDenialStateChange = t4;
1824
- const [selectedRule, setSelectedRule] = import_react4.useState();
1825
- const [lastFocusedRuleKey, setLastFocusedRuleKey] = import_react4.useState();
1826
- const [addingRuleToTab, setAddingRuleToTab] = import_react4.useState(null);
1827
- const [validatedRule, setValidatedRule] = import_react4.useState(null);
1828
- const [isAddingWorkspaceDirectory, setIsAddingWorkspaceDirectory] = import_react4.useState(false);
1829
- const [removingDirectory, setRemovingDirectory] = import_react4.useState(null);
1830
- const [isSearchMode, setIsSearchMode] = import_react4.useState(false);
1831
- const [headerFocused, setHeaderFocused] = import_react4.useState(true);
1832
- let t5;
1833
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
1834
- t5 = (focused) => {
1835
- setHeaderFocused(focused);
1836
- };
1837
- $[4] = t5;
1838
- } else {
1839
- t5 = $[4];
1840
- }
1841
- const handleHeaderFocusChange = t5;
1842
- let map;
1843
- if ($[5] !== toolPermissionContext) {
1844
- map = new Map;
1845
- getAllowRules(toolPermissionContext).forEach((rule) => {
1846
- map.set(jsonStringify(rule), rule);
1847
- });
1848
- $[5] = toolPermissionContext;
1849
- $[6] = map;
1850
- } else {
1851
- map = $[6];
1852
- }
1853
- const allowRulesByKey = map;
1854
- let map_0;
1855
- if ($[7] !== toolPermissionContext) {
1856
- map_0 = new Map;
1857
- getDenyRules(toolPermissionContext).forEach((rule_0) => {
1858
- map_0.set(jsonStringify(rule_0), rule_0);
1859
- });
1860
- $[7] = toolPermissionContext;
1861
- $[8] = map_0;
1862
- } else {
1863
- map_0 = $[8];
1864
- }
1865
- const denyRulesByKey = map_0;
1866
- let map_1;
1867
- if ($[9] !== toolPermissionContext) {
1868
- map_1 = new Map;
1869
- getAskRules(toolPermissionContext).forEach((rule_1) => {
1870
- map_1.set(jsonStringify(rule_1), rule_1);
1871
- });
1872
- $[9] = toolPermissionContext;
1873
- $[10] = map_1;
1874
- } else {
1875
- map_1 = $[10];
1876
- }
1877
- const askRulesByKey = map_1;
1878
- let t6;
1879
- if ($[11] !== allowRulesByKey || $[12] !== askRulesByKey || $[13] !== denyRulesByKey) {
1880
- t6 = (tab, t72) => {
1881
- const query = t72 === undefined ? "" : t72;
1882
- const rulesByKey = (() => {
1883
- switch (tab) {
1884
- case "allow": {
1885
- return allowRulesByKey;
1886
- }
1887
- case "deny": {
1888
- return denyRulesByKey;
1889
- }
1890
- case "ask": {
1891
- return askRulesByKey;
1892
- }
1893
- case "workspace":
1894
- case "recent": {
1895
- return new Map;
1896
- }
1897
- }
1898
- })();
1899
- const options = [];
1900
- if (tab !== "workspace" && tab !== "recent" && !query) {
1901
- options.push({
1902
- label: `Add a new rule${figures_default.ellipsis}`,
1903
- value: "add-new-rule"
1904
- });
1905
- }
1906
- const sortedRuleKeys = Array.from(rulesByKey.keys()).sort((a, b) => {
1907
- const ruleA = rulesByKey.get(a);
1908
- const ruleB = rulesByKey.get(b);
1909
- if (ruleA && ruleB) {
1910
- const ruleAString = permissionRuleValueToString(ruleA.ruleValue).toLowerCase();
1911
- const ruleBString = permissionRuleValueToString(ruleB.ruleValue).toLowerCase();
1912
- return ruleAString.localeCompare(ruleBString);
1913
- }
1914
- return 0;
1915
- });
1916
- const lowerQuery = query.toLowerCase();
1917
- for (const ruleKey of sortedRuleKeys) {
1918
- const rule_2 = rulesByKey.get(ruleKey);
1919
- if (rule_2) {
1920
- const ruleString = permissionRuleValueToString(rule_2.ruleValue);
1921
- if (query && !ruleString.toLowerCase().includes(lowerQuery)) {
1922
- continue;
1923
- }
1924
- options.push({
1925
- label: ruleString,
1926
- value: ruleKey
1927
- });
1928
- }
1929
- }
1930
- return {
1931
- options,
1932
- rulesByKey
1933
- };
1934
- };
1935
- $[11] = allowRulesByKey;
1936
- $[12] = askRulesByKey;
1937
- $[13] = denyRulesByKey;
1938
- $[14] = t6;
1939
- } else {
1940
- t6 = $[14];
1941
- }
1942
- const getRulesOptions = t6;
1943
- const exitState = useExitOnCtrlCDWithKeybindings();
1944
- const isSearchModeActive = !selectedRule && !addingRuleToTab && !validatedRule && !isAddingWorkspaceDirectory && !removingDirectory;
1945
- const t7 = isSearchModeActive && isSearchMode;
1946
- let t8;
1947
- if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
1948
- t8 = () => {
1949
- setIsSearchMode(false);
1950
- };
1951
- $[15] = t8;
1952
- } else {
1953
- t8 = $[15];
1954
- }
1955
- let t9;
1956
- if ($[16] !== t7) {
1957
- t9 = {
1958
- isActive: t7,
1959
- onExit: t8
1960
- };
1961
- $[16] = t7;
1962
- $[17] = t9;
1963
- } else {
1964
- t9 = $[17];
1965
- }
1966
- const {
1967
- query: searchQuery,
1968
- setQuery: setSearchQuery,
1969
- cursorOffset: searchCursorOffset
1970
- } = useSearchInput(t9);
1971
- let t10;
1972
- if ($[18] !== isSearchMode || $[19] !== isSearchModeActive || $[20] !== setSearchQuery) {
1973
- t10 = (e) => {
1974
- if (!isSearchModeActive) {
1975
- return;
1976
- }
1977
- if (isSearchMode) {
1978
- return;
1979
- }
1980
- if (e.ctrl || e.meta) {
1981
- return;
1982
- }
1983
- if (e.key === "/") {
1984
- e.preventDefault();
1985
- setIsSearchMode(true);
1986
- setSearchQuery("");
1987
- } else {
1988
- if (e.key.length === 1 && e.key !== "j" && e.key !== "k" && e.key !== "m" && e.key !== "i" && e.key !== "r" && e.key !== " ") {
1989
- e.preventDefault();
1990
- setIsSearchMode(true);
1991
- setSearchQuery(e.key);
1992
- }
1993
- }
1994
- };
1995
- $[18] = isSearchMode;
1996
- $[19] = isSearchModeActive;
1997
- $[20] = setSearchQuery;
1998
- $[21] = t10;
1999
- } else {
2000
- t10 = $[21];
2001
- }
2002
- const handleKeyDown = t10;
2003
- let t11;
2004
- if ($[22] !== getRulesOptions) {
2005
- t11 = (selectedValue, tab_0) => {
2006
- const {
2007
- rulesByKey: rulesByKey_0
2008
- } = getRulesOptions(tab_0);
2009
- if (selectedValue === "add-new-rule") {
2010
- setAddingRuleToTab(tab_0);
2011
- return;
2012
- } else {
2013
- setSelectedRule(rulesByKey_0.get(selectedValue));
2014
- return;
2015
- }
2016
- };
2017
- $[22] = getRulesOptions;
2018
- $[23] = t11;
2019
- } else {
2020
- t11 = $[23];
2021
- }
2022
- const handleToolSelect = t11;
2023
- let t12;
2024
- if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
2025
- t12 = () => {
2026
- setAddingRuleToTab(null);
2027
- };
2028
- $[24] = t12;
2029
- } else {
2030
- t12 = $[24];
2031
- }
2032
- const handleRuleInputCancel = t12;
2033
- let t13;
2034
- if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
2035
- t13 = (ruleValue, ruleBehavior) => {
2036
- setValidatedRule({
2037
- ruleValue,
2038
- ruleBehavior
2039
- });
2040
- setAddingRuleToTab(null);
2041
- };
2042
- $[25] = t13;
2043
- } else {
2044
- t13 = $[25];
2045
- }
2046
- const handleRuleInputSubmit = t13;
2047
- let t14;
2048
- if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
2049
- t14 = (rules, unreachable) => {
2050
- setValidatedRule(null);
2051
- for (const rule_3 of rules) {
2052
- setChanges((prev) => [...prev, `Added ${rule_3.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(rule_3.ruleValue))}`]);
2053
- }
2054
- if (unreachable && unreachable.length > 0) {
2055
- for (const u of unreachable) {
2056
- const severity = u.shadowType === "deny" ? "blocked" : "shadowed";
2057
- 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}`)]);
2058
- }
2059
- }
2060
- };
2061
- $[26] = t14;
2062
- } else {
2063
- t14 = $[26];
2064
- }
2065
- const handleAddRulesSuccess = t14;
2066
- let t15;
2067
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
2068
- t15 = () => {
2069
- setValidatedRule(null);
2070
- };
2071
- $[27] = t15;
2072
- } else {
2073
- t15 = $[27];
2074
- }
2075
- const handleAddRuleCancel = t15;
2076
- let t16;
2077
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
2078
- t16 = () => setIsAddingWorkspaceDirectory(true);
2079
- $[28] = t16;
2080
- } else {
2081
- t16 = $[28];
2082
- }
2083
- const handleRequestAddDirectory = t16;
2084
- let t17;
2085
- if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
2086
- t17 = (path) => setRemovingDirectory(path);
2087
- $[29] = t17;
2088
- } else {
2089
- t17 = $[29];
2090
- }
2091
- const handleRequestRemoveDirectory = t17;
2092
- let t18;
2093
- if ($[30] !== changes || $[31] !== onExit || $[32] !== onRetryDenials) {
2094
- t18 = () => {
2095
- const s_1 = denialStateRef.current;
2096
- const denialsFor = (set) => Array.from(set).map((idx) => s_1.denials[idx]).filter(_temp23);
2097
- const retryDenials = denialsFor(s_1.retry);
2098
- if (retryDenials.length > 0) {
2099
- const commands = retryDenials.map(_temp32);
2100
- onRetryDenials?.(commands);
2101
- onExit(undefined, {
2102
- shouldQuery: true,
2103
- metaMessages: [`Permission granted for: ${commands.join(", ")}. You may now retry ${commands.length === 1 ? "this command" : "these commands"} if you would like.`]
2104
- });
2105
- return;
2106
- }
2107
- const approvedDenials = denialsFor(s_1.approved);
2108
- if (approvedDenials.length > 0 || changes.length > 0) {
2109
- const approvedMsg = approvedDenials.length > 0 ? [`Approved ${approvedDenials.map(_temp42).join(", ")}`] : [];
2110
- onExit([...approvedMsg, ...changes].join(`
2111
- `));
2112
- } else {
2113
- onExit("Permissions dialog dismissed", {
2114
- display: "system"
2115
- });
2116
- }
2117
- };
2118
- $[30] = changes;
2119
- $[31] = onExit;
2120
- $[32] = onRetryDenials;
2121
- $[33] = t18;
2122
- } else {
2123
- t18 = $[33];
2124
- }
2125
- const handleRulesCancel = t18;
2126
- const t19 = isSearchModeActive && !isSearchMode;
2127
- let t20;
2128
- if ($[34] !== t19) {
2129
- t20 = {
2130
- context: "Settings",
2131
- isActive: t19
2132
- };
2133
- $[34] = t19;
2134
- $[35] = t20;
2135
- } else {
2136
- t20 = $[35];
2137
- }
2138
- useKeybinding("confirm:no", handleRulesCancel, t20);
2139
- let t21;
2140
- if ($[36] !== getRulesOptions || $[37] !== selectedRule || $[38] !== setAppState || $[39] !== toolPermissionContext) {
2141
- t21 = () => {
2142
- if (!selectedRule) {
2143
- return;
2144
- }
2145
- const {
2146
- options: options_0
2147
- } = getRulesOptions(selectedRule.ruleBehavior);
2148
- const selectedKey = jsonStringify(selectedRule);
2149
- const ruleKeys = options_0.filter(_temp5).map(_temp62);
2150
- const currentIndex = ruleKeys.indexOf(selectedKey);
2151
- let nextFocusKey;
2152
- if (currentIndex !== -1) {
2153
- if (currentIndex < ruleKeys.length - 1) {
2154
- nextFocusKey = ruleKeys[currentIndex + 1];
2155
- } else {
2156
- if (currentIndex > 0) {
2157
- nextFocusKey = ruleKeys[currentIndex - 1];
2158
- }
2159
- }
2160
- }
2161
- setLastFocusedRuleKey(nextFocusKey);
2162
- deletePermissionRule({
2163
- rule: selectedRule,
2164
- initialContext: toolPermissionContext,
2165
- setToolPermissionContext(toolPermissionContext_0) {
2166
- setAppState((prev_1) => ({
2167
- ...prev_1,
2168
- toolPermissionContext: toolPermissionContext_0
2169
- }));
2170
- }
2171
- });
2172
- setChanges((prev_2) => [...prev_2, `Deleted ${selectedRule.ruleBehavior} rule ${source_default.bold(permissionRuleValueToString(selectedRule.ruleValue))}`]);
2173
- setSelectedRule(undefined);
2174
- };
2175
- $[36] = getRulesOptions;
2176
- $[37] = selectedRule;
2177
- $[38] = setAppState;
2178
- $[39] = toolPermissionContext;
2179
- $[40] = t21;
2180
- } else {
2181
- t21 = $[40];
2182
- }
2183
- const handleDeleteRule = t21;
2184
- if (selectedRule) {
2185
- let t222;
2186
- if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
2187
- t222 = () => setSelectedRule(undefined);
2188
- $[41] = t222;
2189
- } else {
2190
- t222 = $[41];
2191
- }
2192
- let t232;
2193
- if ($[42] !== handleDeleteRule || $[43] !== selectedRule) {
2194
- t232 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RuleDetails, {
2195
- rule: selectedRule,
2196
- onDelete: handleDeleteRule,
2197
- onCancel: t222
2198
- }, undefined, false, undefined, this);
2199
- $[42] = handleDeleteRule;
2200
- $[43] = selectedRule;
2201
- $[44] = t232;
2202
- } else {
2203
- t232 = $[44];
2204
- }
2205
- return t232;
2206
- }
2207
- if (addingRuleToTab && addingRuleToTab !== "workspace" && addingRuleToTab !== "recent") {
2208
- let t222;
2209
- if ($[45] !== addingRuleToTab) {
2210
- t222 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRuleInput, {
2211
- onCancel: handleRuleInputCancel,
2212
- onSubmit: handleRuleInputSubmit,
2213
- ruleBehavior: addingRuleToTab
2214
- }, undefined, false, undefined, this);
2215
- $[45] = addingRuleToTab;
2216
- $[46] = t222;
2217
- } else {
2218
- t222 = $[46];
2219
- }
2220
- return t222;
2221
- }
2222
- if (validatedRule) {
2223
- let t222;
2224
- if ($[47] !== validatedRule.ruleValue) {
2225
- t222 = [validatedRule.ruleValue];
2226
- $[47] = validatedRule.ruleValue;
2227
- $[48] = t222;
2228
- } else {
2229
- t222 = $[48];
2230
- }
2231
- let t232;
2232
- if ($[49] !== setAppState) {
2233
- t232 = (toolPermissionContext_1) => {
2234
- setAppState((prev_3) => ({
2235
- ...prev_3,
2236
- toolPermissionContext: toolPermissionContext_1
2237
- }));
2238
- };
2239
- $[49] = setAppState;
2240
- $[50] = t232;
2241
- } else {
2242
- t232 = $[50];
2243
- }
2244
- let t242;
2245
- if ($[51] !== t222 || $[52] !== t232 || $[53] !== toolPermissionContext || $[54] !== validatedRule.ruleBehavior) {
2246
- t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddPermissionRules, {
2247
- onAddRules: handleAddRulesSuccess,
2248
- onCancel: handleAddRuleCancel,
2249
- ruleValues: t222,
2250
- ruleBehavior: validatedRule.ruleBehavior,
2251
- initialContext: toolPermissionContext,
2252
- setToolPermissionContext: t232
2253
- }, undefined, false, undefined, this);
2254
- $[51] = t222;
2255
- $[52] = t232;
2256
- $[53] = toolPermissionContext;
2257
- $[54] = validatedRule.ruleBehavior;
2258
- $[55] = t242;
2259
- } else {
2260
- t242 = $[55];
2261
- }
2262
- return t242;
2263
- }
2264
- if (isAddingWorkspaceDirectory) {
2265
- let t222;
2266
- if ($[56] !== setAppState || $[57] !== toolPermissionContext) {
2267
- t222 = (path_0, remember) => {
2268
- const destination = remember ? "localSettings" : "session";
2269
- const permissionUpdate = {
2270
- type: "addDirectories",
2271
- directories: [path_0],
2272
- destination
2273
- };
2274
- const updatedContext = applyPermissionUpdate(toolPermissionContext, permissionUpdate);
2275
- setAppState((prev_4) => ({
2276
- ...prev_4,
2277
- toolPermissionContext: updatedContext
2278
- }));
2279
- if (remember) {
2280
- persistPermissionUpdate(permissionUpdate);
2281
- }
2282
- setChanges((prev_5) => [...prev_5, `Added directory ${source_default.bold(path_0)} to workspace${remember ? " and saved to local settings" : " for this session"}`]);
2283
- setIsAddingWorkspaceDirectory(false);
2284
- };
2285
- $[56] = setAppState;
2286
- $[57] = toolPermissionContext;
2287
- $[58] = t222;
2288
- } else {
2289
- t222 = $[58];
2290
- }
2291
- let t232;
2292
- if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
2293
- t232 = () => setIsAddingWorkspaceDirectory(false);
2294
- $[59] = t232;
2295
- } else {
2296
- t232 = $[59];
2297
- }
2298
- let t242;
2299
- if ($[60] !== t222 || $[61] !== toolPermissionContext) {
2300
- t242 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(AddWorkspaceDirectory, {
2301
- onAddDirectory: t222,
2302
- onCancel: t232,
2303
- permissionContext: toolPermissionContext
2304
- }, undefined, false, undefined, this);
2305
- $[60] = t222;
2306
- $[61] = toolPermissionContext;
2307
- $[62] = t242;
2308
- } else {
2309
- t242 = $[62];
2310
- }
2311
- return t242;
2312
- }
2313
- if (removingDirectory) {
2314
- let t222;
2315
- if ($[63] !== removingDirectory) {
2316
- t222 = () => {
2317
- setChanges((prev_6) => [...prev_6, `Removed directory ${source_default.bold(removingDirectory)} from workspace`]);
2318
- setRemovingDirectory(null);
2319
- };
2320
- $[63] = removingDirectory;
2321
- $[64] = t222;
2322
- } else {
2323
- t222 = $[64];
2324
- }
2325
- let t232;
2326
- if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
2327
- t232 = () => setRemovingDirectory(null);
2328
- $[65] = t232;
2329
- } else {
2330
- t232 = $[65];
2331
- }
2332
- let t242;
2333
- if ($[66] !== setAppState) {
2334
- t242 = (toolPermissionContext_2) => {
2335
- setAppState((prev_7) => ({
2336
- ...prev_7,
2337
- toolPermissionContext: toolPermissionContext_2
2338
- }));
2339
- };
2340
- $[66] = setAppState;
2341
- $[67] = t242;
2342
- } else {
2343
- t242 = $[67];
2344
- }
2345
- let t252;
2346
- if ($[68] !== removingDirectory || $[69] !== t222 || $[70] !== t242 || $[71] !== toolPermissionContext) {
2347
- t252 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RemoveWorkspaceDirectory, {
2348
- directoryPath: removingDirectory,
2349
- onRemove: t222,
2350
- onCancel: t232,
2351
- permissionContext: toolPermissionContext,
2352
- setPermissionContext: t242
2353
- }, undefined, false, undefined, this);
2354
- $[68] = removingDirectory;
2355
- $[69] = t222;
2356
- $[70] = t242;
2357
- $[71] = toolPermissionContext;
2358
- $[72] = t252;
2359
- } else {
2360
- t252 = $[72];
2361
- }
2362
- return t252;
2363
- }
2364
- let t22;
2365
- if ($[73] !== getRulesOptions || $[74] !== handleRulesCancel || $[75] !== handleToolSelect || $[76] !== isSearchMode || $[77] !== isTerminalFocused || $[78] !== lastFocusedRuleKey || $[79] !== searchCursorOffset || $[80] !== searchQuery) {
2366
- t22 = {
2367
- searchQuery,
2368
- isSearchMode,
2369
- isFocused: isTerminalFocused,
2370
- onCancel: handleRulesCancel,
2371
- lastFocusedRuleKey,
2372
- cursorOffset: searchCursorOffset,
2373
- getRulesOptions,
2374
- handleToolSelect,
2375
- onHeaderFocusChange: handleHeaderFocusChange
2376
- };
2377
- $[73] = getRulesOptions;
2378
- $[74] = handleRulesCancel;
2379
- $[75] = handleToolSelect;
2380
- $[76] = isSearchMode;
2381
- $[77] = isTerminalFocused;
2382
- $[78] = lastFocusedRuleKey;
2383
- $[79] = searchCursorOffset;
2384
- $[80] = searchQuery;
2385
- $[81] = t22;
2386
- } else {
2387
- t22 = $[81];
2388
- }
2389
- const sharedRulesProps = t22;
2390
- const isHidden = !!selectedRule || !!addingRuleToTab || !!validatedRule || isAddingWorkspaceDirectory || !!removingDirectory;
2391
- const t23 = !isSearchMode;
2392
- let t24;
2393
- if ($[82] === Symbol.for("react.memo_cache_sentinel")) {
2394
- t24 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2395
- id: "recent",
2396
- title: "Recently denied",
2397
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(RecentDenialsTab, {
2398
- onHeaderFocusChange: handleHeaderFocusChange,
2399
- onStateChange: handleDenialStateChange
2400
- }, undefined, false, undefined, this)
2401
- }, undefined, false, undefined, this);
2402
- $[82] = t24;
2403
- } else {
2404
- t24 = $[82];
2405
- }
2406
- let t25;
2407
- if ($[83] !== sharedRulesProps) {
2408
- t25 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2409
- id: "allow",
2410
- title: "Allow",
2411
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2412
- tab: "allow",
2413
- ...sharedRulesProps
2414
- }, undefined, false, undefined, this)
2415
- }, undefined, false, undefined, this);
2416
- $[83] = sharedRulesProps;
2417
- $[84] = t25;
2418
- } else {
2419
- t25 = $[84];
2420
- }
2421
- let t26;
2422
- if ($[85] !== sharedRulesProps) {
2423
- t26 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2424
- id: "ask",
2425
- title: "Ask",
2426
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2427
- tab: "ask",
2428
- ...sharedRulesProps
2429
- }, undefined, false, undefined, this)
2430
- }, undefined, false, undefined, this);
2431
- $[85] = sharedRulesProps;
2432
- $[86] = t26;
2433
- } else {
2434
- t26 = $[86];
2435
- }
2436
- let t27;
2437
- if ($[87] !== sharedRulesProps) {
2438
- t27 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2439
- id: "deny",
2440
- title: "Deny",
2441
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(PermissionRulesTab, {
2442
- tab: "deny",
2443
- ...sharedRulesProps
2444
- }, undefined, false, undefined, this)
2445
- }, undefined, false, undefined, this);
2446
- $[87] = sharedRulesProps;
2447
- $[88] = t27;
2448
- } else {
2449
- t27 = $[88];
2450
- }
2451
- let t28;
2452
- if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
2453
- t28 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2454
- children: "Claude Code can read files in the workspace, and make edits when auto-accept edits is on."
2455
- }, undefined, false, undefined, this);
2456
- $[89] = t28;
2457
- } else {
2458
- t28 = $[89];
2459
- }
2460
- let t29;
2461
- if ($[90] !== onExit || $[91] !== toolPermissionContext) {
2462
- t29 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tab, {
2463
- id: "workspace",
2464
- title: "Workspace",
2465
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2466
- flexDirection: "column",
2467
- children: [
2468
- t28,
2469
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(WorkspaceTab, {
2470
- onExit,
2471
- toolPermissionContext,
2472
- onRequestAddDirectory: handleRequestAddDirectory,
2473
- onRequestRemoveDirectory: handleRequestRemoveDirectory,
2474
- onHeaderFocusChange: handleHeaderFocusChange
2475
- }, undefined, false, undefined, this)
2476
- ]
2477
- }, undefined, true, undefined, this)
2478
- }, undefined, false, undefined, this);
2479
- $[90] = onExit;
2480
- $[91] = toolPermissionContext;
2481
- $[92] = t29;
2482
- } else {
2483
- t29 = $[92];
2484
- }
2485
- let t30;
2486
- if ($[93] !== defaultTab || $[94] !== isHidden || $[95] !== t23 || $[96] !== t25 || $[97] !== t26 || $[98] !== t27 || $[99] !== t29) {
2487
- t30 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Tabs, {
2488
- title: "Permissions:",
2489
- color: "permission",
2490
- defaultTab,
2491
- hidden: isHidden,
2492
- initialHeaderFocused: !hasDenials,
2493
- navFromContent: t23,
2494
- children: [
2495
- t24,
2496
- t25,
2497
- t26,
2498
- t27,
2499
- t29
2500
- ]
2501
- }, undefined, true, undefined, this);
2502
- $[93] = defaultTab;
2503
- $[94] = isHidden;
2504
- $[95] = t23;
2505
- $[96] = t25;
2506
- $[97] = t26;
2507
- $[98] = t27;
2508
- $[99] = t29;
2509
- $[100] = t30;
2510
- } else {
2511
- t30 = $[100];
2512
- }
2513
- let t31;
2514
- if ($[101] !== defaultTab || $[102] !== exitState.keyName || $[103] !== exitState.pending || $[104] !== headerFocused || $[105] !== isSearchMode) {
2515
- t31 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2516
- marginTop: 1,
2517
- paddingLeft: 1,
2518
- children: /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedText, {
2519
- dimColor: true,
2520
- children: exitState.pending ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2521
- children: [
2522
- "Press ",
2523
- exitState.keyName,
2524
- " again to exit"
2525
- ]
2526
- }, undefined, true, undefined, this) : headerFocused ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2527
- children: "\u2190/\u2192 tab switch \xB7 \u2193 return \xB7 Esc cancel"
2528
- }, undefined, false, undefined, this) : isSearchMode ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2529
- children: "Type to filter \xB7 Enter/\u2193 select \xB7 \u2191 tabs \xB7 Esc clear"
2530
- }, undefined, false, undefined, this) : hasDenials && defaultTab === "recent" ? /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2531
- children: "Enter approve \xB7 r retry \xB7 \u2191\u2193 navigate \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2532
- }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(jsx_dev_runtime7.Fragment, {
2533
- children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Type to search \xB7 \u2190/\u2192 switch \xB7 Esc cancel"
2534
- }, undefined, false, undefined, this)
2535
- }, undefined, false, undefined, this)
2536
- }, undefined, false, undefined, this);
2537
- $[101] = defaultTab;
2538
- $[102] = exitState.keyName;
2539
- $[103] = exitState.pending;
2540
- $[104] = headerFocused;
2541
- $[105] = isSearchMode;
2542
- $[106] = t31;
2543
- } else {
2544
- t31 = $[106];
2545
- }
2546
- let t32;
2547
- if ($[107] !== t30 || $[108] !== t31) {
2548
- t32 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Pane, {
2549
- color: "permission",
2550
- children: [
2551
- t30,
2552
- t31
2553
- ]
2554
- }, undefined, true, undefined, this);
2555
- $[107] = t30;
2556
- $[108] = t31;
2557
- $[109] = t32;
2558
- } else {
2559
- t32 = $[109];
2560
- }
2561
- let t33;
2562
- if ($[110] !== handleKeyDown || $[111] !== t32) {
2563
- t33 = /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ThemedBox_default, {
2564
- flexDirection: "column",
2565
- onKeyDown: handleKeyDown,
2566
- children: t32
2567
- }, undefined, false, undefined, this);
2568
- $[110] = handleKeyDown;
2569
- $[111] = t32;
2570
- $[112] = t33;
2571
- } else {
2572
- t33 = $[112];
2573
- }
2574
- return t33;
2575
- }
2576
- function _temp62(opt_0) {
2577
- return opt_0.value;
2578
- }
2579
- function _temp5(opt) {
2580
- return opt.value !== "add-new-rule";
2581
- }
2582
- function _temp42(d_1) {
2583
- return source_default.bold(d_1.display);
2584
- }
2585
- function _temp32(d_0) {
2586
- return d_0.display;
2587
- }
2588
- function _temp23(d) {
2589
- return d !== undefined;
2590
- }
2591
- function _temp7(s) {
2592
- return s.toolPermissionContext;
2593
- }
2594
- var import_compiler_runtime7, import_react4, jsx_dev_runtime7;
2595
- var init_PermissionRuleList = __esm(() => {
2596
- init_source();
2597
- init_figures();
2598
- init_AppState();
2599
- init_PermissionUpdate();
2600
- init_select();
2601
- init_useExitOnCtrlCDWithKeybindings();
2602
- init_useSearchInput();
2603
- init_ink();
2604
- init_useKeybinding();
2605
- init_autoModeDenials();
2606
- init_permissionRuleParser();
2607
- init_permissions();
2608
- init_slowOperations();
2609
- init_Pane();
2610
- init_Tabs();
2611
- init_SearchBox();
2612
- init_AddPermissionRules();
2613
- init_AddWorkspaceDirectory();
2614
- init_PermissionRuleDescription();
2615
- init_PermissionRuleInput();
2616
- init_RecentDenialsTab();
2617
- init_RemoveWorkspaceDirectory();
2618
- init_WorkspaceTab();
2619
- import_compiler_runtime7 = __toESM(require_compiler_runtime(), 1);
2620
- import_react4 = __toESM(require_react(), 1);
2621
- jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
2622
- });
2623
-
2624
- // src/commands/permissions/permissions.tsx
2625
- var jsx_dev_runtime8, call = async (onDone, context) => {
2626
- return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(PermissionRuleList, {
2627
- onExit: onDone,
2628
- onRetryDenials: (commands) => {
2629
- context.setMessages((prev) => [...prev, createPermissionRetryMessage(commands)]);
2630
- }
2631
- }, undefined, false, undefined, this);
2632
- };
2633
- var init_permissions2 = __esm(() => {
2634
- init_PermissionRuleList();
2635
- init_messages();
2636
- jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
2637
- });
2638
- init_permissions2();
2639
-
2640
- export {
2641
- call
2642
- };