@claudiolabs/claudin 1.0.8 → 1.0.10

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 (917) hide show
  1. package/README.md +3 -2
  2. package/dist/chunks/AgentTool-1.0.10-9168adv3.mjs +1 -0
  3. package/dist/chunks/App-1.0.10-b0wmgfhw.mjs +1 -0
  4. package/dist/chunks/ApproveApiKey-1.0.10-k8x17zqt.mjs +1 -0
  5. package/dist/chunks/AssistantSessionChooser-1.0.10-yyahg9e7.mjs +1 -0
  6. package/dist/chunks/AutoModeOptInDialog-1.0.10-7d6nmenx.mjs +1 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-1.0.10-syxd1ha6.mjs +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.10-45912czy.mjs +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-1.0.10-efzztze6.mjs +1 -0
  10. package/dist/chunks/DiffDialog-1.0.10-6798dcwp.mjs +7 -0
  11. package/dist/chunks/Doctor-1.0.10-aagnvpzj.mjs +1 -0
  12. package/dist/chunks/ExplorerDialog-1.0.10-n773x39g.mjs +6 -0
  13. package/dist/chunks/Grove-1.0.10-ryqtmr1j.mjs +1 -0
  14. package/dist/chunks/ITermBackend-1.0.10-0wjvwjba.mjs +1 -0
  15. package/dist/chunks/InvalidConfigDialog-1.0.10-83c0rqn9.mjs +1 -0
  16. package/dist/chunks/InvalidSettingsDialog-1.0.10-1h5tcxeh.mjs +1 -0
  17. package/dist/chunks/MigrationDialog-1.0.10-5wbwh4fe.mjs +1 -0
  18. package/dist/chunks/Onboarding-1.0.10-xnrfb23f.mjs +1 -0
  19. package/dist/chunks/ProviderManager-1.0.10-5z81gk4w.mjs +1 -0
  20. package/dist/chunks/REPL-1.0.10-wdp6ava4.mjs +1 -0
  21. package/dist/chunks/ResumeConversation-1.0.10-vhkf5e48.mjs +1 -0
  22. package/dist/chunks/SnapshotUpdateDialog-1.0.10-vst4p4dj.mjs +1 -0
  23. package/dist/chunks/TeleportProgress-1.0.10-b9zsxt77.mjs +1 -0
  24. package/dist/chunks/TeleportRepoMismatchDialog-1.0.10-zy7bb8c1.mjs +1 -0
  25. package/dist/chunks/TeleportResumeWrapper-1.0.10-51fsm716.mjs +1 -0
  26. package/dist/chunks/TmuxBackend-1.0.10-eq97b1w6.mjs +9 -0
  27. package/dist/chunks/ToolSearchTool-1.0.10-kwaz93dc.mjs +1 -0
  28. package/dist/chunks/TrustDialog-1.0.10-emvcwvyz.mjs +1 -0
  29. package/dist/chunks/activeProvider-1.0.10-artcs5gw.mjs +1 -0
  30. package/dist/chunks/add-dir-1.0.10-3m9esps4.mjs +1 -0
  31. package/dist/chunks/agentTypes-1.0.10-j2eg0asq.mjs +1 -0
  32. package/dist/chunks/agents-1.0.10-b081966c.mjs +3 -0
  33. package/dist/chunks/agents-1.0.10-c6y89byc.mjs +110 -0
  34. package/dist/chunks/api-1.0.10-q6a49cq9.mjs +1 -0
  35. package/dist/chunks/asciicast-1.0.10-8mrrq69t.mjs +1 -0
  36. package/dist/chunks/assistant-1.0.10-mt80c19d.mjs +1 -0
  37. package/dist/chunks/auth-1.0.10-j9wjzwdr.mjs +1 -0
  38. package/dist/chunks/auth-1.0.10-wscad97h.mjs +1 -0
  39. package/dist/chunks/autoMode-1.0.10-qacrantk.mjs +48 -0
  40. package/dist/chunks/autoUpdater-1.0.10-kej3mpvd.mjs +1 -0
  41. package/dist/chunks/backgroundHousekeeping-1.0.10-q5rs8cg6.mjs +1 -0
  42. package/dist/chunks/branch-1.0.10-g431vyze.mjs +4 -0
  43. package/dist/chunks/bridge-1.0.10-98mv13j4.mjs +2 -0
  44. package/dist/chunks/bridgeConfig-1.0.10-pps59dv5.mjs +1 -0
  45. package/dist/chunks/bridgeEnabled-1.0.10-xpt9mfrj.mjs +1 -0
  46. package/dist/chunks/bridgeMain-1.0.10-9w755v0z.mjs +88 -0
  47. package/dist/chunks/bridgePointer-1.0.10-p6qd0vn4.mjs +1 -0
  48. package/dist/chunks/btw-1.0.10-3ks6x1cj.mjs +1 -0
  49. package/dist/chunks/buddy-1.0.10-mn169fr2.mjs +3 -0
  50. package/dist/chunks/cacache-1.0.10-1c5pjj4a.mjs +1 -0
  51. package/dist/chunks/cache-probe-1.0.10-4c2hbe4n.mjs +21 -0
  52. package/dist/chunks/cacheStats-1.0.10-bvmcxnsc.mjs +4 -0
  53. package/dist/chunks/caches-1.0.10-xnh6bthn.mjs +1 -0
  54. package/dist/chunks/claudeDesktop-1.0.10-7x49t06j.mjs +1 -0
  55. package/dist/chunks/claudemd-1.0.10-4x8m7nms.mjs +1 -0
  56. package/dist/chunks/clear-1.0.10-wjmnsbvk.mjs +1 -0
  57. package/dist/chunks/clearTerminal-1.0.10-gg3q4e2j.mjs +1 -0
  58. package/dist/chunks/cli-1.0.10-03k1bgjr.mjs +8 -0
  59. package/dist/chunks/cli-1.0.10-0dt8rr7s.mjs +2 -0
  60. package/dist/chunks/cli-1.0.10-0j3rvqvd.mjs +2 -0
  61. package/dist/chunks/cli-1.0.10-0mtvwacq.mjs +2 -0
  62. package/dist/chunks/cli-1.0.10-0p3e5mh4.mjs +2 -0
  63. package/dist/chunks/cli-1.0.10-0ww5aha0.mjs +2 -0
  64. package/dist/chunks/cli-1.0.10-10nbqkwk.mjs +5 -0
  65. package/dist/chunks/cli-1.0.10-126xqc7y.mjs +2 -0
  66. package/dist/chunks/cli-1.0.10-19r92gf0.mjs +2 -0
  67. package/dist/chunks/cli-1.0.10-1bb46j56.mjs +3 -0
  68. package/dist/chunks/cli-1.0.10-1gat00je.mjs +2 -0
  69. package/dist/chunks/cli-1.0.10-1hhjj6g5.mjs +15 -0
  70. package/dist/chunks/cli-1.0.10-1vw162pp.mjs +2 -0
  71. package/dist/chunks/cli-1.0.10-1w8ykzyr.mjs +18 -0
  72. package/dist/chunks/cli-1.0.10-1y9ehszh.mjs +4 -0
  73. package/dist/chunks/cli-1.0.10-2mrxx0ha.mjs +2 -0
  74. package/dist/chunks/cli-1.0.10-2yf0e5j0.mjs +3 -0
  75. package/dist/chunks/cli-1.0.10-38j9ydcc.mjs +2 -0
  76. package/dist/chunks/cli-1.0.10-39c794ps.mjs +2 -0
  77. package/dist/chunks/cli-1.0.10-3b8btggr.mjs +2 -0
  78. package/dist/chunks/cli-1.0.10-3g4c94ey.mjs +2 -0
  79. package/dist/chunks/cli-1.0.10-3hnjbysa.mjs +2 -0
  80. package/dist/chunks/cli-1.0.10-3kpgqv4r.mjs +2 -0
  81. package/dist/chunks/cli-1.0.10-3m372s1z.mjs +2 -0
  82. package/dist/chunks/cli-1.0.10-3mf1zb3g.mjs +2 -0
  83. package/dist/chunks/cli-1.0.10-4137p8r7.mjs +3 -0
  84. package/dist/chunks/cli-1.0.10-496yhe1m.mjs +2 -0
  85. package/dist/chunks/cli-1.0.10-4cpftynm.mjs +133 -0
  86. package/dist/chunks/cli-1.0.10-4pjpd1yr.mjs +2 -0
  87. package/dist/chunks/cli-1.0.10-4pnqm304.mjs +2 -0
  88. package/dist/chunks/cli-1.0.10-4xqmvag1.mjs +2 -0
  89. package/dist/chunks/cli-1.0.10-52vtevx2.mjs +21 -0
  90. package/dist/chunks/cli-1.0.10-53k2r2s4.mjs +24 -0
  91. package/dist/chunks/cli-1.0.10-56qwh0xr.mjs +2 -0
  92. package/dist/chunks/cli-1.0.10-5a969ex4.mjs +2 -0
  93. package/dist/chunks/cli-1.0.10-5ad4sra1.mjs +2 -0
  94. package/dist/chunks/cli-1.0.10-5mwqzywt.mjs +2 -0
  95. package/dist/chunks/cli-1.0.10-5vy47pkm.mjs +2 -0
  96. package/dist/chunks/cli-1.0.10-5yc9j1wk.mjs +18 -0
  97. package/dist/chunks/cli-1.0.10-60m6e8jb.mjs +2 -0
  98. package/dist/chunks/cli-1.0.10-648r2tej.mjs +4 -0
  99. package/dist/chunks/cli-1.0.10-64cdykjq.mjs +2 -0
  100. package/dist/chunks/cli-1.0.10-66cb9etc.mjs +2 -0
  101. package/dist/chunks/cli-1.0.10-6ezxzjjc.mjs +2 -0
  102. package/dist/chunks/cli-1.0.10-6k8wfwnm.mjs +18 -0
  103. package/dist/chunks/cli-1.0.10-6rmggk90.mjs +2 -0
  104. package/dist/chunks/cli-1.0.10-6v8b25v3.mjs +2 -0
  105. package/dist/chunks/cli-1.0.10-71469776.mjs +2 -0
  106. package/dist/chunks/cli-1.0.10-73jtw2ga.mjs +2 -0
  107. package/dist/chunks/cli-1.0.10-79ksk5t8.mjs +2 -0
  108. package/dist/chunks/cli-1.0.10-7vtw4q1z.mjs +2 -0
  109. package/dist/chunks/cli-1.0.10-80nme2ba.mjs +2 -0
  110. package/dist/chunks/cli-1.0.10-81bqbfzt.mjs +133 -0
  111. package/dist/chunks/cli-1.0.10-83nr92pr.mjs +2 -0
  112. package/dist/chunks/cli-1.0.10-8kmrt121.mjs +7 -0
  113. package/dist/chunks/cli-1.0.10-8p9adejr.mjs +2 -0
  114. package/dist/chunks/cli-1.0.10-8pv0t0rg.mjs +15 -0
  115. package/dist/chunks/cli-1.0.10-8r7kaawz.mjs +2 -0
  116. package/dist/chunks/cli-1.0.10-8zazttk7.mjs +2 -0
  117. package/dist/chunks/cli-1.0.10-99yfs0np.mjs +9 -0
  118. package/dist/chunks/cli-1.0.10-9w7ktw12.mjs +4 -0
  119. package/dist/chunks/cli-1.0.10-9w9eyp5w.mjs +26 -0
  120. package/dist/chunks/cli-1.0.10-9zyzxxg6.mjs +2 -0
  121. package/dist/chunks/cli-1.0.10-a3dzh7qn.mjs +2 -0
  122. package/dist/chunks/cli-1.0.10-ae686ksc.mjs +2 -0
  123. package/dist/chunks/cli-1.0.10-ae9e10re.mjs +2 -0
  124. package/dist/chunks/cli-1.0.10-ahv8e63t.mjs +2 -0
  125. package/dist/chunks/cli-1.0.10-ak0w8049.mjs +2 -0
  126. package/dist/chunks/cli-1.0.10-aqy1tjb5.mjs +6 -0
  127. package/dist/chunks/cli-1.0.10-b32ya0x2.mjs +2 -0
  128. package/dist/chunks/cli-1.0.10-b42che8r.mjs +2 -0
  129. package/dist/chunks/cli-1.0.10-b9d86y5k.mjs +2 -0
  130. package/dist/chunks/cli-1.0.10-bckynsrn.mjs +2 -0
  131. package/dist/chunks/cli-1.0.10-bfeskk5v.mjs +2 -0
  132. package/dist/chunks/cli-1.0.10-bft50zap.mjs +2 -0
  133. package/dist/chunks/cli-1.0.10-bg5yza2e.mjs +42 -0
  134. package/dist/chunks/cli-1.0.10-bhhjmwbq.mjs +2 -0
  135. package/dist/chunks/cli-1.0.10-bjyy7gk3.mjs +2 -0
  136. package/dist/chunks/cli-1.0.10-bmn2zrhq.mjs +2 -0
  137. package/dist/chunks/cli-1.0.10-bwsvy4ha.mjs +2 -0
  138. package/dist/chunks/cli-1.0.10-byd1s52c.mjs +2 -0
  139. package/dist/chunks/cli-1.0.10-c1x0gkce.mjs +2 -0
  140. package/dist/chunks/cli-1.0.10-ccxx6dak.mjs +34 -0
  141. package/dist/chunks/cli-1.0.10-cj46661y.mjs +17 -0
  142. package/dist/chunks/cli-1.0.10-cjvcm52x.mjs +3 -0
  143. package/dist/chunks/cli-1.0.10-cqr66bg9.mjs +2 -0
  144. package/dist/chunks/cli-1.0.10-dgjh0akh.mjs +1 -0
  145. package/dist/chunks/cli-1.0.10-djtar6x6.mjs +2 -0
  146. package/dist/chunks/cli-1.0.10-dk9yt7dj.mjs +24 -0
  147. package/dist/chunks/cli-1.0.10-dqbytbnz.mjs +2 -0
  148. package/dist/chunks/cli-1.0.10-dsx0vt1p.mjs +2 -0
  149. package/dist/chunks/cli-1.0.10-dwzzv50k.mjs +2 -0
  150. package/dist/chunks/cli-1.0.10-e33cdbwd.mjs +2 -0
  151. package/dist/chunks/cli-1.0.10-ebk3tx3x.mjs +2 -0
  152. package/dist/chunks/cli-1.0.10-en27vfnb.mjs +2 -0
  153. package/dist/chunks/cli-1.0.10-evwrkxzx.mjs +2 -0
  154. package/dist/chunks/cli-1.0.10-ewwwn978.mjs +2 -0
  155. package/dist/chunks/cli-1.0.10-f0qeess8.mjs +24 -0
  156. package/dist/chunks/cli-1.0.10-f1dj38dh.mjs +3 -0
  157. package/dist/chunks/cli-1.0.10-f9kd9ea1.mjs +2 -0
  158. package/dist/chunks/cli-1.0.10-fd700nvj.mjs +67 -0
  159. package/dist/chunks/cli-1.0.10-fexcb6zq.mjs +4 -0
  160. package/dist/chunks/cli-1.0.10-ffm9cbk3.mjs +2 -0
  161. package/dist/chunks/cli-1.0.10-fh0ndq5n.mjs +2 -0
  162. package/dist/chunks/cli-1.0.10-fnpqr7p3.mjs +6 -0
  163. package/dist/chunks/cli-1.0.10-fqj1yrnh.mjs +2 -0
  164. package/dist/chunks/cli-1.0.10-g44hcyvc.mjs +2 -0
  165. package/dist/chunks/cli-1.0.10-g54smq1c.mjs +2 -0
  166. package/dist/chunks/cli-1.0.10-gcj94djy.mjs +2 -0
  167. package/dist/chunks/cli-1.0.10-gdd5wptw.mjs +2 -0
  168. package/dist/chunks/cli-1.0.10-gjfjm956.mjs +2 -0
  169. package/dist/chunks/cli-1.0.10-gw19ejvb.mjs +2 -0
  170. package/dist/chunks/cli-1.0.10-gwg4fpdz.mjs +2 -0
  171. package/dist/chunks/cli-1.0.10-h1b5mddb.mjs +3 -0
  172. package/dist/chunks/cli-1.0.10-h5kmfbbq.mjs +2 -0
  173. package/dist/chunks/cli-1.0.10-h8hxgzcg.mjs +2 -0
  174. package/dist/chunks/cli-1.0.10-h9y92tqt.mjs +4 -0
  175. package/dist/chunks/cli-1.0.10-hh0mja3r.mjs +2 -0
  176. package/dist/chunks/cli-1.0.10-hh3gv5p7.mjs +12 -0
  177. package/dist/chunks/cli-1.0.10-hkdbtrdk.mjs +2 -0
  178. package/dist/chunks/cli-1.0.10-hmjmw1zh.mjs +3 -0
  179. package/dist/chunks/cli-1.0.10-ht0jya8e.mjs +2 -0
  180. package/dist/chunks/cli-1.0.10-j0e7nj85.mjs +199 -0
  181. package/dist/chunks/cli-1.0.10-j1c6sy8q.mjs +59 -0
  182. package/dist/chunks/cli-1.0.10-j8cpz9vy.mjs +2 -0
  183. package/dist/chunks/cli-1.0.10-jd706hep.mjs +2 -0
  184. package/dist/chunks/cli-1.0.10-jdy936dq.mjs +2 -0
  185. package/dist/chunks/cli-1.0.10-je9yx09w.mjs +2 -0
  186. package/dist/chunks/cli-1.0.10-jmgrxnds.mjs +9 -0
  187. package/dist/chunks/cli-1.0.10-jrah5nna.mjs +4 -0
  188. package/dist/chunks/cli-1.0.10-jtb37mr1.mjs +50 -0
  189. package/dist/chunks/cli-1.0.10-jtvypw88.mjs +2 -0
  190. package/dist/chunks/cli-1.0.10-jy4hgvn2.mjs +2 -0
  191. package/dist/chunks/cli-1.0.10-jyeg1gs5.mjs +2 -0
  192. package/dist/chunks/cli-1.0.10-k9e97edx.mjs +25 -0
  193. package/dist/chunks/cli-1.0.10-ke4netv4.mjs +2 -0
  194. package/dist/chunks/cli-1.0.10-kewc714d.mjs +2 -0
  195. package/dist/chunks/cli-1.0.10-kmsk4exm.mjs +15 -0
  196. package/dist/chunks/cli-1.0.10-kww7mmtb.mjs +2 -0
  197. package/dist/chunks/cli-1.0.10-ky6sqp4h.mjs +2 -0
  198. package/dist/chunks/cli-1.0.10-m2yxngqq.mjs +2 -0
  199. package/dist/chunks/cli-1.0.10-m56h58rz.mjs +4 -0
  200. package/dist/chunks/cli-1.0.10-mnyfnbxw.mjs +2 -0
  201. package/dist/chunks/cli-1.0.10-n2xanxex.mjs +2 -0
  202. package/dist/chunks/cli-1.0.10-n5n71bfh.mjs +2 -0
  203. package/dist/chunks/cli-1.0.10-n8yjcm4e.mjs +2 -0
  204. package/dist/chunks/cli-1.0.10-ng670b7q.mjs +4 -0
  205. package/dist/chunks/cli-1.0.10-nh813cn1.mjs +25 -0
  206. package/dist/chunks/cli-1.0.10-nrkp80dg.mjs +2 -0
  207. package/dist/chunks/cli-1.0.10-nzw6qreb.mjs +2 -0
  208. package/dist/chunks/cli-1.0.10-p0q41475.mjs +2 -0
  209. package/dist/chunks/cli-1.0.10-pc4k60c7.mjs +3 -0
  210. package/dist/chunks/cli-1.0.10-pd2mt28b.mjs +6 -0
  211. package/dist/chunks/cli-1.0.10-ptbb2wn9.mjs +2 -0
  212. package/dist/chunks/cli-1.0.10-pv72gcrc.mjs +2 -0
  213. package/dist/chunks/cli-1.0.10-pve8az23.mjs +2 -0
  214. package/dist/chunks/cli-1.0.10-q2gqrdsg.mjs +12 -0
  215. package/dist/chunks/cli-1.0.10-qpbq00z0.mjs +2 -0
  216. package/dist/chunks/cli-1.0.10-r0k2vrj0.mjs +4 -0
  217. package/dist/chunks/cli-1.0.10-r5vax630.mjs +2 -0
  218. package/dist/chunks/cli-1.0.10-r6fe45r0.mjs +2 -0
  219. package/dist/chunks/cli-1.0.10-rdtm500m.mjs +2 -0
  220. package/dist/chunks/cli-1.0.10-rv1gqs67.mjs +2 -0
  221. package/dist/chunks/cli-1.0.10-rvmxg955.mjs +2 -0
  222. package/dist/chunks/cli-1.0.10-rx79bg1y.mjs +3 -0
  223. package/dist/chunks/cli-1.0.10-s71r06y4.mjs +58 -0
  224. package/dist/chunks/cli-1.0.10-sk2nf64f.mjs +2 -0
  225. package/dist/chunks/cli-1.0.10-skya2rkj.mjs +5 -0
  226. package/dist/chunks/cli-1.0.10-ss2tmvtb.mjs +2 -0
  227. package/dist/chunks/cli-1.0.10-sx9jc4xr.mjs +2 -0
  228. package/dist/chunks/cli-1.0.10-sy8asc9x.mjs +2 -0
  229. package/dist/chunks/cli-1.0.10-t14tjahq.mjs +2 -0
  230. package/dist/chunks/cli-1.0.10-t4r1szrq.mjs +2 -0
  231. package/dist/chunks/cli-1.0.10-t7j9fna8.mjs +2 -0
  232. package/dist/chunks/cli-1.0.10-ta2k7fvc.mjs +2 -0
  233. package/dist/chunks/cli-1.0.10-twwqss1j.mjs +2 -0
  234. package/dist/chunks/cli-1.0.10-tz8wh2nt.mjs +2 -0
  235. package/dist/chunks/cli-1.0.10-v10zh0fh.mjs +2 -0
  236. package/dist/chunks/cli-1.0.10-v21sb2kt.mjs +2 -0
  237. package/dist/chunks/cli-1.0.10-vgpbbf1e.mjs +2 -0
  238. package/dist/chunks/cli-1.0.10-vr6qr3sv.mjs +2 -0
  239. package/dist/chunks/cli-1.0.10-vs4em692.mjs +3 -0
  240. package/dist/chunks/cli-1.0.10-vtjr25wp.mjs +2 -0
  241. package/dist/chunks/cli-1.0.10-vztkwp82.mjs +2 -0
  242. package/dist/chunks/cli-1.0.10-w3tmnr5j.mjs +20 -0
  243. package/dist/chunks/cli-1.0.10-wey5x58d.mjs +2 -0
  244. package/dist/chunks/cli-1.0.10-wg6fyahd.mjs +2 -0
  245. package/dist/chunks/cli-1.0.10-wg9nsp2f.mjs +2 -0
  246. package/dist/chunks/cli-1.0.10-wmfmsmjy.mjs +12 -0
  247. package/dist/chunks/cli-1.0.10-wqjsz7wa.mjs +5494 -0
  248. package/dist/chunks/cli-1.0.10-wxrka0th.mjs +6 -0
  249. package/dist/chunks/cli-1.0.10-x6xcvx11.mjs +16 -0
  250. package/dist/chunks/cli-1.0.10-xpe7rcb5.mjs +2 -0
  251. package/dist/chunks/cli-1.0.10-xt00tyad.mjs +2 -0
  252. package/dist/chunks/cli-1.0.10-xtvrvzg5.mjs +17 -0
  253. package/dist/chunks/cli-1.0.10-xww01et4.mjs +2 -0
  254. package/dist/chunks/cli-1.0.10-y28ymt76.mjs +2 -0
  255. package/dist/chunks/cli-1.0.10-yjrzkmfn.mjs +3 -0
  256. package/dist/chunks/cli-1.0.10-ynhcfc43.mjs +3 -0
  257. package/dist/chunks/cli-1.0.10-ywhv7cdv.mjs +6 -0
  258. package/dist/chunks/cli-1.0.10-yxygfxta.mjs +45 -0
  259. package/dist/chunks/cli-1.0.10-yzdn65j0.mjs +4 -0
  260. package/dist/chunks/cli-1.0.10-z3xm8f1d.mjs +39 -0
  261. package/dist/chunks/cli-1.0.10-z4jh4f0p.mjs +2 -0
  262. package/dist/chunks/cli-1.0.10-z6340h71.mjs +4 -0
  263. package/dist/chunks/cli-1.0.10-z7wkvxqp.mjs +3 -0
  264. package/dist/chunks/cli-1.0.10-zkydc4kt.mjs +12 -0
  265. package/dist/chunks/cli-1.0.10-zqkna2fg.mjs +2 -0
  266. package/dist/chunks/cli-1.0.10-zsywcbys.mjs +2 -0
  267. package/dist/chunks/client-1.0.10-7byazp8v.mjs +1 -0
  268. package/dist/chunks/color-1.0.10-s4c1qp2y.mjs +1 -0
  269. package/dist/chunks/compact-1.0.10-b8zsezb4.mjs +3 -0
  270. package/dist/chunks/config-1.0.10-60eqskrh.mjs +1 -0
  271. package/dist/chunks/config-1.0.10-rbfqh3y0.mjs +1 -0
  272. package/dist/chunks/constants-1.0.10-z5rz293a.mjs +1 -0
  273. package/dist/chunks/context-1.0.10-bg5xx3et.mjs +1 -0
  274. package/dist/chunks/context-noninteractive-1.0.10-cjhkmk1r.mjs +1 -0
  275. package/dist/chunks/conversation-1.0.10-3cgadyvt.mjs +1 -0
  276. package/dist/chunks/copilotHeaders-1.0.10-zmbzt99b.mjs +1 -0
  277. package/dist/chunks/copy-1.0.10-dx3pp3q2.mjs +9 -0
  278. package/dist/chunks/cost-1.0.10-80gfyjq7.mjs +1 -0
  279. package/dist/chunks/createSSHSession-1.0.10-2xk3wyeg.mjs +1 -0
  280. package/dist/chunks/createSession-1.0.10-sr914pcx.mjs +1 -0
  281. package/dist/chunks/debug-1.0.10-k0dhnsx3.mjs +1 -0
  282. package/dist/chunks/defaultActionDeps-1.0.10-fgjm5561.mjs +1446 -0
  283. package/dist/chunks/desktop-1.0.10-xe4fddd4.mjs +1 -0
  284. package/dist/chunks/detectRepository-1.0.10-g90zwegz.mjs +1 -0
  285. package/dist/chunks/detection-1.0.10-bjg1jygr.mjs +1 -0
  286. package/dist/chunks/diff-1.0.10-79y94xba.mjs +1 -0
  287. package/dist/chunks/doctor-1.0.10-tvfkxqt6.mjs +1 -0
  288. package/dist/chunks/doctorDiagnostic-1.0.10-w0zh5ae9.mjs +1 -0
  289. package/dist/chunks/earlyInput-1.0.10-1hr7dsxb.mjs +1 -0
  290. package/dist/chunks/effort-1.0.10-emjcedez.mjs +10 -0
  291. package/dist/chunks/engine-1.0.10-ywcrdtr6.mjs +1 -0
  292. package/dist/chunks/envLessBridgeConfig-1.0.10-cvy0rrma.mjs +1 -0
  293. package/dist/chunks/envUtils-1.0.10-cam4ph3k.mjs +1 -0
  294. package/dist/chunks/environmentSelection-1.0.10-1qtvt9sr.mjs +1 -0
  295. package/dist/chunks/environments-1.0.10-rxaz4r3h.mjs +1 -0
  296. package/dist/chunks/errors-1.0.10-qy5ag074.mjs +1 -0
  297. package/dist/chunks/exampleCommands-1.0.10-g3e3zz4e.mjs +1 -0
  298. package/dist/chunks/execFileNoThrow-1.0.10-s07vn416.mjs +1 -0
  299. package/dist/chunks/exit-1.0.10-ezwxcfqx.mjs +1 -0
  300. package/dist/chunks/explorer-1.0.10-a47gdyfa.mjs +1 -0
  301. package/dist/chunks/export-1.0.10-671yvkk4.mjs +2 -0
  302. package/dist/chunks/extra-usage-1.0.10-j1sw8ax0.mjs +1 -0
  303. package/dist/chunks/extra-usage-noninteractive-1.0.10-y7grm0jw.mjs +1 -0
  304. package/dist/chunks/fast-1.0.10-s9pbpm3b.mjs +1 -0
  305. package/dist/chunks/feedback-1.0.10-cyrkbx7y.mjs +14 -0
  306. package/dist/chunks/firstPartyEventLogger-1.0.10-5ycy04fg.mjs +1 -0
  307. package/dist/chunks/git-1.0.10-rxj88p2f.mjs +1 -0
  308. package/dist/chunks/githubModelsCredentials-1.0.10-brf3k7b6.mjs +1 -0
  309. package/dist/chunks/goal-1.0.10-xbq2asg7.mjs +4 -0
  310. package/dist/chunks/grove-1.0.10-9n9svmaz.mjs +1 -0
  311. package/dist/chunks/growthbook-1.0.10-w933p6sp.mjs +1 -0
  312. package/dist/chunks/headless-1.0.10-wmgrqfkj.mjs +2 -0
  313. package/dist/chunks/heapdump-1.0.10-g62zynw6.mjs +6 -0
  314. package/dist/chunks/help-1.0.10-f0gt1j1w.mjs +1 -0
  315. package/dist/chunks/hookChains-1.0.10-bepy9pvw.mjs +3 -0
  316. package/dist/chunks/hooks-1.0.10-gw89vhja.mjs +79 -0
  317. package/dist/chunks/hooks-1.0.10-mvry337c.mjs +1 -0
  318. package/dist/chunks/ide-1.0.10-f332q2j4.mjs +3 -0
  319. package/dist/chunks/image-processor-napi-1.0.10-a3r2bp6h.mjs +1 -0
  320. package/dist/chunks/inboundAttachments-1.0.10-vw1vtayk.mjs +1 -0
  321. package/dist/chunks/index-1.0.10-0k08n5bq.mjs +1 -0
  322. package/dist/chunks/index-1.0.10-4mt0jdmh.mjs +9 -0
  323. package/dist/chunks/index-1.0.10-7t360587.mjs +30 -0
  324. package/dist/chunks/index-1.0.10-9bfdndy5.mjs +9 -0
  325. package/dist/chunks/index-1.0.10-am7dnmp4.mjs +2 -0
  326. package/dist/chunks/index-1.0.10-bwk5zyqy.mjs +2 -0
  327. package/dist/chunks/index-1.0.10-dhnc5tvd.mjs +1 -0
  328. package/dist/chunks/index-1.0.10-edby3nt5.mjs +1 -0
  329. package/dist/chunks/index-1.0.10-fmdn53xt.mjs +5 -0
  330. package/dist/chunks/index-1.0.10-ggchxhyq.mjs +1 -0
  331. package/dist/chunks/index-1.0.10-j69vq8sg.mjs +1 -0
  332. package/dist/chunks/index-1.0.10-kgtk88f2.mjs +1 -0
  333. package/dist/chunks/index-1.0.10-kva9fdeh.mjs +1 -0
  334. package/dist/chunks/index-1.0.10-my9gs07r.mjs +17 -0
  335. package/dist/chunks/index-1.0.10-nhbtysa8.mjs +1 -0
  336. package/dist/chunks/index-1.0.10-nzyycr95.mjs +1 -0
  337. package/dist/chunks/index-1.0.10-q5nbszvz.mjs +1 -0
  338. package/dist/chunks/index-1.0.10-s19bfcep.mjs +1 -0
  339. package/dist/chunks/index-1.0.10-t31zjmfq.mjs +1 -0
  340. package/dist/chunks/index-1.0.10-t6nhh2kg.mjs +1 -0
  341. package/dist/chunks/index-1.0.10-vejq9y46.mjs +1 -0
  342. package/dist/chunks/index-1.0.10-y00daz8n.mjs +1 -0
  343. package/dist/chunks/index-1.0.10-ze7wmpkc.mjs +1 -0
  344. package/dist/chunks/init-1.0.10-6h103d8q.mjs +1 -0
  345. package/dist/chunks/initReplBridge-1.0.10-d867e3x4.mjs +1 -0
  346. package/dist/chunks/ink-1.0.10-nk1fq1dm.mjs +1 -0
  347. package/dist/chunks/insights-1.0.10-nd5bf3tn.mjs +870 -0
  348. package/dist/chunks/install-1.0.10-c52kdgj6.mjs +1 -0
  349. package/dist/chunks/install-github-app-1.0.10-ps0750kg.mjs +149 -0
  350. package/dist/chunks/install-slack-app-1.0.10-7wkt6hc4.mjs +1 -0
  351. package/dist/chunks/instrumentation-1.0.10-a3heyvnj.mjs +1 -0
  352. package/dist/chunks/interactiveHelpers-1.0.10-wxcke8v7.mjs +1 -0
  353. package/dist/chunks/keybindings-1.0.10-p7wqtqkd.mjs +2 -0
  354. package/dist/chunks/knowledge-1.0.10-c42940vh.mjs +2 -0
  355. package/dist/chunks/latestVersionCache-1.0.10-50a46a7m.mjs +1 -0
  356. package/dist/chunks/loadAgentsDir-1.0.10-py3qpey9.mjs +1 -0
  357. package/dist/chunks/loadPluginHooks-1.0.10-39nwmnvx.mjs +1 -0
  358. package/dist/chunks/loadPluginHooks-1.0.10-6jmcymem.mjs +1 -0
  359. package/dist/chunks/log-1.0.10-eca0cp5t.mjs +1 -0
  360. package/dist/chunks/main-1.0.10-9z91b6fs.mjs +1 -0
  361. package/dist/chunks/managedEnv-1.0.10-4jrvqcr0.mjs +1 -0
  362. package/dist/chunks/mcp-1.0.10-4c5c48sr.mjs +4 -0
  363. package/dist/chunks/mcp-1.0.10-vqvqv3j1.mjs +1 -0
  364. package/dist/chunks/mcp-1.0.10-xkcvhw01.mjs +17 -0
  365. package/dist/chunks/mcpb-1.0.10-z4af6k7x.mjs +1 -0
  366. package/dist/chunks/memory-1.0.10-0wrb9gdn.mjs +3 -0
  367. package/dist/chunks/model-1.0.10-9qthsb3v.mjs +1 -0
  368. package/dist/chunks/model-1.0.10-r9kgqf6z.mjs +2 -0
  369. package/dist/chunks/node-1.0.10-hfwnhf6d.mjs +12 -0
  370. package/dist/chunks/oauth-1.0.10-m902vg8r.mjs +1 -0
  371. package/dist/chunks/openaiShim-1.0.10-q62abztc.mjs +14 -0
  372. package/dist/chunks/output-style-1.0.10-563k721y.mjs +1 -0
  373. package/dist/chunks/package-ZZWOLTXM-1.0.10-txxn3gh8.mjs +1 -0
  374. package/dist/chunks/parseConnectUrl-1.0.10-wj3nyx2d.mjs +1 -0
  375. package/dist/chunks/parser-1.0.10-fjc5mtxc.mjs +1 -0
  376. package/dist/chunks/passes-1.0.10-x1capf33.mjs +1 -0
  377. package/dist/chunks/permissions-1.0.10-4my34k8d.mjs +3 -0
  378. package/dist/chunks/permissions-1.0.10-5n02mr16.mjs +1 -0
  379. package/dist/chunks/plan-1.0.10-hyvxe8tv.mjs +1 -0
  380. package/dist/chunks/plist-1.0.10-pp45jg89.mjs +1 -0
  381. package/dist/chunks/plugin-1.0.10-hstxrh5v.mjs +29 -0
  382. package/dist/chunks/pluginStartupCheck-1.0.10-xcrwztkb.mjs +1 -0
  383. package/dist/chunks/plugins-1.0.10-919c0yk2.mjs +9 -0
  384. package/dist/chunks/preActionHook-1.0.10-jn8fp6bd.mjs +2 -0
  385. package/dist/chunks/print-1.0.10-fztd9aqa.mjs +57 -0
  386. package/dist/chunks/privacy-settings-1.0.10-dd3na1c7.mjs +1 -0
  387. package/dist/chunks/process-1.0.10-3spc6fy0.mjs +1 -0
  388. package/dist/chunks/processBashCommand-1.0.10-tam7qz77.mjs +1 -0
  389. package/dist/chunks/processSlashCommand-1.0.10-rc50ctef.mjs +9 -0
  390. package/dist/chunks/prompt-1.0.10-hgr1z03f.mjs +1 -0
  391. package/dist/chunks/prompt-1.0.10-mtcwzabt.mjs +1 -0
  392. package/dist/chunks/prompts-1.0.10-qfcrm3h0.mjs +1 -0
  393. package/dist/chunks/protocolHandler-1.0.10-maw1nc01.mjs +13 -0
  394. package/dist/chunks/provider-1.0.10-w8e0x4wg.mjs +2 -0
  395. package/dist/chunks/providerProfiles-1.0.10-vrczr90z.mjs +1 -0
  396. package/dist/chunks/providerValidation-1.0.10-hsvbzg8v.mjs +6 -0
  397. package/dist/chunks/rate-limit-options-1.0.10-tz7t0azd.mjs +1 -0
  398. package/dist/chunks/registerSubcommands-1.0.10-c2xzhak0.mjs +34 -0
  399. package/dist/chunks/registry-1.0.10-vvp815a7.mjs +1 -0
  400. package/dist/chunks/release-notes-1.0.10-bddj03ct.mjs +5 -0
  401. package/dist/chunks/reload-plugins-1.0.10-4kyzkvgp.mjs +2 -0
  402. package/dist/chunks/remote-env-1.0.10-7w2v6jch.mjs +1 -0
  403. package/dist/chunks/remoteBridgeCore-1.0.10-gjgd2e0d.mjs +1 -0
  404. package/dist/chunks/remoteSession-1.0.10-y8fkrvm4.mjs +1 -0
  405. package/dist/chunks/rename-1.0.10-q51x2bn9.mjs +1 -0
  406. package/dist/chunks/replBridgeHandle-1.0.10-1qzwcpyn.mjs +1 -0
  407. package/dist/chunks/replLauncher-1.0.10-cnfhh6dg.mjs +1 -0
  408. package/dist/chunks/resume-1.0.10-f2k9he8x.mjs +2 -0
  409. package/dist/chunks/rewind-1.0.10-8b4h21at.mjs +1 -0
  410. package/dist/chunks/rootOptions-1.0.10-0h685kw2.mjs +1 -0
  411. package/dist/chunks/runWorkflowHeadless-1.0.10-xrygk6eq.mjs +10 -0
  412. package/dist/chunks/sandbox-adapter-1.0.10-azs01x6x.mjs +1 -0
  413. package/dist/chunks/sandbox-toggle-1.0.10-xm1nasf6.mjs +1 -0
  414. package/dist/chunks/session-1.0.10-ab9eeddq.mjs +2 -0
  415. package/dist/chunks/sessionDiscovery-1.0.10-ndj6yx0m.mjs +1 -0
  416. package/dist/chunks/sessionFileAccessHooks-1.0.10-0p2fqbx6.mjs +1 -0
  417. package/dist/chunks/sessionStorage-1.0.10-64bjn2kx.mjs +1 -0
  418. package/dist/chunks/settings-1.0.10-r6qxxnnb.mjs +1 -0
  419. package/dist/chunks/setup-1.0.10-k7szer1n.mjs +5 -0
  420. package/dist/chunks/sinks-1.0.10-dzct0b1n.mjs +1 -0
  421. package/dist/chunks/skills-1.0.10-02531p29.mjs +1 -0
  422. package/dist/chunks/startupProfiler-1.0.10-n98x8y1n.mjs +1 -0
  423. package/dist/chunks/startupUpdateCheck-1.0.10-wzb027hm.mjs +1 -0
  424. package/dist/chunks/state-1.0.10-665t7j4r.mjs +1 -0
  425. package/dist/chunks/stats-1.0.10-x6tdkrp1.mjs +6 -0
  426. package/dist/chunks/status-1.0.10-wtkz1g25.mjs +1 -0
  427. package/dist/chunks/stickers-1.0.10-zgzqw4ax.mjs +1 -0
  428. package/dist/chunks/subprocessEnv-1.0.10-37p3k517.mjs +1 -0
  429. package/dist/chunks/tasks-1.0.10-3kk1hf1s.mjs +1 -0
  430. package/dist/chunks/teamHelpers-1.0.10-1qnkvg1q.mjs +1 -0
  431. package/dist/chunks/teammateModeSnapshot-1.0.10-d265azzr.mjs +1 -0
  432. package/dist/chunks/teleport-1.0.10-qr57q6d2.mjs +1 -0
  433. package/dist/chunks/terminalSetup-1.0.10-939m4hg2.mjs +1 -0
  434. package/dist/chunks/theme-1.0.10-jxwk08gg.mjs +1 -0
  435. package/dist/chunks/thinkback-1.0.10-8v8fca1v.mjs +1 -0
  436. package/dist/chunks/thinkback-play-1.0.10-29vpx0es.mjs +1 -0
  437. package/dist/chunks/toolPool-1.0.10-r9t7snm8.mjs +1 -0
  438. package/dist/chunks/toolSearch-1.0.10-rdhjyrvv.mjs +1 -0
  439. package/dist/chunks/tools-1.0.10-660q1vgv.mjs +1 -0
  440. package/dist/chunks/trustedDevice-1.0.10-jzs4zx23.mjs +1 -0
  441. package/dist/chunks/turndown.cjs-1.0.10-jhv703h0.mjs +69 -0
  442. package/dist/chunks/types-1.0.10-1sbcc2k4.mjs +1 -0
  443. package/dist/chunks/ultrareviewCommand-1.0.10-1dmv8afw.mjs +4 -0
  444. package/dist/chunks/update-1.0.10-yg386a5b.mjs +88 -0
  445. package/dist/chunks/upgrade-1.0.10-910xk23j.mjs +1 -0
  446. package/dist/chunks/upload-1.0.10-tn5nw6e4.mjs +7 -0
  447. package/dist/chunks/upstreamproxy-1.0.10-d1ywz5zh.mjs +14 -0
  448. package/dist/chunks/url-handler-napi-1.0.10-frjeqn6d.mjs +1 -0
  449. package/dist/chunks/usage-1.0.10-2k10zj8d.mjs +1 -0
  450. package/dist/chunks/util-1.0.10-hj993p0h.mjs +1 -0
  451. package/dist/chunks/utils-1.0.10-47e3f2py.mjs +1 -0
  452. package/dist/chunks/vim-1.0.10-j5k011cf.mjs +1 -0
  453. package/dist/chunks/watchLoop-1.0.10-d5k4546s.mjs +13 -0
  454. package/dist/chunks/watcher-1.0.10-apvqyt0v.mjs +1 -0
  455. package/dist/chunks/wiki-1.0.10-5stbmxsm.mjs +132 -0
  456. package/dist/chunks/workflows-1.0.10-2j95kr59.mjs +1 -0
  457. package/dist/chunks/worktree-1.0.10-atjzgk92.mjs +1 -0
  458. package/dist/chunks/worktreeModeEnabled-1.0.10-knmjfqre.mjs +1 -0
  459. package/dist/chunks/wrapper-1.0.10-bxvd7yje.mjs +7 -0
  460. package/dist/cli.mjs +2 -2
  461. package/dist/help-workflow.txt +12 -0
  462. package/dist/help.txt +1 -0
  463. package/package.json +9 -9
  464. package/dist/chunks/AgentTool-1.0.8-eje3a59q.mjs +0 -1
  465. package/dist/chunks/App-1.0.8-d2xvppcs.mjs +0 -1
  466. package/dist/chunks/ApproveApiKey-1.0.8-46gxh8v1.mjs +0 -1
  467. package/dist/chunks/AssistantSessionChooser-1.0.8-14hqa3x1.mjs +0 -1
  468. package/dist/chunks/AutoModeOptInDialog-1.0.8-wbj2exgg.mjs +0 -1
  469. package/dist/chunks/BypassPermissionsModeDialog-1.0.8-qw286z98.mjs +0 -1
  470. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.8-d7f3p2f2.mjs +0 -1
  471. package/dist/chunks/ConsoleOAuthFlow-1.0.8-pz9144b6.mjs +0 -1
  472. package/dist/chunks/DiffDialog-1.0.8-kekremjy.mjs +0 -7
  473. package/dist/chunks/Doctor-1.0.8-y6yd83ya.mjs +0 -1
  474. package/dist/chunks/ExplorerDialog-1.0.8-sde0qmj8.mjs +0 -6
  475. package/dist/chunks/Grove-1.0.8-vaqh13j1.mjs +0 -1
  476. package/dist/chunks/ITermBackend-1.0.8-pyx0hrdr.mjs +0 -1
  477. package/dist/chunks/InvalidConfigDialog-1.0.8-9xkjpkdq.mjs +0 -1
  478. package/dist/chunks/InvalidSettingsDialog-1.0.8-sg0zxdxs.mjs +0 -1
  479. package/dist/chunks/MigrationDialog-1.0.8-sa3w4fkf.mjs +0 -1
  480. package/dist/chunks/Onboarding-1.0.8-j2grnf78.mjs +0 -1
  481. package/dist/chunks/ProviderManager-1.0.8-rhr4npaj.mjs +0 -1
  482. package/dist/chunks/REPL-1.0.8-r0frprp1.mjs +0 -1
  483. package/dist/chunks/ResumeConversation-1.0.8-y8q8w4g5.mjs +0 -1
  484. package/dist/chunks/SnapshotUpdateDialog-1.0.8-6r0afvcw.mjs +0 -1
  485. package/dist/chunks/TeleportProgress-1.0.8-8k0msa15.mjs +0 -1
  486. package/dist/chunks/TeleportRepoMismatchDialog-1.0.8-3y1gzb63.mjs +0 -1
  487. package/dist/chunks/TeleportResumeWrapper-1.0.8-sr835vjm.mjs +0 -1
  488. package/dist/chunks/TmuxBackend-1.0.8-j4ewgs24.mjs +0 -9
  489. package/dist/chunks/ToolSearchTool-1.0.8-g3jtn9j5.mjs +0 -1
  490. package/dist/chunks/TrustDialog-1.0.8-6fmeeyg3.mjs +0 -1
  491. package/dist/chunks/activeProvider-1.0.8-07gr4v39.mjs +0 -1
  492. package/dist/chunks/add-dir-1.0.8-zp69mch9.mjs +0 -1
  493. package/dist/chunks/agentTypes-1.0.8-0tz8xbhq.mjs +0 -1
  494. package/dist/chunks/agents-1.0.8-7b7qbe1b.mjs +0 -3
  495. package/dist/chunks/agents-1.0.8-hcpq0qtv.mjs +0 -110
  496. package/dist/chunks/api-1.0.8-99jqr2rt.mjs +0 -1
  497. package/dist/chunks/asciicast-1.0.8-hdy3b2tb.mjs +0 -1
  498. package/dist/chunks/assistant-1.0.8-wf6vgaxz.mjs +0 -1
  499. package/dist/chunks/auth-1.0.8-by49xah8.mjs +0 -1
  500. package/dist/chunks/auth-1.0.8-jhga5hc5.mjs +0 -1
  501. package/dist/chunks/autoMode-1.0.8-9hknbsrn.mjs +0 -48
  502. package/dist/chunks/autoUpdater-1.0.8-n0axyces.mjs +0 -1
  503. package/dist/chunks/backgroundHousekeeping-1.0.8-tthnkm6t.mjs +0 -1
  504. package/dist/chunks/branch-1.0.8-v0vyzjd1.mjs +0 -4
  505. package/dist/chunks/bridge-1.0.8-9em7eyw2.mjs +0 -2
  506. package/dist/chunks/bridgeConfig-1.0.8-rc3gw5mw.mjs +0 -1
  507. package/dist/chunks/bridgeEnabled-1.0.8-mmzmxjzj.mjs +0 -1
  508. package/dist/chunks/bridgeMain-1.0.8-kys2mqca.mjs +0 -88
  509. package/dist/chunks/bridgePointer-1.0.8-ky397f5d.mjs +0 -1
  510. package/dist/chunks/btw-1.0.8-ppch37et.mjs +0 -1
  511. package/dist/chunks/buddy-1.0.8-3j0jmxqv.mjs +0 -3
  512. package/dist/chunks/cacache-1.0.8-npx6886e.mjs +0 -1
  513. package/dist/chunks/cache-probe-1.0.8-q0q9v06f.mjs +0 -21
  514. package/dist/chunks/cacheStats-1.0.8-8g3sbes5.mjs +0 -4
  515. package/dist/chunks/caches-1.0.8-c44ykbdq.mjs +0 -1
  516. package/dist/chunks/claudeDesktop-1.0.8-3718a4er.mjs +0 -1
  517. package/dist/chunks/claudemd-1.0.8-mrm97672.mjs +0 -1
  518. package/dist/chunks/clear-1.0.8-60s1dmkm.mjs +0 -1
  519. package/dist/chunks/clearTerminal-1.0.8-s7tt8cvq.mjs +0 -1
  520. package/dist/chunks/cli-1.0.8-0g25h6r5.mjs +0 -3
  521. package/dist/chunks/cli-1.0.8-0j3a18cb.mjs +0 -2
  522. package/dist/chunks/cli-1.0.8-0w29g9sk.mjs +0 -4
  523. package/dist/chunks/cli-1.0.8-1r6dnkqd.mjs +0 -45
  524. package/dist/chunks/cli-1.0.8-1ss6x3zt.mjs +0 -2
  525. package/dist/chunks/cli-1.0.8-1tmgp7jd.mjs +0 -2
  526. package/dist/chunks/cli-1.0.8-2tcfa3h7.mjs +0 -26
  527. package/dist/chunks/cli-1.0.8-2tqdqypv.mjs +0 -2
  528. package/dist/chunks/cli-1.0.8-2tz4jekt.mjs +0 -2
  529. package/dist/chunks/cli-1.0.8-2vmb9a3w.mjs +0 -2
  530. package/dist/chunks/cli-1.0.8-2yyas23w.mjs +0 -2
  531. package/dist/chunks/cli-1.0.8-330tdbma.mjs +0 -2
  532. package/dist/chunks/cli-1.0.8-34678988.mjs +0 -2
  533. package/dist/chunks/cli-1.0.8-3cz8c904.mjs +0 -2
  534. package/dist/chunks/cli-1.0.8-3j90qb52.mjs +0 -2
  535. package/dist/chunks/cli-1.0.8-3tw1xf7y.mjs +0 -2
  536. package/dist/chunks/cli-1.0.8-3vh4nftm.mjs +0 -7
  537. package/dist/chunks/cli-1.0.8-3w4np76x.mjs +0 -2
  538. package/dist/chunks/cli-1.0.8-45e9fjb4.mjs +0 -21
  539. package/dist/chunks/cli-1.0.8-4a1exx1w.mjs +0 -2
  540. package/dist/chunks/cli-1.0.8-4vzmdadp.mjs +0 -2
  541. package/dist/chunks/cli-1.0.8-4wgaqcjn.mjs +0 -42
  542. package/dist/chunks/cli-1.0.8-53cy4zte.mjs +0 -34
  543. package/dist/chunks/cli-1.0.8-592dqckn.mjs +0 -12
  544. package/dist/chunks/cli-1.0.8-5awx1w8e.mjs +0 -25
  545. package/dist/chunks/cli-1.0.8-5dyqgt8m.mjs +0 -15
  546. package/dist/chunks/cli-1.0.8-5gn5a7p3.mjs +0 -2
  547. package/dist/chunks/cli-1.0.8-5mzwqxg2.mjs +0 -5
  548. package/dist/chunks/cli-1.0.8-5r4z4nzj.mjs +0 -9
  549. package/dist/chunks/cli-1.0.8-5wfqemy1.mjs +0 -17
  550. package/dist/chunks/cli-1.0.8-5wwge1jc.mjs +0 -3
  551. package/dist/chunks/cli-1.0.8-628ypgq9.mjs +0 -4
  552. package/dist/chunks/cli-1.0.8-63tfdt8q.mjs +0 -2
  553. package/dist/chunks/cli-1.0.8-693zfwne.mjs +0 -2
  554. package/dist/chunks/cli-1.0.8-6fz5dc6p.mjs +0 -2
  555. package/dist/chunks/cli-1.0.8-6hge9cq0.mjs +0 -2
  556. package/dist/chunks/cli-1.0.8-6q1p5cvf.mjs +0 -2
  557. package/dist/chunks/cli-1.0.8-74y9exyb.mjs +0 -2
  558. package/dist/chunks/cli-1.0.8-74zbkhyt.mjs +0 -67
  559. package/dist/chunks/cli-1.0.8-75t3aews.mjs +0 -2
  560. package/dist/chunks/cli-1.0.8-75ta9404.mjs +0 -2
  561. package/dist/chunks/cli-1.0.8-7b6c3csb.mjs +0 -2
  562. package/dist/chunks/cli-1.0.8-7khq3d03.mjs +0 -2
  563. package/dist/chunks/cli-1.0.8-7p8001bq.mjs +0 -2
  564. package/dist/chunks/cli-1.0.8-7tm0v9g4.mjs +0 -2
  565. package/dist/chunks/cli-1.0.8-845srnq2.mjs +0 -2
  566. package/dist/chunks/cli-1.0.8-8aa4g8k7.mjs +0 -9
  567. package/dist/chunks/cli-1.0.8-8bymhd85.mjs +0 -2
  568. package/dist/chunks/cli-1.0.8-8d0pym8n.mjs +0 -4
  569. package/dist/chunks/cli-1.0.8-8eace15k.mjs +0 -2
  570. package/dist/chunks/cli-1.0.8-8f8079r1.mjs +0 -2
  571. package/dist/chunks/cli-1.0.8-8g4cyspe.mjs +0 -2
  572. package/dist/chunks/cli-1.0.8-9az1bj5r.mjs +0 -2
  573. package/dist/chunks/cli-1.0.8-9cg23m77.mjs +0 -2
  574. package/dist/chunks/cli-1.0.8-9d98s5n7.mjs +0 -2
  575. package/dist/chunks/cli-1.0.8-9e91trv9.mjs +0 -4
  576. package/dist/chunks/cli-1.0.8-9fsgsfsr.mjs +0 -2
  577. package/dist/chunks/cli-1.0.8-9kjmxaz9.mjs +0 -2
  578. package/dist/chunks/cli-1.0.8-9ten5rvg.mjs +0 -3
  579. package/dist/chunks/cli-1.0.8-9y02shjc.mjs +0 -6
  580. package/dist/chunks/cli-1.0.8-a227an7n.mjs +0 -4
  581. package/dist/chunks/cli-1.0.8-a5h5dhvb.mjs +0 -2
  582. package/dist/chunks/cli-1.0.8-a95nzf63.mjs +0 -3
  583. package/dist/chunks/cli-1.0.8-aac9erft.mjs +0 -18
  584. package/dist/chunks/cli-1.0.8-abdc5b5p.mjs +0 -12
  585. package/dist/chunks/cli-1.0.8-acrtv429.mjs +0 -2
  586. package/dist/chunks/cli-1.0.8-ah0px9dq.mjs +0 -2
  587. package/dist/chunks/cli-1.0.8-apm2cwth.mjs +0 -2
  588. package/dist/chunks/cli-1.0.8-b1a558ty.mjs +0 -2
  589. package/dist/chunks/cli-1.0.8-b3rgrfhx.mjs +0 -2
  590. package/dist/chunks/cli-1.0.8-bce7mfng.mjs +0 -2
  591. package/dist/chunks/cli-1.0.8-bf89pdxw.mjs +0 -3
  592. package/dist/chunks/cli-1.0.8-by017547.mjs +0 -2
  593. package/dist/chunks/cli-1.0.8-c1m2f995.mjs +0 -2
  594. package/dist/chunks/cli-1.0.8-ch5nmk6z.mjs +0 -6
  595. package/dist/chunks/cli-1.0.8-ckzwfn2p.mjs +0 -2
  596. package/dist/chunks/cli-1.0.8-cnp4f1p9.mjs +0 -2
  597. package/dist/chunks/cli-1.0.8-cvanywgv.mjs +0 -4
  598. package/dist/chunks/cli-1.0.8-czw324tt.mjs +0 -2
  599. package/dist/chunks/cli-1.0.8-djnb6kg8.mjs +0 -2
  600. package/dist/chunks/cli-1.0.8-dnyn56hh.mjs +0 -2
  601. package/dist/chunks/cli-1.0.8-dtv7cx85.mjs +0 -2
  602. package/dist/chunks/cli-1.0.8-e1je8bbg.mjs +0 -2
  603. package/dist/chunks/cli-1.0.8-e1rqh3t5.mjs +0 -6
  604. package/dist/chunks/cli-1.0.8-e226v5zv.mjs +0 -2
  605. package/dist/chunks/cli-1.0.8-ebmqnhat.mjs +0 -2
  606. package/dist/chunks/cli-1.0.8-ecej8h97.mjs +0 -2
  607. package/dist/chunks/cli-1.0.8-eqnts1fr.mjs +0 -8
  608. package/dist/chunks/cli-1.0.8-erf5fgz4.mjs +0 -133
  609. package/dist/chunks/cli-1.0.8-erzw5831.mjs +0 -133
  610. package/dist/chunks/cli-1.0.8-evcjjrhq.mjs +0 -2
  611. package/dist/chunks/cli-1.0.8-ewrnp0r9.mjs +0 -2
  612. package/dist/chunks/cli-1.0.8-ezvghx0v.mjs +0 -2
  613. package/dist/chunks/cli-1.0.8-f149d1z0.mjs +0 -2
  614. package/dist/chunks/cli-1.0.8-f46gq37z.mjs +0 -2
  615. package/dist/chunks/cli-1.0.8-fch83jc9.mjs +0 -2
  616. package/dist/chunks/cli-1.0.8-fmf0f85n.mjs +0 -2
  617. package/dist/chunks/cli-1.0.8-fnnr43c2.mjs +0 -2
  618. package/dist/chunks/cli-1.0.8-fnwydrx1.mjs +0 -3
  619. package/dist/chunks/cli-1.0.8-frbc2pan.mjs +0 -2
  620. package/dist/chunks/cli-1.0.8-fs06q8cs.mjs +0 -2
  621. package/dist/chunks/cli-1.0.8-g2934g2e.mjs +0 -2
  622. package/dist/chunks/cli-1.0.8-g8tpbbvt.mjs +0 -3
  623. package/dist/chunks/cli-1.0.8-g9h4ay1q.mjs +0 -2
  624. package/dist/chunks/cli-1.0.8-gmf61bcb.mjs +0 -2
  625. package/dist/chunks/cli-1.0.8-gsr9wqaw.mjs +0 -39
  626. package/dist/chunks/cli-1.0.8-gv80trp6.mjs +0 -2
  627. package/dist/chunks/cli-1.0.8-h44d6jh3.mjs +0 -2
  628. package/dist/chunks/cli-1.0.8-hbgss955.mjs +0 -2
  629. package/dist/chunks/cli-1.0.8-hgreyqck.mjs +0 -2
  630. package/dist/chunks/cli-1.0.8-hkkcv1tv.mjs +0 -2
  631. package/dist/chunks/cli-1.0.8-htq95mje.mjs +0 -2
  632. package/dist/chunks/cli-1.0.8-hy7rca6f.mjs +0 -3
  633. package/dist/chunks/cli-1.0.8-jy0q2dkm.mjs +0 -2
  634. package/dist/chunks/cli-1.0.8-jy7hzejg.mjs +0 -2
  635. package/dist/chunks/cli-1.0.8-k7vkjf05.mjs +0 -2
  636. package/dist/chunks/cli-1.0.8-k90vtehz.mjs +0 -2
  637. package/dist/chunks/cli-1.0.8-ke76gxzw.mjs +0 -199
  638. package/dist/chunks/cli-1.0.8-kfv9esqs.mjs +0 -3
  639. package/dist/chunks/cli-1.0.8-kh51d8mn.mjs +0 -2
  640. package/dist/chunks/cli-1.0.8-kxhxnt9t.mjs +0 -2
  641. package/dist/chunks/cli-1.0.8-kzrdbzd1.mjs +0 -2
  642. package/dist/chunks/cli-1.0.8-kzyrncv0.mjs +0 -2
  643. package/dist/chunks/cli-1.0.8-m2w20tkx.mjs +0 -2
  644. package/dist/chunks/cli-1.0.8-m6fhqq8r.mjs +0 -2
  645. package/dist/chunks/cli-1.0.8-m9cg4s2e.mjs +0 -2
  646. package/dist/chunks/cli-1.0.8-mbhxente.mjs +0 -2
  647. package/dist/chunks/cli-1.0.8-mhhby5pn.mjs +0 -6
  648. package/dist/chunks/cli-1.0.8-mn87n778.mjs +0 -2
  649. package/dist/chunks/cli-1.0.8-mrepsey6.mjs +0 -12
  650. package/dist/chunks/cli-1.0.8-n2thtekm.mjs +0 -2
  651. package/dist/chunks/cli-1.0.8-n4rd5y17.mjs +0 -2
  652. package/dist/chunks/cli-1.0.8-nmrvp3xa.mjs +0 -2
  653. package/dist/chunks/cli-1.0.8-nyq2vcvp.mjs +0 -18
  654. package/dist/chunks/cli-1.0.8-p2tp1j0a.mjs +0 -2
  655. package/dist/chunks/cli-1.0.8-p4egaq4j.mjs +0 -5
  656. package/dist/chunks/cli-1.0.8-p8h84zc9.mjs +0 -3
  657. package/dist/chunks/cli-1.0.8-pbxke3zm.mjs +0 -24
  658. package/dist/chunks/cli-1.0.8-pemd6sje.mjs +0 -2
  659. package/dist/chunks/cli-1.0.8-pzesgrb2.mjs +0 -2
  660. package/dist/chunks/cli-1.0.8-q2myd223.mjs +0 -2
  661. package/dist/chunks/cli-1.0.8-q6x8n8kc.mjs +0 -2
  662. package/dist/chunks/cli-1.0.8-qbrw3wf3.mjs +0 -3
  663. package/dist/chunks/cli-1.0.8-qcf0zmve.mjs +0 -50
  664. package/dist/chunks/cli-1.0.8-qhcghw02.mjs +0 -2
  665. package/dist/chunks/cli-1.0.8-qjcxwb3c.mjs +0 -2
  666. package/dist/chunks/cli-1.0.8-qss5sph3.mjs +0 -59
  667. package/dist/chunks/cli-1.0.8-qzqze1a1.mjs +0 -2
  668. package/dist/chunks/cli-1.0.8-r3ecr05v.mjs +0 -2
  669. package/dist/chunks/cli-1.0.8-r4zbpasa.mjs +0 -24
  670. package/dist/chunks/cli-1.0.8-rdd0jr2h.mjs +0 -2
  671. package/dist/chunks/cli-1.0.8-rg1csg40.mjs +0 -2
  672. package/dist/chunks/cli-1.0.8-rh93fw0p.mjs +0 -2
  673. package/dist/chunks/cli-1.0.8-rna8rhza.mjs +0 -2
  674. package/dist/chunks/cli-1.0.8-rnkrr7ma.mjs +0 -2
  675. package/dist/chunks/cli-1.0.8-rxf0zjys.mjs +0 -2
  676. package/dist/chunks/cli-1.0.8-rxfx9v7j.mjs +0 -2
  677. package/dist/chunks/cli-1.0.8-s5kcxz2r.mjs +0 -4
  678. package/dist/chunks/cli-1.0.8-s6nsgb78.mjs +0 -2
  679. package/dist/chunks/cli-1.0.8-sbf6n56q.mjs +0 -2
  680. package/dist/chunks/cli-1.0.8-se674t5h.mjs +0 -4
  681. package/dist/chunks/cli-1.0.8-secda9xj.mjs +0 -2
  682. package/dist/chunks/cli-1.0.8-sqbaxhfc.mjs +0 -16
  683. package/dist/chunks/cli-1.0.8-swq5n54q.mjs +0 -2
  684. package/dist/chunks/cli-1.0.8-swts6q29.mjs +0 -2
  685. package/dist/chunks/cli-1.0.8-szvwf6r4.mjs +0 -2
  686. package/dist/chunks/cli-1.0.8-t5jg9csm.mjs +0 -2
  687. package/dist/chunks/cli-1.0.8-tdhxr84n.mjs +0 -3
  688. package/dist/chunks/cli-1.0.8-tfjhtagk.mjs +0 -2
  689. package/dist/chunks/cli-1.0.8-tpazbzcz.mjs +0 -2
  690. package/dist/chunks/cli-1.0.8-tq72b6bb.mjs +0 -2
  691. package/dist/chunks/cli-1.0.8-tqf6s7ht.mjs +0 -58
  692. package/dist/chunks/cli-1.0.8-tz68cg1p.mjs +0 -2
  693. package/dist/chunks/cli-1.0.8-v1rafynv.mjs +0 -2
  694. package/dist/chunks/cli-1.0.8-v75s19rg.mjs +0 -2
  695. package/dist/chunks/cli-1.0.8-vb0by9ay.mjs +0 -2
  696. package/dist/chunks/cli-1.0.8-vhjjjs1z.mjs +0 -24
  697. package/dist/chunks/cli-1.0.8-vka62cmh.mjs +0 -2
  698. package/dist/chunks/cli-1.0.8-vvy0bc0g.mjs +0 -1
  699. package/dist/chunks/cli-1.0.8-vztgm8r0.mjs +0 -2
  700. package/dist/chunks/cli-1.0.8-w5wjckph.mjs +0 -25
  701. package/dist/chunks/cli-1.0.8-w6atgaqw.mjs +0 -2
  702. package/dist/chunks/cli-1.0.8-wm0h5bqt.mjs +0 -3
  703. package/dist/chunks/cli-1.0.8-x1387pp6.mjs +0 -2
  704. package/dist/chunks/cli-1.0.8-x2z1s2gm.mjs +0 -2
  705. package/dist/chunks/cli-1.0.8-x3bjpevp.mjs +0 -12
  706. package/dist/chunks/cli-1.0.8-x4hcncpt.mjs +0 -2
  707. package/dist/chunks/cli-1.0.8-xcqdbka0.mjs +0 -2
  708. package/dist/chunks/cli-1.0.8-xhz9dm09.mjs +0 -2
  709. package/dist/chunks/cli-1.0.8-xka5xbz5.mjs +0 -2
  710. package/dist/chunks/cli-1.0.8-xv5yp3w6.mjs +0 -2
  711. package/dist/chunks/cli-1.0.8-xxrng2p1.mjs +0 -15
  712. package/dist/chunks/cli-1.0.8-xzp5af2t.mjs +0 -2
  713. package/dist/chunks/cli-1.0.8-y7jd923h.mjs +0 -2
  714. package/dist/chunks/cli-1.0.8-yb3vesbt.mjs +0 -4
  715. package/dist/chunks/cli-1.0.8-yc4a0111.mjs +0 -20
  716. package/dist/chunks/cli-1.0.8-ycxmnmhs.mjs +0 -3
  717. package/dist/chunks/cli-1.0.8-ykwgcdbt.mjs +0 -5476
  718. package/dist/chunks/cli-1.0.8-yzc0z6ex.mjs +0 -2
  719. package/dist/chunks/cli-1.0.8-z49w3x0w.mjs +0 -4
  720. package/dist/chunks/cli-1.0.8-z6x3zsb0.mjs +0 -2
  721. package/dist/chunks/cli-1.0.8-z79r5re2.mjs +0 -17
  722. package/dist/chunks/cli-1.0.8-z7v2b551.mjs +0 -2
  723. package/dist/chunks/cli-1.0.8-z96bbp08.mjs +0 -6
  724. package/dist/chunks/cli-1.0.8-zh2ygfav.mjs +0 -2
  725. package/dist/chunks/cli-1.0.8-zjckzq5j.mjs +0 -18
  726. package/dist/chunks/cli-1.0.8-znefv1yp.mjs +0 -2
  727. package/dist/chunks/cli-1.0.8-zza8ns8c.mjs +0 -15
  728. package/dist/chunks/client-1.0.8-n7dt1rfw.mjs +0 -1
  729. package/dist/chunks/color-1.0.8-jxfasz8x.mjs +0 -1
  730. package/dist/chunks/compact-1.0.8-jnbzy2qh.mjs +0 -3
  731. package/dist/chunks/config-1.0.8-p850nj3c.mjs +0 -1
  732. package/dist/chunks/config-1.0.8-xg117aq2.mjs +0 -1
  733. package/dist/chunks/constants-1.0.8-ms4fbs66.mjs +0 -1
  734. package/dist/chunks/context-1.0.8-tb27h7kb.mjs +0 -1
  735. package/dist/chunks/context-noninteractive-1.0.8-1ry2t8be.mjs +0 -1
  736. package/dist/chunks/conversation-1.0.8-v96pn05v.mjs +0 -1
  737. package/dist/chunks/copilotHeaders-1.0.8-cs9jt8ks.mjs +0 -1
  738. package/dist/chunks/copy-1.0.8-g8d8msxn.mjs +0 -9
  739. package/dist/chunks/cost-1.0.8-kx2ejbds.mjs +0 -1
  740. package/dist/chunks/createSSHSession-1.0.8-2wvpn7y4.mjs +0 -1
  741. package/dist/chunks/createSession-1.0.8-ecm6dynn.mjs +0 -1
  742. package/dist/chunks/debug-1.0.8-cphv9b4j.mjs +0 -1
  743. package/dist/chunks/defaultActionDeps-1.0.8-2k34bnzt.mjs +0 -1446
  744. package/dist/chunks/desktop-1.0.8-w6qk81xg.mjs +0 -1
  745. package/dist/chunks/detectRepository-1.0.8-q2e17deh.mjs +0 -1
  746. package/dist/chunks/detection-1.0.8-adg3pmtx.mjs +0 -1
  747. package/dist/chunks/diff-1.0.8-kcsv429q.mjs +0 -1
  748. package/dist/chunks/doctor-1.0.8-4807n5ga.mjs +0 -1
  749. package/dist/chunks/doctorDiagnostic-1.0.8-thmvp0a8.mjs +0 -1
  750. package/dist/chunks/earlyInput-1.0.8-hhf06cvs.mjs +0 -1
  751. package/dist/chunks/effort-1.0.8-k9jy349z.mjs +0 -10
  752. package/dist/chunks/engine-1.0.8-swnh66g9.mjs +0 -1
  753. package/dist/chunks/envLessBridgeConfig-1.0.8-8066f8x3.mjs +0 -1
  754. package/dist/chunks/envUtils-1.0.8-hvdz25s8.mjs +0 -1
  755. package/dist/chunks/environmentSelection-1.0.8-dgef2ag8.mjs +0 -1
  756. package/dist/chunks/environments-1.0.8-8kxx7cf7.mjs +0 -1
  757. package/dist/chunks/errors-1.0.8-yrb0dfde.mjs +0 -1
  758. package/dist/chunks/exampleCommands-1.0.8-2fp656s9.mjs +0 -1
  759. package/dist/chunks/exit-1.0.8-axxrxks1.mjs +0 -1
  760. package/dist/chunks/explorer-1.0.8-txzsk7g4.mjs +0 -1
  761. package/dist/chunks/export-1.0.8-yxhs2z6f.mjs +0 -2
  762. package/dist/chunks/extra-usage-1.0.8-mkde8ry2.mjs +0 -1
  763. package/dist/chunks/extra-usage-noninteractive-1.0.8-zq1zsj4c.mjs +0 -1
  764. package/dist/chunks/fast-1.0.8-dm74897t.mjs +0 -1
  765. package/dist/chunks/feedback-1.0.8-wnsh14ya.mjs +0 -14
  766. package/dist/chunks/firstPartyEventLogger-1.0.8-xp13dv5e.mjs +0 -1
  767. package/dist/chunks/git-1.0.8-emhr4f0a.mjs +0 -1
  768. package/dist/chunks/githubModelsCredentials-1.0.8-q88vb6k1.mjs +0 -1
  769. package/dist/chunks/goal-1.0.8-vx7pfbph.mjs +0 -4
  770. package/dist/chunks/grove-1.0.8-4vn920ab.mjs +0 -1
  771. package/dist/chunks/growthbook-1.0.8-ktn0scz1.mjs +0 -1
  772. package/dist/chunks/headless-1.0.8-kgkf00rm.mjs +0 -2
  773. package/dist/chunks/heapdump-1.0.8-e5g8ycqp.mjs +0 -6
  774. package/dist/chunks/help-1.0.8-g5kftejd.mjs +0 -1
  775. package/dist/chunks/hookChains-1.0.8-jnd1g9vp.mjs +0 -3
  776. package/dist/chunks/hooks-1.0.8-d343gmd5.mjs +0 -1
  777. package/dist/chunks/hooks-1.0.8-xq482xcs.mjs +0 -79
  778. package/dist/chunks/ide-1.0.8-4veg8hzd.mjs +0 -3
  779. package/dist/chunks/image-processor-napi-1.0.8-93bk96t4.mjs +0 -1
  780. package/dist/chunks/inboundAttachments-1.0.8-zkj9tf58.mjs +0 -1
  781. package/dist/chunks/index-1.0.8-0pnvq37m.mjs +0 -2
  782. package/dist/chunks/index-1.0.8-1pa1v81a.mjs +0 -1
  783. package/dist/chunks/index-1.0.8-464f1j1b.mjs +0 -1
  784. package/dist/chunks/index-1.0.8-4zsx151v.mjs +0 -1
  785. package/dist/chunks/index-1.0.8-7wqrymcz.mjs +0 -2
  786. package/dist/chunks/index-1.0.8-8qzz6s1v.mjs +0 -1
  787. package/dist/chunks/index-1.0.8-91cpv5tb.mjs +0 -9
  788. package/dist/chunks/index-1.0.8-9x499a6f.mjs +0 -1
  789. package/dist/chunks/index-1.0.8-aqm7z1xs.mjs +0 -1
  790. package/dist/chunks/index-1.0.8-bha1edzd.mjs +0 -1
  791. package/dist/chunks/index-1.0.8-bhzqmht2.mjs +0 -1
  792. package/dist/chunks/index-1.0.8-dh80510b.mjs +0 -1
  793. package/dist/chunks/index-1.0.8-hdnvwr7c.mjs +0 -1
  794. package/dist/chunks/index-1.0.8-ht187zbt.mjs +0 -17
  795. package/dist/chunks/index-1.0.8-jj36eqgv.mjs +0 -1
  796. package/dist/chunks/index-1.0.8-p16qr0gk.mjs +0 -1
  797. package/dist/chunks/index-1.0.8-pejsn3j4.mjs +0 -1
  798. package/dist/chunks/index-1.0.8-pzn6kwcz.mjs +0 -1
  799. package/dist/chunks/index-1.0.8-szryar06.mjs +0 -9
  800. package/dist/chunks/index-1.0.8-thkaetpe.mjs +0 -5
  801. package/dist/chunks/index-1.0.8-tnpscb0d.mjs +0 -1
  802. package/dist/chunks/index-1.0.8-xxdv7dxk.mjs +0 -1
  803. package/dist/chunks/index-1.0.8-z5xdfxxw.mjs +0 -30
  804. package/dist/chunks/init-1.0.8-krd7wa3v.mjs +0 -1
  805. package/dist/chunks/initReplBridge-1.0.8-ftx1k41m.mjs +0 -1
  806. package/dist/chunks/ink-1.0.8-pteq28sp.mjs +0 -1
  807. package/dist/chunks/insights-1.0.8-mb2z8g5h.mjs +0 -870
  808. package/dist/chunks/install-1.0.8-s99z78an.mjs +0 -1
  809. package/dist/chunks/install-github-app-1.0.8-r07c7fc8.mjs +0 -149
  810. package/dist/chunks/install-slack-app-1.0.8-mq0zjdf6.mjs +0 -1
  811. package/dist/chunks/instrumentation-1.0.8-00jpcry8.mjs +0 -1
  812. package/dist/chunks/interactiveHelpers-1.0.8-3z1ey7fr.mjs +0 -1
  813. package/dist/chunks/keybindings-1.0.8-wenkty39.mjs +0 -2
  814. package/dist/chunks/knowledge-1.0.8-cjdkk8mb.mjs +0 -2
  815. package/dist/chunks/latestVersionCache-1.0.8-rncrmhd0.mjs +0 -1
  816. package/dist/chunks/loadAgentsDir-1.0.8-9ry9xbfw.mjs +0 -1
  817. package/dist/chunks/loadPluginHooks-1.0.8-5e422tv0.mjs +0 -1
  818. package/dist/chunks/loadPluginHooks-1.0.8-gw0mb3vq.mjs +0 -1
  819. package/dist/chunks/log-1.0.8-bhyqzqd4.mjs +0 -1
  820. package/dist/chunks/main-1.0.8-sv9em0tk.mjs +0 -1
  821. package/dist/chunks/managedEnv-1.0.8-ey5201g9.mjs +0 -1
  822. package/dist/chunks/mcp-1.0.8-0wkq1z2f.mjs +0 -1
  823. package/dist/chunks/mcp-1.0.8-hft3ww8h.mjs +0 -17
  824. package/dist/chunks/mcp-1.0.8-k2y8akh4.mjs +0 -4
  825. package/dist/chunks/mcpb-1.0.8-6d4d5qg6.mjs +0 -1
  826. package/dist/chunks/memory-1.0.8-bhfq1tpv.mjs +0 -3
  827. package/dist/chunks/model-1.0.8-9x1n1hs4.mjs +0 -2
  828. package/dist/chunks/model-1.0.8-f30q5v3y.mjs +0 -1
  829. package/dist/chunks/node-1.0.8-z64w4mf3.mjs +0 -12
  830. package/dist/chunks/oauth-1.0.8-7vjm8xxp.mjs +0 -1
  831. package/dist/chunks/openaiShim-1.0.8-dxqbym7v.mjs +0 -14
  832. package/dist/chunks/output-style-1.0.8-j3vsn3xx.mjs +0 -1
  833. package/dist/chunks/package-ZZWOLTXM-1.0.8-57wby5pw.mjs +0 -1
  834. package/dist/chunks/parseConnectUrl-1.0.8-fa21hp3j.mjs +0 -1
  835. package/dist/chunks/parser-1.0.8-eddksp6m.mjs +0 -1
  836. package/dist/chunks/passes-1.0.8-82cxmwxv.mjs +0 -1
  837. package/dist/chunks/permissions-1.0.8-9qwtkcvw.mjs +0 -1
  838. package/dist/chunks/permissions-1.0.8-hkpezdb6.mjs +0 -3
  839. package/dist/chunks/plan-1.0.8-t7cypg7z.mjs +0 -1
  840. package/dist/chunks/plist-1.0.8-tx4wgdc5.mjs +0 -1
  841. package/dist/chunks/plugin-1.0.8-fpfj5qcx.mjs +0 -29
  842. package/dist/chunks/pluginStartupCheck-1.0.8-htw7er4z.mjs +0 -1
  843. package/dist/chunks/plugins-1.0.8-89t24bsm.mjs +0 -9
  844. package/dist/chunks/preActionHook-1.0.8-caxsc3mp.mjs +0 -2
  845. package/dist/chunks/print-1.0.8-491vxbzs.mjs +0 -57
  846. package/dist/chunks/privacy-settings-1.0.8-m25zra7r.mjs +0 -1
  847. package/dist/chunks/process-1.0.8-3tzpsdmr.mjs +0 -1
  848. package/dist/chunks/processBashCommand-1.0.8-czb8ax1e.mjs +0 -1
  849. package/dist/chunks/processSlashCommand-1.0.8-z2qz58yf.mjs +0 -9
  850. package/dist/chunks/prompt-1.0.8-2bbvxeh7.mjs +0 -1
  851. package/dist/chunks/prompt-1.0.8-ftnsddxg.mjs +0 -1
  852. package/dist/chunks/prompts-1.0.8-7jmnssxc.mjs +0 -1
  853. package/dist/chunks/protocolHandler-1.0.8-y3rebjd9.mjs +0 -13
  854. package/dist/chunks/provider-1.0.8-zrx7vyqk.mjs +0 -2
  855. package/dist/chunks/providerProfiles-1.0.8-n4b3xs5v.mjs +0 -1
  856. package/dist/chunks/providerValidation-1.0.8-j9gx7a1v.mjs +0 -6
  857. package/dist/chunks/rate-limit-options-1.0.8-084n6z58.mjs +0 -1
  858. package/dist/chunks/registerSubcommands-1.0.8-e9k91bmz.mjs +0 -34
  859. package/dist/chunks/registry-1.0.8-p8bc2ppg.mjs +0 -1
  860. package/dist/chunks/release-notes-1.0.8-wdtevpan.mjs +0 -5
  861. package/dist/chunks/reload-plugins-1.0.8-crrx8jkj.mjs +0 -2
  862. package/dist/chunks/remote-env-1.0.8-yb4czxha.mjs +0 -1
  863. package/dist/chunks/remoteBridgeCore-1.0.8-cg38st7c.mjs +0 -1
  864. package/dist/chunks/remoteSession-1.0.8-g9cx4dmb.mjs +0 -1
  865. package/dist/chunks/rename-1.0.8-c263drxy.mjs +0 -1
  866. package/dist/chunks/replBridgeHandle-1.0.8-51065xd1.mjs +0 -1
  867. package/dist/chunks/replLauncher-1.0.8-n5f7d6tk.mjs +0 -1
  868. package/dist/chunks/resume-1.0.8-20r9g9a8.mjs +0 -2
  869. package/dist/chunks/rewind-1.0.8-1shxcx6h.mjs +0 -1
  870. package/dist/chunks/rootOptions-1.0.8-v3mryhnd.mjs +0 -1
  871. package/dist/chunks/sandbox-adapter-1.0.8-db8n3sf2.mjs +0 -1
  872. package/dist/chunks/sandbox-toggle-1.0.8-8ysakwfc.mjs +0 -1
  873. package/dist/chunks/session-1.0.8-nf98ege7.mjs +0 -2
  874. package/dist/chunks/sessionDiscovery-1.0.8-j7e3zz3z.mjs +0 -1
  875. package/dist/chunks/sessionFileAccessHooks-1.0.8-tywx0fhs.mjs +0 -1
  876. package/dist/chunks/sessionStorage-1.0.8-3jncs1jd.mjs +0 -1
  877. package/dist/chunks/settings-1.0.8-ferv6mr5.mjs +0 -1
  878. package/dist/chunks/setup-1.0.8-r7jm4921.mjs +0 -5
  879. package/dist/chunks/sinks-1.0.8-w2zqhs5t.mjs +0 -1
  880. package/dist/chunks/skills-1.0.8-c2re0407.mjs +0 -1
  881. package/dist/chunks/startupProfiler-1.0.8-m7x42s2c.mjs +0 -1
  882. package/dist/chunks/startupUpdateCheck-1.0.8-hnq9gbsm.mjs +0 -1
  883. package/dist/chunks/state-1.0.8-mszmr9fy.mjs +0 -1
  884. package/dist/chunks/stats-1.0.8-xah6pcq3.mjs +0 -6
  885. package/dist/chunks/status-1.0.8-cb5dxyy1.mjs +0 -1
  886. package/dist/chunks/stickers-1.0.8-vr13mnk0.mjs +0 -1
  887. package/dist/chunks/subprocessEnv-1.0.8-rqxgszbc.mjs +0 -1
  888. package/dist/chunks/tasks-1.0.8-v1meznm5.mjs +0 -1
  889. package/dist/chunks/teamHelpers-1.0.8-zs8qgyey.mjs +0 -1
  890. package/dist/chunks/teammateModeSnapshot-1.0.8-828qsec1.mjs +0 -1
  891. package/dist/chunks/teleport-1.0.8-aszfnv2s.mjs +0 -1
  892. package/dist/chunks/terminalSetup-1.0.8-9n57sf46.mjs +0 -1
  893. package/dist/chunks/theme-1.0.8-da67zfgn.mjs +0 -1
  894. package/dist/chunks/thinkback-1.0.8-p4ne9wck.mjs +0 -1
  895. package/dist/chunks/thinkback-play-1.0.8-kz09z4aa.mjs +0 -1
  896. package/dist/chunks/toolPool-1.0.8-rbawjenc.mjs +0 -1
  897. package/dist/chunks/toolSearch-1.0.8-drw7db57.mjs +0 -1
  898. package/dist/chunks/tools-1.0.8-51cw7jhr.mjs +0 -1
  899. package/dist/chunks/trustedDevice-1.0.8-y6484dbh.mjs +0 -1
  900. package/dist/chunks/turndown.cjs-1.0.8-07rx7x03.mjs +0 -69
  901. package/dist/chunks/types-1.0.8-svkpkerr.mjs +0 -1
  902. package/dist/chunks/ultrareviewCommand-1.0.8-fxpy87j7.mjs +0 -4
  903. package/dist/chunks/update-1.0.8-r5hsx0vn.mjs +0 -88
  904. package/dist/chunks/upgrade-1.0.8-rfjr944q.mjs +0 -1
  905. package/dist/chunks/upload-1.0.8-xb3qq931.mjs +0 -7
  906. package/dist/chunks/upstreamproxy-1.0.8-enmg2k32.mjs +0 -14
  907. package/dist/chunks/url-handler-napi-1.0.8-4xafghrm.mjs +0 -1
  908. package/dist/chunks/usage-1.0.8-x3yk026j.mjs +0 -1
  909. package/dist/chunks/util-1.0.8-g8szktmn.mjs +0 -1
  910. package/dist/chunks/utils-1.0.8-qkwh1by0.mjs +0 -1
  911. package/dist/chunks/vim-1.0.8-qv0fhjmv.mjs +0 -1
  912. package/dist/chunks/watcher-1.0.8-y0ye7hc6.mjs +0 -1
  913. package/dist/chunks/wiki-1.0.8-3ydvpt0c.mjs +0 -132
  914. package/dist/chunks/workflows-1.0.8-1fj4wp4z.mjs +0 -1
  915. package/dist/chunks/worktree-1.0.8-x68tgvcc.mjs +0 -1
  916. package/dist/chunks/worktreeModeEnabled-1.0.8-3e98qmek.mjs +0 -1
  917. package/dist/chunks/wrapper-1.0.8-atewpqqc.mjs +0 -7
@@ -0,0 +1,2 @@
1
+ import{Nd as x,Od as o}from"./cli-1.0.10-gdd5wptw.mjs";import{$K as O,Ku as Z,Qu as v,aD as M,aL as a,cA as K,eA as m,gD as l,gp as Y,ip as g,lL as R,oL as i,qz as $,rM as W,rz as d,uM as t,vz as y,xz as u}from"./cli-1.0.10-wqjsz7wa.mjs";import{kga as X,sga as h}from"./cli-1.0.10-j0e7nj85.mjs";import{Uja as I,Xja as c}from"./cli-1.0.10-pd2mt28b.mjs";import{ska as V,zka as f}from"./cli-1.0.10-z6340h71.mjs";import{sqa as _,zma as U}from"./cli-1.0.10-wg9nsp2f.mjs";import{bsa as C}from"./cli-1.0.10-byd1s52c.mjs";async function Lj(w){I("refreshActivePlugins: clearing all plugin caches"),R(),K();let G=await W(),[E,F]=await Promise.all([O(),Z(U())]),{enabled:z,disabled:B,errors:H}=G;x(E);let[P,S]=await Promise.all([Promise.all(z.map(async(j)=>{if(j.mcpServers)return Object.keys(j.mcpServers).length;let q=await Y(j,H);if(q)j.mcpServers=q;return q?Object.keys(q).length:0})),Promise.all(z.map(async(j)=>{if(j.lspServers)return Object.keys(j.lspServers).length;let q=await $(j,H);if(q)j.lspServers=q;return q?Object.keys(q).length:0}))]),J=P.reduce((j,q)=>j+q,0),L=S.reduce((j,q)=>j+q,0);w((j)=>({...j,plugins:{...j.plugins,enabled:z,disabled:B,commands:[],errors:n(j.plugins.errors,H),needsRefresh:!1},agentDefinitions:F,mcp:{...j.mcp,pluginReconnectKey:j.mcp.pluginReconnectKey+1}})),y();let N=!1;try{await M()}catch(j){N=!0,X(j),I(`refreshActivePlugins: loadPluginHooks failed: ${V(j)}`)}let Q=z.reduce((j,q)=>{if(!q.hooksConfig)return j;return j+Object.values(q.hooksConfig).reduce((k,A)=>k+(A?.reduce((D,b)=>D+b.hooks.length,0)??0),0)},0);return I(`refreshActivePlugins: ${z.length} enabled, ${E.length} commands, ${F.allAgents.length} agents, ${Q} hooks, ${J} MCP, ${L} LSP`),{enabled_count:z.length,disabled_count:B.length,command_count:E.length,agent_count:F.allAgents.length,hook_count:Q,mcp_count:J,lsp_count:L,error_count:H.length+(N?1:0),agentDefinitions:F,pluginCommands:E}}function n(w,G){let E=w.filter((B)=>B.source==="lsp-manager"||B.source.startsWith("plugin:")),F=new Set(G.map(T));return[...E.filter((B)=>!F.has(T(B))),...G]}function T(w){return w.type==="generic-error"?`generic-error:${w.source}:${w.error}`:`${w.type}:${w.source}`}var p=C(()=>{_();u();o();v();c();f();h();i();a();l();d();g();m();t()});
2
+ export{Lj as Jd,p as Kd};
@@ -0,0 +1,2 @@
1
+ import{$ra as j}from"./cli-1.0.10-byd1s52c.mjs";var Lt=j((Q)=>{var y=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),L=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),m=Symbol.iterator;function q(t){if(t===null||typeof t!=="object")return null;return t=m&&t[m]||t["@@iterator"],typeof t==="function"?t:null}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,w={};function l(t,e,n){this.props=t,this.context=e,this.refs=w,this.updater=n||S}l.prototype.isReactComponent={};l.prototype.setState=function(t,e){if(typeof t!=="object"&&typeof t!=="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};l.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function P(){}P.prototype=l.prototype;function v(t,e,n){this.props=t,this.context=e,this.refs=w,this.updater=n||S}var T=v.prototype=new P;T.constructor=v;g(T,l.prototype);T.isPureReactComponent=!0;var C=Array.isArray;function E(){}var f={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function R(t,e,n){var r=n.ref;return{$$typeof:y,type:t,key:e,ref:r!==void 0?r:null,props:n}}function z(t,e){return R(t.type,e,t.props)}function x(t){return typeof t==="object"&&t!==null&&t.$$typeof===y}function G(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var d=/\/+/g;function a(t,e){return typeof t==="object"&&t!==null&&t.key!=null?G(""+t.key):e.toString(36)}function K(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status==="string"?t.then(E,E):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function p(t,e,n,r,o){var u=typeof t;if(u==="undefined"||u==="boolean")t=null;var s=!1;if(t===null)s=!0;else switch(u){case"bigint":case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case y:case $:s=!0;break;case h:return s=t._init,p(s(t._payload),e,n,r,o)}}if(s)return o=o(t),s=r===""?"."+a(t,0):r,C(o)?(n="",s!=null&&(n=s.replace(d,"$&/")+"/"),p(o,e,n,"",function(O){return O})):o!=null&&(x(o)&&(o=z(o,n+(o.key==null||t&&t.key===o.key?"":(""+o.key).replace(d,"$&/")+"/")+s)),e.push(o)),1;s=0;var c=r===""?".":r+":";if(C(t))for(var i=0;i<t.length;i++)r=t[i],u=c+a(r,i),s+=p(r,e,n,u,o);else if(i=q(t),typeof i==="function")for(t=i.call(t),i=0;!(r=t.next()).done;)r=r.value,u=c+a(r,i++),s+=p(r,e,n,u,o);else if(u==="object"){if(typeof t.then==="function")return p(K(t),e,n,r,o);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return s}function _(t,e,n){if(t==null)return t;var r=[],o=0;return p(t,r,"","",function(u){return e.call(n,u,o++)}),r}function B(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){if(t._status===0||t._status===-1)t._status=1,t._result=n},function(n){if(t._status===0||t._status===-1)t._status=2,t._result=n}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var A=typeof reportError==="function"?reportError:function(t){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t==="object"&&t!==null&&typeof t.message==="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",t);return}console.error(t)},W={map:_,forEach:function(t,e,n){_(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return _(t,function(){e++}),e},toArray:function(t){return _(t,function(e){return e})||[]},only:function(t){if(!x(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Q.Activity=D;Q.Children=W;Q.Component=l;Q.Fragment=I;Q.Profiler=M;Q.PureComponent=v;Q.StrictMode=N;Q.Suspense=U;Q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f;Q.__COMPILER_RUNTIME={__proto__:null,c:function(t){return f.H.useMemoCache(t)}};Q.cache=function(t){return function(){return t.apply(null,arguments)}};Q.cacheSignal=function(){return null};Q.cloneElement=function(t,e,n){if(t===null||t===void 0)throw Error("The argument must be a React element, but you passed "+t+".");var r=g({},t.props),o=t.key;if(e!=null)for(u in e.key!==void 0&&(o=""+e.key),e)!H.call(e,u)||u==="key"||u==="__self"||u==="__source"||u==="ref"&&e.ref===void 0||(r[u]=e[u]);var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];r.children=s}return R(t.type,o,r)};Q.createContext=function(t){return t={$$typeof:L,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Y,_context:t},t};Q.createElement=function(t,e,n){var r,o={},u=null;if(e!=null)for(r in e.key!==void 0&&(u=""+e.key),e)H.call(e,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=e[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var c=Array(s),i=0;i<s;i++)c[i]=arguments[i+2];o.children=c}if(t&&t.defaultProps)for(r in s=t.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return R(t,u,o)};Q.createRef=function(){return{current:null}};Q.forwardRef=function(t){return{$$typeof:k,render:t}};Q.isValidElement=x;Q.lazy=function(t){return{$$typeof:h,_payload:{_status:-1,_result:t},_init:B}};Q.memo=function(t,e){return{$$typeof:b,type:t,compare:e===void 0?null:e}};Q.startTransition=function(t){var e=f.T,n={};f.T=n;try{var r=t(),o=f.S;o!==null&&o(n,r),typeof r==="object"&&r!==null&&typeof r.then==="function"&&r.then(E,A)}catch(u){A(u)}finally{e!==null&&n.types!==null&&(e.types=n.types),f.T=e}};Q.unstable_useCacheRefresh=function(){return f.H.useCacheRefresh()};Q.use=function(t){return f.H.use(t)};Q.useActionState=function(t,e,n){return f.H.useActionState(t,e,n)};Q.useCallback=function(t,e){return f.H.useCallback(t,e)};Q.useContext=function(t){return f.H.useContext(t)};Q.useDebugValue=function(){};Q.useDeferredValue=function(t,e){return f.H.useDeferredValue(t,e)};Q.useEffect=function(t,e){return f.H.useEffect(t,e)};Q.useEffectEvent=function(t){return f.H.useEffectEvent(t)};Q.useId=function(){return f.H.useId()};Q.useImperativeHandle=function(t,e,n){return f.H.useImperativeHandle(t,e,n)};Q.useInsertionEffect=function(t,e){return f.H.useInsertionEffect(t,e)};Q.useLayoutEffect=function(t,e){return f.H.useLayoutEffect(t,e)};Q.useMemo=function(t,e){return f.H.useMemo(t,e)};Q.useOptimistic=function(t,e){return f.H.useOptimistic(t,e)};Q.useReducer=function(t,e,n){return f.H.useReducer(t,e,n)};Q.useRef=function(t){return f.H.useRef(t)};Q.useState=function(t){return f.H.useState(t)};Q.useSyncExternalStore=function(t,e,n){return f.H.useSyncExternalStore(t,e,n)};Q.useTransition=function(){return f.H.useTransition()};Q.version="19.2.7"});
2
+ export{Lt as T3};
@@ -0,0 +1,2 @@
1
+ import{Ap as n,gx as I,hx as P,lx as t,zp as W}from"./cli-1.0.10-wqjsz7wa.mjs";import{Y3 as H,Z3 as p}from"./cli-1.0.10-nrkp80dg.mjs";import{_3 as C,a4 as i}from"./cli-1.0.10-a3dzh7qn.mjs";import{I4 as S,O4 as c,_7 as R,e8 as V,y8 as l,z7 as v}from"./cli-1.0.10-x6xcvx11.mjs";import{Nda as q,Nea as O,Nfa as T,Oda as u,Ofa as Y,Ufa as y,Xfa as k,_fa as g,kga as D,pea as E,sea as X,sga as m}from"./cli-1.0.10-j0e7nj85.mjs";import{$ha as h,Xha as G,Zha as f,_ha as $}from"./cli-1.0.10-fd700nvj.mjs";import{Kia as Z,Pia as _,Qia as M}from"./cli-1.0.10-vr6qr3sv.mjs";import{Uja as x,Xja as b}from"./cli-1.0.10-pd2mt28b.mjs";import{Era as A,mra as Q}from"./cli-1.0.10-6k8wfwnm.mjs";import{bsa as U}from"./cli-1.0.10-byd1s52c.mjs";async function s(){if(q())return x("[Bootstrap] Skipped: Nonessential traffic disabled"),null;if(S()!=="firstParty")return x("[Bootstrap] Skipped: 3P provider"),null;let w=v();if(!(R()?.accessToken&&V())&&!w)return x("[Bootstrap] Skipped: no usable OAuth or API key"),null;let J=`${_().BASE_API_URL}/api/claude_cli/bootstrap`;try{return await H(async()=>{let j=R()?.accessToken,z;if(j&&V())z={Authorization:`Bearer ${j}`,"anthropic-beta":Z};else if(w)z={"x-api-key":w};else return x("[Bootstrap] No auth available on retry, aborting"),null;x("[Bootstrap] Fetching");let N=await Q.get(J,{headers:{"Content-Type":"application/json","User-Agent":C(),...z},timeout:5000}),B=d().safeParse(N.data);if(!B.success)return x(`[Bootstrap] Response failed validation: ${B.error.message}`),null;return x("[Bootstrap] Fetch ok"),B.data})}catch(j){if(Q.isAxiosError(j)){let z=j.response?.status??"no-response",N=j.code??"unknown-code",B=j.config?.method?.toUpperCase()??"UNKNOWN",K=j.config?.url??"unknown-url",L=j.message??"unknown axios error";x(`[Bootstrap] Fetch failed: status=${z} code=${N} method=${B} url=${K} message=${L}`)}else{let z=j instanceof Error?j.message:String(j);x(`[Bootstrap] Fetch failed: ${z}`)}throw j}}async function a(){let w=Y();if(!w?.startsWith("openai:"))return null;let{baseUrl:F}=T(),J=await P({baseUrl:F,apiKey:k()?.apiKey});if(J===null)return x("[Bootstrap] Local OpenAI model discovery failed"),null;let j=I(F);return{clientData:X().clientDataCache??null,additionalModelOptionsScope:w,additionalModelOptions:J.map((z)=>({value:z,label:z,description:`Detected from ${j}`}))}}async function Yj(){try{let w=Y(),F=null;if(w==="firstParty"){let B=await s();if(!B)return;F={clientData:B.client_data??null,additionalModelOptions:B.additional_model_options??[],additionalModelOptionsScope:w}}else if(w?.startsWith("openai:")){if(F=await a(),!F)return}else{x("[Bootstrap] Skipped: no additional model source");return}let{clientData:J,additionalModelOptions:j,additionalModelOptionsScope:z}=F,N=X();if(W(N.clientDataCache,J)&&W(N.additionalModelOptionsCache,j)&&N.additionalModelOptionsCacheScope===z){x("[Bootstrap] Cache unchanged, skipping write");return}x("[Bootstrap] Cache updated, persisting to disk"),E((B)=>({...B,clientDataCache:J,additionalModelOptionsCache:j,additionalModelOptionsCacheScope:z}))}catch(w){D(w)}}var d;var r=U(()=>{A();n();l();f();M();O();b();p();h();m();c();u();t();i();g();y();d=$(()=>G.object({client_data:G.record(G.string(),G.unknown()).nullish(),additional_model_options:G.array(G.object({model:G.string(),name:G.string(),description:G.string()}).transform(({model:w,name:F,description:J})=>({value:w,label:F,description:J}))).nullish()}))});
2
+ export{Yj as vc,r as wc};
@@ -0,0 +1,2 @@
1
+ import{Uf as N0,Vf as U0,Xf as VP}from"./cli-1.0.10-5a969ex4.mjs";import{$n as O0,AN as qP,FM as WP,FN as CP,OM as cP,PM as fP,RM as M0,SM as h0,TM as T0,Tn as h,UM as d0,Un as c0,Vn as p,WN as C0,Wn as w0,XH as G0,XM as R0,Xn as r,YF as XP,YH as YP,Yn as W0,ZF as mP,Zx as J0,_N as pP,_x as QP,ao as EP,ay as j0,cN as u0,gG as L0,iG as i0,xN as ZP,yN as m0}from"./cli-1.0.10-wqjsz7wa.mjs";import{SX as JP,TX as hP,eY as z0,gY as TP,jY as D0,kY as LP}from"./cli-1.0.10-en27vfnb.mjs";import{A0 as C,C0 as X,E0 as L,I0 as F0,Y0 as GP,aZ as PP,fZ as AP,gZ as I0,h1 as q0,pZ as k0}from"./cli-1.0.10-j1c6sy8q.mjs";import{P3 as n,Q3 as J,R3 as Q,S3 as a}from"./cli-1.0.10-b42che8r.mjs";import{T3 as $0}from"./cli-1.0.10-jd706hep.mjs";import{o4 as A0,p4 as dP}from"./cli-1.0.10-cjvcm52x.mjs";import{g8 as e0,y8 as gP}from"./cli-1.0.10-x6xcvx11.mjs";import{$9 as _,Ica as H0,Jca as zP,Rca as p0,a_ as r0,pga as s0,qca as y0,rca as B0,sca as KP,sga as SP}from"./cli-1.0.10-j0e7nj85.mjs";import{Pia as g0,Qia as _P}from"./cli-1.0.10-vr6qr3sv.mjs";import{Ria as m,Uia as IP}from"./cli-1.0.10-hkdbtrdk.mjs";import{ska as f0,zka as t0}from"./cli-1.0.10-z6340h71.mjs";import{Zra as e,bsa as P0}from"./cli-1.0.10-byd1s52c.mjs";function K0(G){let P=o0.c(9),{serverToolsCount:Y,serverPromptsCount:z,serverResourcesCount:Z}=G,f;if(P[0]!==z||P[1]!==Z||P[2]!==Y){if(f=[],Y>0)f.push("tools");if(Z>0)f.push("resources");if(z>0)f.push("prompts");P[0]=z,P[1]=Z,P[2]=Y,P[3]=f}else f=P[3];let H;if(P[4]===Symbol.for("react.memo_cache_sentinel"))H=J(L,{bold:!0,children:"Capabilities: "}),P[4]=H;else H=P[4];let W;if(P[5]!==f)W=f.length>0?J(r,{children:f}):"none",P[5]=f,P[6]=W;else W=P[6];let k;if(P[7]!==W)k=Q(X,{children:[H,J(L,{color:"text",children:W})]}),P[7]=W,P[8]=k;else k=P[8];return k}var o0;var _0=P0(()=>{q0();W0();a();o0=e(I0(),1)});function E0(G,P){switch(G.client.type){case"connected":return{message:`Reconnected to ${P}.`,success:!0};case"needs-auth":return{message:`${P} requires authentication. Use the 'Authenticate' option.`,success:!1};case"failed":return{message:`Failed to reconnect to ${P}.`,success:!1};default:return{message:`Unknown result when reconnecting to ${P}.`,success:!1}}}function V0(G,P){let Y=G instanceof Error?G.message:String(G);return`Error reconnecting to ${P}: ${Y}`}var S0=()=>{};function bG({server:G,serverToolsCount:P,onViewTools:Y,onCancel:z,onComplete:Z,borderless:f=!1}){let[H]=k0(),W=D0(),{columns:k}=JP(),[B,N]=E.default.useState(!1),[$,U]=E.default.useState(null),S=J0((q)=>q.mcp),M=QP(),[b,K]=E.default.useState(null),[V,D]=E.useState(!1),R=E.useRef(null),[g,c]=E.useState(!1),[j,T]=E.useState(null),[A,y]=E.useState(!1),[i,u]=E.useState(null),[l,v]=E.useState(!1),[o,s]=E.useState(!1),x=E.useRef(void 0),O=E.useRef(!1),[x0,Q0]=E.useState(""),[kP,DP]=E.useState(0),[a0,n0]=E.useState(null);E.useEffect(()=>()=>{if(O.current=!0,R.current?.abort(),x.current!==void 0)clearTimeout(x.current)},[]);let X0=G.isAuthenticated||G.client.type==="connected"&&P>0,Y0=N0(),wP=E.default.useCallback(async()=>{c(!1),T(null),D(!0);try{let q=await Y0(G.name),F=q.client.type==="connected";if(m("tengu_claudeai_mcp_auth_completed",{success:F}),F)Z?.(`Authentication successful. Connected to ${G.name}.`);else if(q.client.type==="needs-auth")Z?.("Authentication successful, but server still requires authentication. You may need to manually restart Claude Code.");else Z?.("Authentication successful, but server reconnection failed. You may need to manually restart Claude Code for the changes to take effect.")}catch(q){m("tengu_claudeai_mcp_auth_completed",{success:!1}),Z?.(V0(q,G.name))}finally{D(!1)}},[Y0,G.name,Z]),MP=E.default.useCallback(async()=>{await C0(G.name,{...G.config,scope:G.scope}),M((q)=>{let F=q.mcp.clients.map((t)=>t.name===G.name?{...t,type:"needs-auth"}:t),w=h0(q.mcp.tools,G.name),d=T0(q.mcp.commands,G.name),Z0=d0(q.mcp.resources,G.name);return{...q,mcp:{...q.mcp,clients:F,tools:w,commands:d,resources:Z0}}}),m("tengu_claudeai_mcp_clear_auth_completed",{}),Z?.(`Disconnected from ${G.name}.`),y(!1),u(null),v(!1)},[G.name,G.config,G.scope,M,Z]);z0("confirm:no",()=>{R.current?.abort(),R.current=null,N(!1),K(null)},{context:"Confirmation",isActive:B}),z0("confirm:no",()=>{c(!1),T(null)},{context:"Confirmation",isActive:g}),z0("confirm:no",()=>{y(!1),u(null),v(!1)},{context:"Confirmation",isActive:A}),GP((q,F)=>{if(F.return&&g)wP();if(F.return&&A)if(l)MP();else{let w=`${g0().CLAUDE_AI_ORIGIN}/settings/connectors`;u(w),v(!0),A0(w)}if(q==="c"&&!o){let w=b||j||i;if(w)PP(w).then((d)=>{if(O.current)return;if(d)process.stdout.write(d);if(s(!0),x.current!==void 0)clearTimeout(x.current);x.current=setTimeout(s,2000,!1)})}});let RP=H0(String(G.name)),NP=M0(S.commands,G.name).length,l0=U0(),UP=E.default.useCallback(async()=>{let q=g0().CLAUDE_AI_ORIGIN,w=e0()?.organizationUuid,d;if(w&&G.config.type==="claudeai-proxy"&&G.config.id){let Z0=G.config.id.startsWith("mcprs")?"mcpsrv"+G.config.id.slice(5):G.config.id,t=encodeURIComponent(process.env.CLAUDE_CODE_ENTRYPOINT||"cli");d=`${q}/api/organizations/${w}/mcp/start-auth/${Z0}?product_surface=${t}`}else d=`${q}/settings/connectors`;T(d),c(!0),m("tengu_claudeai_mcp_auth_started",{}),await A0(d)},[G.config]),bP=E.default.useCallback(()=>{y(!0),m("tengu_claudeai_mcp_clear_auth_started",{})},[]),yP=E.default.useCallback(async()=>{let q=G.client.type!=="disabled";try{if(await l0(G.name),G.config.type==="claudeai-proxy")m("tengu_claudeai_mcp_toggle",{new_state:q?"disabled":"enabled"});z()}catch(F){Z?.(`Failed to ${q?"disable":"enable"} MCP server '${G.name}': ${f0(F)}`)}},[G.client.type,G.config.type,G.name,l0,z,Z]),BP=E.default.useCallback(async()=>{if(G.config.type==="claudeai-proxy")return;N(!0),U(null);let q=new AbortController;R.current=q;try{if(G.isAuthenticated&&G.config)await m0(G.name,G.config,{preserveStepUpState:!0});if(G.config){await qP(G.name,G.config,K,q.signal,{onWaitingForCallback:(w)=>{n0(()=>w)}}),m("tengu_mcp_auth_config_authenticate",{wasAuthenticated:G.isAuthenticated});let F=await Y0(G.name);if(F.client.type==="connected"){let w=X0?`Authentication successful. Reconnected to ${G.name}.`:`Authentication successful. Connected to ${G.name}.`;Z?.(w)}else if(F.client.type==="needs-auth")Z?.("Authentication successful, but server still requires authentication. You may need to manually restart Claude Code.");else s0(G.name,"Reconnection failed after authentication"),Z?.("Authentication successful, but server reconnection failed. You may need to manually restart Claude Code for the changes to take effect.")}}catch(F){if(F instanceof Error&&!(F instanceof ZP))U(F.message)}finally{N(!1),R.current=null,n0(null),Q0("")}},[G.isAuthenticated,G.config,G.name,Z,Y0,X0]),OP=async()=>{if(G.config.type==="claudeai-proxy")return;if(G.config)await m0(G.name,G.config),m("tengu_mcp_auth_config_clear",{}),await C0(G.name,{...G.config,scope:G.scope}),M((q)=>{let F=q.mcp.clients.map((t)=>t.name===G.name?{...t,type:"failed"}:t),w=h0(q.mcp.tools,G.name),d=T0(q.mcp.commands,G.name),Z0=d0(q.mcp.resources,G.name);return{...q,mcp:{...q.mcp,clients:F,tools:w,commands:d,resources:Z0}}}),Z?.(`Authentication cleared for ${G.name}.`)};if(B){let q=G.config.type!=="claudeai-proxy"&&G.config.oauth?.xaa?" Authenticating via your identity provider":" A browser window will open for authentication";return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"claude",children:["Authenticating with ",G.name,"…"]}),Q(X,{children:[J(G0,{}),J(L,{children:q})]}),b&&Q(X,{flexDirection:"column",children:[Q(X,{children:[Q(L,{dimColor:!0,children:["If your browser doesn't open automatically, copy this URL manually"," "]}),o?J(L,{color:"success",children:"(Copied!)"}):J(L,{dimColor:!0,children:J(h,{shortcut:"c",action:"copy",parens:!0})})]}),J(F0,{url:b})]}),B&&b&&a0&&Q(X,{flexDirection:"column",marginTop:1,children:[J(L,{dimColor:!0,children:"If the redirect page shows a connection error, paste the URL from your browser's address bar:"}),Q(X,{children:[Q(L,{dimColor:!0,children:["URL ",">"," "]}),J(XP,{value:x0,onChange:Q0,onSubmit:(F)=>{a0(F.trim()),Q0("")},cursorOffset:kP,onChangeCursorOffset:DP,columns:k-8})]})]}),J(X,{marginLeft:3,children:J(L,{dimColor:!0,children:"Return here after authenticating in your browser. Press Esc to go back."})})]})}if(g)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"claude",children:["Authenticating with ",G.name,"…"]}),Q(X,{children:[J(G0,{}),J(L,{children:" A browser window will open for authentication"})]}),j&&Q(X,{flexDirection:"column",children:[Q(X,{children:[Q(L,{dimColor:!0,children:["If your browser doesn't open automatically, copy this URL manually"," "]}),o?J(L,{color:"success",children:"(Copied!)"}):J(L,{dimColor:!0,children:J(h,{shortcut:"c",action:"copy",parens:!0})})]}),J(F0,{url:j})]}),Q(X,{marginLeft:3,flexDirection:"column",children:[Q(L,{color:"permission",children:["Press ",J(L,{bold:!0,children:"Enter"})," after authenticating in your browser."]}),J(L,{dimColor:!0,italic:!0,children:J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})})]})]});if(A)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"claude",children:["Clear authentication for ",G.name]}),l?Q(n,{children:[J(L,{children:'Find the MCP server in the browser and click "Disconnect".'}),i&&Q(X,{flexDirection:"column",children:[Q(X,{children:[Q(L,{dimColor:!0,children:["If your browser didn't open automatically, copy this URL manually"," "]}),o?J(L,{color:"success",children:"(Copied!)"}):J(L,{dimColor:!0,children:J(h,{shortcut:"c",action:"copy",parens:!0})})]}),J(F0,{url:i})]}),Q(X,{marginLeft:3,flexDirection:"column",children:[Q(L,{color:"permission",children:["Press ",J(L,{bold:!0,children:"Enter"})," when done."]}),J(L,{dimColor:!0,italic:!0,children:J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})})]})]}):Q(n,{children:[J(L,{children:'This will open claude.ai in the browser. Find the MCP server in the list and click "Disconnect".'}),Q(X,{marginLeft:3,flexDirection:"column",children:[Q(L,{color:"permission",children:["Press ",J(L,{bold:!0,children:"Enter"})," to open the browser."]}),J(L,{dimColor:!0,italic:!0,children:J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})})]})]})]});if(V)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"text",children:["Connecting to ",J(L,{bold:!0,children:G.name}),"…"]}),Q(X,{children:[J(G0,{}),J(L,{children:" Establishing connection to MCP server"})]}),J(L,{dimColor:!0,children:"This may take a few moments."})]});let I=[];if(G.client.type==="disabled")I.push({label:"Enable",value:"toggle-enabled"});if(G.client.type==="connected"&&P>0)I.push({label:"View tools",value:"tools"});if(G.config.type==="claudeai-proxy"){if(G.client.type==="connected")I.push({label:"Clear authentication",value:"claudeai-clear-auth"});else if(G.client.type!=="disabled")I.push({label:"Authenticate",value:"claudeai-auth"})}else{if(X0)I.push({label:"Re-authenticate",value:"reauth"}),I.push({label:"Clear authentication",value:"clear-auth"});if(!X0)I.push({label:"Authenticate",value:"auth"})}if(G.client.type!=="disabled"){if(G.client.type!=="needs-auth")I.push({label:"Reconnect",value:"reconnectMcpServer"});I.push({label:"Disable",value:"toggle-enabled"})}if(I.length===0)I.push({label:"Back",value:"back"});return Q(X,{flexDirection:"column",children:[Q(X,{flexDirection:"column",paddingX:1,borderStyle:f?void 0:"round",children:[J(X,{marginBottom:1,children:Q(L,{bold:!0,children:[RP," MCP Server"]})}),Q(X,{flexDirection:"column",gap:0,children:[Q(X,{children:[J(L,{bold:!0,children:"Status: "}),G.client.type==="disabled"?Q(L,{children:[C("inactive",H)(_.radioOff)," disabled"]}):G.client.type==="connected"?Q(L,{children:[C("success",H)(_.tick)," connected"]}):G.client.type==="pending"?Q(n,{children:[J(L,{dimColor:!0,children:_.radioOff}),J(L,{children:" connecting…"})]}):G.client.type==="needs-auth"?Q(L,{children:[C("warning",H)(_.triangleUpOutline)," needs authentication"]}):Q(L,{children:[C("error",H)(_.cross)," failed"]})]}),G.transport!=="claudeai-proxy"&&Q(X,{children:[J(L,{bold:!0,children:"Auth: "}),X0?Q(L,{children:[C("success",H)(_.tick)," authenticated"]}):Q(L,{children:[C("error",H)(_.cross)," not authenticated"]})]}),Q(X,{children:[J(L,{bold:!0,children:"URL: "}),J(L,{dimColor:!0,children:G.config.url})]}),Q(X,{children:[J(L,{bold:!0,children:"Config location: "}),J(L,{dimColor:!0,children:R0(G.scope)})]}),G.client.type==="connected"&&J(K0,{serverToolsCount:P,serverPromptsCount:NP,serverResourcesCount:S.resources[G.name]?.length||0}),G.client.type==="connected"&&P>0&&Q(X,{children:[J(L,{bold:!0,children:"Tools: "}),Q(L,{dimColor:!0,children:[P," tools"]})]})]}),$&&J(X,{marginTop:1,children:Q(L,{color:"error",children:["Error: ",$]})}),I.length>0&&J(X,{marginTop:1,children:J(L0,{options:I,onChange:async(q)=>{switch(q){case"tools":Y();break;case"auth":case"reauth":await BP();break;case"clear-auth":await OP();break;case"claudeai-auth":await UP();break;case"claudeai-clear-auth":bP();break;case"reconnectMcpServer":D(!0);try{let F=await Y0(G.name);if(G.config.type==="claudeai-proxy")m("tengu_claudeai_mcp_reconnect",{success:F.client.type==="connected"});let{message:w}=E0(F,G.name);Z?.(w)}catch(F){if(G.config.type==="claudeai-proxy")m("tengu_claudeai_mcp_reconnect",{success:!1});Z?.(V0(F,G.name))}finally{D(!1)}break;case"toggle-enabled":await yP();break;case"back":z();break}},onCancel:z})})]}),J(X,{marginTop:1,children:J(L,{dimColor:!0,italic:!0,children:W.pending?Q(n,{children:["Press ",W.keyName," again to exit"]}):Q(r,{children:[J(h,{shortcut:"↑↓",action:"navigate"}),J(h,{shortcut:"Enter",action:"select"}),J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})]})})})]})}var E;var $P=P0(()=>{r0();IP();_P();LP();hP();AP();q0();TP();CP();pP();VP();u0();j0();gP();dP();t0();SP();p0();w0();i0();W0();c0();YP();mP();_0();S0();a();E=e($0(),1)});function uG({server:G,serverToolsCount:P,onViewTools:Y,onCancel:z,onComplete:Z,borderless:f=!1}){let[H]=k0(),W=D0(),k=J0((V)=>V.mcp),B=N0(),N=U0(),[$,U]=b0.useState(!1),S=b0.default.useCallback(async()=>{let V=G.client.type!=="disabled";try{await N(G.name),z()}catch(D){Z(`Failed to ${V?"disable":"enable"} MCP server '${G.name}': ${f0(D)}`)}},[G.client.type,G.name,N,z,Z]),M=H0(String(G.name)),b=M0(k.commands,G.name).length,K=[];if(G.client.type!=="disabled"&&P>0)K.push({label:"View tools",value:"tools"});if(G.client.type!=="disabled")K.push({label:"Reconnect",value:"reconnectMcpServer"});if(K.push({label:G.client.type!=="disabled"?"Disable":"Enable",value:"toggle-enabled"}),K.length===0)K.push({label:"Back",value:"back"});if($)return Q(X,{flexDirection:"column",gap:1,padding:1,children:[Q(L,{color:"text",children:["Reconnecting to ",J(L,{bold:!0,children:G.name})]}),Q(X,{children:[J(G0,{}),J(L,{children:" Restarting MCP server process"})]}),J(L,{dimColor:!0,children:"This may take a few moments."})]});return Q(X,{flexDirection:"column",children:[Q(X,{flexDirection:"column",paddingX:1,borderStyle:f?void 0:"round",children:[J(X,{marginBottom:1,children:Q(L,{bold:!0,children:[M," MCP Server"]})}),Q(X,{flexDirection:"column",gap:0,children:[Q(X,{children:[J(L,{bold:!0,children:"Status: "}),G.client.type==="disabled"?Q(L,{children:[C("inactive",H)(_.radioOff)," disabled"]}):G.client.type==="connected"?Q(L,{children:[C("success",H)(_.tick)," connected"]}):G.client.type==="pending"?Q(n,{children:[J(L,{dimColor:!0,children:_.radioOff}),J(L,{children:" connecting…"})]}):Q(L,{children:[C("error",H)(_.cross)," failed"]})]}),Q(X,{children:[J(L,{bold:!0,children:"Command: "}),J(L,{dimColor:!0,children:G.config.command})]}),G.config.args&&G.config.args.length>0&&Q(X,{children:[J(L,{bold:!0,children:"Args: "}),J(L,{dimColor:!0,children:G.config.args.join(" ")})]}),Q(X,{children:[J(L,{bold:!0,children:"Config location: "}),J(L,{dimColor:!0,children:R0(WP(G.name)?.scope??"dynamic")})]}),G.client.type==="connected"&&J(K0,{serverToolsCount:P,serverPromptsCount:b,serverResourcesCount:k.resources[G.name]?.length||0}),G.client.type==="connected"&&P>0&&Q(X,{children:[J(L,{bold:!0,children:"Tools: "}),Q(L,{dimColor:!0,children:[P," tools"]})]})]}),K.length>0&&J(X,{marginTop:1,children:J(L0,{options:K,onChange:async(V)=>{if(V==="tools")Y();else if(V==="reconnectMcpServer"){U(!0);try{let D=await B(G.name),{message:R}=E0(D,G.name);Z?.(R)}catch(D){Z?.(V0(D,G.name))}finally{U(!1)}}else if(V==="toggle-enabled")await S();else if(V==="back")z()},onCancel:z})})]}),J(X,{marginTop:1,children:J(L,{dimColor:!0,italic:!0,children:W.pending?Q(n,{children:["Press ",W.keyName," again to exit"]}):Q(r,{children:[J(h,{shortcut:"↑↓",action:"navigate"}),J(h,{shortcut:"Enter",action:"select"}),J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})]})})})]})}var b0;var jP=P0(()=>{r0();LP();q0();cP();VP();u0();j0();t0();p0();w0();i0();W0();c0();YP();_0();S0();a();b0=e($0(),1)});function tG(G){let P=FP.c(44),{tool:Y,server:z,onBack:Z}=G,[f,H]=v0.default.useState(""),W,k;if(P[0]!==z.name||P[1]!==Y){k=y0(Y.name,z.name);let s=Y.userFacingName?Y.userFacingName({}):k;W=B0(s),P[0]=z.name,P[1]=Y,P[2]=W,P[3]=k}else W=P[2],k=P[3];let B=W,N;if(P[4]!==Y)N=Y.isReadOnly?.({})??!1,P[4]=Y,P[5]=N;else N=P[5];let $=N,U;if(P[6]!==Y)U=Y.isDestructive?.({})??!1,P[6]=Y,P[7]=U;else U=P[7];let S=U,M;if(P[8]!==Y)M=Y.isOpenWorld?.({})??!1,P[8]=Y,P[9]=M;else M=P[9];let b=M,K,V;if(P[10]!==Y)K=()=>{(async function(){try{let O=await Y.description({},{isNonInteractiveSession:!1,toolPermissionContext:{mode:"default",additionalWorkingDirectories:new Map,alwaysAllowRules:{},alwaysDenyRules:{},alwaysAskRules:{},isBypassPermissionsModeAvailable:!1},tools:[]});H(O)}catch{H("Failed to load description")}})()},V=[Y],P[10]=Y,P[11]=K,P[12]=V;else K=P[11],V=P[12];v0.default.useEffect(K,V);let D;if(P[13]!==$)D=$&&J(L,{color:"success",children:" [read-only]"}),P[13]=$,P[14]=D;else D=P[14];let R;if(P[15]!==S)R=S&&J(L,{color:"error",children:" [destructive]"}),P[15]=S,P[16]=R;else R=P[16];let g;if(P[17]!==b)g=b&&J(L,{dimColor:!0,children:" [open-world]"}),P[17]=b,P[18]=g;else g=P[18];let c;if(P[19]!==B||P[20]!==D||P[21]!==R||P[22]!==g)c=Q(n,{children:[B,D,R,g]}),P[19]=B,P[20]=D,P[21]=R,P[22]=g,P[23]=c;else c=P[23];let j=c,T;if(P[24]===Symbol.for("react.memo_cache_sentinel"))T=J(L,{bold:!0,children:"Tool name: "}),P[24]=T;else T=P[24];let A;if(P[25]!==k)A=Q(X,{children:[T,J(L,{dimColor:!0,children:k})]}),P[25]=k,P[26]=A;else A=P[26];let y;if(P[27]===Symbol.for("react.memo_cache_sentinel"))y=J(L,{bold:!0,children:"Full name: "}),P[27]=y;else y=P[27];let i;if(P[28]!==Y.name)i=Q(X,{children:[y,J(L,{dimColor:!0,children:Y.name})]}),P[28]=Y.name,P[29]=i;else i=P[29];let u;if(P[30]!==f)u=f&&Q(X,{flexDirection:"column",marginTop:1,children:[J(L,{bold:!0,children:"Description:"}),J(L,{wrap:"wrap",children:f})]}),P[30]=f,P[31]=u;else u=P[31];let l;if(P[32]!==Y.inputJSONSchema)l=Y.inputJSONSchema&&Y.inputJSONSchema.properties&&Object.keys(Y.inputJSONSchema.properties).length>0&&Q(X,{flexDirection:"column",marginTop:1,children:[J(L,{bold:!0,children:"Parameters:"}),J(X,{marginLeft:2,flexDirection:"column",children:Object.entries(Y.inputJSONSchema.properties).map((s)=>{let[x,O]=s,Q0=Y.inputJSONSchema?.required?.includes(x);return Q(L,{children:["• ",x,Q0&&J(L,{dimColor:!0,children:" (required)"}),":"," ",J(L,{dimColor:!0,children:typeof O==="object"&&O&&"type"in O?String(O.type):"unknown"}),typeof O==="object"&&O&&"description"in O&&Q(L,{dimColor:!0,children:[" - ",String(O.description)]})]},x)})})]}),P[32]=Y.inputJSONSchema,P[33]=l;else l=P[33];let v;if(P[34]!==A||P[35]!==i||P[36]!==u||P[37]!==l)v=Q(X,{flexDirection:"column",children:[A,i,u,l]}),P[34]=A,P[35]=i,P[36]=u,P[37]=l,P[38]=v;else v=P[38];let o;if(P[39]!==Z||P[40]!==z.name||P[41]!==v||P[42]!==j)o=J(O0,{title:j,subtitle:z.name,onCancel:Z,inputGuide:iP,children:v}),P[39]=Z,P[40]=z.name,P[41]=v,P[42]=j,P[43]=o;else o=P[43];return o}function iP(G){return G.pending?Q(L,{children:["Press ",G.keyName," again to exit"]}):J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"go back"})}var FP,v0;var uP=P0(()=>{q0();KP();w0();EP();a();FP=e(I0(),1),v0=e($0(),1)});function VJ(G){let P=HP.c(21),{server:Y,onSelectTool:z,onBack:Z}=G,f=J0(xP),H;P:{if(Y.client.type!=="connected"){let V;if(P[0]===Symbol.for("react.memo_cache_sentinel"))V=[],P[0]=V;else V=P[0];H=V;break P}let K;if(P[1]!==f||P[2]!==Y.name)K=fP(f,Y.name),P[1]=f,P[2]=Y.name,P[3]=K;else K=P[3];H=K}let W=H,k;if(P[4]!==Y.name||P[5]!==W){let K;if(P[7]!==Y.name)K=(V,D)=>{let R=y0(V.name,Y.name),g=V.userFacingName?V.userFacingName({}):R,c=B0(g),j=V.isReadOnly?.({})??!1,T=V.isDestructive?.({})??!1,A=V.isOpenWorld?.({})??!1,y=[];if(j)y.push("read-only");if(T)y.push("destructive");if(A)y.push("open-world");return{label:c,value:D.toString(),description:y.length>0?y.join(", "):void 0,descriptionColor:T?"error":j?"success":void 0}},P[7]=Y.name,P[8]=K;else K=P[8];k=W.map(K),P[4]=Y.name,P[5]=W,P[6]=k}else k=P[6];let B=k,N=`Tools for ${Y.name}`,$=W.length,U;if(P[9]!==W.length)U=zP(W.length,"tool"),P[9]=W.length,P[10]=U;else U=P[10];let S=`${$} ${U}`,M;if(P[11]!==Z||P[12]!==z||P[13]!==W||P[14]!==B)M=W.length===0?J(L,{dimColor:!0,children:"No tools available"}):J(L0,{options:B,onChange:(K)=>{let V=parseInt(K),D=W[V];if(D)z(D,V)},onCancel:Z}),P[11]=Z,P[12]=z,P[13]=W,P[14]=B,P[15]=M;else M=P[15];let b;if(P[16]!==Z||P[17]!==N||P[18]!==S||P[19]!==M)b=J(O0,{title:N,subtitle:S,onCancel:Z,inputGuide:vP,children:M}),P[16]=Z,P[17]=N,P[18]=S,P[19]=M,P[20]=b;else b=P[20];return b}function vP(G){return G.pending?Q(L,{children:["Press ",G.keyName," again to exit"]}):Q(r,{children:[J(h,{shortcut:"↑↓",action:"navigate"}),J(h,{shortcut:"Enter",action:"select"}),J(p,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"back"})]})}function xP(G){return G.mcp.tools}var HP;var aP=P0(()=>{q0();KP();u0();j0();p0();w0();i0();W0();EP();c0();a();HP=e(I0(),1)});
2
+ export{bG as Lf,$P as Mf,uG as Nf,jP as Of,tG as Pf,uP as Qf,VJ as Rf,aP as Sf};
@@ -0,0 +1,9 @@
1
+ import{Ura as V_,Vra as su,Xra as K_,Yra as f_}from"./cli-1.0.10-cj46661y.mjs";import{$ra as H,csa as $_}from"./cli-1.0.10-byd1s52c.mjs";var W_=H((k_)=>{var z_=$_("node:stream"),v=V_(),K=f_(),q=K_(),m=(_)=>_?.body instanceof z_.Readable||typeof ReadableStream<"u"&&_?.body instanceof ReadableStream,G_=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],J_=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],X_=["TimeoutError","RequestTimeout","RequestTimeoutException"],C_=[500,502,503,504],d_=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Z_=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],A=(_)=>_?.$retryable!==void 0,p=(_)=>G_.includes(_.name),y=(_)=>_.$metadata?.clockSkewCorrected,s=(_)=>{let u=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(_&&_ instanceof TypeError))return!1;return u.has(_.message)},J=(_)=>_.$metadata?.httpStatusCode===429||J_.includes(_.name)||_.$retryable?.throttling==!0,X=(_,u=0)=>A(_)||y(_)||_.name==="InvalidSignatureException"&&_.message?.includes("Signature expired")||X_.includes(_.name)||d_.includes(_?.code||"")||Z_.includes(_?.code||"")||C_.includes(_.$metadata?.httpStatusCode||0)||s(_)||o(_)||_.cause!==void 0&&u<=10&&X(_.cause,u+1),a=(_)=>{if(_.$metadata?.httpStatusCode!==void 0){let u=_.$metadata.httpStatusCode;if(500<=u&&u<=599&&!X(_))return!0;return!1}return!1};function o(_){return _.code==="ERR_HTTP2_STREAM_ERROR"&&_.message.includes("NGHTTP2_REFUSED_STREAM")}var e=100,Q=20000,t=500,Z=500,r=5,__=10,g=1,c="amz-sdk-invocation-id",w="amz-sdk-request";function u_(_,u){if(!K.HttpResponse.isInstance(_))return;for(let E of Object.keys(_.headers)){let O=E.toLowerCase();if(O==="retry-after"){let T=_.headers[E],b=NaN;if(T.endsWith("GMT"))try{b=(q.parseRfc7231DateTime(T).getTime()-Date.now())/1000}catch(L){u?.trace?.("Failed to parse retry-after header"),u?.trace?.(L)}else if(T.match(/ GMT, ((\d+)|(\d+\.\d+))$/))b=Number(T.match(/ GMT, ([\d.]+)$/)?.[1]);else if(T.match(/^((\d+)|(\d+\.\d+))$/))b=Number(T);else if(Date.parse(T)>=Date.now())b=(Date.parse(T)-Date.now())/1000;if(isNaN(b))return;return new Date(Date.now()+b*1000)}else if(O==="x-amz-retry-after"){let T=_.headers[E],b=Number(T);if(isNaN(b)){u?.trace?.(`Failed to parse x-amz-retry-after=${T}`);return}return new Date(Date.now()+b)}}}function H_(_,u){return u_(_,u)}var E_=(_)=>{if(_ instanceof Error)return _;if(_ instanceof Object)return Object.assign(Error(),_);if(typeof _==="string")return Error(_);return Error(`AWS SDK error wrapper for ${_}`)};function O_(_){return(u)=>(E,O)=>async(T)=>{let b=await u.retryStrategy(),L=await u.maxAttempts();if(Q_(b)){b=b;let N=await b.acquireInitialRetryToken((O.partition_id??"")+(O.__retryLongPoll?":longpoll":"")),j=Error(),Y=0,F=0,{request:I}=T,R=K.HttpRequest.isInstance(I);if(R)I.headers[c]=q.v4();while(!0)try{if(R)I.headers[w]=`attempt=${Y+1}; max=${L}`;let{response:V,output:z}=await E(T);return b.recordSuccess(N),z.$metadata.attempts=Y+1,z.$metadata.totalRetryDelay=F,{response:V,output:z}}catch(V){let z=c_(V,u.logger);if(j=E_(V),R&&_(I))throw(O.logger instanceof v.NoOpLogger?console:O.logger)?.warn("An error was encountered in a non-retryable streaming request."),j;try{N=await b.refreshRetryTokenForRetry(N,z)}catch(x){if(typeof x.$backoff==="number")await l(x.$backoff);if(!j.$metadata)j.$metadata={};throw j.$metadata.attempts=Y+1,j.$metadata.totalRetryDelay=F,j}Y=N.getRetryCount();let k=N.getRetryDelay();F+=k,await l(k)}}else{if(b=b,b?.mode)O.userAgent=[...O.userAgent||[],["cfg/retry-mode",b.mode]];return b.retry(E,T)}}}var l=(_)=>new Promise((u)=>setTimeout(u,_)),Q_=(_)=>typeof _.acquireInitialRetryToken<"u"&&typeof _.refreshRetryTokenForRetry<"u"&&typeof _.recordSuccess<"u",c_=(_,u)=>{let E={error:_,errorType:w_(_)},O=u_(_.$response,u);if(O)E.retryAfterHint=O;return E},w_=(_)=>{if(J(_))return"THROTTLING";if(X(_))return"TRANSIENT";if(a(_))return"SERVER_ERROR";return"CLIENT_ERROR"},b_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function B_(_){let u=O_(_);return(E)=>({applyToStack:(O)=>{O.add(u(E),b_)}})}class C{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(_){this.beta=_?.beta??0.7,this.minCapacity=_?.minCapacity??1,this.minFillRate=_?.minFillRate??0.5,this.scaleConstant=_?.scaleConstant??0.4,this.smooth=_?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(_){let u;this.updateMeasuredRate();let E=_;if(E?.errorType==="THROTTLING"||J(E?.error??_)){let b=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=b,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),u=this.cubicThrottle(b),this.enableTokenBucket()}else this.calculateTimeWindow(),u=this.cubicSuccess(this.getCurrentTimeInSeconds());let T=Math.min(u,2*this.measuredTxRate);this.updateTokenBucketRate(T)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(_){if(!this.enabled)return;this.refillTokenBucket();while(_>this.availableTokens){let u=(_-this.availableTokens)/this.fillRate*1000;await new Promise((E)=>C.setTimeoutFn(E,u)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-_}refillTokenBucket(){let _=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=_;return}let u=(_-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+u),this.lastTimestamp=_}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(_){return this.getPrecise(_*this.beta)}cubicSuccess(_){return this.getPrecise(this.scaleConstant*Math.pow(_-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(_){this.refillTokenBucket(),this.fillRate=Math.max(_,this.minFillRate),this.maxCapacity=Math.max(_,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let _=this.getCurrentTimeInSeconds(),u=Math.floor(_*2)/2;if(this.requestCount++,u>this.lastTxRateBucket){let E=this.requestCount/(u-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(E*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=u}}getPrecise(_){return parseFloat(_.toFixed(8))}}class M{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return M.v2026?50:100}static throttlingDelay(){return M.v2026?1000:500}static cost(){return M.v2026?14:5}static throttlingCost(){return M.v2026?5:10}static modifiedCostType(){return M.v2026?"THROTTLING":"TRANSIENT"}}class T_{x=M.delay();computeNextBackoffDelay(_){let u=Math.random(),E=2,O=u*Math.min(this.x*2**_,Q);return Math.floor(O)}setDelayBase(_){this.x=_}}class h{delay;count;cost;longPoll;constructor(_,u,E,O){this.delay=_,this.count=u,this.cost=E,this.longPoll=O}getRetryCount(){return this.count}getRetryDelay(){return Math.min(Q,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}k_.RETRY_MODES=void 0;(function(_){_.STANDARD="standard",_.ADAPTIVE="adaptive"})(k_.RETRY_MODES||(k_.RETRY_MODES={}));var $=3,Y_=k_.RETRY_MODES.STANDARD,d={incompatible:1,attempts:2,capacity:3},G=class{mode=k_.RETRY_MODES.STANDARD;capacity=Z;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(u){if(typeof u==="number")this.maxAttemptsProvider=async()=>u;else if(typeof u==="function")this.maxAttemptsProvider=u;else if(u&&typeof u==="object")this.maxAttemptsProvider=async()=>u.maxAttempts,this.baseDelay=u.baseDelay,this.retryBackoffStrategy=u.backoff;this.maxAttemptsProvider??=async()=>$,this.baseDelay??=M.delay(),this.retryBackoffStrategy??=new T_}async acquireInitialRetryToken(u){return new h(M.delay(),0,void 0,M.v2026&&u.includes(":longpoll"))}async refreshRetryTokenForRetry(u,E){let O=await this.getMaxAttempts(),T=this.retryCode(u,E,O),b=T===0,L=u.isLongPoll?.();if(b||L){let N=E.errorType;this.retryBackoffStrategy.setDelayBase(N==="THROTTLING"?M.throttlingDelay():this.baseDelay);let j=this.retryBackoffStrategy.computeNextBackoffDelay(u.getRetryCount()),Y=j;if(E.retryAfterHint instanceof Date)Y=Math.max(j,Math.min(E.retryAfterHint.getTime()-Date.now(),j+5000));if(!b)throw Object.assign(Error("No retry token available"),{$backoff:M.v2026&&T===d.capacity&&L?Y:0});else{let F=this.getCapacityCost(N);return this.capacity-=F,new h(Y,u.getRetryCount()+1,F,u.isLongPoll?.()??!1)}}throw Error("No retry token available")}recordSuccess(u){this.capacity=Math.min(Z,this.capacity+(u.getRetryCost()??g))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(u){return console.warn(`Max attempts provider could not resolve. Using default of ${$}`),$}}retryCode(u,E,O){let T=u.getRetryCount()+1,b=this.isRetryableError(E.errorType)?0:d.incompatible,L=T<O?0:d.attempts,N=this.capacity>=this.getCapacityCost(E.errorType)?0:d.capacity;return b||L||N}getCapacityCost(u){return u===M.modifiedCostType()?M.throttlingCost():M.cost()}isRetryableError(u){return u==="THROTTLING"||u==="TRANSIENT"}},j_=class{mode=k_.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(u,E){let{rateLimiter:O}=E??{};this.rateLimiter=O??new C,this.standardRetryStrategy=E?new G({maxAttempts:typeof u==="number"?u:3,...E}):new G(u)}async acquireInitialRetryToken(u){let E=await this.standardRetryStrategy.acquireInitialRetryToken(u);return await this.rateLimiter.getSendToken(),E}async refreshRetryTokenForRetry(u,E){this.rateLimiter.updateClientSendingRate(E);let O=await this.standardRetryStrategy.refreshRetryTokenForRetry(u,E);return await this.rateLimiter.getSendToken(),O}recordSuccess(u){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(u)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}};class P_ extends G{computeNextBackoffDelay;constructor(_,u=M.delay()){super(typeof _==="function"?_:async()=>_);if(typeof u==="number")this.computeNextBackoffDelay=()=>u;else this.computeNextBackoffDelay=u}async refreshRetryTokenForRetry(_,u){let E=await super.refreshRetryTokenForRetry(_,u);return E.getRetryDelay=()=>this.computeNextBackoffDelay(E.getRetryCount()),E}}var v_=(_,u)=>{let E=_,O=g,T=r,b=__,L=_,N=(I)=>I.name==="TimeoutError"?b:T,j=(I)=>N(I)<=L;return Object.freeze({hasRetryTokens:j,retrieveRetryTokens:(I)=>{if(!j(I))throw Error("No retry token available");let R=N(I);return L-=R,R},releaseRetryTokens:(I)=>{L+=I??O,L=Math.min(L,E)}})},L_=(_,u)=>Math.floor(Math.min(Q,Math.random()*2**u*_)),N_=(_)=>{if(!_)return!1;return A(_)||p(_)||J(_)||X(_)};class n{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=k_.RETRY_MODES.STANDARD;constructor(_,u){this.maxAttemptsProvider=_,this.retryDecider=u?.retryDecider??N_,this.delayDecider=u?.delayDecider??L_,this.retryQuota=u?.retryQuota??v_(Z)}shouldRetry(_,u,E){return u<E&&this.retryDecider(_)&&this.retryQuota.hasRetryTokens(_)}async getMaxAttempts(){let _;try{_=await this.maxAttemptsProvider()}catch(u){_=$}return _}async retry(_,u,E){let O,T=0,b=0,L=await this.getMaxAttempts(),{request:N}=u;if(K.HttpRequest.isInstance(N))N.headers[c]=q.v4();while(!0)try{if(K.HttpRequest.isInstance(N))N.headers[w]=`attempt=${T+1}; max=${L}`;if(E?.beforeRequest)await E.beforeRequest();let{response:j,output:Y}=await _(u);if(E?.afterRequest)E.afterRequest(j);return this.retryQuota.releaseRetryTokens(O),Y.$metadata.attempts=T+1,Y.$metadata.totalRetryDelay=b,{response:j,output:Y}}catch(j){let Y=E_(j);if(T++,this.shouldRetry(Y,T,L)){O=this.retryQuota.retrieveRetryTokens(Y);let F=this.delayDecider(J(Y)?t:e,T),I=h_(Y.$response),R=Math.max(I||0,F);b+=R,await new Promise((V)=>setTimeout(V,R));continue}if(!Y.$metadata)Y.$metadata={};throw Y.$metadata.attempts=T,Y.$metadata.totalRetryDelay=b,Y}}}var h_=(_)=>{if(!K.HttpResponse.isInstance(_))return;let u=Object.keys(_.headers).find((b)=>b.toLowerCase()==="retry-after");if(!u)return;let E=_.headers[u],O=Number(E);if(!Number.isNaN(O))return O*1000;return new Date(E).getTime()-Date.now()};class M_ extends n{rateLimiter;constructor(_,u){let{rateLimiter:E,...O}=u??{};super(_,O);this.rateLimiter=E??new C,this.mode=k_.RETRY_MODES.ADAPTIVE}async retry(_,u){return super.retry(_,u,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(E)=>{this.rateLimiter.updateClientSendingRate(E)}})}}var S="AWS_MAX_ATTEMPTS",i="max_attempts",S_={environmentVariableSelector:(_)=>{let u=_[S];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Environment variable ${S} mast be a number, got "${u}"`);return E},configFileSelector:(_)=>{let u=_[i];if(!u)return;let E=parseInt(u);if(Number.isNaN(E))throw Error(`Shared config file entry ${i} mast be a number, got "${u}"`);return E},default:$},i_=(_)=>{let{retryStrategy:u,retryMode:E}=_,O=v.normalizeProvider(_.maxAttempts??$),T=u?Promise.resolve(u):void 0,b=async()=>await v.normalizeProvider(E)()===k_.RETRY_MODES.ADAPTIVE?new j_(O):new G(O);return Object.assign(_,{maxAttempts:O,retryStrategy:()=>T??=b()})},U_="AWS_RETRY_MODE",I_="retry_mode",q_={environmentVariableSelector:(_)=>_[U_],configFileSelector:(_)=>_[I_],default:Y_},F_=()=>(_)=>async(u)=>{let{request:E}=u;if(K.HttpRequest.isInstance(E))delete E.headers[c],delete E.headers[w];return _(u)},R_={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},A_=(_)=>({applyToStack:(u)=>{u.addRelativeTo(F_(),R_)}}),g_=O_(m),n_=B_(m);k_.AdaptiveRetryStrategy=j_;k_.CONFIG_MAX_ATTEMPTS=i;k_.CONFIG_RETRY_MODE=I_;k_.ConfiguredRetryStrategy=P_;k_.DEFAULT_MAX_ATTEMPTS=$;k_.DEFAULT_RETRY_DELAY_BASE=e;k_.DEFAULT_RETRY_MODE=Y_;k_.DefaultRateLimiter=C;k_.DeprecatedAdaptiveRetryStrategy=M_;k_.DeprecatedStandardRetryStrategy=n;k_.ENV_MAX_ATTEMPTS=S;k_.ENV_RETRY_MODE=U_;k_.INITIAL_RETRY_TOKENS=Z;k_.INVOCATION_ID_HEADER=c;k_.MAXIMUM_RETRY_DELAY=Q;k_.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=S_;k_.NODE_RETRY_MODE_CONFIG_OPTIONS=q_;k_.NO_RETRY_INCREMENT=g;k_.REQUEST_HEADER=w;k_.RETRY_COST=r;k_.Retry=M;k_.StandardRetryStrategy=G;k_.THROTTLING_RETRY_DELAY_BASE=t;k_.TIMEOUT_RETRY_COST=__;k_.defaultDelayDecider=L_;k_.defaultRetryDecider=N_;k_.getOmitRetryHeadersPlugin=A_;k_.getRetryAfterHint=H_;k_.getRetryPlugin=n_;k_.isBrowserNetworkError=s;k_.isClockSkewCorrectedError=y;k_.isClockSkewError=p;k_.isNodeJsHttp2TransientError=o;k_.isRetryableByTrait=A;k_.isServerError=a;k_.isThrottlingError=J;k_.isTransientError=X;k_.omitRetryHeadersMiddleware=F_;k_.omitRetryHeadersMiddlewareOptions=R_;k_.resolveRetryConfig=i_;k_.retryMiddleware=g_;k_.retryMiddlewareOptions=b_});var D_=H((P)=>{Object.defineProperty(P,"__esModule",{value:!0});P.TIMEOUT_RETRY_COST=P.THROTTLING_RETRY_DELAY_BASE=P.Retry=P.RETRY_MODES=P.RETRY_COST=P.NO_RETRY_INCREMENT=P.REQUEST_HEADER=P.MAXIMUM_RETRY_DELAY=P.INVOCATION_ID_HEADER=P.INITIAL_RETRY_TOKENS=P.DEFAULT_RETRY_MODE=P.DEFAULT_RETRY_DELAY_BASE=P.DEFAULT_MAX_ATTEMPTS=P.StandardRetryStrategy=P.DefaultRateLimiter=P.ConfiguredRetryStrategy=P.AdaptiveRetryStrategy=void 0;var U=W_();Object.defineProperty(P,"AdaptiveRetryStrategy",{enumerable:!0,get:function(){return U.AdaptiveRetryStrategy}});Object.defineProperty(P,"ConfiguredRetryStrategy",{enumerable:!0,get:function(){return U.ConfiguredRetryStrategy}});Object.defineProperty(P,"DefaultRateLimiter",{enumerable:!0,get:function(){return U.DefaultRateLimiter}});Object.defineProperty(P,"StandardRetryStrategy",{enumerable:!0,get:function(){return U.StandardRetryStrategy}});Object.defineProperty(P,"DEFAULT_MAX_ATTEMPTS",{enumerable:!0,get:function(){return U.DEFAULT_MAX_ATTEMPTS}});Object.defineProperty(P,"DEFAULT_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_DELAY_BASE}});Object.defineProperty(P,"DEFAULT_RETRY_MODE",{enumerable:!0,get:function(){return U.DEFAULT_RETRY_MODE}});Object.defineProperty(P,"INITIAL_RETRY_TOKENS",{enumerable:!0,get:function(){return U.INITIAL_RETRY_TOKENS}});Object.defineProperty(P,"INVOCATION_ID_HEADER",{enumerable:!0,get:function(){return U.INVOCATION_ID_HEADER}});Object.defineProperty(P,"MAXIMUM_RETRY_DELAY",{enumerable:!0,get:function(){return U.MAXIMUM_RETRY_DELAY}});Object.defineProperty(P,"REQUEST_HEADER",{enumerable:!0,get:function(){return U.REQUEST_HEADER}});Object.defineProperty(P,"NO_RETRY_INCREMENT",{enumerable:!0,get:function(){return U.NO_RETRY_INCREMENT}});Object.defineProperty(P,"RETRY_COST",{enumerable:!0,get:function(){return U.RETRY_COST}});Object.defineProperty(P,"RETRY_MODES",{enumerable:!0,get:function(){return U.RETRY_MODES}});Object.defineProperty(P,"Retry",{enumerable:!0,get:function(){return U.Retry}});Object.defineProperty(P,"THROTTLING_RETRY_DELAY_BASE",{enumerable:!0,get:function(){return U.THROTTLING_RETRY_DELAY_BASE}});Object.defineProperty(P,"TIMEOUT_RETRY_COST",{enumerable:!0,get:function(){return U.TIMEOUT_RETRY_COST}})});var yu=H((gu)=>{var wu=D_(),B={warningEmitted:!1},Bu=(_)=>{if(_&&!B.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){B.warningEmitted=!0;return}let u=parseInt(_.substring(1,_.indexOf("."))),E=22;if(u<E)B.warningEmitted=!0,process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
2
+ versions published after the first week of January 2027
3
+ will require node >=${E}. You are running node ${_}.
4
+
5
+ To continue receiving updates to AWS services, bug fixes,
6
+ and security updates please upgrade to node >=${E}.
7
+
8
+ More information can be found at: https://a.co/c895JFp`)}},vu=()=>(_,u)=>async(E)=>{return u.__retryLongPoll=!0,_(E)},hu={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},Su=(_)=>({applyToStack:(u)=>{u.add(vu(),hu)}});function iu(_,u,E){if(!_.$source)_.$source={};return _.$source[u]=E,_}wu.Retry.v2026||=typeof process==="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";function qu(_,u,E){if(!_.__aws_sdk_context)_.__aws_sdk_context={features:{}};else if(!_.__aws_sdk_context.features)_.__aws_sdk_context.features={};_.__aws_sdk_context.features[u]=E}function Au(_,u,E){if(!_.$source)_.$source={};return _.$source[u]=E,_}gu.emitWarningIfUnsupportedVersion=Bu;gu.getLongPollPlugin=Su;gu.setCredentialFeature=iu;gu.setFeature=qu;gu.setTokenFeature=Au;gu.state=B});var ou=H((D)=>{Object.defineProperty(D,"__esModule",{value:!0});D.memoize=D.fromStatic=D.chain=D.TokenProviderError=D.CredentialsProviderError=D.ProviderError=void 0;var f=su();Object.defineProperty(D,"ProviderError",{enumerable:!0,get:function(){return f.ProviderError}});Object.defineProperty(D,"CredentialsProviderError",{enumerable:!0,get:function(){return f.CredentialsProviderError}});Object.defineProperty(D,"TokenProviderError",{enumerable:!0,get:function(){return f.TokenProviderError}});Object.defineProperty(D,"chain",{enumerable:!0,get:function(){return f.chain}});Object.defineProperty(D,"fromStatic",{enumerable:!0,get:function(){return f.fromValue}});Object.defineProperty(D,"memoize",{enumerable:!0,get:function(){return f.memoize}})});
9
+ export{W_ as Nra,D_ as Ora,yu as Pra,ou as Qra};
@@ -0,0 +1,4 @@
1
+ import{Qg as wq,Rg as bY}from"./cli-1.0.10-71469776.mjs";import{Tg as yX}from"./cli-1.0.10-n8yjcm4e.mjs";import{eh as xZ,fh as wY,gh as yq,hh as $Y}from"./cli-1.0.10-r6fe45r0.mjs";import{ih as Tq,jh as yY}from"./cli-1.0.10-evwrkxzx.mjs";import{kh as $q,lh as _Y,mh as bq,nh as jY}from"./cli-1.0.10-73jtw2ga.mjs";import{oh as iQ,ph as KZ,rh as Sq,sh as fq}from"./cli-1.0.10-g44hcyvc.mjs";import{Pi as pQ,Qi as hX}from"./cli-1.0.10-ptbb2wn9.mjs";import{$G as UJ,$n as x0,$x as Bq,CI as Cq,DI as fY,Dj as UQ,Gj as YJ,Ip as Aq,JT as gq,Jp as CY,KT as pq,Lj as DX,MP as AQ,OT as gY,Oy as TX,RP as MX,SK as cZ,TK as hY,Tn as M0,Un as kY,Vn as y,Wn as p0,XK as RZ,XS as wJ,Xn as q0,YF as dJ,YK as mJ,Yn as IZ,ZF as PY,ZK as gJ,Zx as k0,_G as RJ,_K as pJ,_x as Iq,aH as AJ,ao as wZ,ay as NJ,bH as IJ,cH as BJ,dH as kJ,eH as EJ,fH as CJ,gG as u0,gH as SJ,gN as o0,go as pZ,hG as FY,hH as fJ,hN as nZ,iG as $J,iH as qY,ko as Uq,sT as OY,sv as KJ,tm as mQ,tv as v0,um as CX,vo as EY,vv as fX,xm as gQ,ym as SX,zT as mq}from"./cli-1.0.10-wqjsz7wa.mjs";import{JU as kq,KU as Eq,OU as SY}from"./cli-1.0.10-twwqss1j.mjs";import{DW as hq,LW as TY}from"./cli-1.0.10-ynhcfc43.mjs";import{SX as A0,TX as ZZ,eY as v,fY as Rq,gY as d0,jY as uQ,kY as _X,mY as c0,nY as fZ,pY as PZ,sY as dQ,tY as jX}from"./cli-1.0.10-en27vfnb.mjs";import{C0 as A,DZ as Lq,E0 as K,HZ as BY,O0 as vQ,g0 as Nq,gZ as b0,h1 as C0,pZ as g0,qZ as Pq,vZ as CZ,xZ as EX}from"./cli-1.0.10-j1c6sy8q.mjs";import{P3 as V0,Q3 as X,R3 as z,S3 as c}from"./cli-1.0.10-b42che8r.mjs";import{T3 as O0}from"./cli-1.0.10-jd706hep.mjs";import{$3 as HQ,a4 as YX}from"./cli-1.0.10-a3dzh7qn.mjs";import{B6 as VJ,F6 as Dq,I4 as _Q,J5 as e0,K5 as mZ,M5 as zq,N5 as gZ,N6 as UZ,O4 as BX,P5 as Oq,R6 as Mq,U5 as Fq,b6 as IY,j8 as jQ,q5 as i0,r5 as AY,y8 as kX}from"./cli-1.0.10-x6xcvx11.mjs";import{U8 as F0,V8 as tJ}from"./cli-1.0.10-aqy1tjb5.mjs";import{$9 as E0,Bda as UY,Bfa as dq,Cba as Jq,Cea as Vq,Cfa as pY,Dba as qq,Dea as Kq,Eba as Qq,Efa as iq,Fba as Yq,Kba as RY,Lfa as rq,Nea as Hq,Nfa as lq,Qfa as nq,Ufa as cY,Xfa as _0,_fa as Wq,a_ as yZ,kga as U0,mda as jZ,oda as J0,pea as h,rda as vZ,sea as f,sga as AZ,tea as Xq,yea as Gq,yfa as uq}from"./cli-1.0.10-j0e7nj85.mjs";import{Hga as VZ,Iga as L0,Jga as bQ,Oga as kZ,Pga as lZ}from"./cli-1.0.10-yzdn65j0.mjs";import{hha as Zq}from"./cli-1.0.10-djtar6x6.mjs";import{Eha as NY,sha as eJ}from"./cli-1.0.10-ebk3tx3x.mjs";import{cia as MZ,dia as LJ}from"./cli-1.0.10-dsx0vt1p.mjs";import{Ria as S,Uia as LY}from"./cli-1.0.10-hkdbtrdk.mjs";import{Cja as IX,Uja as j0,Xja as rZ}from"./cli-1.0.10-pd2mt28b.mjs";import{xka as QJ,zka as FX}from"./cli-1.0.10-z6340h71.mjs";import{Fka as aJ,Hka as xq,Mka as _Z,Pka as sJ}from"./cli-1.0.10-3g4c94ey.mjs";import{Ena as $Q,Kma as fQ,Lma as hQ,Oma as TQ,gna as yQ,hna as wQ,sqa as PJ,tma as MJ,tna as GJ,toa as bZ,uoa as oJ}from"./cli-1.0.10-wg9nsp2f.mjs";import{Zra as u,bsa as o}from"./cli-1.0.10-byd1s52c.mjs";function QY(){let J=MJ(),Q=wJ(J)??X(K,{dimColor:!0,children:"/rename to add a name"});return[{label:"Version",value:"1.0.10"},{label:"Session name",value:Q},{label:"Session ID",value:J},{label:"cwd",value:MZ()},...CJ(),...SJ()]}function YY({mainLoopModel:J,mcp:Z,theme:Q,context:Y}){return[{label:"Model",value:fJ(J)},...UJ(Z.clients,Y.options.ideInstallationStatus,Q),...AJ(Z.clients,Q),...RJ(),...BJ()]}async function hJ(){return[...await kJ(),...await EJ(),...await IJ()]}function XY(J){let Z=LZ.c(8),{value:Q}=J;if(Array.isArray(Q)){let Y;if(Z[0]!==Q){let W;if(Z[2]!==Q.length)W=(O,M)=>z(K,{children:[O,M<Q.length-1?",":""]},M),Z[2]=Q.length,Z[3]=W;else W=Z[3];Y=Q.map(W),Z[0]=Q,Z[1]=Y}else Y=Z[1];let V;if(Z[4]!==Y)V=X(A,{flexWrap:"wrap",columnGap:1,flexShrink:99,children:Y}),Z[4]=Y,Z[5]=V;else V=Z[5];return V}if(typeof Q==="string"){let Y;if(Z[6]!==Q)Y=X(K,{children:Q}),Z[6]=Q,Z[7]=Y;else Y=Z[7];return Y}return Q}function TJ(J){let Z=LZ.c(20),{context:Q,diagnosticsPromise:Y}=J,V=k0(HY),W=k0(KY),[O]=g0(),M;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))M=QY(),Z[0]=M;else M=Z[0];let N;if(Z[1]!==Q||Z[2]!==V||Z[3]!==W||Z[4]!==O)N=YY({mainLoopModel:V,mcp:W,theme:O,context:Q}),Z[1]=Q,Z[2]=V,Z[3]=W,Z[4]=O,Z[5]=N;else N=Z[5];let R;if(Z[6]!==N)R=[M,N],Z[6]=N,Z[7]=R;else R=Z[7];let H=R,F=c0()?1:void 0,D;if(Z[8]!==H)D=H.map(GY),Z[8]=H,Z[9]=D;else D=Z[9];let P;if(Z[10]!==Y)P=X(NZ.Suspense,{fallback:null,children:X(WY,{promise:Y})}),Z[10]=Y,Z[11]=P;else P=Z[11];let U;if(Z[12]!==F||Z[13]!==D||Z[14]!==P)U=z(A,{flexDirection:"column",gap:1,flexGrow:F,children:[D,P]}),Z[12]=F,Z[13]=D,Z[14]=P,Z[15]=U;else U=Z[15];let k;if(Z[16]===Symbol.for("react.memo_cache_sentinel"))k=X(K,{dimColor:!0,children:X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})}),Z[16]=k;else k=Z[16];let I;if(Z[17]!==F||Z[18]!==U)I=z(A,{flexDirection:"column",flexGrow:F,children:[U,k]}),Z[17]=F,Z[18]=U,Z[19]=I;else I=Z[19];return I}function GY(J,Z){return J.length>0&&X(A,{flexDirection:"column",children:J.map(VY)},Z)}function VY(J,Z){let{label:Q,value:Y}=J;return z(A,{flexDirection:"row",gap:1,flexShrink:0,children:[Q!==void 0&&z(K,{bold:!0,children:[Q,":"]}),X(XY,{value:Y})]},Z)}function KY(J){return J.mcp}function HY(J){return J.mainLoopModel}function WY(J){let Z=LZ.c(5),{promise:Q}=J,Y=NZ.use(Q);if(Y.length===0)return null;let V;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))V=X(K,{bold:!0,children:"System Diagnostics"}),Z[0]=V;else V=Z[0];let W;if(Z[1]!==Y)W=Y.map(zY),Z[1]=Y,Z[2]=W;else W=Z[2];let O;if(Z[3]!==W)O=z(A,{flexDirection:"column",paddingBottom:1,children:[V,W]}),Z[3]=W,Z[4]=O;else O=Z[4];return O}function zY(J,Z){return z(A,{flexDirection:"row",gap:1,paddingX:1,children:[X(K,{color:"error",children:E0.warning}),typeof J==="string"?X(K,{wrap:"wrap",children:J}):J]},Z)}var LZ,NZ;var yJ=o(()=>{yZ();PJ();PZ();C0();NJ();LJ();OY();qY();p0();c();LZ=u(b0(),1),NZ=u(O0(),1)});function _J(J){let Z=bJ.c(17),{currentVersion:Q,onChoice:Y}=J,V;if(Z[0]!==Y)V=function(I){Y(I)},Z[0]=Y,Z[1]=V;else V=Z[1];let W=V,O;if(Z[2]!==Y)O=function(){Y("cancel")},Z[2]=Y,Z[3]=O;else O=Z[3];let M=O,N;if(Z[4]!==Q)N=z(K,{children:["The stable channel may have an older version than what you're currently running (",Q,")."]}),Z[4]=Q,Z[5]=N;else N=Z[5];let R;if(Z[6]===Symbol.for("react.memo_cache_sentinel"))R=X(K,{dimColor:!0,children:"How would you like to handle this?"}),Z[6]=R;else R=Z[6];let H;if(Z[7]===Symbol.for("react.memo_cache_sentinel"))H={label:"Allow possible downgrade to stable version",value:"downgrade"},Z[7]=H;else H=Z[7];let F=`Stay on current version (${Q}) until stable catches up`,D;if(Z[8]!==F)D=[H,{label:F,value:"stay"}],Z[8]=F,Z[9]=D;else D=Z[9];let P;if(Z[10]!==W||Z[11]!==D)P=X(u0,{options:D,onChange:W}),Z[10]=W,Z[11]=D,Z[12]=P;else P=Z[12];let U;if(Z[13]!==M||Z[14]!==N||Z[15]!==P)U=z(x0,{title:"Switch to Stable Channel",onCancel:M,color:"permission",hideBorder:!0,hideInputGuide:!0,children:[N,R,P]}),Z[13]=M,Z[14]=N,Z[15]=P,Z[16]=U;else U=Z[16];return U}var bJ;var jJ=o(()=>{C0();$J();wZ();c();bJ=u(b0(),1)});function vJ(J){return Object.entries(J).map(([Z,Q])=>({label:Q?.name??DY,value:Z,description:Q?.description??MY}))}function xJ(J){let Z=cJ.c(16),{initialStyle:Q,onComplete:Y,onCancel:V,isStandaloneCommand:W}=J,O;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))O=[],Z[0]=O;else O=Z[0];let[M,N]=t0.useState(O),[R,H]=t0.useState(!0),F,D;if(Z[1]===Symbol.for("react.memo_cache_sentinel"))F=()=>{gJ(MZ()).then((d)=>{let p=vJ(d);N(p),H(!1)}).catch(()=>{let d=vJ(mJ);N(d),H(!1)})},D=[],Z[1]=F,Z[2]=D;else F=Z[1],D=Z[2];t0.useEffect(F,D);let P;if(Z[3]!==Y)P=(d)=>{Y(d)},Z[3]=Y,Z[4]=P;else P=Z[4];let U=P,k=!W,I=!W,b;if(Z[5]===Symbol.for("react.memo_cache_sentinel"))b=X(A,{marginTop:1,children:X(K,{dimColor:!0,children:"This changes how Claudin communicates with you"})}),Z[5]=b;else b=Z[5];let a;if(Z[6]!==U||Z[7]!==Q||Z[8]!==R||Z[9]!==M)a=z(A,{flexDirection:"column",gap:1,children:[b,R?X(K,{dimColor:!0,children:"Loading output styles…"}):X(u0,{options:M,onChange:U,visibleOptionCount:10,defaultValue:Q})]}),Z[6]=U,Z[7]=Q,Z[8]=R,Z[9]=M,Z[10]=a;else a=Z[10];let w;if(Z[11]!==V||Z[12]!==k||Z[13]!==I||Z[14]!==a)w=X(x0,{title:"Preferred output style",onCancel:V,hideInputGuide:k,hideBorder:I,children:a}),Z[11]=V,Z[12]=k,Z[13]=I,Z[14]=a,Z[15]=w;else w=Z[15];return w}var cJ,t0,DY="Default",MY="Claudin completes coding tasks efficiently and provides concise responses";var uJ=o(()=>{pJ();C0();LJ();FY();wZ();c();cJ=u(b0(),1),t0=u(O0(),1)});function rJ(J){let Z=iJ.c(13),{initialLanguage:Q,onComplete:Y,onCancel:V}=J,[W,O]=$Z.useState(Q),[M,N]=$Z.useState((Q??"").length),R;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))R={context:"Settings"},Z[0]=R;else R=Z[0];v("confirm:no",V,R);let H;if(Z[1]!==W||Z[2]!==Y)H=function(){let w=W?.trim();Y(w||void 0)},Z[1]=W,Z[2]=Y,Z[3]=H;else H=Z[3];let F=H,D;if(Z[4]===Symbol.for("react.memo_cache_sentinel"))D=X(K,{children:"Enter your preferred response and voice language:"}),Z[4]=D;else D=Z[4];let P;if(Z[5]===Symbol.for("react.memo_cache_sentinel"))P=X(K,{children:E0.pointer}),Z[5]=P;else P=Z[5];let U=W??"",k;if(Z[6]!==M||Z[7]!==F||Z[8]!==U)k=z(A,{flexDirection:"row",gap:1,children:[P,X(dJ,{value:U,onChange:O,onSubmit:F,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${E0.ellipsis}`,columns:60,cursorOffset:M,onChangeCursorOffset:N})]}),Z[6]=M,Z[7]=F,Z[8]=U,Z[9]=k;else k=Z[9];let I;if(Z[10]===Symbol.for("react.memo_cache_sentinel"))I=X(K,{dimColor:!0,children:"Leave empty for default (English)"}),Z[10]=I;else I=Z[10];let b;if(Z[11]!==k)b=z(A,{flexDirection:"column",gap:1,children:[D,k,I]}),Z[11]=k,Z[12]=b;else b=Z[12];return b}var iJ,$Z;var lJ=o(()=>{yZ();C0();d0();PY();c();iJ=u(b0(),1),$Z=u(O0(),1)});function jq({onClose:J,context:Z,setTabsHidden:Q,onIsSearchModeChange:Y,contentHeight:V}){let{headerFocused:W,focusHeader:O}=Sq(),M=c0(),[,N]=g0(),R=Pq(),[H,F]=g.useState(f()),D=n.useRef(f()),[P,U]=g.useState(vZ()),k=n.useRef(vZ()),[I,b]=g.useState(P?.outputStyle||RZ),a=n.useRef(I),[w,d]=g.useState(P?.language),p=n.useRef(w),[_,K0]=g.useState(0),[i,G0]=g.useState(0),[l,H0]=g.useState(!0),y0=Nq(),{rows:s}=A0(),m0=V??Math.min(Math.floor(s*0.8),30),j=Math.max(5,m0-10),I0=k0((q)=>q.mainLoopModel),E=k0((q)=>q.verbose),D0=k0((q)=>q.thinkingEnabled),a0=k0((q)=>e0()?q.fastMode:!1),HZ=k0((q)=>q.promptSuggestionEnabled),WZ=!1,t=Iq(),[w0,N0]=g.useState({}),zZ=n.useRef(D0),[s0]=g.useState(()=>jZ("localSettings")),[C]=g.useState(()=>jZ("userSettings")),T=n.useRef(R),e=Bq(),[Y0]=g.useState(()=>{let q=e.getState();return{mainLoopModel:q.mainLoopModel,mainLoopModelForSession:q.mainLoopModelForSession,verbose:q.verbose,thinkingEnabled:q.thinkingEnabled,fastMode:q.fastMode,promptSuggestionEnabled:q.promptSuggestionEnabled,isBriefOnly:q.isBriefOnly,replBridgeEnabled:q.replBridgeEnabled,replBridgeOutboundOnly:q.replBridgeOutboundOnly,settings:q.settings}}),[X0]=g.useState(()=>bZ()),Z0=n.useRef(!1),[S0,OZ]=g.useState(!1),[r,m]=g.useState(null),{query:$0,setQuery:FZ,cursorOffset:lQ}=bq({isActive:l&&r===null&&!W,onExit:()=>H0(!1),onExitUp:O,passthroughCtrlKeys:["c","d"]}),WJ=l&&!W;n.useEffect(()=>{Y?.(WJ)},[WJ,Y]);let nQ=Uq(Z.options.mcpClients),oQ=!aJ(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),zJ=n.use(mq(!0)),aQ=pq(zJ),B0=Kq();function OJ(q){S("tengu_config_model_changed",{from_model:I0,to_model:q}),t((L)=>({...L,mainLoopModel:q,mainLoopModelForSession:null})),N0((L)=>{let B=UZ(q)+(yq(q,!1,Dq())?" · Billed as extra usage":"");if("model"in L){let{model:$,...W0}=L;return{...W0,model:B}}return{...L,model:B}})}function sQ(q){h((G)=>({...G,verbose:q})),F({...f(),verbose:q}),t((G)=>({...G,verbose:q})),N0((G)=>{if("verbose"in G){let{verbose:L,...B}=G;return B}return{...G,verbose:q}})}let hZ=[{id:"autoCompactEnabled",label:"Auto-compact",value:H.autoCompactEnabled,type:"boolean",onChange(q){h((G)=>({...G,autoCompactEnabled:q})),F({...f(),autoCompactEnabled:q}),S("tengu_auto_compact_setting_changed",{enabled:q})}},{id:"thinkingHistoryRedactionEnabled",label:"Thinking history redaction",value:H.thinkingHistoryRedactionEnabled,type:"boolean",onChange(q){h((G)=>({...G,thinkingHistoryRedactionEnabled:q})),F({...f(),thinkingHistoryRedactionEnabled:q}),S("claudin_thinking_history_redaction_setting_changed",{enabled:q})}},{id:"narrationHistoryRedactionEnabled",label:"Narration history redaction",value:H.narrationHistoryRedactionEnabled,type:"boolean",onChange(q){h((G)=>({...G,narrationHistoryRedactionEnabled:q})),F({...f(),narrationHistoryRedactionEnabled:q}),S("claudin_narration_history_redaction_setting_changed",{enabled:q})}},{id:"showCacheStats",label:"Cache stats display",value:H.showCacheStats,options:["off","compact","full"],type:"enum",onChange(q){let G=q==="off"||q==="compact"||q==="full"?q:"compact";h((L)=>({...L,showCacheStats:G})),F({...f(),showCacheStats:G}),S("tengu_show_cache_stats_setting_changed",{mode:G})}},{id:"toolResultSummarizerEnabled",label:"Tool result summarizer",value:H.toolResultSummarizerEnabled,type:"boolean",onChange(q){h((G)=>({...G,toolResultSummarizerEnabled:q})),F({...f(),toolResultSummarizerEnabled:q}),S("claudin_tool_result_summarizer_setting_changed",{enabled:q})}},{id:"bashOutputFilterEnabled",label:"Bash output filter",value:H.bashOutputFilterEnabled!==!1,type:"boolean",onChange(q){h((G)=>({...G,bashOutputFilterEnabled:q})),F({...f(),bashOutputFilterEnabled:q}),S("claudin_bash_output_filter_setting_changed",{enabled:q})}},{id:"autoBackgroundAgentsEnabled",label:"Auto-background agents",value:H.autoBackgroundAgentsEnabled!==!1,type:"boolean",onChange(q){h((G)=>({...G,autoBackgroundAgentsEnabled:q})),F({...f(),autoBackgroundAgentsEnabled:q}),S("claudin_auto_background_agents_setting_changed",{enabled:q})}},{id:"workflowsDefaultBackground",label:"Workflows run in background",value:H.workflowsDefaultBackground===!0,type:"boolean",onChange(q){h((G)=>({...G,workflowsDefaultBackground:q})),F({...f(),workflowsDefaultBackground:q})}},{id:"inlineImagesMode",label:"Inline terminal images",value:H.inlineImagesMode??"auto",options:["auto","enable","disable"],type:"enum",onChange(q){let G=q==="auto"||q==="enable"||q==="disable"?q:"auto";h((L)=>({...L,inlineImagesMode:G})),F({...f(),inlineImagesMode:G}),S("claudin_inline_images_setting_changed",{mode:G})}},{id:"spinnerTipsEnabled",label:"Show tips",value:P?.spinnerTipsEnabled??!0,type:"boolean",onChange(q){J0("localSettings",{spinnerTipsEnabled:q}),U((G)=>({...G,spinnerTipsEnabled:q})),S("tengu_tips_setting_changed",{enabled:q})}},{id:"prefersReducedMotion",label:"Reduce motion",value:P?.prefersReducedMotion??!1,type:"boolean",onChange(q){J0("localSettings",{prefersReducedMotion:q}),U((G)=>({...G,prefersReducedMotion:q})),t((G)=>({...G,settings:{...G.settings,prefersReducedMotion:q}})),S("tengu_reduce_motion_setting_changed",{enabled:q})}},{id:"thinkingEnabled",label:"Thinking mode",value:D0??!0,type:"boolean",onChange(q){t((G)=>({...G,thinkingEnabled:q})),J0("userSettings",{alwaysThinkingEnabled:q?void 0:!1}),S("tengu_thinking_toggled",{enabled:q})}},...e0()&&mZ()?[{id:"fastMode",label:`Fast mode (${zq} only)`,value:!!a0,type:"boolean",onChange(q){if(Fq(),J0("userSettings",{fastMode:q?!0:void 0}),q)t((G)=>({...G,mainLoopModel:gZ(),mainLoopModelForSession:null,fastMode:!0})),N0((G)=>({...G,model:gZ(),"Fast mode":"ON"}));else t((G)=>({...G,fastMode:!1})),N0((G)=>({...G,"Fast mode":"OFF"}))}}]:[],{id:"promptSuggestionEnabled",label:"Prompt suggestions",value:HZ,type:"boolean",onChange(q){t((G)=>({...G,promptSuggestionEnabled:q})),J0("userSettings",{promptSuggestionEnabled:q?void 0:!1})}},...oQ?[{id:"fileCheckpointingEnabled",label:"Rewind code (checkpoints)",value:H.fileCheckpointingEnabled,type:"boolean",onChange(q){h((G)=>({...G,fileCheckpointingEnabled:q})),F({...f(),fileCheckpointingEnabled:q}),S("tengu_file_history_snapshots_setting_changed",{enabled:q})}}]:[],{id:"verbose",label:"Verbose output",value:E,type:"boolean",onChange:sQ},{id:"terminalProgressBarEnabled",label:"Terminal progress bar",value:H.terminalProgressBarEnabled,type:"boolean",onChange(q){h((G)=>({...G,terminalProgressBarEnabled:q})),F({...f(),terminalProgressBarEnabled:q}),S("tengu_terminal_progress_bar_setting_changed",{enabled:q})}},...eJ("tengu_terminal_sidebar",!1)?[{id:"showStatusInTerminalTab",label:"Show status in terminal tab",value:H.showStatusInTerminalTab??!1,type:"boolean",onChange(q){h((G)=>({...G,showStatusInTerminalTab:q})),F({...f(),showStatusInTerminalTab:q}),S("tengu_terminal_tab_status_setting_changed",{enabled:q})}}]:[],{id:"showTurnDuration",label:"Show turn duration",value:H.showTurnDuration,type:"boolean",onChange(q){h((G)=>({...G,showTurnDuration:q})),F({...f(),showTurnDuration:q}),S("tengu_show_turn_duration_setting_changed",{enabled:q})}},{id:"defaultPermissionMode",label:"Default permission mode",value:P?.permissions?.defaultMode||"default",options:(()=>{let q=["default","plan"],G=Zq,L=["bypassPermissions"];return[...q,...G.filter((B)=>!q.includes(B)&&!L.includes(B))]})(),type:"enum",onChange(q){let G=Qq(q),L=Jq(G)?qq(G):G,B=J0("userSettings",{permissions:{...P?.permissions,defaultMode:L}});if(B.error){U0(B.error);return}U(($)=>({...$,permissions:{...$?.permissions,defaultMode:L}})),N0(($)=>({...$,defaultPermissionMode:q})),S("tengu_config_changed",{setting:"defaultPermissionMode",value:q})}},{id:"useAutoModeDuringPlan",label:"Use auto mode during plan",value:P?.useAutoModeDuringPlan??!0,type:"boolean",onChange(q){J0("userSettings",{useAutoModeDuringPlan:q}),U((G)=>({...G,useAutoModeDuringPlan:q})),t((G)=>{let L=cZ(G.toolPermissionContext);if(L===G.toolPermissionContext)return G;return{...G,toolPermissionContext:L}}),N0((G)=>({...G,"Use auto mode during plan":q}))}},{id:"respectGitignore",label:"Respect .gitignore in file picker",value:H.respectGitignore,type:"boolean",onChange(q){h((G)=>({...G,respectGitignore:q})),F({...f(),respectGitignore:q}),S("tengu_respect_gitignore_setting_changed",{enabled:q})}},{id:"copyFullResponse",label:"Always copy full response (skip /copy picker)",value:H.copyFullResponse,type:"boolean",onChange(q){h((G)=>({...G,copyFullResponse:q})),F({...f(),copyFullResponse:q}),S("tengu_config_changed",{setting:"copyFullResponse",value:String(q)})}},...Lq()?[{id:"copyOnSelect",label:"Copy on select",value:H.copyOnSelect??!0,type:"boolean",onChange(q){h((G)=>({...G,copyOnSelect:q})),F({...f(),copyOnSelect:q}),S("tengu_config_changed",{setting:"copyOnSelect",value:String(q)})}}]:[],{id:"flickerFreeMode",label:"Flicker-free mode",value:H.flickerFreeMode??!1,type:"boolean",onChange(q){h((G)=>({...G,flickerFreeMode:q})),F({...f(),flickerFreeMode:q}),S("tengu_config_changed",{setting:"flickerFreeMode",value:String(q)})}},B0?{id:"autoUpdatesChannel",label:"Auto-update channel",value:"disabled",type:"managedEnum",onChange(){}}:{id:"autoUpdatesChannel",label:"Auto-update channel",value:P?.autoUpdatesChannel??"latest",type:"managedEnum",onChange(){}},{id:"theme",label:"Theme",value:R,type:"managedEnum",onChange:N},{id:"notifChannel",label:"Notifications",value:H.preferredNotifChannel,options:["auto","iterm2","terminal_bell","iterm2_with_bell","kitty","ghostty","os_native","notifications_disabled"],type:"enum",onChange(q){h((G)=>({...G,preferredNotifChannel:q})),F({...f(),preferredNotifChannel:q})}},{id:"outputStyle",label:"Output style",value:I,type:"managedEnum",onChange:()=>{}},{id:"language",label:"Language",value:w??"Default (English)",type:"managedEnum",onChange:()=>{}},{id:"editorMode",label:"Editor mode",value:H.editorMode==="emacs"?"normal":H.editorMode||"normal",options:["normal","vim"],type:"enum",onChange(q){h((G)=>({...G,editorMode:q})),F({...f(),editorMode:q}),S("tengu_editor_mode_changed",{mode:q,source:"config_panel"})}},{id:"prStatusFooterEnabled",label:"Show PR/MR status footer",value:H.prStatusFooterEnabled??!0,type:"boolean",onChange(q){h((G)=>{if(G.prStatusFooterEnabled===q)return G;return{...G,prStatusFooterEnabled:q}}),F({...f(),prStatusFooterEnabled:q}),S("tengu_pr_status_footer_setting_changed",{enabled:q})}},{id:"model",label:"Model",value:I0===null?"Default (recommended)":I0,type:"managedEnum",onChange:OJ},...nQ?[{id:"diffTool",label:"Diff tool",value:H.diffTool??"auto",options:["terminal","auto"],type:"enum",onChange(q){h((G)=>({...G,diffTool:q})),F({...f(),diffTool:q}),S("tengu_diff_tool_changed",{tool:q,source:"config_panel"})}}]:[],...!pZ()?[{id:"autoConnectIde",label:"Auto-connect to IDE (external terminal)",value:H.autoConnectIde??!1,type:"boolean",onChange(q){h((G)=>({...G,autoConnectIde:q})),F({...f(),autoConnectIde:q}),S("tengu_auto_connect_ide_changed",{enabled:q,source:"config_panel"})}}]:[],...pZ()?[{id:"autoInstallIdeExtension",label:"Auto-install IDE extension",value:H.autoInstallIdeExtension??!0,type:"boolean",onChange(q){h((G)=>({...G,autoInstallIdeExtension:q})),F({...f(),autoInstallIdeExtension:q}),S("tengu_auto_install_ide_extension_changed",{enabled:q,source:"config_panel"})}}]:[],...Aq()?(()=>{let q=kq();return[{id:"teammateMode",label:q?`Teammate mode [overridden: ${q}]`:"Teammate mode",value:H.teammateMode??"auto",options:["auto","tmux","in-process"],type:"enum",onChange(L){if(L!=="auto"&&L!=="tmux"&&L!=="in-process")return;Eq(L),h((B)=>({...B,teammateMode:L})),F({...f(),teammateMode:L}),S("tengu_teammate_mode_changed",{mode:L})}},{id:"teammateDefaultModel",label:"Default teammate model",value:nJ(H.teammateDefaultModel),type:"managedEnum",onChange(){}}]})():[],...hq()?[{id:"remoteControlAtStartup",label:"Enable Remote Control for all sessions",value:H.remoteControlAtStartup===void 0?"default":String(H.remoteControlAtStartup),options:["true","false","default"],type:"enum",onChange(q){if(q==="default")h((L)=>{if(L.remoteControlAtStartup===void 0)return L;let B={...L};return delete B.remoteControlAtStartup,B}),F({...f(),remoteControlAtStartup:void 0});else{let L=q==="true";h((B)=>{if(B.remoteControlAtStartup===L)return B;return{...B,remoteControlAtStartup:L}}),F({...f(),remoteControlAtStartup:L})}let G=Xq();t((L)=>{if(L.replBridgeEnabled===G&&!L.replBridgeOutboundOnly)return L;return{...L,replBridgeEnabled:G,replBridgeOutboundOnly:!1}})}}]:[],...aQ?[{id:"showExternalIncludesDialog",label:"External CLAUDE.md includes",value:(()=>{if(Gq().hasClaudeMdExternalIncludesApproved)return"true";else return"false"})(),type:"managedEnum",onChange(){}}]:[],...(()=>{let q=_0(),G=q?.transport==="anthropic"?q.apiKey?.trim():void 0;if(!G||_Z())return[];return[{id:"apiKey",label:z(K,{children:["Use custom API key:"," ",X(K,{bold:!0,children:i0(G)})]}),searchText:"Use custom API key",value:Boolean(H.customApiKeyResponses?.approved?.includes(i0(G))),type:"boolean",onChange(L){h((B)=>{let $={...B};if(!$.customApiKeyResponses)$.customApiKeyResponses={approved:[],rejected:[]};if(!$.customApiKeyResponses.approved)$.customApiKeyResponses={...$.customApiKeyResponses,approved:[]};if(!$.customApiKeyResponses.rejected)$.customApiKeyResponses={...$.customApiKeyResponses,rejected:[]};{let W0=i0(G);if(L)$.customApiKeyResponses={...$.customApiKeyResponses,approved:[...($.customApiKeyResponses.approved??[]).filter((z0)=>z0!==W0),W0],rejected:($.customApiKeyResponses.rejected??[]).filter((z0)=>z0!==W0)};else $.customApiKeyResponses={...$.customApiKeyResponses,approved:($.customApiKeyResponses.approved??[]).filter((z0)=>z0!==W0),rejected:[...($.customApiKeyResponses.rejected??[]).filter((z0)=>z0!==W0),W0]}}return $}),F(f())}}]})()],R0=n.useMemo(()=>{if(!$0)return hZ;let q=$0.toLowerCase();return hZ.filter((G)=>{if(G.id.toLowerCase().includes(q))return!0;return("searchText"in G?G.searchText:G.label).toLowerCase().includes(q)})},[hZ,$0]);n.useEffect(()=>{if(_>=R0.length){let q=Math.max(0,R0.length-1);K0(q),G0(Math.max(0,q-j+1));return}G0((q)=>{if(_<q)return _;if(_>=q+j)return _-j+1;return q})},[R0.length,_,j]);let tQ=g.useCallback((q)=>{G0((G)=>{if(q<G)return q;if(q>=G+j)return q-j+1;return G})},[j]),eQ=g.useCallback(()=>{if(r!==null)return;let q=Object.entries(w0).map(([z0,DJ])=>{return S("tengu_config_changed",{key:z0,value:DJ}),`Set ${z0} to ${F0.bold(DJ)}`}),G=_0(),L=G?.transport==="anthropic"?G.apiKey?.trim():void 0,B=_Z()?void 0:L,$=Boolean(B&&D.current.customApiKeyResponses?.approved?.includes(i0(B))),W0=Boolean(B&&H.customApiKeyResponses?.approved?.includes(i0(B)));if($!==W0)q.push(`${W0?"Enabled":"Disabled"} custom API key`),S("tengu_config_changed",{key:"env.ANTHROPIC_API_KEY",value:W0});if(H.theme!==D.current.theme)q.push(`Set theme to ${F0.bold(H.theme)}`);if(H.preferredNotifChannel!==D.current.preferredNotifChannel)q.push(`Set notifications to ${F0.bold(H.preferredNotifChannel)}`);if(I!==a.current)q.push(`Set output style to ${F0.bold(I)}`);if(w!==p.current)q.push(`Set response language to ${F0.bold(w??"Default (English)")}`);if(H.editorMode!==D.current.editorMode)q.push(`Set editor mode to ${F0.bold(H.editorMode||"emacs")}`);if(H.diffTool!==D.current.diffTool)q.push(`Set diff tool to ${F0.bold(H.diffTool)}`);if(H.autoConnectIde!==D.current.autoConnectIde)q.push(`${H.autoConnectIde?"Enabled":"Disabled"} auto-connect to IDE`);if(H.autoInstallIdeExtension!==D.current.autoInstallIdeExtension)q.push(`${H.autoInstallIdeExtension?"Enabled":"Disabled"} auto-install IDE extension`);if(H.autoCompactEnabled!==D.current.autoCompactEnabled)q.push(`${H.autoCompactEnabled?"Enabled":"Disabled"} auto-compact`);if(H.thinkingHistoryRedactionEnabled!==D.current.thinkingHistoryRedactionEnabled)q.push(`${H.thinkingHistoryRedactionEnabled?"Enabled":"Disabled"} thinking history redaction`);if(H.narrationHistoryRedactionEnabled!==D.current.narrationHistoryRedactionEnabled)q.push(`${H.narrationHistoryRedactionEnabled?"Enabled":"Disabled"} narration history redaction`);if(H.toolResultSummarizerEnabled!==D.current.toolResultSummarizerEnabled)q.push(`${H.toolResultSummarizerEnabled?"Enabled":"Disabled"} tool result summarizer`);if(H.autoBackgroundAgentsEnabled!==D.current.autoBackgroundAgentsEnabled)q.push(`${H.autoBackgroundAgentsEnabled!==!1?"Enabled":"Disabled"} auto-background agents`);if(H.workflowsDefaultBackground!==D.current.workflowsDefaultBackground)q.push(`${H.workflowsDefaultBackground===!0?"Enabled":"Disabled"} workflows run in background`);if(H.bashOutputFilterEnabled!==D.current.bashOutputFilterEnabled)q.push(`${H.bashOutputFilterEnabled!==!1?"Enabled":"Disabled"} bash output filter`);if(H.respectGitignore!==D.current.respectGitignore)q.push(`${H.respectGitignore?"Enabled":"Disabled"} respect .gitignore in file picker`);if(H.copyFullResponse!==D.current.copyFullResponse)q.push(`${H.copyFullResponse?"Enabled":"Disabled"} always copy full response`);if(H.copyOnSelect!==D.current.copyOnSelect)q.push(`${H.copyOnSelect?"Enabled":"Disabled"} copy on select`);if(H.terminalProgressBarEnabled!==D.current.terminalProgressBarEnabled)q.push(`${H.terminalProgressBarEnabled?"Enabled":"Disabled"} terminal progress bar`);if(H.showStatusInTerminalTab!==D.current.showStatusInTerminalTab)q.push(`${H.showStatusInTerminalTab?"Enabled":"Disabled"} terminal tab status`);if(H.showTurnDuration!==D.current.showTurnDuration)q.push(`${H.showTurnDuration?"Enabled":"Disabled"} turn duration`);if(H.remoteControlAtStartup!==D.current.remoteControlAtStartup){let z0=H.remoteControlAtStartup===void 0?"Reset Remote Control to default":`${H.remoteControlAtStartup?"Enabled":"Disabled"} Remote Control for all sessions`;q.push(z0)}if(P?.autoUpdatesChannel!==k.current?.autoUpdatesChannel)q.push(`Set auto-update channel to ${F0.bold(P?.autoUpdatesChannel??"latest")}`);if(q.length>0)J(q.join(`
2
+ `));else J("Config dialog dismissed",{display:"system"})},[r,w0,H,I0,I,w,P?.autoUpdatesChannel,e0()?P?.fastMode:void 0,J]),FJ=g.useCallback(()=>{if(R!==T.current)N(T.current);h(()=>D.current);let q=s0;J0("localSettings",{spinnerTipsEnabled:q?.spinnerTipsEnabled,prefersReducedMotion:q?.prefersReducedMotion,defaultView:q?.defaultView,outputStyle:q?.outputStyle});let G=C;J0("userSettings",{alwaysThinkingEnabled:G?.alwaysThinkingEnabled,fastMode:G?.fastMode,promptSuggestionEnabled:G?.promptSuggestionEnabled,autoUpdatesChannel:G?.autoUpdatesChannel,minimumVersion:G?.minimumVersion,language:G?.language,...{useAutoModeDuringPlan:G?.useAutoModeDuringPlan},syntaxHighlightingDisabled:G?.syntaxHighlightingDisabled,permissions:G?.permissions===void 0?void 0:{...G.permissions,defaultMode:G.permissions.defaultMode}});let L=Y0;if(t((B)=>({...B,mainLoopModel:L.mainLoopModel,mainLoopModelForSession:L.mainLoopModelForSession,verbose:L.verbose,thinkingEnabled:L.thinkingEnabled,fastMode:L.fastMode,promptSuggestionEnabled:L.promptSuggestionEnabled,isBriefOnly:L.isBriefOnly,replBridgeEnabled:L.replBridgeEnabled,replBridgeOutboundOnly:L.replBridgeOutboundOnly,settings:L.settings,toolPermissionContext:cZ(B.toolPermissionContext)})),bZ()!==X0)oJ(X0)},[R,N,s0,C,Y0,X0,t]),ZY=g.useCallback(()=>{if(r!==null)return;if(Z0.current)FJ();J("Config dialog dismissed",{display:"system"})},[r,FJ,J]);v("confirm:no",ZY,{context:"Settings",isActive:r===null&&!l&&!W}),v("settings:close",eQ,{context:"Settings",isActive:r===null&&!l&&!W});let TZ=g.useCallback(()=>{let q=R0[_];if(!q||!q.onChange)return;if(q.type==="boolean"){if(Z0.current=!0,q.onChange(!q.value),q.id==="thinkingEnabled"){if(!q.value===zZ.current)OZ(!1);else if(Z.messages.some((B)=>B.type==="assistant"))OZ(!0)}return}if(q.id==="theme"||q.id==="model"||q.id==="teammateDefaultModel"||q.id==="showExternalIncludesDialog"||q.id==="outputStyle"||q.id==="language")switch(q.id){case"theme":m("Theme"),Q(!0);return;case"model":m("Model"),Q(!0);return;case"teammateDefaultModel":m("TeammateModel"),Q(!0);return;case"showExternalIncludesDialog":m("ExternalIncludes"),Q(!0);return;case"outputStyle":m("OutputStyle"),Q(!0);return;case"language":m("Language"),Q(!0);return}if(q.id==="autoUpdatesChannel"){if(B0){m("EnableAutoUpdates"),Q(!0);return}if((P?.autoUpdatesChannel??"latest")==="latest")m("ChannelDowngrade"),Q(!0);else Z0.current=!0,J0("userSettings",{autoUpdatesChannel:"latest",minimumVersion:void 0}),U((L)=>({...L,autoUpdatesChannel:"latest",minimumVersion:void 0})),S("tengu_autoupdate_channel_changed",{channel:"latest"});return}if(q.type==="enum"){Z0.current=!0;let L=(q.options.indexOf(q.value)+1)%q.options.length;q.onChange(q.options[L]);return}},[B0,R0,_,P?.autoUpdatesChannel,Q]),DZ=(q)=>{OZ(!1);let G=Math.max(0,Math.min(R0.length-1,_+q));K0(G),tQ(G)};Rq({"select:previous":()=>{if(_===0)OZ(!1),H0(!0),G0(0);else DZ(-1)},"select:next":()=>DZ(1),"scroll:lineUp":()=>DZ(-1),"scroll:lineDown":()=>DZ(1),"select:accept":TZ,"settings:search":()=>{H0(!0),FZ("")}},{context:"Settings",isActive:r===null&&!l&&!W});let JY=g.useCallback((q)=>{if(r!==null)return;if(W)return;if(l){if(q.key==="escape"){if(q.preventDefault(),$0.length>0)FZ("");else H0(!1);return}if(q.key==="return"||q.key==="down"||q.key==="wheeldown")q.preventDefault(),H0(!1),K0(0),G0(0);return}if(q.key==="left"||q.key==="right"||q.key==="tab"){q.preventDefault(),TZ();return}if(q.ctrl||q.meta)return;if(q.key==="j"||q.key==="k"||q.key==="/")return;if(q.key.length===1&&q.key!==" ")q.preventDefault(),H0(!0),FZ(q.key)},[r,W,l,$0,FZ,TZ]);return X(A,{flexDirection:"column",width:"100%",tabIndex:0,autoFocus:!0,onKeyDown:JY,children:r==="Theme"?z(V0,{children:[X(Tq,{onThemeSelect:(q)=>{Z0.current=!0,N(q),m(null),Q(!1)},onCancel:()=>{m(null),Q(!1)},hideEscToCancel:!0,skipExitHandling:!0}),X(A,{children:X(K,{dimColor:!0,italic:!0,children:z(q0,{children:[X(M0,{shortcut:"Enter",action:"select"}),X(y,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})})]}):r==="Model"?z(V0,{children:[X(xZ,{initial:I0,onSelect:(q,G)=>{Z0.current=!0,OJ(q),m(null),Q(!1)},onCancel:()=>{m(null),Q(!1)},showFastModeNotice:e0()?a0&&Oq(I0)&&mZ():!1}),X(K,{dimColor:!0,children:z(q0,{children:[X(M0,{shortcut:"Enter",action:"confirm"}),X(y,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})]}):r==="TeammateModel"?z(V0,{children:[X(xZ,{initial:H.teammateDefaultModel??null,skipSettingsWrite:!0,headerText:"Default model for newly spawned teammates. The leader can override via the tool call's model parameter.",onSelect:(q,G)=>{if(m(null),Q(!1),H.teammateDefaultModel===void 0&&q===null)return;Z0.current=!0,h((L)=>L.teammateDefaultModel===q?L:{...L,teammateDefaultModel:q}),F({...f(),teammateDefaultModel:q}),N0((L)=>({...L,teammateDefaultModel:nJ(q)})),S("tengu_teammate_default_model_changed",{model:q})},onCancel:()=>{m(null),Q(!1)}}),X(K,{dimColor:!0,children:z(q0,{children:[X(M0,{shortcut:"Enter",action:"confirm"}),X(y,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})]}):r==="ExternalIncludes"?z(V0,{children:[X(wq,{onDone:()=>{m(null),Q(!1)},externalIncludes:gq(zJ)}),X(K,{dimColor:!0,children:z(q0,{children:[X(M0,{shortcut:"Enter",action:"confirm"}),X(y,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"disable external includes"})]})})]}):r==="OutputStyle"?z(V0,{children:[X(xJ,{initialStyle:I,onComplete:(q)=>{Z0.current=!0,b(q??RZ),m(null),Q(!1),J0("localSettings",{outputStyle:q}),S("tengu_output_style_changed",{style:q??RZ,source:"config_panel",settings_source:"localSettings"})},onCancel:()=>{m(null),Q(!1)}}),X(K,{dimColor:!0,children:z(q0,{children:[X(M0,{shortcut:"Enter",action:"confirm"}),X(y,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})]}):r==="Language"?z(V0,{children:[X(rJ,{initialLanguage:w,onComplete:(q)=>{Z0.current=!0,d(q),m(null),Q(!1),J0("userSettings",{language:q}),S("tengu_language_changed",{language:q??"default",source:"config_panel"})},onCancel:()=>{m(null),Q(!1)}}),X(K,{dimColor:!0,children:z(q0,{children:[X(M0,{shortcut:"Enter",action:"confirm"}),X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]}):r==="EnableAutoUpdates"?X(x0,{title:"Enable Auto-Updates",onCancel:()=>{m(null),Q(!1)},hideBorder:!0,hideInputGuide:!0,children:B0?.type!=="config"?z(V0,{children:[X(K,{children:B0?.type==="env"?"Auto-updates are controlled by an environment variable and cannot be changed here.":"Auto-updates are disabled in development builds."}),B0?.type==="env"&&z(K,{dimColor:!0,children:["Unset ",B0.envVar," to re-enable auto-updates."]})]}):X(u0,{options:[{label:"Enable with latest channel",value:"latest"},{label:"Enable with stable channel",value:"stable"}],onChange:(q)=>{Z0.current=!0,m(null),Q(!1),h((G)=>({...G,autoUpdates:!0})),F({...f(),autoUpdates:!0}),J0("userSettings",{autoUpdatesChannel:q,minimumVersion:void 0}),U((G)=>({...G,autoUpdatesChannel:q,minimumVersion:void 0})),S("tengu_autoupdate_enabled",{channel:q})}})}):r==="ChannelDowngrade"?X(_J,{currentVersion:"99.0.0",onChoice:(q)=>{if(m(null),Q(!1),q==="cancel")return;Z0.current=!0;let G={autoUpdatesChannel:"stable"};if(q==="stay")G.minimumVersion="99.0.0";J0("userSettings",G),U((L)=>({...L,...G})),S("tengu_autoupdate_channel_changed",{channel:"stable",minimum_version_set:q==="stay"})}}):z(A,{flexDirection:"column",gap:1,marginY:M?void 0:1,children:[X($q,{query:$0,isFocused:l&&!W,isTerminalFocused:y0,cursorOffset:lQ,placeholder:"Search settings…"}),X(A,{flexDirection:"column",children:R0.length===0?z(K,{dimColor:!0,italic:!0,children:['No settings match "',$0,'"']}):z(V0,{children:[i>0&&z(K,{dimColor:!0,children:[E0.arrowUp," ",i," more above"]}),R0.slice(i,i+j).map((q,G)=>{let B=i+G===_&&!W&&!l;return X(n.Fragment,{children:z(A,{children:[X(A,{width:44,children:z(K,{color:B?"suggestion":void 0,children:[B?E0.pointer:" "," ",q.label]})}),X(A,{children:q.type==="boolean"?z(V0,{children:[X(K,{color:B?"suggestion":void 0,children:q.value.toString()}),S0&&q.id==="thinkingEnabled"&&z(K,{color:"warning",children:[" ","Changing thinking mode mid-conversation will increase latency and may reduce quality."]})]}):q.id==="theme"?X(K,{color:B?"suggestion":void 0,children:vY[q.value.toString()]??q.value.toString()}):q.id==="notifChannel"?X(K,{color:B?"suggestion":void 0,children:X(mY,{value:q.value.toString()})}):q.id==="defaultPermissionMode"?X(K,{color:B?"suggestion":void 0,children:Yq(q.value)}):q.id==="autoUpdatesChannel"&&B0?z(A,{flexDirection:"column",children:[X(K,{color:B?"suggestion":void 0,children:"disabled"}),z(K,{dimColor:!0,children:["(",Vq(B0),")"]})]}):X(K,{color:B?"suggestion":void 0,children:q.value.toString()})},B?"selected":"unselected")]})},q.id)}),i+j<R0.length&&z(K,{dimColor:!0,children:[E0.arrowDown," ",R0.length-i-j," ","more below"]})]})}),W?X(K,{dimColor:!0,children:z(q0,{children:[X(M0,{shortcut:"←/→ tab",action:"switch"}),X(M0,{shortcut:"↓",action:"return"}),X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"close"})]})}):l?X(K,{dimColor:!0,children:z(q0,{children:[X(K,{children:"Type to filter"}),X(M0,{shortcut:"Enter/↓",action:"select"}),X(M0,{shortcut:"↑",action:"tabs"}),X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"clear"})]})}):X(K,{dimColor:!0,children:z(q0,{children:[X(y,{action:"select:accept",context:"Settings",fallback:"Space",description:"change"}),X(y,{action:"settings:close",context:"Settings",fallback:"Enter",description:"save"}),X(y,{action:"settings:search",context:"Settings",fallback:"/",description:"search"}),X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]})})}function nJ(J){if(J===void 0)return UZ(Cq());if(J===null)return"Default (leader's model)";return UZ(J)}function mY(J){let Z=_q.c(4),{value:Q}=J;switch(Q){case"auto":return"Auto";case"iterm2":{let Y;if(Z[0]===Symbol.for("react.memo_cache_sentinel"))Y=z(K,{children:["iTerm2 ",X(K,{dimColor:!0,children:"(OSC 9)"})]}),Z[0]=Y;else Y=Z[0];return Y}case"terminal_bell":{let Y;if(Z[1]===Symbol.for("react.memo_cache_sentinel"))Y=z(K,{children:["Terminal Bell ",X(K,{dimColor:!0,children:"(\\a)"})]}),Z[1]=Y;else Y=Z[1];return Y}case"kitty":{let Y;if(Z[2]===Symbol.for("react.memo_cache_sentinel"))Y=z(K,{children:["Kitty ",X(K,{dimColor:!0,children:"(OSC 99)"})]}),Z[2]=Y;else Y=Z[2];return Y}case"ghostty":{let Y;if(Z[3]===Symbol.for("react.memo_cache_sentinel"))Y=z(K,{children:["Ghostty ",X(K,{dimColor:!0,children:"(OSC 777)"})]}),Z[3]=Y;else Y=Z[3];return Y}case"iterm2_with_bell":return"iTerm2 w/ Bell";case"notifications_disabled":return"Disabled";default:return Q}}var _q,n,g,vY;var vq=o(()=>{C0();d0();yZ();Hq();AY();Wq();Hq();tJ();RY();hY();AZ();LY();TY();yY();NJ();wY();Mq();$Y();bY();jJ();wZ();$J();uJ();lJ();gY();kY();p0();IZ();fq();PZ();_Y();EY();UY();PJ();pJ();sJ();NY();CY();SY();fY();jY();ZZ();IY();BY();c();_q=u(b0(),1),n=u(O0(),1),g=u(O0(),1);vY={auto:"Auto (match terminal)",dark:"Dark mode",light:"Light mode","dark-daltonized":"Dark mode (colorblind-friendly)","light-daltonized":"Light mode (colorblind-friendly)","dark-ansi":"Dark mode (ANSI colors only)","light-ansi":"Light mode (ANSI colors only)",terminal:"Terminal default (inherit colors)",dracula:"Dracula","catppuccin-mocha":"Catppuccin Mocha (dark)","catppuccin-latte":"Catppuccin Latte (light)","tokyo-night":"Tokyo Night",nord:"Nord","gruvbox-dark":"Gruvbox Dark"}});function qZ(J){return typeof J==="object"&&J!==null}function P0(J){return typeof J==="string"&&J.trim()?J.trim():void 0}function r0(J){return typeof J==="number"&&Number.isFinite(J)?J:void 0}function uZ(J){return typeof J==="boolean"?J:void 0}function dZ(J){let Z=r0(J);if(Z===void 0)return;return new Date(Z*1000).toISOString()}function BZ(J){if(!qZ(J))return;let Z=r0(J.used_percent)??r0(J.usedPercent);if(Z===void 0)return;let Q=r0(J.window_minutes)??r0(J.windowDurationMins)??(()=>{let V=r0(J.limit_window_seconds);return V===void 0?void 0:Math.round(V/60)})(),Y=dZ(J.resets_at)??dZ(J.resetsAt)??dZ(J.reset_at);return{usedPercent:Z,windowMinutes:Q,resetsAt:Y}}function oq(J){if(!qZ(J))return;let Z=uZ(J.has_credits)??uZ(J.hasCredits)??!1,Q=uZ(J.unlimited)??!1,Y=P0(J.balance);if(!Z&&!Q&&!Y)return;return{hasCredits:Z,unlimited:Q,balance:Y}}function JZ(J,Z){if(!qZ(J))return;let Q=P0(J.limit_name)??P0(J.limitName)??P0(J.limit_id)??P0(J.limitId)??Z,Y=BZ(J.primary)??BZ(J.primary_window),V=BZ(J.secondary)??BZ(J.secondary_window),W=oq(J.credits);if(!Y&&!V&&!W)return;return{limitName:Q,primary:Y,secondary:V,credits:W}}function iZ(J,Z="codex"){if(Array.isArray(J))return J.map((Q,Y)=>JZ(Q,Y===0?Z:`${Z}-${Y+1}`)).filter((Q)=>Q!==void 0);if(!qZ(J))return[];return Object.entries(J).map(([Q,Y])=>JZ(Y,Q)).filter((Q)=>Q!==void 0)}function xY(J){let Z=P0(J.plan_type)??P0(J.planType),Q=[],Y=oq(J.credits),V=JZ(J.rate_limit,"codex");if(V)V.credits??=Y,Q.push(V);else if(Y)Q.push({limitName:"codex",credits:Y});let W=JZ(J.code_review_rate_limit,"code review");if(W)Q.push(W);return Q.push(...iZ(J.additional_rate_limits??J.additionalRateLimits,"additional")),{planType:Z,snapshots:Q}}function uY(J){if(Array.isArray(J))return{snapshots:iZ(J)};if(!qZ(J))return{snapshots:[]};if("rate_limit"in J||"code_review_rate_limit"in J||"additional_rate_limits"in J||"credits"in J)return xY(J);let Z=J.rate_limits??J.rateLimits??J.rate_limits_by_limit_id??J.rateLimitsByLimitId;if(Z!==void 0)return{planType:P0(J.plan_type)??P0(J.planType),snapshots:iZ(Z)};let Q=JZ(J,"codex");return{planType:P0(J.plan_type)??P0(J.planType),snapshots:Q?[Q]:[]}}function l0(J){if(!J)return J;return J[0].toUpperCase()+J.slice(1)}function cq(J,Z){if(J===void 0||J<=0)return Z;if(J===10080)return"weekly";if(J%1440===0)return`${J/1440}d`;if(J%60===0)return`${J/60}h`;return`${J}m`}function dY(J){let Z=J?.trim();if(!Z)return;let Q=Number.parseInt(Z,10);if(Number.isFinite(Q)&&`${Q}`===Z&&Q>0)return`${Q}`;let Y=Number.parseFloat(Z);if(Number.isFinite(Y)&&Y>0)return`${Math.round(Y)}`;return}function iY(J){if(!J?.hasCredits)return;if(J.unlimited)return{kind:"text",label:"Credits",value:"Unlimited"};let Z=dY(J.balance);if(!Z)return;return{kind:"text",label:"Credits",value:`${Z} credits`}}function aq(J){let Z=[];for(let Q of J){let Y=Q.limitName.trim()||"codex",V=iY(Q.credits);if(!(Q.primary!==void 0||Q.secondary!==void 0||V!==void 0))continue;let O=Y.toLowerCase()!=="codex",M=Number(Q.primary!==void 0)+Number(Q.secondary!==void 0),N=O&&M===1;if(O&&!N)Z.push({kind:"text",label:`${l0(Y)} limit`,value:""});if(Q.primary){let R=l0(cq(Q.primary.windowMinutes,"5h"));Z.push({kind:"window",label:N?`${l0(Y)} ${R} limit`:`${R} limit`,usedPercent:Q.primary.usedPercent,resetsAt:Q.primary.resetsAt})}if(Q.secondary){let R=l0(cq(Q.secondary.windowMinutes,"weekly"));Z.push({kind:"window",label:N?`${l0(Y)} ${R} limit`:`${R} limit`,usedPercent:Q.secondary.usedPercent,resetsAt:Q.secondary.resetsAt})}if(V)Z.push(V)}return Z}function sq(J){if(!J)return;return J.split(/[_\s-]+/).filter(Boolean).map((Z)=>l0(Z.toLowerCase())).join(" ")}function rY(J=iq){return new URL("/backend-api/wham/usage",J).toString()}async function tq(){let J=await dq().catch(async(V)=>{return j0(`[codex] access token refresh failed before usage fetch: ${V instanceof Error?V.message:String(V)}`,{level:"warn"}),{refreshed:!1,credentials:await uq()}}),Z=lq();if(!rq(Z.baseUrl))throw Error("Codex usage is only available with the official ChatGPT Codex backend.");let Q=nq({storedCredentials:J.credentials});if(!Q.apiKey){let V=xq()?"":", choose Codex OAuth in /provider",W=Q.authPath?`${V} or place a Codex auth.json at ${Q.authPath}`:V;throw Error(`Codex auth is required. Set CODEX_API_KEY${W}.`)}if(!Q.accountId)throw Error("Codex auth is missing chatgpt_account_id. Re-login with Codex OAuth, the Codex CLI, or set CHATGPT_ACCOUNT_ID/CODEX_ACCOUNT_ID.");let Y=await fetch(rY(Z.baseUrl),{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${Q.apiKey}`,"chatgpt-account-id":Q.accountId,originator:"claudin"},signal:AbortSignal.timeout(5000)});if(!Y.ok){let V=await Y.text().catch(()=>"unknown error");throw Error(`Codex usage error ${Y.status}: ${V}`)}return uY(await Y.json())}var eq=o(()=>{pY();rZ();sJ();cY()});function lY({label:J,usedPercent:Z,resetsAt:Q,maxWidth:Y}){let V=Math.max(0,Math.min(100,Z)),W=`${Math.floor(V)}% used`,O=Q?`Resets ${kZ(Q,!0,!0)}`:void 0;if(Y>=62)return z(A,{flexDirection:"column",children:[X(K,{bold:!0,children:J}),z(A,{flexDirection:"row",gap:1,children:[X(o0,{ratio:V/100,width:50,fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),X(K,{children:W})]}),O?X(K,{dimColor:!0,children:O}):null]});return z(A,{flexDirection:"column",children:[z(K,{children:[X(K,{bold:!0,children:J}),O?z(V0,{children:[X(K,{children:" "}),z(K,{dimColor:!0,children:["· ",O]})]}):null]}),X(o0,{ratio:V/100,width:Y,fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),X(K,{children:W})]})}function nY({label:J,value:Z}){if(!Z)return X(K,{bold:!0,children:J});return z(K,{children:[X(K,{bold:!0,children:J}),z(K,{dimColor:!0,children:[" · ",Z]})]})}function JQ(){let[J,Z]=n0.useState(null),[Q,Y]=n0.useState(null),[V,W]=n0.useState(!0),{columns:O}=A0(),M=O-2,N=Math.min(M,80),R=ZQ.useCallback(async()=>{W(!0),Y(null);try{Z(await tq())}catch(D){U0(D),Y(D instanceof Error?D.message:"Failed to load Codex usage")}finally{W(!1)}},[]);if(n0.useEffect(()=>{R()},[R]),v("settings:retry",()=>{R()},{context:"Settings",isActive:!!Q&&!V}),Q)return z(A,{flexDirection:"column",gap:1,children:[z(K,{color:"error",children:["Error: ",Q]}),X(K,{dimColor:!0,children:z(q0,{children:[X(y,{action:"settings:retry",context:"Settings",fallback:"r",description:"retry"}),X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]});if(!J)return z(A,{flexDirection:"column",gap:1,children:[X(K,{dimColor:!0,children:"Loading Codex usage data…"}),X(K,{dimColor:!0,children:X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]});let H=aq(J.snapshots),F=sq(J.planType);return z(A,{flexDirection:"column",gap:1,width:"100%",children:[F?z(K,{dimColor:!0,children:["Plan: ",F]}):null,H.length===0?X(K,{dimColor:!0,children:"Codex usage data is not available for this account."}):null,H.map((D,P)=>D.kind==="window"?X(lY,{label:D.label,usedPercent:D.usedPercent,resetsAt:D.resetsAt,maxWidth:N},`${D.label}-${P}`):X(nY,{label:D.label,value:D.value},`${D.label}-${P}`)),X(K,{dimColor:!0,children:X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]})}var ZQ,n0;var qQ=o(()=>{ZZ();C0();d0();eq();lZ();AZ();p0();IZ();nZ();c();ZQ=u(O0(),1),n0=u(O0(),1)});var QZ="https://api.minimax.io/v1",YZ="Usage details are not available for this MiniMax account. This plan or MiniMax endpoint may not expose quota status.";var oZ=()=>{};function f0(J){return typeof J==="object"&&J!==null}function Q0(J){return typeof J==="string"&&J.trim()?J.trim():void 0}function sZ(J){if(typeof J==="number"&&Number.isFinite(J))return J;if(typeof J==="string"&&J.trim()){let Z=Number.parseFloat(J);if(Number.isFinite(Z))return Z}return}function EZ(J){return Math.max(0,Math.min(100,Math.round(J)))}function oY(J){if(typeof J==="string"){let Y=Date.parse(J);return Number.isNaN(Y)?J:new Date(Y).toISOString()}let Z=sZ(J);if(Z===void 0)return;let Q=Z>1000000000000?Z:Z*1000;return new Date(Q).toISOString()}function aY(J,Z){let Q=sZ(J);if(/remains?_time/i.test(Z)&&Q!==void 0){let Y=Q>604800?Q:Q*1000;return new Date(Date.now()+Y).toISOString()}return oY(J)}function XZ(J,Z){for(let Q of Z){let Y=sZ(J[Q]);if(Y!==void 0)return Y}return}function sY(J,Z){for(let Q of Z)if(J[Q]!==void 0)return aY(J[Q],Q);return}function GZ(J,Z){return Z.some((Q)=>J[Q]!==void 0)}function XQ(J){return J?J[0].toUpperCase()+J.slice(1):J}function tY(J){if(!J)return"MiniMax";let Z=J.trim();if(!Z)return"MiniMax";if(/[A-Z]/.test(Z))return Z;return Z.split(/[_\s-]+/).filter(Boolean).map((Q)=>XQ(Q.toLowerCase())).join(" ")}function eY(J){if(!J)return;return J.split(/[_\s-]+/).filter(Boolean).map((Z)=>XQ(Z.toLowerCase())).join(" ")}function GQ(J,Z){let Q=XZ(J,Z.percentKeys),Y=XZ(J,Z.remainingPercentKeys),V=XZ(J,Z.totalKeys),W=XZ(J,Z.remainingKeys),O=XZ(J,Z.usedKeys),M=V!==void 0&&O!==void 0?V-O:W,N;if(V!==void 0&&V>0&&O!==void 0)N=EZ(O/V*100);else if(V!==void 0&&V>0&&W!==void 0)N=EZ((V-W)/V*100);else if(Q!==void 0)N=EZ(Q);else if(Y!==void 0)N=EZ(100-Y);if(N===void 0)return;return{label:Z.label,usedPercent:N,remaining:M,total:V,resetsAt:sY(J,Z.resetKeys)}}function ZX(J){let Z=Q0(J.label)??Q0(J.name)??Q0(J.window_name)??Q0(J.windowName)??"Limit";return GQ(J,{label:Z,percentKeys:["used_percent","usedPercent","utilization","usage_percentage","usagePercentage"],remainingPercentKeys:["usage_percent","usagePercent","remaining_percent","remainingPercent","percent_remaining","percentRemaining"],totalKeys:["total","quota","limit","max","entitlement"],remainingKeys:["remaining","remain","remains","left"],usedKeys:["used","usage","consumed"],resetKeys:["resets_at","reset_at","resetsAt","resetAt"]})}function qX(J){if(GZ(J,JX))return!0;return VQ.some((Z)=>GZ(J,Z.totalKeys)||GZ(J,Z.remainingKeys)||GZ(J,Z.usedKeys)||GZ(J,Z.percentKeys))}function aZ(J,Z){if(!f0(J))return;let Q=VQ.map((V)=>GQ(J,V)).filter((V)=>V!==void 0);if(Q.length===0){let V=ZX(J);if(V)Q.push(V)}if(Q.length===0)return;return{limitName:Q0(J.limit_name)??Q0(J.limitName)??Q0(J.model_name)??Q0(J.modelName)??Q0(J.name)??Z,windows:Q}}function QQ(J,Z="MiniMax"){if(Array.isArray(J))return J.map((Q,Y)=>aZ(Q,Y===0?Z:`${Z}-${Y+1}`)).filter((Q)=>Q!==void 0);if(!f0(J))return[];if(qX(J)){let Q=aZ(J,Z);return Q?[Q]:[]}return Object.entries(J).map(([Q,Y])=>aZ(Y,Q)).filter((Q)=>Q!==void 0)}function YQ(J=YZ,Z){return{availability:"unknown",planType:Z,snapshots:[],message:J}}function tZ(J){if(!f0(J))return YQ();let Z=eY(Q0(J.plan_type)??Q0(J.planType)??Q0(J.subscription_type)??Q0(J.subscriptionType)??Q0(J.plan_name)??Q0(J.planName)),Y=[J.data,J.result,J.model_remains,J.modelRemains,J.remains,J.usage,J.quotas,J.models,f0(J.data)?J.data.model_remains:void 0,f0(J.data)?J.data.modelRemains:void 0,f0(J.data)?J.data.models:void 0,f0(J.data)?J.data.quotas:void 0,f0(J.data)?J.data.remains:void 0].flatMap((W)=>QQ(W)).filter((W,O,M)=>{let N=`${W.limitName}:${W.windows.map((R)=>R.label).join("|")}`;return M.findIndex((R)=>`${R.limitName}:${R.windows.map((H)=>H.label).join("|")}`===N)===O});if(Y.length>0)return{availability:"available",planType:Z,snapshots:Y};let V=QQ(J);if(V.length>0)return{availability:"available",planType:Z,snapshots:V};return YQ(void 0,Z)}function QX(J){if(J.remaining===void 0||J.total===void 0||J.total<=0)return;return`${J.remaining}/${J.total} remaining`}function eZ(J){let Z=[];for(let Q of J){let Y=tY(Q.limitName),V=Y.toLowerCase()!=="minimax",W=V&&Q.windows.length===1;if(V&&!W)Z.push({kind:"text",label:`${Y} quota`,value:""});for(let O of Q.windows)Z.push({kind:"window",label:W?`${Y} ${O.label}`:O.label,usedPercent:O.usedPercent,resetsAt:O.resetsAt,extraSubtext:QX(O)})}return Z}var VQ,JX;var ZJ=o(()=>{oZ();VQ=[{label:"5h limit",percentKeys:["interval_used_percent","intervalUsedPercent"],remainingPercentKeys:["usage_percent","usagePercent","interval_remaining_percent","intervalRemainingPercent"],totalKeys:["current_interval_total_count","currentIntervalTotalCount","max_interval_usage_count","maxIntervalUsageCount","interval_quota","intervalQuota","interval_limit","intervalLimit"],remainingKeys:["current_interval_remaining_count","currentIntervalRemainingCount","current_interval_remains_count","currentIntervalRemainsCount","interval_remaining","intervalRemaining","remaining_interval_usage_count","remainingIntervalUsageCount"],usedKeys:["current_interval_usage_count","currentIntervalUsageCount","interval_used","intervalUsed","current_interval_used_count","currentIntervalUsedCount","used_interval_usage_count","usedIntervalUsageCount"],resetKeys:["end_time","endTime","interval_resets_at","intervalResetsAt","interval_reset_at","intervalResetAt","remains_time","remainsTime"]},{label:"Weekly limit",percentKeys:["weekly_used_percent","weeklyUsedPercent"],remainingPercentKeys:["weekly_remaining_percent","weeklyRemainingPercent"],totalKeys:["max_weekly_usage_count","maxWeeklyUsageCount","weekly_quota","weeklyQuota","weekly_limit","weeklyLimit"],remainingKeys:["weekly_remaining","weeklyRemaining","remaining_weekly_usage_count","remainingWeeklyUsageCount"],usedKeys:["current_weekly_usage_count","currentWeeklyUsageCount","weekly_used","weeklyUsed","used_weekly_usage_count","usedWeeklyUsageCount"],resetKeys:["weekly_resets_at","weeklyResetsAt","weekly_reset_at","weeklyResetAt"]},{label:"Daily limit",percentKeys:["daily_used_percent","dailyUsedPercent"],remainingPercentKeys:["daily_remaining_percent","dailyRemainingPercent"],totalKeys:["max_daily_usage_count","maxDailyUsageCount","daily_quota","dailyQuota","daily_limit","dailyLimit"],remainingKeys:["daily_remaining","dailyRemaining","remaining_daily_usage_count","remainingDailyUsageCount"],usedKeys:["current_daily_usage_count","currentDailyUsageCount","daily_used","dailyUsed","used_daily_usage_count","usedDailyUsageCount"],resetKeys:["daily_resets_at","dailyResetsAt","daily_reset_at","dailyResetAt"]}],JX=["used_percent","usedPercent","utilization","usage_percentage","usagePercentage","total","quota","limit","max","entitlement","remaining","remain","remains","left","usage_percent","usagePercent","current_interval_total_count","current_interval_usage_count","current_interval_remaining_count","current_interval_remains_count","max_interval_usage_count","current_weekly_usage_count","max_weekly_usage_count","current_daily_usage_count","max_daily_usage_count"]});function XX(J){return J.replace(/\/+$/,"")}function WQ(J=_0()?.baseUrl??QZ){let Z=J.trim();return Z?XX(Z):QZ}function GX(J){let Z=J??_0()?.baseUrl;if(!Z?.trim())return{baseUrl:QZ,usedDefault:!0};return{baseUrl:WQ(Z),usedDefault:!1}}function KQ(J){return{availability:"unknown",snapshots:[],message:J}}function zQ(J){let{baseUrl:Z,usedDefault:Q}=GX(J);try{let Y=new URL(`${Z}/`);return[new URL("token_plan/remains",Y).toString(),new URL("api/openplatform/coding_plan/remains",Y).toString()]}catch{if(Q){let Y=new URL(`${QZ}/`);return[new URL("token_plan/remains",Y).toString(),new URL("api/openplatform/coding_plan/remains",Y).toString()]}throw Error(`MiniMax usage base URL is invalid: ${Z}`)}}async function JJ(){let J=_0()?.apiKey;if(!J)throw Error("MiniMax auth is required. Run /provider and configure a MiniMax profile.");let Z=zQ(),Q=[],Y=null;for(let V of Z){let W;try{W=await fetch(V,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${J}`,"Content-Type":"application/json","User-Agent":HQ()},signal:AbortSignal.timeout(5000)})}catch(M){j0(`[minimax] usage request failed for ${V}: ${M instanceof Error?M.message:String(M)}`,{level:"warn"}),Y=M instanceof Error?M:Error(String(M));continue}if(!W.ok){let M=await W.text().catch(()=>"");if([400,401,403,404].includes(W.status)){Q.push({status:W.status,body:M});continue}Y=Error(`MiniMax usage error ${W.status}: ${M||"unknown error"}`);continue}let O=tZ(await W.json());if(O.availability==="available")return O}if(Q.length>0){let V=Q[Q.length-1];return j0(`[minimax] usage endpoint returned non-fatal status ${V.status}: ${V.body}`,{level:"warn"}),KQ(YZ)}if(Y)throw Y;return KQ(YZ)}var OQ=o(()=>{Wq();rZ();YX();oZ();ZJ()});var FQ=o(()=>{ZJ();OQ()});function HX(J){let Z=Math.max(1,Math.ceil(J/60000)),Q=Math.floor(Z/1440),Y=Math.floor(Z%1440/60),V=Z%60;if(Q>0)return Y>0?`${Q}d ${Y}h`:`${Q}d`;if(Y>0)return V>0?`${Y}h ${V}m`:`${Y}h`;return`${V}m`}function WX(J,Z){if(!J)return;let Q=Date.parse(J);if(!Number.isFinite(Q))return;let Y=Q-Z;if(Y<=0)return"Resetting now";return`Resets in ${HX(Y)}`}function zX({label:J,usedPercent:Z,resetsAt:Q,extraSubtext:Y,maxWidth:V,nowMs:W}){let O=Math.max(0,Math.min(100,Z)),M=`${Math.floor(O)}% used`,N=WX(Q,W),R=[M,Y].filter((H)=>Boolean(H));return z(A,{flexDirection:"column",children:[z(K,{children:[X(K,{bold:!0,children:J}),N?z(K,{dimColor:!0,children:[" · ",N]}):null]}),z(A,{flexDirection:"row",gap:1,children:[X(o0,{ratio:O/100,width:Math.min(KX,Math.max(1,V)),fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),R.length>0?X(K,{dimColor:!0,children:R.join(" · ")}):null]})]})}function OX({label:J,value:Z}){if(!Z)return X(K,{bold:!0,children:J});return z(K,{children:[X(K,{bold:!0,children:J}),z(K,{dimColor:!0,children:[" · ",Z]})]})}function MQ(){let[J,Z]=h0.useState(null),[Q,Y]=h0.useState(null),[V,W]=h0.useState(!0),[O,M]=h0.useState(()=>Date.now()),{columns:N}=A0(),R=N-2,H=Math.min(R,80),F=DQ.useCallback(async()=>{W(!0),Y(null);try{Z(await JJ())}catch(P){U0(P),Y(P instanceof Error?P.message:"Failed to load MiniMax usage")}finally{W(!1)}},[]);if(h0.useEffect(()=>{F()},[F]),h0.useEffect(()=>{let P=setInterval(()=>{M(Date.now())},VX);return()=>clearInterval(P)},[]),v("settings:retry",()=>{F()},{context:"Settings",isActive:!!Q&&!V}),Q)return z(A,{flexDirection:"column",gap:1,children:[z(K,{color:"error",children:["Error: ",Q]}),X(K,{dimColor:!0,children:z(q0,{children:[X(y,{action:"settings:retry",context:"Settings",fallback:"r",description:"retry"}),X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]});if(!J)return z(A,{flexDirection:"column",gap:1,children:[X(K,{dimColor:!0,children:"Loading MiniMax usage data…"}),X(K,{dimColor:!0,children:X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]});let D=J.availability==="available"?eZ(J.snapshots):[];return z(A,{flexDirection:"column",gap:1,width:"100%",children:[J.planType?z(K,{dimColor:!0,children:["Plan: ",J.planType]}):null,J.availability==="unknown"?X(K,{dimColor:!0,children:J.message}):D.length===0?X(K,{dimColor:!0,children:"No MiniMax usage windows were returned for this account."}):null,D.map((P,U)=>P.kind==="window"?X(zX,{label:P.label,usedPercent:P.usedPercent,resetsAt:P.resetsAt,extraSubtext:P.extraSubtext,maxWidth:H,nowMs:O},`${P.label}-${U}`):X(OX,{label:P.label,value:P.value},`${P.label}-${U}`)),X(K,{dimColor:!0,children:X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]})}var DQ,h0,VX=30000,KX=18;var PQ=o(()=>{ZZ();C0();d0();FQ();AZ();p0();IZ();nZ();c();DQ=u(O0(),1),h0=u(O0(),1)});function LQ({providerLabel:J}){return z(A,{flexDirection:"column",gap:1,children:[z(K,{dimColor:!0,children:["Usage details are not currently available for ",J,"."]}),X(K,{dimColor:!0,children:X(y,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]})}var NQ=o(()=>{C0();p0();c()});import{readdir as IQ,readFile as BQ}from"fs/promises";import{join as qJ}from"path";async function RQ(J,Z){let Q;try{Q=await BQ(J,"utf-8")}catch(V){if(!QJ(V))j0(`usageContribution: skip ${J}: ${String(V)}`);return 0}if(Q.length>YJ)return 0;let Y=0;for(let V of Q.split(`
3
+ `)){if(!V)continue;let W;try{W=JSON.parse(V)}catch{continue}if(W.type!=="assistant")continue;if(!W.timestamp)continue;let O=Date.parse(W.timestamp);if(Number.isNaN(O)||O<Z)continue;let M=W.message?.usage;if(!M)continue;Y+=(M.input_tokens??0)+(M.output_tokens??0)+(M.cache_creation_input_tokens??0)+(M.cache_read_input_tokens??0)}return Y}async function kQ(J){let Z;try{Z=await IQ(J,{withFileTypes:!0})}catch(Y){if(QJ(Y))return[];throw Y}let Q=[];for(let Y of Z){let V=qJ(J,Y.name);if(Y.isDirectory())Q.push(...await kQ(V));else if(Y.isFile()&&UX.test(Y.name))Q.push(V)}return Q}async function AX(J){let Z=J.replace(/\.jsonl$/,".meta.json");try{let Q=await BQ(Z,"utf-8");return JSON.parse(Q).agentType||"subagent"}catch{return"subagent"}}async function XJ(J){let Z=Date.now()-PX[J],Q={window:J,totalTokens:0,sessionCount:0,subagentHeavyPct:0,agentBreakdown:[]},Y=UQ(),V;try{V=await IQ(Y,{withFileTypes:!0})}catch{return Q}let W=V.filter((F)=>F.isDirectory()).map((F)=>qJ(Y,F.name)),O=0,M=0,N=0,R=new Map;for(let F=0;F<W.length;F++){let D=W[F],P=await AQ(D);for(let[U,k]of P){if(k.mtime<Z)continue;let I=k.size>YJ?0:await RQ(k.path,Z),b=0,a=qJ(D,U,"subagents");for(let d of await kQ(a)){let p=await RQ(d,Z);if(p<=0)continue;b+=p;let _=await AX(d);R.set(_,(R.get(_)??0)+p)}let w=I+b;if(w<=0)continue;if(N++,O+=w,b/w>LX)M+=w}if(F%10===9)await new Promise((U)=>setImmediate(U))}if(O===0)return Q;let H=[...R.entries()].map(([F,D])=>({agentType:F,tokens:D,pct:D/O*100})).filter((F)=>F.tokens/O>=NX).sort((F,D)=>D.tokens-F.tokens).slice(0,RX);return{window:J,totalTokens:O,sessionCount:N,subagentHeavyPct:M/O*100,agentBreakdown:H}}var PX,LX=0.5,NX=0.05,RX=5,UX;var EQ=o(()=>{rZ();FX();DX();MX();PX={day:86400000,week:604800000},UX=/^agent-.*\.jsonl$/});function CQ(J){let{title:Z,totalCost:Q,apiDuration:Y,wallDuration:V,linesAdded:W,linesRemoved:O,modelUsage:M,unknownCost:N,bytesSaved:R}=J,H=Object.entries(M);if(Q===0&&H.length===0&&W===0&&O===0)return null;let F={};for(let[P,U]of H){let k=VJ(P);if(!F[k])F[k]={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0,costUSD:0};let I=F[k];I.inputTokens+=U.inputTokens,I.outputTokens+=U.outputTokens,I.cacheReadInputTokens+=U.cacheReadInputTokens,I.cacheCreationInputTokens+=U.cacheCreationInputTokens,I.webSearchRequests+=U.webSearchRequests,I.costUSD+=U.costUSD}let D=Object.entries(F);return z(A,{flexDirection:"column",children:[X(K,{bold:!0,children:Z}),z(K,{children:[X(K,{children:"Total cost: "}),X(K,{children:v0(Q)}),N&&X(K,{dimColor:!0,children:" (costs may be inaccurate due to usage of unknown models)"})]}),z(K,{children:["Total duration (API): ",VZ(Y)]}),z(K,{children:["Total duration (wall): ",VZ(V)]}),z(K,{children:["Total code changes: ",W," ",W===1?"line":"lines"," added, ",O," ",O===1?"line":"lines"," removed"]}),R!==void 0&&R>0&&z(K,{children:["Context tokens saved: ~",bQ(R/mQ)," tokens"]}),D.length>0&&X(K,{children:"Usage by model:"}),D.map(([P,U])=>{let k=`${L0(U.inputTokens)} input, ${L0(U.outputTokens)} output`;if(U.cacheReadInputTokens>0)k+=`, ${L0(U.cacheReadInputTokens)} cache read`;if(U.cacheCreationInputTokens>0)k+=`, ${L0(U.cacheCreationInputTokens)} cache write`;if(U.webSearchRequests>0)k+=`, ${L0(U.webSearchRequests)} web search`;return k+=` (${v0(U.costUSD)})`,z(K,{children:[`${P}:`.padStart(21)," ",k]},P)})]})}function SQ(J={}){let Z=J.view??"global",[,Q]=x.useReducer((O)=>O+1,0);x.useEffect(()=>{let O=setInterval(()=>Q(),1000);return()=>clearInterval(O)},[]);let Y=GJ();if(Z==="session"){let O=fQ(),M=$Q(),N=yQ(),R=wQ();return X(CQ,{title:"Current session",totalCost:O,apiDuration:hQ(),wallDuration:TQ(),linesAdded:N,linesRemoved:R,modelUsage:M,unknownCost:Y,bytesSaved:gQ()})}let V=KJ();if(!(V.totalCost!==0||Object.keys(V.modelUsage).length>0||V.totalLinesAdded!==0||V.totalLinesRemoved!==0))return null;return z(A,{flexDirection:"column",gap:1,children:[X(CQ,{title:"Project total (all sessions)",totalCost:V.totalCost,apiDuration:V.totalAPIDuration,wallDuration:V.totalDuration,linesAdded:V.totalLinesAdded,linesRemoved:V.totalLinesRemoved,modelUsage:V.modelUsage,unknownCost:Y}),X(K,{dimColor:!0,children:"Aggregated across all sessions in this project — includes the current session live."})]})}function HJ(J={}){if((J.view??"global")==="session")return X(A,{flexDirection:"column",gap:1,width:"100%",children:X(SQ,{view:"session"})});let Q=_Q();if(Q==="firstParty")return X(bX,{});let Y;if(Q==="codex")Y=X(JQ,{});else if(Q==="minimax")Y=X(MQ,{});else{let V={openai:"this OpenAI-compatible provider",gemini:"Google Gemini",github:"GitHub Copilot",mistral:"Mistral","nvidia-nim":"NVIDIA NIM",bedrock:"AWS Bedrock",vertex:"Google Vertex AI",foundry:"Microsoft Foundry"}[Q]??"this provider";Y=X(LQ,{providerLabel:V})}return z(A,{flexDirection:"column",gap:1,width:"100%",children:[X(SQ,{view:"global"}),Y,X($X,{})]})}function $X(){let[J,Z]=x.useState("day"),[Q,Y]=x.useState(null),[V,W]=x.useState(!0),O=SZ.useCallback(async(R)=>{W(!0);try{Y(await XJ(R))}catch(H){U0(H),Y(null)}finally{W(!1)}},[]);x.useEffect(()=>{O(J)},[O,J]),v("settings:usageDay",()=>Z("day"),{context:"Settings",isActive:!0}),v("settings:usageWeek",()=>Z("week"),{context:"Settings",isActive:!0});let M=J==="day"?"last 24h":"last week",N=Q?.agentBreakdown[0];return z(A,{flexDirection:"column",width:"100%",children:[X(K,{bold:!0,children:"What's driving your token usage?"}),X(K,{dimColor:!0,children:"Approximate, based on local sessions on this machine — does not include other devices."}),X(K,{dimColor:!0,children:`${M[0].toUpperCase()}${M.slice(1)} · a characteristic of your usage, not a full breakdown`}),V&&!Q?X(K,{dimColor:!0,children:"Analyzing local sessions…"}):!Q||Q.totalTokens===0?X(K,{dimColor:!0,children:`No local session activity in the ${M}.`}):z(A,{flexDirection:"column",marginTop:1,children:[Q.subagentHeavyPct>=5&&z(A,{flexDirection:"column",children:[X(K,{children:`${Math.round(Q.subagentHeavyPct)}% of your token usage came from subagent-heavy sessions.`}),X(K,{dimColor:!0,children:cQ})]}),N&&X(A,{flexDirection:"column",marginTop:Q.subagentHeavyPct>=5?1:0,children:X(K,{children:`${Math.round(N.pct)}% of your token usage came from subagents under '${N.agentType}'.`})}),Q.agentBreakdown.length>0&&z(A,{flexDirection:"column",marginTop:1,children:[z(K,{children:[X(K,{children:"Subagents".padEnd(24)}),X(K,{children:"% of usage"})]}),Q.agentBreakdown.map((R)=>z(K,{children:[X(K,{children:R.agentType.padEnd(24)}),X(K,{children:`${Math.round(R.pct)}%`})]},R.agentType))]})]}),X(K,{dimColor:!0,children:"d to day · w to week"})]})}function bX(){let J=g0(),Z=A0(),{columns:Q}=Z,{rows:Y}=fZ(Z),V=Math.min(Math.max(20,Q-2),80),W=Math.min(50,Math.max(20,V-14)),O=Math.max(15,Math.min(Math.floor(Y*0.8),30)),M=Math.max(5,O-3),[N,R]=x.useState(null),[H,F]=x.useState(null),[D,P]=x.useState(!0),[U,k]=x.useState("day"),[I,b]=x.useState(null),[a,w]=x.useState(!0),[d,p]=x.useState(0),[,_]=x.useReducer((C)=>C+1,0),K0=SZ.useCallback(async()=>{P(!0),F(null);try{R(await pQ())}catch(C){U0(C),F(C?.message||"Failed to load usage data")}finally{P(!1)}},[]),i=SZ.useCallback(async(C)=>{w(!0);try{b(await XJ(C))}catch(T){U0(T),b(null)}finally{w(!1)}},[]);x.useEffect(()=>{K0()},[K0]),x.useEffect(()=>{i(U)},[i,U]),x.useEffect(()=>{let C=setInterval(()=>_(),1000);return()=>clearInterval(C)},[]);let G0=()=>p((C)=>Math.max(0,C-1)),l=()=>p((C)=>C+1),H0=()=>p((C)=>Math.max(0,C-M)),y0=()=>p((C)=>C+M),s={context:"Settings",isActive:!0};v("select:previous",G0,s),v("select:next",l,s),v("scroll:lineUp",G0,s),v("scroll:lineDown",l,s),v("scroll:pageUp",H0,s),v("scroll:pageDown",y0,s),v("settings:usageDay",()=>k("day"),s),v("settings:usageWeek",()=>k("week"),s),v("settings:retry",()=>{K0(),i(U)},{context:"Settings",isActive:!!H&&!D});let m0=(C)=>F0.bold(C),j=(C)=>F0.dim(C),I0=(C)=>{let T=Math.min(1,Math.max(0,C)),e=Math.floor(T*W),Y0="█".repeat(e),X0=" ".repeat(Math.max(0,W-e));return CZ(Y0,J.rate_limit_fill,"foreground")+CZ(X0,J.rate_limit_empty,"background")},E=[],D0=KJ();E.push(m0("Project total (all sessions)")),E.push("Total cost: "+v0(D0.totalCost)+(GJ()?j(" (costs may be inaccurate)"):"")),E.push("Total duration (API): "+VZ(D0.totalAPIDuration)),E.push("Total duration (wall): "+VZ(D0.totalDuration)),E.push(`Total code changes: ${D0.totalLinesAdded} ${D0.totalLinesAdded===1?"line":"lines"} added, ${D0.totalLinesRemoved} ${D0.totalLinesRemoved===1?"line":"lines"} removed`);let a0={};for(let[C,T]of Object.entries(D0.modelUsage)){let e=VJ(C),Y0=a0[e]??={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0,costUSD:0};Y0.inputTokens+=T.inputTokens,Y0.outputTokens+=T.outputTokens,Y0.cacheReadInputTokens+=T.cacheReadInputTokens,Y0.cacheCreationInputTokens+=T.cacheCreationInputTokens,Y0.webSearchRequests+=T.webSearchRequests,Y0.costUSD+=T.costUSD}let HZ=Object.entries(a0);if(HZ.length>0)E.push("Usage by model:");for(let[C,T]of HZ){let e=`${L0(T.inputTokens)} input, ${L0(T.outputTokens)} output`;if(T.cacheReadInputTokens>0)e+=`, ${L0(T.cacheReadInputTokens)} cache read`;if(T.cacheCreationInputTokens>0)e+=`, ${L0(T.cacheCreationInputTokens)} cache write`;if(T.webSearchRequests>0)e+=`, ${L0(T.webSearchRequests)} web search`;e+=` (${v0(T.costUSD)})`,E.push(`${`${C}:`.padStart(21)} ${e}`)}if(E.push(j("Aggregated across all sessions in this project — includes the current session live.")),E.push(""),D&&!N)E.push(j("Loading usage data…"));else if(H)E.push(CZ(`Could not load rate-limit data: ${H}`,J.error,"foreground")),E.push(j("(cost/usage totals above are unaffected) · r to retry"));else if(N){let C=jQ(),T=C==="max"||C==="team"||C===null,e=[["Current session",N.five_hour],["Current week (all models)",N.seven_day],...T?[["Current week (Sonnet only)",N.seven_day_sonnet]]:[]];if(!e.some(([,Z0])=>Z0))E.push(j("/usage is only available for subscription plans."));let Y0=!0;for(let[Z0,S0]of e){if(!S0||S0.utilization===null)continue;if(!Y0)E.push("");if(Y0=!1,E.push(m0(Z0)),E.push(`${I0(S0.utilization/100)} ${Math.floor(S0.utilization)}% used`),S0.resets_at)E.push(j(`Resets ${kZ(S0.resets_at,!0,!0)}`))}let X0=N.extra_usage;if(X0?.is_enabled&&typeof X0.used_credits==="number"&&typeof X0.utilization==="number"&&X0.monthly_limit!=null)E.push(""),E.push(m0("Extra usage")),E.push(`${I0(X0.utilization/100)} ${Math.floor(X0.utilization)}% used`),E.push(j(`${v0(X0.used_credits/100,2)} / ${v0(X0.monthly_limit/100,2)} spent`))}E.push("");let WZ=U==="day"?"last 24h":"last week";if(E.push(m0("What's driving your token usage?")),E.push(j("Approximate, based on local sessions on this machine — does not include other devices.")),E.push(j(`${WZ[0].toUpperCase()}${WZ.slice(1)} · a characteristic of your usage, not a full breakdown`)),a&&!I)E.push(j("Analyzing local sessions…"));else if(!I||I.totalTokens===0)E.push(j(`No local session activity in the ${WZ}.`));else{if(I.subagentHeavyPct>=5)E.push(""),E.push(`${Math.round(I.subagentHeavyPct)}% of your token usage came from subagent-heavy sessions.`),E.push(j(cQ));let C=I.agentBreakdown[0];if(C)E.push(""),E.push(`${Math.round(C.pct)}% of your token usage came from subagents under '${C.agentType}'.`);if(I.agentBreakdown.length>0){E.push(""),E.push("Subagents".padEnd(24)+"% of usage");for(let T of I.agentBreakdown)E.push(T.agentType.padEnd(24)+`${Math.round(T.pct)}%`)}}let t=Math.max(0,E.length-M);if(d>t)p(t);let w0=Math.min(d,t),N0=E.slice(w0,w0+M),zZ=w0,s0=E.length-(w0+N0.length);return z(A,{flexDirection:"column",width:"100%",children:[X(K,{dimColor:!0,children:zZ>0?`↑ ${zZ} more above`:" "}),X(vQ,{lines:N0,width:V}),X(K,{dimColor:!0,children:s0>0?`↓ ${s0} more below`:" "}),X(K,{dimColor:!0,children:"↑↓ scroll · d to day · w to week · Esc to close"})]})}var wX,SZ,x,cQ="Each subagent runs its own requests. Be deliberate about spawning them — and consider a cheaper model for simpler subagents.";var xQ=o(()=>{TX();fX();Mq();lZ();SX();CX();kX();tJ();ZZ();C0();EX();PZ();d0();hX();lZ();AZ();BX();IX();p0();IZ();nZ();yX();qQ();PQ();NQ();EQ();c();wX=u(b0(),1),SZ=u(O0(),1),x=u(O0(),1)});function rK(J){let Z=rQ.c(25),{onClose:Q,context:Y,defaultTab:V}=J,[W,O]=T0.useState(V),[M,N]=T0.useState(!1),[R,H]=T0.useState(!1),[F,D]=T0.useState(!1),P=c0(),{rows:U}=fZ(A0()),k=P?U+1:Math.max(15,Math.min(Math.floor(U*0.8),30)),[I]=T0.useState(vX);uQ();let b;if(Z[0]!==Q||Z[1]!==M)b=()=>{if(M)return;Q("Status dialog dismissed",{display:"system"})},Z[0]=Q,Z[1]=M,Z[2]=b;else b=Z[2];let a=b,w=!M&&!(W==="Config"&&R)&&!(W==="Gates"&&F),d;if(Z[3]!==w)d={context:"Settings",isActive:w},Z[3]=w,Z[4]=d;else d=Z[4];v("confirm:no",a,d);let p;if(Z[5]!==Y||Z[6]!==I)p=X(KZ,{title:"Status",children:X(TJ,{context:Y,diagnosticsPromise:I})},"status"),Z[5]=Y,Z[6]=I,Z[7]=p;else p=Z[7];let _;if(Z[8]!==k||Z[9]!==Y||Z[10]!==Q)_=X(KZ,{title:"Config",children:X(T0.Suspense,{fallback:null,children:X(jq,{context:Y,onClose:Q,setTabsHidden:N,onIsSearchModeChange:H,contentHeight:k})})},"config"),Z[8]=k,Z[9]=Y,Z[10]=Q,Z[11]=_;else _=Z[11];let K0;if(Z[12]===Symbol.for("react.memo_cache_sentinel"))K0=[X(KZ,{title:"Usage",children:X(HJ,{view:"global"})},"usage"),X(KZ,{title:"Session",children:X(HJ,{view:"session"})},"session")],Z[12]=K0;else K0=Z[12];let i;if(Z[13]!==k)i=[],Z[13]=k,Z[14]=i;else i=Z[14];let G0;if(Z[15]!==p||Z[16]!==_||Z[17]!==i)G0=[p,_,...K0,...i],Z[15]=p,Z[16]=_,Z[17]=i,Z[18]=G0;else G0=Z[18];let l=G0,H0=V!=="Config"&&V!=="Gates",y0=M||P?void 0:k,s;if(Z[19]!==W||Z[20]!==y0||Z[21]!==H0||Z[22]!==l||Z[23]!==M)s=X(dQ,{color:"permission",children:X(iQ,{color:"permission",selectedTab:W,onTabChange:O,hidden:M,initialHeaderFocused:H0,contentHeight:y0,children:l})}),Z[19]=W,Z[20]=y0,Z[21]=H0,Z[22]=l,Z[23]=M,Z[24]=s;else s=Z[24];return s}function vX(){return hJ().catch(mX)}function mX(){return[]}var rQ,T0;var gX=o(()=>{d0();_X();ZZ();PZ();jX();fq();yJ();vq();xQ();c();rQ=u(b0(),1),T0=u(O0(),1)});
4
+ export{rK as Og,gX as Pg};
@@ -0,0 +1,50 @@
1
+ import{Fc as zc,Gc as on}from"./cli-1.0.10-7vtw4q1z.mjs";import{Hc as Vh,Ic as jt,Jc as Vt,Kc as Oc,Mc as jn}from"./cli-1.0.10-bmn2zrhq.mjs";import{Nc as ft,Qc as Dn}from"./cli-1.0.10-5mwqzywt.mjs";import{$H as xn,AG as zu,BG as Ru,CG as rn,Np as Mu,Op as Tu,Pp as Uu,Qp as Eu,Rp as nc,Sp as Ct,Tp as Xh,Up as Pu,Vp as Bu,Wp as Ln,XH as eh,Xp as Nh,YF as Xt,YH as jc,ZF as sh,Zp as ou,_H as In,_p as ac,_x as bc,aq as pu,ay as Pn,dq as ku,eq as An,fq as Lu,gG as S,gq as Qu,hG as Dc,hq as Nu,hx as Cc,iG as Bn,iq as Ju,ix as lc,jq as at,jx as rc,kq as Ah,kx as wc,lq as gn,lr as yc,lx as En,mq as Jh,mr as Un,oq as Gu,pq as mc,rq as Su,xG as bu,yG as ln,zG as Ou}from"./cli-1.0.10-wqjsz7wa.mjs";import{eY as D,gY as Mn,sY as uc,tY as Tn}from"./cli-1.0.10-en27vfnb.mjs";import{C0 as F,E0 as y,h1 as Eh}from"./cli-1.0.10-j1c6sy8q.mjs";import{k2 as Ph,l2 as Bh,m2 as Ih,n2 as xh,o2 as Dh,p2 as xc,s2 as jh,w2 as oh,x2 as cc,y2 as ph}from"./cli-1.0.10-1gat00je.mjs";import{P3 as yt,Q3 as n,R3 as z,S3 as Tt}from"./cli-1.0.10-b42che8r.mjs";import{T3 as Qt}from"./cli-1.0.10-jd706hep.mjs";import{o4 as Pt,p4 as qu}from"./cli-1.0.10-cjvcm52x.mjs";import{F4 as Uh,H4 as Ic,R6 as Wn,z6 as Dt}from"./cli-1.0.10-x6xcvx11.mjs";import{$9 as qt,Afa as Qh,Cfa as Xu,Efa as hc,Ffa as pt,Oea as tc,Pea as $t,Qea as Hn,Rea as ot,Sea as x,Uea as B,Ufa as Kn,Vea as xt,Xea as Jt,Yea as Fh,Zea as ut,_ea as ct,a_ as Sn,cfa as nt,dfa as _h,ffa as kh,jfa as Th,ofa as Oh,pfa as yu,qfa as Cu,rfa as Ut,sfa as zh,tfa as lu,ufa as bh,vfa as ru,wfa as wu,xfa as Cn,yfa as Lh,zfa as gu}from"./cli-1.0.10-j0e7nj85.mjs";import{Hka as o,Pka as Et}from"./cli-1.0.10-3g4c94ey.mjs";import{Zra as Lt,_ra as Gn,bsa as I}from"./cli-1.0.10-byd1s52c.mjs";function pc(t,h=Ch,u){let a=x().find((w)=>w.provider==="openai"&&w.extras?.githubToken!==void 0);if(a){if(!ct(a.id,{provider:"openai",name:a.name,baseUrl:u||a.baseUrl,model:a.model||h,apiKey:t,extras:{...a.extras,githubToken:t}}))return{mode:"failed"};return nt(a.id),{mode:"updated"}}if(!ut({provider:"openai",name:"GitHub Copilot",baseUrl:u||oc,model:h,apiKey:t,extras:{githubToken:t}},{makeActive:!0}))return{mode:"failed"};return{mode:"created"}}function vh({onDone:t,onBack:h,onChangeAPIKey:u}){let a=jh()?.trim()?"already-authed":"menu",[C,w]=j.useState(a),[f,A]=j.useState(null),[$,R]=j.useState(""),[X,J]=j.useState(0),[Q,H]=j.useState(null),V=j.useCallback(async(i,Z=Ch,mt,N)=>{let P=oh(i,mt,N?.enterpriseDomain);if(!P.success){A(P.warning??"Could not save token to secure storage."),w("error");return}if(pc(i,Z,N?.baseUrl).mode==="failed"){A("Could not save the GitHub Copilot provider profile."),w("error");return}Uh(),u?.(),t("GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.",{display:"user"})},[u,t]),O=j.useCallback(async(i)=>{w("device-busy"),A(null),H(null);try{let Z=await Bh({domain:i});H({user_code:Z.user_code,verification_uri:Z.verification_uri}),await xh(Z.verification_uri);let mt=await Ih(Z.device_code,{initialInterval:Z.interval,timeoutSeconds:Z.expires_in,domain:i}),N=await Dh(mt,{domain:i});await V(N.token,Ch,mt,{baseUrl:N.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:i})}catch(Z){A(Z instanceof Error?Z.message:String(Z)),w("error")}},[V]);if(C==="already-authed")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot"}),n(y,{children:"You are already signed in to GitHub Copilot."}),n(y,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),n(S,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"back"}],onChange:(Z)=>{if(Z==="sign-in-again"){O();return}if(Z==="enterprise"){w("enterprise-domain");return}if(h){h();return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="enterprise-domain")return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Enterprise sign-in"}),n(y,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:">"}),n(Xt,{value:$,onChange:R,onSubmit:()=>{let Z=Ph($);if(!Z){O();return}O(Z)},onExit:()=>w(a),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:X,onChangeCursorOffset:J})]}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(C==="error"&&f)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"red",children:f}),n(S,{options:[{label:h?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(Z)=>{if(Z==="back"){if(h){h();return}w("menu"),A(null);return}t("GitHub onboard cancelled",{display:"system"})}})]});if(C==="device-busy")return z(F,{flexDirection:"column",gap:1,children:[n(y,{children:"GitHub Copilot sign-in"}),Q?z(yt,{children:[z(y,{children:["Enter code ",n(y,{bold:!0,children:Q.user_code})," at"," ",Q.verification_uri]}),n(y,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):n(y,{dimColor:!0,children:"Requesting device code from GitHub..."}),n(eh,{})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{bold:!0,children:"GitHub Copilot setup"}),n(y,{dimColor:!0,children:"Stores your token in the OS credential store (macOS Keychain when available) and creates a /provider profile so Copilot is the active provider — no manual env exports required."}),n(S,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:h?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(i)=>{if(i==="cancel"){if(h){h();return}t("GitHub onboard cancelled",{display:"system"});return}if(i==="enterprise"){w("enterprise-domain");return}O()}})]})}var j,Ch="github:copilot",oc="https://api.githubcopilot.com";var tu=I(()=>{Dc();jc();sh();Eh();xc();ph();Ic();Th();Tt();j=Lt(Qt(),1)});function uu(t){return[t.name,t.family??"",...t.families??[],t.parameterSize??"",t.quantizationLevel??""].join(" ").toLowerCase()}function Nt(t,h){return h.some((u)=>t.includes(u))}function tn(t){return!Nt(uu(t),hu)}function hn(t){return t.find(tn)??null}function lh(t){let u=`${t.parameterSize??""} ${t.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(u?.[1])return Number(u[1]);if(typeof t.sizeBytes==="number"&&t.sizeBytes>0)return Number((t.sizeBytes/1e9).toFixed(1));return null}function un(t){return(t.quantizationLevel??t.name).toLowerCase()}function cn(t,h,u){if(t===null)return u.push("unknown size"),0;if(h==="latency"){if(t<=4)return u.push("tiny model for low latency"),32;if(t<=8)return u.push("small model for fast responses"),26;if(t<=14)return u.push("mid-sized model with acceptable latency"),16;if(t<=24)return u.push("larger model may be slower"),8;return u.push("large model likely slower locally"),t<=40?0:-8}if(h==="coding"){if(t>=7&&t<=14)return u.push("strong coding size tier"),24;if(t>14&&t<=34)return u.push("large coding-capable size tier"),28;if(t>34)return u.push("very large model with higher quality potential"),18;return u.push("compact model may trade off coding depth"),12}if(t>=7&&t<=14)return u.push("great balanced size tier"),26;if(t>=3&&t<7)return u.push("compact balanced size tier"),18;if(t>14&&t<=24)return u.push("high quality balanced size tier"),20;if(t>24)return u.push("large model for quality-first usage"),10;return u.push("very small model for general usage"),8}function nn(t,h,u){let a=un(t);if(a.includes("q4"))return u.push("efficient Q4 quantization"),h==="latency"?8:4;if(a.includes("q5"))return u.push("balanced Q5 quantization"),h==="latency"?6:5;if(a.includes("q8"))return u.push("higher quality Q8 quantization"),h==="latency"?2:5;return 0}function an(t,h,u){if(h.score!==t.score)return h.score-t.score;let a=lh(t)??Number.POSITIVE_INFINITY,C=lh(h)??Number.POSITIVE_INFINITY;if(u==="latency")return a-C;if(u==="coding")return C-a;let w=14;return Math.abs(a-w)-Math.abs(C-w)}function rh(t,h){return t.map((u)=>{let a=uu(u),C=[],w=0;if(Nt(a,hu))w-=40,C.push("not a chat-first model");if(Nt(a,sc))w+=h==="coding"?24:h==="balanced"?10:4,C.push("coding-oriented model family");if(Nt(a,ec))w+=h==="latency"?4:h==="coding"?6:8,C.push("strong general-purpose model family");if(Nt(a,vc))w+=h==="latency"?2:6,C.push("chat/instruct tuned");if(a.includes("vision")||a.includes("vl"))w-=2,C.push("vision model adds extra overhead");w+=cn(lh(u),h,C),w+=nn(u,h,C);let f=C.slice(0,3).join(", ");return{...u,score:w,reasons:C,summary:f}}).sort((u,a)=>an(u,a,h))}function cu(t,h){return hn(rh(t,h))}var sc,ec,vc,hu;var nu=I(()=>{sc=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],ec=["llama","qwen","mistral","gemma","phi","deepseek"],vc=["instruct","chat","assistant"],hu=["embed","embedding","rerank","bge","whisper"]});function yn(t){let h=t.toLowerCase();return mn.some((u)=>h.includes(u))}function wh(t){try{let h=new URL(t);if(h.username)h.username="redacted";if(h.password)h.password="redacted";for(let u of h.searchParams.keys())if(yn(u))h.searchParams.set(u,"redacted");return h.toString()}catch{return t.replace(/\/\/[^/@\s]+(?::[^/@\s]*)?@/g,"//redacted@").replace(/([?&](?:token|access_token|refresh_token|api_key|apikey|key|password|passwd|pwd|auth|authorization|signature|sig|secret)=)[^&#]*/gi,"$1redacted")}}var mn;var au=I(()=>{mn=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function wn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URL(`${Oh}/oauth/authorize`);return u.searchParams.append("response_type","code"),u.searchParams.append("client_id",zh()),u.searchParams.append("redirect_uri",h),u.searchParams.append("scope",yu),u.searchParams.append("code_challenge",t.codeChallenge),u.searchParams.append("code_challenge_method","S256"),u.searchParams.append("id_token_add_organizations","true"),u.searchParams.append("codex_cli_simplified_flow","true"),u.searchParams.append("state",t.state),u.searchParams.append("originator",Cu),u.toString()}function bn(){return`<!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Codex Login Complete</title>
6
+ <style>
7
+ body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
8
+ h1 { margin: 0 0 12px; font-size: 22px; }
9
+ p { margin: 0 0 10px; }
10
+ </style>
11
+ </head>
12
+ <body>
13
+ <h1>Codex login complete</h1>
14
+ <p>You can return to Claudin now.</p>
15
+ <p>Claudin will finish activating your new Codex OAuth login.</p>
16
+ </body>
17
+ </html>`}function On(t){return`<!doctype html>
18
+ <html lang="en">
19
+ <head>
20
+ <meta charset="utf-8" />
21
+ <title>Codex Login Failed</title>
22
+ <style>
23
+ body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
24
+ h1 { margin: 0 0 12px; font-size: 22px; color: #991b1b; }
25
+ p { margin: 0 0 10px; }
26
+ </style>
27
+ </head>
28
+ <body>
29
+ <h1>Codex login failed</h1>
30
+ <p>${ru(t)}</p>
31
+ <p>You can close this window and try again in Claudin.</p>
32
+ </body>
33
+ </html>`}function mu(){return`<!doctype html>
34
+ <html lang="en">
35
+ <head>
36
+ <meta charset="utf-8" />
37
+ <title>Codex Login Cancelled</title>
38
+ <style>
39
+ body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
40
+ h1 { margin: 0 0 12px; font-size: 22px; }
41
+ p { margin: 0 0 10px; }
42
+ </style>
43
+ </head>
44
+ <body>
45
+ <h1>Codex login cancelled</h1>
46
+ <p>You can close this window and retry in Claudin.</p>
47
+ </body>
48
+ </html>`}async function zn(t){let h=`http://localhost:${t.port}/auth/callback`,u=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:h,client_id:zh(),code_verifier:t.codeVerifier}),a=await fetch(`${Oh}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u,signal:t.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!a.ok){let R=await a.text().catch(()=>"");throw Error(R.trim()?`Codex OAuth token exchange failed (${a.status}): ${R.trim()}`:`Codex OAuth token exchange failed with status ${a.status}.`)}let C=await a.json(),w=Ut(C.access_token),f=Ut(C.refresh_token);if(!w||!f)throw Error("Codex OAuth completed, but the token response was missing credentials.");let A=Ut(C.id_token);return{apiKey:A?await wu(A).catch(()=>{return}):void 0,accessToken:w,refreshToken:f,idToken:A,accountId:bh(A)??bh(w)}}class Rh{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(t){let h=Ou(),u=lu(),a=new bu("/auth/callback");this.authCodeListener=a,this.port=null;try{let C=await a.start(u);this.port=C;let w=Ru(),f=await zu(h),A=wn({port:C,codeChallenge:f,state:w});try{let $=await a.waitForAuthorization(w,async()=>{await t(A)}),R=new AbortController;this.tokenExchangeAbortController=R;let X;try{X=await zn({authorizationCode:$,codeVerifier:h,port:C,signal:R.signal})}finally{if(this.tokenExchangeAbortController===R)this.tokenExchangeAbortController=null}if(this.authCodeListener!==a)throw this.buildCancellationError();return a.handleSuccessRedirect([],(J)=>{J.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),J.end(bn())}),X}catch($){let R=this.authCodeListener===a?$:this.buildCancellationError();if(a.hasPendingResponse()){let X=R instanceof Error&&R.message==="Codex OAuth flow was cancelled.";a.handleErrorRedirect((J)=>{J.writeHead(X?200:400,{"Content-Type":"text/html; charset=utf-8"}),J.end(X?mu():On(R instanceof Error?R.message:String(R)))})}throw R}finally{this.cleanup()}}catch(C){let w=C instanceof Error?C.message:String(C);if(w.includes("EADDRINUSE")||w.includes(String(u)))throw Error(`Codex OAuth needs localhost:${u} for its callback. Close any app already using that port and try again.`);throw C}}cleanup(){let t=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(t),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((h)=>{h.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),h.end(mu())});this.authCodeListener?.cancelPendingAuthorization(t),this.authCodeListener=null,this.port=null}}var Au=I(()=>{ln();rn();Cn()});function Rn(){return new Rh}function $u(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Rn,a=t.deps?.openBrowser??Pt,C=t.deps?.saveCodexCredentials??gu,w=t.deps?.isBareMode??o,[f,A]=Bt.useState({state:"starting"});return Bt.useEffect(()=>{if(w()){A({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startOAuthFlow(async(X)=>{if($)return;A({state:"waiting",authUrl:X,browserOpened:null});let J=await a(X);if($)return;A({state:"waiting",authUrl:X,browserOpened:J})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=C({apiKey:X.apiKey,accessToken:X.accessToken,refreshToken:X.refreshToken,idToken:X.idToken,accountId:X.accountId,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;A({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,w,h,a,C]),f}var Bt;var fu=I(()=>{Au();qu();Xu();Et();Bt=Lt(Qt(),1)});function du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":ku()}}function _u(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function fn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Fn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Qu,{method:"POST",headers:du(),body:new URLSearchParams({client_id:Ah(),scope:Ju}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`xAI device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=at(C.device_code),f=at(C.user_code),A=at(C.verification_uri);if(!w||!f||!A)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:at(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:Zu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Vu/1000}}async function _n(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??fn,C=h?.now??(()=>Date.now()),w=_u(t.expires_in,Zu),f=C()+w,A=Math.max(_u(t.interval,Vu),Xn);while(C()<f){if(h?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let $=await u(Lu,{method:"POST",headers:du(),body:new URLSearchParams({grant_type:Nu,client_id:Ah(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=at(Q.access_token),V=at(Q.refresh_token);if(!H||!V)throw Error("xAI OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:3600;return{accessToken:H,refreshToken:V,idToken:at(Q.id_token),expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+qn,$n),await a(Math.min(A+Fu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(R.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`xAI device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("xAI device authorization timed out.")}class gh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Fn({signal:h.signal});return await t(u),await _n(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var Vu=5000,Xn=1000,qn=5000,$n=60000,Zu=300000,Fu=3000;var Yu=I(()=>{An();gn()});function kn(){return new gh}function Hu(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??kn,a=t.deps?.saveXaiCredentials??Gu,C=t.deps?.isBareMode??o,[w,f]=It.useState({state:"starting"});return It.useEffect(()=>{if(C()){f({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let A=!1,$=u();return $.startDeviceFlow(async(R)=>{if(A)return;f({state:"waiting",userCode:R.user_code,verificationUri:R.verification_uri,verificationUriComplete:R.verification_uri_complete})}).then(async(R)=>{if(A)return;await h(R,(J)=>{let Q=a({accessToken:R.accessToken,refreshToken:R.refreshToken,idToken:R.idToken,expiresAt:R.expiresAt,profileId:J?.profileId});if(!Q.success)throw Error(Q.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((R)=>{if(A)return;f({state:"error",message:R instanceof Error?R.message:String(R)})}),()=>{A=!0,$.cleanup()}},[u,C,h,a]),w}var It;var Ku=I(()=>{Yu();Et();Su();It=Lt(Qt(),1)});async function Du(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":Eu,...await Bu()}}function iu(t,h){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:h}function Vn(t,h){if(h?.aborted)return Promise.resolve();return new Promise((u)=>{let a=setTimeout(()=>{h?.removeEventListener("abort",C),u()},t),C=()=>{clearTimeout(a),u()};h?.addEventListener("abort",C,{once:!0})})}async function Zn(t){let h=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),a=await h(Mu,{method:"POST",headers:await Du(),body:new URLSearchParams({client_id:Xh()}).toString(),signal:u});if(!a.ok){let $=await a.text().catch(()=>"");throw Error(`Kimi device code request failed (${a.status})${$?`: ${$.trim()}`:""}`)}let C=await a.json(),w=Ct(C.device_code),f=Ct(C.user_code),A=Ct(C.verification_uri);if(!w||!f||!A)throw Error("Kimi device code response is missing device_code / user_code / verification_uri.");return{device_code:w,user_code:f,verification_uri:A,verification_uri_complete:Ct(C.verification_uri_complete),expires_in:typeof C.expires_in==="number"&&C.expires_in>0?C.expires_in:xu/1000,interval:typeof C.interval==="number"&&C.interval>0?C.interval:Iu/1000}}async function dn(t,h){let u=h?.fetchImpl??fetch,a=h?.sleep??Vn,C=h?.now??(()=>Date.now()),w=iu(t.expires_in,xu),f=C()+w,A=Math.max(iu(t.interval,Iu),Qn);while(C()<f){if(h?.signal?.aborted)throw Error("Kimi device authorization was cancelled.");let $=await u(Tu,{method:"POST",headers:await Du(),body:new URLSearchParams({grant_type:Uu,client_id:Xh(),device_code:t.device_code}).toString(),signal:h?.signal});if($.ok){let Q=await $.json(),H=Ct(Q.access_token),V=Ct(Q.refresh_token);if(!H||!V)throw Error("Kimi OAuth completed, but the token response was missing credentials.");let O=typeof Q.expires_in==="number"&&Number.isFinite(Q.expires_in)&&Q.expires_in>0?Q.expires_in:900;return{accessToken:H,refreshToken:V,expiresAt:C()+O*1000}}let R=await $.json().catch(()=>({})),X=Math.max(0,f-C());if(R.error==="authorization_pending"){await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="slow_down"){A=Math.min(A+Nn,Jn),await a(Math.min(A+Wu,X),h?.signal);continue}if(R.error==="access_denied"||R.error==="authorization_denied")throw Error("Kimi device authorization was denied.");if(R.error==="expired_token")throw Error("Kimi device code expired - please re-run login.");let J=R.error_description??R.error??"";throw Error(`Kimi device token exchange failed (${$.status})${J?`: ${J}`:""}`)}throw Error("Kimi device authorization timed out.")}class qh{abortController=null;async startDeviceFlow(t){let h=new AbortController;this.abortController=h;try{let u=await Zn({signal:h.signal});return await t(u),await dn(u,{signal:h.signal})}finally{if(this.abortController===h)this.abortController=null}}cleanup(){this.abortController?.abort(Error("Kimi device authorization was cancelled.")),this.abortController=null}}var Iu=5000,Qn=1000,Nn=5000,Jn=60000,xu=1800000,Wu=3000;var ju=I(()=>{Ln();Pu()});function Yn(){return new qh}function su(t){let{onAuthenticated:h}=t,u=t.deps?.createOAuthService??Yn,a=t.deps?.saveKimiCredentials??ou,C=t.deps?.isBareMode??o,[w,f]=lt.useState({state:"starting"}),A=lt.useRef(!1);return lt.useEffect(()=>{if(C()){f({state:"error",message:"Kimi Code OAuth is unavailable in --bare because secure storage is disabled."});return}let $=!1,R=u();return R.startDeviceFlow(async(X)=>{if($)return;f({state:"waiting",userCode:X.user_code,verificationUri:X.verification_uri,verificationUriComplete:X.verification_uri_complete})}).then(async(X)=>{if($)return;await h(X,(Q)=>{let H=a({accessToken:X.accessToken,refreshToken:X.refreshToken,expiresAt:X.expiresAt,profileId:Q?.profileId});if(!H.success)throw Error(H.warning??"Kimi Code OAuth succeeded, but credentials could not be saved securely.")})}).catch((X)=>{if($)return;f({state:"error",message:X instanceof Error?X.message:String(X)})}),()=>{$=!0,R.cleanup()}},[u,C,h,a]),lt.useEffect(()=>{if(w.state!=="waiting")return;if(A.current)return;let $=w.verificationUriComplete??w.verificationUri;if(!$)return;A.current=!0,Pt($).catch(()=>{})},[w]),w}var lt;var eu=I(()=>{ju();qu();Et();pu();lt=Lt(Qt(),1)});function ca(t){return{name:t.name,baseUrl:t.baseUrl,model:t.model,apiKey:t.apiKey??""}}function na(t){let h=ot(t);return{name:h.name,baseUrl:h.baseUrl,model:h.model,apiKey:h.apiKey??""}}function aa(t){let h={};for(let u of t.split(/\r?\n/)){let a=u.trim();if(!a)continue;let C=a.indexOf(":");if(C<=0)continue;let w=a.slice(0,C).trim(),f=a.slice(C+1).trim();if(w&&f)h[w]=f}return h}function ma(t){if(!t)return"";return Object.entries(t).map(([h,u])=>`${h}: ${u}`).join(`
49
+ `)}function ya(t,h){let u={},a=t.awsRegion?.trim();if(a)u.awsRegion=a;let C=t.gcpProject?.trim();if(C)u.gcpProject=C;let w=t.gcpRegion?.trim();if(w)u.gcpRegion=w;let f=t.azureResource?.trim();if(f)u.azureResource=f;let A=aa(h);if(Object.keys(A).length>0)u.customHeaders=A;return Object.keys(u).length>0?u:void 0}function la(t,h){let u=h?" (active)":"",a=t.apiKey?"key set":"no key",C=t.provider==="anthropic"?"anthropic":"openai-compatible",w=tc(t.model),f=w.length<=3?w.join(", "):`${w[0]}, ${w[1]} + ${w.length-2} more`;return`${C} · ${t.baseUrl} · ${f} · ${a}${u}`}function ra(t,h){if(t.state==="unreachable")return`Could not reach Atomic Chat at ${wh(h)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(t.state==="no_models")return"Atomic Chat is running, but no models are loaded. Download and load a model inside the Atomic Chat app first, or enter details manually.";return""}function wa(t,h){if(t.state==="unreachable")return`Could not reach Ollama at ${wh(h)}. Start Ollama first, or enter the endpoint manually.`;if(t.state==="no_models")return"Ollama is running, but no installed models were found. Pull a chat model such as qwen2.5-coder:7b or llama3.1:8b first, or enter details manually.";if(t.state==="generation_failed"){let u=t.probeModel??"the selected model",a=t.detail?` Details: ${t.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${u}.${a} Run "ollama run ${u}" once and retry, or enter details manually.`}return""}function fh(t,h){if(!h)return;return t.find((u)=>u.id===h)}function vu(t,h){return Boolean(t&&h&&t.id===h)}function ba(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===Zh&&!u.apiKey)}function Oa(t,h){if(h){let u=t.find((a)=>a.id===h);if(u)return u}return t.find((u)=>u.provider==="openai"&&u.baseUrl===pt&&!u.apiKey)}function za(t,h){return t.find((u)=>u.provider==="anthropic"&&u.baseUrl===h&&!u.apiKey)}function Ra({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=$u({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Codex OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Codex OAuth"}),n(y,{children:"Sign in with your ChatGPT account in the browser. Claudin will store the resulting Codex credentials securely and switch this session to the new Codex login when setup completes."}),a.state==="starting"?n(y,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):a.browserOpened===!1?z(yt,{children:[n(y,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),n(y,{children:a.authUrl})]}):a.browserOpened===!0?z(yt,{children:[n(y,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),n(y,{children:a.authUrl})]}):n(y,{dimColor:!0,children:"Opening your browser..."}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Aa({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t,[t]);let a=Hu({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"xAI OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from xAI..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function ga({onBack:t,onConfigured:h}){let u=g.useCallback(async(C,w)=>{await h(C,w)},[h]);D("confirm:no",t);let a=su({onAuthenticated:u});if(a.state==="error")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"error",bold:!0,children:"Kimi Code OAuth failed"}),n(y,{children:a.message}),n(y,{dimColor:!0,children:"Press Enter or Esc to go back."}),n(S,{options:[{value:"back",label:"Back",description:"Return to Moonshot AI authentication choices"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI · Kimi Code"}),a.state==="starting"?n(y,{dimColor:!0,children:"Requesting a device code from Kimi..."}):z(yt,{children:[z(y,{children:["Open this URL on any device:"," ",n(y,{bold:!0,children:a.verificationUri})]}),z(y,{children:["Enter code ",n(y,{bold:!0,children:a.userCode})]}),a.verificationUriComplete&&a.verificationUriComplete!==a.verificationUri?z(y,{dimColor:!0,children:["Or open this prefilled URL: ",a.verificationUriComplete]}):null,n(y,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),n(y,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Vm({mode:t,onDone:h}){let u=bc(),[a,C]=g.useState([]),[w,f]=g.useState(),[A,$]=g.useState(),[R,X]=g.useState(!1),[J,Q]=g.useState(),H=g.useRef(0),[V,O]=g.useState(t==="first-run"?"select-preset":"menu"),[wt,i]=g.useState(null),[Z,mt]=g.useState("openai"),[N,P]=g.useState(()=>na("ollama")),[Zt,dt]=g.useState({}),[dh,st]=g.useState(""),[Rc,Ac]=g.useState(0),[gc,Xc]=g.useState(0),[et,Yh]=g.useState(null),[bt,Ft]=g.useState(0),[Ot,p]=g.useState(0),[qc,s]=g.useState(0),[Gh,Y]=g.useState(),[zt,_]=g.useState(),[$c,fc]=g.useState(),[Sh,Yt]=g.useState(!1),[_t,kt]=g.useState(),[e,Gt]=g.useState({state:"idle"}),[v,St]=g.useState({state:"idle"}),[tt,vt]=g.useState({state:"idle"}),[Fc,_c]=g.useState(!0),[kc,E]=g.useState(!1),th=g.useRef(!1),[hh,uh]=g.useState(()=>Vt()),[Hh,Lc]=g.useState(()=>Oc());g.useEffect(()=>{queueMicrotask(()=>{let c=x(),m=B()?.id;C(c),f(m),$(xt()),Q(Fh()),X(Jt()),_c(!1)})},[]);let Rt=rt[Ot]??rt[0],Ht=Rt.key,Qc=N[Ht],ch=a.length>0,Kt=ch,Kh=g.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Copy ~/.claude/ tokens, settings, skills, agents, plugins."}]:[],{value:"activate",label:"Set active provider (Global)",description:J?`Currently: ${a.find((c)=>c.id===J)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!Kt},{value:"activate-project",label:"Set active provider (Project)",description:A?`Currently: ${a.find((c)=>c.id===A)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!Kt},...R?[{value:"clear-project-override",label:"Clear project provider override",description:A?"Stop overriding for this project; fall back to global":"Project override points to a missing profile; clear it"}]:[],{value:"edit",label:"Edit provider",description:"Update URL, model, or key",disabled:!ch},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!Kt},...Sh?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[Kt,ch,Sh,hh,J,A,a]),nh=g.useCallback(()=>{if(o()){H.current+=1,Yt(!1),kt(void 0);return}let c=++H.current;(async()=>{let m=await Lh();if(c!==H.current)return;Yt(Boolean(m?.apiKey||m?.accessToken||m?.refreshToken||m?.idToken)),kt(m?.profileId)})()},[]);g.useEffect(()=>{return nh(),()=>{H.current+=1}},[nh]),g.useEffect(()=>{if(V!=="select-ollama-model")return;let c=!1;return Gt({state:"loading"}),(async()=>{let m=await wc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)Gt({state:"unavailable",message:wa(m,N.baseUrl)});return}let l=rh(m.models,"balanced"),r=cu(m.models,"balanced");if(!c)Gt({state:"ready",defaultValue:r?.name??l[0]?.name,options:l.map((b)=>({label:b.name,value:b.name,description:b.summary}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-atomic-chat-model")return;let c=!1;return St({state:"loading"}),(async()=>{let m=await rc({baseUrl:N.baseUrl});if(m.state!=="ready"){if(!c)St({state:"unavailable",message:ra(m,N.baseUrl)});return}if(!c)St({state:"ready",defaultValue:m.models[0],options:m.models.map((l)=>({label:l,value:l}))})})(),()=>{c=!0}},[N.baseUrl,V]),g.useEffect(()=>{if(V!=="select-openai-model")return;let c=!1;return vt({state:"loading"}),(async()=>{let m=await Cc({baseUrl:N.baseUrl,apiKey:N.apiKey||void 0});if(c)return;if(!m||m.length===0){vt({state:"unavailable",message:"Couldn't list models from this provider. Enter the model id manually, or go back to check the base URL and API key."});return}let{options:l,defaultValue:r}=lc(m,N.model);vt({state:"ready",options:l,defaultValue:r})})(),()=>{c=!0}},[N.baseUrl,N.apiKey,V]);function K(){if(th.current)return;th.current=!0,queueMicrotask(()=>{let c=x();C(c),f(B()?.id),$(xt()),Q(Fh()),X(Jt()),nh(),th.current=!1})}function At(){return null}function ah(c){if(c.activationWarning)return`${c.prefix}. Saved for next startup. Warning: ${c.warnings.join("; ")}.`;if(c.warnings.length>0)return`${c.prefix}. Claudin switched to it for this session with warnings: ${c.warnings.join("; ")}.`;return`${c.prefix}. Claudin switched to it for this session.`}async function mh(c){if(c?.accessToken&&c.accountId)return null;let m=await Lh();if(!m)return"stored Codex OAuth credentials could not be loaded";if(!m.accountId)return"stored Codex OAuth credentials are missing a ChatGPT account id";return null}function Wh(){yc()}async function Nc(c){let m="provider";E(!0),Y("Activating provider...");try{await new Promise((ht)=>queueMicrotask(ht));let l=Jt(),r=nt(c);if(!r){_("Could not change active provider."),E(!1),L();return}let b=l?B()??r:r,q=$t(b.model)||Dt();if(!l)u((ht)=>({...ht,mainLoopModel:q,mainLoopModelForSession:null}));m=r.name;let k=At(),d=vu(r,_t),T=d?await mh():null;K();let U=l&&b.id!==r.id?` (project override still active — this project keeps using ${b.name}; use "Clear project provider override" to apply the new default here)`:"",W=d?ah({prefix:`Active provider: ${r.name}${U}`,activationWarning:T,warnings:[T,k?`could not clear startup provider override (${k})`:null].filter((ht)=>Boolean(ht))}):k?`Active provider: ${r.name}${U}. Warning: could not clear startup provider override (${k}).`:`Active provider: ${r.name}${U}`;Y(W),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:q,message:`Provider switched to ${r.name} (${q})`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish activating ${m}: ${r}`),L()}}async function Jc(){E(!0),Y("Clearing project provider override...");try{await new Promise((m)=>queueMicrotask(m)),_h(null),K();let c=B();if(c){let m=$t(c.model)||Dt();ft(),u((l)=>({...l,mainLoopModel:m,mainLoopModelForSession:null})),Y(`Project override cleared. Using global default: ${c.name}.`),E(!1),h({action:"activated",activeProfileId:c.id,activeProviderName:c.name,activeProviderModel:m,message:`Project override cleared — using ${c.name} (${m})`}),L()}else Y("Project provider override cleared. No global default set."),E(!1),h({action:"saved",message:"Project provider override cleared. No global default set."}),L()}catch(c){K(),Y(void 0),E(!1);let m=c instanceof Error?c.message:String(c);_(`Could not clear project provider override: ${m}`),L()}}async function Vc(c){let m="provider";E(!0),Y("Setting provider for this project...");try{await new Promise((W)=>queueMicrotask(W));let l=xt(),r=_h(c);if(!r){_("Could not set project provider override."),E(!1),L();return}let b=$t(r.model)||Dt();if(l===r.id)ft();u((W)=>({...W,mainLoopModel:b,mainLoopModelForSession:null})),m=r.name;let q=At(),k=vu(r,_t),d=k?await mh():null;K();let T=`Active provider for this project: ${r.name}. Other projects keep the global default.`,U=k?ah({prefix:T,activationWarning:d,warnings:[d,q?`could not clear startup provider override (${q})`:null].filter((W)=>Boolean(W))}):q?`${T} Warning: could not clear startup provider override (${q}).`:T;Y(U),E(!1),h({action:"activated",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:b,message:`Provider switched to ${r.name} (${b}) for this project`}),L()}catch(l){K(),Y(void 0),E(!1);let r=l instanceof Error?l.message:String(l);_(`Could not finish setting ${m} for this project: ${r}`),L()}}function L(){fc("done"),O("menu")}function Wt(c){h({action:"cancelled",message:c})}function ih(c){let m=ot(c),l={name:m.name,baseUrl:m.baseUrl,model:m.model,apiKey:m.apiKey??""};if(i(null),mt(m.provider??"openai"),P(l),dt({}),st(""),Yh(c),p(0),Ft(0),s(l.name.length),_(void 0),c==="ollama"){Gt({state:"loading"}),O("select-ollama-model");return}if(c==="atomic-chat"){St({state:"loading"}),O("select-atomic-chat-model");return}if(c==="anthropic"){O("anthropic-auth-choice");return}if(c==="bedrock"||c==="vertex"||c==="foundry"){O("cloud-extras");return}O("form")}function Zc(c){let m=a.find((r)=>r.id===c);if(!m)return;let l=ca(m);i(c),mt(m.provider??"openai"),P(l),dt({awsRegion:m.extras?.awsRegion,gcpProject:m.extras?.gcpProject,gcpRegion:m.extras?.gcpRegion,azureResource:m.extras?.azureResource}),st(ma(m.extras?.customHeaders)),Yh(null),p(0),Ft(0),s(l.name.length),_(void 0),O("form")}function it(c=N){let m=ya(Zt,dh),l={provider:Z,name:c.name,baseUrl:c.baseUrl,model:c.model,apiKey:c.apiKey,extras:m},r=wt?ct(wt,l):ut(l,{makeActive:!0});if(!r){_("Could not save provider. Fill all required fields.");return}let b=B()?.id===r.id;if(b)ft(),u((U)=>({...U,mainLoopModel:$t(r.model),mainLoopModelForSession:null}));let q=b?At():null;K();let k=!wt&&Jt()&&!b,d=k?B()?.name??"override target":null,T=wt?`Updated provider: ${r.name}`:k?`Added provider: ${r.name} (now global default — project keeps using ${d}; use "Clear project provider override" to apply here)`:`Added provider: ${r.name} (now active)`;if(Y(q?`${T}. Warning: could not clear startup provider override (${q}).`:T),t==="first-run"){h({action:"saved",activeProfileId:r.id,message:`Provider configured: ${r.name}`});return}i(null),p(0),_(void 0),L()}function dc(){if(v.state==="loading"||v.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),n(y,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(v.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Atomic Chat setup"}),n(y,{dimColor:!0,children:v.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),n(y,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),n(S,{options:v.options,defaultValue:v.defaultValue,defaultFocusValue:v.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,v.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function Yc(){if(e.state==="loading"||e.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Checking Ollama"}),n(y,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(e.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Ollama setup"}),n(y,{dimColor:!0,children:e.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(c)=>{if(c==="manual"){p(0),s(N.name.length),O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:2})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose an Ollama model"}),n(y,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),n(S,{options:e.options,defaultValue:e.defaultValue,defaultFocusValue:e.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,e.options.length),onChange:(c)=>{let m={...N,model:c};P(m),it(m)},onCancel:()=>O("select-preset")})]})}function gt(c){let m=rt.findIndex((l)=>l.key===c);p(m<0?0:m),s(N[c].length),_(void 0),O("form")}function Gc(){if(tt.state==="loading"||tt.state==="idle")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Fetching models"}),n(y,{dimColor:!0,children:"Looking for models on your OpenAI-compatible provider…"}),n(y,{dimColor:!0,children:"Press Esc to enter the model manually."})]});if(tt.state==="unavailable")return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:tt.message}),n(S,{options:[{value:"manual",label:"Enter manually",description:"Type the model id yourself"},{value:"back",label:"Back",description:"Return to the API key step"}],onChange:(l)=>{if(l==="manual"){gt("model");return}gt("apiKey")},onCancel:()=>gt("apiKey"),visibleOptionCount:2})]});let c=[...tt.options,{value:$h,label:"Enter a model id manually",description:"Type an id the provider did not list"}],m=tt.defaultValue??$h;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Choose a model"}),n(y,{dimColor:!0,children:"Models from your OpenAI-compatible provider."}),n(S,{options:c,defaultValue:m,defaultFocusValue:m,inlineDescriptions:!0,visibleOptionCount:Math.min(8,c.length),onChange:(l)=>{if(l===$h){gt("model");return}let r={...N,model:l};P(r),Mh(r)},onCancel:()=>gt("apiKey")}),n(y,{dimColor:!0,children:"Enter to select · Esc to go back"})]})}function Mh(c){if(et==="anthropic"||et==="custom"){P(c),O("custom-headers");return}it(c)}function Sc(c){let m=c.trim();if(!Rt.optional&&m.length===0){_(`${Rt.label} is required.`);return}let l={...N,[Ht]:m};if(P(l),_(void 0),Ot<rt.length-1){let r=Ot+1,b=rt[r]?.key??"name";if(b==="model"&&!pn.has(Z)&&l.baseUrl.trim().length>0){O("select-openai-model");return}p(r),s(l[b].length);return}Mh(l)}function Hc(){if(_(void 0),Ot>0){let c=Ot-1,m=rt[c]?.key??"name";p(c),s(N[m].length);return}if(t==="first-run"){O("select-preset");return}L()}D("confirm:no",Hc,{context:"Settings",isActive:V==="form"}),D("confirm:no",()=>gt("model"),{context:"Settings",isActive:V==="select-openai-model"&&(tt.state==="loading"||tt.state==="idle")});function Kc(){if(_(void 0),bt>0){Ft(bt-1);return}O("select-preset")}D("confirm:no",Kc,{context:"Settings",isActive:V==="cloud-extras"}),D("confirm:no",()=>O("form"),{context:"Settings",isActive:V==="custom-headers"}),D("confirm:no",()=>O("select-preset"),{context:"Settings",isActive:V==="anthropic-auth-choice"||V==="anthropic-oauth"||V==="kimi-auth-choice"}),D("confirm:no",()=>O("kimi-auth-choice"),{context:"Settings",isActive:V==="kimi-oauth"});function Wc(){let c=!o(),m=[...hh?[{value:"import-legacy",label:"Import from Claude Code",description:"Reuse ~/.claude/ tokens, settings, theme, MCP, skills, agents, plugins."}]:[],{value:"dashscope-intl",label:"Alibaba Coding Plan",description:"Alibaba DashScope International endpoint"},{value:"dashscope-cn",label:"Alibaba Coding Plan (China)",description:"Alibaba DashScope China endpoint"},{value:"anthropic",label:"Anthropic",description:"Native Claude API (x-api-key auth)"},{value:"atomic-chat",label:"Atomic Chat",description:"Local Model Provider"},{value:"azure-openai",label:"Azure OpenAI",description:"Azure OpenAI endpoint (model=deployment name)"},{value:"foundry",label:"Azure AI Foundry",description:"Anthropic models hosted on Azure AI Foundry (resource-scoped)"},{value:"bedrock",label:"AWS Bedrock",description:"Anthropic models on AWS Bedrock (region-scoped, AWS creds)"},{value:"bankr",label:"Bankr",description:"Bankr LLM Gateway (OpenAI-compatible)"},{value:"cloudflare-workers-ai",label:"Cloudflare Workers AI",description:"Cloudflare Workers AI (OpenAI-compatible); set your account ID in the base URL"},{value:"cloudflare-ai-gateway",label:"Cloudflare AI Gateway",description:"Cloudflare AI Gateway unified endpoint; set your account ID in the base URL"},...c?[{value:"codex-oauth",label:"Codex OAuth",description:"Sign in with ChatGPT in your browser and store Codex credentials securely"},{value:"xai-oauth",label:"xAI / Grok (OAuth)",description:"Sign in with xAI in your browser and store Grok credentials securely"}]:[],{value:"github-onboard",label:"GitHub Copilot",description:"Sign in with GitHub in your browser to use Copilot models"},{value:"deepseek",label:"DeepSeek",description:"DeepSeek OpenAI-compatible endpoint"},{value:"gemini",label:"Google Gemini",description:"Gemini OpenAI-compatible endpoint"},{value:"vertex",label:"Google Vertex AI",description:"Anthropic models on Vertex AI (project + region, ADC)"},{value:"groq",label:"Groq",description:"Groq OpenAI-compatible endpoint"},{value:"lmstudio",label:"LM Studio",description:"Local LM Studio endpoint"},{value:"minimax",label:"MiniMax",description:"MiniMax API endpoint"},{value:"mistral",label:"Mistral",description:"Mistral OpenAI-compatible endpoint"},{value:"moonshotai",label:"Moonshot AI",description:"API key or Kimi Code OAuth sign-in"},{value:"nvidia-nim",label:"NVIDIA NIM",description:"NVIDIA NIM endpoint"},{value:"opencode-go",label:"OpenCode GO",description:"OpenCode GO OpenAI-compatible endpoint"},{value:"opencode-zen",label:"OpenCode Zen",description:"OpenCode Zen OpenAI-compatible endpoint"},{value:"ollama",label:"Ollama",description:"Local or remote Ollama endpoint"},{value:"openai",label:"OpenAI",description:"OpenAI API with API key"},{value:"openrouter",label:"OpenRouter",description:"OpenRouter OpenAI-compatible endpoint"},{value:"together",label:"Together AI",description:"Together chat/completions endpoint"},{value:"zai",label:"Z.AI (GLM Coding Plan)",description:"Z.AI GLM Coding Plan (OpenAI-compatible)"},{value:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...t==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:t==="first-run"?"Set up provider":"Choose provider preset"}),n(y,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),n(S,{options:m,onChange:(l)=>{if(l==="skip"){Wt("Provider setup skipped");return}if(l==="codex-oauth"){O("codex-oauth");return}if(l==="xai-oauth"){O("xai-oauth");return}if(l==="moonshotai"){O("kimi-auth-choice");return}if(l==="github-onboard"){O("github-onboard");return}if(l==="import-legacy"){(async()=>{let r=await Vh({force:!0});uh(Vt()),K();let b=jt(r);if(r.errors.length>0){_(b);return}let q=B();if(t==="first-run"&&q){h({action:"saved",activeProfileId:q.id,activeProviderName:q.name,activeProviderModel:q.model,message:b});return}if(Y(b),_(void 0),t==="manage")L()})();return}ih(l)},onCancel:()=>{if(t==="first-run"){Wt("Provider setup skipped");return}L()},visibleOptionCount:Math.min(13,m.length)})]})}function ic(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Claude, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste an x-api-key value (sk-ant-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("anthropic-oauth");return}if(c==="apiKey"){O("form");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Mc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Moonshot AI — choose authentication"}),n(y,{dimColor:!0,children:"Sign in with your Kimi Code subscription in the browser, or paste a Moonshot AI API key."}),n(S,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Kimi Code, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste a Moonshot AI API key (sk-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(c)=>{if(c==="oauth"){O("kimi-oauth");return}if(c==="apiKey"){ih("moonshotai");return}O("select-preset")},onCancel:()=>O("select-preset"),visibleOptionCount:3})]})}function Tc(){let c=(xn(),Gn(In)).ConsoleOAuthFlow;return n(F,{flexDirection:"column",gap:1,children:n(c,{mode:"login",onDone:()=>{let m=ot("anthropic"),l={provider:"anthropic",name:m.name,baseUrl:m.baseUrl,model:m.model},r=za(x(),m.baseUrl),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("OAuth completed, but the Anthropic profile could not be saved."),O("select-preset");return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("OAuth completed, but the Anthropic profile could not be set as the startup provider."),O("select-preset");return}let k=`Anthropic OAuth configured: ${q.name}`;if(K(),t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}})})}function Uc(){let c=et;if(c!=="bedrock"&&c!=="vertex"&&c!=="foundry")return null;let m=Ca[c],l=m[bt]??m[0],r=Zt[l.key]??"";function b(q){let k=q.trim();if(k.length===0){_(`${l.label} is required.`);return}let d={...Zt,[l.key]:k};if(dt(d),_(void 0),bt<m.length-1){Ft(bt+1);return}Ft(0),O("form")}return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:`${c==="bedrock"?"AWS Bedrock":c==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),n(y,{dimColor:!0,children:l.helpText}),z(y,{dimColor:!0,children:["Step ",bt+1," of ",m.length,": ",l.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:r,onChange:(q)=>dt((k)=>({...k,[l.key]:q})),onSubmit:b,focus:!0,showCursor:!0,placeholder:`${l.placeholder}${qt.ellipsis}`,columns:80,cursorOffset:Rc,onChangeCursorOffset:Ac})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Ec(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Custom headers (optional)"}),z(y,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",n(y,{children:"Header: Value"}),". Leave empty to skip."]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:dh,onChange:st,onSubmit:()=>it(N),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:gc,onChangeCursorOffset:Xc})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}function Pc(){return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:wt?"Edit provider profile":"Create provider profile"}),n(y,{dimColor:!0,children:Rt.helpText}),z(y,{dimColor:!0,children:["Provider type:"," ",Z==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),z(y,{dimColor:!0,children:["Step ",Ot+1," of ",rt.length,": ",Rt.label]}),z(F,{flexDirection:"row",gap:1,children:[n(y,{children:qt.pointer}),n(Xt,{value:Qc,onChange:(c)=>P((m)=>({...m,[Ht]:c})),onSubmit:Sc,focus:!0,showCursor:!0,placeholder:`${Rt.placeholder}${qt.ellipsis}`,mask:Ht==="apiKey"?"*":void 0,columns:80,cursorOffset:qc,onChangeCursorOffset:s})]}),zt&&n(y,{color:"error",children:zt}),n(y,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Bc(){let c=a.length>0,m=c;return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Provider manager"}),n(y,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),Gh&&n(y,{children:Gh}),n(F,{flexDirection:"column",children:a.length===0?n(y,{dimColor:!0,children:"No provider profiles configured yet."}):a.map((l)=>z(y,{dimColor:!0,children:["- ",l.name,": ",la(l,l.id===w)]},l.id))}),n(S,{options:Kh,onChange:(l)=>{switch(_(void 0),l){case"add":O("select-preset");break;case"import-legacy":{(async()=>{let r=await Vh({force:!0});if(uh(Vt()),K(),r.errors.length>0)_(jt(r));else Y(jt(r))})();break}case"activate":if(m)O("select-active");break;case"activate-project":if(m)O("select-active-project");break;case"clear-project-override":Jc();break;case"edit":if(c)O("select-edit");break;case"delete":if(m)O("select-delete");break;case"logout-codex-oauth":{let r=Qh();if(!r.success){_(r.warning??"Could not clear Codex OAuth credentials.");break}Yt(!1),kt(void 0);let b=fh(x(),_t),q=null;if(b){let k=kh(b.id);if(!k.removed){_("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),K();break}Wh(),q=k.activeProfileId?At():null}K(),Y(q?`Codex OAuth logged out. Warning: could not clear startup provider override (${q}).`:"Codex OAuth logged out.");break}default:Wt("Provider manager closed");break}},onCancel:()=>Wt("Provider manager closed"),defaultFocusValue:$c,visibleOptionCount:Kh.length})]})}function Mt(c,m,l){let r=a.map((b)=>{let q=[];if(b.id===w)q.push("active");if(A&&b.id===A)q.push("this project");if(J&&b.id===J)q.push("global default");let k=q.length>0?` (${q.join(", ")})`:"";return{value:b.id,label:`${b.name}${k}`,description:`${b.provider==="anthropic"?"anthropic":"openai-compatible"} · ${b.baseUrl} · ${b.model}`}});if(r.length===0)return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(y,{dimColor:!0,children:m}),n(S,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>L(),onCancel:()=>L(),visibleOptionCount:1})]});return z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:c}),n(S,{options:r,onChange:l,onCancel:()=>L(),visibleOptionCount:Math.min(10,Math.max(2,r.length))})]})}let G;switch(V){case"select-preset":G=Wc();break;case"select-ollama-model":G=Yc();break;case"select-openai-model":G=Gc();break;case"select-atomic-chat-model":G=dc();break;case"codex-oauth":G=n(Ra,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:sn,baseUrl:hc,model:en,apiKey:""},r=fh(x(),_t),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Codex OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Codex OAuth login finished, but the provider could not be set as the startup provider."),L();return}m({profileId:b.id});let k=At(),d=await mh(c);Yt(!0),kt(b.id),K();let T=[d,k?`could not clear startup provider override (${k})`:null].filter((W)=>Boolean(W)),U=ah({prefix:"Codex OAuth configured",activationWarning:d,warnings:T});if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:U});return}Y(U),_(void 0),L()}});break;case"xai-oauth":G=n(Aa,{onBack:()=>O("select-preset"),onConfigured:async(c,m)=>{let l={provider:"openai",name:vn,baseUrl:pt,model:ta,apiKey:""},r=Oa(x(),Jh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("xAI OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("xAI OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="xAI / Grok configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"kimi-auth-choice":G=Mc();break;case"kimi-oauth":G=n(ga,{onBack:()=>O("kimi-auth-choice"),onConfigured:async(c,m)=>{let l={provider:"openai",name:ha,baseUrl:Zh,model:ua,apiKey:""},r=ba(x(),Nh()?.profileId),b=r?ct(r.id,l):ut(l,{makeActive:!0});if(!b){_("Kimi Code OAuth login finished, but the provider profile could not be saved."),L();return}let q=r&&w!==b.id?nt(b.id):b;if(!q){_("Kimi Code OAuth login finished, but the provider could not be set as the startup provider."),L();return}try{m({profileId:b.id})}catch(d){_(d instanceof Error?d.message:String(d)),L();return}K();let k="Kimi Code configured. Claudin switched to it for this session.";if(t==="first-run"){h({action:"saved",activeProfileId:q.id,message:k});return}Y(k),_(void 0),L()}});break;case"github-onboard":G=n(vh,{onDone:(c)=>{if(c)Y(c),_(void 0);K(),L()},onBack:()=>O("select-preset"),onChangeAPIKey:K});break;case"anthropic-auth-choice":G=ic();break;case"anthropic-oauth":G=Tc();break;case"cloud-extras":G=Uc();break;case"custom-headers":G=Ec();break;case"form":G=Pc();break;case"select-active":G=Mt("Set active provider (Global)","No providers available. Add one first.",(c)=>{Nc(c)});break;case"select-active-project":G=Mt("Set active provider (Project)","No providers available. Add one first.",(c)=>{Vc(c)});break;case"select-edit":G=Mt("Edit provider","No providers available. Add one first.",(c)=>{Zc(c)});break;case"select-delete":G=Mt("Delete provider","No providers available. Add one first.",(c)=>{let m=a.find((W)=>W.id===c),l=m?.provider==="openai"&&m?.extras?.githubToken!==void 0,r=fh(a,_t)?.id===c,b=Jh()?.profileId,q=m?.provider==="openai"&&m.baseUrl===pt&&!m.apiKey&&b===c,k=Nh()?.profileId,d=m?.provider==="openai"&&m.baseUrl===Zh&&!m.apiKey&&k===c,T=B()?.id===c,U=kh(c);if(!U.removed)_("Could not delete provider.");else{let W=[];if(r){let M=Qh();if(!M.success)W.push(M.warning??"could not clear Codex OAuth credentials");else kt(void 0);Wh()}if(l){let M=cc();if(!M.success)W.push(M.warning??"could not clear GitHub Copilot token")}if(q){let M=mc();if(!M.success)W.push(M.warning??"could not clear xAI OAuth credentials")}if(d){let M=ac();if(!M.success)W.push(M.warning??"could not clear Kimi Code OAuth credentials")}let ht=U.activeProfileId?At():null;if(ht)W.push(`could not clear startup provider override (${ht})`);if(K(),T){let M=B();if(M)ft(),u((yh)=>({...yh,mainLoopModel:$t(M.model),mainLoopModelForSession:null}));else ft(),u((yh)=>({...yh,mainLoopModel:null,mainLoopModelForSession:null}))}Y(W.length>0?`Provider deleted. Warning: ${W.join("; ")}.`:"Provider deleted")}L()});break;case"menu":default:G=Bc();break}return z(uc,{color:"permission",children:[n(zc,{enabled:Hh,onDismiss:(c)=>{uh(Vt()),Lc(!1),K();let m=B();if(c==="migrated"&&t==="first-run"&&m)h({action:"saved",activeProfileId:m.id,activeProviderName:m.name,activeProviderModel:m.model})}}),Hh?null:Fc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Loading providers..."}),n(y,{dimColor:!0,children:"Reading provider profiles from disk."})]}):kc?z(F,{flexDirection:"column",gap:1,children:[n(y,{color:"remember",bold:!0,children:"Activating provider..."}),n(y,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):G]})}var g,rt,$h="\x00__manual__",pn,sn="Codex OAuth",en="codexplan",vn="xAI / Grok (OAuth)",ta="grok-4",ha="Moonshot AI",ua,Zh="https://api.kimi.com/coding/v1",Ca;var Xa=I(()=>{Sn();tu();Kn();Eh();Mn();Pn();Dn();Xu();Et();Hn();Wn();Un();Th();ph();En();nu();au();Bn();Tn();on();sh();fu();Ku();eu();Su();pu();Pu();jn();Tt();g=Lt(Qt(),1),rt=[{key:"name",label:"Provider name",placeholder:"e.g. Ollama Home, OpenAI Work",helpText:"A short label shown in /provider and startup setup."},{key:"baseUrl",label:"Base URL",placeholder:"e.g. http://localhost:11434/v1",helpText:"API base URL used for this provider profile."},{key:"apiKey",label:"API key",placeholder:"Leave empty if your provider does not require one",helpText:"Optional. Press Enter with empty value to skip.",optional:!0},{key:"model",label:"Default model",placeholder:"e.g. llama3.1:8b or glm-4.7; glm-4.7-flash",helpText:'Model name(s) to use. Separate multiple with ";" or ","; first is default.'}],pn=new Set(["anthropic","bedrock","vertex","foundry"]),ua=nc;Ca={bedrock:[{key:"awsRegion",label:"AWS region",placeholder:"e.g. us-east-1",helpText:"Region of your Bedrock-enabled AWS account. Credentials are picked up from the AWS SDK chain."}],vertex:[{key:"gcpProject",label:"GCP project ID",placeholder:"e.g. my-project-123456",helpText:"Google Cloud project where Vertex AI is enabled. Credentials are picked up from ADC."},{key:"gcpRegion",label:"GCP region",placeholder:"e.g. us-central1",helpText:"Vertex AI region for the model."}],foundry:[{key:"azureResource",label:"Azure resource",placeholder:"e.g. my-foundry-resource",helpText:"Name of your Azure AI Foundry resource. Credentials are picked up from DefaultAzureCredential."}]}});
50
+ export{wh as Ac,au as Bc,aa as Cc,Vm as Dc,Xa as Ec};
@@ -0,0 +1,2 @@
1
+ import{kd as z,ld as K}from"./cli-1.0.10-3m372s1z.mjs";import{uK as w,wK as J}from"./cli-1.0.10-wqjsz7wa.mjs";import{T3 as H}from"./cli-1.0.10-jd706hep.mjs";import{Zra as E,bsa as G}from"./cli-1.0.10-byd1s52c.mjs";function V(q,v,k){return B.useMemo(()=>{let D=w(k,v);return z(q,D,k.mode)},[q,v,k,!1,!1])}var B;var N=G(()=>{J();K();B=E(H(),1)});
2
+ export{V as gd,N as hd};
@@ -0,0 +1,2 @@
1
+ import{asa as Q,bsa as U}from"./cli-1.0.10-byd1s52c.mjs";var w={};Q(w,{default:()=>x,createSupportsColor:()=>K});import M from"node:process";import V from"node:os";import O from"node:tty";function z(q,B=globalThis.Deno?globalThis.Deno.args:M.argv){let D=q.startsWith("-")?"":q.length===1?"-":"--",E=B.indexOf(D+q),G=B.indexOf("--");return E!==-1&&(G===-1||E<G)}function X(){if(!("FORCE_COLOR"in j))return;if(j.FORCE_COLOR==="true")return 1;if(j.FORCE_COLOR==="false")return 0;if(j.FORCE_COLOR.length===0)return 1;let q=Math.min(Number.parseInt(j.FORCE_COLOR,10),3);if(![0,1,2,3].includes(q))return;return q}function Z(q){if(q===0)return!1;return{level:q,hasBasic:!0,has256:q>=2,has16m:q>=3}}function $(q,{streamIsTTY:B,sniffFlags:D=!0}={}){let E=X();if(E!==void 0)H=E;let G=D?H:E;if(G===0)return 0;if(D){if(z("color=16m")||z("color=full")||z("color=truecolor"))return 3;if(z("color=256"))return 2}if("TF_BUILD"in j&&"AGENT_NAME"in j)return 1;if(q&&!B&&G===void 0)return 0;let J=G||0;if(j.TERM==="dumb")return J;if(M.platform==="win32"){let A=V.release().split(".");if(Number(A[0])>=10&&Number(A[2])>=10586)return Number(A[2])>=14931?3:2;return 1}if("CI"in j){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((A)=>(A in j)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((A)=>(A in j))||j.CI_NAME==="codeship")return 1;return J}if("TEAMCITY_VERSION"in j)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(j.TEAMCITY_VERSION)?1:0;if(j.COLORTERM==="truecolor")return 3;if(j.TERM==="xterm-kitty")return 3;if(j.TERM==="xterm-ghostty")return 3;if(j.TERM==="wezterm")return 3;if("TERM_PROGRAM"in j){let A=Number.parseInt((j.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(j.TERM_PROGRAM){case"iTerm.app":return A>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(j.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(j.TERM))return 1;if("COLORTERM"in j)return 1;return J}function K(q,B={}){let D=$(q,{streamIsTTY:q&&q.isTTY,...B});return Z(D)}var j,H,b,x;var L=U(()=>{({env:j}=M);if(z("no-color")||z("no-colors")||z("color=false")||z("color=never"))H=0;else if(z("color")||z("colors")||z("color=true")||z("color=always"))H=1;b={stdout:K({isTTY:O.isatty(1)}),stderr:K({isTTY:O.isatty(2)})},x=b});
2
+ export{K as Kra,w as Lra,L as Mra};