claude-code-best 2.7.0 → 2.7.2

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 (887) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-V2tF7iCY.js +1 -0
  2. package/dist/chunks/App-DLdRpU7c.js +1 -0
  3. package/dist/chunks/ApproveApiKey-B7_TCGwt.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DPws3jax.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-D6rS0OVe.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-hGlbm5z5.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-CuEpdRVd.js +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-CTTKMRbt.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-B-GkVoA_.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-DxJK9NiM.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-LPZ97jsm.js +1 -0
  12. package/dist/chunks/DesktopHandoff-BjPylhOT.js +1 -0
  13. package/dist/chunks/DevChannelsDialog-c4YVqBX9.js +1 -0
  14. package/dist/chunks/DiffDialog-I5wuXw2C.js +3 -0
  15. package/dist/chunks/Doctor-Cr_MlSPc.js +3 -0
  16. package/dist/chunks/Doctor-hgf3dMAW.js +1 -0
  17. package/dist/chunks/ExitFlow-Bz5grDWv.js +2 -0
  18. package/dist/chunks/Feedback-COgMI5tY.js +2 -0
  19. package/dist/chunks/Grove-Bwmghb-e.js +1 -0
  20. package/dist/chunks/Grove-m57x4tY1.js +11 -0
  21. package/dist/chunks/HybridTransport-Bok4-Ptt.js +4 -0
  22. package/dist/chunks/ITermBackend-BBSP-NNa.js +1 -0
  23. package/dist/chunks/InvalidConfigDialog-uTSuSBvO.js +1 -0
  24. package/dist/chunks/InvalidSettingsDialog-B-Os12-H.js +1 -0
  25. package/dist/chunks/MCPConnectionManager-y97Inszc.js +1 -0
  26. package/dist/chunks/McpParsingWarnings-DMFUZw92.js +1 -0
  27. package/dist/chunks/MessageSelector-DwdAC2io.js +3 -0
  28. package/dist/chunks/Messages-FEBcX-cT.js +11 -0
  29. package/dist/chunks/Onboarding-B8qMJaBh.js +1 -0
  30. package/dist/chunks/OverageCreditUpsell-DnFv5z-z.js +1 -0
  31. package/dist/chunks/PluginSettings-B_xVgTTp.js +17 -0
  32. package/dist/chunks/PromptInputFooterSuggestions-DhIQ0Nge.js +1 -0
  33. package/dist/chunks/PromptInputHelpMenu-CoMkWchC.js +1 -0
  34. package/dist/chunks/QueryEngine-C7r7O-hH.js +1 -0
  35. package/dist/chunks/REPL-CmJdJrGO.js +147 -0
  36. package/dist/chunks/REPL-nP7H_-qa.js +1 -0
  37. package/dist/chunks/RemoteCallout-4JOZROfT.js +1 -0
  38. package/dist/chunks/RemoteSessionManager-jcPnywfY.js +2 -0
  39. package/dist/chunks/ResumeConversation-CZ2Uedkf.js +1 -0
  40. package/dist/chunks/SSETransport-kEH_p4Yq.js +4 -0
  41. package/dist/chunks/SearchExtraToolsTool-C64oVFUD.js +1 -0
  42. package/dist/chunks/SentryErrorBoundary-2E2qGV11.js +1 -0
  43. package/dist/chunks/SentryErrorBoundary-97iY7Nb7.js +2 -0
  44. package/dist/chunks/Settings-CuljH0mu.js +2 -0
  45. package/dist/chunks/TeleportProgress-Ctdqi7iS.js +1 -0
  46. package/dist/chunks/TeleportRepoMismatchDialog-DyTBg1YD.js +1 -0
  47. package/dist/chunks/TeleportResumeWrapper-B66clYsG.js +1 -0
  48. package/dist/chunks/ThemePicker-WKmYvrqz.js +1 -0
  49. package/dist/chunks/TmuxBackend-OKX2NP14.js +9 -0
  50. package/dist/chunks/TrustDialog-0anSIf-G.js +1 -0
  51. package/dist/chunks/TungstenTool-B40YHYXC.js +1 -0
  52. package/dist/chunks/ValidationErrorsList-CfgC1KJb.js +2 -0
  53. package/dist/chunks/WelcomeV2-BMHXiNt3.js +1 -0
  54. package/dist/chunks/WindowsTerminalBackend-fCSGVe4W.js +2 -0
  55. package/dist/chunks/add-dir-CMtuW667.js +1 -0
  56. package/dist/chunks/agentDisplay-CgYKW3G7.js +1 -0
  57. package/dist/chunks/agents-CdqcGm9o.js +103 -0
  58. package/dist/chunks/agents-D90TsYOf.js +2 -0
  59. package/dist/chunks/ant-DZjimiuz.js +1 -0
  60. package/dist/chunks/api-CQWbpxLP.js +1 -0
  61. package/dist/chunks/api-quOYYOhi.js +1 -0
  62. package/dist/chunks/asciicast-C_1Pi99k.js +4 -0
  63. package/dist/chunks/asciicast-DA6TudSH.js +1 -0
  64. package/dist/chunks/assistant-B5_xx00q.js +1 -0
  65. package/dist/chunks/assistant-CEmC_DlU.js +1 -0
  66. package/dist/chunks/assistant-CyVcFPIR.js +1 -0
  67. package/dist/chunks/auth-CjtaiRtF.js +1 -0
  68. package/dist/chunks/auth-DsQEVs9W.js +1 -0
  69. package/dist/chunks/autoMode-DEbM9UaE.js +45 -0
  70. package/dist/chunks/autonomy-Clap6Swl.js +1 -0
  71. package/dist/chunks/autonomy-lNpGnyiu.js +19 -0
  72. package/dist/chunks/autonomyPanel-BqEvfI0e.js +1 -0
  73. package/dist/chunks/backgroundHousekeeping-D-jt-ocx.js +1 -0
  74. package/dist/chunks/backgroundHousekeeping-KvOpP_4M.js +17 -0
  75. package/dist/chunks/banner-D9Cq292T.js +2 -0
  76. package/dist/chunks/bg-CngkAkgc.js +1 -0
  77. package/dist/chunks/bg-DgpgS_VU.js +9 -0
  78. package/dist/chunks/branch-CSYB04xC.js +3 -0
  79. package/dist/chunks/break-cache-DrIa8RdW.js +8 -0
  80. package/dist/chunks/bridge-DDgASypO.js +2 -0
  81. package/dist/chunks/bridgeConfig-BdZVEqhx.js +1 -0
  82. package/dist/chunks/bridgeConfig-DjC4oig1.js +1 -0
  83. package/dist/chunks/bridgeEnabled-Csn6Ym3k.js +1 -0
  84. package/dist/chunks/bridgeEnabled-DLRIH243.js +1 -0
  85. package/dist/chunks/bridgeMain-B5wsmwkN.js +68 -0
  86. package/dist/chunks/bridgeMain-BN0Sag35.js +1 -0
  87. package/dist/chunks/bridgeMessaging-ChOzzVWj.js +1 -0
  88. package/dist/chunks/bridgePointer-Clcvh52n.js +1 -0
  89. package/dist/chunks/browser-Bt-ckCaU.js +1 -0
  90. package/dist/chunks/btw-BgjcOoeo.js +1 -0
  91. package/dist/chunks/buddy-C1wE3noR.js +3 -0
  92. package/dist/chunks/bypassPermissionsKillswitch-C0diGLRB.js +1 -0
  93. package/dist/chunks/caches-CIoVGP24.js +3 -0
  94. package/dist/chunks/caches-DMYdTEAr.js +1 -0
  95. package/dist/chunks/ccrClient-C1msT1E3.js +1 -0
  96. package/dist/chunks/changeDetector-DoOBZOt1.js +1 -0
  97. package/dist/chunks/channelNotification-CWlu9ZWs.js +1 -0
  98. package/dist/chunks/channelNotification-oZ6vG5R5.js +1 -0
  99. package/dist/chunks/chrome-Bo9uNZ7s.js +1 -0
  100. package/dist/chunks/chromeNativeHost-BldB1Zzi.js +1 -0
  101. package/dist/chunks/claudeDesktop-BqTW_pbB.js +1 -0
  102. package/dist/chunks/cleanup-rCLlo4w8.js +1 -0
  103. package/dist/chunks/clear-BxdX_MUP.js +1 -0
  104. package/dist/chunks/cliLaunch-Citfs01Q.js +1 -0
  105. package/dist/chunks/client-BSoJ_vaA.js +1 -0
  106. package/dist/chunks/color-CkzktPHt.js +1 -0
  107. package/dist/chunks/commands-hyVX9-Lh.js +1 -0
  108. package/dist/chunks/commitAttribution-BwT0TbYF.js +1 -0
  109. package/dist/chunks/commitAttribution-csu3NO7Y.js +2 -0
  110. package/dist/chunks/common-Bi4yZBkh.js +1 -0
  111. package/dist/chunks/common-Da57Qwms.js +1 -0
  112. package/dist/chunks/common-NEOWMwtB.js +1 -0
  113. package/dist/chunks/compact-DNGIVZRN.js +3 -0
  114. package/dist/chunks/companion-Diuav3lA.js +1 -0
  115. package/dist/chunks/completionCache-BQgiR45Q.js +1 -0
  116. package/dist/chunks/completionCache-C7hDqIDL.js +4 -0
  117. package/dist/chunks/config-B25IrkTA.js +1 -0
  118. package/dist/chunks/config-ODoYZY8i.js +1 -0
  119. package/dist/chunks/context-CZ5enuPE.js +1 -0
  120. package/dist/chunks/context-noninteractive-62P5EnN5.js +54 -0
  121. package/dist/chunks/context-noninteractive-CjuzL9q5.js +1 -0
  122. package/dist/chunks/conversation-DyhWeHw2.js +1 -0
  123. package/dist/chunks/conversation-uY-V0SNK.js +1 -0
  124. package/dist/chunks/copy-9JLr2-Xs.js +7 -0
  125. package/dist/chunks/createSSHSession-B1hTuDpB.js +6 -0
  126. package/dist/chunks/createSession-Qurw-N4x.js +1 -0
  127. package/dist/chunks/createSession-fzjzy0aS.js +1 -0
  128. package/dist/chunks/cron-DwR6OJuW.js +1 -0
  129. package/dist/chunks/cronJitterConfig-9OmmYmIT.js +6 -0
  130. package/dist/chunks/crossProjectResume-B6efoIur.js +40 -0
  131. package/dist/chunks/daemon-BRKR4D1D.js +2 -0
  132. package/dist/chunks/datadog-C-llbwzP.js +1 -0
  133. package/dist/chunks/datadog-SSxsxcC-.js +1 -0
  134. package/dist/chunks/desktop-CQnMcbex.js +1 -0
  135. package/dist/chunks/detached-C_2ZXr7X.js +5 -0
  136. package/dist/chunks/detectRepository-2ICvGD0U.js +1 -0
  137. package/dist/chunks/detectRepository-BLwSmun2.js +1 -0
  138. package/dist/chunks/detection-0mMj--Bt.js +1 -0
  139. package/dist/chunks/detection-95TCHkW8.js +1 -0
  140. package/dist/chunks/diff-uAwKYa51.js +1 -0
  141. package/dist/chunks/directoryCompletion-DqtWZsoW.js +1 -0
  142. package/dist/chunks/doctor-CBF0fkBF.js +1 -0
  143. package/dist/chunks/earlyInput-CFYRGxau.js +2 -0
  144. package/dist/chunks/earlyInput-D3OhUZ4G.js +1 -0
  145. package/dist/chunks/effort-F-bhAM2u.js +9 -0
  146. package/dist/chunks/entry-DHN_Gr1b.js +14 -0
  147. package/dist/chunks/env-C2A9gV_G.js +1 -0
  148. package/dist/chunks/envLessBridgeConfig-CDVtIEWT.js +1 -0
  149. package/dist/chunks/envLessBridgeConfig-Dg0hNsdi.js +1 -0
  150. package/dist/chunks/execFileNoThrow-azCkYhmF.js +1 -0
  151. package/dist/chunks/executor-BVh1PTF-.js +1561 -0
  152. package/dist/chunks/executor-CvTuHx-k.js +1 -0
  153. package/dist/chunks/exit-CqcvZJwI.js +1 -0
  154. package/dist/chunks/export-c6WoGlsG.js +2 -0
  155. package/dist/chunks/exportRenderer-CaegIP5N.js +1 -0
  156. package/dist/chunks/extra-usage-Cj8fokgc.js +1 -0
  157. package/dist/chunks/extra-usage-Dk-wcvAu.js +1 -0
  158. package/dist/chunks/extra-usage-core-sHzc4eE1.js +1 -0
  159. package/dist/chunks/extra-usage-noninteractive-D0kqrqsg.js +1 -0
  160. package/dist/chunks/extraUsage-CbkqfG1U.js +1 -0
  161. package/dist/chunks/extractMemories-BP8Opsbp.js +1 -0
  162. package/dist/chunks/fast-DS3iQ1CH.js +1 -0
  163. package/dist/chunks/fast-DklfqySb.js +1 -0
  164. package/dist/chunks/featureCheck-CUJ2rPM6.js +1 -0
  165. package/dist/chunks/feedback-QJynmG5q.js +1 -0
  166. package/dist/chunks/fileStateCache-BhVfo23e.js +1 -0
  167. package/dist/chunks/files-Bdr_PQyV.js +2 -0
  168. package/dist/chunks/findExecutable-BHQl4NaS.js +1 -0
  169. package/dist/chunks/firstPartyEventLogger-DlW8BUXq.js +1 -0
  170. package/dist/chunks/flushGate-CK5B9-Zn.js +1 -0
  171. package/dist/chunks/gates-6amRNsYl.js +1 -0
  172. package/dist/chunks/gates-vlrMjO-X.js +1 -0
  173. package/dist/chunks/gemini-B5ZRjDrh.js +1 -0
  174. package/dist/chunks/generateRecap-SgRMdsyN.js +1 -0
  175. package/dist/chunks/generateSessionName-sZFzpwsq.js +1 -0
  176. package/dist/chunks/genericProcessUtils-tJxf3yqB.js +23 -0
  177. package/dist/chunks/git-C0IuvuIy.js +6 -0
  178. package/dist/chunks/git-hSvFiuiG.js +1 -0
  179. package/dist/chunks/githubRepoPathMapping-DUGvTwPB.js +1 -0
  180. package/dist/chunks/goal-Dy-GGn9r.js +3 -0
  181. package/dist/chunks/grok-BG4_buNt.js +1 -0
  182. package/dist/chunks/growthbook-Br1dDRtd.js +1 -0
  183. package/dist/chunks/heapdump-B9PVKMxa.js +5 -0
  184. package/dist/chunks/help-BfWF7xij.js +1 -0
  185. package/dist/chunks/hooks-BVrhxysz.js +1 -0
  186. package/dist/chunks/hooks-KK32pxq3.js +79 -0
  187. package/dist/chunks/hostAdapter-TBJav3vX.js +1 -0
  188. package/dist/chunks/hostGuard-DSOEyH-P.js +1 -0
  189. package/dist/chunks/ide-BU1A79BE.js +2 -0
  190. package/dist/chunks/inboundAttachments-D4tBPCB8.js +1 -0
  191. package/dist/chunks/inboundAttachments-DWJplT9p.js +1 -0
  192. package/dist/chunks/initReplBridge-99sUBVEk.js +1 -0
  193. package/dist/chunks/insights-lDHodCMG.js +822 -0
  194. package/dist/chunks/install-Bg4ZgW81.js +1 -0
  195. package/dist/chunks/install-github-app-RLbUq5EL.js +147 -0
  196. package/dist/chunks/install-slack-app-CHmIwsbm.js +1 -0
  197. package/dist/chunks/instrumentation-BCiV3SKX.js +12 -0
  198. package/dist/chunks/job-xOGf0j5Q.js +2 -0
  199. package/dist/chunks/jwtUtils-BQXXBwqW.js +1 -0
  200. package/dist/chunks/keybindings-DMbReZ4p.js +2 -0
  201. package/dist/chunks/lang-A6LUGP_7.js +1 -0
  202. package/dist/chunks/language-Bzp5KDCE.js +1 -0
  203. package/dist/chunks/language-CGfURU2y.js +1 -0
  204. package/dist/chunks/launchAgentsPlatform-Dbpm7Jyo.js +1 -0
  205. package/dist/chunks/launchAutofixPr-RZfqx5eM.js +18 -0
  206. package/dist/chunks/launchLocalMemory-DIntbsvg.js +3 -0
  207. package/dist/chunks/launchLocalVault-CCUw0ayu.js +3 -0
  208. package/dist/chunks/launchMemoryStores-QJTh8KSP.js +1 -0
  209. package/dist/chunks/launchOnboarding--Pe30AYd.js +8 -0
  210. package/dist/chunks/launchSchedule-DjN1RbRX.js +1 -0
  211. package/dist/chunks/launchSkillStore-CcKmVDz1.js +1 -0
  212. package/dist/chunks/launchTeleport-BKlEo0yF.js +3 -0
  213. package/dist/chunks/launchVault-C7UHA-IG.js +1 -0
  214. package/dist/chunks/loadAgentsDir-ClTeo0nk.js +4697 -0
  215. package/dist/chunks/loadAgentsDir-CshktEpX.js +1 -0
  216. package/dist/chunks/loadPluginHooks-DVZmzYLl.js +1 -0
  217. package/dist/chunks/localSearch-BtLNJRij.js +1 -0
  218. package/dist/chunks/localSearch-Koc8naSr.js +1 -0
  219. package/dist/chunks/log-DSV4Ht5l.js +1 -0
  220. package/dist/chunks/login-BngE89_j.js +1 -0
  221. package/dist/chunks/login-C3MZQTDL.js +1 -0
  222. package/dist/chunks/logoV2Utils-DAIIwt5R.js +1 -0
  223. package/dist/chunks/logout-CXZBaUen.js +1 -0
  224. package/dist/chunks/magicDocs-C_inI3JJ.js +57 -0
  225. package/dist/chunks/main-CfkIGrBF.js +31 -0
  226. package/dist/chunks/main-qqcmncHA.js +1312 -0
  227. package/dist/chunks/mappers-7BSMbYvH.js +1 -0
  228. package/dist/chunks/mcp-DRBiobrN.js +2 -0
  229. package/dist/chunks/mcp-DV8Prhgi.js +1 -0
  230. package/dist/chunks/mcp-HQ8-nEZ1.js +6 -0
  231. package/dist/chunks/mcpServer-CLIYAgGs.js +1 -0
  232. package/dist/chunks/mcpServer-DS0yRfcu.js +1 -0
  233. package/dist/chunks/memoize-DJ1XCN-z.js +1 -0
  234. package/dist/chunks/memory-Cz_JaFLF.js +1 -0
  235. package/dist/chunks/mobile-BMglW1NB.js +2 -0
  236. package/dist/chunks/mode-Kx0kSZkr.js +2 -0
  237. package/dist/chunks/model-Bwvn_acH.js +1 -0
  238. package/dist/chunks/model-CNXtfiLg.js +1 -0
  239. package/dist/chunks/onChangeAppState-C4ic-Mib.js +1 -0
  240. package/dist/chunks/openai-CGGSfpPh.js +10 -0
  241. package/dist/chunks/overageCreditGrant-BqW_6R5v.js +1 -0
  242. package/dist/chunks/panel-BYfvo_mR.js +1 -0
  243. package/dist/chunks/panel-D3wvAEFE.js +1 -0
  244. package/dist/chunks/panelCall-DgPjuhQf.js +1 -0
  245. package/dist/chunks/parser-DGXE1uWd.js +1 -0
  246. package/dist/chunks/passes-sYE91Vtr.js +1 -0
  247. package/dist/chunks/path-BE28AJwZ.js +1 -0
  248. package/dist/chunks/paths-DO4WOQtD.js +36 -0
  249. package/dist/chunks/permissions-BE-1pIly.js +1 -0
  250. package/dist/chunks/permissions-BPerbf1I.js +3 -0
  251. package/dist/chunks/pipeTransport-CW9zF_UN.js +1 -0
  252. package/dist/chunks/plan-CDKBVRw6.js +1 -0
  253. package/dist/chunks/platform-mh9ypxS8.js +2 -0
  254. package/dist/chunks/plugin-C6US4b8W.js +1 -0
  255. package/dist/chunks/pluginAutoupdate-BQKtcAhC.js +1 -0
  256. package/dist/chunks/pluginBlocklist-B8DKXi0i.js +1 -0
  257. package/dist/chunks/pluginCliCommands-DWCeXYTl.js +1 -0
  258. package/dist/chunks/pluginFlagging-DFMlWw2P.js +1 -0
  259. package/dist/chunks/pluginOperations-CKmwDC3G.js +2 -0
  260. package/dist/chunks/pluginStartupCheck-D6IbyWKe.js +1 -0
  261. package/dist/chunks/pluginStartupCheck-cYnLsWOs.js +1 -0
  262. package/dist/chunks/plugins-BwZIRMh_.js +4 -0
  263. package/dist/chunks/policyLimits-CFLBtFh3.js +1 -0
  264. package/dist/chunks/pollConfig-C3NjXYFc.js +1 -0
  265. package/dist/chunks/poller-BA1jhG3F.js +1 -0
  266. package/dist/chunks/poor-BHhbua95.js +1 -0
  267. package/dist/chunks/poorMode-CCK7Ek5w.js +1 -0
  268. package/dist/chunks/poorMode-mtlnXU-z.js +1 -0
  269. package/dist/chunks/print-kxnXkqGc.js +39 -0
  270. package/dist/chunks/privacy-settings-DjY1annR.js +1 -0
  271. package/dist/chunks/processBashCommand-BrqLqSva.js +1 -0
  272. package/dist/chunks/processSlashCommand-DJGdVGbK.js +6 -0
  273. package/dist/chunks/projectContext-Cd7V9pES.js +1 -0
  274. package/dist/chunks/prompt-BZjXpviP.js +1 -0
  275. package/dist/chunks/prompt-CfM_xGPc.js +227 -0
  276. package/dist/chunks/prompt-CusKF4-p.js +1 -0
  277. package/dist/chunks/promptEditor-FI_ewCpV.js +4 -0
  278. package/dist/chunks/protocolHandler-B7ybKpgJ.js +13 -0
  279. package/dist/chunks/rate-limit-options-DPJMNNou.js +1 -0
  280. package/dist/chunks/rcDebugLog-CwU_wJBE.js +11 -0
  281. package/dist/chunks/referral-Da4mpbd3.js +1 -0
  282. package/dist/chunks/refresh-B6X4xb9r.js +1 -0
  283. package/dist/chunks/registerProtocol-D8fFnceq.js +36 -0
  284. package/dist/chunks/registry-y_z3pTg3.js +1 -0
  285. package/dist/chunks/release-notes--tnd4K56.js +4 -0
  286. package/dist/chunks/releaseNotes-BPA229-J.js +2 -0
  287. package/dist/chunks/reload-plugins-yQ7tEUVh.js +1 -0
  288. package/dist/chunks/remote-env-CER5UxTX.js +1 -0
  289. package/dist/chunks/remoteBridgeCore-Bi31i8gt.js +1 -0
  290. package/dist/chunks/remoteControlServer-oUAcWB4i.js +3 -0
  291. package/dist/chunks/rename-BTngRRZU.js +1 -0
  292. package/dist/chunks/renderOptions-Caca3bCd.js +1 -0
  293. package/dist/chunks/resume-DZHKfBmm.js +2 -0
  294. package/dist/chunks/ripgrep-Bzwdi5-K.js +5 -0
  295. package/dist/chunks/ripgrep-DEa1djpJ.js +1 -0
  296. package/dist/chunks/runtimeObserver-B4KekIF0.js +1 -0
  297. package/dist/chunks/runtimeObserver-BUOcYxiK.js +10 -0
  298. package/dist/chunks/sandbox-adapter-C--j-c76.js +1 -0
  299. package/dist/chunks/sandbox-toggle-DLBL7myN.js +1 -0
  300. package/dist/chunks/searchExtraTools-CBYp5XeI.js +1 -0
  301. package/dist/chunks/sentry-B7ZBc8fA.js +13 -0
  302. package/dist/chunks/session-DWYQk9YN.js +2 -0
  303. package/dist/chunks/sessionDiscovery-BP0nv36F.js +1 -0
  304. package/dist/chunks/sessionFileAccessHooks-DVilA3Mm.js +1 -0
  305. package/dist/chunks/sessionMemory-cMgcTxtP.js +1 -0
  306. package/dist/chunks/sessionMemory-pT4lc1C-.js +1 -0
  307. package/dist/chunks/sessionMemoryUtils-BgYf2OvX.js +1 -0
  308. package/dist/chunks/sessionObserver-CzyEF7mg.js +1 -0
  309. package/dist/chunks/sessionObserver-D4SV0Ar3.js +20 -0
  310. package/dist/chunks/sessionStorage-CXBgVAx-.js +1 -0
  311. package/dist/chunks/sessionStoragePortable-CJUZrbIq.js +3 -0
  312. package/dist/chunks/sessionTitle-CkrnWEW1.js +14 -0
  313. package/dist/chunks/sessionTracing-Caw-kvQr.js +11 -0
  314. package/dist/chunks/settingsSync-Dn_lGonC.js +1 -0
  315. package/dist/chunks/setup-DGkOT4DX.js +2 -0
  316. package/dist/chunks/setup-Dihjl7jo.js +9 -0
  317. package/dist/chunks/setup-II1titXI.js +1 -0
  318. package/dist/chunks/shadowedRuleDetection-DASW3j9H.js +1 -0
  319. package/dist/chunks/shellQuote-CBjhlaFO.js +1 -0
  320. package/dist/chunks/sideQuestion-C1qbLTAL.js +20 -0
  321. package/dist/chunks/sink-BSPyC453.js +1 -0
  322. package/dist/chunks/sink-CqOAfFlL.js +1 -0
  323. package/dist/chunks/sinks-BT_lBY6T.js +2 -0
  324. package/dist/chunks/sinks-CpuRIC3H.js +1 -0
  325. package/dist/chunks/skill-learning-kh0HKn6u.js +5 -0
  326. package/dist/chunks/skillChangeDetector-DQuNepIV.js +1 -0
  327. package/dist/chunks/skillGapStore-B1gUQXhE.js +5 -0
  328. package/dist/chunks/skillGapStore-CFmLJlYm.js +1 -0
  329. package/dist/chunks/skillGenerator-DIAwRpPg.js +8 -0
  330. package/dist/chunks/skillLearning-Bxu1Uzl-.js +1 -0
  331. package/dist/chunks/skillLearning-CxAbHYEk.js +1 -0
  332. package/dist/chunks/skillPanel-B9zJLHKV.js +28 -0
  333. package/dist/chunks/skillSearchPanel-C1O9sxYS.js +21 -0
  334. package/dist/chunks/skills-C6_3snFY.js +1 -0
  335. package/dist/chunks/sprites-59l7vF4l.js +1 -0
  336. package/dist/chunks/src-BGzuPZ5q.js +26 -0
  337. package/dist/chunks/src-kgpr3s-l.js +1 -0
  338. package/dist/chunks/startupProfiler-CAntGAbs.js +3 -0
  339. package/dist/chunks/startupProfiler-WtUzkMKV.js +1 -0
  340. package/dist/chunks/stats-BmGdg4nj.js +1 -0
  341. package/dist/chunks/status-KLPT7uYP.js +1 -0
  342. package/dist/chunks/statusNoticeHelpers-DuqyBY-N.js +1 -0
  343. package/dist/chunks/stdio-Cg20AQ5W.js +1 -0
  344. package/dist/chunks/stickers-DDAm--86.js +1 -0
  345. package/dist/chunks/stringUtils-KZoO4GUd.js +4 -0
  346. package/dist/chunks/subprocessEnv-D4Cbyl2J.js +1 -0
  347. package/dist/chunks/systemPromptSections-CVpefuSD.js +1 -0
  348. package/dist/chunks/tag-0vahEnrx.js +11 -0
  349. package/dist/chunks/tasks-zVPemGv7.js +1 -0
  350. package/dist/chunks/teamHelpers-B83RwCCC.js +1 -0
  351. package/dist/chunks/teamHelpers-CXAmvFco.js +1 -0
  352. package/dist/chunks/teammateModeSnapshot-AdUFmPGC.js +1 -0
  353. package/dist/chunks/teammateModeSnapshot-CdiglTzv.js +1 -0
  354. package/dist/chunks/teleport-D6PvdjPy.js +1 -0
  355. package/dist/chunks/templateJobs-Ox5ZTKjW.js +12 -0
  356. package/dist/chunks/terminalSetup-Dh70ynBX.js +1 -0
  357. package/dist/chunks/terminalSetup-hLCi-2uB.js +33 -0
  358. package/dist/chunks/theme-DxgUVq9C.js +1 -0
  359. package/dist/chunks/thinkback-C5vFU8dM.js +1 -0
  360. package/dist/chunks/thinkback-DWgU7Qhr.js +1 -0
  361. package/dist/chunks/thinkback-play-CDzY6Ux4.js +1 -0
  362. package/dist/chunks/tmux-DelKEjda.js +1 -0
  363. package/dist/chunks/toolEventObserver-DPoMAJwr.js +1 -0
  364. package/dist/chunks/toolEventObserver-jO6-mlFU.js +1 -0
  365. package/dist/chunks/toolPool-BmA-BnAq.js +1 -0
  366. package/dist/chunks/toolPool-Dgn1Clq8.js +1 -0
  367. package/dist/chunks/trustedDevice-CYR5AgSB.js +1 -0
  368. package/dist/chunks/trustedDevice-D35gYkBT.js +1 -0
  369. package/dist/chunks/tui-DoOiz2RW.js +6 -0
  370. package/dist/chunks/types-BCy5hsQR.js +1 -0
  371. package/dist/chunks/types-KeqFPzY5.js +17 -0
  372. package/dist/chunks/udsClient-CBF_cZFW.js +1 -0
  373. package/dist/chunks/ultrareviewCommand-o4GjzoXK.js +3 -0
  374. package/dist/chunks/undercover-B4xr62Ux.js +31 -0
  375. package/dist/chunks/undercover-nakrQDLh.js +1 -0
  376. package/dist/chunks/up-DaiW-V1N.js +12 -0
  377. package/dist/chunks/updateCCB-Cthn50OV.js +11 -0
  378. package/dist/chunks/upgrade-D4Id4ebd.js +1 -0
  379. package/dist/chunks/upgrade-DJTCV8sr.js +1 -0
  380. package/dist/chunks/upload-BFDXvdfb.js +1 -0
  381. package/dist/chunks/upstreamproxy-CLf1UaJv.js +11 -0
  382. package/dist/chunks/usage-Csbso5mD.js +1 -0
  383. package/dist/chunks/usage-DxudeFLL.js +1 -0
  384. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BHi41Ku_.js +1 -0
  385. package/dist/chunks/useMainLoopModel-CEqP4HOc.js +1 -0
  386. package/dist/chunks/useManagePlugins-BmS3Adja.js +1 -0
  387. package/dist/chunks/useMergedTools-wR6Bglqq.js +1 -0
  388. package/dist/chunks/useSearchInput-BhKAGgEN.js +1 -0
  389. package/dist/chunks/useSettingsErrors-CjK3P-Ki.js +1 -0
  390. package/dist/chunks/useTerminalSize-Du-EamDN.js +1 -0
  391. package/dist/chunks/useVoice-DP1hHBWA.js +1 -0
  392. package/dist/chunks/util-CMSErQoz.js +1 -0
  393. package/dist/chunks/utils-CAQfwbv8.js +1 -0
  394. package/dist/chunks/validatePlugin-_g0AqWZG.js +1 -0
  395. package/dist/chunks/vim-8y-2Q09k.js +1 -0
  396. package/dist/chunks/voice-BJAsr0K-.js +2 -0
  397. package/dist/chunks/voice-YtzCcIoM.js +8 -0
  398. package/dist/chunks/voiceModeEnabled-BD9GZhQ3.js +1 -0
  399. package/dist/chunks/voiceModeEnabled-DZbxaFIg.js +1 -0
  400. package/dist/chunks/voiceStreamSTT-B1T-8adN.js +1 -0
  401. package/dist/chunks/voiceStreamSTT-B39XaGOU.js +1 -0
  402. package/dist/chunks/web-tools-DVIvcP41.js +1 -0
  403. package/dist/chunks/windowsPaths-BeDSnJ23.js +2 -0
  404. package/dist/chunks/windowsPaths-ttHiMKpR.js +1 -0
  405. package/dist/chunks/workerRegistry-60_UCyc3.js +1 -0
  406. package/dist/chunks/worktree-DNK8NprA.js +1 -0
  407. package/dist/chunks/worktreeModeEnabled-RtizNgNg.js +1 -0
  408. package/dist/chunks/xml-CTdKuU6f.js +1 -0
  409. package/dist/cli.js +1 -1
  410. package/package.json +1 -1
  411. package/dist/chunks/AddWorkspaceDirectory-BqR8LhJq.js +0 -1
  412. package/dist/chunks/App-DkBMWXkK.js +0 -1
  413. package/dist/chunks/ApproveApiKey-5xd0lUV7.js +0 -1
  414. package/dist/chunks/ApproveApiKey-Dmr2VaVA.js +0 -1
  415. package/dist/chunks/AssistantSessionChooser-C7rigDkQ.js +0 -1
  416. package/dist/chunks/BackgroundTasksDialog-RtEwbumC.js +0 -2
  417. package/dist/chunks/BypassPermissionsModeDialog-7s3ULbNF.js +0 -1
  418. package/dist/chunks/ClaudeInChromeOnboarding-Bjv-sERa.js +0 -1
  419. package/dist/chunks/ClaudeMdExternalIncludesDialog-BTysDIlI.js +0 -1
  420. package/dist/chunks/ClaudeMdExternalIncludesDialog-DosNL91g.js +0 -1
  421. package/dist/chunks/ConsoleOAuthFlow-Cc1yaM-M.js +0 -1
  422. package/dist/chunks/DesktopHandoff-Cy89ZB_9.js +0 -1
  423. package/dist/chunks/DevChannelsDialog-ws8prcNK.js +0 -1
  424. package/dist/chunks/DiffDialog-BhqgxA7o.js +0 -3
  425. package/dist/chunks/Doctor-BWouB_9X.js +0 -1
  426. package/dist/chunks/Doctor-Ts5k8hn1.js +0 -3
  427. package/dist/chunks/ExitFlow-BBoImtT_.js +0 -2
  428. package/dist/chunks/Feedback-BVbSMBwY.js +0 -2
  429. package/dist/chunks/Grove-CTQrX7WO.js +0 -1
  430. package/dist/chunks/Grove-ZMHK4CBZ.js +0 -11
  431. package/dist/chunks/HybridTransport-B9g074Y1.js +0 -4
  432. package/dist/chunks/ITermBackend-DaFK8DOH.js +0 -1
  433. package/dist/chunks/InvalidConfigDialog-BkZkVKB4.js +0 -1
  434. package/dist/chunks/InvalidSettingsDialog-Lr60eQWj.js +0 -1
  435. package/dist/chunks/MCPConnectionManager-DmJ6dLOp.js +0 -1
  436. package/dist/chunks/McpParsingWarnings-CE2pQPXV.js +0 -1
  437. package/dist/chunks/MessageSelector-BT1FDbwv.js +0 -3
  438. package/dist/chunks/Messages-DT2gDtrJ.js +0 -11
  439. package/dist/chunks/Onboarding-DsqnXQel.js +0 -1
  440. package/dist/chunks/OverageCreditUpsell-UWtCrOmN.js +0 -1
  441. package/dist/chunks/PluginSettings-OJQz3d5V.js +0 -17
  442. package/dist/chunks/PromptInputFooterSuggestions-BImBB6Yk.js +0 -1
  443. package/dist/chunks/PromptInputHelpMenu-CblAb9vk.js +0 -1
  444. package/dist/chunks/QueryEngine-_re1pGHr.js +0 -1
  445. package/dist/chunks/REPL-eBTeslsR.js +0 -147
  446. package/dist/chunks/REPL-wIg0cBqS.js +0 -1
  447. package/dist/chunks/RemoteCallout-DMQai8_P.js +0 -1
  448. package/dist/chunks/RemoteSessionManager-DQmsHvj_.js +0 -2
  449. package/dist/chunks/ResumeConversation-D81hDeTl.js +0 -1
  450. package/dist/chunks/SSETransport-BbeM6bi9.js +0 -4
  451. package/dist/chunks/SearchExtraToolsTool-QbJQCWXd.js +0 -1
  452. package/dist/chunks/SentryErrorBoundary-BQJXHbWh.js +0 -2
  453. package/dist/chunks/SentryErrorBoundary-Cnw74oVG.js +0 -1
  454. package/dist/chunks/Settings-DiXc-_IG.js +0 -2
  455. package/dist/chunks/TeleportProgress-B3oRJlWH.js +0 -1
  456. package/dist/chunks/TeleportRepoMismatchDialog-GPuEipFy.js +0 -1
  457. package/dist/chunks/TeleportResumeWrapper-CcDuR6o9.js +0 -1
  458. package/dist/chunks/ThemePicker-BjSRjA_L.js +0 -1
  459. package/dist/chunks/TmuxBackend-BE3zsPKE.js +0 -9
  460. package/dist/chunks/TrustDialog-B6Qg0xUr.js +0 -1
  461. package/dist/chunks/TungstenTool-C5IqKVr0.js +0 -1
  462. package/dist/chunks/ValidationErrorsList-C5BoLiye.js +0 -2
  463. package/dist/chunks/WelcomeV2-BJAKZYz1.js +0 -1
  464. package/dist/chunks/WindowsTerminalBackend-BcwpxU2Q.js +0 -2
  465. package/dist/chunks/add-dir-OR7-VVcq.js +0 -1
  466. package/dist/chunks/agentDisplay-CMqTUh0A.js +0 -1
  467. package/dist/chunks/agents-DRtgUZ6t.js +0 -103
  468. package/dist/chunks/agents-EolUGDZB.js +0 -2
  469. package/dist/chunks/ant-Bgl31h7a.js +0 -1
  470. package/dist/chunks/api-BpQPVgif.js +0 -1
  471. package/dist/chunks/api-xFvB7WoB.js +0 -1
  472. package/dist/chunks/asciicast-CJObpRg9.js +0 -1
  473. package/dist/chunks/asciicast-Dr_Div_R.js +0 -4
  474. package/dist/chunks/assistant-CENsWvTb.js +0 -1
  475. package/dist/chunks/assistant-CHawoD04.js +0 -1
  476. package/dist/chunks/assistant-s7XNIA76.js +0 -1
  477. package/dist/chunks/auth-DX12yVM8.js +0 -1
  478. package/dist/chunks/auth-h6VL9BbC.js +0 -1
  479. package/dist/chunks/autoMode-BDzVqEPm.js +0 -45
  480. package/dist/chunks/autonomy-CeqOXzJl.js +0 -19
  481. package/dist/chunks/autonomy-D2YudQnH.js +0 -1
  482. package/dist/chunks/autonomyPanel-B0OQV4lv.js +0 -1
  483. package/dist/chunks/backgroundHousekeeping-CvHD981l.js +0 -17
  484. package/dist/chunks/backgroundHousekeeping-DMkk-QoZ.js +0 -1
  485. package/dist/chunks/banner-DNLUJFS_.js +0 -2
  486. package/dist/chunks/bg-D_H-uZDS.js +0 -9
  487. package/dist/chunks/bg-FtpmvQuT.js +0 -1
  488. package/dist/chunks/branch-D44HjlJp.js +0 -3
  489. package/dist/chunks/break-cache-ByJ7U2Ts.js +0 -8
  490. package/dist/chunks/bridge-4sldfa8u.js +0 -2
  491. package/dist/chunks/bridgeConfig-BM7iHryd.js +0 -1
  492. package/dist/chunks/bridgeConfig-CcCNsSBX.js +0 -1
  493. package/dist/chunks/bridgeEnabled-CYddgTU1.js +0 -1
  494. package/dist/chunks/bridgeEnabled-DoT2l1Oj.js +0 -1
  495. package/dist/chunks/bridgeMain-DaO51duk.js +0 -68
  496. package/dist/chunks/bridgeMain-Dc4-ZK69.js +0 -1
  497. package/dist/chunks/bridgeMessaging-IlSWKGmC.js +0 -1
  498. package/dist/chunks/bridgePointer-fFD_tbSk.js +0 -1
  499. package/dist/chunks/browser-DwnUS505.js +0 -1
  500. package/dist/chunks/btw-CrdUyRUP.js +0 -1
  501. package/dist/chunks/buddy-Ci0hdCf9.js +0 -3
  502. package/dist/chunks/bypassPermissionsKillswitch-BWOlc_sK.js +0 -1
  503. package/dist/chunks/caches-BHRJHGlc.js +0 -1
  504. package/dist/chunks/caches-CitduRKp.js +0 -3
  505. package/dist/chunks/ccrClient-yNKhQYnf.js +0 -1
  506. package/dist/chunks/changeDetector-B1tCH9Pa.js +0 -1
  507. package/dist/chunks/channelNotification-D8NPg8I8.js +0 -1
  508. package/dist/chunks/channelNotification-oE3eipDZ.js +0 -1
  509. package/dist/chunks/chrome-CwAwCY0V.js +0 -1
  510. package/dist/chunks/chromeNativeHost-63xqELw-.js +0 -1
  511. package/dist/chunks/claudeDesktop-CX1AsJie.js +0 -1
  512. package/dist/chunks/cleanup-C0gyKaOb.js +0 -1
  513. package/dist/chunks/clear-B5D08sZ0.js +0 -1
  514. package/dist/chunks/cliLaunch-8aeIk2ts.js +0 -1
  515. package/dist/chunks/client-un1k_6md.js +0 -1
  516. package/dist/chunks/color-BtVvrSvq.js +0 -1
  517. package/dist/chunks/commands--qEK1j9j.js +0 -1
  518. package/dist/chunks/commitAttribution-AEb-sE-t.js +0 -1
  519. package/dist/chunks/commitAttribution-HP_CWP0X.js +0 -2
  520. package/dist/chunks/common-BBRP_KzA.js +0 -1
  521. package/dist/chunks/common-BD4Q7osK.js +0 -1
  522. package/dist/chunks/common-C56I-_O3.js +0 -1
  523. package/dist/chunks/compact-BNhxD2UA.js +0 -3
  524. package/dist/chunks/companion-BlhNrZiL.js +0 -1
  525. package/dist/chunks/completionCache-BHSsdkBs.js +0 -1
  526. package/dist/chunks/completionCache-Daqaxlf3.js +0 -4
  527. package/dist/chunks/config-9z8716kz.js +0 -1
  528. package/dist/chunks/config-f8Cx16Z6.js +0 -1
  529. package/dist/chunks/context-BdOjhAmM.js +0 -1
  530. package/dist/chunks/context-noninteractive-CnaDbgvf.js +0 -54
  531. package/dist/chunks/context-noninteractive-DRM7gbFk.js +0 -1
  532. package/dist/chunks/conversation-B9pq-m4L.js +0 -1
  533. package/dist/chunks/conversation-DUxXVrGj.js +0 -1
  534. package/dist/chunks/copy-Cjl0-hg1.js +0 -7
  535. package/dist/chunks/createSSHSession-CYaHalxc.js +0 -6
  536. package/dist/chunks/createSession-DoR2K7ay.js +0 -1
  537. package/dist/chunks/createSession-VlSLvi7J.js +0 -1
  538. package/dist/chunks/cron-DiW7eIPP.js +0 -1
  539. package/dist/chunks/cronJitterConfig-DjSd7nvj.js +0 -6
  540. package/dist/chunks/crossProjectResume-CDWr5DFl.js +0 -40
  541. package/dist/chunks/daemon-FAp0WyY6.js +0 -2
  542. package/dist/chunks/datadog-CahWdK03.js +0 -1
  543. package/dist/chunks/datadog-DPkKCR8M.js +0 -1
  544. package/dist/chunks/desktop-y3mzgaWo.js +0 -1
  545. package/dist/chunks/detached-Brq3-vHi.js +0 -5
  546. package/dist/chunks/detectRepository-CSN3yxkq.js +0 -1
  547. package/dist/chunks/detectRepository-CbR0WgtE.js +0 -1
  548. package/dist/chunks/detection-BPPZCanO.js +0 -1
  549. package/dist/chunks/detection-DrdKrqbQ.js +0 -1
  550. package/dist/chunks/diff-hpp0dp6U.js +0 -1
  551. package/dist/chunks/directoryCompletion-DAc3u1K2.js +0 -1
  552. package/dist/chunks/doctor-B230p0R_.js +0 -1
  553. package/dist/chunks/earlyInput-BFcdUMaX.js +0 -2
  554. package/dist/chunks/earlyInput-vv9abU2L.js +0 -1
  555. package/dist/chunks/effort-D7i2v6vd.js +0 -9
  556. package/dist/chunks/entry-Du3gtq9o.js +0 -14
  557. package/dist/chunks/env-BH-OBzcA.js +0 -1
  558. package/dist/chunks/envLessBridgeConfig-CKD4eOEe.js +0 -1
  559. package/dist/chunks/envLessBridgeConfig-DI0ouryy.js +0 -1
  560. package/dist/chunks/execFileNoThrow-B_aZH_GP.js +0 -1
  561. package/dist/chunks/executor-BJb5d6mo.js +0 -1
  562. package/dist/chunks/executor-Dmn3RTuI.js +0 -1561
  563. package/dist/chunks/exit-fntBGxEC.js +0 -1
  564. package/dist/chunks/export-Dy9M7FnZ.js +0 -2
  565. package/dist/chunks/exportRenderer-Ckv4v0ye.js +0 -1
  566. package/dist/chunks/extra-usage-DLEvlKzs.js +0 -1
  567. package/dist/chunks/extra-usage-core-3KkeQSve.js +0 -1
  568. package/dist/chunks/extra-usage-noninteractive-DUezD54f.js +0 -1
  569. package/dist/chunks/extra-usage-pU11YXHS.js +0 -1
  570. package/dist/chunks/extraUsage-B-l-oe-7.js +0 -1
  571. package/dist/chunks/extractMemories-CXarlmZp.js +0 -1
  572. package/dist/chunks/fast-BzfzSH7K.js +0 -1
  573. package/dist/chunks/fast-CbLu_WYL.js +0 -1
  574. package/dist/chunks/featureCheck-p7OeCYzj.js +0 -1
  575. package/dist/chunks/feedback-DiyZIbov.js +0 -1
  576. package/dist/chunks/fileStateCache-C7-TxF8G.js +0 -1
  577. package/dist/chunks/files-DYvAZGxp.js +0 -2
  578. package/dist/chunks/firstPartyEventLogger-Dig8Mv7_.js +0 -1
  579. package/dist/chunks/flushGate-Ci3NHOV4.js +0 -1
  580. package/dist/chunks/gates-CtkQH6jy.js +0 -1
  581. package/dist/chunks/gates-xscCu8-N.js +0 -1
  582. package/dist/chunks/gemini-BCuY2aYj.js +0 -1
  583. package/dist/chunks/generateRecap-DA0SNyFR.js +0 -1
  584. package/dist/chunks/generateSessionName-BtQ4NGXP.js +0 -1
  585. package/dist/chunks/genericProcessUtils-D-78JZxz.js +0 -23
  586. package/dist/chunks/git-BZEgupMC.js +0 -1
  587. package/dist/chunks/git-DayFjsvj.js +0 -6
  588. package/dist/chunks/githubRepoPathMapping-C5RkiJWj.js +0 -1
  589. package/dist/chunks/goal-B6GHfd9J.js +0 -3
  590. package/dist/chunks/grok-DDM6xYuy.js +0 -1
  591. package/dist/chunks/growthbook-D-Po5Uxl.js +0 -1
  592. package/dist/chunks/heapdump-DHlUfpVV.js +0 -5
  593. package/dist/chunks/help-BulgC9m7.js +0 -1
  594. package/dist/chunks/hooks-D5AcFnD1.js +0 -1
  595. package/dist/chunks/hooks-jxIrev-X.js +0 -79
  596. package/dist/chunks/hostAdapter-BvraKy0o.js +0 -1
  597. package/dist/chunks/hostGuard-CWijeIyE.js +0 -1
  598. package/dist/chunks/ide-tx4qMFln.js +0 -2
  599. package/dist/chunks/inboundAttachments-C93Q7Dvt.js +0 -1
  600. package/dist/chunks/inboundAttachments-DxcFiX4f.js +0 -1
  601. package/dist/chunks/initReplBridge-BEldrf6f.js +0 -1
  602. package/dist/chunks/insights-HEsEDeCQ.js +0 -822
  603. package/dist/chunks/install-DRsM0bJO.js +0 -1
  604. package/dist/chunks/install-github-app-BVK5Z95c.js +0 -147
  605. package/dist/chunks/install-slack-app-DCw3O2J_.js +0 -1
  606. package/dist/chunks/instrumentation-DJ-R1s8C.js +0 -12
  607. package/dist/chunks/job-CUz_OGIq.js +0 -2
  608. package/dist/chunks/jwtUtils-DVyv2jab.js +0 -1
  609. package/dist/chunks/keybindings-Chr5nGBu.js +0 -2
  610. package/dist/chunks/lang-C7kJlPIh.js +0 -1
  611. package/dist/chunks/language-CQXwoDkI.js +0 -1
  612. package/dist/chunks/language-Lx3WlBN6.js +0 -1
  613. package/dist/chunks/launchAgentsPlatform-Fsslu42L.js +0 -1
  614. package/dist/chunks/launchAutofixPr-Cww8uS_5.js +0 -18
  615. package/dist/chunks/launchLocalMemory-BywmyvSJ.js +0 -3
  616. package/dist/chunks/launchLocalVault-BU3a5NV7.js +0 -3
  617. package/dist/chunks/launchMemoryStores-QUCODCJS.js +0 -1
  618. package/dist/chunks/launchOnboarding-BriZ0oIA.js +0 -8
  619. package/dist/chunks/launchSchedule-uLm7zt_B.js +0 -1
  620. package/dist/chunks/launchSkillStore-DMo2bV8X.js +0 -1
  621. package/dist/chunks/launchTeleport-DgQWSfXM.js +0 -3
  622. package/dist/chunks/launchVault-DfnBBFne.js +0 -1
  623. package/dist/chunks/loadAgentsDir-Br5fGLLI.js +0 -4697
  624. package/dist/chunks/loadAgentsDir-DDYPdQKP.js +0 -1
  625. package/dist/chunks/loadPluginHooks-C4soqr6g.js +0 -1
  626. package/dist/chunks/localSearch-CELyiWF6.js +0 -1
  627. package/dist/chunks/localSearch-DhZMcy5t.js +0 -1
  628. package/dist/chunks/log-DS97_rIr.js +0 -1
  629. package/dist/chunks/login-CvvIpkpq.js +0 -1
  630. package/dist/chunks/login-DjgITOAw.js +0 -1
  631. package/dist/chunks/logoV2Utils-BN_HrHSc.js +0 -1
  632. package/dist/chunks/logout-DOFJpZEJ.js +0 -1
  633. package/dist/chunks/magicDocs-2Zr7bYY_.js +0 -57
  634. package/dist/chunks/main-BafHJuKH.js +0 -31
  635. package/dist/chunks/main-D61CvHRy.js +0 -1312
  636. package/dist/chunks/mappers-BCiceNt3.js +0 -1
  637. package/dist/chunks/mcp-BV4m1Gbl.js +0 -2
  638. package/dist/chunks/mcp-CrAgAK9u.js +0 -1
  639. package/dist/chunks/mcp-DK4m73gO.js +0 -6
  640. package/dist/chunks/mcpServer-7zyXl9Wg.js +0 -1
  641. package/dist/chunks/mcpServer-sa9Z183j.js +0 -1
  642. package/dist/chunks/memoize-CPexXTP7.js +0 -1
  643. package/dist/chunks/memory-BrJPVgxn.js +0 -1
  644. package/dist/chunks/mobile-Cydobb55.js +0 -2
  645. package/dist/chunks/mode-Cr-NTlRa.js +0 -2
  646. package/dist/chunks/model-CCjuMV6k.js +0 -1
  647. package/dist/chunks/model-aJS_plgM.js +0 -1
  648. package/dist/chunks/onChangeAppState-C9EvI3EH.js +0 -1
  649. package/dist/chunks/openai-Cvb_-1A-.js +0 -10
  650. package/dist/chunks/overageCreditGrant-cGQilawd.js +0 -1
  651. package/dist/chunks/panel-ByW1omJn.js +0 -1
  652. package/dist/chunks/panel-DO_faHV-.js +0 -1
  653. package/dist/chunks/panelCall-DqZuxAf0.js +0 -1
  654. package/dist/chunks/parser-DbKSpFRq.js +0 -1
  655. package/dist/chunks/passes-DsrceO14.js +0 -1
  656. package/dist/chunks/path-nCzt96pE.js +0 -1
  657. package/dist/chunks/paths-DfGsIjPm.js +0 -39
  658. package/dist/chunks/permissions-CjPIu4IE.js +0 -3
  659. package/dist/chunks/permissions-Ps_D01ZB.js +0 -1
  660. package/dist/chunks/pipeTransport-C5u1K0wu.js +0 -1
  661. package/dist/chunks/plan-YjMAcn6g.js +0 -1
  662. package/dist/chunks/platform-DYZVoA9J.js +0 -2
  663. package/dist/chunks/plugin-Oux5bBQj.js +0 -1
  664. package/dist/chunks/pluginAutoupdate-Dl9U-fbk.js +0 -1
  665. package/dist/chunks/pluginBlocklist-BzI5DNeN.js +0 -1
  666. package/dist/chunks/pluginCliCommands-CExAcsaR.js +0 -1
  667. package/dist/chunks/pluginFlagging-BeqrbhgG.js +0 -1
  668. package/dist/chunks/pluginOperations-s0FQGOBm.js +0 -2
  669. package/dist/chunks/pluginStartupCheck-BVag9B-T.js +0 -1
  670. package/dist/chunks/pluginStartupCheck-BuorUEEf.js +0 -1
  671. package/dist/chunks/plugins-DTQHVJtY.js +0 -4
  672. package/dist/chunks/policyLimits-zoyF_6O4.js +0 -1
  673. package/dist/chunks/pollConfig-C19GiX7i.js +0 -1
  674. package/dist/chunks/poller-DADqVTWi.js +0 -1
  675. package/dist/chunks/poor-Bx5vvamq.js +0 -1
  676. package/dist/chunks/poorMode-BCoeB5zB.js +0 -1
  677. package/dist/chunks/poorMode-CTd_csCl.js +0 -1
  678. package/dist/chunks/print-UXl3rG8y.js +0 -39
  679. package/dist/chunks/privacy-settings-e43D9a4o.js +0 -1
  680. package/dist/chunks/processBashCommand-CvR9-gf8.js +0 -1
  681. package/dist/chunks/processSlashCommand-CB3wyAX7.js +0 -6
  682. package/dist/chunks/projectContext-D3_u80TY.js +0 -1
  683. package/dist/chunks/prompt-53lRY98R.js +0 -1
  684. package/dist/chunks/prompt-B8M-HLIS.js +0 -227
  685. package/dist/chunks/prompt-CooZNM1u.js +0 -1
  686. package/dist/chunks/promptEditor-CHiopfD7.js +0 -4
  687. package/dist/chunks/protocolHandler-DjivYn8H.js +0 -13
  688. package/dist/chunks/rate-limit-options-B-vndk5W.js +0 -1
  689. package/dist/chunks/rcDebugLog-BoroyfjB.js +0 -11
  690. package/dist/chunks/referral-DOqhciQu.js +0 -1
  691. package/dist/chunks/refresh-C8uLznwm.js +0 -1
  692. package/dist/chunks/registerProtocol-4lQ7O4Cc.js +0 -36
  693. package/dist/chunks/registry-q6v98JYd.js +0 -1
  694. package/dist/chunks/release-notes-C7JHshX3.js +0 -4
  695. package/dist/chunks/releaseNotes-CXY-xAja.js +0 -2
  696. package/dist/chunks/reload-plugins-DLS5lQcc.js +0 -1
  697. package/dist/chunks/remote-env-DhHea8yK.js +0 -1
  698. package/dist/chunks/remoteBridgeCore-BhOLhQIA.js +0 -1
  699. package/dist/chunks/remoteControlServer-CI0F83pg.js +0 -3
  700. package/dist/chunks/rename-DiKWWCzB.js +0 -1
  701. package/dist/chunks/renderOptions-DKe32LfM.js +0 -1
  702. package/dist/chunks/resume-DA4ToJFW.js +0 -2
  703. package/dist/chunks/runtimeObserver-BfVC8KK9.js +0 -1
  704. package/dist/chunks/runtimeObserver-DetZ5Tek.js +0 -10
  705. package/dist/chunks/sandbox-adapter-wh4cKN45.js +0 -1
  706. package/dist/chunks/sandbox-toggle-D8MgV0DT.js +0 -1
  707. package/dist/chunks/searchExtraTools-DbPpcAPw.js +0 -1
  708. package/dist/chunks/sentry-C3sL9nhF.js +0 -13
  709. package/dist/chunks/session-Bd-4QCqc.js +0 -2
  710. package/dist/chunks/sessionDiscovery-D_KPF86E.js +0 -1
  711. package/dist/chunks/sessionFileAccessHooks-COne5L2E.js +0 -1
  712. package/dist/chunks/sessionMemory-0Jqo1_MV.js +0 -1
  713. package/dist/chunks/sessionMemory-BDt_8bNB.js +0 -1
  714. package/dist/chunks/sessionMemoryUtils-BFIJ1nqF.js +0 -1
  715. package/dist/chunks/sessionObserver-CEky1SLb.js +0 -1
  716. package/dist/chunks/sessionObserver-CQxIKV8D.js +0 -20
  717. package/dist/chunks/sessionStorage-D1XhqZyW.js +0 -1
  718. package/dist/chunks/sessionStoragePortable-DJZ_6cL8.js +0 -3
  719. package/dist/chunks/sessionTitle-CB0ZEkS_.js +0 -14
  720. package/dist/chunks/sessionTracing-BIKXLTJZ.js +0 -11
  721. package/dist/chunks/settingsSync-pI3L3CeR.js +0 -1
  722. package/dist/chunks/setup-BSi50fkU.js +0 -1
  723. package/dist/chunks/setup-DjsmjRKQ.js +0 -2
  724. package/dist/chunks/setup-Dq0_SRA1.js +0 -9
  725. package/dist/chunks/shadowedRuleDetection-DvAjOOPL.js +0 -1
  726. package/dist/chunks/shellQuote-D8XPeqkc.js +0 -1
  727. package/dist/chunks/sideQuestion-BrTA8ooG.js +0 -20
  728. package/dist/chunks/sink-CqWxcRl9.js +0 -1
  729. package/dist/chunks/sink-Dkat5kH9.js +0 -1
  730. package/dist/chunks/sinks--frMI4-5.js +0 -2
  731. package/dist/chunks/sinks-CvPAVcMY.js +0 -1
  732. package/dist/chunks/skill-learning-2LV0yuwF.js +0 -5
  733. package/dist/chunks/skillChangeDetector-B5CGPl7e.js +0 -1
  734. package/dist/chunks/skillGapStore-Dc29T-OG.js +0 -1
  735. package/dist/chunks/skillGapStore-KzRf6Ezr.js +0 -5
  736. package/dist/chunks/skillGenerator-BdOHsgc4.js +0 -8
  737. package/dist/chunks/skillLearning-CdcVIG14.js +0 -1
  738. package/dist/chunks/skillLearning-DXWMxSA2.js +0 -1
  739. package/dist/chunks/skillPanel-zMY8o-86.js +0 -28
  740. package/dist/chunks/skillSearchPanel-l8aolUP8.js +0 -21
  741. package/dist/chunks/skills-BeMWJPup.js +0 -1
  742. package/dist/chunks/sprites-qel_EgTP.js +0 -1
  743. package/dist/chunks/src-BIPP3_mo.js +0 -26
  744. package/dist/chunks/src-DJXKJavk.js +0 -1
  745. package/dist/chunks/startupProfiler-CnDpob1v.js +0 -3
  746. package/dist/chunks/startupProfiler-TrMfE6Q4.js +0 -1
  747. package/dist/chunks/stats-CEBfahqM.js +0 -1
  748. package/dist/chunks/status-C9KXyfDk.js +0 -1
  749. package/dist/chunks/statusNoticeHelpers-CxoN9oDh.js +0 -1
  750. package/dist/chunks/stdio-BEEzuxaZ.js +0 -1
  751. package/dist/chunks/stickers-eHrGA1W5.js +0 -1
  752. package/dist/chunks/subprocessEnv-CggQWZCx.js +0 -1
  753. package/dist/chunks/systemPromptSections-DB93ZNWP.js +0 -1
  754. package/dist/chunks/tag-Dvl7Us9y.js +0 -11
  755. package/dist/chunks/tasks-BhiwUF0n.js +0 -1
  756. package/dist/chunks/teamHelpers-COQazluD.js +0 -1
  757. package/dist/chunks/teamHelpers-Mgfrv-Jf.js +0 -1
  758. package/dist/chunks/teammateModeSnapshot-8EWjlA-s.js +0 -1
  759. package/dist/chunks/teammateModeSnapshot-BV-P8s5r.js +0 -1
  760. package/dist/chunks/teleport-U5Zgqw3H.js +0 -1
  761. package/dist/chunks/templateJobs-C3idypN_.js +0 -12
  762. package/dist/chunks/terminalSetup-CmAEgt-5.js +0 -33
  763. package/dist/chunks/terminalSetup-mvAN4no7.js +0 -1
  764. package/dist/chunks/theme-BD2H4vJi.js +0 -1
  765. package/dist/chunks/thinkback-BOByXYp2.js +0 -1
  766. package/dist/chunks/thinkback-Dzu2mnNF.js +0 -1
  767. package/dist/chunks/thinkback-play-BX1K2UMY.js +0 -1
  768. package/dist/chunks/tmux-DruHFjDy.js +0 -1
  769. package/dist/chunks/toolEventObserver-B6cLV_dK.js +0 -1
  770. package/dist/chunks/toolEventObserver-i6it3p2_.js +0 -1
  771. package/dist/chunks/toolPool--2gNFbrz.js +0 -1
  772. package/dist/chunks/toolPool-dNV2JxUI.js +0 -1
  773. package/dist/chunks/trustedDevice-DY8OosTr.js +0 -1
  774. package/dist/chunks/trustedDevice-zya_Ml1N.js +0 -1
  775. package/dist/chunks/tui-KoYD82tT.js +0 -6
  776. package/dist/chunks/types-CQ1wrnQ0.js +0 -1
  777. package/dist/chunks/types-D5R26wwH.js +0 -17
  778. package/dist/chunks/udsClient-RkYuzeZC.js +0 -1
  779. package/dist/chunks/ultrareviewCommand-CCkKby4J.js +0 -3
  780. package/dist/chunks/undercover-CIutVLEO.js +0 -1
  781. package/dist/chunks/undercover-D9O2McNG.js +0 -31
  782. package/dist/chunks/up-BPM85EYl.js +0 -12
  783. package/dist/chunks/updateCCB-Bmn3Y63Y.js +0 -11
  784. package/dist/chunks/upgrade-D3rVOeHO.js +0 -1
  785. package/dist/chunks/upgrade-Dq3l14ZY.js +0 -1
  786. package/dist/chunks/upload-1PmElPfW.js +0 -1
  787. package/dist/chunks/upstreamproxy-BBTSJnad.js +0 -11
  788. package/dist/chunks/usage-B5G8FOZ3.js +0 -1
  789. package/dist/chunks/usage-VtTu7beE.js +0 -1
  790. package/dist/chunks/useMainLoopModel-CaQLIr1V.js +0 -1
  791. package/dist/chunks/useManagePlugins-BvoeOnqq.js +0 -1
  792. package/dist/chunks/useMergedTools-C133BfRp.js +0 -1
  793. package/dist/chunks/useSearchInput-CROB7AbC.js +0 -1
  794. package/dist/chunks/useSettingsErrors-DRxtFXoe.js +0 -1
  795. package/dist/chunks/useVoice-BQ9aSFJe.js +0 -1
  796. package/dist/chunks/util-BZnJgF79.js +0 -1
  797. package/dist/chunks/utils-4gsxQpga.js +0 -1
  798. package/dist/chunks/validatePlugin-DlrnBhPA.js +0 -1
  799. package/dist/chunks/vim-BXQCLoFJ.js +0 -1
  800. package/dist/chunks/voice-CeRmLRHT.js +0 -2
  801. package/dist/chunks/voice-QHyDff3f.js +0 -8
  802. package/dist/chunks/voiceModeEnabled-Bq_rttkL.js +0 -1
  803. package/dist/chunks/voiceModeEnabled-CLAVCVLW.js +0 -1
  804. package/dist/chunks/voiceStreamSTT-BDKenO5F.js +0 -1
  805. package/dist/chunks/voiceStreamSTT-CL52x8wZ.js +0 -1
  806. package/dist/chunks/windowsPaths-43st5EQF.js +0 -1
  807. package/dist/chunks/windowsPaths-DerzGPcz.js +0 -2
  808. package/dist/chunks/workerRegistry-BUD3lBk_.js +0 -1
  809. package/dist/chunks/worktree-C0f9Ke-R.js +0 -1
  810. package/dist/chunks/worktreeModeEnabled-THQb19xR.js +0 -1
  811. package/dist/chunks/xml-DvVQHZ1N.js +0 -1
  812. /package/dist/chunks/{Dialog-DYFGqyDs.js → Dialog-91X6ZGg9.js} +0 -0
  813. /package/dist/chunks/{InProcessTransport-B0mmAoxw.js → InProcessTransport-B9II3BiO.js} +0 -0
  814. /package/dist/chunks/{ListItem-OFARanN7.js → ListItem-DCQhApdJ.js} +0 -0
  815. /package/dist/chunks/{PermissionDialog-5MlJf7ew.js → PermissionDialog-_WQPRYHQ.js} +0 -0
  816. /package/dist/chunks/{PressEnterToContinue-BdA9zDGs.js → PressEnterToContinue-BJ58eCFC.js} +0 -0
  817. /package/dist/chunks/{SearchBox-DfOmUoaI.js → SearchBox-CkO4rQ-9.js} +0 -0
  818. /package/dist/chunks/{TungstenTool-V-Bwqlx3.js → TungstenTool-CnAF4y0E.js} +0 -0
  819. /package/dist/chunks/{attributionHooks-DZJjA8p9.js → attributionHooks-VGSpz4mk.js} +0 -0
  820. /package/dist/chunks/{attributionTrailer-CZY9XTcr.js → attributionTrailer-C8uqiLIb.js} +0 -0
  821. /package/dist/chunks/{autoModeDenials-CGAtAGGf.js → autoModeDenials-DlO5g6E9.js} +0 -0
  822. /package/dist/chunks/{bedrockClient-DZgaJTHp.js → bedrockClient-BUmO2U-X.js} +0 -0
  823. /package/dist/chunks/{capacityWake-BXlUpptF.js → capacityWake-DtmDHwEt.js} +0 -0
  824. /package/dist/chunks/{ccshareResume-CZggHNOf.js → ccshareResume-DKwcd0Vc.js} +0 -0
  825. /package/dist/chunks/{computerUseLock-BoEK9xYv.js → computerUseLock-Diig5B8p.js} +0 -0
  826. /package/dist/chunks/{connectHeadless-KNT0Sg7Z.js → connectHeadless-ByewVfOb.js} +0 -0
  827. /package/dist/chunks/{constants-41VpZw2G.js → constants-BljlAJOX.js} +0 -0
  828. /package/dist/chunks/{controlMessageCompat-BJhFiS7u.js → controlMessageCompat-Ds-CF-sM.js} +0 -0
  829. /package/dist/chunks/{dangerousBackend-ByOAEFld.js → dangerousBackend-Dkjtndh1.js} +0 -0
  830. /package/dist/chunks/{debugUtils-CiEnbhiz.js → debugUtils-l8nsUZ6R.js} +0 -0
  831. /package/dist/chunks/{distRoot-CcxmnzqQ.js → distRoot-BNg_iO5-.js} +0 -0
  832. /package/dist/chunks/{escHotkey-DfdC44i7.js → escHotkey-D8WgbSyj.js} +0 -0
  833. /package/dist/chunks/{esm-C-1qL9Mn.js → esm-vlR7mK5b.js} +0 -0
  834. /package/dist/chunks/{eventLoopStallDetector-l83_98VR.js → eventLoopStallDetector-bYy0fesH.js} +0 -0
  835. /package/dist/chunks/{exit-_obETqBv.js → exit-DOBLl8jN.js} +0 -0
  836. /package/dist/chunks/{featureCheck-Cm0YNDXO.js → featureCheck-j7P30mry.js} +0 -0
  837. /package/dist/chunks/{fpsMetrics-DOI_SIeY.js → fpsMetrics-DKWp7vng.js} +0 -0
  838. /package/dist/chunks/{fuse-Bp7rmZ5x.js → fuse-D3B-UE5Y.js} +0 -0
  839. /package/dist/chunks/{hash-BRmOQc3c.js → hash-CaUkS-30.js} +0 -0
  840. /package/dist/chunks/{index.min-BJnb9GQI.js → index.min-BNgJ2wVD.js} +0 -0
  841. /package/dist/chunks/{instinctParser-Bxhe2LOF.js → instinctParser-DOtj1Kni.js} +0 -0
  842. /package/dist/chunks/{intl-Pse97ORk.js → intl-CLeE9DsD.js} +0 -0
  843. /package/dist/chunks/{launchCommand-Du91jxMC.js → launchCommand-9eYsPG7W.js} +0 -0
  844. /package/dist/chunks/{lazySchema-2sOku3cX.js → lazySchema-B0QShMaQ.js} +0 -0
  845. /package/dist/chunks/{lib-B4Q0Nrpb.js → lib-Cf16LgKj.js} +0 -0
  846. /package/dist/chunks/{lockfile-CeCEBLtN.js → lockfile-C3JsqLpb.js} +0 -0
  847. /package/dist/chunks/{modalContext-CmSKRyea.js → modalContext-c5Yqx_CQ.js} +0 -0
  848. /package/dist/chunks/{normalization-Cox8C0dP.js → normalization-BLfP0Kqt.js} +0 -0
  849. /package/dist/chunks/{observationStore-BaPq7CKI.js → observationStore-rLlDwRtG.js} +0 -0
  850. /package/dist/chunks/{openaiShared-Crt0cZLO.js → openaiShared-C-AuktRP.js} +0 -0
  851. /package/dist/chunks/{output-style-BkOnFmfe.js → output-style-B64-Zum6.js} +0 -0
  852. /package/dist/chunks/{parseConnectUrl-BFNiff4c.js → parseConnectUrl-DL390ePs.js} +0 -0
  853. /package/dist/chunks/{parser-BXWr_mLL.js → parser-aIWfAYnt.js} +0 -0
  854. /package/dist/chunks/{permissions-DXLfdE7b.js → permissions-BsVJvaEe.js} +0 -0
  855. /package/dist/chunks/{postCommitAttribution-CA9Z2sqn.js → postCommitAttribution-D8MoHFoz.js} +0 -0
  856. /package/dist/chunks/{projectContext-CwJlxP2Y.js → projectContext-Dn7umMp6.js} +0 -0
  857. /package/dist/chunks/{prompt-4tea6NJQ.js → prompt-IqfIbvg9.js} +0 -0
  858. /package/dist/chunks/{proxy-nPT6a6QY.js → proxy-CF7ZDxaW.js} +0 -0
  859. /package/dist/chunks/{rewind-DTk4TFYB.js → rewind-Djt1zU_3.js} +0 -0
  860. /package/dist/chunks/{rollback-DbSpxmJE.js → rollback-CtS4yEQx.js} +0 -0
  861. /package/dist/chunks/{sanitization-DD414_3t.js → sanitization-Ds6zRQyx.js} +0 -0
  862. /package/dist/chunks/{sdkHeapDumpMonitor-fNRF2fbK.js → sdkHeapDumpMonitor-DLMMNeqo.js} +0 -0
  863. /package/dist/chunks/{semver-Tw0AFar5.js → semver-Di5OaTd5.js} +0 -0
  864. /package/dist/chunks/{server-DTd90dmm.js → server-DONKdvGc.js} +0 -0
  865. /package/dist/chunks/{serverBanner-B7UaaCCl.js → serverBanner-DIyjgIM-.js} +0 -0
  866. /package/dist/chunks/{serverLog-DRvGpDtt.js → serverLog-D1N5yx8A.js} +0 -0
  867. /package/dist/chunks/{sessionDataUploader-BDsz_1Uy.js → sessionDataUploader-CsNePsOb.js} +0 -0
  868. /package/dist/chunks/{sessionManager-Bh-Z-YXy.js → sessionManager-BOmgJd1l.js} +0 -0
  869. /package/dist/chunks/{slashCommandParsing-Cari0pNg.js → slashCommandParsing-BfanVchF.js} +0 -0
  870. /package/dist/chunks/{sleep-8Eb9j_Ly.js → sleep-C6koP5Ka.js} +0 -0
  871. /package/dist/chunks/{src-x7u_sB6m.js → src-BWpNn6Yz.js} +0 -0
  872. /package/dist/chunks/{src-BRAdBA8A.js → src-C-Ho8kYe.js} +0 -0
  873. /package/dist/chunks/{src-BlLavFUS.js → src-Cu58IYYb.js} +0 -0
  874. /package/dist/chunks/{src-CI_jaaBj.js → src-d2UJ68oX.js} +0 -0
  875. /package/dist/chunks/{state-Ce1HlR-H.js → state-BiRT9RAF.js} +0 -0
  876. /package/dist/chunks/{staticRender-Br64h1E1.js → staticRender-C5v46np_.js} +0 -0
  877. /package/dist/chunks/{stdio-D4cT86R0.js → stdio-Oy68T2eE.js} +0 -0
  878. /package/dist/chunks/{store-DhI7Lcan.js → store-DYC8zeL1.js} +0 -0
  879. /package/dist/chunks/{subprocessEnv-DV6q6o6w.js → subprocessEnv-DIeTJ-xE.js} +0 -0
  880. /package/dist/chunks/{systemPromptSections-BcN_XBTx.js → systemPromptSections-DY7epA2Y.js} +0 -0
  881. /package/dist/chunks/{systemTheme-dDbitcxB.js → systemTheme-eRWGHYSL.js} +0 -0
  882. /package/dist/chunks/{teammate-DMYOtLTK.js → teammate-CbskW5G9.js} +0 -0
  883. /package/dist/chunks/{types-RJTEOuIt.js → types-C0nqJFkV.js} +0 -0
  884. /package/dist/chunks/{useKeybinding-FsOnjW6T.js → useKeybinding-DPOUuymz.js} +0 -0
  885. /package/dist/chunks/{workSecret-qRMNrQy2.js → workSecret-DJu7k30X.js} +0 -0
  886. /package/dist/chunks/{worktreeModeEnabled-Db6b_Iy_.js → worktreeModeEnabled-KtHEqeFA.js} +0 -0
  887. /package/dist/chunks/{xdg-CBxMmQux.js → xdg-BFD9ydDV.js} +0 -0
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{Ct as i,Rn as a,b as o,f as s,g as c,h as l,t as u,tt as d,wt as f,x as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{B as h,DC as g,EC as _,R as v,aS as y,dS as b,fS as x,oS as S,z as C}from"./loadAgentsDir-ClTeo0nk.js";import{t as w}from"./useKeybinding-DPOUuymz.js";import{r as T,t as E}from"./directoryCompletion-DqtWZsoW.js";import{r as D,t as O}from"./PromptInputFooterSuggestions-DhIQ0Nge.js";function k(){return(0,P.jsx)(o,{dimColor:!0,children:`Claude Code will be able to read files in this directory and make edits when auto-accept edits is on.`})}function A({path:e}){return(0,P.jsxs)(p,{flexDirection:`column`,paddingX:2,gap:1,children:[(0,P.jsx)(o,{color:`permission`,children:e}),(0,P.jsx)(k,{})]})}function j({value:e,onChange:t,onSubmit:n,error:i,suggestions:a,selectedSuggestion:s}){return(0,P.jsxs)(p,{flexDirection:`column`,children:[(0,P.jsx)(o,{children:`Enter the path to the directory:`}),(0,P.jsx)(p,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,P.jsx)(b,{showCursor:!0,placeholder:`Directory path${r.ellipsis}`,value:e,onChange:t,onSubmit:n,columns:80,cursorOffset:e.length,onChangeCursorOffset:()=>{}})}),a.length>0&&(0,P.jsx)(p,{marginBottom:1,children:(0,P.jsx)(O,{suggestions:a,selectedSuggestion:s})}),i&&(0,P.jsx)(o,{color:`error`,children:i})]})}function M({onAddDirectory:e,onCancel:t,permissionContext:n,directoryPath:r}){let[i,a]=(0,N.useState)(``),[u,m]=(0,N.useState)(null),[g,b]=(0,N.useState)([]),[x,S]=(0,N.useState)(0),C=(0,N.useMemo)(()=>F,[]),w=f((0,N.useCallback)(async e=>{if(!e){b([]),S(0);return}b(await E(e)),S(0)},[]),100);(0,N.useEffect)(()=>{w(i)},[i,w]);let T=(0,N.useCallback)(e=>{a(e.id+`/`),m(null)},[]),D=(0,N.useCallback)(async t=>{let r=await h(t,n);r.resultType===`success`?e(r.absolutePath,!1):m(v(r))},[n,e]);d(`confirm:no`,t,{context:`Settings`});let O=(0,N.useCallback)(e=>{if(g.length>0){if(e.key===`tab`){e.preventDefault();let t=g[x];t&&T(t);return}if(e.key===`return`){e.preventDefault();let t=g[x];t&&D(t.id+`/`);return}if(e.key===`up`||e.ctrl&&e.key===`p`){e.preventDefault(),S(e=>e<=0?g.length-1:e-1);return}if(e.key===`down`||e.ctrl&&e.key===`n`){e.preventDefault(),S(e=>e>=g.length-1?0:e+1);return}}},[g,x,T,D]),M=(0,N.useCallback)(n=>{if(r)switch(n){case`yes-session`:e(r,!1);break;case`yes-remember`:e(r,!0);break;case`no`:t();break}},[r,e,t]);return(0,P.jsx)(p,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:O,children:(0,P.jsx)(s,{title:`Add directory to workspace`,onCancel:t,color:`permission`,isCancelActive:!1,inputGuide:r?void 0:e=>e.pending?(0,P.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):(0,P.jsxs)(l,{children:[(0,P.jsx)(c,{shortcut:`Tab`,action:`complete`}),(0,P.jsx)(c,{shortcut:`Enter`,action:`add`}),(0,P.jsx)(_,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]}),children:r?(0,P.jsxs)(p,{flexDirection:`column`,gap:1,children:[(0,P.jsx)(A,{path:r}),(0,P.jsx)(y,{options:C,onChange:M,onCancel:()=>M(`no`)})]}):(0,P.jsxs)(p,{flexDirection:`column`,gap:1,marginX:2,children:[(0,P.jsx)(k,{}),(0,P.jsx)(j,{value:i,onChange:a,onSubmit:D,error:u,suggestions:g,selectedSuggestion:x})]})})})}var N,P,F,I=e((()=>{n(),a(),N=t(a(),1),i(),C(),x(),u(),w(),T(),g(),S(),D(),P=m(),F=[{value:`yes-session`,label:`Yes, for this session`},{value:`yes-remember`,label:`Yes, and remember this directory`},{value:`no`,label:`No`}]}));export{I as n,M as t};
@@ -0,0 +1 @@
1
+ import"./chunk-DR8-3Aex.js";import{Rn as e,S as t,t as n}from"./src-Di342QoJ.js";import{t as r}from"./jsx-runtime-D-D469L8.js";import{Cc as i,dc as a,yc as o}from"./paths-DO4WOQtD.js";import{cC as s,lC as c}from"./loadAgentsDir-ClTeo0nk.js";import{n as l}from"./onChangeAppState-C4ic-Mib.js";import{t as u}from"./fpsMetrics-DKWp7vng.js";import{t as d}from"./stats-BmGdg4nj.js";e(),c(),n(),o();var f=r();function p({getFpsMetrics:e,stats:n,initialState:r,children:o}){return(0,f.jsx)(u,{getFpsMetrics:e,children:(0,f.jsx)(d,{store:n,children:(0,f.jsx)(s,{initialState:r,onChangeAppState:l,children:(0,f.jsx)(t,{initialState:a().theme,onThemeSave:e=>i(t=>({...t,theme:e})),children:o})})})})}export{p as App};
@@ -0,0 +1 @@
1
+ import{t as e}from"./ApproveApiKey-DPws3jax.js";export{e as ApproveApiKey};
@@ -0,0 +1 @@
1
+ import"./chunk-DR8-3Aex.js";import{Rn as e,b as t,f as n,t as r}from"./src-Di342QoJ.js";import{t as i}from"./jsx-runtime-D-D469L8.js";import{Cc as a,yc as o}from"./paths-DO4WOQtD.js";import{Ry as s,aS as c}from"./loadAgentsDir-ClTeo0nk.js";e(),r(),o(),s();var l=i();function u({customApiKeyTruncated:e,onDone:r}){function i(t){switch(t){case`yes`:a(t=>({...t,customApiKeyResponses:{...t.customApiKeyResponses,approved:[...t.customApiKeyResponses?.approved??[],e]}})),r(!0);break;case`no`:a(t=>({...t,customApiKeyResponses:{...t.customApiKeyResponses,rejected:[...t.customApiKeyResponses?.rejected??[],e]}})),r(!1);break}}return(0,l.jsxs)(n,{title:`Detected a custom API key in your environment`,color:`warning`,onCancel:()=>i(`no`),children:[(0,l.jsxs)(t,{children:[(0,l.jsx)(t,{bold:!0,children:`ANTHROPIC_API_KEY`}),(0,l.jsxs)(t,{children:[`: sk-ant-...`,e]})]}),(0,l.jsx)(t,{children:`Do you want to use this API key?`}),(0,l.jsx)(c,{defaultValue:`no`,defaultFocusValue:`no`,options:[{label:`Yes`,value:`yes`},{label:(0,l.jsxs)(t,{children:[`No (`,(0,l.jsx)(t,{bold:!0,children:`recommended`}),`)`]}),value:`no`}],onChange:e=>i(e),onCancel:()=>i(`no`)})]})}export{u as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,d as r,f as i,nt as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{sS as l,uS as u}from"./loadAgentsDir-ClTeo0nk.js";import{t as d}from"./useKeybinding-DPOUuymz.js";import{t as f}from"./Dialog-91X6ZGg9.js";import{t as p}from"./ListItem-DCQhApdJ.js";var m=e(t(),1);o(),f(),p(),l(),d();var h=c();function g({sessions:e,onSelect:t,onCancel:o}){u(`assistant-session-chooser`);let[c,l]=(0,m.useState)(0);return a({"select:next":()=>l(t=>(t+1)%e.length),"select:previous":()=>l(t=>(t-1+e.length)%e.length),"select:accept":()=>t(e[c].id)},{context:`Select`}),(0,h.jsx)(i,{title:`Select Assistant Session`,onCancel:o,hideInputGuide:!0,children:(0,h.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,h.jsx)(n,{children:`Multiple sessions found. Select one to attach:`}),(0,h.jsx)(s,{flexDirection:`column`,children:e.map((e,t)=>(0,h.jsx)(r,{isFocused:c===t,children:(0,h.jsxs)(s,{children:[(0,h.jsx)(n,{children:e.title||e.id.slice(0,20)}),(0,h.jsxs)(n,{dimColor:!0,children:[` [`,e.status,`]`]})]})},e.id))}),(0,h.jsx)(n,{dimColor:!0,children:`↑↓ navigate · Enter select · Esc cancel`})]})})}export{g as AssistantSessionChooser};
@@ -0,0 +1,2 @@
1
+ import{a as e,n as t,o as n,r}from"./chunk-DR8-3Aex.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{B as o,F as s,Q as c,Rn as l,T as u,b as d,f,g as p,h as m,nt as h,t as g,x as _}from"./src-Di342QoJ.js";import{t as v}from"./jsx-runtime-D-D469L8.js";import{Ko as y,Ps as b}from"./paths-DO4WOQtD.js";import{S as x,U as S,_ as C,z as w}from"./debug-otxXY3j-.js";import{n as T,r as ee}from"./analytics-DqMQntaB.js";import{S as te,b as E,x as D}from"./teammate-CbskW5G9.js";import{C as O,E as k,d as ne,f as re,m as ie,x as A}from"./startupProfiler-CAntGAbs.js";import{l as j,o as M}from"./stringUtils-KZoO4GUd.js";import{A_ as N,Au as P,BE as ae,DT as oe,Du as se,Fj as ce,Hu as le,Ij as ue,In as de,Jy as F,Lv as fe,Mn as pe,Mu as me,Nv as he,OT as ge,Oo as _e,Ou as ve,Pn as ye,Qh as be,Qy as xe,Tv as Se,Uo as Ce,Vu as we,Xg as Te,Xu as Ee,Zg as De,Zo as Oe,Zu as ke,aS as Ae,bp as je,cb as Me,da as Ne,eg as Pe,eo as Fe,fC as Ie,j_ as Le,jn as Re,lC as ze,la as Be,lb as Ve,nC as He,oS as Ue,qy as I,rC as We,rb as Ge,sS as Ke,sb as qe,uC as Je,uS as Ye,ub as Xe,vp as Ze,wu as Qe,wv as $e,xp as et,xv as tt,yp as nt,zE as rt}from"./loadAgentsDir-ClTeo0nk.js";import{Qn as it,Xn as at,Zn as ot,fn as st,sn as ct}from"./prompt-CfM_xGPc.js";import{n as lt,t as ut}from"./browser-Bt-ckCaU.js";import{t as L}from"./useKeybinding-DPOUuymz.js";import{t as dt}from"./useTerminalSize-Du-EamDN.js";import{a as ft,c as pt}from"./constants-BljlAJOX.js";import{t as mt}from"./Dialog-91X6ZGg9.js";import{i as ht,n as gt}from"./mappers-7BSMbYvH.js";function _t(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`local_agent`}function vt(e){return{...e,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:pe(e.status)?Date.now()+St:void 0}}function yt(e,t){ee(`tengu_transcript_view_enter`,{}),t(t=>{let n=t.tasks[e],r=t.viewingAgentTaskId,i=r===void 0?void 0:t.tasks[r],a=r!==void 0&&r!==e&&_t(i)&&i.retain,o=_t(n)&&(!n.retain||n.evictAfter!==void 0),s=t.viewingAgentTaskId!==e||t.viewSelectionMode!==`viewing-agent`;if(!o&&!s&&!a)return t;let c=t.tasks;return(a||o)&&(c={...t.tasks},a&&(c[r]=vt(i)),o&&(c[e]={...n,retain:!0,evictAfter:void 0})),{...t,viewingAgentTaskId:e,viewSelectionMode:`viewing-agent`,tasks:c}})}function bt(e){ee(`tengu_transcript_view_exit`,{}),e(e=>{let t=e.viewingAgentTaskId,n={...e,viewingAgentTaskId:void 0,viewSelectionMode:`none`};if(t===void 0)return e.viewSelectionMode===`none`?e:n;let r=e.tasks[t];return!_t(r)||!r.retain?n:{...n,tasks:{...e.tasks,[t]:vt(r)}}})}function xt(e,t){t(t=>{let n=t.tasks[e];if(!_t(n))return t;if(n.status===`running`)return n.abortController?.abort(),t;if(n.evictAfter===0)return t;let r=t.viewingAgentTaskId===e;return{...t,tasks:{...t.tasks,[e]:{...vt(n),evictAfter:0}},...r&&{viewingAgentTaskId:void 0,viewSelectionMode:`none`}}})}var St,Ct=t((()=>{T(),Re(),St=3e4}));function wt(e,t,n){let r=at(t,e.toolName);if(!r)return e.toolName;try{let t=r.inputSchema.safeParse(e.input),i=t.success?t.data:{},a=r.userFacingName(i);if(!a)return e.toolName;let o=r.renderToolUseMessage(i,{theme:n,verbose:!1});return o?(0,Tt.jsxs)(d,{children:[a,`(`,o,`)`]}):a}catch{return e.toolName}}var Tt,Et=t((()=>{l(),g(),it(),Tt=v()}));function Dt(e){return e===`completed`||e===`failed`||e===`killed`}function Ot(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:o}=t??{};return i?a.cross:r?a.questionMarkPrefix:o?a.warning:e===`running`?n?a.ellipsis:a.play:e===`completed`?a.tick:e===`failed`||e===`killed`?a.cross:a.bullet}function kt(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:a}=t??{};return i?`error`:r||a?`warning`:n?`background`:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:`background`}function At(e){return e.shutdownRequested?`stopping`:e.awaitingPlanApproval?`awaiting approval`:e.isIdle?`idle`:(e.progress?.recentActivities&&le(e.progress.recentActivities))??e.progress?.lastActivity?.activityDescription??`working`}function jt(e,t){if(!t)return!1;let n=!1;for(let t of Object.values(e))if(!(!Me(t)||process.env.USER_TYPE===`ant`&&me(t))&&(n=!0,t.type!==`in_process_teammate`))return!1;return n}var Mt=t((()=>{i(),P(),qe(),we()}));function Nt({agent:e,onDone:t,onKillAgent:n,onBack:r}){let[i]=u(),a=(0,Pt.useMemo)(()=>Ee(ot()),[]),o=F(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);h({"confirm:yes":t},{context:`Confirmation`});let s=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},c=_e(e.prompt,`plan`),l=e.prompt.length>300?e.prompt.substring(0,297)+`…`:e.prompt,g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount;return(0,R.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:s,children:(0,R.jsx)(f,{title:(0,R.jsxs)(d,{children:[e.selectedAgent?.agentType??`agent`,` › `,e.description||`Async agent`]}),subtitle:(0,R.jsxs)(d,{children:[e.status!==`running`&&(0,R.jsxs)(d,{color:kt(e.status),children:[Ot(e.status),` `,e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,R.jsxs)(d,{dimColor:!0,children:[o,g!==void 0&&g>0&&(0,R.jsxs)(R.Fragment,{children:[` · `,ie(g),` tokens`]}),v!==void 0&&v>0&&(0,R.jsxs)(R.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,R.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,R.jsxs)(m,{children:[r&&(0,R.jsx)(p,{shortcut:`←`,action:`go back`}),(0,R.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,R.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,R.jsxs)(_,{flexDirection:`column`,children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,R.jsxs)(_,{flexDirection:`column`,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,R.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,wt(t,a,i)]},n))]}),c?(0,R.jsx)(_,{marginTop:1,children:(0,R.jsx)(Te,{addMargin:!1,planContent:c})}):(0,R.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,R.jsx)(d,{wrap:`wrap`,children:l})]}),e.status===`failed`&&e.error&&(0,R.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,R.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})})}var Pt,R,Ft=t((()=>{Pt=n(l(),1),I(),g(),L(),it(),ke(),A(),Ce(),De(),Et(),Mt(),R=v()}));function It(e,t,n,r){if(!e)return`${t} found · ${n} verified`;if(e===`synthesizing`){let e=[`${n} verified`];return r>0&&e.push(`${r} refuted`),e.push(`deduping`),e.join(` · `)}if(e===`verifying`){let e=[`${t} found`,`${n} verified`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return t>0?`${t} found`:`finding`}function Lt({text:e,phase:t=0}){return(0,z.jsx)(z.Fragment,{children:[...e].map((e,n)=>(0,z.jsx)(d,{color:ce(n+t),children:e},n))})}function Rt(e,t,n){let r=(0,Vt.useRef)(e),i=(0,Vt.useRef)(t);return n||e<r.current?r.current=e:e>r.current&&t!==i.current&&(r.current+=1,i.current=t),r.current}function zt({session:e}){let t=We().prefersReducedMotion??!1,n=e.reviewProgress,r=e.status===`running`,[,i]=o(r&&!t?Ht:null),a=n?.bugsFound??0,s=n?.bugsVerified??0,c=n?.bugsRefuted??0,l=t||!r,u=Rt(a,i,l),f=Rt(s,i,l),p=Rt(c,i,l),m=Math.floor(i/(Ht*3))%7;if(e.status===`completed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(Lt,{text:`ultrareview`,phase:0}),(0,z.jsx)(d,{dimColor:!0,children:` ready · shift+↓ to view`})]});if(e.status===`failed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(Lt,{text:`ultrareview`,phase:0}),(0,z.jsxs)(d,{color:`error`,dimColor:!0,children:[` · `,`error`]})]});let h=n?It(n.stage,u,f,p):`setting up`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◇`,` `]}),(0,z.jsx)(Lt,{text:`ultrareview`,phase:r?m:0}),(0,z.jsxs)(d,{dimColor:!0,children:[` · `,h]})]})}function Bt({session:e}){if(e.isRemoteReview)return(0,z.jsx)(zt,{session:e});if(e.status===`completed`)return(0,z.jsx)(d,{bold:!0,color:`success`,dimColor:!0,children:`done`});if(e.status===`failed`)return(0,z.jsx)(d,{bold:!0,color:`error`,dimColor:!0,children:`error`});if(!e.todoList.length)return(0,z.jsxs)(d,{dimColor:!0,children:[e.status,`…`]});let t=E(e.todoList,e=>e.status===`completed`),n=e.todoList.length;return(0,z.jsxs)(d,{dimColor:!0,children:[t,`/`,n]})}var Vt,z,Ht,Ut=t((()=>{Vt=n(l(),1),b(),He(),g(),D(),ue(),z=v(),Ht=80}));function B({status:e,label:t,suffix:n}){return(0,V.jsxs)(d,{color:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:void 0,dimColor:!0,children:[`(`,t??e,n,`)`]})}function Wt({shell:e}){switch(e.status){case`completed`:return(0,V.jsx)(B,{status:`completed`,label:`done`});case`failed`:return(0,V.jsx)(B,{status:`failed`,label:`error`});case`killed`:return(0,V.jsx)(B,{status:`killed`,label:`stopped`});case`running`:case`pending`:return(0,V.jsx)(B,{status:`running`})}}var V,Gt=t((()=>{g(),V=v()}));function Kt({task:e,maxActivityWidth:t}){let n=t??40;switch(e.type){case`local_bash`:return(0,H.jsxs)(d,{children:[O(e.kind===`monitor`?e.description:e.command,n,!0),` `,(0,H.jsx)(Wt,{shell:e})]});case`remote_agent`:return e.isRemoteReview?(0,H.jsx)(d,{children:(0,H.jsx)(Bt,{session:e})}):(0,H.jsxs)(d,{children:[(0,H.jsxs)(d,{dimColor:!0,children:[e.status===`running`||e.status===`pending`?`◇`:`◆`,` `]}),O(e.title,n,!0),(0,H.jsx)(d,{dimColor:!0,children:` · `}),(0,H.jsx)(Bt,{session:e})]});case`local_agent`:return(0,H.jsxs)(d,{children:[O(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`in_process_teammate`:{let t=At(e);return(0,H.jsxs)(d,{children:[(0,H.jsxs)(d,{color:Xe(e.identity.color),children:[`@`,e.identity.agentName]}),(0,H.jsxs)(d,{dimColor:!0,children:[`: `,O(t,n,!0)]})]})}case`local_workflow`:{let t=e;return(0,H.jsxs)(d,{children:[O(t.workflowName??e.summary??e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`running`?`${t.agentCount} ${j(t.agentCount,`agent`)}`:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}case`monitor_mcp`:return(0,H.jsxs)(d,{children:[O(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`dream`:{let t=e.filesTouched.length,n=e.phase===`updating`&&t>0?`${t} ${j(t,`file`)}`:`${e.sessionsReviewing} ${j(e.sessionsReviewing,`session`)}`;return(0,H.jsxs)(d,{children:[e.description,` `,(0,H.jsxs)(d,{dimColor:!0,children:[`· `,e.phase,` · `,n]}),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}}}var H,qt=t((()=>{l(),g(),Ve(),A(),M(),b(),Ut(),Gt(),Mt(),H=v()}));function Jt({task:e,onDone:t,onBack:n,onKill:r}){let i=F(e.startTime,e.status===`running`,1e3,0);h({"confirm:yes":t},{context:`Confirmation`});let a=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&n?(i.preventDefault(),n()):i.key===`x`&&e.status===`running`&&r&&(i.preventDefault(),r())},o=e.turns.filter(e=>e.text!==``),s=o.slice(-Yt),c=o.length-s.length;return(0,U.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:a,children:(0,U.jsx)(f,{title:`Memory consolidation`,subtitle:(0,U.jsxs)(d,{dimColor:!0,children:[i,` · reviewing `,e.sessionsReviewing,` `,j(e.sessionsReviewing,`session`),e.filesTouched.length>0&&(0,U.jsxs)(U.Fragment,{children:[` `,`· `,e.filesTouched.length,` `,j(e.filesTouched.length,`file`),` touched`]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,U.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,U.jsxs)(m,{children:[n&&(0,U.jsx)(p,{shortcut:`←`,action:`go back`}),(0,U.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&r&&(0,U.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,U.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,U.jsxs)(d,{children:[(0,U.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,U.jsx)(d,{color:`background`,children:`running`}):e.status===`completed`?(0,U.jsx)(d,{color:`success`,children:e.status}):(0,U.jsx)(d,{color:`error`,children:e.status})]}),s.length===0?(0,U.jsx)(d,{dimColor:!0,children:e.status===`running`?`Starting…`:`(no text output)`}):(0,U.jsxs)(U.Fragment,{children:[c>0&&(0,U.jsxs)(d,{dimColor:!0,children:[`(`,c,` earlier `,j(c,`turn`),`)`]}),s.map((e,t)=>(0,U.jsxs)(_,{flexDirection:`column`,children:[(0,U.jsx)(d,{wrap:`wrap`,children:e.text}),e.toolUseCount>0&&(0,U.jsxs)(d,{dimColor:!0,children:[` `,`(`,e.toolUseCount,` `,j(e.toolUseCount,`tool`),`)`]})]},t))]})]})})})}var U,Yt,Xt=t((()=>{l(),I(),g(),L(),M(),U=v(),Yt=6}));function Zt({teammate:e,onDone:t,onKill:n,onBack:r,onForeground:i}){let[a]=u(),o=(0,Qt.useMemo)(()=>Ee(ot()),[]),s=F(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);h({"confirm:yes":t},{context:`Confirmation`});let c=a=>{a.key===` `?(a.preventDefault(),t()):a.key===`left`&&r?(a.preventDefault(),r()):a.key===`x`&&e.status===`running`&&n?(a.preventDefault(),n()):a.key===`f`&&e.status===`running`&&i&&(a.preventDefault(),i())},l=At(e),g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount,y=k(e.prompt,300);return(0,W.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:c,children:(0,W.jsxs)(f,{title:(0,W.jsxs)(d,{children:[(0,W.jsxs)(d,{color:Xe(e.identity.color),children:[`@`,e.identity.agentName]}),l&&(0,W.jsxs)(d,{dimColor:!0,children:[` (`,l,`)`]})]}),subtitle:(0,W.jsxs)(d,{children:[e.status!==`running`&&(0,W.jsxs)(d,{color:e.status===`completed`?`success`:e.status===`killed`?`warning`:`error`,children:[e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,W.jsxs)(d,{dimColor:!0,children:[s,g!==void 0&&g>0&&(0,W.jsxs)(W.Fragment,{children:[` · `,ie(g),` tokens`]}),v!==void 0&&v>0&&(0,W.jsxs)(W.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,W.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,W.jsxs)(m,{children:[r&&(0,W.jsx)(p,{shortcut:`←`,action:`go back`}),(0,W.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,W.jsx)(p,{shortcut:`x`,action:`stop`}),e.status===`running`&&i&&(0,W.jsx)(p,{shortcut:`f`,action:`foreground`})]}),children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,W.jsxs)(_,{flexDirection:`column`,children:[(0,W.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,W.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,wt(t,o,a)]},n))]}),(0,W.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,W.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,W.jsx)(d,{wrap:`wrap`,children:y})]}),e.status===`failed`&&e.error&&(0,W.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,W.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,W.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})}var Qt,W,$t=t((()=>{Qt=n(l(),1),I(),g(),L(),it(),ke(),A(),Ve(),Et(),Mt(),W=v()}));function en(e,t){if(e===`ExitPlanMode`)return`Review the plan in Claude Code on the web`;if(!t||typeof t!=`object`)return e;if(e===`AskUserQuestion`&&`questions`in t){let e=t.questions;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`){let t=`question`in e[0]&&typeof e[0].question==`string`&&e[0].question?e[0].question:`header`in e[0]&&typeof e[0].header==`string`?e[0].header:null;if(t)return`Answer in browser: ${k(t.replace(/\s+/g,` `).trim(),50)}`}}for(let n of Object.values(t))if(typeof n==`string`&&n.trim())return`${e} ${k(n.replace(/\s+/g,` `).trim(),60)}`;return e}function tn({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`running`||e.status===`pending`,o=e.ultraplanPhase,s=i?o?sn[o]:`running`:e.status,l=F(e.startTime,i,1e3,0,e.endTime),{agentsWorking:u,toolCalls:p,lastToolCall:m}=(0,G.useMemo)(()=>{let t=0,n=0,r=null;for(let i of e.log){if(i.type!==`assistant`)continue;let e=i.message?.content??[];for(let i of e)i.type===`tool_use`&&(n++,r=i,(i.name===`Agent`||i.name===`Task`)&&t++)}return{agentsWorking:1+t,toolCalls:n,lastToolCall:r?en(r.name,r.input):null}},[e.log]),h=$e(e.sessionId),g=n??(()=>t(`Remote session details dismissed`,{display:`system`})),[v,y]=(0,G.useState)(!1);return v?(0,K.jsx)(f,{title:`Stop ultraplan?`,onCancel:()=>y(!1),color:`background`,children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsx)(d,{dimColor:!0,children:`This will terminate the Claude Code on the web session.`}),(0,K.jsx)(Ae,{options:[{label:`Terminate session`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),g()):y(!1)}})]})}):(0,K.jsx)(f,{title:(0,K.jsxs)(d,{children:[(0,K.jsxs)(d,{color:`background`,children:[o===`plan_ready`?`◆`:`◇`,` `]}),(0,K.jsx)(d,{bold:!0,children:`ultraplan`}),(0,K.jsxs)(d,{dimColor:!0,children:[` · `,l,` · `,s]})]}),onCancel:g,color:`background`,children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsxs)(d,{children:[o===`plan_ready`&&(0,K.jsxs)(d,{color:`success`,children:[a.tick,` `]}),u,` `,j(u,`agent`),` `,o?cn[o]:`working`,` · `,p,` tool`,` `,j(p,`call`)]}),m&&(0,K.jsx)(d,{dimColor:!0,children:m}),(0,K.jsx)(c,{url:h,children:(0,K.jsx)(d,{dimColor:!0,children:h})}),(0,K.jsx)(Ae,{options:[{label:`Review in Claude Code on the web`,value:`open`},...r&&i?[{label:`Stop ultraplan`,value:`stop`}]:[],{label:`Back`,value:`back`}],onChange:e=>{switch(e){case`open`:lt(h),t();return;case`stop`:y(!0);return;case`back`:g();return}}})]})})}function nn({stage:e,completed:t,hasProgress:n}){let r=e?ln.indexOf(e):-1,i=!t&&!n;return(0,K.jsxs)(d,{children:[i?(0,K.jsx)(d,{color:`background`,children:`Setup`}):(0,K.jsx)(d,{dimColor:!0,children:`Setup`}),(0,K.jsx)(d,{dimColor:!0,children:` → `}),ln.map((e,n)=>{let a=!t&&!i&&n===r;return(0,K.jsxs)(G.Fragment,{children:[n>0&&(0,K.jsx)(d,{dimColor:!0,children:` → `}),a?(0,K.jsx)(d,{color:`background`,children:un[e]}):(0,K.jsx)(d,{dimColor:!0,children:un[e]})]},e)}),t&&(0,K.jsx)(d,{color:`success`,children:` ✓`})]})}function rn(e){let t=e.reviewProgress;if(!t)return e.status===`completed`?`done`:`setting up`;let n=t.bugsVerified,r=t.bugsRefuted??0;if(e.status===`completed`){let e=[`${n} ${j(n,`finding`)}`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return It(t.stage,t.bugsFound,n,r)}function an({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`completed`,a=e.status===`running`||e.status===`pending`,[o,s]=(0,G.useState)(!1),l=F(e.startTime,a,1e3,0,e.endTime),u=()=>t(`Remote session details dismissed`,{display:`system`}),h=n??u,g=$e(e.sessionId),v=i?`ready`:a?`running`:e.status;if(o)return(0,K.jsx)(f,{title:`Stop ultrareview?`,onCancel:()=>s(!1),color:`background`,children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsx)(d,{dimColor:!0,children:`This archives the remote session and stops local tracking. The review will not complete and any findings so far are discarded.`}),(0,K.jsx)(Ae,{options:[{label:`Stop ultrareview`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),h()):s(!1)}})]})});let y=i?[{label:`Open in Claude Code on the web`,value:`open`},{label:`Dismiss`,value:`dismiss`}]:[{label:`Open in Claude Code on the web`,value:`open`},...r&&a?[{label:`Stop ultrareview`,value:`stop`}]:[],{label:`Back`,value:`back`}];return(0,K.jsx)(f,{title:(0,K.jsxs)(d,{children:[(0,K.jsxs)(d,{color:`background`,children:[i?`◆`:`◇`,` `]}),(0,K.jsx)(d,{bold:!0,children:`ultrareview`}),(0,K.jsxs)(d,{dimColor:!0,children:[` · `,l,` · `,v]})]}),onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,K.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,K.jsxs)(m,{children:[(0,K.jsx)(p,{shortcut:`Enter`,action:`select`}),(0,K.jsx)(p,{shortcut:`Esc`,action:`go back`})]}),children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsx)(nn,{stage:e.reviewProgress?.stage,completed:i,hasProgress:!!e.reviewProgress}),(0,K.jsxs)(_,{flexDirection:`column`,children:[(0,K.jsx)(d,{children:rn(e)}),(0,K.jsx)(c,{url:g,children:(0,K.jsx)(d,{dimColor:!0,children:g})})]}),(0,K.jsx)(Ae,{options:y,onChange:e=>{switch(e){case`open`:lt(g),t();break;case`stop`:s(!0);break;case`back`:h();break;case`dismiss`:u();break}}})]})})}function on({session:e,toolUseContext:t,onDone:n,onBack:r,onKill:i}){let[a,o]=(0,G.useState)(!1),[s,l]=(0,G.useState)(null),u=(0,G.useMemo)(()=>e.isUltraplan||e.isRemoteReview?[]:Oe(ht(e.log)).filter(e=>e.type!==`progress`).slice(-3),[e]);if(e.isUltraplan)return(0,K.jsx)(tn,{session:e,onDone:n,onBack:r,onKill:i});if(e.isRemoteReview)return(0,K.jsx)(an,{session:e,onDone:n,onBack:r,onKill:i});let h=()=>n(`Remote session details dismissed`,{display:`system`}),g=e=>{e.key===` `?(e.preventDefault(),n(`Remote session details dismissed`,{display:`system`})):e.key===`left`&&r?(e.preventDefault(),r()):e.key===`t`&&!a?(e.preventDefault(),v()):e.key===`return`&&(e.preventDefault(),h())};async function v(){o(!0),l(null);try{await fe(e.sessionId)}catch(e){l(w(e))}finally{o(!1)}}let y=k(e.title,50),b=e.status===`pending`?`starting`:e.status;return(0,K.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:g,children:(0,K.jsxs)(f,{title:`Remote session details`,onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,K.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,K.jsxs)(m,{children:[r&&(0,K.jsx)(p,{shortcut:`←`,action:`go back`}),(0,K.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),!a&&(0,K.jsx)(p,{shortcut:`t`,action:`teleport`})]}),children:[(0,K.jsxs)(_,{flexDirection:`column`,children:[(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Status`}),`:`,` `,b===`running`||b===`starting`?(0,K.jsx)(d,{color:`background`,children:b}):b===`completed`?(0,K.jsx)(d,{color:`success`,children:b}):(0,K.jsx)(d,{color:`error`,children:b})]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Runtime`}),`: `,ne((e.endTime??Date.now())-e.startTime)]}),(0,K.jsxs)(d,{wrap:`truncate-end`,children:[(0,K.jsx)(d,{bold:!0,children:`Title`}),`: `,y]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Progress`}),`: `,(0,K.jsx)(Bt,{session:e})]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Session URL`}),`:`,` `,(0,K.jsx)(c,{url:$e(e.sessionId),children:(0,K.jsx)(d,{dimColor:!0,children:$e(e.sessionId)})})]})]}),e.log.length>0&&(0,K.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Recent messages`}),`:`]}),(0,K.jsx)(_,{flexDirection:`column`,height:10,overflowY:`hidden`,children:u.map((e,n)=>(0,K.jsx)(be,{message:e,lookups:Fe,addMargin:n>0,tools:t.options.tools,commands:t.options.commands,verbose:t.options.verbose,inProgressToolUseIDs:new Set,progressMessagesForMessage:[],shouldAnimate:!1,shouldShowDot:!1,style:`condensed`,isTranscriptMode:!1,isStatic:!0},n))}),(0,K.jsx)(_,{marginTop:1,children:(0,K.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing last `,u.length,` of `,e.log.length,` messages`]})})]}),s&&(0,K.jsx)(_,{marginTop:1,children:(0,K.jsxs)(d,{color:`error`,children:[`Teleport failed: `,s]})}),a&&(0,K.jsx)(d,{color:`background`,children:`Teleporting to session…`})]})})}var G,K,sn,cn,ln,un,dn=t((()=>{i(),G=n(l(),1),b(),I(),g(),Se(),y(),ct(),st(),ut(),S(),A(),gt(),Ce(),M(),he(),Ue(),Pe(),Ut(),K=v(),sn={needs_input:`input required`,plan_ready:`ready`},cn={needs_input:`waiting`,plan_ready:`done`},ln=[`finding`,`verifying`,`synthesizing`],un={finding:`Find`,verifying:`Verify`,synthesizing:`Dedupe`}}));async function fn(e){let t=ye(e.id);try{let e=await x(t,hn);return{content:e.content,bytesTotal:e.bytesTotal}}catch{return{content:``,bytesTotal:0}}}function pn({shell:e,onDone:t,onKillShell:n,onBack:r}){let{columns:i}=s(),[a,o]=(0,q.useState)(()=>fn(e)),c=(0,q.useDeferredValue)(a);(0,q.useEffect)(()=>{if(e.status!==`running`)return;let t=setInterval((e,t)=>e(fn(t)),1e3,o,e);return()=>clearInterval(t)},[e.id,e.status]);let l=()=>t(`Shell details dismissed`,{display:`system`});h({"confirm:yes":l},{context:`Confirmation`});let u=i=>{i.key===` `?(i.preventDefault(),t(`Shell details dismissed`,{display:`system`})):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},g=e.kind===`monitor`,v=k(e.command,280);return(0,J.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:u,children:(0,J.jsxs)(f,{title:g?`Monitor details`:`Shell details`,onCancel:l,color:`background`,inputGuide:t=>t.pending?(0,J.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,J.jsxs)(m,{children:[r&&(0,J.jsx)(p,{shortcut:`←`,action:`go back`}),(0,J.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,J.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:[(0,J.jsxs)(_,{flexDirection:`column`,children:[(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,J.jsxs)(d,{color:`background`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):e.status===`completed`?(0,J.jsxs)(d,{color:`success`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):(0,J.jsxs)(d,{color:`error`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]})]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Runtime:`}),` `,ne((e.endTime??Date.now())-e.startTime)]}),(0,J.jsxs)(d,{wrap:`wrap`,children:[(0,J.jsx)(d,{bold:!0,children:g?`Script:`:`Command:`}),` `,v]})]}),(0,J.jsxs)(_,{flexDirection:`column`,children:[(0,J.jsx)(d,{bold:!0,children:`Output:`}),(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(d,{dimColor:!0,children:`Loading output…`}),children:(0,J.jsx)(mn,{outputPromise:c,columns:i})})]})]})})}function mn({outputPromise:e,columns:t}){let{content:n,bytesTotal:r}=(0,q.use)(e);if(!n)return(0,J.jsx)(d,{dimColor:!0,children:`No output available`});let i=[],a=n.length;for(let e=0;e<10&&a>0;e++){let e=n.lastIndexOf(`
2
+ `,a-1);i.push(e+1),a=e}i.reverse();let o=r>n.length,s=[];for(let e=0;e<i.length;e++){let t=i[e],r=e<i.length-1?i[e+1]-1:n.length,a=n.slice(t,r);a&&s.push(a)}return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(_,{borderStyle:`round`,paddingX:1,flexDirection:`column`,height:12,maxWidth:t-6,children:s.map((e,t)=>(0,J.jsx)(d,{wrap:`truncate-end`,children:e},t))}),(0,J.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing ${s.length} lines`,o?` of ${re(r)}`:``]})]})}var q,J,hn,gn=t((()=>{q=n(l(),1),dt(),g(),L(),A(),C(),de(),J=v(),hn=8192})),_n=t((()=>{g()})),vn=t((()=>{g()})),yn=r({MonitorMcpDetailDialog:()=>bn});function bn({task:e,onBack:t,onKill:n}){let r=F(e.startTime,e.status===`running`,1e3,0);return h({},{context:`MonitorMcpDetail`}),(0,Y.jsx)(_,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:r=>{r.key===`left`&&t?(r.preventDefault(),t()):r.key===`x`&&e.status===`running`&&n&&(r.preventDefault(),n())},children:(0,Y.jsx)(f,{title:`MCP Monitor`,subtitle:(0,Y.jsxs)(d,{dimColor:!0,children:[r,` · `,e.serverName,`:`,e.resourceUri]}),onCancel:t??(()=>{}),inputGuide:()=>(0,Y.jsxs)(m,{children:[t&&(0,Y.jsx)(p,{shortcut:`←`,action:`go back`}),(0,Y.jsx)(p,{shortcut:`Esc`,action:`close`}),e.status===`running`&&n&&(0,Y.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,Y.jsx)(d,{color:`ansi:green`,children:`running`}):e.status===`completed`?(0,Y.jsx)(d,{color:`ansi:green`,children:e.status}):(0,Y.jsx)(d,{color:`ansi:red`,children:e.status})]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Description:`}),` `,e.description]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Server:`}),` `,e.serverName]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Resource:`}),` `,e.resourceUri]}),e.command&&(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Command:`}),` `,e.command]})]})})})}var Y,xn=t((()=>{l(),I(),g(),L(),_n(),mt(),vn(),Y=v()}));function Sn(e,t){return Object.values(e??{}).filter(Me).filter(e=>!(e.type===`local_agent`&&e.id===t))}function Cn({onDone:e,toolUseContext:t,initialDetailTaskId:n}){let r=Je(e=>e.tasks),i=Je(e=>e.foregroundedTaskId),a=Je(e=>e.expandedView)===`teammates`,o=Ie(),s=ge(`chat:killAgents`,`Chat`,`ctrl+x ctrl+k`),c=r,l=(0,Z.useRef)(!1),[u,g]=(0,Z.useState)(()=>{if(n)return l.current=!0,{mode:`detail`,itemId:n};let e=Sn(c,i);return e.length===1?(l.current=!0,{mode:`detail`,itemId:e[0].id}):{mode:`list`}}),[v,y]=(0,Z.useState)(0);Ye(`background-tasks-dialog`);let{bashTasks:b,remoteSessions:x,agentTasks:S,teammateTasks:C,workflowTasks:w,mcpMonitors:T,dreamTasks:ee,allSelectableItems:D}=(0,Z.useMemo)(()=>{let e=Object.values(c??{}).filter(Me).map(wn).sort((e,t)=>{let n=e.status,r=t.status;if(n===`running`&&r!==`running`)return-1;if(n!==`running`&&r===`running`)return 1;let i=`task`in e?e.task.startTime:0;return(`task`in t?t.task.startTime:0)-i}),t=e.filter(e=>e.type===`local_bash`),n=e.filter(e=>e.type===`remote_agent`),r=e.filter(e=>e.type===`local_agent`&&e.id!==i),o=e.filter(e=>e.type===`local_workflow`),s=e.filter(e=>e.type===`monitor_mcp`),l=e.filter(e=>e.type===`dream`),u=a?[]:e.filter(e=>e.type===`in_process_teammate`),d=u.length>0?[{id:`__leader__`,type:`leader`,label:`@${ft}`,status:`running`}]:[];return{bashTasks:t,remoteSessions:n,agentTasks:r,workflowTasks:o,mcpMonitors:s,dreamTasks:l,teammateTasks:[...d,...u],allSelectableItems:[...d,...u,...t,...s,...n,...r,...o,...l]}},[c,i,a]),O=D[v]??null;h({"confirm:previous":()=>y(e=>Math.max(0,e-1)),"confirm:next":()=>y(e=>Math.min(D.length-1,e+1)),"confirm:yes":()=>{let t=D[v];t&&(t.type===`leader`?(bt(o),e(`Viewing leader`,{display:`system`})):g({mode:`detail`,itemId:t.id}))}},{context:`Confirmation`,isActive:u.mode===`list`});let k=t=>{if(u.mode!==`list`)return;if(t.key===`left`){t.preventDefault(),e(`Background tasks dialog dismissed`,{display:`system`});return}let n=D[v];n&&(t.key===`x`&&(t.preventDefault(),n.type===`local_bash`&&n.status===`running`?ne(n.id):n.type===`local_agent`&&n.status===`running`?re(n.id):n.type===`in_process_teammate`&&n.status===`running`?ie(n.id):n.type===`local_workflow`&&n.status===`running`&&En?En(n.id,o):n.type===`monitor_mcp`&&n.status===`running`&&$?$(n.id,o):n.type===`dream`&&n.status===`running`?A(n.id):n.type===`remote_agent`&&n.status===`running`&&(n.task.isUltraplan?Ne(n.id,n.task.sessionId,o):j(n.id))),t.key===`f`&&(n.type===`in_process_teammate`&&n.status===`running`?(t.preventDefault(),yt(n.id,o),e(`Viewing teammate`,{display:`system`})):n.type===`leader`&&(t.preventDefault(),bt(o),e(`Viewing leader`,{display:`system`}))))};async function ne(e){await Qe.kill(e,o)}async function re(e){await ve.kill(e,o)}async function ie(e){await xe.kill(e,o)}async function A(e){await je.kill(e,o)}async function j(e){await tt.kill(e,o)}let M=(0,Z.useEffectEvent)(e);(0,Z.useEffect)(()=>{if(u.mode!==`list`){let e=(c??{})[u.itemId];(!e||e.type!==`local_workflow`&&!Me(e))&&(l.current?M(`Background tasks dialog dismissed`,{display:`system`}):g({mode:`list`}))}let e=D.length;v>=e&&e>0&&y(e-1)},[u,c,v,D,M]);let N=()=>{l.current&&D.length<=1?e(`Background tasks dialog dismissed`,{display:`system`}):(l.current=!1,g({mode:`list`}))};if(u.mode!==`list`&&c){let n=c[u.itemId];if(!n)return null;switch(n.type){case`local_bash`:return(0,Q.jsx)(pn,{shell:n,onDone:e,onKillShell:()=>void ne(n.id),onBack:N},`shell-${n.id}`);case`local_agent`:return(0,Q.jsx)(Nt,{agent:n,onDone:e,onKillAgent:()=>void re(n.id),onBack:N},`agent-${n.id}`);case`remote_agent`:return(0,Q.jsx)(on,{session:n,onDone:e,toolUseContext:t,onBack:N,onKill:n.status===`running`?n.isUltraplan?()=>void Ne(n.id,n.sessionId,o):()=>void j(n.id):void 0},`session-${n.id}`);case`in_process_teammate`:return(0,Q.jsx)(Zt,{teammate:n,onDone:e,onKill:n.status===`running`?()=>void ie(n.id):void 0,onBack:N,onForeground:n.status===`running`?()=>{yt(n.id,o),e(`Viewing teammate`,{display:`system`})}:void 0},`teammate-${n.id}`);case`local_workflow`:{let e=n.status===`running`&&En?()=>En(n.id,o):void 0;return(0,Q.jsx)(_,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:t=>{t.key===`left`?(t.preventDefault(),N()):t.key===`x`&&e&&(t.preventDefault(),e())},children:(0,Q.jsx)(f,{title:n.workflowName,subtitle:(0,Q.jsxs)(d,{dimColor:!0,children:[n.status,n.summary?` · ${n.summary}`:``]}),onCancel:N,inputGuide:()=>(0,Q.jsxs)(m,{children:[(0,Q.jsx)(p,{shortcut:`←`,action:`go back`}),(0,Q.jsx)(p,{shortcut:`Esc`,action:`close`}),e&&(0,Q.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:n.status===`failed`&&n.error?(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsxs)(d,{color:`error`,children:[`失败原因:`,n.error]}),(0,Q.jsx)(d,{color:`subtle`,children:`用 /workflows 查看阶段与 agent 实时进度`})]}):(0,Q.jsx)(d,{color:`subtle`,children:`用 /workflows 查看阶段与 agent 实时进度`})})},`workflow-${n.id}`)}case`monitor_mcp`:return Dn?(0,Q.jsx)(Dn,{task:n,onKill:n.status===`running`&&$?()=>$(n.id,o):void 0,onBack:N},`monitor-mcp-${n.id}`):null;case`dream`:return(0,Q.jsx)(Jt,{task:n,onDone:()=>e(`Background tasks dialog dismissed`,{display:`system`}),onBack:N,onKill:n.status===`running`?()=>void A(n.id):void 0},`dream-${n.id}`)}}let P=E(b,e=>e.status===`running`),ae=E(x,e=>e.status===`running`||e.status===`pending`)+E(S,e=>e.status===`running`),oe=E(C,e=>e.status===`running`),se=te([...oe>0?[(0,Q.jsxs)(d,{children:[oe,` `,oe===1?`agent`:`agents`]},`teammates`)]:[],...P>0?[(0,Q.jsxs)(d,{children:[P,` `,P===1?`active shell`:`active shells`]},`shells`)]:[],...ae>0?[(0,Q.jsxs)(d,{children:[ae,` `,ae===1?`active agent`:`active agents`]},`agents`)]:[]],e=>(0,Q.jsx)(d,{children:` · `},`separator-${e}`)),ce=[(0,Q.jsx)(p,{shortcut:`↑/↓`,action:`select`},`upDown`),(0,Q.jsx)(p,{shortcut:`Enter`,action:`view`},`enter`),...O?.type===`in_process_teammate`&&O.status===`running`?[(0,Q.jsx)(p,{shortcut:`f`,action:`foreground`},`foreground`)]:[],...(O?.type===`local_bash`||O?.type===`local_agent`||O?.type===`in_process_teammate`||O?.type===`local_workflow`||O?.type===`monitor_mcp`||O?.type===`dream`||O?.type===`remote_agent`)&&O.status===`running`?[(0,Q.jsx)(p,{shortcut:`x`,action:`stop`},`kill`)]:[],...S.some(e=>e.status===`running`)?[(0,Q.jsx)(p,{shortcut:s,action:`stop all agents`},`kill-all`)]:[],(0,Q.jsx)(p,{shortcut:`←/Esc`,action:`close`},`esc`)],le=()=>e(`Background tasks dialog dismissed`,{display:`system`});function ue(e){return e.pending?(0,Q.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,Q.jsx)(m,{children:ce})}return(0,Q.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:k,children:(0,Q.jsx)(f,{title:`Background tasks`,subtitle:(0,Q.jsx)(Q.Fragment,{children:se}),onCancel:le,color:`background`,inputGuide:ue,children:D.length===0?(0,Q.jsx)(d,{dimColor:!0,children:`No tasks currently running`}):(0,Q.jsxs)(_,{flexDirection:`column`,children:[C.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,children:[(b.length>0||x.length>0||S.length>0)&&(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Agents`]}),` (`,E(C,e=>e.type!==`leader`),`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:(0,Q.jsx)(Tn,{teammateTasks:C,currentSelectionId:O?.id})})]}),b.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0),children:[(C.length>0||x.length>0||S.length>0)&&(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Shells`]}),` (`,b.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:b.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),T.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Monitors`]}),` (`,T.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:T.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),x.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Remote agents`]}),` (`,x.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:x.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),S.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Local agents`]}),` (`,S.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:S.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),w.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Workflows`]}),` (`,w.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:w.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),ee.length>0&&(0,Q.jsx)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0||w.length>0),children:(0,Q.jsx)(_,{flexDirection:`column`,children:ee.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})})]})})})}function wn(e){switch(e.type){case`local_bash`:return{id:e.id,type:`local_bash`,label:e.kind===`monitor`?e.description:e.command,status:e.status,task:e};case`remote_agent`:return{id:e.id,type:`remote_agent`,label:e.title,status:e.status,task:e};case`local_agent`:return{id:e.id,type:`local_agent`,label:e.description,status:e.status,task:e};case`in_process_teammate`:return{id:e.id,type:`in_process_teammate`,label:`@${e.identity.agentName}`,status:e.status,task:e};case`local_workflow`:return{id:e.id,type:`local_workflow`,label:e.summary??e.description,status:e.status,task:e};case`monitor_mcp`:return{id:e.id,type:`monitor_mcp`,label:e.description,status:e.status,task:e};case`dream`:return{id:e.id,type:`dream`,label:e.description,status:e.status,task:e}}}function X({item:e,isSelected:t}){let{columns:n}=s(),r=Math.max(30,n-26),i=ae();return(0,Q.jsxs)(_,{flexDirection:`row`,children:[(0,Q.jsx)(d,{dimColor:i&&t,children:t?a.pointer+` `:` `}),(0,Q.jsx)(d,{color:t&&!i?`suggestion`:void 0,children:e.type===`leader`?(0,Q.jsxs)(d,{children:[`@`,ft]}):(0,Q.jsx)(Kt,{task:e.task,maxActivityWidth:r})})]})}function Tn({teammateTasks:e,currentSelectionId:t}){let n=e.filter(e=>e.type===`leader`),r=e.filter(e=>e.type===`in_process_teammate`),i=new Map;for(let e of r){let t=e.task.identity.teamName,n=i.get(t);n?n.push(e):i.set(t,[e])}return(0,Q.jsx)(Q.Fragment,{children:[...i.entries()].map(([e,r])=>(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsxs)(d,{dimColor:!0,children:[` `,`Team: `,e,` (`,r.length+n.length,`)`]}),n.map(n=>(0,Q.jsx)(X,{item:n,isSelected:n.id===t},`${n.id}-${e}`)),r.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===t},e.id))]},e))})}var Z,Q,En,$,Dn,On=t((()=>{i(),Z=n(l(),1),rt(),dt(),ze(),Ct(),et(),Ge(),P(),se(),Se(),qe(),D(),pt(),Be(),Ke(),g(),L(),oe(),Ft(),qt(),Xt(),$t(),dn(),gn(),Q=v(),En=(nt(),e(Ze))?.killWorkflowTask??null,$=(Le(),e(N))?.killMonitorMcp??null,Dn=(xn(),e(yn)).MonitorMcpDetailDialog}));export{jt as a,Ct as c,Dt as i,xt as l,On as n,yt as o,Mt as r,bt as s,Cn as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{J as t,Q as n,Rn as r,b as i,f as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{lo as l,oo as u}from"./paths-DO4WOQtD.js";import{n as d,r as f}from"./analytics-DqMQntaB.js";import{CE as p,Ry as m,aS as h,wE as g}from"./loadAgentsDir-ClTeo0nk.js";var _=e(r(),1);d(),o(),g(),u(),m();var v=c();function y({onAccept:e}){let[r,o]=_.useState(null);_.useEffect(()=>{if(r!==null){let e=r,t=setTimeout(()=>p(e));return()=>clearTimeout(t)}},[r]),_.useEffect(()=>{f(`tengu_bypass_permissions_mode_dialog_shown`,{})},[]);function c(t){switch(t){case`accept`:f(`tengu_bypass_permissions_mode_dialog_accept`,{}),l(`userSettings`,{skipDangerousModePermissionPrompt:!0}),e();break;case`decline`:o(1);break}}let u=(0,_.useCallback)(()=>{o(0)},[]);return r===null?(0,v.jsxs)(a,{title:`WARNING: Claude Code running in Bypass Permissions mode`,color:`error`,onCancel:u,children:[(0,v.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,v.jsxs)(i,{children:[`In Bypass Permissions mode, Claude Code will not ask for your approval before running potentially dangerous commands.`,(0,v.jsx)(t,{}),`This mode should only be used in a sandboxed container/VM that has restricted internet access and can easily be restored if damaged.`]}),(0,v.jsx)(i,{children:`By proceeding, you accept all responsibility for actions taken while running in Bypass Permissions mode.`}),(0,v.jsx)(n,{url:`https://code.claude.com/docs/en/security`})]}),(0,v.jsx)(h,{options:[{label:`No, exit`,value:`decline`},{label:`Yes, I accept`,value:`accept`}],onChange:e=>c(e)})]}):null}export{y as BypassPermissionsModeDialog};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{J as t,Q as n,Rn as r,b as i,f as a,t as o,x as s,xt as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Cc as u,yc as d}from"./paths-DO4WOQtD.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./setup-Dihjl7jo.js";var g=e(r(),1);f(),o(),h(),d();var _=l(),v=`https://claude.ai/chrome`,y=`https://clau.de/chrome/permissions`;function b({onDone:e}){let[r,o]=g.useState(!1);return g.useEffect(()=>{p(`tengu_claude_in_chrome_onboarding_shown`,{}),m().then(o),u(e=>({...e,hasCompletedClaudeInChromeOnboarding:!0}))},[]),c((t,n)=>{n.return&&e()}),(0,_.jsx)(a,{title:`Claude in Chrome (Beta)`,onCancel:e,color:`chromeYellow`,children:(0,_.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,_.jsxs)(i,{children:[`Claude in Chrome works with the Chrome extension to let you control your browser directly from Claude Code. You can navigate websites, fill forms, capture screenshots, record GIFs, and debug with console logs and network requests.`,!r&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(t,{}),(0,_.jsx)(t,{}),`Requires the Chrome extension. Get started at `,(0,_.jsx)(n,{url:v})]})]}),(0,_.jsxs)(i,{dimColor:!0,children:[`Site-level permissions are inherited from the Chrome extension. Manage permissions in the Chrome extension settings to control which sites Claude can browse, click, and type on`,r&&(0,_.jsxs)(_.Fragment,{children:[` `,`(`,(0,_.jsx)(n,{url:y}),`)`]}),`.`]}),(0,_.jsxs)(i,{dimColor:!0,children:[`For more info, use`,` `,(0,_.jsx)(i,{bold:!0,color:`chromeYellow`,children:`/chrome`}),` `,`or visit `,(0,_.jsx)(n,{url:`https://code.claude.com/docs/en/chrome`})]})]})})}export{b as ClaudeInChromeOnboarding};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,f as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Sc as l,yc as u}from"./paths-DO4WOQtD.js";import{n as d,r as f}from"./analytics-DqMQntaB.js";import{Ry as p,aS as m}from"./loadAgentsDir-ClTeo0nk.js";function h({onDone:e,isStandaloneDialog:t,externalIncludes:r}){g.useEffect(()=>{f(`tengu_claude_md_includes_dialog_shown`,{})},[]);let o=(0,g.useCallback)(t=>{t===`no`?(f(`tengu_claude_md_external_includes_dialog_declined`,{}),l(e=>({...e,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!0}))):(f(`tengu_claude_md_external_includes_dialog_accepted`,{}),l(e=>({...e,hasClaudeMdExternalIncludesApproved:!0,hasClaudeMdExternalIncludesWarningShown:!0}))),e()},[e]);return(0,_.jsxs)(a,{title:`Allow external CLAUDE.md file imports?`,color:`warning`,onCancel:(0,g.useCallback)(()=>{o(`no`)},[o]),hideBorder:!t,hideInputGuide:!t,children:[(0,_.jsx)(i,{children:`This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories.`}),r&&r.length>0&&(0,_.jsxs)(s,{flexDirection:`column`,children:[(0,_.jsx)(i,{dimColor:!0,children:`External imports:`}),r.map((e,t)=>(0,_.jsxs)(i,{dimColor:!0,children:[` `,e.path]},t))]}),(0,_.jsxs)(i,{dimColor:!0,children:[`Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks`,` `,(0,_.jsx)(n,{url:`https://code.claude.com/docs/en/security`}),` `]}),(0,_.jsx)(m,{options:[{label:`Yes, allow external imports`,value:`yes`},{label:`No, disable external imports`,value:`no`}],onChange:e=>o(e)})]})}var g,_,v=e((()=>{g=t(r(),1),d(),o(),u(),p(),_=c()}));export{v as n,h as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./ClaudeMdExternalIncludesDialog-B-GkVoA_.js";e();export{t as ClaudeMdExternalIncludesDialog};
@@ -0,0 +1 @@
1
+ import{Hy as e,Vy as t}from"./loadAgentsDir-ClTeo0nk.js";e();export{t as ConsoleOAuthFlow};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{t as n}from"./semver-Cq33BYay.js";import{Rn as r,b as i,l as a,t as o,x as s,xt as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ct as u,cn as d}from"./state-sIHsFpDu.js";import{Jc as f,Uc as p}from"./paths-DO4WOQtD.js";import{U as m,l as h,p as g,z as _}from"./debug-otxXY3j-.js";import{n as v,t as y}from"./cwd--iizewsn.js";import{r as b,t as x}from"./execFileNoThrow-azCkYhmF.js";import{Fr as S,SE as C,hr as w,wE as T}from"./loadAgentsDir-ClTeo0nk.js";import{n as E,t as D}from"./browser-Bt-ckCaU.js";import{n as O,r as k}from"./semver-Di5OaTd5.js";import{join as A}from"path";import{readdir as j}from"fs/promises";function M(){let e=[process.argv[1]||``,process.execPath||``],t=[`/build-ant/`,`/build-ant-native/`,`/build-external/`,`/build-external-native/`];return e.some(e=>t.some(t=>e.includes(t)))}function N(e){let t=M()?`claude-dev`:`claude`,n=new URL(`${t}://resume`);return n.searchParams.set(`session`,e),n.searchParams.set(`cwd`,y()),n.toString()}async function P(){if(M())return!0;let e=process.platform;if(e===`darwin`)return f(`/Applications/Claude.app`);if(e===`linux`){let{code:e,stdout:t}=await x(`xdg-mime`,[`query`,`default`,`x-scheme-handler/claude`]);return e===0&&t.trim().length>0}else if(e===`win32`){let{code:e}=await x(`reg`,[`query`,`HKEY_CLASSES_ROOT\\claude`,`/ve`]);return e===0}return!1}async function F(){let e=process.platform;if(e===`darwin`){let{code:e,stdout:t}=await x(`defaults`,[`read`,`/Applications/Claude.app/Contents/Info.plist`,`CFBundleShortVersionString`]);if(e!==0)return null;let n=t.trim();return n.length>0?n:null}else if(e===`win32`){let e=process.env.LOCALAPPDATA;if(!e)return null;let t=A(e,`AnthropicClaude`);try{let e=(await j(t)).filter(e=>e.startsWith(`app-`)).map(e=>e.slice(4)).filter(e=>(0,z.coerce)(e)!==null).sort((e,t)=>{let n=(0,z.coerce)(e),r=(0,z.coerce)(t);return n.compare(r)});return e.length>0?e[e.length-1]:null}catch{return null}}return null}async function I(){if(!await P())return{status:`not-installed`};let e;try{e=await F()}catch{return{status:`ready`,version:`unknown`}}if(!e)return{status:`ready`,version:`unknown`};let t=(0,z.coerce)(e);return!t||!O(t.version,B)?{status:`version-too-old`,version:e}:{status:`ready`,version:e}}async function L(e){let t=process.platform;if(g(`Opening deep link: ${e}`),t===`darwin`){if(M()){let{code:t}=await x(`osascript`,[`-e`,`tell application "Electron" to open location "${e}"`]);return t===0}let{code:t}=await x(`open`,[e]);return t===0}else if(t===`linux`){let{code:t}=await x(`xdg-open`,[e]);return t===0}else if(t===`win32`){let{code:t}=await x(`cmd`,[`/c`,`start`,``,e]);return t===0}return!1}async function R(){let e=u();if(!await P())return{success:!1,error:`Claude Desktop is not installed. Install it from https://claude.ai/download`};let t=N(e);return await L(t)?{success:!0,deepLinkUrl:t}:{success:!1,error:`Failed to open Claude Desktop. Please try opening it manually.`,deepLinkUrl:t}}var z,B,V=e((()=>{z=n(),d(),v(),h(),b(),p(),k(),B=`1.1.2396`}));function H(){switch(process.platform){case`win32`:return`https://claude.ai/api/desktop/win32/x64/exe/latest/redirect`;default:return`https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect`}}function U({onDone:e}){let[t,n]=(0,W.useState)(`checking`),[r,o]=(0,W.useState)(null),[l,u]=(0,W.useState)(``);return c(n=>{if(t===`error`){e(r??`Unknown error`,{display:`system`});return}t===`prompt-download`&&(n===`y`||n===`Y`?(E(H()).catch(()=>{}),e(`Starting download. Re-run /desktop once you\u2019ve installed the app.\nLearn more at ${K}`,{display:`system`})):(n===`n`||n===`N`)&&e(`The desktop app is required for /desktop. Learn more at ${K}`,{display:`system`}))}),(0,W.useEffect)(()=>{async function t(){n(`checking`);let t=await I();if(t.status===`not-installed`){u(`Claude Desktop is not installed.`),n(`prompt-download`);return}if(t.status===`version-too-old`){u(`Claude Desktop needs to be updated (found v${t.version}, need v1.1.2396+).`),n(`prompt-download`);return}n(`flushing`),await w(),n(`opening`);let r=await R();if(!r.success){o(r.error??`Failed to open Claude Desktop`),n(`error`);return}n(`success`),setTimeout(async e=>{e(`Session transferred to Claude Desktop`,{display:`system`}),await C(0,`other`)},500,e)}t().catch(e=>{o(_(e)),n(`error`)})},[e]),t===`error`?(0,G.jsxs)(s,{flexDirection:`column`,paddingX:2,children:[(0,G.jsxs)(i,{color:`error`,children:[`Error: `,r]}),(0,G.jsx)(i,{dimColor:!0,children:`Press any key to continue…`})]}):t===`prompt-download`?(0,G.jsxs)(s,{flexDirection:`column`,paddingX:2,children:[(0,G.jsx)(i,{children:l}),(0,G.jsx)(i,{children:`Download now? (y/n)`})]}):(0,G.jsx)(a,{message:{checking:`Checking for Claude Desktop…`,flushing:`Saving session…`,opening:`Opening Claude Desktop…`,success:`Opening in Claude Desktop…`}[t]})}var W,G,K,q=e((()=>{W=t(r(),1),o(),V(),D(),m(),T(),S(),G=l(),K=`https://clau.de/desktop`}));export{q as n,U as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,f as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{CE as s,Ry as c,aS as l,wE as u}from"./loadAgentsDir-ClTeo0nk.js";var d=e(t(),1);i(),u(),c();var f=o();function p({channels:e,onAccept:t}){let[i,o]=d.useState(null);d.useEffect(()=>{if(i!==null){let e=i,t=setTimeout(()=>s(e));return()=>clearTimeout(t)}},[i]);function c(e){switch(e){case`accept`:t();break;case`exit`:o(1);break}}let u=(0,d.useCallback)(()=>{o(0)},[]);return i===null?(0,f.jsxs)(r,{title:`WARNING: Loading development channels`,color:`error`,onCancel:u,children:[(0,f.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,f.jsx)(n,{children:`--dangerously-load-development-channels is for local channel development only. Do not use this option to run channels you have downloaded off the internet.`}),(0,f.jsx)(n,{children:`Please use --channels to run a list of approved channels.`}),(0,f.jsxs)(n,{dimColor:!0,children:[`Channels:`,` `,e.map(e=>e.kind===`plugin`?`plugin:${e.name}@${e.marketplace}`:`server:${e.name}`).join(`, `)]})]}),(0,f.jsx)(l,{options:[{label:`I am using this for local development`,value:`accept`},{label:`Exit`,value:`exit`}],onChange:e=>c(e)})]}):null}export{p as DevChannelsDialog};
@@ -0,0 +1,3 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,Rn as a,b as o,f as s,h as c,m as l,nt as u,t as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{Uc as m,Xc as h}from"./paths-DO4WOQtD.js";import{n as g,t as _}from"./cwd--iizewsn.js";import{T as v,x as y}from"./startupProfiler-CAntGAbs.js";import{l as b,o as x}from"./stringUtils-KZoO4GUd.js";import{DT as S,OT as C,bm as w,dm as T,fm as E,sS as D,uS as O,vm as k,ym as A}from"./loadAgentsDir-ClTeo0nk.js";import{t as j}from"./useKeybinding-DPOUuymz.js";import{t as M}from"./useTerminalSize-Du-EamDN.js";import{resolve as ee}from"path";function N(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(new Map),[i,a]=(0,P.useState)(!0);return(0,P.useEffect)(()=>{let e=!1;async function n(){try{let[n,i]=await Promise.all([k(),A()]);e||(t(n),r(i),a(!1))}catch{e||(t(null),r(new Map),a(!1))}}return n(),()=>{e=!0}},[]),(0,P.useMemo)(()=>{if(!e)return{stats:null,files:[],hunks:new Map,loading:i};let{stats:t,perFileStats:r}=e,a=[];for(let[e,t]of r){let r=n.get(e),i=t.isUntracked??!1,o=!t.isBinary&&!i&&!r,s=t.added+t.removed,c=!o&&!t.isBinary&&s>F;a.push({path:e,linesAdded:t.added,linesRemoved:t.removed,isBinary:t.isBinary,isLargeFile:o,isTruncated:c,isUntracked:i})}return a.sort((e,t)=>e.path.localeCompare(t.path)),{stats:t,files:a,hunks:n,loading:!1}},[e,n,i])}var P,F,I=e((()=>{P=t(a(),1),w(),F=400}));function L(e){if(!e||typeof e!=`object`)return!1;let t=e,n=typeof t.filePath==`string`,r=Array.isArray(t.structuredPatch)&&t.structuredPatch.length>0,i=t.type===`create`&&typeof t.content==`string`;return n&&(r||i)}function te(e){return`type`in e&&(e.type===`create`||e.type===`update`)}function ne(e){let t=0,n=0;for(let r of e)for(let e of r.lines)e.startsWith(`+`)?t++:e.startsWith(`-`)&&n++;return{added:t,removed:n}}function re(e){if(e.type!==`user`)return``;let t=e.message.content,n=typeof t==`string`?t:``;return n.length<=30?n:n.slice(0,29)+`…`}function R(e){let t=0,n=0;for(let r of e.files.values())t+=r.linesAdded,n+=r.linesRemoved;e.stats={filesChanged:e.files.size,linesAdded:t,linesRemoved:n}}function z(e){let t=(0,B.useRef)({completedTurns:[],currentTurn:null,lastProcessedIndex:0,lastTurnIndex:0});return(0,B.useMemo)(()=>{let n=t.current;e.length<n.lastProcessedIndex&&(n.completedTurns=[],n.currentTurn=null,n.lastProcessedIndex=0,n.lastTurnIndex=0);for(let t=n.lastProcessedIndex;t<e.length;t++){let r=e[t];if(!(!r||r.type!==`user`)){if(!(r.toolUseResult||Array.isArray(r.message.content)&&r.message.content[0]?.type===`tool_result`)&&!r.isMeta)n.currentTurn&&n.currentTurn.files.size>0&&(R(n.currentTurn),n.completedTurns.push(n.currentTurn)),n.lastTurnIndex++,n.currentTurn={turnIndex:n.lastTurnIndex,userPromptPreview:re(r),timestamp:r.timestamp,files:new Map,stats:{filesChanged:0,linesAdded:0,linesRemoved:0}};else if(n.currentTurn&&r.toolUseResult){let e=r.toolUseResult;if(L(e)){let{filePath:t,structuredPatch:r}=e,i=`type`in e&&e.type===`create`,a=n.currentTurn.files.get(t);if(a||(a={filePath:t,hunks:[],isNewFile:i,linesAdded:0,linesRemoved:0},n.currentTurn.files.set(t,a)),i&&r.length===0&&te(e)){let t=e.content.split(`
2
+ `),n={oldStart:0,oldLines:0,newStart:1,newLines:t.length,lines:t.map(e=>`+`+e)};a.hunks.push(n),a.linesAdded+=t.length}else{a.hunks.push(...r);let{added:e,removed:t}=ne(r);a.linesAdded+=e,a.linesRemoved+=t}i&&(a.isNewFile=!0)}}}}n.lastProcessedIndex=e.length;let r=[...n.completedTurns];return n.currentTurn&&n.currentTurn.files.size>0&&(R(n.currentTurn),r.push(n.currentTurn)),r.reverse()},[e])}var B,V=e((()=>{B=t(a(),1)}));function H({filePath:e,hunks:t,isLargeFile:n,isBinary:r,isTruncated:a,isUntracked:s}){let{columns:c}=i(),{firstLine:u,fileContent:d}=(0,U.useMemo)(()=>{if(!e)return{firstLine:null,fileContent:void 0};let t=h(ee(_(),e));return{firstLine:t?.split(`
3
+ `)[0]??null,fileContent:t??void 0}},[e]);return s?(0,W.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,W.jsxs)(f,{children:[(0,W.jsx)(o,{bold:!0,children:e}),(0,W.jsx)(o,{dimColor:!0,children:` (untracked)`})]}),(0,W.jsx)(l,{padding:4}),(0,W.jsxs)(f,{flexDirection:`column`,children:[(0,W.jsx)(o,{dimColor:!0,italic:!0,children:`New file not yet staged.`}),(0,W.jsxs)(o,{dimColor:!0,italic:!0,children:["Run `git add ",e,"` to see line counts."]})]})]}):r?(0,W.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,W.jsx)(f,{children:(0,W.jsx)(o,{bold:!0,children:e})}),(0,W.jsx)(l,{padding:4}),(0,W.jsx)(f,{flexDirection:`column`,children:(0,W.jsx)(o,{dimColor:!0,italic:!0,children:`Binary file - cannot display diff`})})]}):n?(0,W.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,W.jsx)(f,{children:(0,W.jsx)(o,{bold:!0,children:e})}),(0,W.jsx)(l,{padding:4}),(0,W.jsx)(f,{flexDirection:`column`,children:(0,W.jsx)(o,{dimColor:!0,italic:!0,children:`Large file - diff exceeds 1 MB limit`})})]}):(0,W.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,W.jsxs)(f,{children:[(0,W.jsx)(o,{bold:!0,children:e}),a&&(0,W.jsx)(o,{dimColor:!0,children:` (truncated)`})]}),(0,W.jsx)(l,{padding:4}),(0,W.jsx)(f,{flexDirection:`column`,children:t.length===0?(0,W.jsx)(o,{dimColor:!0,children:`No diff content`}):t.map((t,n)=>(0,W.jsx)(T,{patch:t,filePath:e,firstLine:u,fileContent:d,dim:!1,width:c-2-2},n))}),a&&(0,W.jsx)(o,{dimColor:!0,italic:!0,children:`… diff truncated (exceeded 400 line limit)`})]})}var U,W,G=e((()=>{U=t(a(),1),M(),d(),g(),m(),E(),W=p()}));function K({files:e,selectedIndex:t}){let{columns:n}=i(),{startIndex:r,endIndex:a}=(0,Y.useMemo)(()=>{if(e.length===0||e.length<=Z)return{startIndex:0,endIndex:e.length};let n=Math.max(0,t-Math.floor(Z/2)),r=n+Z;return r>e.length&&(r=e.length,n=Math.max(0,r-Z)),{startIndex:n,endIndex:r}},[e.length,t]);if(e.length===0)return(0,X.jsx)(o,{dimColor:!0,children:`No changed files`});let s=e.slice(r,a),c=r>0,l=a<e.length,u=e.length>Z,d=Math.max(20,n-16-3-4);return(0,X.jsxs)(f,{flexDirection:`column`,children:[u&&(0,X.jsx)(o,{dimColor:!0,children:c?` ↑ ${r} more ${b(r,`file`)}`:` `}),s.map((e,n)=>(0,X.jsx)(q,{file:e,isSelected:r+n===t,maxPathWidth:d},e.path)),u&&(0,X.jsx)(o,{dimColor:!0,children:l?` ↓ ${e.length-a} more ${b(e.length-a,`file`)}`:` `})]})}function q({file:e,isSelected:t,maxPathWidth:n}){let i=v(e.path,n),a=`${t?r.pointer+` `:` `}${i}`;return(0,X.jsxs)(f,{flexDirection:`row`,children:[(0,X.jsx)(o,{bold:t,color:t?`background`:void 0,inverse:t,children:a}),(0,X.jsx)(f,{flexGrow:1}),(0,X.jsx)(J,{file:e,isSelected:t})]})}function J({file:e,isSelected:t}){return e.isUntracked?(0,X.jsx)(o,{dimColor:!t,italic:!0,children:`untracked`}):e.isBinary?(0,X.jsx)(o,{dimColor:!t,italic:!0,children:`Binary file`}):e.isLargeFile?(0,X.jsx)(o,{dimColor:!t,italic:!0,children:`Large file modified`}):(0,X.jsxs)(o,{children:[e.linesAdded>0&&(0,X.jsxs)(o,{color:`diffAddedWord`,bold:t,children:[`+`,e.linesAdded]}),e.linesAdded>0&&e.linesRemoved>0&&` `,e.linesRemoved>0&&(0,X.jsxs)(o,{color:`diffRemovedWord`,bold:t,children:[`-`,e.linesRemoved]}),e.isTruncated&&(0,X.jsx)(o,{dimColor:!t,children:` (truncated)`})]})}var Y,X,Z,ie=e((()=>{n(),Y=t(a(),1),M(),d(),y(),x(),X=p(),Z=5}));function ae(e){let t=Array.from(e.files.values()).map(e=>({path:e.filePath,linesAdded:e.linesAdded,linesRemoved:e.linesRemoved,isBinary:!1,isLargeFile:!1,isTruncated:!1,isNewFile:e.isNewFile})).sort((e,t)=>e.path.localeCompare(t.path)),n=new Map;for(let t of e.files.values())n.set(t.filePath,t.hunks);return{stats:{filesCount:e.stats.filesChanged,linesAdded:e.stats.linesAdded,linesRemoved:e.stats.linesRemoved},files:t,hunks:n,loading:!1}}function oe({messages:e,onDone:t}){let n=N(),r=z(e),[i,a]=(0,Q.useState)(`list`),[l,d]=(0,Q.useState)(0),[p,m]=(0,Q.useState)(0),h=(0,Q.useMemo)(()=>[{type:`current`},...r.map(e=>({type:`turn`,turn:e}))],[r]),g=h[p],_=g?.type===`turn`?g.turn:null,v=(0,Q.useMemo)(()=>_?ae(_):n,[_,n]),y=v.files[l],x=(0,Q.useMemo)(()=>y&&v.hunks.get(y.path)||[],[y,v.hunks]);(0,Q.useEffect)(()=>{p>=h.length&&m(Math.max(0,h.length-1))},[h.length,p]);let S=(0,Q.useRef)(p);(0,Q.useEffect)(()=>{S.current!==p&&(d(0),S.current=p)},[p]),O(`diff-dialog`),u({"diff:previousSource":()=>{i===`detail`?a(`list`):i===`list`&&h.length>1&&m(e=>Math.max(0,e-1))},"diff:nextSource":()=>{i===`list`&&h.length>1&&m(e=>Math.min(h.length-1,e+1))},"diff:back":()=>{i===`detail`&&a(`list`)},"diff:viewDetails":()=>{i===`list`&&y&&a(`detail`)},"diff:previousFile":()=>{i===`list`&&d(e=>Math.max(0,e-1))},"diff:nextFile":()=>{i===`list`&&d(e=>Math.min(v.files.length-1,e+1))}},{context:`DiffDialog`});let w=v.stats?(0,$.jsxs)(o,{dimColor:!0,children:[v.stats.filesCount,` `,b(v.stats.filesCount,`file`),` changed`,v.stats.linesAdded>0&&(0,$.jsxs)(o,{color:`diffAddedWord`,children:[` +`,v.stats.linesAdded]}),v.stats.linesRemoved>0&&(0,$.jsxs)(o,{color:`diffRemovedWord`,children:[` -`,v.stats.linesRemoved]})]}):null,T=_?`Turn ${_.turnIndex}`:`Uncommitted changes`,E=_?_.userPromptPreview?`"${_.userPromptPreview}"`:``:`(git diff HEAD)`,D=h.length>1?(0,$.jsxs)(f,{children:[p>0&&(0,$.jsx)(o,{dimColor:!0,children:`◀ `}),h.map((e,t)=>{let n=t===p,r=e.type===`current`?`Current`:`T${e.turn.turnIndex}`;return(0,$.jsxs)(o,{dimColor:!n,bold:n,children:[t>0?` · `:``,r]},t)}),p<h.length-1&&(0,$.jsx)(o,{dimColor:!0,children:` ▶`})]}):null,k=C(`diff:dismiss`,`DiffDialog`,`esc`),A=v.loading?`Loading diff…`:_?`No file changes in this turn`:v.stats&&v.stats.filesCount>0&&v.files.length===0?`Too many files to display details`:`Working tree is clean`,j=(0,$.jsxs)(o,{children:[T,E&&(0,$.jsxs)(o,{dimColor:!0,children:[` `,E]})]});function M(){i===`detail`?a(`list`):t(`Diff dialog dismissed`,{display:`system`})}return(0,$.jsxs)(s,{title:j,onCancel:M,color:`background`,inputGuide:e=>e.pending?(0,$.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):i===`list`?(0,$.jsxs)(c,{children:[h.length>1&&(0,$.jsx)(o,{children:`←/→ source`}),(0,$.jsx)(o,{children:`↑/↓ select`}),(0,$.jsx)(o,{children:`Enter view`}),(0,$.jsxs)(o,{children:[k,` close`]})]}):(0,$.jsxs)(c,{children:[(0,$.jsx)(o,{children:`← back`}),(0,$.jsxs)(o,{children:[k,` close`]})]}),children:[D,w,v.files.length===0?(0,$.jsx)(f,{marginTop:1,children:(0,$.jsx)(o,{dimColor:!0,children:A})}):i===`list`?(0,$.jsx)(f,{flexDirection:`column`,marginTop:1,children:(0,$.jsx)(K,{files:v.files,selectedIndex:l})}):(0,$.jsx)(f,{flexDirection:`column`,marginTop:1,children:(0,$.jsx)(H,{filePath:y?.path||``,hunks:x,isLargeFile:y?.isLargeFile,isBinary:y?.isBinary,isTruncated:y?.isTruncated,isUntracked:y?.isUntracked})})]})}var Q,$;e((()=>{Q=t(a(),1),D(),I(),V(),d(),j(),S(),x(),G(),ie(),$=p()}))();export{oe as DiffDialog};
@@ -0,0 +1,3 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{Rn as o,b as s,nt as c,p as l,t as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{cn as p,ot as ee}from"./state-sIHsFpDu.js";import{Ao as m,Do as h,Dr as g,Jc as _,Ka as v,Pr as y,Uc as b,cr as te,dr as x,oo as S}from"./paths-DO4WOQtD.js";import{l as C,o as w}from"./stringUtils-KZoO4GUd.js";import{FA as T,FT as E,IT as D,JT as ne,KT as O,Kk as k,MA as A,NT as re,PT as ie,Qk as ae,XT as oe,Xc as j,Xk as se,YT as ce,Yc as M,Yk as N,_h as P,_x as F,bh as I,bx as L,cj as R,dl as z,dp as B,lC as V,lp as H,qT as U,sj as W,uC as G,ul as le,up as ue,vh as de,vx as fe,xh as pe,yh as me,yx as he}from"./loadAgentsDir-ClTeo0nk.js";import{t as ge}from"./useKeybinding-DPOUuymz.js";import{n as _e,t as ve}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{a as ye,i as be}from"./xdg-BFD9ydDV.js";import{n as xe,t as Se}from"./McpParsingWarnings-DMFUZw92.js";import{n as Ce,t as we}from"./PressEnterToContinue-BJ58eCFC.js";import{n as Te,t as Ee}from"./ValidationErrorsList-CfgC1KJb.js";import{n as De,t as Oe}from"./useSettingsErrors-CjK3P-Ki.js";import{n as ke,t as Ae}from"./shadowedRuleDetection-DASW3j9H.js";import{n as je,r as Me,t as K}from"./statusNoticeHelpers-DuqyBY-N.js";import{join as q}from"path";function Ne(){if(!D())return null;let e=re();if(e.length===0)return null;let t=e.filter(e=>e.severity===`error`),n=e.filter(e=>e.severity===`warning`);return(0,J.jsxs)(d,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,J.jsx)(s,{bold:!0,color:t.length>0?`error`:`warning`,children:`Keybinding Configuration Issues`}),(0,J.jsxs)(d,{children:[(0,J.jsx)(s,{dimColor:!0,children:`Location: `}),(0,J.jsx)(s,{dimColor:!0,children:ie()})]}),(0,J.jsxs)(d,{marginLeft:1,flexDirection:`column`,marginTop:1,children:[t.map((e,t)=>(0,J.jsxs)(d,{flexDirection:`column`,children:[(0,J.jsxs)(d,{children:[(0,J.jsx)(s,{dimColor:!0,children:`└ `}),(0,J.jsx)(s,{color:`error`,children:`[Error]`}),(0,J.jsxs)(s,{dimColor:!0,children:[` `,e.message]})]}),e.suggestion&&(0,J.jsx)(d,{marginLeft:3,children:(0,J.jsxs)(s,{dimColor:!0,children:[`→ `,e.suggestion]})})]},`error-${t}`)),n.map((e,t)=>(0,J.jsxs)(d,{flexDirection:`column`,children:[(0,J.jsxs)(d,{children:[(0,J.jsx)(s,{dimColor:!0,children:`└ `}),(0,J.jsx)(s,{color:`warning`,children:`[Warning]`}),(0,J.jsxs)(s,{dimColor:!0,children:[` `,e.message]})]}),e.suggestion&&(0,J.jsx)(d,{marginLeft:3,children:(0,J.jsxs)(s,{dimColor:!0,children:[`→ `,e.suggestion]})})]},`warning-${t}`))]})]})}var J,Pe=e((()=>{o(),u(),E(),J=f()}));function Fe(){if(!A.isSupportedPlatform()||!A.isSandboxEnabledInSettings())return null;let e=A.checkDependencies(),t=e.errors.length>0,n=e.warnings.length>0;return!t&&!n?null:(0,Y.jsxs)(d,{flexDirection:`column`,children:[(0,Y.jsx)(s,{bold:!0,children:`Sandbox`}),(0,Y.jsxs)(s,{children:[`└ Status: `,(0,Y.jsx)(s,{color:t?`error`:`warning`,children:t?`Missing dependencies`:`Available (with warnings)`})]}),e.errors.map((e,t)=>(0,Y.jsxs)(s,{color:`error`,children:[`└ `,e]},t)),e.warnings.map((e,t)=>(0,Y.jsxs)(s,{color:`warning`,children:[`└ `,e]},t)),t&&(0,Y.jsx)(s,{dimColor:!0,children:`└ Run /sandbox for install instructions`})]})}var Y,Ie=e((()=>{o(),u(),T(),Y=f()}));async function Le(){let e=N(await se());if(e.length===0)return null;let t=e.sort((e,t)=>t.content.length-e.content.length).map(e=>`${e.path}: ${e.content.length.toLocaleString()} chars`);return{type:`claudemd_files`,severity:`warning`,message:e.length===1?`Large CLAUDE.md file detected (${e[0].content.length.toLocaleString()} chars > ${k.toLocaleString()})`:`${e.length} large CLAUDE.md files detected (each > ${k.toLocaleString()} chars)`,details:t,currentValue:e.length,threshold:k}}async function X(e){if(!e)return null;let t=je(e);if(t<=15e3)return null;let n=e.activeAgents.filter(e=>e.source!==`built-in`).map(e=>{let t=`${e.agentType}: ${e.whenToUse}`;return{name:e.agentType,tokens:j(t)}}).sort((e,t)=>t.tokens-e.tokens),r=n.slice(0,5).map(e=>`${e.name}: ~${e.tokens.toLocaleString()} tokens`);return n.length>5&&r.push(`(${n.length-5} more custom agents)`),{type:`agent_descriptions`,severity:`warning`,message:`Large agent descriptions (~${t.toLocaleString()} tokens > ${K.toLocaleString()})`,details:r,currentValue:t,threshold:K}}async function Re(e,t,n){let r=e.filter(e=>e.isMcp);if(r.length===0)return null;try{let{mcpToolTokens:r,mcpToolDetails:i}=await le(e,t,n,g());if(r<=Z)return null;let a=new Map;for(let e of i){let t=e.name.split(`__`)[1]||`unknown`,n=a.get(t)||{count:0,tokens:0};a.set(t,{count:n.count+1,tokens:n.tokens+e.tokens})}let o=Array.from(a.entries()).sort((e,t)=>t[1].tokens-e[1].tokens),s=o.slice(0,5).map(([e,t])=>`${e}: ${t.count} tools (~${t.tokens.toLocaleString()} tokens)`);return o.length>5&&s.push(`(${o.length-5} more servers)`),{type:`mcp_tools`,severity:`warning`,message:`Large MCP tools context (~${r.toLocaleString()} tokens > ${Z.toLocaleString()})`,details:s,currentValue:r,threshold:Z}}catch{let e=r.reduce((e,t)=>e+j(((t.name?.length||0)+t.description.length).toString()),0);return e<=Z?null:{type:`mcp_tools`,severity:`warning`,message:`Large MCP tools context (~${e.toLocaleString()} tokens estimated > ${Z.toLocaleString()})`,details:[`${r.length} MCP tools detected (token count estimated)`],currentValue:e,threshold:Z}}}async function ze(e){let t=Ae(await e(),{sandboxAutoAllowEnabled:A.isSandboxingEnabled()&&A.isAutoAllowBashIfSandboxedEnabled()});if(t.length===0)return null;let n=t.flatMap(e=>[`${m(e.rule.ruleValue)}: ${e.reason}`,` Fix: ${e.fix}`]);return{type:`unreachable_rules`,severity:`warning`,message:`${t.length} ${C(t.length,`unreachable permission rule`)} detected`,details:n,currentValue:t.length,threshold:0}}async function Be(e,t,n){let[r,i,a,o]=await Promise.all([Le(),X(t),Re(e,n,t),ze(n)]);return{claudeMdWarning:r,agentWarning:i,mcpWarning:a,unreachableRulesWarning:o}}var Z,Ve=e((()=>{M(),z(),ae(),y(),h(),ke(),T(),Me(),w(),Z=25e3}));function He({promise:e}){let t=(0,Q.use)(e);return t.latest?(0,$.jsxs)($.Fragment,{children:[t.stable&&(0,$.jsxs)(s,{children:[`└ Stable version: `,t.stable]}),(0,$.jsxs)(s,{children:[`└ Latest version: `,t.latest]})]}):(0,$.jsx)(s,{dimColor:!0,children:`└ Failed to fetch versions`})}function Ue({onDone:e}){let t=G(e=>e.agentDefinitions),r=G(e=>e.mcp.tools),i=G(e=>e.toolPermissionContext),o=G(e=>e.plugins.errors);_e();let u=(0,Q.useMemo)(()=>r||[],[r]),[f,p]=(0,Q.useState)(null),[m,h]=(0,Q.useState)(null),[g,y]=(0,Q.useState)(null),[b,x]=(0,Q.useState)(null),S=De(),C=(0,Q.useMemo)(()=>O().then(e=>(e.installationType===`native`?ne:ce)().catch(()=>({latest:null,stable:null}))),[]),w=v()?.autoUpdatesChannel??`latest`,T=S.filter(e=>e.mcpErrorMetadata===void 0),E=(0,Q.useMemo)(()=>[{name:`BASH_MAX_OUTPUT_LENGTH`,default:P,upperLimit:de},{name:`TASK_MAX_OUTPUT_LENGTH`,default:H,upperLimit:ue},{name:`CLAUDE_CODE_MAX_OUTPUT_TOKENS`,...te(`claude-opus-4-7`)}].map(e=>{let t=process.env[e.name],n=pe(e.name,t,e.default,e.upperLimit);return{name:e.name,...n}}).filter(e=>e.status!==`valid`),[]);(0,Q.useEffect)(()=>{O().then(p),(async()=>{let e=q(n(),`agents`),r=q(ee(),`.claude`,`agents`),{activeAgents:a,allAgents:o,failedFiles:s}=t,[c,l]=await Promise.all([_(e),_(r)]);if(h({activeAgents:a.map(e=>({agentType:e.agentType,source:e.source})),userAgentsDir:e,projectAgentsDir:r,userDirExists:c,projectDirExists:l,failedFiles:s}),y(await Be(u,{activeAgents:a,allAgents:o,failedFiles:s},async()=>i)),L()){let e=q(be(),`claude`,`locks`),t=F(e);x({enabled:!0,locks:fe(e),locksDir:e,staleLocksCleaned:t})}else x({enabled:!1,locks:[],locksDir:``,staleLocksCleaned:0})})()},[i,u,t]);let D=(0,Q.useCallback)(()=>{e(`Claude Code diagnostics dismissed`,{display:`system`})},[e]);return c({"confirm:yes":D,"confirm:no":D},{context:`Confirmation`}),f?(0,$.jsxs)(l,{children:[(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Diagnostics`}),(0,$.jsxs)(s,{children:[`└ Currently running: `,f.installationType,` (`,f.version,`)`]}),f.packageManager&&(0,$.jsxs)(s,{children:[`└ Package manager: `,f.packageManager]}),(0,$.jsxs)(s,{children:[`└ Path: `,f.installationPath]}),(0,$.jsxs)(s,{children:[`└ Invoked: `,f.invokedBinary]}),(0,$.jsxs)(s,{children:[`└ Config install method: `,f.configInstallMethod]}),(0,$.jsxs)(s,{children:[`└ Search: `,f.ripgrepStatus.working?`OK`:`Not working`,` (`,f.ripgrepStatus.mode===`embedded`?`bundled`:f.ripgrepStatus.mode===`builtin`?`vendor`:f.ripgrepStatus.systemPath||`system`,`)`]}),f.ripgrepStatus.note&&(0,$.jsxs)(s,{color:`warning`,children:[`└ Note: `,f.ripgrepStatus.note]}),f.recommendation&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{}),(0,$.jsxs)(s,{color:`warning`,children:[`Recommendation: `,f.recommendation.split(`
2
+ `)[0]]}),(0,$.jsx)(s,{dimColor:!0,children:f.recommendation.split(`
3
+ `)[1]})]}),f.multipleInstallations.length>1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{}),(0,$.jsx)(s,{color:`warning`,children:`Warning: Multiple installations found`}),f.multipleInstallations.map((e,t)=>(0,$.jsxs)(s,{children:[`└ `,e.type,` at `,e.path]},t))]}),f.warnings.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{}),f.warnings.map((e,t)=>(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsxs)(s,{color:`warning`,children:[`Warning: `,e.issue]}),(0,$.jsxs)(s,{children:[`Fix: `,e.fix]})]},t))]}),T.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,$.jsx)(s,{bold:!0,children:`Invalid Settings`}),(0,$.jsx)(Ee,{errors:T})]})]}),(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Updates`}),(0,$.jsxs)(s,{children:[`└ Auto-updates: `,f.packageManager?`Managed by package manager`:f.autoUpdates]}),f.hasUpdatePermissions!==null&&(0,$.jsxs)(s,{children:[`└ Update permissions: `,f.hasUpdatePermissions?`Yes`:`No (requires sudo)`]}),(0,$.jsxs)(s,{children:[`└ Auto-update channel: `,w]}),(0,$.jsx)(Q.Suspense,{fallback:null,children:(0,$.jsx)(He,{promise:C})})]}),(0,$.jsx)(Fe,{}),(0,$.jsx)(Se,{}),(0,$.jsx)(Ne,{}),E.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Environment Variables`}),E.map((e,t)=>(0,$.jsxs)(s,{children:[`└ `,e.name,`:`,` `,(0,$.jsx)(s,{color:e.status===`capped`?`warning`:`error`,children:e.message})]},t))]}),b?.enabled&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Version Locks`}),b.staleLocksCleaned>0&&(0,$.jsxs)(s,{dimColor:!0,children:[`└ Cleaned `,b.staleLocksCleaned,` stale lock(s)`]}),b.locks.length===0?(0,$.jsx)(s,{dimColor:!0,children:`└ No active version locks`}):b.locks.map((e,t)=>(0,$.jsxs)(s,{children:[`└ `,e.version,`: PID `,e.pid,` `,e.isProcessRunning?(0,$.jsx)(s,{children:`(running)`}):(0,$.jsx)(s,{color:`warning`,children:`(stale)`})]},t))]}),m?.failedFiles&&m.failedFiles.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,color:`error`,children:`Agent Parse Errors`}),(0,$.jsxs)(s,{color:`error`,children:[`└ Failed to parse `,m.failedFiles.length,` agent file(s):`]}),m.failedFiles.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e.path,`: `,e.error]},t))]}),o.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,color:`error`,children:`Plugin Errors`}),(0,$.jsxs)(s,{color:`error`,children:[`└ `,o.length,` plugin error(s) detected:`]}),o.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e.source||`unknown`,`plugin`in e&&e.plugin?` [${e.plugin}]`:``,`: `,W(e)]},t))]}),g?.unreachableRulesWarning&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,color:`warning`,children:`Unreachable Permission Rules`}),(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,g.unreachableRulesWarning.message]})]}),g.unreachableRulesWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]}),g&&(g.claudeMdWarning||g.agentWarning||g.mcpWarning)&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Context Usage Warnings`}),g.claudeMdWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,g.claudeMdWarning.message]})]}),(0,$.jsxs)(s,{children:[` `,`└ Files:`]}),g.claudeMdWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]}),g.agentWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,g.agentWarning.message]})]}),(0,$.jsxs)(s,{children:[` `,`└ Top contributors:`]}),g.agentWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]}),g.mcpWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,g.mcpWarning.message]})]}),(0,$.jsxs)(s,{children:[` `,`└ MCP servers:`]}),g.mcpWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]})]}),(0,$.jsx)(d,{children:(0,$.jsx)(we,{})})]}):(0,$.jsx)(l,{children:(0,$.jsx)(s,{dimColor:!0,children:`Checking installation status…`})})}var Q,$,We=e((()=>{i(),Q=t(o(),1),Pe(),xe(),x(),r(),p(),u(),Ce(),Ie(),Te(),Oe(),ve(),ge(),V(),R(),oe(),Ve(),U(),I(),b(),he(),S(),me(),B(),ye(),$=f()}));export{We as n,Ue as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./Doctor-Cr_MlSPc.js";e();export{t as Doctor};
@@ -0,0 +1,2 @@
1
+ import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{Rn as r,b as i,f as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{fl as l,pl as u}from"./paths-DO4WOQtD.js";import{l as d,p as f}from"./debug-otxXY3j-.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{r as h,t as g}from"./execFileNoThrow-azCkYhmF.js";import{Ai as _,At as v,Fr as y,Ky as b,Ot as x,SE as S,Tt as C,Wy as w,_y as T,aS as E,jt as D,mh as O,oS as k,ph as A,vt as j,vy as M,wE as N}from"./loadAgentsDir-ClTeo0nk.js";function P(){(y(),e(_)).saveWorktreeState(null)}function F({onDone:e,onCancel:t}){let[n,r]=(0,I.useState)(`loading`),[o,c]=(0,I.useState)([]),[l,u]=(0,I.useState)(0),[d,p]=(0,I.useState)(),h=C();if((0,I.useEffect)(()=>{async function e(){let e=[],t=await g(`git`,[`status`,`--porcelain`]);if(t.stdout&&(e=t.stdout.split(`
2
+ `).filter(e=>e.trim()!==``),c(e)),h){let{stdout:t}=await g(`git`,[`rev-list`,`--count`,`${h.originalHeadCommit}..HEAD`]),n=parseInt(t.trim(),10)||0;if(u(n),e.length===0&&n===0){r(`removing`),j().then(()=>{process.chdir(h.originalCwd),O(h.originalCwd),P(),T.cache.clear?.(),p(`Worktree removed (no changes)`)}).catch(e=>{f(`Failed to clean up worktree: ${e}`,{level:`error`}),p(`Worktree cleanup failed, exiting anyway`)}).then(()=>{r(`done`)});return}else r(`asking`)}}e()},[h]),(0,I.useEffect)(()=>{n===`done`&&e(d)},[n,e,d]),!h)return e(`No active worktree session found`,{display:`system`}),null;if(n===`loading`||n===`done`)return null;async function _(e){if(!h)return;let t=!!h.tmuxSessionName;if(e===`keep`||e===`keep-with-tmux`)r(`keeping`),m(`tengu_worktree_kept`,{commits:l,changed_files:o.length}),await v(),process.chdir(h.originalCwd),O(h.originalCwd),P(),T.cache.clear?.(),p(t?`Worktree kept. Your work is saved at ${h.worktreePath} on branch ${h.worktreeBranch}. Reattach to tmux session with: tmux attach -t ${h.tmuxSessionName}`:`Worktree kept. Your work is saved at ${h.worktreePath} on branch ${h.worktreeBranch}`),r(`done`);else if(e===`keep-kill-tmux`)r(`keeping`),m(`tengu_worktree_kept`,{commits:l,changed_files:o.length}),h.tmuxSessionName&&await D(h.tmuxSessionName),await v(),process.chdir(h.originalCwd),O(h.originalCwd),P(),T.cache.clear?.(),p(`Worktree kept at ${h.worktreePath} on branch ${h.worktreeBranch}. Tmux session terminated.`),r(`done`);else if(e===`remove`||e===`remove-with-tmux`){r(`removing`),m(`tengu_worktree_removed`,{commits:l,changed_files:o.length}),h.tmuxSessionName&&await D(h.tmuxSessionName);try{await j(),process.chdir(h.originalCwd),O(h.originalCwd),P(),T.cache.clear?.()}catch(e){f(`Failed to clean up worktree: ${e}`,{level:`error`}),p(`Worktree cleanup failed, exiting anyway`),r(`done`);return}let e=t?` Tmux session terminated.`:``;l>0&&o.length>0?p(`Worktree removed. ${l} ${l===1?`commit`:`commits`} and uncommitted changes were discarded.${e}`):l>0?p(`Worktree removed. ${l} ${l===1?`commit`:`commits`} on ${h.worktreeBranch} ${l===1?`was`:`were`} discarded.${e}`):o.length>0?p(`Worktree removed. Uncommitted changes were discarded.${e}`):p(`Worktree removed.${e}`),r(`done`)}}if(n===`keeping`)return(0,L.jsxs)(s,{flexDirection:`row`,marginY:1,children:[(0,L.jsx)(w,{}),(0,L.jsx)(i,{children:`Keeping worktree…`})]});if(n===`removing`)return(0,L.jsxs)(s,{flexDirection:`row`,marginY:1,children:[(0,L.jsx)(w,{}),(0,L.jsx)(i,{children:`Removing worktree…`})]});let y=h.worktreeBranch,b=o.length>0,x=l>0,S=``;S=b&&x?`You have ${o.length} uncommitted ${o.length===1?`file`:`files`} and ${l} ${l===1?`commit`:`commits`} on ${y}. All will be lost if you remove.`:b?`You have ${o.length} uncommitted ${o.length===1?`file`:`files`}. These will be lost if you remove the worktree.`:x?`You have ${l} ${l===1?`commit`:`commits`} on ${y}. The branch will be deleted if you remove the worktree.`:`You are working in a worktree. Keep it to continue working there, or remove it to clean up.`;function k(){if(t){t();return}_(`keep`)}let A=b||x?`All changes and commits will be lost.`:`Clean up the worktree directory.`,M=!!h.tmuxSessionName,N=M?[{label:`Keep worktree and tmux session`,value:`keep-with-tmux`,description:`Stays at ${h.worktreePath}. Reattach with: tmux attach -t ${h.tmuxSessionName}`},{label:`Keep worktree, kill tmux session`,value:`keep-kill-tmux`,description:`Keeps worktree at ${h.worktreePath}, terminates tmux session.`},{label:`Remove worktree and tmux session`,value:`remove-with-tmux`,description:A}]:[{label:`Keep worktree`,value:`keep`,description:`Stays at ${h.worktreePath}`},{label:`Remove worktree`,value:`remove`,description:A}];return(0,L.jsx)(a,{title:`Exiting worktree session`,subtitle:S,onCancel:k,children:(0,L.jsx)(E,{defaultFocusValue:M?`keep-with-tmux`:`keep`,options:N,onChange:_})})}var I,L,R=t((()=>{I=n(r(),1),p(),d(),o(),h(),M(),A(),x(),k(),b(),L=c()}));function z(){return u(H)??`Goodbye!`}function B({showWorktree:e,onDone:t,onCancel:n}){async function r(e){t(e??z()),await S(0,`prompt_input_exit`)}return e?(0,V.jsx)(F,{onDone:r,onCancel:n}):null}var V,H,U=t((()=>{l(),r(),N(),R(),V=c(),H=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}));export{U as n,B as t};
@@ -0,0 +1,2 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{F as i,Rn as a,b as o,f as s,g as c,h as l,t as u,tt as d,x as f,xt as ee}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,q as h}from"./state-sIHsFpDu.js";import{F as te,M as g,Pt as _,St as v,bt as y,on as b,wt as x}from"./paths-DO4WOQtD.js";import{E as S,O as C,l as w,p as T}from"./debug-otxXY3j-.js";import{n as E,r as ne}from"./analytics-DqMQntaB.js";import{c as D,f as re,v as O}from"./git-C0IuvuIy.js";import{a as k,n as A}from"./env-C2A9gV_G.js";import{d as j,f as ie,i as ae,o as oe,s as M}from"./log-DSV4Ht5l.js";import{Ar as se,DC as ce,EC as N,Fr as P,No as F,Qo as I,Uo as L,ck as R,dS as z,ek as B,fS as V,fr as H,nt as U,qr as W,tk as G,tt as le}from"./loadAgentsDir-ClTeo0nk.js";import{X as ue}from"./rcDebugLog-CwU_wJBE.js";import{n as de,t as fe}from"./browser-Bt-ckCaU.js";import{t as pe}from"./useKeybinding-DPOUuymz.js";import{t as me}from"./useTerminalSize-Du-EamDN.js";import{readFile as he,stat as ge}from"fs/promises";function K(e){let t=e;return t=t.replace(/"(sk-ant[^\s"']{24,})"/g,`"[REDACTED_API_KEY]"`),t=t.replace(/(?<![A-Za-z0-9"'])(sk-ant-?[A-Za-z0-9_-]{10,})(?![A-Za-z0-9"'])/g,`[REDACTED_API_KEY]`),t=t.replace(/AWS key: "(AWS[A-Z0-9]{20,})"/g,`AWS key: "[REDACTED_AWS_KEY]"`),t=t.replace(/(AKIA[A-Z0-9]{16})/g,`[REDACTED_AWS_KEY]`),t=t.replace(/(?<![A-Za-z0-9])(AIza[A-Za-z0-9_-]{35})(?![A-Za-z0-9])/g,`[REDACTED_GCP_KEY]`),t=t.replace(/(?<![A-Za-z0-9])([a-z0-9-]+@[a-z0-9-]+\.iam\.gserviceaccount\.com)(?![A-Za-z0-9])/g,`[REDACTED_GCP_SERVICE_ACCOUNT]`),t=t.replace(/(["']?x-api-key["']?\s*[:=]\s*["']?)[^"',\s)}\]]+/gi,`$1[REDACTED_API_KEY]`),t=t.replace(/(["']?authorization["']?\s*[:=]\s*["']?(bearer\s+)?)[^"',\s)}\]]+/gi,`$1[REDACTED_TOKEN]`),t=t.replace(/(AWS[_-][A-Za-z0-9_]+\s*[=:]\s*)["']?[^"',\s)}\]]+["']?/gi,`$1[REDACTED_AWS_VALUE]`),t=t.replace(/(GOOGLE[_-][A-Za-z0-9_]+\s*[=:]\s*)["']?[^"',\s)}\]]+["']?/gi,`$1[REDACTED_GCP_VALUE]`),t=t.replace(/((API[-_]?KEY|TOKEN|SECRET|PASSWORD)\s*[=:]\s*)["']?[^"',\s)}\]]+["']?/gi,`$1[REDACTED]`),t}function q(){return ae().map(e=>{let t={...e};return t&&typeof t.error==`string`&&(t.error=K(t.error)),t})}async function _e(){try{let e=se(),{size:t}=await ge(e);return t>52428800?(T(`Skipping raw transcript read: file too large (${t} bytes)`,{level:`warn`}),null):await he(e,`utf-8`)}catch{return null}}function ve({abortSignal:e,messages:t,initialDescription:n,onDone:r,backgroundTasks:a={}}){let[u,p]=(0,X.useState)(`userInput`),[m,g]=(0,X.useState)(0),[_,v]=(0,X.useState)(n??``),[y,b]=(0,X.useState)(null),[x,S]=(0,X.useState)(null),[C,w]=(0,X.useState)({isGit:!1,gitState:null}),[T,E]=(0,X.useState)(null),O=i().columns-4;(0,X.useEffect)(()=>{async function e(){let e=await re(),t=null;e&&(t=await D()),w({isGit:e,gitState:t})}e()},[]);let k=(0,X.useCallback)(async()=>{p(`submitting`),S(null),b(null);let n=q(),r=F(t)?.requestId??null,[i,o]=await Promise.all([W(),_e()]),s=H(a),c={...i,...s},l={latestAssistantMessageId:r,message_count:t.length,datetime:new Date().toISOString(),description:_,platform:A.platform,gitRepo:C.isGit,terminal:A.terminal,version:`2.7.2`,transcript:I(t),errors:n,lastApiRequest:h(),...Object.keys(c).length>0&&{subagentTranscripts:c},...o&&{rawTranscriptJsonl:o}},[u,d]=await Promise.all([xe(l,e),be(_,e)]);E(d),u.success?(u.feedbackId&&(b(u.feedbackId),ne(`tengu_bug_report_submitted`,{feedback_id:u.feedbackId,last_assistant_message_id:r}),te(`tengu_bug_report_description`,{feedback_id:u.feedbackId,description:K(_)})),p(`done`)):(u.isZdrOrg?S(`Feedback collection is not available for organizations with custom data retention policies.`):S(`Could not submit feedback. Please try again later.`),p(`userInput`))},[_,C.isGit,t]),j=(0,X.useCallback)(()=>{if(u===`done`){r(x?`Error submitting feedback / bug report`:`Feedback / bug report submitted`,{display:`system`});return}r(`Feedback / bug report cancelled`,{display:`system`})},[u,x,r]);return d(`confirm:no`,j,{context:`Settings`,isActive:u===`userInput`}),ee((e,t)=>{if(u===`done`){t.return&&T&&de(ye(y??``,T,_,q())),r(x?`Error submitting feedback / bug report`:`Feedback / bug report submitted`,{display:`system`});return}if(x&&u!==`userInput`){r(`Error submitting feedback / bug report`,{display:`system`});return}u===`consent`&&(t.return||e===` `)&&k()}),(0,Z.jsxs)(s,{title:`Submit Feedback / Bug Report`,onCancel:j,isCancelActive:u!==`userInput`,inputGuide:e=>e.pending?(0,Z.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):u===`userInput`?(0,Z.jsxs)(l,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`continue`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}):u===`consent`?(0,Z.jsxs)(l,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`submit`}),(0,Z.jsx)(N,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}):null,children:[u===`userInput`&&(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsx)(o,{children:`Describe the issue below:`}),(0,Z.jsx)(z,{value:_,onChange:e=>{v(e),x&&S(null)},columns:O,onSubmit:()=>p(`consent`),onExitMessage:()=>r(`Feedback cancelled`,{display:`system`}),cursorOffset:m,onChangeCursorOffset:g,showCursor:!0}),x&&(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsx)(o,{color:`error`,children:x}),(0,Z.jsx)(o,{dimColor:!0,children:`Edit and press Enter to retry, or Esc to cancel`})]})]}),u===`consent`&&(0,Z.jsxs)(f,{flexDirection:`column`,children:[(0,Z.jsx)(o,{children:`This report will include:`}),(0,Z.jsxs)(f,{marginLeft:2,flexDirection:`column`,children:[(0,Z.jsxs)(o,{children:[`- Your feedback / bug description: `,(0,Z.jsx)(o,{dimColor:!0,children:_})]}),(0,Z.jsxs)(o,{children:[`- Environment info:`,` `,(0,Z.jsxs)(o,{dimColor:!0,children:[A.platform,`, `,A.terminal,`, v`,`2.7.2`]})]}),C.gitState&&(0,Z.jsxs)(o,{children:[`- Git repo metadata:`,` `,(0,Z.jsxs)(o,{dimColor:!0,children:[C.gitState.branchName,C.gitState.commitHash?`, ${C.gitState.commitHash.slice(0,7)}`:``,C.gitState.remoteUrl?` @ ${C.gitState.remoteUrl}`:``,!C.gitState.isHeadOnRemote&&`, not synced`,!C.gitState.isClean&&`, has local changes`]})]}),(0,Z.jsx)(o,{children:`- Current session transcript`})]}),(0,Z.jsx)(f,{marginTop:1,children:(0,Z.jsx)(o,{wrap:`wrap`,dimColor:!0,children:`We will use your feedback to debug related issues or to improve Claude Code's functionality (eg. to reduce the risk of bugs occurring in the future).`})}),(0,Z.jsx)(f,{marginTop:1,children:(0,Z.jsxs)(o,{children:[`Press `,(0,Z.jsx)(o,{bold:!0,children:`Enter`}),` to confirm and submit.`]})})]}),u===`submitting`&&(0,Z.jsx)(f,{flexDirection:`row`,gap:1,children:(0,Z.jsx)(o,{children:`Submitting report…`})}),u===`done`&&(0,Z.jsxs)(f,{flexDirection:`column`,children:[x?(0,Z.jsx)(o,{color:`error`,children:x}):(0,Z.jsx)(o,{color:`success`,children:`Thank you for your report!`}),y&&(0,Z.jsxs)(o,{dimColor:!0,children:[`Feedback ID: `,y]}),(0,Z.jsxs)(f,{marginTop:1,children:[(0,Z.jsx)(o,{children:`Press `}),(0,Z.jsx)(o,{bold:!0,children:`Enter `}),(0,Z.jsx)(o,{children:`to open your browser and draft a GitHub issue, or any other key to close.`})]})]})]})}function ye(e,t,n,r){let i=K(t),a=`**Bug Description**\n${K(n)}\n\n**Environment Info**\n- Platform: ${A.platform}\n- Terminal: ${A.terminal}\n- Version: 2.7.2\n- Feedback ID: ${e}\n\n**Errors**\n\`\`\`json\n`,o=C(r),s=`${$}/new?title=${encodeURIComponent(i)}&labels=user-reported,bug&body=`,c=encodeURIComponent(a),l=encodeURIComponent(o),u=Q-s.length-c.length-15-46;if(u<=0){let e=Q-s.length-9-46-50,t=a+o+"\n```\n",n=encodeURIComponent(t);if(n.length>e){n=n.slice(0,e);let t=n.lastIndexOf(`%`);t>=n.length-2&&(n=n.slice(0,t))}return s+n+`%E2%80%A6%0A**Note%3A**%20Content%20was%20truncated.%0A`}if(l.length<=u)return s+c+l+`%0A%60%60%60%0A`;let d=l.slice(0,u-9-50),f=d.lastIndexOf(`%`);return f>=d.length-2&&(d=d.slice(0,f)),s+c+d+`%E2%80%A6%0A%60%60%60%0A%0A**Note%3A**%20Content%20was%20truncated.%0A`}async function be(e,t){try{let n=(await U({systemPrompt:ue([`Generate a concise, technical issue title (max 80 chars) for a public GitHub issue based on this bug report for Claude Code.`,`Claude Code is an agentic coding CLI based on the Anthropic API.`,`The title should:`,`- Include the type of issue [Bug] or [Feature Request] as the first thing in the title`,`- Be concise, specific and descriptive of the actual problem`,`- Use technical terminology appropriate for a software issue`,`- For error messages, extract the key error (e.g., "Missing Tool Result Block" rather than the full message)`,`- Be direct and clear for developers to understand the problem`,`- If you cannot determine a clear issue, use "Bug Report: [brief description]"`,`- Any LLM API errors are from the Anthropic API, not from any other model provider`,`Your response will be directly used as the title of the Github issue, and as such should not contain any other commentary or explaination`,`Examples of good titles include: "[Bug] Auto-Compact triggers to soon", "[Bug] Anthropic API Error: Missing Tool Result Block", "[Bug] Error: Invalid Model Name for Opus"`]),userPrompt:e,signal:t,options:{hasAppendSystemPrompt:!1,toolChoice:void 0,isNonInteractiveSession:!1,agents:[],querySource:`feedback`,mcpTools:[]}}))?.message?.content?.[0],r=n?.type===`text`?n.text:`Bug Report`;return G(r)?J(e):r}catch(t){return M(t),J(e)}}function J(e){let t=e.split(`
2
+ `)[0]||``;if(t.length<=60&&t.length>5)return t;let n=t.slice(0,60);if(t.length>60){let e=n.lastIndexOf(` `);e>30&&(n=n.slice(0,e)),n+=`...`}return n.length<10?`Bug Report`:n}function Y(e){if(e instanceof Error){let t=Error(K(e.message));e.stack&&(t.stack=K(e.stack)),M(t)}else{let t=K(String(e));M(Error(t))}}async function xe(e,t){if(ie())return{success:!1};try{await _();let r=y();if(r.error)return{success:!1};let i={"Content-Type":`application/json`,"User-Agent":v(),...r.headers},a=await n.post(`https://api.anthropic.com/api/claude_cli_feedback`,{content:C(e)},{headers:i,timeout:3e4,signal:t});if(a.status===200){let e=a.data;return e?.feedback_id?{success:!0,feedbackId:e.feedback_id}:(Y(Error(`Failed to submit feedback: request did not return feedback_id`)),{success:!1})}return Y(Error(`Failed to submit feedback:`+a.status)),{success:!1}}catch(e){if(n.isCancel(e))return{success:!1};if(n.isAxiosError(e)&&e.response?.status===403){let t=e.response.data;if(t?.error?.type===`permission_error`&&t?.error?.message?.includes(`Custom data retention settings`))return Y(Error(`Cannot submit feedback because custom data retention settings are enabled`)),{success:!1,isZdrOrg:!0}}return Y(e),{success:!1}}}var X,Z,Q,$,Se=e((()=>{r(),a(),X=t(a(),1),m(),g(),E(),L(),me(),u(),pe(),le(),B(),b(),fe(),w(),k(),O(),x(),oe(),j(),P(),S(),R(),ce(),V(),Z=p(),Q=7250,$=process.env.USER_TYPE===`ant`?`https://github.com/anthropics/claude-cli-internal/issues`:`https://github.com/anthropics/claude-code/issues`}));export{Se as n,K as r,ve as t};
@@ -0,0 +1 @@
1
+ import{r as e,t}from"./Grove-m57x4tY1.js";e();export{t as GroveDialog};
@@ -0,0 +1,11 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,f as a,g as o,h as s,t as c,x as l,xt as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{Ry as m,_E as h,aS as g,bE as _,gE as v,mE as y,vE as b,xE as x}from"./loadAgentsDir-ClTeo0nk.js";function S(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(i,{children:[`An update to our Consumer Terms and Privacy Policy will take effect on `,(0,D.jsx)(i,{bold:!0,children:`October 8, 2025`}),`. You can accept the updated terms today.`]}),(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{children:`What's changing?`}),(0,D.jsx)(l,{paddingLeft:1,children:(0,D.jsxs)(i,{children:[(0,D.jsx)(i,{children:`· `}),(0,D.jsx)(i,{bold:!0,children:`You can help improve Claude `}),(0,D.jsxs)(i,{children:[`— Allow the use of your chats and coding sessions to train and improve Anthropic AI models. Change anytime in your Privacy Settings (`,(0,D.jsx)(n,{url:`https://claude.ai/settings/data-privacy-controls`}),`).`]})]})}),(0,D.jsx)(l,{paddingLeft:1,children:(0,D.jsxs)(i,{children:[(0,D.jsx)(i,{children:`· `}),(0,D.jsx)(i,{bold:!0,children:`Updates to data retention `}),(0,D.jsx)(i,{children:`— To help us improve our AI models and safety protections, we're extending data retention to 5 years.`})]})})]}),(0,D.jsxs)(i,{children:[`Learn more (`,(0,D.jsx)(n,{url:`https://www.anthropic.com/news/updates-to-our-consumer-terms`}),`) or read the updated Consumer Terms (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/terms`}),`) and Privacy Policy (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/privacy`}),`)`]})]})}function C(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(i,{children:`We've updated our Consumer Terms and Privacy Policy.`}),(0,D.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,D.jsx)(i,{children:`What's changing?`}),(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{bold:!0,children:`Help improve Claude`}),(0,D.jsx)(i,{children:`Allow the use of your chats and coding sessions to train and improve Anthropic AI models. You can change this anytime in Privacy Settings`}),(0,D.jsx)(n,{url:`https://claude.ai/settings/data-privacy-controls`})]}),(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{bold:!0,children:`How this affects data retention`}),(0,D.jsx)(i,{children:`Turning ON the improve Claude setting extends data retention from 30 days to 5 years. Turning it OFF keeps the default 30-day data retention. Delete data anytime.`})]})]}),(0,D.jsxs)(i,{children:[`Learn more (`,(0,D.jsx)(n,{url:`https://www.anthropic.com/news/updates-to-our-consumer-terms`}),`) or read the updated Consumer Terms (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/terms`}),`) and Privacy Policy (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/privacy`}),`)`]})]})}function w({showIfAlreadyViewed:e,location:t,onDone:n}){let[r,c]=(0,E.useState)(null),[u,d]=(0,E.useState)(null);if((0,E.useEffect)(()=>{async function r(){let[r,i]=await Promise.all([h(),v()]),a=i.success?i.data:null;d(a);let o=y(r,i,e);if(c(o),!o){n(`skip_rendering`);return}_(),p(`tengu_grove_policy_viewed`,{location:t,dismissable:a?.notice_is_grace_period})}r()},[e,t,n]),r===null||!r)return null;async function f(e){switch(e){case`accept_opt_in`:await x(!0),p(`tengu_grove_policy_submitted`,{state:!0,dismissable:u?.notice_is_grace_period});break;case`accept_opt_out`:await x(!1),p(`tengu_grove_policy_submitted`,{state:!1,dismissable:u?.notice_is_grace_period});break;case`defer`:p(`tengu_grove_policy_dismissed`,{state:!0});break;case`escape`:p(`tengu_grove_policy_escaped`,{});break}n(e)}let m=u?.domain_excluded?[{label:`Accept terms · Help improve Claude: OFF (for emails with your domain)`,value:`accept_opt_out`}]:[{label:`Accept terms · Help improve Claude: ON`,value:`accept_opt_in`},{label:`Accept terms · Help improve Claude: OFF`,value:`accept_opt_out`}];function b(){if(u?.notice_is_grace_period){f(`defer`);return}f(`escape`)}return(0,D.jsxs)(a,{title:`Updates to Consumer Terms and Policies`,color:`professionalBlue`,onCancel:b,inputGuide:e=>e.pending?(0,D.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):(0,D.jsxs)(s,{children:[(0,D.jsx)(o,{shortcut:`Enter`,action:`confirm`}),(0,D.jsx)(o,{shortcut:`Esc`,action:`cancel`})]}),children:[(0,D.jsxs)(l,{flexDirection:`row`,children:[(0,D.jsx)(l,{flexDirection:`column`,gap:1,flexGrow:1,children:u?.notice_is_grace_period?(0,D.jsx)(S,{}):(0,D.jsx)(C,{})}),(0,D.jsx)(l,{flexShrink:0,children:(0,D.jsx)(i,{color:`professionalBlue`,children:O})})]}),(0,D.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{bold:!0,children:`Please select how you'd like to continue`}),(0,D.jsx)(i,{children:`Your choice takes effect immediately upon confirmation.`})]}),(0,D.jsx)(g,{options:[...m,...u?.notice_is_grace_period?[{label:`Not now`,value:`defer`}]:[]],onChange:e=>f(e),onCancel:b})]})]})}function T({settings:e,domainExcluded:t,onDone:r}){let[c,d]=(0,E.useState)(e.grove_enabled);E.useEffect(()=>{p(`tengu_grove_privacy_settings_viewed`,{})},[]),u(async(e,n)=>{if(!t&&(n.tab||n.return||e===` `)){let e=!c;d(e),await x(e)}});let f=(0,D.jsx)(i,{color:`error`,children:`false`});return t?f=(0,D.jsx)(i,{color:`error`,children:`false (for emails with your domain)`}):c&&(f=(0,D.jsx)(i,{color:`success`,children:`true`})),(0,D.jsxs)(a,{title:`Data Privacy`,color:`professionalBlue`,onCancel:r,inputGuide:e=>e.pending?(0,D.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):t?(0,D.jsx)(o,{shortcut:`Esc`,action:`cancel`}):(0,D.jsxs)(s,{children:[(0,D.jsx)(o,{shortcut:`Enter/Tab/Space`,action:`toggle`}),(0,D.jsx)(o,{shortcut:`Esc`,action:`cancel`})]}),children:[(0,D.jsxs)(i,{children:[`Review and manage your privacy settings at`,` `,(0,D.jsx)(n,{url:`https://claude.ai/settings/data-privacy-controls`})]}),(0,D.jsxs)(l,{children:[(0,D.jsx)(l,{width:44,children:(0,D.jsx)(i,{bold:!0,children:`Help improve Claude`})}),(0,D.jsx)(l,{children:f})]})]})}var E,D,O,k=e((()=>{E=t(r()),f(),c(),b(),m(),D=d(),O=` _____________
2
+ | \\ \\
3
+ | NEW TERMS \\__\\
4
+ | |
5
+ | ---------- |
6
+ | ---------- |
7
+ | ---------- |
8
+ | ---------- |
9
+ | ---------- |
10
+ | |
11
+ |______________|`}));export{T as n,k as r,w as t};
@@ -0,0 +1,4 @@
1
+ import{s as e,u as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./defineProperty-80gRi2ZW.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{E as o,O as s,l as c,p as l}from"./debug-otxXY3j-.js";import{n as u,r as d}from"./analytics-DqMQntaB.js";import{F as f,P as p}from"./git-C0IuvuIy.js";import{c as m,g as h,h as g,l as _,u as v}from"./proxy-CF7ZDxaW.js";import{Ch as y,Sh as b}from"./loadAgentsDir-ClTeo0nk.js";import{D as x,O as S,a as C,l as w,n as T,r as E,t as D}from"./rcDebugLog-CwU_wJBE.js";import{r as O}from"./ccrClient-C1msT1E3.js";a(),S(),u(),y(),c(),D(),p(),e(),h(),v(),E(),o(),n();var k=`{"type":"keep_alive"}
2
+ `,A=1e3,j=1e3,M=3e4,N=6e5,P=1e4,F=12e4,I=M*2,L=new Set([1002,4001,4003]),R=class{constructor(e,t={},n,i,a){r(this,`ws`,null),r(this,`lastSentId`,null),r(this,`url`,void 0),r(this,`state`,`idle`),r(this,`onData`,void 0),r(this,`onCloseCallback`,void 0),r(this,`onConnectCallback`,void 0),r(this,`headers`,void 0),r(this,`sessionId`,void 0),r(this,`autoReconnect`,void 0),r(this,`isBridge`,void 0),r(this,`reconnectAttempts`,0),r(this,`reconnectStartTime`,null),r(this,`reconnectTimer`,null),r(this,`lastReconnectAttemptTime`,null),r(this,`lastActivityTime`,0),r(this,`pingInterval`,null),r(this,`pongReceived`,!0),r(this,`keepAliveInterval`,null),r(this,`messageBuffer`,void 0),r(this,`isBunWs`,!1),r(this,`connectStartTime`,0),r(this,`refreshHeaders`,void 0),r(this,`onBunOpen`,()=>{this.handleOpenEvent(),this.lastSentId&&this.replayBufferedMessages(``)}),r(this,`onBunMessage`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.lastActivityTime=Date.now(),f(`info`,`cli_websocket_message_received`,{length:t.length}),this.onData&&this.onData(t)}),r(this,`onBunError`,()=>{l(`WebSocketTransport: Error`,{level:`error`}),f(`error`,`cli_websocket_connect_error`)}),r(this,`onBunClose`,e=>{let t=e.code===1e3||e.code===1001;l(`WebSocketTransport: Closed: ${e.code}`,t?void 0:{level:`error`}),f(`error`,`cli_websocket_connect_closed`),this.handleConnectionError(e.code)}),r(this,`onNodeOpen`,()=>{let e=this.ws;if(this.handleOpenEvent(),!e)return;let t=e.upgradeReq;if(t?.headers?.[`x-last-request-id`]){let e=t.headers[`x-last-request-id`];this.replayBufferedMessages(e)}}),r(this,`onNodeMessage`,e=>{let t=e.toString();this.lastActivityTime=Date.now(),f(`info`,`cli_websocket_message_received`,{length:t.length}),this.onData&&this.onData(t)}),r(this,`onNodeError`,e=>{l(`WebSocketTransport: Error: ${e.message}`,{level:`error`}),f(`error`,`cli_websocket_connect_error`)}),r(this,`onNodeClose`,(e,t)=>{let n=e===1e3||e===1001;l(`WebSocketTransport: Closed: ${e}`,n?void 0:{level:`error`}),f(`error`,`cli_websocket_connect_closed`),this.handleConnectionError(e)}),r(this,`onPong`,()=>{this.pongReceived=!0}),this.url=e,this.headers=t,this.sessionId=n,this.refreshHeaders=i,this.autoReconnect=a?.autoReconnect??!0,this.isBridge=a?.isBridge??!1,this.messageBuffer=new b(A)}async connect(){if(this.state!==`idle`&&this.state!==`reconnecting`){l(`WebSocketTransport: Cannot connect, current state is ${this.state}`,{level:`error`}),f(`error`,`cli_websocket_connect_failed`);return}this.state=`reconnecting`,this.connectStartTime=Date.now(),l(`WebSocketTransport: Opening ${this.url.href}`),f(`info`,`cli_websocket_connect_opening`);let e={...this.headers};if(this.lastSentId&&(e[`X-Last-Request-Id`]=this.lastSentId,l(`WebSocketTransport: Adding X-Last-Request-Id header: ${this.lastSentId}`)),typeof Bun<`u`){let t=new globalThis.WebSocket(this.url.href,{headers:e,proxy:_(this.url.href),tls:g()||void 0});this.ws=t,this.isBunWs=!0,t.addEventListener(`open`,this.onBunOpen),t.addEventListener(`message`,this.onBunMessage),t.addEventListener(`error`,this.onBunError),t.addEventListener(`close`,this.onBunClose),t.addEventListener(`pong`,this.onPong)}else{let{default:t}=await import(`./wrapper-BSK0MCQH.js`),n=new t(this.url.href,{headers:e,agent:m(this.url.href),...g()});this.ws=n,this.isBunWs=!1,n.on(`open`,this.onNodeOpen),n.on(`message`,this.onNodeMessage),n.on(`error`,this.onNodeError),n.on(`close`,this.onNodeClose),n.on(`pong`,this.onPong)}}handleOpenEvent(){let e=Date.now()-this.connectStartTime;l(`WebSocketTransport: Connected`),f(`info`,`cli_websocket_connect_connected`,{duration_ms:e}),this.isBridge&&this.reconnectStartTime!==null&&d(`tengu_ws_transport_reconnected`,{attempts:this.reconnectAttempts,downtimeMs:Date.now()-this.reconnectStartTime}),this.reconnectAttempts=0,this.reconnectStartTime=null,this.lastReconnectAttemptTime=null,this.lastActivityTime=Date.now(),this.state=`connected`,this.onConnectCallback?.(),this.startPingInterval(),this.startKeepaliveInterval(),C(()=>{this.write({type:`keep_alive`})})}sendLine(e){if(!this.ws||this.state!==`connected`)return l(`WebSocketTransport: Not connected`),f(`info`,`cli_websocket_send_not_connected`),!1;try{return this.ws.send(e),this.lastActivityTime=Date.now(),!0}catch(e){return l(`WebSocketTransport: Failed to send: ${e}`,{level:`error`}),f(`error`,`cli_websocket_send_error`),this.handleConnectionError(),!1}}removeWsListeners(e){if(this.isBunWs){let t=e;t.removeEventListener(`open`,this.onBunOpen),t.removeEventListener(`message`,this.onBunMessage),t.removeEventListener(`error`,this.onBunError),t.removeEventListener(`close`,this.onBunClose),t.removeEventListener(`pong`,this.onPong)}else{let t=e;t.off(`open`,this.onNodeOpen),t.off(`message`,this.onNodeMessage),t.off(`error`,this.onNodeError),t.off(`close`,this.onNodeClose),t.off(`pong`,this.onPong)}}doDisconnect(){this.stopPingInterval(),this.stopKeepaliveInterval(),w(),this.ws&&(this.removeWsListeners(this.ws),this.ws.close(),this.ws=null)}handleConnectionError(e){if(T(`WS handleConnectionError: code=${e} state=${this.state} url=${this.url.href.replace(/token=[^&]+/,`token=***`)} msSinceLastActivity=${this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1} reconnectAttempts=${this.reconnectAttempts}`),l(`WebSocketTransport: Disconnected from ${this.url.href}`+(e==null?``:` (code ${e})`)),f(`info`,`cli_websocket_disconnected`),this.isBridge&&d(`tengu_ws_transport_closed`,{closeCode:e,msSinceLastActivity:this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1,wasConnected:this.state===`connected`,reconnectAttempts:this.reconnectAttempts}),this.doDisconnect(),this.state===`closing`||this.state===`closed`)return;let t=!1;if(e===4003&&this.refreshHeaders){let e=this.refreshHeaders();e.Authorization!==this.headers.Authorization&&(Object.assign(this.headers,e),t=!0,l(`WebSocketTransport: 4003 received but headers refreshed, scheduling reconnect`),f(`info`,`cli_websocket_4003_token_refreshed`))}if(e!=null&&L.has(e)&&!t){l(`WebSocketTransport: Permanent close code ${e}, not reconnecting`,{level:`error`}),f(`error`,`cli_websocket_permanent_close`,{closeCode:e}),this.state=`closed`,this.onCloseCallback?.(e);return}if(!this.autoReconnect){this.state=`closed`,this.onCloseCallback?.(e);return}let n=Date.now();this.reconnectStartTime||(this.reconnectStartTime=n),this.lastReconnectAttemptTime!==null&&n-this.lastReconnectAttemptTime>I&&(l(`WebSocketTransport: Detected system sleep (${Math.round((n-this.lastReconnectAttemptTime)/1e3)}s gap), resetting reconnection budget`),f(`info`,`cli_websocket_sleep_detected`,{gapMs:n-this.lastReconnectAttemptTime}),this.reconnectStartTime=n,this.reconnectAttempts=0),this.lastReconnectAttemptTime=n;let r=n-this.reconnectStartTime;if(r<N){if(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!t&&this.refreshHeaders){let e=this.refreshHeaders();Object.assign(this.headers,e),l(`WebSocketTransport: Refreshed headers for reconnect`)}this.state=`reconnecting`,this.reconnectAttempts++;let e=Math.min(j*2**(this.reconnectAttempts-1),M),n=Math.max(0,e+e*.25*(2*Math.random()-1));l(`WebSocketTransport: Reconnecting in ${Math.round(n)}ms (attempt ${this.reconnectAttempts}, ${Math.round(r/1e3)}s elapsed)`),f(`error`,`cli_websocket_reconnect_attempt`,{reconnectAttempts:this.reconnectAttempts}),this.isBridge&&d(`tengu_ws_transport_reconnecting`,{attempt:this.reconnectAttempts,elapsedMs:r,delayMs:Math.round(n)}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}else l(`WebSocketTransport: Reconnection time budget exhausted after ${Math.round(r/1e3)}s for ${this.url.href}`,{level:`error`}),f(`error`,`cli_websocket_reconnect_exhausted`,{reconnectAttempts:this.reconnectAttempts,elapsedMs:r}),this.state=`closed`,this.onCloseCallback&&this.onCloseCallback(e)}close(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopPingInterval(),this.stopKeepaliveInterval(),w(),this.state=`closing`,this.doDisconnect()}replayBufferedMessages(e){let t=this.messageBuffer.toArray();if(t.length===0)return;let n=0;if(e){let r=t.findIndex(t=>`uuid`in t&&t.uuid===e);if(r>=0){n=r+1;let e=t.slice(n);this.messageBuffer.clear(),this.messageBuffer.addAll(e),e.length===0&&(this.lastSentId=null),l(`WebSocketTransport: Evicted ${n} confirmed messages, ${e.length} remaining`),f(`info`,`cli_websocket_evicted_confirmed_messages`,{evicted:n,remaining:e.length})}}let r=t.slice(n);if(r.length===0){l(`WebSocketTransport: No new messages to replay`),f(`info`,`cli_websocket_no_messages_to_replay`);return}l(`WebSocketTransport: Replaying ${r.length} buffered messages`),f(`info`,`cli_websocket_messages_to_replay`,{count:r.length});for(let e of r){let t=s(e)+`
3
+ `;if(!this.sendLine(t)){this.handleConnectionError();break}}}isConnectedStatus(){return this.state===`connected`}isClosedStatus(){return this.state===`closed`}setOnData(e){this.onData=e}setOnConnect(e){this.onConnectCallback=e}setOnClose(e){this.onCloseCallback=e}getStateLabel(){return this.state}async write(e){`uuid`in e&&typeof e.uuid==`string`&&(this.messageBuffer.add(e),this.lastSentId=e.uuid);let t=s(e)+`
4
+ `;if(this.state!==`connected`)return;let n=this.sessionId?` session=${this.sessionId}`:``,r=this.getControlMessageDetailLabel(e);l(`WebSocketTransport: Sending message type=${e.type}${n}${r}`),this.sendLine(t)}getControlMessageDetailLabel(e){if(e.type===`control_request`){let{request_id:t,request:n}=e,r=n.subtype===`can_use_tool`?n.tool_name:``;return` subtype=${n.subtype} request_id=${t}${r?` tool=${r}`:``}`}if(e.type===`control_response`){let{subtype:t,request_id:n}=e.response;return` subtype=${t} request_id=${n}`}return``}startPingInterval(){this.stopPingInterval(),this.pongReceived=!0;let e=Date.now();this.pingInterval=setInterval(()=>{if(this.state===`connected`&&this.ws){let t=Date.now(),n=t-e;if(e=t,n>I){l(`WebSocketTransport: ${Math.round(n/1e3)}s tick gap detected — process was suspended, forcing reconnect`),f(`info`,`cli_websocket_sleep_detected_on_ping`,{gapMs:n}),this.handleConnectionError();return}if(!this.pongReceived){l(`WebSocketTransport: No pong received, connection appears dead`,{level:`error`}),f(`error`,`cli_websocket_pong_timeout`),this.handleConnectionError();return}this.pongReceived=!1;try{this.ws.ping?.()}catch(e){l(`WebSocketTransport: Ping failed: ${e}`,{level:`error`}),f(`error`,`cli_websocket_ping_failed`)}}},P)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}startKeepaliveInterval(){this.stopKeepaliveInterval(),!t(process.env.CLAUDE_CODE_REMOTE)&&(this.keepAliveInterval=setInterval(()=>{if(this.state===`connected`&&this.ws)try{this.ws.send(k),this.lastActivityTime=Date.now(),l(`WebSocketTransport: Sent periodic keep_alive data frame`)}catch(e){l(`WebSocketTransport: Periodic keep_alive failed: ${e}`,{level:`error`}),f(`error`,`cli_websocket_keepalive_failed`)}},F))}stopKeepaliveInterval(){this.keepAliveInterval&&(clearInterval(this.keepAliveInterval),this.keepAliveInterval=null)}};c(),D(),p(),n();var z=100,B=15e3,V=3e3,H=class extends R{constructor(e,t={},n,i,a){super(e,t,n,i,a),r(this,`postUrl`,void 0),r(this,`uploader`,void 0),r(this,`streamEventBuffer`,[]),r(this,`streamEventTimer`,null);let{maxConsecutiveFailures:o,onBatchDropped:s}=a??{};this.postUrl=U(e),this.uploader=new O({maxBatchSize:500,maxQueueSize:1e4,baseDelayMs:500,maxDelayMs:8e3,jitterMs:1e3,maxConsecutiveFailures:o,onBatchDropped:(e,t)=>{f(`error`,`cli_hybrid_batch_dropped_max_failures`,{batchSize:e,failures:t}),s?.(e,t)},send:e=>this.postOnce(e)}),l(`HybridTransport: POST URL = ${this.postUrl}`),f(`info`,`cli_hybrid_transport_initialized`)}async write(e){if(e.type===`stream_event`){this.streamEventBuffer.push(e),this.streamEventTimer||(this.streamEventTimer=setTimeout(()=>this.flushStreamEvents(),z));return}return await this.uploader.enqueue([...this.takeStreamEvents(),e]),this.uploader.flush()}async writeBatch(e){return await this.uploader.enqueue([...this.takeStreamEvents(),...e]),this.uploader.flush()}get droppedBatchCount(){return this.uploader.droppedBatchCount}flush(){return this.uploader.enqueue(this.takeStreamEvents()),this.uploader.flush()}takeStreamEvents(){this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null);let e=this.streamEventBuffer;return this.streamEventBuffer=[],e}flushStreamEvents(){this.streamEventTimer=null,this.uploader.enqueue(this.takeStreamEvents())}close(){this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null),this.streamEventBuffer=[];let e=this.uploader,t;Promise.race([e.flush(),new Promise(e=>{t=setTimeout(e,V)})]).finally(()=>{clearTimeout(t),e.close()}),super.close()}async postOnce(e){let t=x();if(!t){l(`HybridTransport: No session token available for POST`),f(`warn`,`cli_hybrid_post_no_token`);return}let n={Authorization:`Bearer ${t}`,"Content-Type":`application/json`},r;try{r=await i.post(this.postUrl,{events:e},{headers:n,validateStatus:()=>!0,timeout:B})}catch(e){throw l(`HybridTransport: POST error: ${e.message}`),f(`warn`,`cli_hybrid_post_network_error`),e}if(r.status>=200&&r.status<300){l(`HybridTransport: POST success count=${e.length}`);return}if(r.status>=400&&r.status<500&&r.status!==429){T(`Hybrid POST ${r.status}: url=${this.postUrl.replace(/token=[^&]+/,`token=***`)} events=${e.length} body=${JSON.stringify(r.data).slice(0,200)}`),l(`HybridTransport: POST returned ${r.status} (permanent), dropping`),f(`warn`,`cli_hybrid_post_client_error`,{status:r.status});return}throw l(`HybridTransport: POST returned ${r.status} (retryable)`),f(`warn`,`cli_hybrid_post_retryable_error`,{status:r.status}),Error(`POST failed with ${r.status}`)}};function U(e){let t=e.protocol===`wss:`?`https:`:`http:`,n=e.pathname;return n=n.replace(`/ws/`,`/session/`),n.endsWith(`/events`)||(n=n.endsWith(`/`)?n+`events`:n+`/events`),`${t}//${e.host}${n}${e.search}`}export{R as n,H as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{l as r,p as i}from"./debug-otxXY3j-.js";import{r as a,t as o}from"./execFileNoThrow-azCkYhmF.js";import{Id as s,Nd as c}from"./loadAgentsDir-ClTeo0nk.js";import{c as l,i as u,r as d}from"./detection-95TCHkW8.js";function f(){let e,t=new Promise(t=>{e=t}),n=v;return v=t,n.then(()=>e)}function p(e){return o(`it2`,e)}function m(e){let t=e.match(/Created new pane:\s*(.+)/);return t&&t[1]?t[1].trim():``}function h(){let e=process.env.ITERM_SESSION_ID;if(!e)return null;let t=e.indexOf(`:`);return t===-1?null:e.slice(t+1)}var g,_,v,y;e((()=>{r(),a(),d(),c(),t(),g=[],_=!1,v=Promise.resolve(),y=class{constructor(){n(this,`type`,`iterm2`),n(this,`displayName`,`iTerm2`),n(this,`supportsHideShow`,!1)}async isAvailable(){let e=u();if(i(`[ITermBackend] isAvailable check: inITerm2=${e}`),!e)return i(`[ITermBackend] isAvailable: false (not in iTerm2)`),!1;let t=await l();return i(`[ITermBackend] isAvailable: ${t} (it2 CLI ${t?`found`:`not found`})`),t}async isRunningInside(){let e=u();return i(`[ITermBackend] isRunningInside: ${e}`),e}async createTeammatePaneInSwarmView(e,t){i(`[ITermBackend] createTeammatePaneInSwarmView called for ${e} with color ${t}`);let n=await f();try{for(;;){let t=!_;i(`[ITermBackend] Creating pane: isFirstTeammate=${t}, existingPanes=${g.length}`);let n,r;if(t){let e=h();e?(n=[`session`,`split`,`-v`,`-s`,e],i(`[ITermBackend] First split from leader session: ${e}`)):(n=[`session`,`split`,`-v`],i(`[ITermBackend] First split from active session (no leader ID)`))}else r=g[g.length-1],r?(n=[`session`,`split`,`-s`,r],i(`[ITermBackend] Subsequent split from teammate session: ${r}`)):(n=[`session`,`split`],i(`[ITermBackend] Subsequent split from active session (no teammate ID)`));let a=await p(n);if(a.code!==0){if(r){let e=await p([`session`,`list`]);if(e.code===0&&!e.stdout.includes(r)){i(`[ITermBackend] Split failed targeting dead session ${r}, pruning and retrying: ${a.stderr}`);let e=g.indexOf(r);e!==-1&&g.splice(e,1),g.length===0&&(_=!1);continue}}throw Error(`Failed to create iTerm2 split pane: ${a.stderr}`)}t&&(_=!0);let o=m(a.stdout);if(!o)throw Error(`Failed to parse session ID from split output: ${a.stdout}`);return i(`[ITermBackend] Created teammate pane for ${e}: ${o}`),g.push(o),{paneId:o,isFirstTeammate:t}}}finally{n()}}async sendCommandToPane(e,t,n){let r=await p(e?[`session`,`run`,`-s`,e,t]:[`session`,`run`,t]);if(r.code!==0)throw Error(`Failed to send command to iTerm2 pane ${e}: ${r.stderr}`)}async setPaneBorderColor(e,t,n){}async setPaneTitle(e,t,n,r){}async enablePaneBorderStatus(e,t){}async rebalancePanes(e,t){i(`[ITermBackend] Pane rebalancing not implemented for iTerm2`)}async killPane(e,t){let n=await p([`session`,`close`,`-f`,`-s`,e]),r=g.indexOf(e);return r!==-1&&g.splice(r,1),g.length===0&&(_=!1),n.code===0}async hidePane(e,t){return i(`[ITermBackend] hidePane not supported in iTerm2`),!1}async showPane(e,t,n){return i(`[ITermBackend] showPane not supported in iTerm2`),!1}},s(y)}))();export{};
@@ -0,0 +1 @@
1
+ import"./chunk-DR8-3Aex.js";import{Mt as e,Rn as t,b as n,f as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{A as s,E as c,O as l}from"./debug-otxXY3j-.js";import{Fy as u,Py as d,Ry as f,aS as p,cC as m,lC as h}from"./loadAgentsDir-ClTeo0nk.js";import{t as g}from"./renderOptions-Caca3bCd.js";t(),i(),u(),h(),c(),f();var _=o();function v({filePath:e,errorDescription:t,onExit:i,onReset:o}){return(0,_.jsxs)(r,{title:`Configuration Error`,color:`error`,onCancel:i,children:[(0,_.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,_.jsxs)(n,{children:[`The configuration file at `,(0,_.jsx)(n,{bold:!0,children:e}),` contains invalid JSON.`]}),(0,_.jsx)(n,{children:t})]}),(0,_.jsxs)(a,{flexDirection:`column`,children:[(0,_.jsx)(n,{bold:!0,children:`Choose an option:`}),(0,_.jsx)(p,{options:[{label:`Exit and fix manually`,value:`exit`},{label:`Reset with default configuration`,value:`reset`}],onChange:e=>{e===`exit`?i():o()},onCancel:i})]})]})}var y=`dark`;async function b({error:t}){let n={...g(!1),theme:y};await new Promise(async r=>{let{unmount:i}=await e((0,_.jsx)(m,{children:(0,_.jsx)(d,{children:(0,_.jsx)(v,{filePath:t.filePath,errorDescription:t.message,onExit:()=>{i(),r(),process.exit(1)},onReset:()=>{s(t.filePath,l(t.defaultConfig,null,2),{flush:!1,encoding:`utf8`}),i(),r(),process.exit(0)}})})}),n)})}export{b as showInvalidConfigDialog};
@@ -0,0 +1 @@
1
+ import"./chunk-DR8-3Aex.js";import{Rn as e,b as t,f as n,t as r}from"./src-Di342QoJ.js";import{t as i}from"./jsx-runtime-D-D469L8.js";import{Ry as a,aS as o}from"./loadAgentsDir-ClTeo0nk.js";import{n as s,t as c}from"./ValidationErrorsList-CfgC1KJb.js";e(),r(),a(),s();var l=i();function u({settingsErrors:e,onContinue:r,onExit:i}){function a(e){e===`exit`?i():r()}return(0,l.jsxs)(n,{title:`Settings Error`,onCancel:i,color:`warning`,children:[(0,l.jsx)(c,{errors:e}),(0,l.jsx)(t,{dimColor:!0,children:`Files with errors are skipped entirely, not just the invalid settings.`}),(0,l.jsx)(o,{options:[{label:`Exit and fix manually`,value:`exit`},{label:`Continue without these settings`,value:`continue`}],onChange:a})]})}export{u as InvalidSettingsDialog};
@@ -0,0 +1 @@
1
+ import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{B as r,F as i,L as a,z as o}from"./server-DzOdtq8A.js";import{Rn as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Ct as l,cn as u,y as d}from"./state-sIHsFpDu.js";import{Qo as f,S as p,Xo as ee,_ as m,bl as h,hl as g,ml as _,xl as te}from"./paths-DO4WOQtD.js";import{E as v,O as y,U as b,l as x,p as ne,z as S}from"./debug-otxXY3j-.js";import{n as re,r as C}from"./analytics-DqMQntaB.js";import{c as w,l as T,o as ie}from"./log-DSV4Ht5l.js";import{Fw as ae,Hw as E,IC as oe,Jw as se,Jx as D,KO as ce,Kw as O,LC as le,Lw as k,Nw as ue,Ow as de,Pw as fe,Qx as A,Vw as pe,Xw as me,Xx as j,Zx as M,dC as he,eS as N,fC as ge,hw as _e,lC as P,oC as F,qw as I,rS as L,sC as ve,tS as ye,uC as R,xw as be,zO as xe}from"./loadAgentsDir-ClTeo0nk.js";import{o as Se,s as Ce}from"./localSearch-Koc8naSr.js";import{c as we,i as Te,l as Ee,o as De,r as Oe,s as ke,t as z}from"./channelNotification-CWlu9ZWs.js";import{basename as Ae}from"path";function je(){return m(`tengu_harbor_permissions`,!0)}function B(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);t>>>=0;let n=``;for(let e=0;e<5;e++)n+=V[t%25],t=Math.floor(t/25);return n}function Me(e){let t=B(e);for(let n=0;n<10;n++){if(!H.some(e=>t.includes(e)))return t;t=B(`${e}:${n}`)}return t}function Ne(e){try{let t=y(e);return t.length>200?t.slice(0,200)+`…`:t}catch{return`(unserializable)`}}function Pe(e,t){return e.filter(e=>e.type===`connected`&&t(e.name)&&!!e.capabilities?.experimental?.[`claude/channel`]&&!!e.capabilities?.experimental?.[`claude/channel/permission`])}function Fe(){let e=new Map;return{onResponse(t,n){let r=t.toLowerCase();return e.set(r,n),()=>{e.delete(r)}},resolve(t,n,r){let i=t.toLowerCase(),a=e.get(i);return a?(e.delete(i),a({behavior:n,fromServer:r}),!0):!1}}}var V,H,U=t((()=>{v(),p(),V=`abcdefghijkmnopqrstuvwxyz`,H=[`fuck`,`shit`,`cunt`,`cock`,`dick`,`twat`,`piss`,`crap`,`bitch`,`whore`,`ass`,`tit`,`cum`,`fag`,`dyke`,`nig`,`kike`,`rape`,`nazi`,`damn`,`poo`,`pee`,`wank`,`anus`]}));function W(e){let t=`plugin`in e?e.plugin:`no-plugin`;return`${e.type}:${e.source}:${t}`}function G(e,t){t.length!==0&&e(e=>{let n=new Set(e.plugins.errors.map(e=>W(e))),r=t.filter(e=>!n.has(W(e)));return r.length===0?e:{...e,plugins:{...e.plugins,errors:[...e.plugins.errors,...r]}}})}function Ie(e,t=!1){let n=he(),r=R(e=>e.authVersion),s=R(e=>e.mcp.pluginReconnectKey),c=ge(),u=(0,K.useRef)(new Map),f=(0,K.useRef)(new Set),p=(0,K.useRef)(null);p.current===null&&(p.current=Fe()),(0,K.useEffect)(()=>{{let e=p.current;return!e||!je()?void 0:(c(t=>t.channelPermissionCallbacks===e?t:{...t,channelPermissionCallbacks:e}),()=>{c(e=>e.channelPermissionCallbacks===void 0?e:{...e,channelPermissionCallbacks:void 0})})}},[c]);let{addNotification:m}=ve(),h=(0,K.useRef)([]),_=(0,K.useRef)(null),v=(0,K.useCallback)(()=>{_.current=null;let e=h.current;e.length!==0&&(h.current=[],c(t=>{let n=t.mcp;for(let t of e){let{tools:e,commands:r,resources:i,...a}=t,o=a.type===`disabled`||a.type===`failed`?e??[]:e,s=a.type===`disabled`||a.type===`failed`?r??[]:r,c=a.type===`disabled`||a.type===`failed`?i??[]:i,l=ee(a.name),u=n.clients.findIndex(e=>e.name===a.name)===-1?[...n.clients,a]:n.clients.map(e=>e.name===a.name?a:e),d=o===void 0?n.tools:[...g(n.tools,e=>e.name?.startsWith(l)),...o],f=s===void 0?n.commands:[...g(n.commands,e=>_e(e,a.name)),...s],p=c===void 0?n.resources:{...n.resources,...c.length>0?{[a.name]:c}:te(n.resources,a.name)};n={...n,clients:u,tools:d,commands:f,resources:p}}return{...t,mcp:n}}))},[c]),y=(0,K.useCallback)(e=>{h.current.push(e),_.current===null&&(_.current=setTimeout(v,16))},[v]),b=(0,K.useCallback)(({client:e,tools:t,commands:n,resources:r})=>{switch(y({...e,tools:t,commands:n,resources:r}),e.type){case`connected`:{le(e.client,e.name,c),e.client.onclose=()=>{let t=e.config.type??`stdio`;if(D(e.name,e.config).catch(()=>{ne(`Failed to invalidate the server cache: ${e.name}`)}),E(e.name)){w(e.name,`Server is disabled, skipping automatic reconnection`);return}if(t!==`stdio`&&t!==`sdk`){let n=Le(t);w(e.name,`${n} transport closed/disconnected, attempting automatic reconnection`);let r=u.current.get(e.name);r&&(clearTimeout(r),u.current.delete(e.name)),(async()=>{for(let t=1;t<=J;t++){if(E(e.name)){w(e.name,`Server disabled during reconnection, stopping retry`),u.current.delete(e.name);return}y({...e,type:`pending`,reconnectAttempt:t,maxReconnectAttempts:J});let r=Date.now();try{let i=await L(e.name,e.config),a=Date.now()-r;if(i.client.type===`connected`){w(e.name,`${n} reconnection successful after ${a}ms (attempt ${t})`),u.current.delete(e.name),b(i);return}if(w(e.name,`${n} reconnection attempt ${t} completed with status: ${i.client.type}`),t===J){w(e.name,`Max reconnection attempts (${J}) reached, giving up`),u.current.delete(e.name),b(i);return}}catch(i){let a=Date.now()-r;if(T(e.name,`${n} reconnection attempt ${t} failed after ${a}ms: ${i}`),t===J){w(e.name,`Max reconnection attempts (${J}) reached, giving up`),u.current.delete(e.name),y({...e,type:`failed`});return}}let i=Math.min(Y*2**(t-1),X);w(e.name,`Scheduling reconnection attempt ${t+1} in ${i}ms`),await new Promise(t=>{let n=setTimeout(t,i);u.current.set(e.name,n)})}})()}else y({...e,type:`failed`})};let t=ke(e.name,e.capabilities,e.config.pluginSource),n=De(e.name,d()),r=n?.kind===`plugin`?`${n.name}@${n.marketplace}`:void 0;switch((t.action===`register`||t.kind!==`capability`)&&C(`tengu_mcp_channel_gate`,{registered:t.action===`register`,skip_kind:t.action===`skip`?t.kind:void 0,entry_kind:n?.kind,is_dev:n?.dev??!1,plugin:r}),t.action){case`register`:w(e.name,`Channel notifications registered`),e.client.setNotificationHandler(Oe(),async t=>{let{content:i,meta:a}=t.params;w(e.name,`notifications/claude/channel: ${i.slice(0,80)}`),C(`tengu_mcp_channel_message`,{content_length:i.length,meta_key_count:Object.keys(a??{}).length,entry_kind:n?.kind,is_dev:n?.dev??!1,plugin:r}),xe({mode:`prompt`,value:Ee(e.name,i,a),priority:`next`,isMeta:!0,origin:{kind:`channel`,server:e.name},skipSlashCommands:!0})}),e.capabilities?.experimental?.[`claude/channel/permission`]&&e.client.setNotificationHandler(Te(),async t=>{let{request_id:n,behavior:r}=t.params,i=p.current?.resolve(n,r,e.name)??!1;w(e.name,`notifications/claude/channel/permission: ${n} → ${r} (${i?`matched pending`:`no pending entry — stale or unknown ID`})`)});break;case`skip`:if(e.client.removeNotificationHandler(`notifications/claude/channel`),e.client.removeNotificationHandler(z),w(e.name,`Channel notifications skipped: ${t.reason}`),t.kind!==`capability`&&t.kind!==`session`&&!f.current.has(t.kind)&&(t.kind===`marketplace`||t.kind===`allowlist`||n!==void 0)){f.current.add(t.kind);let e=t.kind===`disabled`?`Channels are not currently available`:t.kind===`auth`?`Channels require claude.ai authentication · run /login`:t.kind===`policy`?`Channels are not enabled for your org · have an administrator set channelsEnabled: true in managed settings`:t.reason;m({key:`channels-blocked-${t.kind}`,priority:`high`,text:e,color:`warning`,timeoutMs:12e3})}break}e.capabilities?.tools?.listChanged&&e.client.setNotificationHandler(o,async()=>{w(e.name,`Received tools/list_changed notification, refreshing tools`);try{let t=A.cache.get(e.name);A.cache.delete(e.name);let n=await A(e),r=n.length;t?t.then(e=>{C(`tengu_mcp_list_changed`,{type:`tools`,previousCount:e.length,newCount:r})},()=>{C(`tengu_mcp_list_changed`,{type:`tools`,newCount:r})}):C(`tengu_mcp_list_changed`,{type:`tools`,newCount:r}),y({...e,tools:n})}catch(t){T(e.name,`Failed to refresh tools after list_changed notification: ${S(t)}`)}}),e.capabilities?.prompts?.listChanged&&e.client.setNotificationHandler(i,async()=>{w(e.name,`Received prompts/list_changed notification, refreshing prompts`),C(`tengu_mcp_list_changed`,{type:`prompts`});try{j.cache.delete(e.name);let[t,n]=await Promise.all([j(e),Promise.resolve([])]);y({...e,commands:[...t,...n]}),q?.()}catch(t){T(e.name,`Failed to refresh prompts after list_changed notification: ${S(t)}`)}}),e.capabilities?.resources?.listChanged&&e.client.setNotificationHandler(a,async()=>{w(e.name,`Received resources/list_changed notification, refreshing resources`),C(`tengu_mcp_list_changed`,{type:`resources`});try{M.cache.delete(e.name);{let t=await M(e);y({...e,resources:t})}}catch(t){T(e.name,`Failed to refresh resources after list_changed notification: ${S(t)}`)}});break}case`needs-auth`:case`failed`:case`pending`:case`disabled`:break}},[y]),x=l();return(0,K.useEffect)(()=>{async function n(){let{servers:n,errors:r}=t?{servers:{},errors:[]}:await k(e),i={...n,...e};G(c,r),c(e=>{let{stale:t,...n}=be(e.mcp,i);for(let e of t){let t=u.current.get(e.name);t&&(clearTimeout(t),u.current.delete(e.name)),e.type===`connected`&&(e.client.onclose=void 0,D(e.name,e.config).catch(()=>{}))}let r=new Set(n.clients.map(e=>e.name)),a=Object.entries(i).filter(([e])=>!r.has(e)).map(([e,t])=>({name:e,type:E(e)?`disabled`:`pending`,config:t}));return a.length===0&&t.length===0?e:{...e,mcp:{...e.mcp,...n,clients:[...n.clients,...a]}}})}n().catch(e=>{T(`useManageMCPConnections`,`Failed to initialize servers as pending: ${S(e)}`)})},[t,e,c,x,s]),(0,K.useEffect)(()=>{let n=!1;async function r(){let r;t||fe()?r=Promise.resolve({}):(I(),r=se());let{servers:i,errors:a}=t?{servers:{},errors:[]}:await k(e,r);if(n)return;G(c,a);let o={...i,...e};N(b,Object.fromEntries(Object.entries(o).filter(([e])=>!E(e)))).catch(e=>{T(`useManageMcpConnections`,`Failed to get MCP resources: ${S(e)}`)});let s={};if(!t){if(s=ae(await r).allowed,n)return;if(Object.keys(s).length>0){let{servers:e}=ue(s,o);s=e}Object.keys(s).length>0&&(c(e=>{let t=new Set(e.mcp.clients.map(e=>e.name)),n=Object.entries(s).filter(([e])=>!t.has(e)).map(([e,t])=>({name:e,type:E(e)?`disabled`:`pending`,config:t}));return n.length===0?e:{...e,mcp:{...e.mcp,clients:[...e.mcp.clients,...n]}}}),N(b,Object.fromEntries(Object.entries(s).filter(([e])=>!E(e)))).catch(e=>{T(`useManageMcpConnections`,`Failed to get claude.ai MCP resources: ${S(e)}`)}))}let l={...o,...s},u={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0},d=[];for(let[e,t]of Object.entries(l))t.scope===`enterprise`?u.enterprise++:t.scope===`user`?u.global++:t.scope===`project`?u.project++:t.scope===`local`?u.user++:t.scope===`dynamic`?u.plugin++:t.scope===`claudeai`&&u.claudeai++,process.env.USER_TYPE===`ant`&&!E(e)&&(t.type===void 0||t.type===`stdio`)&&`command`in t&&d.push(Ae(t.command));C(`tengu_mcp_servers`,{...u,...process.env.USER_TYPE===`ant`&&d.length>0?{stdio_commands:d.sort().join(`,`)}:{}})}return r(),()=>{n=!0}},[t,e,b,c,r,x,s]),(0,K.useEffect)(()=>{let e=u.current;return()=>{for(let t of e.values())clearTimeout(t);e.clear(),_.current!==null&&(clearTimeout(_.current),_.current=null,v())}},[v]),{reconnectMcpServer:(0,K.useCallback)(async e=>{let t=n.getState().mcp.clients.find(t=>t.name===e);if(!t)throw Error(`MCP server ${e} not found`);let r=u.current.get(e);r&&(clearTimeout(r),u.current.delete(e));let i=await L(e,t.config);return b(i),i},[n,b]),toggleMcpServer:(0,K.useCallback)(async e=>{let t=n.getState().mcp.clients.find(t=>t.name===e);if(!t)throw Error(`MCP server ${e} not found`);if(t.type!==`disabled`){let n=u.current.get(e);n&&(clearTimeout(n),u.current.delete(e)),O(e,!1),t.type===`connected`&&await D(e,t.config),y({name:e,type:`disabled`,config:t.config})}else O(e,!0),y({name:e,type:`pending`,config:t.config}),b(await L(e,t.config))},[n,y,b])}}function Le(e){switch(e){case`http`:return`HTTP`;case`ws`:case`ws-ide`:return`WebSocket`;default:return`SSE`}}var K,q,J,Y,X,Re=t((()=>{K=n(s(),1),u(),ye(),r(),h(),_(),re(),pe(),x(),F(),P(),b(),ie(),ce(),we(),U(),me(),oe(),f(),de(),q=(Se(),e(Ce)).clearSkillIndexCache,J=5,Y=1e3,X=3e4}));function ze(){let e=(0,Z.useContext)($);if(!e)throw Error(`useMcpReconnect must be used within MCPConnectionManager`);return e.reconnectMcpServer}function Be(){let e=(0,Z.useContext)($);if(!e)throw Error(`useMcpToggleEnabled must be used within MCPConnectionManager`);return e.toggleMcpServer}function Ve({children:e,dynamicMcpConfig:t,isStrictMcpConfig:n}){let{reconnectMcpServer:r,toggleMcpServer:i}=Ie(t,n),a=(0,Z.useMemo)(()=>({reconnectMcpServer:r,toggleMcpServer:i}),[r,i]);return(0,Q.jsx)($.Provider,{value:a,children:e})}var Z,Q,$,He=t((()=>{Z=n(s(),1),Re(),Q=c(),$=(0,Z.createContext)(null)}));export{Pe as a,Ne as c,Be as i,He as n,U as o,ze as r,Me as s,Ve as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,t as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{Dw as c,Ow as l,Vw as u,gw as d,zw as f}from"./loadAgentsDir-ClTeo0nk.js";function p({scope:e,parsingErrors:t,warnings:n}){let r=t.length>0,a=n.length>0;return!r&&!a?null:(0,_.jsxs)(o,{flexDirection:`column`,marginTop:1,children:[(0,_.jsxs)(o,{children:[(r||a)&&(0,_.jsxs)(i,{color:r?`error`:`warning`,children:[`[`,r?`Failed to parse`:`Contains warnings`,`] `]}),(0,_.jsx)(i,{children:c(e)})]}),(0,_.jsxs)(o,{children:[(0,_.jsx)(i,{dimColor:!0,children:`Location: `}),(0,_.jsx)(i,{dimColor:!0,children:d(e)})]}),(0,_.jsxs)(o,{marginLeft:1,flexDirection:`column`,children:[t.map((e,t)=>{let n=e.mcpErrorMetadata?.serverName;return(0,_.jsx)(o,{children:(0,_.jsxs)(i,{children:[(0,_.jsx)(i,{dimColor:!0,children:`└ `}),(0,_.jsx)(i,{color:`error`,children:`[Error]`}),(0,_.jsxs)(i,{dimColor:!0,children:[` `,n&&`[${n}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`error-${t}`)}),n.map((e,t)=>{let n=e.mcpErrorMetadata?.serverName;return(0,_.jsx)(o,{children:(0,_.jsxs)(i,{children:[(0,_.jsx)(i,{dimColor:!0,children:`└ `}),(0,_.jsx)(i,{color:`warning`,children:`[Warning]`}),(0,_.jsxs)(i,{dimColor:!0,children:[` `,n&&`[${n}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`warning-${t}`)})]})]})}function m(){let e=(0,g.useMemo)(()=>[{scope:`user`,config:f(`user`)},{scope:`project`,config:f(`project`)},{scope:`local`,config:f(`local`)},{scope:`enterprise`,config:f(`enterprise`)}],[]),t=e.some(({config:e})=>h(e.errors,`fatal`).length>0),r=e.some(({config:e})=>h(e.errors,`warning`).length>0);return!t&&!r?null:(0,_.jsxs)(o,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,_.jsx)(i,{bold:!0,children:`MCP Config Diagnostics`}),(0,_.jsx)(o,{marginTop:1,children:(0,_.jsxs)(i,{dimColor:!0,children:[`For help configuring MCP servers, see:`,` `,(0,_.jsx)(n,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`})]})}),e.map(({scope:e,config:t})=>(0,_.jsx)(p,{scope:e,parsingErrors:h(t.errors,`fatal`),warnings:h(t.errors,`warning`)},e))]})}function h(e,t){return e.filter(e=>e.mcpErrorMetadata?.severity===t)}var g,_,v=e((()=>{g=t(r()),u(),l(),a(),_=s()}));export{v as n,m as t};
@@ -0,0 +1,3 @@
1
+ import{n as e,o as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./figures-gfT9mM8P.js";import{F as a,Rn as o,b as s,m as c,nt as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{Ct as m,cn as h,mr as g,vt as _}from"./state-sIHsFpDu.js";import{Ht as v,Ko as y,Uo as b,no as x,on as S,oo as C,pi as w,vi as T}from"./paths-DO4WOQtD.js";import{n as E,r as D}from"./analytics-DqMQntaB.js";import{n as O,t as k}from"./cwd--iizewsn.js";import{O as A,et as j,h as ee,m as te,o as ne,s as M}from"./log-DSV4Ht5l.js";import{b as N,x as re}from"./teammate-CbskW5G9.js";import{C as ie,g as ae,x as oe}from"./startupProfiler-CAntGAbs.js";import{Cn as se,Co as P,Eo as F,Ey as ce,Fc as le,Gc as I,Go as L,Ky as ue,Mc as R,Mo as de,NC as fe,Nc as pe,Oo as z,Ty as me,Uo as B,Wc as V,Wy as he,Yi as ge,Yo as _e,_D as ve,aS as ye,cu as be,dk as xe,fk as Se,fs as Ce,gD as we,ha as Te,jC as Ee,jy as De,lC as Oe,lk as H,ln as ke,na as Ae,oS as je,qi as Me,qo as Ne,uC as Pe,uu as U,vo as Fe,wy as Ie,yn as Le}from"./loadAgentsDir-ClTeo0nk.js";import{E as Re,T as ze,c as Be,d as Ve,w as He}from"./sessionTracing-Caw-kvQr.js";import{t as Ue}from"./useKeybinding-DPOUuymz.js";import{t as We}from"./useTerminalSize-Du-EamDN.js";import{n as Ge,t as Ke}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as qe,t as Je}from"./slashCommandParsing-BfanVchF.js";import*as W from"path";import{randomUUID as G}from"crypto";o();var K=p();r(),u(),h(),E(),O(),j(),te(),ne(),re(),oe(),y(),C(),S(),xe(),He(),we(),Ee(),Be(),be(),V(),le(),Ce(),B(),Ae(),se(),Je();var Ye={"`":"`",'"':`"`,"<":`>`,"{":`}`,"[":`]`,"(":`)`,"'":`'`};function Xe(e,t){if(!new RegExp(t,`i`).test(e)||e.startsWith(`/`))return[];let n=[],r=null,i=0,a=e=>!!e&&/[\p{L}\p{N}_]/u.test(e);for(let t=0;t<e.length;t++){let o=e[t];if(r){if(r===`[`&&o===`[`){i=t;continue}if(o!==Ye[r]||r===`'`&&a(e[t+1]))continue;n.push({start:i,end:t+1}),r=null}else (o===`<`&&t+1<e.length&&/[a-zA-Z/]/.test(e[t+1])||o===`'`&&!a(e[t-1])||o!==`<`&&o!==`'`&&o in Ye)&&(r=o,i=t)}let o=[],s=RegExp(`\\b${t}\\b`,`gi`),c=e.matchAll(s);for(let t of c){if(t.index===void 0)continue;let r=t.index,i=r+t[0].length;if(n.some(e=>r>=e.start&&r<e.end))continue;let s=e[r-1],c=e[i];s===`/`||s===`\\`||s===`-`||c===`/`||c===`\\`||c===`-`||c===`?`||c===`.`&&a(e[i+1])||o.push({word:t[0],start:r,end:i})}return o}function q(e){return Xe(e,`ultraplan`)}function Ze(e){return Xe(e,`ultrareview`)}function Qe(e){return q(e).length>0}function $e(e){let[t]=q(e);if(!t)return e;let n=e.slice(0,t.start),r=e.slice(t.end);return(n+r).trim()?n+t.word.slice(5)+r:``}function et(e){let t=e.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(t)}function tt(e){let t=e.toLowerCase().trim();return t===`continue`?!0:/\b(keep going|go on)\b/.test(t)}function nt(e,t,n,r,i,a,o){let s=G();g(s);let c=typeof e==`string`?e:e.find(e=>e.type===`text`)?.text||``;Ve(c);let l=typeof e==`string`?e:e.findLast(e=>e.type===`text`)?.text||``;return l&&ze(`user_prompt`,{prompt_length:String(l.length),prompt:Re(l),"prompt.id":s}),D(`tengu_input_prompt`,{is_negative:et(c),is_keep_going:tt(c)}),t.length>0?{messages:[F({content:[...typeof e==`string`?e.trim()?[{type:`text`,text:e}]:[]:e,...t],uuid:i,imagePasteIds:n.length>0?n:void 0,permissionMode:a,isMeta:o||void 0}),...r],shouldQuery:!0}:{messages:[F({content:e,uuid:i,permissionMode:a,isMeta:o||void 0}),...r],shouldQuery:!0}}E(),B();async function rt({input:e,preExpansionInput:t,mode:n,setToolJSX:r,context:i,pastedContents:a,ideSelection:o,messages:s,setUserInputOnProcessing:c,uuid:l,isAlreadyProcessing:u,querySource:d,canUseTool:f,skipSlashCommands:p,bridgeOrigin:m,isMeta:h,skipAttachments:g,autonomy:_}){let v=typeof e==`string`?e:null,y=v?.startsWith(`/`)&&!p;n===`prompt`&&v!==null&&!h&&!y&&c?.(v),U(`query_process_user_input_base_start`);let b=i.getAppState(),x=await at(e,n,r,i,a,o,s,l,u,d,f,b.toolPermissionContext.mode,p,m,h,g,t,_);if(U(`query_process_user_input_base_end`),!x.shouldQuery)return x;U(`query_hooks_start`);let S=de(e)||``;for await(let t of ke(S,b.toolPermissionContext.mode,i,i.requestPrompt))if(t.message?.type!==`progress`){if(t.blockingError)return{messages:[P(`${Le(t.blockingError)}\n\nOriginal prompt: ${e}`,`warning`)],shouldQuery:!1,allowedTools:x.allowedTools};if(t.preventContinuation){let e=t.stopReason?`Operation stopped by hook: ${t.stopReason}`:`Operation stopped by hook`;return x.messages.push(F({content:e})),x.shouldQuery=!1,x}if(t.additionalContexts&&t.additionalContexts.length>0&&x.messages.push(R({type:`hook_additional_context`,content:t.additionalContexts.map(it),hookName:`UserPromptSubmit`,toolUseID:`hook-${G()}`,hookEvent:`UserPromptSubmit`})),t.message)switch(t.message.attachment.type){case`hook_success`:if(!t.message.attachment.content)break;x.messages.push({...t.message,attachment:{...t.message.attachment,content:it(t.message.attachment.content)}});break;default:x.messages.push(t.message);break}}return U(`query_hooks_end`),x}var J=1e4;function it(e){return e.length>J?`${e.substring(0,J)}… [output truncated - exceeded ${J} characters]`:e}async function at(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_){let v=null,y=[],b=[],x=e;if(typeof e==`string`)v=e;else if(e.length>0){U(`query_image_processing_start`);let t=[];for(let n of e)if(n.type===`image`){let e=await Se(n);if(e.dimensions){let t=H(e.dimensions);t&&b.push(t)}t.push(e.block)}else t.push(n);x=t,U(`query_image_processing_end`);let n=t[t.length-1];n?.type===`text`?(v=n.text,y=t.slice(0,-1)):y=t}if(v===null&&t!==`prompt`)throw Error(`Mode: ${t} requires a string input.`);let S=i?Object.values(i).filter(I):[],C=S.map(e=>e.id),w=i?await fe(i):new Map;U(`query_pasted_image_processing_start`);let T=await Promise.all(S.map(async e=>{let t={type:`image`,source:{type:`base64`,media_type:e.mediaType||`image/png`,data:e.content}};return D(`tengu_pasted_image_resize_attempt`,{original_size_bytes:e.content.length}),{resized:await Se(t),originalDimensions:e.dimensions,sourcePath:e.sourcePath??w.get(e.id)}})),E=[];for(let{resized:e,originalDimensions:t,sourcePath:n}of T){if(e.dimensions){let t=H(e.dimensions,n);t&&b.push(t)}else if(t){let e=H(t,n);e&&b.push(e)}else n&&b.push(`[Image source: ${n}]`);E.push(e.block)}U(`query_pasted_image_processing_end`);let O=f;if(p&&v!==null&&v.startsWith(`/`)){let e=qe(v),t=e?Me(e.commandName,r.options.commands):void 0;if(t){let n=ge(t,e?.args??``);if(n.ok)O=!1;else{let e=n.reason??`/${Te(t)} isn't available over Remote Control.`;return{messages:[F({content:v,uuid:s}),Fe(`<local-command-stdout>${e}</local-command-stdout>`)],shouldQuery:!1,resultText:e}}}}if(t===`prompt`&&!r.options.isNonInteractiveSession&&v!==null&&!O&&!v.startsWith(`/`)&&!r.getAppState().ultraplanSessionUrl&&!r.getAppState().ultraplanLaunching&&Qe(g??v)){D(`tengu_ultraplan_keyword`,{});let e=$e(v).trim(),{processSlashCommand:t}=await import(`./processSlashCommand-DJGdVGbK.js`);return Y(await t(`/ultraplan ${e}`,y,E,[],r,n,s,c,u,_),b)}let k=!h&&v!==null&&(t!==`prompt`||O||!v.startsWith(`/`));U(`query_attachment_loading_start`);let A=k?await ve(pe(v,r,a??null,[],o,l)):[];if(U(`query_attachment_loading_end`),v!==null&&t===`bash`){let{processBashCommand:e}=await import(`./processBashCommand-BrqLqSva.js`);return Y(await e(v,y,A,r,n),b)}if(v!==null&&!O&&v.startsWith(`/`)){let{processSlashCommand:e}=await import(`./processSlashCommand-DJGdVGbK.js`);return Y(await e(v,y,E,A,r,n,s,c,u,_),b)}if(v!==null&&t===`prompt`){let e=v.trim(),t=A.find(e=>e.attachment.type===`agent_mention`);if(t){let n=`@agent-${t.attachment.agentType}`,r=e===n;D(`tengu_subagent_at_mention`,{is_subagent_only:r,is_prefix:e.startsWith(n)&&!r})}}return Y(nt(x,E,C,A,s,d,m),b)}function Y(e,t){return t.length>0&&e.messages.push(F({content:t.map(e=>({type:`text`,text:e})),isMeta:!0})),e}h(),T();function ot(e){return e===`Agent`?b:e}function st(e){let t=x()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:k(),session_id:m(),tools:e.tools.map(e=>ot(e.name)),mcp_servers:e.mcpClients.map(e=>({name:e.name,status:e.type})),model:e.model,permissionMode:e.permissionMode,slash_commands:e.commands.filter(e=>e.userInvocable!==!1).map(e=>e.name),apiKeySource:v().source,betas:_(),claude_code_version:`2.7.2`,output_style:t,agents:e.agents.map(e=>e.agentType),skills:e.skills.filter(e=>e.userInvocable!==!1).map(e=>e.name),plugins:e.plugins.map(e=>({name:e.name,path:e.path,source:e.source})),uuid:G()};return n.fast_mode_state=w(e.model,e.fastMode),n}var ct=n({MessageSelector:()=>ut,messagesAfterAreOnlySynthetic:()=>_t,selectableUserMessagesFilter:()=>Z});function lt(e){return e.type===`text`}function X(e){return e===`summarize`||e===`summarize_up_to`}function ut({messages:e,onPreRestore:t,onRestoreMessage:n,onRestoreCode:r,onSummarize:a,onClose:o,preselectedMessage:u}){let p=Pe(e=>e.fileHistory),[m,h]=(0,Q.useState)(void 0),g=me(),_=(0,Q.useMemo)(G,[]),v=(0,Q.useMemo)(()=>[...e.filter(Z),{...F({content:``}),uuid:_}],[e,_]),[y,b]=(0,Q.useState)(v.length-1),x=Math.max(0,Math.min(y-Math.floor($/2),v.length-$)),S=v.length>1,[C,w]=(0,Q.useState)(u),[T,E]=(0,Q.useState)(void 0);(0,Q.useEffect)(()=>{if(!u||!g)return;let e=!1;return ce(p,u.uuid).then(t=>{e||E(t)}),()=>{e=!0}},[u,g,p]);let[O,k]=(0,Q.useState)(!1),[A,j]=(0,Q.useState)(null),[ee,te]=(0,Q.useState)(`both`),[ne,N]=(0,Q.useState)(``),[re,ie]=(0,Q.useState)(``);function oe(e){let t=e?[{value:`both`,label:`Restore code and conversation`},{value:`conversation`,label:`Restore conversation`},{value:`code`,label:`Restore code`}]:[{value:`conversation`,label:`Restore conversation`}],n={type:`input`,placeholder:`add context (optional)`,initialValue:``,allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:`: `};return t.push({value:`summarize`,label:`Summarize from here`,...n,onChange:N}),process.env.USER_TYPE===`ant`&&t.push({value:`summarize_up_to`,label:`Summarize up to here`,...n,onChange:ie}),t.push({value:`nevermind`,label:`Never mind`}),t}(0,Q.useEffect)(()=>{D(`tengu_message_selector_opened`,{})},[]);async function se(e){t(),k(!0);try{await n(e),k(!1),o()}catch(e){M(e),k(!1),h(`Failed to restore the conversation:\n${e}`)}}async function P(t){let n=e.indexOf(t);if(D(`tengu_message_selector_selected`,{index_from_end:e.length-1-n,message_type:t.type,is_current_prompt:!1}),!e.includes(t)){o();return}if(!g){await se(t);return}let r=await ce(p,t.uuid);w(t),E(r)}async function le(e){if(D(`tengu_message_selector_restore_option_selected`,{option:e}),!C){h(`Message not found.`);return}if(e===`nevermind`){u?o():w(void 0);return}if(X(e)){t(),k(!0),j(e),h(void 0);try{let t=e===`summarize_up_to`?`up_to`:`from`;await a(C,(t===`up_to`?re:ne).trim()||void 0,t),k(!1),j(null),w(void 0),o()}catch(e){M(e),k(!1),j(null),w(void 0),h(`Failed to summarize:\n${e}`)}return}t(),k(!0),h(void 0);let i=null,s=null;if(e===`code`||e===`both`)try{await r(C)}catch(e){i=e,M(i)}if(e===`conversation`||e===`both`)try{await n(C)}catch(e){s=e,M(s)}k(!1),w(void 0),s&&i?h(`Failed to restore the conversation and code:\n${s}\n${i}`):s?h(`Failed to restore the conversation:\n${s}`):i?h(`Failed to restore the code:\n${i}`):o()}let I=Ge(),L=(0,Q.useCallback)(()=>{if(C&&!u){w(void 0);return}D(`tengu_message_selector_cancelled`,{}),o()},[o,C,u]),ue=(0,Q.useCallback)(()=>b(e=>Math.max(0,e-1)),[]),R=(0,Q.useCallback)(()=>b(e=>Math.min(v.length-1,e+1)),[v.length]),de=(0,Q.useCallback)(()=>b(0),[]),fe=(0,Q.useCallback)(()=>b(v.length-1),[v.length]),pe=(0,Q.useCallback)(()=>{let e=v[y];e&&P(e)},[v,y,P]);d(`confirm:no`,L,{context:`Confirmation`,isActive:!C}),l({"messageSelector:up":ue,"messageSelector:down":R,"messageSelector:top":de,"messageSelector:bottom":fe,"messageSelector:select":pe},{context:`MessageSelector`,isActive:!O&&!m&&!C&&S});let[z,B]=(0,Q.useState)({});(0,Q.useEffect)(()=>{async function t(){g&&Promise.all(v.map(async(t,n)=>{if(t.uuid!==_){let r=Ie(p,t.uuid),i=v.at(n+1),a=r?gt(e,t.uuid,i?.uuid===_?void 0:i?.uuid):void 0;B(a===void 0?e=>({...e,[n]:void 0}):e=>({...e,[n]:a}))}}))}t()},[v,e,_,p,g]);let V=g&&T?.filesChanged&&T.filesChanged.length>0,ge=!m&&!C&&!u&&S;return(0,K.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,K.jsx)(c,{color:`suggestion`}),(0,K.jsxs)(f,{flexDirection:`column`,marginX:1,gap:1,children:[(0,K.jsx)(s,{bold:!0,color:`suggestion`,children:`Rewind`}),m&&(0,K.jsx)(K.Fragment,{children:(0,K.jsxs)(s,{color:`error`,children:[`Error: `,m]})}),!S&&(0,K.jsx)(K.Fragment,{children:(0,K.jsx)(s,{children:`Nothing to rewind to yet.`})}),!m&&C&&S&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(s,{children:[`Confirm you want to restore `,!T&&`the conversation `,`to the point before you sent this message:`]}),(0,K.jsxs)(f,{flexDirection:`column`,paddingLeft:1,borderStyle:`single`,borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[(0,K.jsx)(ht,{userMessage:C,color:`text`,isCurrent:!1}),(0,K.jsxs)(s,{dimColor:!0,children:[`(`,ae(new Date(C.timestamp)),`)`]})]}),(0,K.jsx)(ft,{selectedRestoreOption:ee,canRestoreCode:!!V,diffStatsForRestore:T}),O&&X(A)?(0,K.jsxs)(f,{flexDirection:`row`,gap:1,children:[(0,K.jsx)(he,{}),(0,K.jsx)(s,{children:`Summarizing…`})]}):(0,K.jsx)(ye,{isDisabled:O,options:oe(!!V),defaultFocusValue:V?`both`:`conversation`,onFocus:e=>te(e),onChange:e=>le(e),onCancel:()=>u?o():w(void 0)}),V&&(0,K.jsx)(f,{marginBottom:1,children:(0,K.jsxs)(s,{dimColor:!0,children:[i.warning,` Rewinding does not affect files edited manually or via bash.`]})})]}),ge&&(0,K.jsxs)(K.Fragment,{children:[g?(0,K.jsx)(s,{children:`Restore the code and/or conversation to the point before…`}):(0,K.jsx)(s,{children:`Restore and fork the conversation to the point before…`}),(0,K.jsx)(f,{width:`100%`,flexDirection:`column`,children:v.slice(x,x+$).map((e,t)=>{let n=x+t,r=n===y,a=e.uuid===_,o=n in z,c=z[n],l=c?.filesChanged&&c.filesChanged.length;return(0,K.jsxs)(f,{height:g?3:2,overflow:`hidden`,width:`100%`,flexDirection:`row`,children:[(0,K.jsx)(f,{width:2,minWidth:2,children:r?(0,K.jsxs)(s,{color:`permission`,bold:!0,children:[i.pointer,` `]}):(0,K.jsx)(s,{children:` `})}),(0,K.jsxs)(f,{flexDirection:`column`,children:[(0,K.jsx)(f,{flexShrink:1,height:1,overflow:`hidden`,children:(0,K.jsx)(ht,{userMessage:e,color:r?`suggestion`:void 0,isCurrent:a,paddingRight:10})}),g&&o&&(0,K.jsx)(f,{height:1,flexDirection:`row`,children:c?(0,K.jsx)(K.Fragment,{children:(0,K.jsx)(s,{dimColor:!r,color:`inactive`,children:l?(0,K.jsxs)(K.Fragment,{children:[l===1&&c.filesChanged[0]?`${W.basename(c.filesChanged[0])} `:`${l} files changed `,(0,K.jsx)(mt,{diffStats:c})]}):(0,K.jsx)(K.Fragment,{children:`No code changes`})})}):(0,K.jsxs)(s,{dimColor:!0,color:`warning`,children:[i.warning,` No code restore`]})})]})]},e.uuid)})})]}),!C&&(0,K.jsx)(s,{dimColor:!0,italic:!0,children:I.pending?(0,K.jsxs)(K.Fragment,{children:[`Press `,I.keyName,` again to exit`]}):(0,K.jsxs)(K.Fragment,{children:[!m&&S&&`Enter to continue · `,`Esc to exit`]})})]})]})}function dt(e){switch(e){case`summarize`:return`Messages after this point will be summarized.`;case`summarize_up_to`:return`Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.`;case`both`:case`conversation`:return`The conversation will be forked.`;case`code`:case`nevermind`:return`The conversation will be unchanged.`}}function ft({selectedRestoreOption:e,canRestoreCode:t,diffStatsForRestore:n}){let r=t&&(e===`both`||e===`code`);return(0,K.jsxs)(f,{flexDirection:`column`,children:[(0,K.jsx)(s,{dimColor:!0,children:dt(e)}),!X(e)&&(r?(0,K.jsx)(pt,{diffStatsForRestore:n}):(0,K.jsx)(s,{dimColor:!0,children:`The code will be unchanged.`}))]})}function pt({diffStatsForRestore:e}){if(e===void 0)return;if(!e.filesChanged||!e.filesChanged[0])return(0,K.jsx)(s,{dimColor:!0,children:`The code has not changed (nothing will be restored).`});let t=e.filesChanged.length,n=``;return n=t===1?W.basename(e.filesChanged[0]||``):t===2?`${W.basename(e.filesChanged[0]||``)} and ${W.basename(e.filesChanged[1]||``)}`:`${W.basename(e.filesChanged[0]||``)} and ${e.filesChanged.length-1} other files`,(0,K.jsx)(K.Fragment,{children:(0,K.jsxs)(s,{dimColor:!0,children:[`The code will be restored `,(0,K.jsx)(mt,{diffStats:e}),` in `,n,`.`]})})}function mt({diffStats:e}){if(!(!e||!e.filesChanged))return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(s,{color:`diffAddedWord`,children:[`+`,e.insertions,` `]}),(0,K.jsxs)(s,{color:`diffRemovedWord`,children:[`-`,e.deletions]})]})}function ht({userMessage:e,color:t,dimColor:n,isCurrent:r,paddingRight:i}){let{columns:o}=a();if(r)return(0,K.jsx)(f,{width:`100%`,children:(0,K.jsx)(s,{italic:!0,color:t,dimColor:n,children:`(current)`})});let c=e.message.content,l=typeof c==`string`?null:c[c.length-1],u=ee(typeof c==`string`?c.trim():l&&lt(l)?l.text.trim():`(no prompt)`);if(L(u))return(0,K.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,K.jsx)(s,{italic:!0,color:t,dimColor:n,children:`((empty message))`})});if(u.includes(`<bash-input>`)){let e=z(u,`bash-input`);if(e)return(0,K.jsxs)(f,{flexDirection:`row`,width:`100%`,children:[(0,K.jsx)(s,{color:`bashBorder`,children:`!`}),(0,K.jsxs)(s,{color:t,dimColor:n,children:[` `,e]})]})}if(u.includes(`<command-message>`)){let e=z(u,A),r=z(u,`command-args`),i=z(u,`skill-format`)===`true`;if(e)return i?(0,K.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,K.jsxs)(s,{color:t,dimColor:n,children:[`Skill(`,e,`)`]})}):(0,K.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,K.jsxs)(s,{color:t,dimColor:n,children:[`/`,e,` `,r]})})}return(0,K.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,K.jsx)(s,{color:t,dimColor:n,children:i?ie(u,o-i,!0):u.slice(0,500).split(`
2
+ `).slice(0,4).join(`
3
+ `)})})}function gt(e,t,n){let r=e.findIndex(e=>e.uuid===t);if(r===-1)return;let i=n?e.findIndex(e=>e.uuid===n):e.length;i===-1&&(i=e.length);let a=[],o=0,s=0;for(let t=r+1;t<i;t++){let n=e[t];if(!n||!_e(n))continue;let r=n.toolUseResult;if(!(!r||!r.filePath||!r.structuredPatch)){a.includes(r.filePath)||a.push(r.filePath);try{if(`type`in r&&r.type===`create`)o+=r.content.split(/\r?\n/).length;else for(let e of r.structuredPatch){let t=N(e.lines,e=>e.startsWith(`+`)),n=N(e.lines,e=>e.startsWith(`-`));o+=t,s+=n}}catch{}}}return{filesChanged:a,insertions:o,deletions:s}}function Z(e){if(e.type!==`user`||Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_result`||Ne(e)||e.isMeta||e.isCompactSummary||e.isVisibleInTranscriptOnly)return!1;let t=e.message.content,n=typeof t==`string`?null:t[t.length-1],r=typeof t==`string`?t.trim():n&&lt(n)?n.text.trim():``;return!(r.indexOf(`<local-command-stdout>`)!==-1||r.indexOf(`<local-command-stderr>`)!==-1||r.indexOf(`<bash-stdout>`)!==-1||r.indexOf(`<bash-stderr>`)!==-1||r.indexOf(`<task-notification>`)!==-1||r.indexOf(`<tick>`)!==-1||r.indexOf(`<teammate-message`)!==-1)}function _t(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(t&&!Ne(t)&&!_e(t)&&t.type!==`progress`&&t.type!==`system`&&t.type!==`attachment`&&!(t.type===`user`&&t.isMeta)){if(t.type===`assistant`){let e=t.message.content;if(Array.isArray(e)&&e.some(e=>e.type===`text`&&e.text.trim()||e.type===`tool_use`))return!1;continue}if(t.type===`user`)return!1}}return!0}var Q,$,vt=e((()=>{Q=t(o()),E(),Oe(),De(),Ke(),Ue(),B(),je(),ue(),We(),$=7}));export{Z as a,rt as c,_t as i,q as l,ct as n,st as o,vt as r,ot as s,ut as t,Ze as u};