claude-code-best 2.6.6 → 2.6.9

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 (435) hide show
  1. package/README.md +3 -5
  2. package/dist/chunks/{AddWorkspaceDirectory-Bb6crGWh.js → AddWorkspaceDirectory-_RSNUS7K.js} +1 -1
  3. package/dist/chunks/{App-CW0Y4ceR.js → App-4VqMMjIu.js} +1 -1
  4. package/dist/chunks/{ApproveApiKey-9rkwQfgT.js → ApproveApiKey-B7oSxzWc.js} +1 -1
  5. package/dist/chunks/ApproveApiKey-Bmcop2Do.js +1 -0
  6. package/dist/chunks/{AssistantSessionChooser-XzXZZdiH.js → AssistantSessionChooser-Lf5l_1Dh.js} +1 -1
  7. package/dist/chunks/BackgroundTasksDialog-Ckgmqm6u.js +2 -0
  8. package/dist/chunks/{BypassPermissionsModeDialog-DlLWAKw2.js → BypassPermissionsModeDialog-DNqPpiPC.js} +1 -1
  9. package/dist/chunks/{ClaudeInChromeOnboarding-CjGydpBk.js → ClaudeInChromeOnboarding-BODZ64gw.js} +1 -1
  10. package/dist/chunks/{ClaudeMdExternalIncludesDialog-B04cjDwX.js → ClaudeMdExternalIncludesDialog-DLI6ey3G.js} +1 -1
  11. package/dist/chunks/ClaudeMdExternalIncludesDialog-DO61Zz-S.js +1 -0
  12. package/dist/chunks/ConsoleOAuthFlow-FSHC5mxO.js +1 -0
  13. package/dist/chunks/{DesktopHandoff-CFBUqcCf.js → DesktopHandoff--xyI5kTQ.js} +1 -1
  14. package/dist/chunks/{DevChannelsDialog-ByTf41du.js → DevChannelsDialog-DJ4mHsA_.js} +1 -1
  15. package/dist/chunks/{DiffDialog-CY-8kw_Q.js → DiffDialog-CVWUlOjm.js} +2 -2
  16. package/dist/chunks/Doctor-DVoFX-9y.js +3 -0
  17. package/dist/chunks/Doctor-Dcntgp5Z.js +1 -0
  18. package/dist/chunks/{ExitFlow-BlON8IgH.js → ExitFlow-BKzQPr75.js} +2 -2
  19. package/dist/chunks/{Feedback-CSeD3k4M.js → Feedback-hFZwDSRp.js} +2 -2
  20. package/dist/chunks/Grove-Cmcsx2UE.js +1 -0
  21. package/dist/chunks/{Grove-Tp_UtIMg.js → Grove-G0DtwY22.js} +1 -1
  22. package/dist/chunks/{HybridTransport-CAko699F.js → HybridTransport-xN03sWrt.js} +1 -1
  23. package/dist/chunks/{ITermBackend-5P3WJumD.js → ITermBackend-DzN3ZWds.js} +1 -1
  24. package/dist/chunks/{InvalidConfigDialog-CVcdra9v.js → InvalidConfigDialog-Iy4Su1Lm.js} +1 -1
  25. package/dist/chunks/{InvalidSettingsDialog-CfLdbmSI.js → InvalidSettingsDialog-dx4y_nY-.js} +1 -1
  26. package/dist/chunks/{MCPConnectionManager-BK_3uwQj.js → MCPConnectionManager-kVO-4BcA.js} +1 -1
  27. package/dist/chunks/{McpParsingWarnings-BOj-T8F3.js → McpParsingWarnings-D420-W8M.js} +1 -1
  28. package/dist/chunks/MessageSelector-CDVC2CAj.js +3 -0
  29. package/dist/chunks/Messages-C5gVVVmY.js +11 -0
  30. package/dist/chunks/{Onboarding-C06Mxlf-.js → Onboarding-BkidUre_.js} +1 -1
  31. package/dist/chunks/{OverageCreditUpsell-abcPm3PB.js → OverageCreditUpsell-DoRUucoN.js} +1 -1
  32. package/dist/chunks/PluginSettings-DhpNtjTm.js +17 -0
  33. package/dist/chunks/{PromptInputFooterSuggestions-ihnbjU0K.js → PromptInputFooterSuggestions-BnpXzkW9.js} +1 -1
  34. package/dist/chunks/{PromptInputHelpMenu-CMm8z7Gk.js → PromptInputHelpMenu-DKbiO4C0.js} +1 -1
  35. package/dist/chunks/QueryEngine-J15EOjWx.js +1 -0
  36. package/dist/chunks/REPL-Dk3Ics9i.js +1 -0
  37. package/dist/chunks/{REPL-CBFcgD4r.js → REPL-nrJ13J1o.js} +34 -34
  38. package/dist/chunks/{RemoteCallout-Cy6lH-CZ.js → RemoteCallout-DGXIcTKv.js} +1 -1
  39. package/dist/chunks/{RemoteSessionManager-C7iGd5Og.js → RemoteSessionManager-3KsuTCZM.js} +2 -2
  40. package/dist/chunks/ResumeConversation-kS7lkjJm.js +1 -0
  41. package/dist/chunks/{SSETransport-B5xlXeAN.js → SSETransport-Cy1rXP6E.js} +1 -1
  42. package/dist/chunks/SearchExtraToolsTool-C998WSxs.js +1 -0
  43. package/dist/chunks/SentryErrorBoundary-BJLT-ebr.js +1 -0
  44. package/dist/chunks/{SentryErrorBoundary-iih9eFpM.js → SentryErrorBoundary-B_6MfzRa.js} +1 -1
  45. package/dist/chunks/Settings-DBopjMkN.js +2 -0
  46. package/dist/chunks/{TeleportProgress-BX-uLwuL.js → TeleportProgress-CQUN_zoe.js} +1 -1
  47. package/dist/chunks/{TeleportRepoMismatchDialog-D8oPPTWd.js → TeleportRepoMismatchDialog-CPquWrd-.js} +1 -1
  48. package/dist/chunks/{TeleportResumeWrapper-B_CvNDbr.js → TeleportResumeWrapper-NIFNCHIO.js} +1 -1
  49. package/dist/chunks/{ThemePicker-BG1ykSpX.js → ThemePicker-DnK0DStD.js} +1 -1
  50. package/dist/chunks/{TmuxBackend-CnMCWNS4.js → TmuxBackend-C00k5RF9.js} +1 -1
  51. package/dist/chunks/{TrustDialog-Z_maAYj8.js → TrustDialog-CUnvtDeS.js} +1 -1
  52. package/dist/chunks/{ValidationErrorsList-C9swVkZ-.js → ValidationErrorsList-CJbO1qub.js} +1 -1
  53. package/dist/chunks/{WelcomeV2-Au_5ddlT.js → WelcomeV2-BBFGft_e.js} +1 -1
  54. package/dist/chunks/{WindowsTerminalBackend-CGxaYH74.js → WindowsTerminalBackend-DSsgxuNK.js} +1 -1
  55. package/dist/chunks/{add-dir-Cm9u56YX.js → add-dir-BPqd010H.js} +1 -1
  56. package/dist/chunks/{agentDisplay-Bi_bEyEn.js → agentDisplay-C0B1b_90.js} +1 -1
  57. package/dist/chunks/{agents-CbjR7hNr.js → agents-CYs7WGHP.js} +1 -1
  58. package/dist/chunks/{agents-CMF9fLzV.js → agents-DMzVeRly.js} +7 -7
  59. package/dist/chunks/{ant-Bu1Gs4WJ.js → ant-BO0Hmoii.js} +1 -1
  60. package/dist/chunks/api-B2HW-oZI.js +1 -0
  61. package/dist/chunks/{api-D_t0nHsS.js → api-DLLVkmRJ.js} +1 -1
  62. package/dist/chunks/asciicast-C3nf97NR.js +1 -0
  63. package/dist/chunks/{asciicast-o5Zg4dJt.js → asciicast-DIsaWcsJ.js} +1 -1
  64. package/dist/chunks/assistant-BmM44yln.js +1 -0
  65. package/dist/chunks/{assistant-C_pfWe2a.js → assistant-CHp4-EaF.js} +1 -1
  66. package/dist/chunks/{assistant-EA-MHNQ-.js → assistant-_dIpsqHM.js} +1 -1
  67. package/dist/chunks/{auth-D7PZvVPf.js → auth-DelyQc8g.js} +1 -1
  68. package/dist/chunks/auth-ndSNSeqS.js +1 -0
  69. package/dist/chunks/{autoMode-B8iO05xy.js → autoMode-D3-o7xPK.js} +1 -1
  70. package/dist/chunks/{autonomy-CaLvE5N6.js → autonomy-CzSRoxjl.js} +12 -12
  71. package/dist/chunks/{autonomy-dQVtSiCJ.js → autonomy-tTAucjip.js} +1 -1
  72. package/dist/chunks/{autonomyPanel-DSswVlCF.js → autonomyPanel-DcK8N52K.js} +1 -1
  73. package/dist/chunks/backgroundHousekeeping-Bbkz61_-.js +17 -0
  74. package/dist/chunks/backgroundHousekeeping-DVo3ndZr.js +1 -0
  75. package/dist/chunks/{branch-C7pM8Sjh.js → branch-ZJF4xAh9.js} +1 -1
  76. package/dist/chunks/{bridge-CTYdzSWg.js → bridge-C6gSt_32.js} +2 -2
  77. package/dist/chunks/{bridgeConfig-Df6uyp3q.js → bridgeConfig-DXUNQp2l.js} +1 -1
  78. package/dist/chunks/bridgeConfig-ZcbBdhji.js +1 -0
  79. package/dist/chunks/bridgeEnabled-D5qCI5v2.js +1 -0
  80. package/dist/chunks/{bridgeEnabled-A-_xJ94c.js → bridgeEnabled-G6vxQV-7.js} +1 -1
  81. package/dist/chunks/bridgeMain-B4Zv8UOe.js +1 -0
  82. package/dist/chunks/bridgeMain-DlnIQOtX.js +68 -0
  83. package/dist/chunks/{bridgeMessaging-DPVLAIzl.js → bridgeMessaging-mek-AaFi.js} +1 -1
  84. package/dist/chunks/{bridgePointer-FvAMj3re.js → bridgePointer-B2FPGDWR.js} +1 -1
  85. package/dist/chunks/{btw-CqgjLlFN.js → btw-Cz2lyle-.js} +1 -1
  86. package/dist/chunks/{buddy-DCGBAqF2.js → buddy-BMqKttFw.js} +1 -1
  87. package/dist/chunks/{bypassPermissionsKillswitch-CK0jeZTW.js → bypassPermissionsKillswitch-BxvX48jr.js} +1 -1
  88. package/dist/chunks/caches-D_W3nCFE.js +1 -0
  89. package/dist/chunks/{caches-CdVW8fYV.js → caches-wtRUk5y5.js} +2 -2
  90. package/dist/chunks/{ccrClient-B_3AmY7K.js → ccrClient-BOrmrmgF.js} +1 -1
  91. package/dist/chunks/changeDetector-CUsHUdul.js +1 -0
  92. package/dist/chunks/channelNotification-CLVU5AuO.js +1 -0
  93. package/dist/chunks/{channelNotification-BbDQdLZC.js → channelNotification-D8do6HUN.js} +1 -1
  94. package/dist/chunks/{chrome-CGyqsCkL.js → chrome-JF2BXNK6.js} +1 -1
  95. package/dist/chunks/clear-BP-G1JWa.js +1 -0
  96. package/dist/chunks/client-BHfY6SC5.js +1 -0
  97. package/dist/chunks/color-oh8CGhkI.js +1 -0
  98. package/dist/chunks/commands-E0eNJ_XZ.js +1 -0
  99. package/dist/chunks/commitAttribution-B4DOgUS7.js +1 -0
  100. package/dist/chunks/{commitAttribution-e0kkanVT.js → commitAttribution-CUdm_sRl.js} +1 -1
  101. package/dist/chunks/{compact-Dh9RewNA.js → compact-R6vMbGQQ.js} +3 -3
  102. package/dist/chunks/{companion-DVFacTUw.js → companion-ClxqTyG9.js} +1 -1
  103. package/dist/chunks/{config-DwiVCSrY.js → config-BQ-MayP6.js} +1 -1
  104. package/dist/chunks/{config-CkSmYDJY.js → config-CPK9PlWS.js} +1 -1
  105. package/dist/chunks/{context-B8VDDHTv.js → context-CWfsKYEB.js} +1 -1
  106. package/dist/chunks/{context-noninteractive-IZfWniex.js → context-noninteractive-BJ4hE3MX.js} +2 -2
  107. package/dist/chunks/context-noninteractive-D1Kxn5e0.js +1 -0
  108. package/dist/chunks/conversation-C23rDJe3.js +1 -0
  109. package/dist/chunks/conversation-DizpkPtq.js +1 -0
  110. package/dist/chunks/{copy-CIjrYoFa.js → copy-BuPCS2HG.js} +2 -2
  111. package/dist/chunks/{createSSHSession-ArNlbIZB.js → createSSHSession-Di9Je4Th.js} +1 -1
  112. package/dist/chunks/createSession-Bsa0VJKS.js +1 -0
  113. package/dist/chunks/{createSession-CBheIT_G.js → createSession-D6v0lBtG.js} +1 -1
  114. package/dist/chunks/{cronJitterConfig-DcMGWOa-.js → cronJitterConfig-By18m-PD.js} +3 -3
  115. package/dist/chunks/{crossProjectResume-Z-aR2q-d.js → crossProjectResume-C4YT2T6P.js} +3 -3
  116. package/dist/chunks/{datadog-BK8eJz8B.js → datadog-BFSdlK6C.js} +1 -1
  117. package/dist/chunks/datadog-MUvg76p3.js +1 -0
  118. package/dist/chunks/{desktop-B9vWJeRu.js → desktop-Bd-JHrBo.js} +1 -1
  119. package/dist/chunks/{diff-BTV7_Dca.js → diff-DGmINgOc.js} +1 -1
  120. package/dist/chunks/{directoryCompletion-DP_4B1GL.js → directoryCompletion-D7EGwonO.js} +1 -1
  121. package/dist/chunks/{doctor-Dpbh0aRz.js → doctor-DQ42RQPx.js} +1 -1
  122. package/dist/chunks/{effort-Czlwa5qF.js → effort-E6XjzPYR.js} +2 -2
  123. package/dist/chunks/entry-Di8oWZUk.js +14 -0
  124. package/dist/chunks/{envLessBridgeConfig-BAFYaZ0E.js → envLessBridgeConfig-BNvozi46.js} +1 -1
  125. package/dist/chunks/envLessBridgeConfig-CUTBQKDY.js +1 -0
  126. package/dist/chunks/{exit-DzOm62Dn.js → exit-CVlpMwCq.js} +1 -1
  127. package/dist/chunks/{export-DHOR3z3Z.js → export-CXcPQd0T.js} +1 -1
  128. package/dist/chunks/{exportRenderer-CiNXeNr9.js → exportRenderer-B9WXgMV2.js} +1 -1
  129. package/dist/chunks/{extra-usage-DIYR_3ZR.js → extra-usage-B2KmuAZe.js} +1 -1
  130. package/dist/chunks/extra-usage-DVtAa1zD.js +1 -0
  131. package/dist/chunks/{extra-usage-core-C3uM9bOP.js → extra-usage-core-B20tawuN.js} +1 -1
  132. package/dist/chunks/{extra-usage-noninteractive-Ctz9TfY8.js → extra-usage-noninteractive-DZRe98BZ.js} +1 -1
  133. package/dist/chunks/{extraUsage-CBwIvl73.js → extraUsage-CxqJdnGC.js} +1 -1
  134. package/dist/chunks/extractMemories-8uB606Y0.js +1 -0
  135. package/dist/chunks/{fast-BpBwjbSD.js → fast-CPmJ2bp3.js} +1 -1
  136. package/dist/chunks/fast-DTGg3pRh.js +1 -0
  137. package/dist/chunks/{feedback-BkVnsZVx.js → feedback-4GY3ahvw.js} +1 -1
  138. package/dist/chunks/{firstPartyEventLogger-BCzGkdpd.js → firstPartyEventLogger-CISUrAsf.js} +1 -1
  139. package/dist/chunks/{flushGate-CQsnMw8g.js → flushGate-Dr8sMjB7.js} +1 -1
  140. package/dist/chunks/gates-BbF5S-Dy.js +1 -0
  141. package/dist/chunks/{gates-CxWIWtmd.js → gates-DI4pxvrD.js} +1 -1
  142. package/dist/chunks/{gemini-BbV8D2SS.js → gemini-Dcfosr2Z.js} +1 -1
  143. package/dist/chunks/{generateRecap-B3j2nUgh.js → generateRecap-CH_fgtxk.js} +1 -1
  144. package/dist/chunks/{generateSessionName-aGnXSNgN.js → generateSessionName-DO0R__8w.js} +1 -1
  145. package/dist/chunks/{githubRepoPathMapping-DCJLSTLl.js → githubRepoPathMapping-D5I8CVDz.js} +1 -1
  146. package/dist/chunks/grok-X0FzcE6Y.js +1 -0
  147. package/dist/chunks/{growthbook-prtWhMRg.js → growthbook-DZPT2JzB.js} +1 -1
  148. package/dist/chunks/{heapdump-Czm-2XiG.js → heapdump-Cq6i0wJH.js} +1 -1
  149. package/dist/chunks/{help-CSAFsN0-.js → help-B8ddA-Ec.js} +1 -1
  150. package/dist/chunks/{hooks-DkbOP-bI.js → hooks-CvFNccdv.js} +2 -2
  151. package/dist/chunks/hooks-gwB4Eotj.js +1 -0
  152. package/dist/chunks/{hostAdapter-BcdDPVTj.js → hostAdapter-D3s4JFk-.js} +1 -1
  153. package/dist/chunks/{ide-BXERRFZF.js → ide-CzxV5_D7.js} +2 -2
  154. package/dist/chunks/{inboundAttachments-7rXrAtkb.js → inboundAttachments-B3ZTyNKF.js} +1 -1
  155. package/dist/chunks/inboundAttachments-DxrrrqBW.js +1 -0
  156. package/dist/chunks/initReplBridge-DWpGy3aE.js +1 -0
  157. package/dist/chunks/{insights-DrvqJgF8.js → insights-DiWlKgVQ.js} +5 -5
  158. package/dist/chunks/{install-BGnxwO00.js → install-BFpg1zm1.js} +1 -1
  159. package/dist/chunks/{install-github-app-CIpBHlr9.js → install-github-app-BUCGGSw0.js} +2 -2
  160. package/dist/chunks/{install-slack-app-By4Lh7ww.js → install-slack-app-D5JDqzbs.js} +1 -1
  161. package/dist/chunks/{instrumentation-D9y7Ph_R.js → instrumentation--BToLJT9.js} +3 -3
  162. package/dist/chunks/{job-BPVIMW_P.js → job-mUyxSEc2.js} +1 -1
  163. package/dist/chunks/{keybindings-Ce6AHMLI.js → keybindings-D4DbE4G0.js} +2 -2
  164. package/dist/chunks/{lang-DfDG_fSa.js → lang-cMcnaxAR.js} +1 -1
  165. package/dist/chunks/language-DC6bsdvI.js +1 -0
  166. package/dist/chunks/{language-yGoDFP3X.js → language-sTn9sA3E.js} +1 -1
  167. package/dist/chunks/{launchAgentsPlatform-DT01xZM7.js → launchAgentsPlatform-CAfyCAsQ.js} +1 -1
  168. package/dist/chunks/{launchAutofixPr-DrYd7WVf.js → launchAutofixPr-CSMamZS6.js} +3 -3
  169. package/dist/chunks/{launchLocalMemory-Bt3tMYVJ.js → launchLocalMemory-nYAwNsNT.js} +2 -2
  170. package/dist/chunks/{launchLocalVault-jyRHEa_Y.js → launchLocalVault-yPp8S-tG.js} +3 -3
  171. package/dist/chunks/{launchMemoryStores-cmXnLAF5.js → launchMemoryStores-Dk3SXucB.js} +1 -1
  172. package/dist/chunks/{launchOnboarding-BPTNFftb.js → launchOnboarding-BoqmHyRx.js} +1 -1
  173. package/dist/chunks/{launchSchedule-141GqGC8.js → launchSchedule-C2HBjD6C.js} +1 -1
  174. package/dist/chunks/{launchSkillStore-Bz0lok_o.js → launchSkillStore-B5Yjvi-k.js} +1 -1
  175. package/dist/chunks/{launchTeleport-BMquJxIq.js → launchTeleport-BayvAnwh.js} +3 -3
  176. package/dist/chunks/{launchVault-Bsuwqad6.js → launchVault-BszsgPbZ.js} +1 -1
  177. package/dist/chunks/loadAgentsDir-6_9ZFegv.js +1 -0
  178. package/dist/chunks/{loadAgentsDir-D7kapZB5.js → loadAgentsDir-Cl2w3uvH.js} +810 -791
  179. package/dist/chunks/loadPluginHooks-YHtjByxm.js +1 -0
  180. package/dist/chunks/{localSearch-r1_G8kfV.js → localSearch-CpeqVibs.js} +1 -1
  181. package/dist/chunks/localSearch-DbEm6f3k.js +1 -0
  182. package/dist/chunks/login-D2x89UCR.js +1 -0
  183. package/dist/chunks/{login-7MvpaOkt.js → login-TVtq34WQ.js} +1 -1
  184. package/dist/chunks/{logoV2Utils-DjThKW15.js → logoV2Utils-DwaRnvOY.js} +1 -1
  185. package/dist/chunks/logout-BBPihkXp.js +1 -0
  186. package/dist/chunks/{magicDocs-Dy72LHIj.js → magicDocs-_yNWB88A.js} +2 -2
  187. package/dist/chunks/{main-CF6Im-LV.js → main-gTbhsbIs.js} +48 -48
  188. package/dist/chunks/{mappers-CkMESMy7.js → mappers-COd8OOml.js} +1 -1
  189. package/dist/chunks/mcp-CChzTC5v.js +6 -0
  190. package/dist/chunks/{mcp-BTgHgOhR.js → mcp-D-0wE0nJ.js} +2 -2
  191. package/dist/chunks/mcp-DoraEndj.js +1 -0
  192. package/dist/chunks/{mcpServer-BueM5fWI.js → mcpServer-CpBN77YB.js} +1 -1
  193. package/dist/chunks/{mcpServer-Dqm2PQQx.js → mcpServer-Wd9rZG_E.js} +1 -1
  194. package/dist/chunks/{memory-BNZmqma1.js → memory-I21QZZ9h.js} +1 -1
  195. package/dist/chunks/{model-DOw7wIKQ.js → model-BrHh21Db.js} +1 -1
  196. package/dist/chunks/model-C6_WjCy0.js +1 -0
  197. package/dist/chunks/{onChangeAppState-Cb9_yIuW.js → onChangeAppState-Cn_HSmmQ.js} +1 -1
  198. package/dist/chunks/openai-BD2V4lHN.js +10 -0
  199. package/dist/chunks/openaiShared-Bjrci9n8.js +1 -0
  200. package/dist/chunks/{overageCreditGrant-BrN7dk3d.js → overageCreditGrant-B47t5a73.js} +1 -1
  201. package/dist/chunks/{passes-vgcY8_l8.js → passes-DAOPYX0C.js} +1 -1
  202. package/dist/chunks/{path-C4kbwvSH.js → path-B3lx7yHn.js} +1 -1
  203. package/dist/chunks/{paths-1ngPRtu3.js → paths-q1-Ni8Oh.js} +7 -7
  204. package/dist/chunks/permissions-BmxTU-Pk.js +3 -0
  205. package/dist/chunks/{pipeTransport-KU8psPDI.js → pipeTransport-DnHE3axn.js} +1 -1
  206. package/dist/chunks/{plan-5NVPuxp6.js → plan-4dmnQ9bv.js} +1 -1
  207. package/dist/chunks/{plugin-t8jMqdsY.js → plugin-CG7lJIpf.js} +1 -1
  208. package/dist/chunks/{pluginAutoupdate-CAa4KLro.js → pluginAutoupdate-CPLuidh-.js} +1 -1
  209. package/dist/chunks/{pluginBlocklist-BG2LkLq1.js → pluginBlocklist-BHxIUqu4.js} +1 -1
  210. package/dist/chunks/{pluginCliCommands-vqAtVibb.js → pluginCliCommands-BcDIvxR3.js} +1 -1
  211. package/dist/chunks/{pluginFlagging-BFCtv3kY.js → pluginFlagging-Dh6rYOvj.js} +1 -1
  212. package/dist/chunks/{pluginOperations-C9XP-mko.js → pluginOperations-fdLcp72i.js} +2 -2
  213. package/dist/chunks/{pluginStartupCheck-RRcAbKfx.js → pluginStartupCheck-Dy7EckW4.js} +1 -1
  214. package/dist/chunks/pluginStartupCheck-fyqW-stg.js +1 -0
  215. package/dist/chunks/plugins-C3-iYKTp.js +4 -0
  216. package/dist/chunks/policyLimits-DUGrXcje.js +1 -0
  217. package/dist/chunks/{pollConfig-DTYIJ8lQ.js → pollConfig-BGXMaSla.js} +1 -1
  218. package/dist/chunks/{poor-Dw5dMZpM.js → poor-CxAil0Mi.js} +1 -1
  219. package/dist/chunks/poorMode-BkPHRLuG.js +1 -0
  220. package/dist/chunks/{poorMode-CsGLI_hm.js → poorMode-DFcYVnMT.js} +1 -1
  221. package/dist/chunks/print-Cog1o-Tw.js +39 -0
  222. package/dist/chunks/{privacy-settings-P2r-kg2i.js → privacy-settings-D6g7p6sB.js} +1 -1
  223. package/dist/chunks/{processBashCommand-a8W8aTRu.js → processBashCommand-DqgujTR4.js} +1 -1
  224. package/dist/chunks/processSlashCommand-DUPS9Xx3.js +6 -0
  225. package/dist/chunks/prompt-B-8CD-W_.js +1 -0
  226. package/dist/chunks/{prompt-BBg3jtfc.js → prompt-BmOnuQfF.js} +1 -1
  227. package/dist/chunks/prompt-Da3gIGA8.js +1 -0
  228. package/dist/chunks/{promptEditor-CvaugNTt.js → promptEditor-ClGwMkWl.js} +2 -2
  229. package/dist/chunks/{protocolHandler-DxBaHlaD.js → protocolHandler--b0d38gF.js} +1 -1
  230. package/dist/chunks/{rate-limit-options-Df_sgE0b.js → rate-limit-options-DD2ZRREl.js} +1 -1
  231. package/dist/chunks/{rcDebugLog-CPGWJbI4.js → rcDebugLog-fhwD4wm-.js} +1 -1
  232. package/dist/chunks/{referral-BKeCKnOJ.js → referral-rRvT6UDX.js} +1 -1
  233. package/dist/chunks/refresh-C7S_6LOQ.js +1 -0
  234. package/dist/chunks/{registerProtocol-DLuRm0mf.js → registerProtocol-Bu_tz5Au.js} +1 -1
  235. package/dist/chunks/{registry-DVSgtCq5.js → registry-Bk0vdx_8.js} +1 -1
  236. package/dist/chunks/{release-notes-CZcf8zB7.js → release-notes-BShc_V-B.js} +1 -1
  237. package/dist/chunks/{releaseNotes-CvfZb3fZ.js → releaseNotes-D3wZdQVZ.js} +2 -2
  238. package/dist/chunks/{reload-plugins-pSlDLk3b.js → reload-plugins-CpytFAAC.js} +1 -1
  239. package/dist/chunks/{remote-env-BH89NuwC.js → remote-env-B9Of1v31.js} +1 -1
  240. package/dist/chunks/{remoteBridgeCore-CrXlWEL1.js → remoteBridgeCore-BXp6nJ8q.js} +1 -1
  241. package/dist/chunks/{remoteControlServer-BSOnq4yY.js → remoteControlServer-BvlTaHu4.js} +2 -2
  242. package/dist/chunks/{rename-DNGvNQm2.js → rename-DhTddAd7.js} +1 -1
  243. package/dist/chunks/{resume-6UL38yL3.js → resume-DwVeFqnc.js} +2 -2
  244. package/dist/chunks/{runtimeObserver-Cp-DN8fP.js → runtimeObserver-BtgDP8Gz.js} +1 -1
  245. package/dist/chunks/{runtimeObserver-BhvHeiwD.js → runtimeObserver-dtT0QHYO.js} +4 -4
  246. package/dist/chunks/sandbox-adapter-Cm8kCM_U.js +1 -0
  247. package/dist/chunks/{sandbox-toggle-D19YbI5G.js → sandbox-toggle-CG2vZNAb.js} +1 -1
  248. package/dist/chunks/searchExtraTools-D-RZ9DId.js +1 -0
  249. package/dist/chunks/{sentry-BZmpC-iI.js → sentry-DFk8bzvt.js} +1 -1
  250. package/dist/chunks/{session-lLpGqp0B.js → session-DifFcUdR.js} +1 -1
  251. package/dist/chunks/{sessionDiscovery-BX3fjgzD.js → sessionDiscovery-CRbLIQv1.js} +1 -1
  252. package/dist/chunks/sessionFileAccessHooks-Bixkjai4.js +1 -0
  253. package/dist/chunks/sessionMemory-BdptRKL8.js +1 -0
  254. package/dist/chunks/sessionMemory-T1K_mJRE.js +1 -0
  255. package/dist/chunks/sessionMemoryUtils-q3xRtP-z.js +1 -0
  256. package/dist/chunks/{sessionObserver-CujNIWks.js → sessionObserver-D3vw6SJ_.js} +1 -1
  257. package/dist/chunks/sessionObserver-i_3day_6.js +1 -0
  258. package/dist/chunks/sessionStorage-CusaYoh0.js +1 -0
  259. package/dist/chunks/sessionStoragePortable-DJZ_6cL8.js +3 -0
  260. package/dist/chunks/{sessionTitle-QxXslbJY.js → sessionTitle-DnvlYJ-c.js} +2 -2
  261. package/dist/chunks/{sessionTracing-DognYcDf.js → sessionTracing-BkzKJi0v.js} +1 -1
  262. package/dist/chunks/{settingsSync-DEPET5O1.js → settingsSync-CHZVpM34.js} +1 -1
  263. package/dist/chunks/{setup-C6G0lasE.js → setup-BfecYO-n.js} +1 -1
  264. package/dist/chunks/setup-BpwYOhci.js +2 -0
  265. package/dist/chunks/{setup-BUBUidOg.js → setup-GxlEx1KG.js} +1 -1
  266. package/dist/chunks/{shadowedRuleDetection-CQayPrmM.js → shadowedRuleDetection-FNzEipG0.js} +1 -1
  267. package/dist/chunks/{sideQuestion-B9EE1vTM.js → sideQuestion-Bfa0SZn5.js} +1 -1
  268. package/dist/chunks/sink-BSwQ045N.js +1 -0
  269. package/dist/chunks/{sink-Cugto5We.js → sink-DpAjuilF.js} +1 -1
  270. package/dist/chunks/{sinks-B9A94oIj.js → sinks-C37Xl5c3.js} +2 -2
  271. package/dist/chunks/sinks-DHHmQJi-.js +1 -0
  272. package/dist/chunks/{skill-learning-CroDcatu.js → skill-learning-BSeEbCnP.js} +1 -1
  273. package/dist/chunks/skillChangeDetector-BEDBRGbY.js +1 -0
  274. package/dist/chunks/{skillGapStore-91Mb3xDY.js → skillGapStore-B4GmZRJ0.js} +2 -2
  275. package/dist/chunks/{skillGapStore-LKwap3o4.js → skillGapStore-BCO6YB3H.js} +1 -1
  276. package/dist/chunks/{skillGenerator-B9GM0LHk.js → skillGenerator-QgDWAvzK.js} +2 -2
  277. package/dist/chunks/skillLearning-CFYgFRPE.js +1 -0
  278. package/dist/chunks/skillLearning-en7AuVDZ.js +1 -0
  279. package/dist/chunks/{skillPanel-rIIYgnBE.js → skillPanel-srZjMIbC.js} +3 -3
  280. package/dist/chunks/{skillSearchPanel-xAL-6uJF.js → skillSearchPanel-DTvHcwNK.js} +4 -4
  281. package/dist/chunks/{skills-Doe47wxK.js → skills-BlVUkWg4.js} +1 -1
  282. package/dist/chunks/{sprites-D11F3i1M.js → sprites-QO9r_mXk.js} +1 -1
  283. package/dist/chunks/{stats-WNUyieG-.js → stats-DdXM-u7l.js} +1 -1
  284. package/dist/chunks/{status-CjBS9SkF.js → status-BIZWtZqI.js} +1 -1
  285. package/dist/chunks/{statusNoticeHelpers-cnI4TiGw.js → statusNoticeHelpers-9sIAjiE6.js} +1 -1
  286. package/dist/chunks/{tag-Gfb8vTAR.js → tag-DDJ8pAsl.js} +2 -2
  287. package/dist/chunks/{tasks-BwX1rzOD.js → tasks-DYt6udr3.js} +1 -1
  288. package/dist/chunks/{teamHelpers-DEgaCpta.js → teamHelpers-BJuKEuyS.js} +1 -1
  289. package/dist/chunks/teamHelpers-Cw5dPQor.js +1 -0
  290. package/dist/chunks/teammateModeSnapshot-BXC7ssXX.js +1 -0
  291. package/dist/chunks/{teammateModeSnapshot-Dyukgtp9.js → teammateModeSnapshot-Zp1weNIZ.js} +1 -1
  292. package/dist/chunks/teleport-DkoFG3EI.js +1 -0
  293. package/dist/chunks/{templateJobs-DQXuFnkl.js → templateJobs-V2-TVeGE.js} +1 -1
  294. package/dist/chunks/{terminalSetup-bSbq4LE7.js → terminalSetup-DMUDhXur.js} +1 -1
  295. package/dist/chunks/{terminalSetup-CTEIn08j.js → terminalSetup-l0Vv_v1c.js} +1 -1
  296. package/dist/chunks/{theme-DazaKPy8.js → theme-Dm1yCDce.js} +1 -1
  297. package/dist/chunks/thinkback-D1mk7cq1.js +1 -0
  298. package/dist/chunks/thinkback-DQAZE5SA.js +1 -0
  299. package/dist/chunks/thinkback-play-BJcGmc9X.js +1 -0
  300. package/dist/chunks/{toolEventObserver-Dfvv2trb.js → toolEventObserver-BgkqkNwy.js} +1 -1
  301. package/dist/chunks/{toolEventObserver-D4h-QqVP.js → toolEventObserver-C-BImvCz.js} +1 -1
  302. package/dist/chunks/toolPool-DNH5H4Jg.js +1 -0
  303. package/dist/chunks/toolPool-DYvz_Mjt.js +1 -0
  304. package/dist/chunks/{trustedDevice-CQ9PK-8m.js → trustedDevice-BDrK9AQ6.js} +1 -1
  305. package/dist/chunks/{trustedDevice-rdvUkS1W.js → trustedDevice-CXsk3eij.js} +1 -1
  306. package/dist/chunks/{ultrareviewCommand-Zf9hO4wr.js → ultrareviewCommand-Bc8hMzHz.js} +2 -2
  307. package/dist/chunks/undercover-DUrQYxYo.js +1 -0
  308. package/dist/chunks/{undercover-DLyKv5TE.js → undercover-kRoI_nlN.js} +1 -1
  309. package/dist/chunks/{updateCCB-7WQRz9lW.js → updateCCB-BPGNN7VA.js} +1 -1
  310. package/dist/chunks/upgrade-BTI562Ce.js +1 -0
  311. package/dist/chunks/{upgrade-ByIumMQe.js → upgrade-DmEGLk6v.js} +1 -1
  312. package/dist/chunks/{upload-CvOMbA9_.js → upload-49qk5TBL.js} +1 -1
  313. package/dist/chunks/{usage-DE4PSQiF.js → usage-DhJDFJVx.js} +1 -1
  314. package/dist/chunks/{usage-C_d-Z-eb.js → usage-sYgTL8wR.js} +1 -1
  315. package/dist/chunks/{useMainLoopModel-Os8Ao8-x.js → useMainLoopModel-CJaR_qEJ.js} +1 -1
  316. package/dist/chunks/{useManagePlugins-BYBubfHU.js → useManagePlugins-B1FpmxFo.js} +1 -1
  317. package/dist/chunks/{useMergedTools-BJAn2i-F.js → useMergedTools-eMPZ95TX.js} +1 -1
  318. package/dist/chunks/{useSearchInput-CF77X2OV.js → useSearchInput-CR-b0Qi6.js} +1 -1
  319. package/dist/chunks/useSettingsErrors-p-PFBeaC.js +1 -0
  320. package/dist/chunks/{useVoice-DwzMN0fq.js → useVoice-D3PqTfCK.js} +1 -1
  321. package/dist/chunks/{util-DD30Y4o8.js → util-BZ2fS3PR.js} +1 -1
  322. package/dist/chunks/utils-hhztcb0b.js +1 -0
  323. package/dist/chunks/validatePlugin-QtcXXmZu.js +1 -0
  324. package/dist/chunks/{vim-zc9EiMil.js → vim-LmepJftY.js} +1 -1
  325. package/dist/chunks/{voice-BRhZt4jW.js → voice-CNRTt4gH.js} +2 -2
  326. package/dist/chunks/voiceModeEnabled-B57V7REx.js +1 -0
  327. package/dist/chunks/{voiceModeEnabled-168-1Ocs.js → voiceModeEnabled-wWM929QG.js} +1 -1
  328. package/dist/chunks/{voiceStreamSTT-B80UegKG.js → voiceStreamSTT-CnK9GN6Q.js} +1 -1
  329. package/dist/chunks/voiceStreamSTT-Dp-1uSjP.js +1 -0
  330. package/dist/chunks/{workerRegistry-s8nnpmUO.js → workerRegistry-CrIpKIZe.js} +1 -1
  331. package/dist/chunks/worktree-YbEK6b36.js +1 -0
  332. package/dist/chunks/{xml-DTMvLcPg.js → xml-CMdTGiv6.js} +1 -1
  333. package/dist/cli.js +1 -1
  334. package/package.json +1 -1
  335. package/dist/chunks/ApproveApiKey-BhMr2Y5F.js +0 -1
  336. package/dist/chunks/BackgroundTasksDialog-BL_dfbZP.js +0 -2
  337. package/dist/chunks/ClaudeMdExternalIncludesDialog-DPki55Xa.js +0 -1
  338. package/dist/chunks/ConsoleOAuthFlow-D_j1NebK.js +0 -1
  339. package/dist/chunks/Doctor-2D5Wz58o.js +0 -1
  340. package/dist/chunks/Doctor-CDez_u_U.js +0 -3
  341. package/dist/chunks/Grove-Dwu_0zRw.js +0 -1
  342. package/dist/chunks/MessageSelector-BRkxpO1O.js +0 -3
  343. package/dist/chunks/Messages-wyMyMP7U.js +0 -11
  344. package/dist/chunks/PluginSettings-DGpIVGvV.js +0 -17
  345. package/dist/chunks/QueryEngine-I3Bqzbiz.js +0 -1
  346. package/dist/chunks/REPL-BxAsVlx3.js +0 -1
  347. package/dist/chunks/ResumeConversation-AdLtgdVB.js +0 -1
  348. package/dist/chunks/SearchExtraToolsTool-BJ8Nx_Nu.js +0 -1
  349. package/dist/chunks/SentryErrorBoundary-Bs7mtkPb.js +0 -1
  350. package/dist/chunks/Settings-PioHwsvg.js +0 -2
  351. package/dist/chunks/api-CFNGoLoL.js +0 -1
  352. package/dist/chunks/asciicast-aoKFhc7C.js +0 -1
  353. package/dist/chunks/assistant-BLd4y2FJ.js +0 -1
  354. package/dist/chunks/auth-DGfZCD_B.js +0 -1
  355. package/dist/chunks/backgroundHousekeeping-Ckj8W3RO.js +0 -1
  356. package/dist/chunks/backgroundHousekeeping-D2_Uopt7.js +0 -17
  357. package/dist/chunks/bridgeConfig-7c07tJm9.js +0 -1
  358. package/dist/chunks/bridgeEnabled-Z2S8lk0l.js +0 -1
  359. package/dist/chunks/bridgeMain-B7FZpvo0.js +0 -68
  360. package/dist/chunks/bridgeMain-C5UxF8ST.js +0 -1
  361. package/dist/chunks/caches-Dt52PedI.js +0 -1
  362. package/dist/chunks/changeDetector-uO9CBvut.js +0 -1
  363. package/dist/chunks/channelNotification-DzTzUrCe.js +0 -1
  364. package/dist/chunks/clear-B_cVk64B.js +0 -1
  365. package/dist/chunks/client-BcqXgcrx.js +0 -1
  366. package/dist/chunks/color-DEXUx7gE.js +0 -1
  367. package/dist/chunks/commands-BX0_wEGw.js +0 -1
  368. package/dist/chunks/commitAttribution-CSVDcgTO.js +0 -1
  369. package/dist/chunks/context-noninteractive-SBxqQ3iu.js +0 -1
  370. package/dist/chunks/conversation-CQBl9Yy2.js +0 -1
  371. package/dist/chunks/conversation-DVZplNag.js +0 -1
  372. package/dist/chunks/createSession-DfEQy2dZ.js +0 -1
  373. package/dist/chunks/datadog-Uj6FjEuU.js +0 -1
  374. package/dist/chunks/entry-CdfuWjKu.js +0 -14
  375. package/dist/chunks/envLessBridgeConfig-DOO9eX07.js +0 -1
  376. package/dist/chunks/extra-usage-CJcyfVCt.js +0 -1
  377. package/dist/chunks/extractMemories-C3SU-Osb.js +0 -1
  378. package/dist/chunks/fast-7iinMwk-.js +0 -1
  379. package/dist/chunks/gates-qgzva-fO.js +0 -1
  380. package/dist/chunks/grok-C4QFXJnR.js +0 -1
  381. package/dist/chunks/hooks-Ch2vPE8u.js +0 -1
  382. package/dist/chunks/inboundAttachments-C0rkLl2x.js +0 -1
  383. package/dist/chunks/initReplBridge-tXqkba08.js +0 -1
  384. package/dist/chunks/language-B1yHC1d6.js +0 -1
  385. package/dist/chunks/loadAgentsDir-DxPE2bIO.js +0 -1
  386. package/dist/chunks/loadPluginHooks-CL5aGDrb.js +0 -1
  387. package/dist/chunks/localSearch-iozuZZhZ.js +0 -1
  388. package/dist/chunks/login-Dxza_KNT.js +0 -1
  389. package/dist/chunks/logout-BeGQR78E.js +0 -1
  390. package/dist/chunks/mcp-UJZ22IDJ.js +0 -6
  391. package/dist/chunks/mcp-fHf8Uc7h.js +0 -1
  392. package/dist/chunks/model-D3g2QdU-.js +0 -1
  393. package/dist/chunks/openai-Bvo0Gcec.js +0 -10
  394. package/dist/chunks/openaiShared-D5lOejS1.js +0 -16
  395. package/dist/chunks/permissions-BDbIjTT6.js +0 -3
  396. package/dist/chunks/pluginStartupCheck-DZp0wnXP.js +0 -1
  397. package/dist/chunks/plugins-0SyID4Kx.js +0 -4
  398. package/dist/chunks/policyLimits-Cmmzuv-E.js +0 -1
  399. package/dist/chunks/poorMode-D_hB-rDf.js +0 -1
  400. package/dist/chunks/print-Ct8N4PYT.js +0 -39
  401. package/dist/chunks/processSlashCommand-BaUdUg3T.js +0 -6
  402. package/dist/chunks/prompt-B1Qy8mi4.js +0 -1
  403. package/dist/chunks/prompt-D4kWWEZC.js +0 -1
  404. package/dist/chunks/refresh-Cjv4jA6L.js +0 -1
  405. package/dist/chunks/sandbox-adapter-DGVtPPD0.js +0 -1
  406. package/dist/chunks/searchExtraTools-DXWkpOIg.js +0 -1
  407. package/dist/chunks/sessionFileAccessHooks-BeuS4m7a.js +0 -1
  408. package/dist/chunks/sessionMemory-LMOQk90c.js +0 -1
  409. package/dist/chunks/sessionMemory-UpILj5ww.js +0 -1
  410. package/dist/chunks/sessionMemoryUtils-DE7AezA0.js +0 -1
  411. package/dist/chunks/sessionObserver-HqvTXhs9.js +0 -1
  412. package/dist/chunks/sessionStorage-BN56DAAd.js +0 -1
  413. package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +0 -3
  414. package/dist/chunks/setup-BZMVuIIx.js +0 -2
  415. package/dist/chunks/sink-BRrEbL6h.js +0 -1
  416. package/dist/chunks/sinks-CKaSBvU8.js +0 -1
  417. package/dist/chunks/skillChangeDetector-DnyEQqe6.js +0 -1
  418. package/dist/chunks/skillLearning-D6latSKi.js +0 -1
  419. package/dist/chunks/skillLearning-DbOOqb6b.js +0 -1
  420. package/dist/chunks/teamHelpers-EJxTXoTV.js +0 -1
  421. package/dist/chunks/teammateModeSnapshot-BgUQ4Phz.js +0 -1
  422. package/dist/chunks/teleport-B4p8XlAv.js +0 -1
  423. package/dist/chunks/thinkback-BOfZP_QG.js +0 -1
  424. package/dist/chunks/thinkback-CxWZV2Oz.js +0 -1
  425. package/dist/chunks/thinkback-play-CHe1x2Hc.js +0 -1
  426. package/dist/chunks/toolPool-BHChMuLr.js +0 -1
  427. package/dist/chunks/toolPool-C5K43w4_.js +0 -1
  428. package/dist/chunks/undercover-DNS9V_JT.js +0 -1
  429. package/dist/chunks/upgrade-bK4x32Ma.js +0 -1
  430. package/dist/chunks/useSettingsErrors-DD7fQ-fU.js +0 -1
  431. package/dist/chunks/utils-D44M8obg.js +0 -1
  432. package/dist/chunks/validatePlugin-DpHiJRsT.js +0 -1
  433. package/dist/chunks/voiceModeEnabled-CTT25yFj.js +0 -1
  434. package/dist/chunks/voiceStreamSTT-BpYhKo2H.js +0 -1
  435. package/dist/chunks/worktree-CkB4jLXK.js +0 -1
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./voiceStreamSTT-CnK9GN6Q.js";t();export{e as isVoiceStreamAvailable};
@@ -1 +1 @@
1
- import{Jt as e,on as t}from"./paths-1ngPRtu3.js";import{L as n,V as r}from"./debug-UI3T040K.js";import{o as i,t as a}from"./bridgeMain-B7FZpvo0.js";import{resolve as o}from"path";t(),r();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),r=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:r,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${n(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
1
+ import{Jt as e,on as t}from"./paths-q1-Ni8Oh.js";import{L as n,V as r}from"./debug-UI3T040K.js";import{o as i,t as a}from"./bridgeMain-DlnIQOtX.js";import{resolve as o}from"path";t(),r();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),r=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:r,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${n(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
@@ -0,0 +1 @@
1
+ import{wt as e,yt as t}from"./loadAgentsDir-Cl2w3uvH.js";e();export{t as execIntoTmuxWorktree};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{ds as t,no as n,oo as r,xs as i}from"./paths-1ngPRtu3.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=n(),t=[],r=[];for(let[n,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${n}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:n,manifest:{name:n,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):r.push(c)}return{enabled:t,disabled:r}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{r(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&t.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function S(e){return x(e).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{ds as t,no as n,oo as r,xs as i}from"./paths-q1-Ni8Oh.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=n(),t=[],r=[];for(let[n,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${n}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:n,manifest:{name:n,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):r.push(c)}return{enabled:t,disabled:r}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{r(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&t.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function S(e){return x(e).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.6.6 (Claude Code)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-SOE--nM9.js`);if(t(`cli_entry`),process.argv[2]===`--claude-in-chrome-mcp`){t(`cli_claude_in_chrome_mcp_path`);let{runClaudeInChromeMcpServer:e}=await import(`./chunks/mcpServer-Dqm2PQQx.js`);await e();return}else if(process.argv[2]===`--chrome-native-host`){t(`cli_chrome_native_host_path`);let{runChromeNativeHost:e}=await import(`./chunks/chromeNativeHost-4U39yLtd.js`);await e();return}else if(process.argv[2]===`--computer-use-mcp`){t(`cli_computer_use_mcp_path`);let{runComputerUseMcpServer:e}=await import(`./chunks/mcpServer-BueM5fWI.js`);await e();return}if(process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-CdfuWjKu.js`);await e();return}if(e[0]===`weixin`){t(`cli_weixin_path`);let{handleWeixinCli:n}=await import(`./chunks/src-BIPP3_mo.js`),{enableConfigs:r}=await import(`./chunks/config-DwiVCSrY.js`),{initializeAnalyticsSink:i}=await import(`./chunks/sink-BRrEbL6h.js`),{shutdownDatadog:a}=await import(`./chunks/datadog-Uj6FjEuU.js`),{shutdown1PEventLogging:o}=await import(`./chunks/firstPartyEventLogger-BCzGkdpd.js`),{logForDebugging:s}=await import(`./chunks/debug-DM5ezCBS.js`),{ChannelPermissionRequestNotificationSchema:c}=await import(`./chunks/channelNotification-DzTzUrCe.js`);await n(e.slice(1),{enableConfigs:r,initializeAnalyticsSink:i,shutdownDatadog:a,shutdown1PEventLogging:o,logForDebugging:s,registerPermissionHandler(e,t){e.setNotificationHandler(c(),async e=>t(e.params))}},`2.6.6`);return}if(e[0]===`--daemon-worker`||e[0]?.startsWith(`--daemon-worker=`)){let t=e[0]===`--daemon-worker`?e[1]:e[0].split(`=`)[1],{runDaemonWorker:n}=await import(`./chunks/workerRegistry-s8nnpmUO.js`);await n(t);return}if(e[0]===`remote-control`||e[0]===`rc`||e[0]===`remote`||e[0]===`sync`||e[0]===`bridge`){t(`cli_bridge_path`);let{enableConfigs:n}=await import(`./chunks/config-DwiVCSrY.js`);n();let{getBridgeDisabledReason:r,checkBridgeMinVersion:i}=await import(`./chunks/bridgeEnabled-Z2S8lk0l.js`),{BRIDGE_LOGIN_ERROR:a}=await import(`./chunks/types-CQ1wrnQ0.js`),{bridgeMain:o}=await import(`./chunks/bridgeMain-C5UxF8ST.js`),{exitWithError:s}=await import(`./chunks/process-CWupreF6.js`),{getClaudeAIOAuthTokens:c}=await import(`./chunks/auth-D7PZvVPf.js`),{getBridgeAccessToken:l}=await import(`./chunks/bridgeConfig-7c07tJm9.js`);!c()?.accessToken&&!l()&&s(a);let u=await r();u&&s(`Error: ${u}`);let d=i();d&&s(d);let{waitForPolicyLimitsToLoad:f,isPolicyAllowed:p}=await import(`./chunks/policyLimits-Cmmzuv-E.js`);await f(),p(`allow_remote_control`)||s(`Error: Remote Control is disabled by your organization's policy.`),await o(e.slice(1));return}if(e[0]===`daemon`){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-DwiVCSrY.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-C9CigqoF.js`);r();let{initSinks:i}=await import(`./chunks/sinks-CKaSBvU8.js`);i();let{daemonMain:a}=await import(`./chunks/main-C6be1KFk.js`);await a(e.slice(1));return}if(e[0]===`autonomy`){t(`cli_autonomy_path`);let{getAutonomyCommandText:n}=await import(`./chunks/autonomy-dQVtSiCJ.js`),r=await n(e.slice(1).join(` `));await new Promise((e,t)=>{process.stdout.write(`${r}\n`,n=>{if(n){t(n);return}e()})}),process.exit(0)}if(e.includes(`--bg`)||e.includes(`--background`)){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-DwiVCSrY.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-C9CigqoF.js`);r(),await(await import(`./chunks/bg-Dbh5z3Y8.js`)).handleBgStart(e.filter(e=>e!==`--bg`&&e!==`--background`));return}if(e[0]===`ps`||e[0]===`logs`||e[0]===`attach`||e[0]===`kill`){let n=e[0]===`ps`?`status`:e[0];console.error(`[deprecated] Use: claude daemon ${n}${e[1]?` `+e[1]:``}`),t(`cli_daemon_path`);let{enableConfigs:r}=await import(`./chunks/config-DwiVCSrY.js`);r();let{setShellIfWindows:i}=await import(`./chunks/windowsPaths-C9CigqoF.js`);i();let{initSinks:a}=await import(`./chunks/sinks-CKaSBvU8.js`);a();let{daemonMain:o}=await import(`./chunks/main-C6be1KFk.js`);await o([e[0]===`ps`?`status`:e[0],...e.slice(1)]);return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-DQXuFnkl.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: claude job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-DQXuFnkl.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-DwiVCSrY.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-THQb19xR.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-CkB4jLXK.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CWupreF6.js`);e(n.error)}}}e.length===1&&(e[0]===`--update`||e[0]===`--upgrade`)&&(process.argv=[process.argv[0],process.argv[1],`update`]),e.includes(`--bare`)&&(process.env.CLAUDE_CODE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-JGJo1zcC.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-CF6Im-LV.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
2
+ import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.6.9 (Claude Code)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-SOE--nM9.js`);if(t(`cli_entry`),process.argv[2]===`--claude-in-chrome-mcp`){t(`cli_claude_in_chrome_mcp_path`);let{runClaudeInChromeMcpServer:e}=await import(`./chunks/mcpServer-Wd9rZG_E.js`);await e();return}else if(process.argv[2]===`--chrome-native-host`){t(`cli_chrome_native_host_path`);let{runChromeNativeHost:e}=await import(`./chunks/chromeNativeHost-4U39yLtd.js`);await e();return}else if(process.argv[2]===`--computer-use-mcp`){t(`cli_computer_use_mcp_path`);let{runComputerUseMcpServer:e}=await import(`./chunks/mcpServer-CpBN77YB.js`);await e();return}if(process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-Di8oWZUk.js`);await e();return}if(e[0]===`weixin`){t(`cli_weixin_path`);let{handleWeixinCli:n}=await import(`./chunks/src-BIPP3_mo.js`),{enableConfigs:r}=await import(`./chunks/config-BQ-MayP6.js`),{initializeAnalyticsSink:i}=await import(`./chunks/sink-BSwQ045N.js`),{shutdownDatadog:a}=await import(`./chunks/datadog-MUvg76p3.js`),{shutdown1PEventLogging:o}=await import(`./chunks/firstPartyEventLogger-CISUrAsf.js`),{logForDebugging:s}=await import(`./chunks/debug-DM5ezCBS.js`),{ChannelPermissionRequestNotificationSchema:c}=await import(`./chunks/channelNotification-CLVU5AuO.js`);await n(e.slice(1),{enableConfigs:r,initializeAnalyticsSink:i,shutdownDatadog:a,shutdown1PEventLogging:o,logForDebugging:s,registerPermissionHandler(e,t){e.setNotificationHandler(c(),async e=>t(e.params))}},`2.6.9`);return}if(e[0]===`--daemon-worker`||e[0]?.startsWith(`--daemon-worker=`)){let t=e[0]===`--daemon-worker`?e[1]:e[0].split(`=`)[1],{runDaemonWorker:n}=await import(`./chunks/workerRegistry-CrIpKIZe.js`);await n(t);return}if(e[0]===`remote-control`||e[0]===`rc`||e[0]===`remote`||e[0]===`sync`||e[0]===`bridge`){t(`cli_bridge_path`);let{enableConfigs:n}=await import(`./chunks/config-BQ-MayP6.js`);n();let{getBridgeDisabledReason:r,checkBridgeMinVersion:i}=await import(`./chunks/bridgeEnabled-D5qCI5v2.js`),{BRIDGE_LOGIN_ERROR:a}=await import(`./chunks/types-CQ1wrnQ0.js`),{bridgeMain:o}=await import(`./chunks/bridgeMain-B4Zv8UOe.js`),{exitWithError:s}=await import(`./chunks/process-CWupreF6.js`),{getClaudeAIOAuthTokens:c}=await import(`./chunks/auth-DelyQc8g.js`),{getBridgeAccessToken:l}=await import(`./chunks/bridgeConfig-ZcbBdhji.js`);!c()?.accessToken&&!l()&&s(a);let u=await r();u&&s(`Error: ${u}`);let d=i();d&&s(d);let{waitForPolicyLimitsToLoad:f,isPolicyAllowed:p}=await import(`./chunks/policyLimits-DUGrXcje.js`);await f(),p(`allow_remote_control`)||s(`Error: Remote Control is disabled by your organization's policy.`),await o(e.slice(1));return}if(e[0]===`daemon`){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-BQ-MayP6.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-C9CigqoF.js`);r();let{initSinks:i}=await import(`./chunks/sinks-DHHmQJi-.js`);i();let{daemonMain:a}=await import(`./chunks/main-C6be1KFk.js`);await a(e.slice(1));return}if(e[0]===`autonomy`){t(`cli_autonomy_path`);let{getAutonomyCommandText:n}=await import(`./chunks/autonomy-tTAucjip.js`),r=await n(e.slice(1).join(` `));await new Promise((e,t)=>{process.stdout.write(`${r}\n`,n=>{if(n){t(n);return}e()})}),process.exit(0)}if(e.includes(`--bg`)||e.includes(`--background`)){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-BQ-MayP6.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-C9CigqoF.js`);r(),await(await import(`./chunks/bg-Dbh5z3Y8.js`)).handleBgStart(e.filter(e=>e!==`--bg`&&e!==`--background`));return}if(e[0]===`ps`||e[0]===`logs`||e[0]===`attach`||e[0]===`kill`){let n=e[0]===`ps`?`status`:e[0];console.error(`[deprecated] Use: claude daemon ${n}${e[1]?` `+e[1]:``}`),t(`cli_daemon_path`);let{enableConfigs:r}=await import(`./chunks/config-BQ-MayP6.js`);r();let{setShellIfWindows:i}=await import(`./chunks/windowsPaths-C9CigqoF.js`);i();let{initSinks:a}=await import(`./chunks/sinks-DHHmQJi-.js`);a();let{daemonMain:o}=await import(`./chunks/main-C6be1KFk.js`);await o([e[0]===`ps`?`status`:e[0],...e.slice(1)]);return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-V2-TVeGE.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: claude job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-V2-TVeGE.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-BQ-MayP6.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-THQb19xR.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-YbEK6b36.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CWupreF6.js`);e(n.error)}}}e.length===1&&(e[0]===`--update`||e[0]===`--upgrade`)&&(process.argv=[process.argv[0],process.argv[1],`update`]),e.includes(`--bare`)&&(process.env.CLAUDE_CODE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-JGJo1zcC.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-gTbhsbIs.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-best",
3
- "version": "2.6.6",
3
+ "version": "2.6.9",
4
4
  "description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
5
5
  "type": "module",
6
6
  "author": "claude-code-best <claude-code-best@proton.me>",
@@ -1 +0,0 @@
1
- import{t as e}from"./ApproveApiKey-9rkwQfgT.js";export{e as ApproveApiKey};
@@ -1,2 +0,0 @@
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{Gs as y,Po as b,jo as x,rs as S}from"./paths-1ngPRtu3.js";import{L as C,V as w,b as T,h as ee}from"./debug-UI3T040K.js";import{n as E,r as D}from"./analytics-DqMQntaB.js";import{S as te,b as O,x as ne}from"./teammate-DMYOtLTK.js";import{C as k,E as A,d as re,f as ie,m as ae,x as j}from"./startupProfiler-DnXZaX4A.js";import{$w as oe,An as M,Ax as se,Cu as ce,DS as le,Dn as ue,ES as de,Eh as fe,Eu as pe,Fy as me,Go as he,IS as ge,Iy as _e,Ja as ve,Ku as ye,Lo as be,Lu as xe,Mn as Se,NS as Ce,Ny as we,Oh as Te,On as Ee,Ou as De,PS as Oe,Px as ke,Py as Ae,Qw as je,Ru as Me,So as Ne,Tg as Pe,X_ as Fe,Z_ as Ie,a_ as Le,aa as Re,ap as ze,av as Be,bu as Ve,by as N,cp as He,dE as Ue,i_ as We,jx as Ge,kx as Ke,ky as qe,lj as Je,lv as Ye,op as Xe,q_ as Ze,qu as Qe,ra as $e,sp as et,uE as tt,uj as nt,wg as rt,wu as it,wy as at,yy as P,zw as ot}from"./loadAgentsDir-D7kapZB5.js";import{Bn as st,Vn as ct,Xt as lt,tn as ut,zn as dt}from"./prompt-BBg3jtfc.js";import{n as ft,t as pt}from"./browser-fLRXxIsQ.js";import{t as F}from"./useKeybinding-FsOnjW6T.js";import{a as mt,c as ht}from"./constants-41VpZw2G.js";import{t as gt}from"./Dialog-DYFGqyDs.js";import{i as _t,n as vt}from"./mappers-CkMESMy7.js";function yt(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`local_agent`}function bt(e){return{...e,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:Ee(e.status)?Date.now()+wt:void 0}}function xt(e,t){D(`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&&yt(i)&&i.retain,o=yt(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]=bt(i)),o&&(c[e]={...n,retain:!0,evictAfter:void 0})),{...t,viewingAgentTaskId:e,viewSelectionMode:`viewing-agent`,tasks:c}})}function St(e){D(`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!yt(r)||!r.retain?n:{...n,tasks:{...e.tasks,[t]:bt(r)}}})}function Ct(e,t){t(t=>{let n=t.tasks[e];if(!yt(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]:{...bt(n),evictAfter:0}},...r&&{viewingAgentTaskId:void 0,viewSelectionMode:`none`}}})}var wt,Tt=t((()=>{E(),ue(),wt=3e4}));function Et(e,t,n){let r=dt(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,Dt.jsxs)(d,{children:[a,`(`,o,`)`]}):a}catch{return e.toolName}}var Dt,Ot=t((()=>{l(),g(),ct(),Dt=v()}));function kt(e){return e===`completed`||e===`failed`||e===`killed`}function At(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 jt(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 Mt(e){return e.shutdownRequested?`stopping`:e.awaitingPlanApproval?`awaiting approval`:e.isIdle?`idle`:(e.progress?.recentActivities&&Me(e.progress.recentActivities))??e.progress?.lastActivity?.activityDescription??`working`}function Nt(e,t){if(!t)return!1;let n=!1;for(let t of Object.values(e))if(!(!Ae(t)||process.env.USER_TYPE===`ant`&&De(t))&&(n=!0,t.type!==`in_process_teammate`))return!1;return n}var Pt=t((()=>{i(),pe(),we(),xe()}));function Ft({agent:e,onDone:t,onKillAgent:n,onBack:r}){let[i]=u(),a=(0,It.useMemo)(()=>ye(st()),[]),o=N(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=Ne(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,I.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:s,children:(0,I.jsx)(f,{title:(0,I.jsxs)(d,{children:[e.selectedAgent?.agentType??`agent`,` › `,e.description||`Async agent`]}),subtitle:(0,I.jsxs)(d,{children:[e.status!==`running`&&(0,I.jsxs)(d,{color:jt(e.status),children:[At(e.status),` `,e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,I.jsxs)(d,{dimColor:!0,children:[o,g!==void 0&&g>0&&(0,I.jsxs)(I.Fragment,{children:[` · `,ae(g),` tokens`]}),v!==void 0&&v>0&&(0,I.jsxs)(I.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,I.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,I.jsxs)(m,{children:[r&&(0,I.jsx)(p,{shortcut:`←`,action:`go back`}),(0,I.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,I.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,I.jsxs)(_,{flexDirection:`column`,children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,I.jsxs)(_,{flexDirection:`column`,children:[(0,I.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,I.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,Et(t,a,i)]},n))]}),c?(0,I.jsx)(_,{marginTop:1,children:(0,I.jsx)(rt,{addMargin:!1,planContent:c})}):(0,I.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,I.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,I.jsx)(d,{wrap:`wrap`,children:l})]}),e.status===`failed`&&e.error&&(0,I.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,I.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,I.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})})}var It,I,Lt=t((()=>{It=n(l(),1),P(),g(),F(),ct(),Qe(),j(),be(),Pe(),Ot(),Pt(),I=v()}));function Rt(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 zt({text:e,phase:t=0}){return(0,L.jsx)(L.Fragment,{children:[...e].map((e,n)=>(0,L.jsx)(d,{color:Je(n+t),children:e},n))})}function Bt(e,t,n){let r=(0,Ut.useRef)(e),i=(0,Ut.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 Vt({session:e}){let t=le().prefersReducedMotion??!1,n=e.reviewProgress,r=e.status===`running`,[,i]=o(r&&!t?Wt:null),a=n?.bugsFound??0,s=n?.bugsVerified??0,c=n?.bugsRefuted??0,l=t||!r,u=Bt(a,i,l),f=Bt(s,i,l),p=Bt(c,i,l),m=Math.floor(i/(Wt*3))%7;if(e.status===`completed`)return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,L.jsx)(zt,{text:`ultrareview`,phase:0}),(0,L.jsx)(d,{dimColor:!0,children:` ready · shift+↓ to view`})]});if(e.status===`failed`)return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,L.jsx)(zt,{text:`ultrareview`,phase:0}),(0,L.jsxs)(d,{color:`error`,dimColor:!0,children:[` · `,`error`]})]});let h=n?Rt(n.stage,u,f,p):`setting up`;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(d,{color:`background`,children:[`◇`,` `]}),(0,L.jsx)(zt,{text:`ultrareview`,phase:r?m:0}),(0,L.jsxs)(d,{dimColor:!0,children:[` · `,h]})]})}function Ht({session:e}){if(e.isRemoteReview)return(0,L.jsx)(Vt,{session:e});if(e.status===`completed`)return(0,L.jsx)(d,{bold:!0,color:`success`,dimColor:!0,children:`done`});if(e.status===`failed`)return(0,L.jsx)(d,{bold:!0,color:`error`,dimColor:!0,children:`error`});if(!e.todoList.length)return(0,L.jsxs)(d,{dimColor:!0,children:[e.status,`…`]});let t=O(e.todoList,e=>e.status===`completed`),n=e.todoList.length;return(0,L.jsxs)(d,{dimColor:!0,children:[t,`/`,n]})}var Ut,L,Wt,Gt=t((()=>{Ut=n(l(),1),y(),de(),g(),ne(),nt(),L=v(),Wt=80}));function R({status:e,label:t,suffix:n}){return(0,z.jsxs)(d,{color:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:void 0,dimColor:!0,children:[`(`,t??e,n,`)`]})}function Kt({shell:e}){switch(e.status){case`completed`:return(0,z.jsx)(R,{status:`completed`,label:`done`});case`failed`:return(0,z.jsx)(R,{status:`failed`,label:`error`});case`killed`:return(0,z.jsx)(R,{status:`killed`,label:`stopped`});case`running`:case`pending`:return(0,z.jsx)(R,{status:`running`})}}var z,qt=t((()=>{g(),z=v()}));function Jt({task:e,maxActivityWidth:t}){let n=t??40;switch(e.type){case`local_bash`:return(0,B.jsxs)(d,{children:[k(e.kind===`monitor`?e.description:e.command,n,!0),` `,(0,B.jsx)(Kt,{shell:e})]});case`remote_agent`:return e.isRemoteReview?(0,B.jsx)(d,{children:(0,B.jsx)(Ht,{session:e})}):(0,B.jsxs)(d,{children:[(0,B.jsxs)(d,{dimColor:!0,children:[e.status===`running`||e.status===`pending`?`◇`:`◆`,` `]}),k(e.title,n,!0),(0,B.jsx)(d,{dimColor:!0,children:` · `}),(0,B.jsx)(Ht,{session:e})]});case`local_agent`:return(0,B.jsxs)(d,{children:[k(e.description,n,!0),` `,(0,B.jsx)(R,{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=Mt(e);return(0,B.jsxs)(d,{children:[(0,B.jsxs)(d,{color:_e(e.identity.color),children:[`@`,e.identity.agentName]}),(0,B.jsxs)(d,{dimColor:!0,children:[`: `,k(t,n,!0)]})]})}case`local_workflow`:{let t=e;return(0,B.jsxs)(d,{children:[k(t.workflowName??e.summary??e.description,n,!0),` `,(0,B.jsx)(R,{status:e.status,label:e.status===`running`?`${t.agentCount} ${b(t.agentCount,`agent`)}`:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}case`monitor_mcp`:return(0,B.jsxs)(d,{children:[k(e.description,n,!0),` `,(0,B.jsx)(R,{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} ${b(t,`file`)}`:`${e.sessionsReviewing} ${b(e.sessionsReviewing,`session`)}`;return(0,B.jsxs)(d,{children:[e.description,` `,(0,B.jsxs)(d,{dimColor:!0,children:[`· `,e.phase,` · `,n]}),` `,(0,B.jsx)(R,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}}}var B,Yt=t((()=>{l(),g(),me(),j(),x(),y(),Gt(),qt(),Pt(),B=v()}));function Xt({task:e,onDone:t,onBack:n,onKill:r}){let i=N(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(-Zt),c=o.length-s.length;return(0,V.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:a,children:(0,V.jsx)(f,{title:`Memory consolidation`,subtitle:(0,V.jsxs)(d,{dimColor:!0,children:[i,` · reviewing `,e.sessionsReviewing,` `,b(e.sessionsReviewing,`session`),e.filesTouched.length>0&&(0,V.jsxs)(V.Fragment,{children:[` `,`· `,e.filesTouched.length,` `,b(e.filesTouched.length,`file`),` touched`]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,V.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,V.jsxs)(m,{children:[n&&(0,V.jsx)(p,{shortcut:`←`,action:`go back`}),(0,V.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&r&&(0,V.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,V.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,V.jsxs)(d,{children:[(0,V.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,V.jsx)(d,{color:`background`,children:`running`}):e.status===`completed`?(0,V.jsx)(d,{color:`success`,children:e.status}):(0,V.jsx)(d,{color:`error`,children:e.status})]}),s.length===0?(0,V.jsx)(d,{dimColor:!0,children:e.status===`running`?`Starting…`:`(no text output)`}):(0,V.jsxs)(V.Fragment,{children:[c>0&&(0,V.jsxs)(d,{dimColor:!0,children:[`(`,c,` earlier `,b(c,`turn`),`)`]}),s.map((e,t)=>(0,V.jsxs)(_,{flexDirection:`column`,children:[(0,V.jsx)(d,{wrap:`wrap`,children:e.text}),e.toolUseCount>0&&(0,V.jsxs)(d,{dimColor:!0,children:[` `,`(`,e.toolUseCount,` `,b(e.toolUseCount,`tool`),`)`]})]},t))]})]})})})}var V,Zt,Qt=t((()=>{l(),P(),g(),F(),x(),V=v(),Zt=6}));function $t({teammate:e,onDone:t,onKill:n,onBack:r,onForeground:i}){let[a]=u(),o=(0,en.useMemo)(()=>ye(st()),[]),s=N(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=Mt(e),g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount,y=A(e.prompt,300);return(0,H.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:c,children:(0,H.jsxs)(f,{title:(0,H.jsxs)(d,{children:[(0,H.jsxs)(d,{color:_e(e.identity.color),children:[`@`,e.identity.agentName]}),l&&(0,H.jsxs)(d,{dimColor:!0,children:[` (`,l,`)`]})]}),subtitle:(0,H.jsxs)(d,{children:[e.status!==`running`&&(0,H.jsxs)(d,{color:e.status===`completed`?`success`:e.status===`killed`?`warning`:`error`,children:[e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,H.jsxs)(d,{dimColor:!0,children:[s,g!==void 0&&g>0&&(0,H.jsxs)(H.Fragment,{children:[` · `,ae(g),` tokens`]}),v!==void 0&&v>0&&(0,H.jsxs)(H.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,H.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,H.jsxs)(m,{children:[r&&(0,H.jsx)(p,{shortcut:`←`,action:`go back`}),(0,H.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,H.jsx)(p,{shortcut:`x`,action:`stop`}),e.status===`running`&&i&&(0,H.jsx)(p,{shortcut:`f`,action:`foreground`})]}),children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,H.jsxs)(_,{flexDirection:`column`,children:[(0,H.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,H.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,Et(t,o,a)]},n))]}),(0,H.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,H.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,H.jsx)(d,{wrap:`wrap`,children:y})]}),e.status===`failed`&&e.error&&(0,H.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,H.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,H.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})}var en,H,tn=t((()=>{en=n(l(),1),P(),g(),F(),ct(),Qe(),j(),me(),Ot(),Pt(),H=v()}));function nn(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: ${A(t.replace(/\s+/g,` `).trim(),50)}`}}for(let n of Object.values(t))if(typeof n==`string`&&n.trim())return`${e} ${A(n.replace(/\s+/g,` `).trim(),60)}`;return e}function rn({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`running`||e.status===`pending`,o=e.ultraplanPhase,s=i?o?ln[o]:`running`:e.status,l=N(e.startTime,i,1e3,0,e.endTime),{agentsWorking:u,toolCalls:p,lastToolCall:m}=(0,U.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?nn(r.name,r.input):null}},[e.log]),h=Fe(e.sessionId),g=n??(()=>t(`Remote session details dismissed`,{display:`system`})),[v,y]=(0,U.useState)(!1);return v?(0,W.jsx)(f,{title:`Stop ultraplan?`,onCancel:()=>y(!1),color:`background`,children:(0,W.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,W.jsx)(d,{dimColor:!0,children:`This will terminate the Claude Code on the web session.`}),(0,W.jsx)(Ke,{options:[{label:`Terminate session`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),g()):y(!1)}})]})}):(0,W.jsx)(f,{title:(0,W.jsxs)(d,{children:[(0,W.jsxs)(d,{color:`background`,children:[o===`plan_ready`?`◆`:`◇`,` `]}),(0,W.jsx)(d,{bold:!0,children:`ultraplan`}),(0,W.jsxs)(d,{dimColor:!0,children:[` · `,l,` · `,s]})]}),onCancel:g,color:`background`,children:(0,W.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,W.jsxs)(d,{children:[o===`plan_ready`&&(0,W.jsxs)(d,{color:`success`,children:[a.tick,` `]}),u,` `,b(u,`agent`),` `,o?un[o]:`working`,` · `,p,` tool`,` `,b(p,`call`)]}),m&&(0,W.jsx)(d,{dimColor:!0,children:m}),(0,W.jsx)(c,{url:h,children:(0,W.jsx)(d,{dimColor:!0,children:h})}),(0,W.jsx)(Ke,{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`:ft(h),t();return;case`stop`:y(!0);return;case`back`:g();return}}})]})})}function an({stage:e,completed:t,hasProgress:n}){let r=e?dn.indexOf(e):-1,i=!t&&!n;return(0,W.jsxs)(d,{children:[i?(0,W.jsx)(d,{color:`background`,children:`Setup`}):(0,W.jsx)(d,{dimColor:!0,children:`Setup`}),(0,W.jsx)(d,{dimColor:!0,children:` → `}),dn.map((e,n)=>{let a=!t&&!i&&n===r;return(0,W.jsxs)(U.Fragment,{children:[n>0&&(0,W.jsx)(d,{dimColor:!0,children:` → `}),a?(0,W.jsx)(d,{color:`background`,children:fn[e]}):(0,W.jsx)(d,{dimColor:!0,children:fn[e]})]},e)}),t&&(0,W.jsx)(d,{color:`success`,children:` ✓`})]})}function on(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} ${b(n,`finding`)}`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return Rt(t.stage,t.bugsFound,n,r)}function sn({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`completed`,a=e.status===`running`||e.status===`pending`,[o,s]=(0,U.useState)(!1),l=N(e.startTime,a,1e3,0,e.endTime),u=()=>t(`Remote session details dismissed`,{display:`system`}),h=n??u,g=Fe(e.sessionId),v=i?`ready`:a?`running`:e.status;if(o)return(0,W.jsx)(f,{title:`Stop ultrareview?`,onCancel:()=>s(!1),color:`background`,children:(0,W.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,W.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,W.jsx)(Ke,{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,W.jsx)(f,{title:(0,W.jsxs)(d,{children:[(0,W.jsxs)(d,{color:`background`,children:[i?`◆`:`◇`,` `]}),(0,W.jsx)(d,{bold:!0,children:`ultrareview`}),(0,W.jsxs)(d,{dimColor:!0,children:[` · `,l,` · `,v]})]}),onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,W.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,W.jsxs)(m,{children:[(0,W.jsx)(p,{shortcut:`Enter`,action:`select`}),(0,W.jsx)(p,{shortcut:`Esc`,action:`go back`})]}),children:(0,W.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,W.jsx)(an,{stage:e.reviewProgress?.stage,completed:i,hasProgress:!!e.reviewProgress}),(0,W.jsxs)(_,{flexDirection:`column`,children:[(0,W.jsx)(d,{children:on(e)}),(0,W.jsx)(c,{url:g,children:(0,W.jsx)(d,{dimColor:!0,children:g})})]}),(0,W.jsx)(Ke,{options:y,onChange:e=>{switch(e){case`open`:ft(g),t();break;case`stop`:s(!0);break;case`back`:h();break;case`dismiss`:u();break}}})]})})}function cn({session:e,toolUseContext:t,onDone:n,onBack:r,onKill:i}){let[a,o]=(0,U.useState)(!1),[s,l]=(0,U.useState)(null),u=(0,U.useMemo)(()=>e.isUltraplan||e.isRemoteReview?[]:he(_t(e.log)).filter(e=>e.type!==`progress`).slice(-3),[e]);if(e.isUltraplan)return(0,W.jsx)(rn,{session:e,onDone:n,onBack:r,onKill:i});if(e.isRemoteReview)return(0,W.jsx)(sn,{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 Ye(e.sessionId)}catch(e){l(C(e))}finally{o(!1)}}let y=A(e.title,50),b=e.status===`pending`?`starting`:e.status;return(0,W.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:g,children:(0,W.jsxs)(f,{title:`Remote session details`,onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,W.jsxs)(d,{children:[`Press `,e.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`}),!a&&(0,W.jsx)(p,{shortcut:`t`,action:`teleport`})]}),children:[(0,W.jsxs)(_,{flexDirection:`column`,children:[(0,W.jsxs)(d,{children:[(0,W.jsx)(d,{bold:!0,children:`Status`}),`:`,` `,b===`running`||b===`starting`?(0,W.jsx)(d,{color:`background`,children:b}):b===`completed`?(0,W.jsx)(d,{color:`success`,children:b}):(0,W.jsx)(d,{color:`error`,children:b})]}),(0,W.jsxs)(d,{children:[(0,W.jsx)(d,{bold:!0,children:`Runtime`}),`: `,re((e.endTime??Date.now())-e.startTime)]}),(0,W.jsxs)(d,{wrap:`truncate-end`,children:[(0,W.jsx)(d,{bold:!0,children:`Title`}),`: `,y]}),(0,W.jsxs)(d,{children:[(0,W.jsx)(d,{bold:!0,children:`Progress`}),`: `,(0,W.jsx)(Ht,{session:e})]}),(0,W.jsxs)(d,{children:[(0,W.jsx)(d,{bold:!0,children:`Session URL`}),`:`,` `,(0,W.jsx)(c,{url:Fe(e.sessionId),children:(0,W.jsx)(d,{dimColor:!0,children:Fe(e.sessionId)})})]})]}),e.log.length>0&&(0,W.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,W.jsxs)(d,{children:[(0,W.jsx)(d,{bold:!0,children:`Recent messages`}),`:`]}),(0,W.jsx)(_,{flexDirection:`column`,height:10,overflowY:`hidden`,children:u.map((e,n)=>(0,W.jsx)(fe,{message:e,lookups:ve,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,W.jsx)(_,{marginTop:1,children:(0,W.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing last `,u.length,` of `,e.log.length,` messages`]})})]}),s&&(0,W.jsx)(_,{marginTop:1,children:(0,W.jsxs)(d,{color:`error`,children:[`Teleport failed: `,s]})}),a&&(0,W.jsx)(d,{color:`background`,children:`Teleporting to session…`})]})})}var U,W,ln,un,dn,fn,pn=t((()=>{i(),U=n(l(),1),y(),P(),g(),Ie(),S(),lt(),ut(),pt(),w(),j(),vt(),be(),x(),Be(),se(),Te(),Gt(),W=v(),ln={needs_input:`input required`,plan_ready:`ready`},un={needs_input:`waiting`,plan_ready:`done`},dn=[`finding`,`verifying`,`synthesizing`],fn={finding:`Find`,verifying:`Verify`,synthesizing:`Dedupe`}}));async function mn(e){let t=M(e.id);try{let e=await T(t,_n);return{content:e.content,bytesTotal:e.bytesTotal}}catch{return{content:``,bytesTotal:0}}}function hn({shell:e,onDone:t,onKillShell:n,onBack:r}){let{columns:i}=s(),[a,o]=(0,G.useState)(()=>mn(e)),c=(0,G.useDeferredValue)(a);(0,G.useEffect)(()=>{if(e.status!==`running`)return;let t=setInterval((e,t)=>e(mn(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=A(e.command,280);return(0,K.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:u,children:(0,K.jsxs)(f,{title:g?`Monitor details`:`Shell details`,onCancel:l,color:`background`,inputGuide:t=>t.pending?(0,K.jsxs)(d,{children:[`Press `,t.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`}),e.status===`running`&&n&&(0,K.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:[(0,K.jsxs)(_,{flexDirection:`column`,children:[(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,K.jsxs)(d,{color:`background`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):e.status===`completed`?(0,K.jsxs)(d,{color:`success`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):(0,K.jsxs)(d,{color:`error`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]})]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Runtime:`}),` `,re((e.endTime??Date.now())-e.startTime)]}),(0,K.jsxs)(d,{wrap:`wrap`,children:[(0,K.jsx)(d,{bold:!0,children:g?`Script:`:`Command:`}),` `,v]})]}),(0,K.jsxs)(_,{flexDirection:`column`,children:[(0,K.jsx)(d,{bold:!0,children:`Output:`}),(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(d,{dimColor:!0,children:`Loading output…`}),children:(0,K.jsx)(gn,{outputPromise:c,columns:i})})]})]})})}function gn({outputPromise:e,columns:t}){let{content:n,bytesTotal:r}=(0,G.use)(e);if(!n)return(0,K.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,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_,{borderStyle:`round`,paddingX:1,flexDirection:`column`,height:12,maxWidth:t-6,children:s.map((e,t)=>(0,K.jsx)(d,{wrap:`truncate-end`,children:e},t))}),(0,K.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing ${s.length} lines`,o?` of ${ie(r)}`:``]})]})}var G,K,_n,vn=t((()=>{G=n(l(),1),ot(),g(),F(),j(),ee(),Se(),K=v(),_n=8192})),yn=t((()=>{g()})),bn=t((()=>{g()})),xn=r({WorkflowDetailDialog:()=>Sn});function Sn({workflow:e,onDone:t,onKill:n,onSkipAgent:r,onRetryAgent:i,onBack:a}){let o=N(e.startTime,e.status===`running`,1e3,0);return h({},{context:`WorkflowDetail`}),(0,q.jsx)(_,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:(0,Cn.useCallback)(t=>{t.key===`left`&&a?(t.preventDefault(),a()):t.key===`x`&&e.status===`running`&&n&&(t.preventDefault(),n())},[a,n,e.status]),children:(0,q.jsx)(f,{title:`Workflow`,subtitle:(0,q.jsxs)(d,{dimColor:!0,children:[o,` · `,e.workflowName]}),onCancel:a??(()=>{}),inputGuide:()=>(0,q.jsxs)(m,{children:[a&&(0,q.jsx)(p,{shortcut:`←`,action:`go back`}),(0,q.jsx)(p,{shortcut:`Esc`,action:`close`}),e.status===`running`&&n&&(0,q.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,q.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,q.jsx)(d,{color:`ansi:green`,children:`running`}):e.status===`completed`?(0,q.jsx)(d,{color:`ansi:green`,children:e.status}):(0,q.jsx)(d,{color:`ansi:red`,children:e.status})]}),(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Description:`}),` `,e.description]}),(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Workflow:`}),` `,e.workflowName]}),(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`File:`}),` `,e.workflowFile]}),e.summary&&(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Summary:`}),` `,e.summary]}),e.output&&(0,q.jsxs)(_,{flexDirection:`column`,children:[(0,q.jsx)(d,{bold:!0,children:`Output:`}),(0,q.jsx)(d,{dimColor:!0,children:e.output})]})]})})})}var Cn,q,wn=t((()=>{Cn=n(l(),1),P(),g(),F(),yn(),gt(),bn(),q=v()})),Tn=r({MonitorMcpDetailDialog:()=>En});function En({task:e,onBack:t,onKill:n}){let r=N(e.startTime,e.status===`running`,1e3,0);return h({},{context:`MonitorMcpDetail`}),(0,J.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,J.jsx)(f,{title:`MCP Monitor`,subtitle:(0,J.jsxs)(d,{dimColor:!0,children:[r,` · `,e.serverName,`:`,e.resourceUri]}),onCancel:t??(()=>{}),inputGuide:()=>(0,J.jsxs)(m,{children:[t&&(0,J.jsx)(p,{shortcut:`←`,action:`go back`}),(0,J.jsx)(p,{shortcut:`Esc`,action:`close`}),e.status===`running`&&n&&(0,J.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,J.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,J.jsx)(d,{color:`ansi:green`,children:`running`}):e.status===`completed`?(0,J.jsx)(d,{color:`ansi:green`,children:e.status}):(0,J.jsx)(d,{color:`ansi:red`,children:e.status})]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Description:`}),` `,e.description]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Server:`}),` `,e.serverName]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Resource:`}),` `,e.resourceUri]}),e.command&&(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Command:`}),` `,e.command]})]})})})}var J,Dn=t((()=>{l(),P(),g(),F(),yn(),gt(),bn(),J=v()}));function On(e,t){return Object.values(e??{}).filter(Ae).filter(e=>!(e.type===`local_agent`&&e.id===t))}function kn({onDone:e,toolUseContext:t,initialDetailTaskId:n}){let r=Oe(e=>e.tasks),i=Oe(e=>e.foregroundedTaskId),a=Oe(e=>e.expandedView)===`teammates`,o=ge(),s=oe(`chat:killAgents`,`Chat`,`ctrl+x ctrl+k`),c=r,l=(0,X.useRef)(!1),[u,g]=(0,X.useState)(()=>{if(n)return l.current=!0,{mode:`detail`,itemId:n};let e=On(c,i);return e.length===1?(l.current=!0,{mode:`detail`,itemId:e[0].id}):{mode:`list`}}),[v,y]=(0,X.useState)(0);ke(`background-tasks-dialog`);let{bashTasks:b,remoteSessions:x,agentTasks:S,teammateTasks:C,workflowTasks:w,mcpMonitors:T,dreamTasks:ee,allSelectableItems:E}=(0,X.useMemo)(()=>{let e=Object.values(c??{}).filter(Ae).map(An).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:`@${mt}`,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]),D=E[v]??null;h({"confirm:previous":()=>y(e=>Math.max(0,e-1)),"confirm:next":()=>y(e=>Math.min(E.length-1,e+1)),"confirm:yes":()=>{let t=E[v];t&&(t.type===`leader`?(St(o),e(`Viewing leader`,{display:`system`})):g({mode:`detail`,itemId:t.id}))}},{context:`Confirmation`,isActive:u.mode===`list`});let ne=t=>{if(u.mode!==`list`)return;if(t.key===`left`){t.preventDefault(),e(`Background tasks dialog dismissed`,{display:`system`});return}let n=E[v];n&&(t.key===`x`&&(t.preventDefault(),n.type===`local_bash`&&n.status===`running`?k(n.id):n.type===`local_agent`&&n.status===`running`?A(n.id):n.type===`in_process_teammate`&&n.status===`running`?re(n.id):n.type===`local_workflow`&&n.status===`running`&&Q?Q(n.id,o):n.type===`monitor_mcp`&&n.status===`running`&&$?$(n.id,o):n.type===`dream`&&n.status===`running`?ie(n.id):n.type===`remote_agent`&&n.status===`running`&&(n.task.isUltraplan?Re(n.id,n.task.sessionId,o):ae(n.id))),t.key===`f`&&(n.type===`in_process_teammate`&&n.status===`running`?(t.preventDefault(),xt(n.id,o),e(`Viewing teammate`,{display:`system`})):n.type===`leader`&&(t.preventDefault(),St(o),e(`Viewing leader`,{display:`system`}))))};async function k(e){await Ve.kill(e,o)}async function A(e){await it.kill(e,o)}async function re(e){await at.kill(e,o)}async function ie(e){await et.kill(e,o)}async function ae(e){await Ze.kill(e,o)}let j=(0,X.useEffectEvent)(e);(0,X.useEffect)(()=>{if(u.mode!==`list`){let e=(c??{})[u.itemId];(!e||e.type!==`local_workflow`&&!Ae(e))&&(l.current?j(`Background tasks dialog dismissed`,{display:`system`}):g({mode:`list`}))}let e=E.length;v>=e&&e>0&&y(e-1)},[u,c,v,E,j]);let M=()=>{l.current&&E.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,Z.jsx)(hn,{shell:n,onDone:e,onKillShell:()=>void k(n.id),onBack:M},`shell-${n.id}`);case`local_agent`:return(0,Z.jsx)(Ft,{agent:n,onDone:e,onKillAgent:()=>void A(n.id),onBack:M},`agent-${n.id}`);case`remote_agent`:return(0,Z.jsx)(cn,{session:n,onDone:e,toolUseContext:t,onBack:M,onKill:n.status===`running`?n.isUltraplan?()=>void Re(n.id,n.sessionId,o):()=>void ae(n.id):void 0},`session-${n.id}`);case`in_process_teammate`:return(0,Z.jsx)($t,{teammate:n,onDone:e,onKill:n.status===`running`?()=>void re(n.id):void 0,onBack:M,onForeground:n.status===`running`?()=>{xt(n.id,o),e(`Viewing teammate`,{display:`system`})}:void 0},`teammate-${n.id}`);case`local_workflow`:return Mn?(0,Z.jsx)(Mn,{workflow:n,onDone:e,onKill:n.status===`running`&&Q?()=>Q(n.id,o):void 0,onSkipAgent:n.status===`running`&&Pn?e=>Pn(n.id,e,o):void 0,onRetryAgent:n.status===`running`&&Fn?e=>Fn(n.id,e,o):void 0,onBack:M},`workflow-${n.id}`):null;case`monitor_mcp`:return In?(0,Z.jsx)(In,{task:n,onKill:n.status===`running`&&$?()=>$(n.id,o):void 0,onBack:M},`monitor-mcp-${n.id}`):null;case`dream`:return(0,Z.jsx)(Xt,{task:n,onDone:()=>e(`Background tasks dialog dismissed`,{display:`system`}),onBack:M,onKill:n.status===`running`?()=>void ie(n.id):void 0},`dream-${n.id}`)}}let se=O(b,e=>e.status===`running`),ce=O(x,e=>e.status===`running`||e.status===`pending`)+O(S,e=>e.status===`running`),le=O(C,e=>e.status===`running`),ue=te([...le>0?[(0,Z.jsxs)(d,{children:[le,` `,le===1?`agent`:`agents`]},`teammates`)]:[],...se>0?[(0,Z.jsxs)(d,{children:[se,` `,se===1?`active shell`:`active shells`]},`shells`)]:[],...ce>0?[(0,Z.jsxs)(d,{children:[ce,` `,ce===1?`active agent`:`active agents`]},`agents`)]:[]],e=>(0,Z.jsx)(d,{children:` · `},`separator-${e}`)),de=[(0,Z.jsx)(p,{shortcut:`↑/↓`,action:`select`},`upDown`),(0,Z.jsx)(p,{shortcut:`Enter`,action:`view`},`enter`),...D?.type===`in_process_teammate`&&D.status===`running`?[(0,Z.jsx)(p,{shortcut:`f`,action:`foreground`},`foreground`)]:[],...(D?.type===`local_bash`||D?.type===`local_agent`||D?.type===`in_process_teammate`||D?.type===`local_workflow`||D?.type===`monitor_mcp`||D?.type===`dream`||D?.type===`remote_agent`)&&D.status===`running`?[(0,Z.jsx)(p,{shortcut:`x`,action:`stop`},`kill`)]:[],...S.some(e=>e.status===`running`)?[(0,Z.jsx)(p,{shortcut:s,action:`stop all agents`},`kill-all`)]:[],(0,Z.jsx)(p,{shortcut:`←/Esc`,action:`close`},`esc`)],fe=()=>e(`Background tasks dialog dismissed`,{display:`system`});function pe(e){return e.pending?(0,Z.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,Z.jsx)(m,{children:de})}return(0,Z.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:ne,children:(0,Z.jsx)(f,{title:`Background tasks`,subtitle:(0,Z.jsx)(Z.Fragment,{children:ue}),onCancel:fe,color:`background`,inputGuide:pe,children:E.length===0?(0,Z.jsx)(d,{dimColor:!0,children:`No tasks currently running`}):(0,Z.jsxs)(_,{flexDirection:`column`,children:[C.length>0&&(0,Z.jsxs)(_,{flexDirection:`column`,children:[(b.length>0||x.length>0||S.length>0)&&(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Agents`]}),` (`,O(C,e=>e.type!==`leader`),`)`]}),(0,Z.jsx)(_,{flexDirection:`column`,children:(0,Z.jsx)(jn,{teammateTasks:C,currentSelectionId:D?.id})})]}),b.length>0&&(0,Z.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0),children:[(C.length>0||x.length>0||S.length>0)&&(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Shells`]}),` (`,b.length,`)`]}),(0,Z.jsx)(_,{flexDirection:`column`,children:b.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===D?.id},e.id))})]}),T.length>0&&(0,Z.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Monitors`]}),` (`,T.length,`)`]}),(0,Z.jsx)(_,{flexDirection:`column`,children:T.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===D?.id},e.id))})]}),x.length>0&&(0,Z.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Remote agents`]}),` (`,x.length,`)`]}),(0,Z.jsx)(_,{flexDirection:`column`,children:x.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===D?.id},e.id))})]}),S.length>0&&(0,Z.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Local agents`]}),` (`,S.length,`)`]}),(0,Z.jsx)(_,{flexDirection:`column`,children:S.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===D?.id},e.id))})]}),w.length>0&&(0,Z.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Workflows`]}),` (`,w.length,`)`]}),(0,Z.jsx)(_,{flexDirection:`column`,children:w.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===D?.id},e.id))})]}),ee.length>0&&(0,Z.jsx)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0||w.length>0),children:(0,Z.jsx)(_,{flexDirection:`column`,children:ee.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===D?.id},e.id))})})]})})})}function An(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 Y({item:e,isSelected:t}){let{columns:n}=s(),r=Math.max(30,n-26),i=Ue();return(0,Z.jsxs)(_,{flexDirection:`row`,children:[(0,Z.jsx)(d,{dimColor:i&&t,children:t?a.pointer+` `:` `}),(0,Z.jsx)(d,{color:t&&!i?`suggestion`:void 0,children:e.type===`leader`?(0,Z.jsxs)(d,{children:[`@`,mt]}):(0,Z.jsx)(Jt,{task:e.task,maxActivityWidth:r})})]})}function jn({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,Z.jsx)(Z.Fragment,{children:[...i.entries()].map(([e,r])=>(0,Z.jsxs)(_,{flexDirection:`column`,children:[(0,Z.jsxs)(d,{dimColor:!0,children:[` `,`Team: `,e,` (`,r.length+n.length,`)`]}),n.map(n=>(0,Z.jsx)(Y,{item:n,isSelected:n.id===t},`${n.id}-${e}`)),r.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===t},e.id))]},e))})}var X,Z,Mn,Nn,Q,Pn,Fn,$,In,Ln=t((()=>{i(),X=n(l(),1),tt(),ot(),Ce(),Tt(),He(),qe(),pe(),ce(),Ie(),we(),ne(),ht(),$e(),Ge(),g(),F(),je(),Lt(),Yt(),Qt(),tn(),pn(),vn(),Z=v(),Mn=(wn(),e(xn)).WorkflowDetailDialog,Nn=(Xe(),e(ze)),Q=Nn?.killWorkflowTask??null,Pn=Nn?.skipWorkflowAgent??null,Fn=Nn?.retryWorkflowAgent??null,$=(Le(),e(We))?.killMonitorMcp??null,In=(Dn(),e(Tn)).MonitorMcpDetailDialog}));export{Nt as a,Tt as c,kt as i,Ct as l,Ln as n,xt as o,Pt as r,St as s,kn as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./ClaudeMdExternalIncludesDialog-B04cjDwX.js";e();export{t as ClaudeMdExternalIncludesDialog};
@@ -1 +0,0 @@
1
- import{my as e,py as t}from"./loadAgentsDir-D7kapZB5.js";e();export{t as ConsoleOAuthFlow};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./Doctor-CDez_u_U.js";e();export{t as Doctor};
@@ -1,3 +0,0 @@
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{Dr as m,Ka as te,Po as h,Pr as g,Ro as _,Vo as v,al as y,cr as b,dr as x,el as S,jo as C,oo as w}from"./paths-1ngPRtu3.js";import{Ck as T,FA as ne,Gm as E,Hb as D,IA as O,Jm as k,Km as re,NS as ie,PS as A,Qf as ae,Ub as oe,Uc as se,Vb as ce,Wb as le,Wc as j,Xf as M,Ym as N,Zf as P,_T as F,_k as I,aT as L,al as R,bT as z,bk as B,iT as V,il as H,oA as U,oT as W,qm as ue,rA as G,sT as de,vT as fe,xT as pe,xk as me,yT as he}from"./loadAgentsDir-D7kapZB5.js";import{t as ge}from"./useKeybinding-FsOnjW6T.js";import{l as _e,u as ve}from"./referral-BKeCKnOJ.js";import{a as ye,i as be}from"./xdg-CBxMmQux.js";import{n as xe,t as Se}from"./McpParsingWarnings-BOj-T8F3.js";import{n as Ce,t as we}from"./PressEnterToContinue-BdA9zDGs.js";import{n as Te,t as Ee}from"./ValidationErrorsList-C9swVkZ-.js";import{n as De,t as Oe}from"./useSettingsErrors-DD7fQ-fU.js";import{n as ke,t as Ae}from"./shadowedRuleDetection-CQayPrmM.js";import{n as je,r as Me,t as K}from"./statusNoticeHelpers-cnI4TiGw.js";import{join as q}from"path";function Ne(){if(!de())return null;let e=V();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:L()})]}),(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(),W(),J=f()}));function Fe(){if(!G.isSupportedPlatform()||!G.isSandboxEnabledInSettings())return null;let e=G.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(),U(),Y=f()}));async function Le(){let e=B(await me());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 > ${I.toLocaleString()})`:`${e.length} large CLAUDE.md files detected (each > ${I.toLocaleString()} chars)`,details:t,currentValue:e.length,threshold:I}}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 H(e,t,n,m());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:G.isSandboxingEnabled()&&G.isAutoAllowBashIfSandboxedEnabled()});if(t.length===0)return null;let n=t.flatMap(e=>[`${v(e.rule.ruleValue)}: ${e.reason}`,` Fix: ${e.fix}`]);return{type:`unreachable_rules`,severity:`warning`,message:`${t.length} ${h(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((()=>{se(),R(),T(),g(),_(),ke(),U(),Me(),C(),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=A(e=>e.agentDefinitions),r=A(e=>e.mcp.tools),i=A(e=>e.toolPermissionContext),o=A(e=>e.plugins.errors);ve();let u=(0,Q.useMemo)(()=>r||[],[r]),[f,p]=(0,Q.useState)(null),[m,h]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(null),[v,x]=(0,Q.useState)(null),S=De(),C=(0,Q.useMemo)(()=>F().then(e=>(e.installationType===`native`?he:z)().catch(()=>({latest:null,stable:null}))),[]),w=te()?.autoUpdatesChannel??`latest`,T=S.filter(e=>e.mcpErrorMetadata===void 0),O=(0,Q.useMemo)(()=>[{name:`BASH_MAX_OUTPUT_LENGTH`,default:E,upperLimit:re},{name:`TASK_MAX_OUTPUT_LENGTH`,default:M,upperLimit:P},{name:`CLAUDE_CODE_MAX_OUTPUT_TOKENS`,...b(`claude-opus-4-7`)}].map(e=>{let t=process.env[e.name],n=N(e.name,t,e.default,e.upperLimit);return{name:e.name,...n}}).filter(e=>e.status!==`valid`),[]);(0,Q.useEffect)(()=>{F().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([y(e),y(r)]);if(h({activeAgents:a.map(e=>({agentType:e.agentType,source:e.source})),userAgentsDir:e,projectAgentsDir:r,userDirExists:c,projectDirExists:l,failedFiles:s}),_(await Be(u,{activeAgents:a,allAgents:o,failedFiles:s},async()=>i)),le()){let e=q(be(),`claude`,`locks`),t=ce(e);x({enabled:!0,locks:D(e),locksDir:e,staleLocksCleaned:t})}else x({enabled:!1,locks:[],locksDir:``,staleLocksCleaned:0})})()},[i,u,t]);let k=(0,Q.useCallback)(()=>{e(`Claude Code diagnostics dismissed`,{display:`system`})},[e]);return c({"confirm:yes":k,"confirm:no":k},{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.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,{}),O.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Environment Variables`}),O.map((e,t)=>(0,$.jsxs)(s,{children:[`└ `,e.name,`:`,` `,(0,$.jsx)(s,{color:e.status===`capped`?`warning`:`error`,children:e.message})]},t))]}),v?.enabled&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Version Locks`}),v.staleLocksCleaned>0&&(0,$.jsxs)(s,{dimColor:!0,children:[`└ Cleaned `,v.staleLocksCleaned,` stale lock(s)`]}),v.locks.length===0?(0,$.jsx)(s,{dimColor:!0,children:`└ No active version locks`}):v.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}]`:``,`: `,ne(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(),_e(),ge(),ie(),O(),pe(),Ve(),fe(),k(),S(),oe(),w(),ue(),ae(),ye(),$=f()}));export{We as n,Ue as t};
@@ -1 +0,0 @@
1
- import{r as e,t}from"./Grove-Tp_UtIMg.js";e();export{t as GroveDialog};
@@ -1,3 +0,0 @@
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,es as y,no as b,on as x,oo as S,pi as C,rs as w,vi as T}from"./paths-1ngPRtu3.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-CzsijfHZ.js";import{b as N,x as re}from"./teammate-DMYOtLTK.js";import{C as ie,g as ae,x as oe}from"./startupProfiler-DnXZaX4A.js";import{Ax as se,Dc as P,Ec as ce,Eo as F,HE as le,IO as ue,LO as I,Lo as L,NS as de,PO as R,PS as fe,Qv as pe,Rc as z,So as B,Ui as V,Uo as H,VE as me,Vi as he,Vo as ge,Xi as _e,Xv as ve,Zv as ye,_o as be,an as xe,bo as U,fo as Se,gy as Ce,hn as we,iu as W,kc as Te,kx as Ee,la as De,nu as Oe,os as ke,rC as Ae,ry as je,tC as Me,vy as Ne,yn as Pe,zc as Fe,zo as Ie,zw as Le}from"./loadAgentsDir-D7kapZB5.js";import{E as Re,T as ze,c as Be,d as Ve,w as He}from"./sessionTracing-DognYcDf.js";import{t as Ue}from"./useKeybinding-FsOnjW6T.js";import{l as We,u as Ge}from"./referral-BKeCKnOJ.js";import{n as Ke,t as qe}from"./slashCommandParsing-Cari0pNg.js";import*as G from"path";import{randomUUID as K}from"crypto";o();var q=p();r(),u(),h(),E(),O(),j(),te(),ne(),re(),oe(),w(),S(),x(),ue(),He(),me(),Me(),Be(),Oe(),z(),Te(),ke(),L(),_e(),Pe(),qe();var Je={"`":"`",'"':`"`,"<":`>`,"{":`}`,"[":`]`,"(":`)`,"'":`'`};function Ye(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!==Je[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 Je)&&(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 J(e){return Ye(e,`ultraplan`)}function Xe(e){return Ye(e,`ultrareview`)}function Ze(e){return J(e).length>0}function Qe(e){let[t]=J(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 $e(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 et(e){let t=e.toLowerCase().trim();return t===`continue`?!0:/\b(keep going|go on)\b/.test(t)}function tt(e,t,n,r,i,a,o){let s=K();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:$e(c),is_keep_going:et(c)}),t.length>0?{messages:[U({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:[U({content:e,uuid:i,permissionMode:a,isMeta:o||void 0}),...r],shouldQuery:!0}}E(),L();async function nt({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;n===`prompt`&&v!==null&&!h&&c?.(v),W(`query_process_user_input_base_start`);let y=i.getAppState(),b=await it(e,n,r,i,a,o,s,l,u,d,f,y.toolPermissionContext.mode,p,m,h,g,t,_);if(W(`query_process_user_input_base_end`),!b.shouldQuery)return b;W(`query_hooks_start`);let x=F(e)||``;for await(let t of xe(x,y.toolPermissionContext.mode,i,i.requestPrompt))if(t.message?.type!==`progress`){if(t.blockingError)return{messages:[be(`${we(t.blockingError)}\n\nOriginal prompt: ${e}`,`warning`)],shouldQuery:!1,allowedTools:b.allowedTools};if(t.preventContinuation){let e=t.stopReason?`Operation stopped by hook: ${t.stopReason}`:`Operation stopped by hook`;return b.messages.push(U({content:e})),b.shouldQuery=!1,b}if(t.additionalContexts&&t.additionalContexts.length>0&&b.messages.push(ce({type:`hook_additional_context`,content:t.additionalContexts.map(rt),hookName:`UserPromptSubmit`,toolUseID:`hook-${K()}`,hookEvent:`UserPromptSubmit`})),t.message)switch(t.message.attachment.type){case`hook_success`:if(!t.message.attachment.content)break;b.messages.push({...t.message,attachment:{...t.message.attachment,content:rt(t.message.attachment.content)}});break;default:b.messages.push(t.message);break}}return W(`query_hooks_end`),b}var Y=1e4;function rt(e){return e.length>Y?`${e.substring(0,Y)}… [output truncated - exceeded ${Y} characters]`:e}async function it(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){W(`query_image_processing_start`);let t=[];for(let n of e)if(n.type===`image`){let e=await I(n);if(e.dimensions){let t=R(e.dimensions);t&&b.push(t)}t.push(e.block)}else t.push(n);x=t,W(`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(Fe):[],C=S.map(e=>e.id),w=i?await Ae(i):new Map;W(`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 I(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=R(e.dimensions,n);t&&b.push(t)}else if(t){let e=R(t,n);e&&b.push(e)}else n&&b.push(`[Image source: ${n}]`);E.push(e.block)}W(`query_pasted_image_processing_end`);let O=f;if(p&&v!==null&&v.startsWith(`/`)){let e=Ke(v),t=e?he(e.commandName,r.options.commands):void 0;if(t){let n=V(t,e?.args??``);if(n.ok)O=!1;else{let e=n.reason??`/${De(t)} isn't available over Remote Control.`;return{messages:[U({content:v,uuid:s}),Se(`<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&&Ze(g??v)){D(`tengu_ultraplan_keyword`,{});let e=Qe(v).trim(),{processSlashCommand:t}=await import(`./processSlashCommand-BaUdUg3T.js`);return X(await t(`/ultraplan ${e}`,y,E,[],r,n,s,c,u,_),b)}let k=!h&&v!==null&&(t!==`prompt`||O||!v.startsWith(`/`));W(`query_attachment_loading_start`);let A=k?await le(P(v,r,a??null,[],o,l)):[];if(W(`query_attachment_loading_end`),v!==null&&t===`bash`){let{processBashCommand:e}=await import(`./processBashCommand-a8W8aTRu.js`);return X(await e(v,y,A,r,n),b)}if(v!==null&&!O&&v.startsWith(`/`)){let{processSlashCommand:e}=await import(`./processSlashCommand-BaUdUg3T.js`);return X(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 X(tt(x,E,C,A,s,d,m),b)}function X(e,t){return t.length>0&&e.messages.push(U({content:t.map(e=>({type:`text`,text:e})),isMeta:!0})),e}h(),T();function at(e){return e===`Agent`?y:e}function ot(e){let t=b()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:k(),session_id:m(),tools:e.tools.map(e=>at(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.6.6`,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:K()};return n.fast_mode_state=C(e.model,e.fastMode),n}var st=n({MessageSelector:()=>lt,messagesAfterAreOnlySynthetic:()=>_t,selectableUserMessagesFilter:()=>gt});function ct(e){return e.type===`text`}function Z(e){return e===`summarize`||e===`summarize_up_to`}function lt({messages:e,onPreRestore:t,onRestoreMessage:n,onRestoreCode:r,onSummarize:a,onClose:o,preselectedMessage:u}){let p=fe(e=>e.fileHistory),[m,h]=(0,Q.useState)(void 0),g=ye(),_=(0,Q.useMemo)(K,[]),v=(0,Q.useMemo)(()=>[...e.filter(gt),{...U({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 pe(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 pe(p,t.uuid);w(t),E(r)}async function ce(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(Z(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 F=Ge(),le=(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)),[]),I=(0,Q.useCallback)(()=>b(e=>Math.min(v.length-1,e+1)),[v.length]),L=(0,Q.useCallback)(()=>b(0),[]),de=(0,Q.useCallback)(()=>b(v.length-1),[v.length]),R=(0,Q.useCallback)(()=>{let e=v[y];e&&P(e)},[v,y,P]);d(`confirm:no`,le,{context:`Confirmation`,isActive:!C}),l({"messageSelector:up":ue,"messageSelector:down":I,"messageSelector:top":L,"messageSelector:bottom":de,"messageSelector:select":R},{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=ve(p,t.uuid),i=v.at(n+1),a=r?ht(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,H=!m&&!C&&!u&&S;return(0,q.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,q.jsx)(c,{color:`suggestion`}),(0,q.jsxs)(f,{flexDirection:`column`,marginX:1,gap:1,children:[(0,q.jsx)(s,{bold:!0,color:`suggestion`,children:`Rewind`}),m&&(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(s,{color:`error`,children:[`Error: `,m]})}),!S&&(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(s,{children:`Nothing to rewind to yet.`})}),!m&&C&&S&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(s,{children:[`Confirm you want to restore `,!T&&`the conversation `,`to the point before you sent this message:`]}),(0,q.jsxs)(f,{flexDirection:`column`,paddingLeft:1,borderStyle:`single`,borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[(0,q.jsx)(mt,{userMessage:C,color:`text`,isCurrent:!1}),(0,q.jsxs)(s,{dimColor:!0,children:[`(`,ae(new Date(C.timestamp)),`)`]})]}),(0,q.jsx)(dt,{selectedRestoreOption:ee,canRestoreCode:!!V,diffStatsForRestore:T}),O&&Z(A)?(0,q.jsxs)(f,{flexDirection:`row`,gap:1,children:[(0,q.jsx)(Ce,{}),(0,q.jsx)(s,{children:`Summarizing…`})]}):(0,q.jsx)(Ee,{isDisabled:O,options:oe(!!V),defaultFocusValue:V?`both`:`conversation`,onFocus:e=>te(e),onChange:e=>ce(e),onCancel:()=>u?o():w(void 0)}),V&&(0,q.jsx)(f,{marginBottom:1,children:(0,q.jsxs)(s,{dimColor:!0,children:[i.warning,` Rewinding does not affect files edited manually or via bash.`]})})]}),H&&(0,q.jsxs)(q.Fragment,{children:[g?(0,q.jsx)(s,{children:`Restore the code and/or conversation to the point before…`}):(0,q.jsx)(s,{children:`Restore and fork the conversation to the point before…`}),(0,q.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,q.jsxs)(f,{height:g?3:2,overflow:`hidden`,width:`100%`,flexDirection:`row`,children:[(0,q.jsx)(f,{width:2,minWidth:2,children:r?(0,q.jsxs)(s,{color:`permission`,bold:!0,children:[i.pointer,` `]}):(0,q.jsx)(s,{children:` `})}),(0,q.jsxs)(f,{flexDirection:`column`,children:[(0,q.jsx)(f,{flexShrink:1,height:1,overflow:`hidden`,children:(0,q.jsx)(mt,{userMessage:e,color:r?`suggestion`:void 0,isCurrent:a,paddingRight:10})}),g&&o&&(0,q.jsx)(f,{height:1,flexDirection:`row`,children:c?(0,q.jsx)(q.Fragment,{children:(0,q.jsx)(s,{dimColor:!r,color:`inactive`,children:l?(0,q.jsxs)(q.Fragment,{children:[l===1&&c.filesChanged[0]?`${G.basename(c.filesChanged[0])} `:`${l} files changed `,(0,q.jsx)(pt,{diffStats:c})]}):(0,q.jsx)(q.Fragment,{children:`No code changes`})})}):(0,q.jsxs)(s,{dimColor:!0,color:`warning`,children:[i.warning,` No code restore`]})})]})]},e.uuid)})})]}),!C&&(0,q.jsx)(s,{dimColor:!0,italic:!0,children:F.pending?(0,q.jsxs)(q.Fragment,{children:[`Press `,F.keyName,` again to exit`]}):(0,q.jsxs)(q.Fragment,{children:[!m&&S&&`Enter to continue · `,`Esc to exit`]})})]})]})}function ut(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 dt({selectedRestoreOption:e,canRestoreCode:t,diffStatsForRestore:n}){let r=t&&(e===`both`||e===`code`);return(0,q.jsxs)(f,{flexDirection:`column`,children:[(0,q.jsx)(s,{dimColor:!0,children:ut(e)}),!Z(e)&&(r?(0,q.jsx)(ft,{diffStatsForRestore:n}):(0,q.jsx)(s,{dimColor:!0,children:`The code will be unchanged.`}))]})}function ft({diffStatsForRestore:e}){if(e===void 0)return;if(!e.filesChanged||!e.filesChanged[0])return(0,q.jsx)(s,{dimColor:!0,children:`The code has not changed (nothing will be restored).`});let t=e.filesChanged.length,n=``;return n=t===1?G.basename(e.filesChanged[0]||``):t===2?`${G.basename(e.filesChanged[0]||``)} and ${G.basename(e.filesChanged[1]||``)}`:`${G.basename(e.filesChanged[0]||``)} and ${e.filesChanged.length-1} other files`,(0,q.jsx)(q.Fragment,{children:(0,q.jsxs)(s,{dimColor:!0,children:[`The code will be restored `,(0,q.jsx)(pt,{diffStats:e}),` in `,n,`.`]})})}function pt({diffStats:e}){if(!(!e||!e.filesChanged))return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(s,{color:`diffAddedWord`,children:[`+`,e.insertions,` `]}),(0,q.jsxs)(s,{color:`diffRemovedWord`,children:[`-`,e.deletions]})]})}function mt({userMessage:e,color:t,dimColor:n,isCurrent:r,paddingRight:i}){let{columns:o}=a();if(r)return(0,q.jsx)(f,{width:`100%`,children:(0,q.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&&ct(l)?l.text.trim():`(no prompt)`);if(Ie(u))return(0,q.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,q.jsx)(s,{italic:!0,color:t,dimColor:n,children:`((empty message))`})});if(u.includes(`<bash-input>`)){let e=B(u,`bash-input`);if(e)return(0,q.jsxs)(f,{flexDirection:`row`,width:`100%`,children:[(0,q.jsx)(s,{color:`bashBorder`,children:`!`}),(0,q.jsxs)(s,{color:t,dimColor:n,children:[` `,e]})]})}if(u.includes(`<command-message>`)){let e=B(u,A),r=B(u,`command-args`),i=B(u,`skill-format`)===`true`;if(e)return i?(0,q.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,q.jsxs)(s,{color:t,dimColor:n,children:[`Skill(`,e,`)`]})}):(0,q.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,q.jsxs)(s,{color:t,dimColor:n,children:[`/`,e,` `,r]})})}return(0,q.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,q.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 ht(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||!H(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 gt(e){if(e.type!==`user`||Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_result`||ge(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&&ct(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&&!ge(t)&&!H(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(),1),E(),de(),je(),We(),Ue(),L(),se(),Ne(),Le(),$=7}));export{gt as a,nt as c,_t as i,J as l,st as n,ot as o,vt as r,at as s,lt as t,Xe as u};
@@ -1,11 +0,0 @@
1
- import{a as e,n as t,o as n,r}from"./chunk-DR8-3Aex.js";import{s as i,u as a}from"./envUtils-BWeoiL4Y.js";import{n as o,t as s}from"./figures-gfT9mM8P.js";import{B as c,Cn as l,F as u,Ft as d,In as f,Ln as p,Lt as m,Rn as h,W as g,b as _,m as v,t as y,v as b,x,y as S}from"./src-Di342QoJ.js";import{t as C}from"./jsx-runtime-D-D469L8.js";import{L as w,W as ee,cn as T,y as E}from"./state-sIHsFpDu.js";import{Ac as D,Gs as O,Gt as te,Hs as ne,Ht as k,Ka as re,Ko as ie,Lr as A,Pc as j,Po as M,Pr as N,S as ae,Sc as P,Ur as oe,Zc as F,dn as I,el as se,g as L,jo as ce,on as le,oo as ue,qo as de,qt as fe}from"./paths-1ngPRtu3.js";import{c as pe,d as R,i as me,l as he,s as ge}from"./debug-UI3T040K.js";import{n as _e,r as z}from"./analytics-DqMQntaB.js";import{n as ve,t as ye}from"./cwd--iizewsn.js";import{a as be,n as xe}from"./env-chR0gV31.js";import{H as B,V as Se,W as Ce,et as we}from"./log-CzsijfHZ.js";import{C as Te,g as Ee,m as De,n as Oe,r as ke,t as Ae,x as je}from"./startupProfiler-DnXZaX4A.js";import{n as Me,t as Ne}from"./sleep-8Eb9j_Ly.js";import{$A as Pe,$o as Fe,$w as Ie,Ah as Le,Ao as Re,Bg as ze,Bo as Be,Bx as Ve,Ck as He,Cu as Ue,Cv as We,DD as Ge,Dh as Ke,Eh as qe,Es as Je,Fu as Ye,Go as Xe,Io as Ze,Iu as Qe,Jo as $e,Jw as et,Jy as tt,Kw as nt,Lo as rt,Lu as it,Lx as at,Mo as ot,Ms as st,Mu as ct,NS as lt,Ng as ut,Nu as dt,OD as ft,Oh as pt,Oo as mt,PS as ht,Pg as gt,Pu as _t,Qb as vt,Qg as yt,Qw as bt,Rx as xt,So as St,Sv as Ct,Vg as wt,Ww as Tt,Xa as Et,Xw as Dt,YA as Ot,Ya as kt,Yo as At,Yw as jt,Yx as Mt,Za as Nt,Zg as Pt,_k as Ft,bk as It,dw as Lt,ex as Rt,hx as zt,io as Bt,ix as Vt,jo as Ht,kh as Ut,ko as Wt,lo as Gt,lw as Kt,lx as qt,mx as Jt,oA as Yt,qw as Xt,qx as Zt,rA as Qt,ro as $t,xk as en,xo as tn,zw as nn}from"./loadAgentsDir-D7kapZB5.js";import{Vn as rn,zn as an}from"./prompt-BBg3jtfc.js";import{f as on,p as sn}from"./xml-DTMvLcPg.js";import{C as cn,y as ln}from"./rcDebugLog-CPGWJbI4.js";import{n as un,r as dn,t as fn}from"./browser-fLRXxIsQ.js";import{d as pn,f as mn,h as hn,p as gn}from"./terminalSetup-bSbq4LE7.js";import{a as _n,o as vn,r as yn,s as bn,t as xn}from"./referral-BKeCKnOJ.js";import{n as Sn,t as Cn}from"./SentryErrorBoundary-iih9eFpM.js";import{a as wn,n as Tn}from"./voiceModeEnabled-168-1Ocs.js";import{c as En,r as Dn}from"./releaseNotes-CvfZb3fZ.js";import{a as On,c as kn,d as An,i as jn,l as Mn,n as Nn,o as Pn,r as Fn,t as In,u as Ln}from"./logoV2Utils-DjThKW15.js";import{n as Rn,t as zn}from"./systemTheme-dDbitcxB.js";import{n as Bn,r as Vn}from"./PromptInputFooterSuggestions-ihnbjU0K.js";import{n as Hn,t as Un}from"./useMainLoopModel-Os8Ao8-x.js";import{n as Wn,t as Gn}from"./modalContext-CmSKRyea.js";import{i as Kn,n as qn,r as Jn,s as Yn,t as Xn}from"./OverageCreditUpsell-abcPm3PB.js";import{n as Zn,r as Qn,t as $n}from"./statusNoticeHelpers-cnI4TiGw.js";import{homedir as er}from"os";import{relative as tr}from"path";import{fileURLToPath as nr}from"url";function rr(e,t){for(let n of e)if(!t.has(n))return!1;return!0}var ir=t((()=>{}));function ar(e){if(e.type!==`user`)return!1;let t=Array.isArray(e.message.content)?e.message.content[0]:void 0;return!t||typeof t==`string`||t?.type!==`text`||!t.text.includes(`<task-notification`)||St(t.text,`status`)!==`completed`?!1:St(t.text,`summary`)?.startsWith(`Background command `)??!1}function or(e,t){if(!Mt()||t)return e;let n=[],r=0;for(;r<e.length;){let t=e[r];if(ar(t)){let i=0;for(;r<e.length&&ar(e[r]);)i++,r++;i===1?n.push(t):n.push({...t,message:{role:`user`,content:[{type:`text`,text:`<${Ce}><${Se}>completed</${Se}><${B}>${i} background commands completed</${B}></${Ce}>`}]}})}else n.push(t),r++}return n}var sr=t((()=>{we(),Ue(),Zt(),rt()}));function cr(e){return e.type===`system`&&e.subtype===`stop_hook_summary`&&e.hookLabel!==void 0}function lr(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(cr(r)){let i=r.hookLabel,a=[];for(;n<e.length;){let t=e[n];if(!cr(t)||t.hookLabel!==i)break;a.push(t),n++}a.length===1?t.push(r):t.push({...r,hookCount:a.reduce((e,t)=>e+t.hookCount,0),hookInfos:a.flatMap(e=>e.hookInfos),hookErrors:a.flatMap(e=>e.hookErrors),preventedContinuation:a.some(e=>e.preventedContinuation),hasOutput:a.some(e=>e.hasOutput),totalDurationMs:Math.max(...a.map(e=>e.totalDurationMs??0))})}else t.push(r),n++}return t}var ur=t((()=>{}));function dr(e){return e.type===`attachment`&&e.attachment.type===`task_status`&&e.attachment.taskType===`in_process_teammate`&&e.attachment.status===`completed`}function fr(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(dr(r)){let i=0;for(;n<e.length&&dr(e[n]);)i++,n++;i===1?t.push(r):t.push({type:`attachment`,uuid:r.uuid,timestamp:r.timestamp,attachment:{type:`teammate_shutdown_batch`,count:i}})}else t.push(r),n++}return t}var pr=t((()=>{}));function mr(e){let t=_r.get(e);return t||(t=new Set(e.filter(e=>e.renderGroupedToolUse).map(e=>e.name)),_r.set(e,t)),t}function hr(e){if(e.type===`assistant`&&e.message?.content&&Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_use`){let t=e.message.content[0];return{messageId:e.message.id,toolUseId:t.id,toolName:t.name}}return null}function gr(e,t,n=!1){if(n)return{messages:e};let r=mr(t),i=new Map;for(let t of e){let e=hr(t);if(e&&r.has(e.toolName)){let n=`${e.messageId}:${e.toolName}`,r=i.get(n)??[];r.push(t),i.set(n,r)}}let a=new Map,o=new Set;for(let[e,t]of i)if(t.length>=2){a.set(e,t);for(let e of t){let t=hr(e);t&&o.add(t.toolUseId)}}let s=new Map;for(let t of e)if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content))for(let e of t.message.content)e.type===`tool_result`&&o.has(e.tool_use_id)&&s.set(e.tool_use_id,t);let c=[],l=new Set;for(let t of e){let e=hr(t);if(e){let t=`${e.messageId}:${e.toolName}`,n=a.get(t);if(n){if(!l.has(t)){l.add(t);let r=n[0],i=[];for(let e of n){let t=e.message.content[0].id,n=s.get(t);n&&i.push(n)}let a={type:`grouped_tool_use`,toolName:e.toolName,messages:n,results:i,displayMessage:r,uuid:`grouped-${r.uuid}`,timestamp:r.timestamp,messageId:e.messageId};c.push(a)}continue}}if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content)){let e=t.message.content.filter(e=>e.type===`tool_result`);if(e.length>0&&e.every(e=>o.has(e.tool_use_id)))continue}c.push(t)}return{messages:c}}var _r,vr=t((()=>{_r=new WeakMap}));function yr(e){let t=Tr.get(e);if(t!==void 0)return t;let n=br(e).toLowerCase();return Tr.set(e,n),n}function br(e){let t=``;switch(e.type){case`user`:{let n=e.message.content;if(typeof n==`string`)t=wr.has(n)?``:n;else{let r=[];for(let t of n??[])t.type===`text`?wr.has(t.text)||r.push(t.text):t.type===`tool_result`&&r.push(Sr(e.toolUseResult));t=r.join(`
2
- `)}break}case`assistant`:{let n=e.message.content;Array.isArray(n)&&(t=n.flatMap(e=>e.type===`text`?[e.text]:e.type===`tool_use`?[xr(e.input)]:[]).join(`
3
- `));break}case`attachment`:if(e.attachment.type===`relevant_memories`)t=(e.attachment.memories??[]).map(e=>e.content).join(`
4
- `);else if(e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
5
- `)}break;case`collapsed_read_search`:e.relevantMemories&&(t=e.relevantMemories.map(e=>e.content).join(`
6
- `));break;default:break}let n=t,r=n.indexOf(`<system-reminder>`);for(;r>=0;){let e=n.indexOf(Cr,r);if(e<0)break;n=n.slice(0,r)+n.slice(e+18),r=n.indexOf(`<system-reminder>`)}return n}function xr(e){if(!e||typeof e!=`object`)return``;let t=e,n=[];for(let e of[`command`,`pattern`,`file_path`,`path`,`prompt`,`description`,`query`,`url`,`skill`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`args`,`files`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(` `))}return n.join(`
7
- `)}function Sr(e){if(!e||typeof e!=`object`)return typeof e==`string`?e:``;let t=e;if(typeof t.stdout==`string`){let e=typeof t.stderr==`string`?t.stderr:``;return t.stdout+(e?`
8
- `+e:``)}if(t.file&&typeof t.file==`object`&&typeof t.file.content==`string`)return t.file.content;let n=[];for(let e of[`content`,`output`,`result`,`text`,`message`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`filenames`,`lines`,`results`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(`
9
- `))}return n.join(`
10
- `)}var Cr,wr,Tr,Er=t((()=>{rt(),Cr=`</system-reminder>`,wr=new Set([Et,Nt]),Tr=new WeakMap}));function Dr({pose:e=`default`}={}){if(xe.terminal===`Apple_Terminal`)return(0,V.jsx)(Or,{pose:e});let t=kr[e];return(0,V.jsxs)(x,{flexDirection:`column`,children:[(0,V.jsxs)(_,{children:[(0,V.jsx)(_,{color:`clawd_body`,children:t.r1L}),(0,V.jsx)(_,{color:`clawd_body`,backgroundColor:`clawd_background`,children:t.r1E}),(0,V.jsx)(_,{color:`clawd_body`,children:t.r1R})]}),(0,V.jsxs)(_,{children:[(0,V.jsx)(_,{color:`clawd_body`,children:t.r2L}),(0,V.jsx)(_,{color:`clawd_body`,backgroundColor:`clawd_background`,children:`█████`}),(0,V.jsx)(_,{color:`clawd_body`,children:t.r2R})]}),(0,V.jsxs)(_,{color:`clawd_body`,children:[` `,`▘▘ ▝▝`,` `]})]})}function Or({pose:e}){return(0,V.jsxs)(x,{flexDirection:`column`,alignItems:`center`,children:[(0,V.jsxs)(_,{children:[(0,V.jsx)(_,{color:`clawd_body`,children:`▗`}),(0,V.jsx)(_,{color:`clawd_background`,backgroundColor:`clawd_body`,children:Ar[e]}),(0,V.jsx)(_,{color:`clawd_body`,children:`▖`})]}),(0,V.jsx)(_,{backgroundColor:`clawd_body`,children:` `.repeat(7)}),(0,V.jsx)(_,{color:`clawd_body`,children:`▘▘ ▝▝`})]})}var V,kr,Ar,jr=t((()=>{h(),y(),be(),V=C(),kr={default:{r1L:` ▐`,r1E:`▛███▜`,r1R:`▌`,r2L:`▝▜`,r2R:`▛▘`},"look-left":{r1L:` ▐`,r1E:`▟███▟`,r1R:`▌`,r2L:`▝▜`,r2R:`▛▘`},"look-right":{r1L:` ▐`,r1E:`▙███▙`,r1R:`▌`,r2L:`▝▜`,r2R:`▛▘`},"arms-up":{r1L:`▗▟`,r1E:`▛███▜`,r1R:`▙▖`,r2L:` ▜`,r2R:`▛ `}},Ar={default:` ▗ ▖ `,"look-left":` ▘ ▘ `,"look-right":` ▝ ▝ `,"arms-up":` ▗ ▖ `}}));function Mr(e){let{title:t,lines:n,footer:r,emptyMessage:i,customContent:a}=e,o=l(t);if(a!==void 0)o=Math.max(o,a.width);else if(n.length===0&&i)o=Math.max(o,l(i));else{let e=Math.max(0,...n.map(e=>e.timestamp?l(e.timestamp):0));for(let t of n){let n=e>0?e:0,r=l(t.text)+(n>0?n+2:0);o=Math.max(o,r)}}return r&&(o=Math.max(o,l(r))),o}function Nr({config:e,actualWidth:t}){let{title:n,lines:r,footer:i,emptyMessage:a,customContent:o}=e,s=Math.max(0,...r.map(e=>e.timestamp?l(e.timestamp):0));return(0,H.jsxs)(x,{flexDirection:`column`,width:t,children:[(0,H.jsx)(_,{bold:!0,color:`claude`,children:n}),o?(0,H.jsxs)(H.Fragment,{children:[o.content,i&&(0,H.jsx)(_,{dimColor:!0,italic:!0,children:Te(i,t)})]}):r.length===0&&a?(0,H.jsx)(_,{dimColor:!0,children:Te(a,t)}):(0,H.jsxs)(H.Fragment,{children:[r.map((e,n)=>{let r=Math.max(10,t-(s>0?s+2:0));return(0,H.jsxs)(_,{children:[s>0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(_,{dimColor:!0,children:(e.timestamp||``).padEnd(s)}),` `]}),(0,H.jsx)(_,{children:Te(e.text,r)})]},n)}),i&&(0,H.jsx)(_,{dimColor:!0,italic:!0,children:Te(i,t)})]})]})}var H,Pr=t((()=>{h(),y(),je(),H=C()}));function Fr({feeds:e,maxWidth:t}){let n=e.map(e=>Mr(e)),r=Math.max(...n),i=Math.min(r,t);return(0,Lr.jsx)(x,{flexDirection:`column`,children:e.map((t,n)=>(0,Lr.jsxs)(Ir.Fragment,{children:[(0,Lr.jsx)(Nr,{config:t,actualWidth:i}),n<e.length-1&&(0,Lr.jsx)(v,{color:`claude`,width:i})]},n))})}var Ir,Lr,Rr=t((()=>{Ir=n(h(),1),y(),Pr(),Lr=C()}));function zr(e){let t=e.map(e=>{let t=Ee(e.modified);return{text:(e.summary&&e.summary!==`No prompt`?e.summary:e.firstPrompt)||``,timestamp:t}});return{title:`Recent activity`,lines:t,footer:t.length>0?`/resume for more`:void 0,emptyMessage:`No recent activity`}}function Br(e){let t=e.map(e=>{if(process.env.USER_TYPE===`ant`){let t=e.match(/^(\d+\s+\w+\s+ago)\s+(.+)$/);if(t)return{timestamp:t[1],text:t[2]||``}}return{text:e}}),n=process.env.USER_TYPE===`ant`?`Unable to fetch latest claude-cli-internal commits`:`Check the Claude Code changelog for updates`;return{title:process.env.USER_TYPE===`ant`?`What's new [ANT-ONLY: Latest CC commits]`:`What's new`,lines:t,footer:t.length>0?`/release-notes for more`:void 0,emptyMessage:n}}function Vr(e){let t=e.filter(({isEnabled:e})=>e).sort((e,t)=>Number(e.isComplete)-Number(t.isComplete)).map(({text:e,isComplete:t})=>({text:`${t?`${s.tick} `:``}${e}`})),n=ye()===er()?`Note: You have launched claude in your home directory. For the best experience, launch it in a project directory instead.`:void 0;return n&&t.push({text:n}),{title:`Tips for getting started`,lines:t}}function Hr(){let e=_n(),t=e?`Share Claude Code and earn ${yn(e)} of extra usage`:`Share Claude Code with friends`;return{title:`3 guest passes`,lines:[],customContent:{content:(0,Ur.jsxs)(Ur.Fragment,{children:[(0,Ur.jsx)(x,{marginY:1,children:(0,Ur.jsx)(_,{color:`claude`,children:`[✻] [✻] [✻]`})}),(0,Ur.jsx)(_,{dimColor:!0,children:t})]}),width:48},footer:`/passes`}}var Ur,Wr=t((()=>{o(),y(),bn(),ve(),je(),Ur=C()}));function U(e,t,n){return Array.from({length:n},()=>({pose:e,offset:t}))}function Gr(){let{pose:e,bounceOffset:t,onClick:n}=Kr();return(0,Jr.jsx)(x,{height:ei,flexDirection:`column`,onClick:n,children:(0,Jr.jsx)(x,{marginTop:t,flexShrink:0,children:(0,Jr.jsx)(Dr,{pose:e})})})}function Kr(){let[e]=(0,qr.useState)(()=>re().prefersReducedMotion??!1),[t,n]=(0,qr.useState)(-1),r=(0,qr.useRef)(Yr),i=()=>{e||t!==-1||(r.current=Xr[Math.floor(Math.random()*Xr.length)],n(0))};(0,qr.useEffect)(()=>{if(t===-1)return;if(t>=r.current.length){n(-1);return}let e=setTimeout(n,Qr,$r);return()=>clearTimeout(e)},[t]);let a=r.current,o=t>=0&&t<a.length?a[t]:Zr;return{pose:o.pose,bounceOffset:o.offset,onClick:i}}var qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti=t((()=>{h(),qr=n(h(),1),y(),ue(),jr(),Jr=C(),Yr=[...U(`default`,1,2),...U(`arms-up`,0,3),...U(`default`,0,1),...U(`default`,1,2),...U(`arms-up`,0,3),...U(`default`,0,1)],Xr=[Yr,[...U(`look-right`,0,5),...U(`look-left`,0,5),...U(`default`,0,1)]],Zr={pose:`default`,offset:0},Qr=60,$r=e=>e+1,ei=3}));function ni(){let e=vn();e==null||e<=0||e>(P().passesLastSeenRemaining??0)&&j(t=>({...t,passesUpsellSeenCount:0,hasVisitedPasses:!1,passesLastSeenRemaining:e}))}function ri(){let{eligible:e,hasCache:t}=xn();if(!e||!t)return!1;ni();let n=P();return!((n.passesUpsellSeenCount??0)>=3||n.hasVisitedPasses)}function ii(){let[e]=(0,si.useState)(()=>ri());return e}function ai(){let e=0;j(t=>(e=(t.passesUpsellSeenCount??0)+1,{...t,passesUpsellSeenCount:e})),z(`tengu_guest_passes_upsell_shown`,{seen_count:e})}function oi(){let e=_n();return(0,ci.jsxs)(_,{dimColor:!0,children:[(0,ci.jsx)(_,{color:`claude`,children:`[✻]`}),` `,(0,ci.jsx)(_,{color:`claude`,children:`[✻]`}),` `,(0,ci.jsx)(_,{color:`claude`,children:`[✻]`}),` ·`,` `,e?`Share Claude Code and earn ${yn(e)} of extra usage · /passes`:`3 guest passes at /passes`]})}var si,ci,li=t((()=>{h(),si=n(h(),1),y(),_e(),bn(),D(),ci=C()}));function ui(){let{columns:e}=u(),t=ht(e=>e.agent),n=ht(e=>e.effortValue),r=Hn(),i=oe(r),{version:a,cwd:o,billingType:s,agentName:c}=Pn(),d=t??c,f=ii(),p=Yn();(0,di.useEffect)(()=>{f&&ai()},[f]),(0,di.useEffect)(()=>{p&&!f&&Jn()},[p,f]);let m=Math.max(e-15,20),h=Te(a,Math.max(m-13,6)),{shouldSplit:g,truncatedModel:v,truncatedBilling:y}=Fn(i+Ot(r,n),s,m),b=d?m-1-l(d)-3:m,S=An(o,Math.max(b,10));return(0,W.jsx)(Ut,{children:(0,W.jsxs)(x,{flexDirection:`row`,gap:2,alignItems:`center`,children:[Mt()?(0,W.jsx)(Gr,{}):(0,W.jsx)(Dr,{}),(0,W.jsxs)(x,{flexDirection:`column`,children:[(0,W.jsxs)(_,{children:[(0,W.jsx)(_,{bold:!0,children:`Claude Code`}),` `,(0,W.jsxs)(_,{dimColor:!0,children:[`v`,h]})]}),g?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_,{dimColor:!0,children:v}),(0,W.jsx)(_,{dimColor:!0,children:y})]}):(0,W.jsxs)(_,{dimColor:!0,children:[v,` · `,y]}),(0,W.jsx)(_,{dimColor:!0,children:d?`@${d} · ${S}`:S}),f&&(0,W.jsx)(oi,{}),!f&&p&&(0,W.jsx)(Xn,{maxWidth:m,twoLine:!0})]})]})})}var di,W,fi=t((()=>{di=n(h(),1),Un(),nn(),y(),lt(),Pe(),je(),Zt(),Ln(),N(),Le(),ti(),jr(),li(),Kn(),W=C()}));function pi(){let e=(0,hi.useMemo)(mi,[]),t=(0,hi.useMemo)(()=>P().lastShownEmergencyTip,[]),n=e.tip&&e.tip!==t;return(0,hi.useEffect)(()=>{n&&j(t=>t.lastShownEmergencyTip===e.tip?t:{...t,lastShownEmergencyTip:e.tip})},[n,e.tip]),n?(0,gi.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,gi.jsx)(_,{...e.color===`warning`?{color:`warning`}:e.color===`error`?{color:`error`}:{dimColor:!0},children:e.tip})}):null}function mi(){return L(_i,vi)}var hi,gi,_i,vi,yi=t((()=>{h(),hi=n(h(),1),y(),ae(),D(),gi=C(),_i=`tengu-top-of-feed-tip`,vi={tip:``,color:`dim`}}));function bi({char:e=`✻`}){let[t]=(0,xi.useState)(()=>re().prefersReducedMotion??!1),[n,r]=(0,xi.useState)(t),i=(0,xi.useRef)(null),[a,o]=c(n?null:50);return(0,xi.useEffect)(()=>{if(n)return;let e=setTimeout(r,wi,!0);return()=>clearTimeout(e)},[n]),n?(0,Si.jsx)(x,{ref:a,children:(0,Si.jsx)(_,{color:Ti,children:e})}):(i.current===null&&(i.current=o),(0,Si.jsx)(x,{ref:a,children:(0,Si.jsx)(_,{color:Ve(at((o-i.current)/Ci*360%360)),children:e})}))}var xi,Si,Ci,wi,Ti,Ei=t((()=>{h(),xi=n(h(),1),O(),y(),ue(),xt(),Si=C(),Ci=1500,wi=Ci*2,Ti=Ve({r:153,g:153,b:153})}));function Di(){return A()&&(P().opus1mMergeNoticeSeenCount??0)<ji}function Oi(){let[e]=(0,ki.useState)(Di);return(0,ki.useEffect)(()=>{if(!e)return;let t=(P().opus1mMergeNoticeSeenCount??0)+1;j(e=>(e.opus1mMergeNoticeSeenCount??0)>=t?e:{...e,opus1mMergeNoticeSeenCount:t})},[e]),e?(0,Ai.jsxs)(x,{paddingLeft:2,children:[(0,Ai.jsx)(bi,{char:`↑`}),(0,Ai.jsx)(_,{dimColor:!0,children:` Opus now defaults to 1M context · 5x more room, same pricing`})]}):null}var ki,Ai,ji,Mi=t((()=>{h(),ki=n(h(),1),O(),y(),D(),N(),Ei(),Ai=C(),ji=6}));function Ni(){return(0,Ii.jsx)(Pi,{})}function Pi(){let[e]=(0,Fi.useState)(()=>wn()&&re().voiceEnabled!==!0&&(P().voiceNoticeSeenCount??0)<Li&&!Di());return(0,Fi.useEffect)(()=>{if(!e)return;let t=(P().voiceNoticeSeenCount??0)+1;j(e=>(e.voiceNoticeSeenCount??0)>=t?e:{...e,voiceNoticeSeenCount:t})},[e]),e?(0,Ii.jsxs)(x,{paddingLeft:2,children:[(0,Ii.jsx)(bi,{}),(0,Ii.jsx)(_,{dimColor:!0,children:` Voice mode is now available · /voice to enable`})]}):null}var Fi,Ii,Li,Ri=t((()=>{h(),Fi=n(h(),1),y(),D(),ue(),Tn(),Ei(),Mi(),Ii=C(),Li=3}));function zi(){return null}var Bi=t((()=>{}));function Vi(){return null}var Hi=t((()=>{})),Ui=r({ChannelsNotice:()=>Wi,findUnmatched:()=>Ki});function Wi(){let[{channels:e,list:t,unmatched:n}]=(0,qi.useState)(()=>{let e=E();return e.length===0?{channels:e,list:``,unmatched:[]}:{channels:e,list:e.map(Gi).join(`, `),unmatched:Ki(e)}});if(e.length===0)return null;let r=e.some(e=>!e.dev),i=w()&&r?`Channels`:w()?`--dangerously-load-development-channels`:`--channels`;return(0,Ji.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,Ji.jsxs)(_,{color:`error`,children:[`Listening for channel messages from: `,t]}),(0,Ji.jsxs)(_,{dimColor:!0,children:[`Experimental · inbound messages will be pushed into this session, this carries prompt injection risks. Restart Claude Code without `,i,` to disable.`]}),n.map(e=>(0,Ji.jsxs)(_,{color:`warning`,children:[Gi(e.entry),` · `,e.why]},`${Gi(e.entry)}:${e.why}`))]})}function Gi(e){return e.kind===`plugin`?`plugin:${e.name}@${e.marketplace}`:`server:${e.name}`}function Ki(e,t){let n=t?.configuredServerNames??(()=>{let e=[`enterprise`,`user`,`project`,`local`],t=new Set;for(let n of e)for(let e of Object.keys(Kt(n).servers))t.add(e);return t})(),r=t?.installedPluginIds??(()=>{let e=new Set(Object.keys(st().plugins)),t=on();for(let n of[...t.enabled,...t.disabled])e.add(n.source);return e})(),i=[];for(let t of e){if(t.kind===`server`){n.has(t.name)||i.push({entry:t,why:`no MCP server configured with that name`});continue}r.has(`${t.name}@${t.marketplace}`)||i.push({entry:t,why:`plugin not installed`})}return i}var qi,Ji,Yi=t((()=>{h(),qi=n(h(),1),T(),sn(),y(),Lt(),Je(),Ji=C()}));function Xi(){let e=kn(),t=P().oauthAccount?.displayName??``,{columns:n}=u(),r=hn(),i=Qt.isSandboxingEnabled(),o=ii(),s=Yn(),c=ht(e=>e.agent),d=ht(e=>e.effortValue),f=P(),p;try{p=Mn(3)}catch{p=[]}let[m]=(0,Zi.useState)(()=>{let e=re().companyAnnouncements;if(!(!e||e.length===0))return f.numStartups===1?e[0]:e[Math.floor(Math.random()*e.length)]}),{hasReleaseNotes:h}=Dn(f.lastReleaseNotesSeen);(0,Zi.useEffect)(()=>{P().lastReleaseNotesSeen!==`2.6.6`&&(j(e=>e.lastReleaseNotesSeen===`2.6.6`?e:{...e,lastReleaseNotesSeen:`2.6.6`}),r&&mn())},[f,r]);let g=!h&&!r&&!a(process.env.CLAUDE_CODE_FORCE_FULL_LOGO);(0,Zi.useEffect)(()=>{o&&!r&&!g&&ai()},[o,r,g]),(0,Zi.useEffect)(()=>{s&&!r&&!o&&!g&&Jn()},[s,r,o,g]);let v=Hn(),y=oe(v),{version:S,cwd:C,billingType:w,agentName:ee}=Pn(),T=c??ee,E=Te(y+Ot(v,d),$i-20);if(!h&&!r&&!a(process.env.CLAUDE_CODE_FORCE_FULL_LOGO))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ui,{}),(0,G.jsx)(Ni,{}),(0,G.jsx)(Oi,{}),Qi&&(0,G.jsx)(Qi.ChannelsNotice,{}),pe()&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(_,{dimColor:!0,children:[`Logging to: `,he()?`stderr`:me()]})]}),(0,G.jsx)(pi,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(_,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(_,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Claude uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),m&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&f.oauthAccount?.organizationName&&(0,G.jsxs)(_,{dimColor:!0,children:[`Message from `,f.oauthAccount.organizationName,`:`]}),(0,G.jsx)(_,{children:m})]}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(_,{dimColor:!0,children:`Use /issue to report model behavior issues`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`[ANT-ONLY] Logs:`}),(0,G.jsxs)(_,{dimColor:!0,children:[`API calls: `,F(Ge())]}),(0,G.jsxs)(_,{dimColor:!0,children:[`Debug logs: `,F(me())]}),ke()&&(0,G.jsxs)(_,{dimColor:!0,children:[`Startup Perf: `,F(Ae())]})]}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Vi,{})]});let D=On(n),O=Rn(P().theme),te=` ${b(`claude`,O)(`Claude Code`)} ${b(`inactive`,O)(`v${S}`)} `,ne=b(`claude`,O)(` Claude Code `);if(D===`compact`){let e=jn(t);l(e)>n-4&&(e=jn(null));let r=T?n-4-1-l(T)-3:n-4,a=An(C,Math.max(r,10));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ut,{children:(0,G.jsxs)(x,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:ne,position:`top`,align:`start`,offset:1},paddingX:1,paddingY:1,alignItems:`center`,width:n,children:[(0,G.jsx)(_,{bold:!0,children:e}),(0,G.jsx)(x,{marginY:1,children:(0,G.jsx)(Dr,{})}),(0,G.jsx)(_,{dimColor:!0,children:E}),(0,G.jsx)(_,{dimColor:!0,children:w}),(0,G.jsx)(_,{dimColor:!0,children:T?`@${T} · ${a}`:a})]})}),(0,G.jsx)(Ni,{}),(0,G.jsx)(Oi,{}),Qi&&(0,G.jsx)(Qi.ChannelsNotice,{}),i&&(0,G.jsx)(x,{marginTop:1,flexDirection:`column`,children:(0,G.jsx)(_,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Vi,{})]})}let k=jn(t),ie=!process.env.IS_DEMO&&f.oauthAccount?.organizationName?`${E} · ${w} · ${f.oauthAccount.organizationName}`:`${E} · ${w}`,A=T?$i-1-l(T)-3:$i,M=An(C,Math.max(A,10)),N=T?`@${T} · ${M}`:M,{leftWidth:ae,rightWidth:I}=In(n,D,Nn(k,N,ie));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ut,{children:(0,G.jsx)(x,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:te,position:`top`,align:`start`,offset:3},children:(0,G.jsxs)(x,{flexDirection:D===`horizontal`?`row`:`column`,paddingX:1,gap:1,children:[(0,G.jsxs)(x,{flexDirection:`column`,width:ae,justifyContent:`space-between`,alignItems:`center`,minHeight:9,children:[(0,G.jsx)(x,{marginTop:1,children:(0,G.jsx)(_,{bold:!0,children:k})}),(0,G.jsx)(Dr,{}),(0,G.jsxs)(x,{flexDirection:`column`,alignItems:`center`,children:[(0,G.jsx)(_,{dimColor:!0,children:ie}),(0,G.jsx)(_,{dimColor:!0,children:N})]})]}),D===`horizontal`&&(0,G.jsx)(x,{height:`100%`,borderStyle:`single`,borderColor:`claude`,borderDimColor:!0,borderTop:!1,borderBottom:!1,borderLeft:!1}),D===`horizontal`&&(0,G.jsx)(Fr,{feeds:r?[Vr(pn()),zr(e)]:o?[zr(e),Hr()]:s?[zr(e),qn()]:[zr(e),Br(p)],maxWidth:I})]})})}),(0,G.jsx)(Ni,{}),(0,G.jsx)(Oi,{}),Qi&&(0,G.jsx)(Qi.ChannelsNotice,{}),pe()&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(_,{dimColor:!0,children:[`Logging to: `,he()?`stderr`:me()]})]}),(0,G.jsx)(pi,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(_,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(_,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Claude uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),m&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&f.oauthAccount?.organizationName&&(0,G.jsxs)(_,{dimColor:!0,children:[`Message from `,f.oauthAccount.organizationName,`:`]}),(0,G.jsx)(_,{children:m})]}),i&&(0,G.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(_,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsx)(x,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(_,{dimColor:!0,children:`Use /issue to report model behavior issues`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsxs)(x,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(_,{color:`warning`,children:`[ANT-ONLY] Logs:`}),(0,G.jsxs)(_,{dimColor:!0,children:[`API calls: `,F(Ge())]}),(0,G.jsxs)(_,{dimColor:!0,children:[`Debug logs: `,F(me())]}),ke()&&(0,G.jsxs)(_,{dimColor:!0,children:[`Startup Perf: `,F(Ae())]})]}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Vi,{})]})}var Zi,G,Qi,$i,ea=t((()=>{h(),y(),nn(),Ln(),je(),se(),jr(),Rr(),Wr(),D(),zn(),ue(),ge(),Zi=n(h(),1),gn(),fi(),Le(),En(),ft(),i(),Oe(),yi(),Ri(),Mi(),Bi(),Hi(),G=C(),Yt(),li(),Kn(),lt(),Pe(),Un(),N(),Qi=(Yi(),e(Ui)),$i=50}));function ta({message:e,isTranscriptMode:t}){let n=e.message?.content,r=Array.isArray(n)?n:[];if(!(t&&e.type===`assistant`&&e.message?.model&&r.some(e=>e?.type===`text`)))return null;let i=e.message.model;return(0,na.jsx)(x,{minWidth:l(i)+8,children:(0,na.jsx)(_,{dimColor:!0,children:i})})}var na,ra=t((()=>{h(),y(),na=C()}));function ia({message:e,isTranscriptMode:t}){if(!(t&&e.timestamp&&e.type===`assistant`&&Array.isArray(e.message.content)&&e.message.content.some(e=>e.type===`text`)))return null;let n=new Date(e.timestamp).toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,hour12:!0});return(0,aa.jsx)(x,{minWidth:l(n),children:(0,aa.jsx)(_,{dimColor:!0,children:n})})}var aa,oa=t((()=>{h(),y(),aa=C()}));function sa(e,t,n,r){for(let i=t+1;i<e.length;i++){let t=e[i];if(t?.type===`assistant`){let e=ma(t.message.content);if(e?.type===`thinking`||e?.type===`redacted_thinking`||e?.type===`tool_use`&&(_t(e.name,e.input,n).isCollapsible||r.has(e.id)))continue;return!0}if(!(t?.type===`system`||t?.type===`attachment`)&&!(t?.type===`user`&&ma(t.message.content)?.type===`tool_result`)){if(t?.type===`grouped_tool_use`){let e=ma(t.messages[0]?.message.content)?.input;if(_t(t.toolName,e,n).isCollapsible)continue}return!0}}return!1}function ca({message:e,isUserContinuation:t,hasContentAfter:n,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,streamingToolUseIDs:s,screen:c,canAnimate:l,onOpenRateLimitOptions:u,lastThinkingBlockId:d,latestBashOutputUUID:f,columns:p,isLoading:m,lookups:h,shouldCollapseDiffs:g}){let _=c===`transcript`,v=e.type===`grouped_tool_use`,y=e.type===`collapsed_read_search`,b=y&&(Qe(e,o)||m&&!n),S=v?e.displayMessage:y?dt(e):e,C=v||y?[]:Wt(e,h),w=Mo(e,s,o,v||y?kt:Re(e,h),c,h),ee=!1;if(l)if(v)ee=e.messages.some(e=>{let t=ma(e.message.content);return t?.type===`tool_use`&&o.has(t.id)});else if(y)ee=Qe(e,o);else{let t=Ht(e);ee=!t||o.has(t)}let T=_&&S.type===`assistant`&&Array.isArray(S.message.content)&&S.message.content.some(e=>e.type===`text`)&&(S.timestamp||S.message.model),E=(0,pa.jsx)(qe,{message:e,lookups:h,addMargin:!T,containerWidth:T?void 0:p,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,progressMessagesForMessage:C,shouldAnimate:ee,shouldShowDot:!0,isTranscriptMode:_,isStatic:w,onOpenRateLimitOptions:u,isActiveCollapsedGroup:b,isUserContinuation:t,lastThinkingBlockId:d,latestBashOutputUUID:f,shouldCollapseDiffs:g});return T?(0,pa.jsx)(Ut,{children:(0,pa.jsxs)(x,{width:p,flexDirection:`column`,children:[(0,pa.jsxs)(x,{flexDirection:`row`,justifyContent:`flex-end`,gap:1,marginTop:1,children:[(0,pa.jsx)(ia,{message:S,isTranscriptMode:_}),(0,pa.jsx)(ta,{message:S,isTranscriptMode:_})]}),E]})}):(0,pa.jsx)(Ut,{children:E})}function la(e,t){if(e.type===`grouped_tool_use`)return e.messages.some(e=>{let n=ma(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return Ye(e).some(e=>t.has(e));let n=Ht(e);return!!n&&t.has(n)}function ua(e,t){if(e.type===`grouped_tool_use`)return e.messages.every(e=>{let n=ma(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return Ye(e).every(e=>t.has(e));if(e.type===`assistant`){let n=ma(e.message.content);if(n?.type===`server_tool_use`)return t.has(n.id)}let n=Ht(e);return!n||t.has(n)}function da(e,t){if(e.message!==t.message||e.screen!==t.screen||e.verbose!==t.verbose||e.message.type===`collapsed_read_search`&&t.screen!==`transcript`||e.columns!==t.columns||e.latestBashOutputUUID===e.message.uuid!=(t.latestBashOutputUUID===t.message.uuid)||e.lastThinkingBlockId!==t.lastThinkingBlockId&&Ke(t.message))return!1;let n=la(e.message,e.streamingToolUseIDs),r=ua(e.message,e.lookups.resolvedToolUseIDs);return!(n||!r)}var fa,pa,ma,ha,ga=t((()=>{fa=n(h(),1),y(),it(),rt(),pt(),pa=C(),ra(),Uo(),oa(),Le(),ma=e=>{if(!Array.isArray(e))return;let t=e[0];if(!(t==null||typeof t==`string`))return t},ha=fa.memo(ca,da)}));function _a(e){return e.type===`attachment`&&va.has(e.attachment.type)}var va,ya=t((()=>{va=new Set(`hook_success.hook_additional_context.hook_cancelled.command_permissions.agent_mention.budget_usd.critical_system_reminder.edited_image_file.edited_text_file.opened_file_in_ide.output_style.plan_mode.plan_mode_exit.plan_mode_reentry.structured_output.team_context.todo_reminder.context_efficiency.deferred_tools_delta.mcp_instructions_delta.companion_intro.token_usage.ultrathink_effort.max_turns_reached.task_reminder.auto_mode.auto_mode_exit.output_token_usage.verify_plan_reminder.current_session_memory.compaction_reminder.date_change`.split(`.`))}));function ba(e){return Da.filter(t=>t.isActive(e))}var K,xa,Sa,Ca,wa,Ta,Ea,Da,Oa=t((()=>{y(),h(),He(),o(),ve(),je(),le(),Qn(),Rt(),Jt(),K=C(),xa={id:`large-memory-files`,type:`warning`,isActive:e=>It(e.memoryFiles).length>0,render:e=>(0,K.jsx)(K.Fragment,{children:It(e.memoryFiles).map(e=>{let t=e.path.startsWith(ye())?tr(ye(),e.path):e.path;return(0,K.jsxs)(x,{flexDirection:`row`,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Large `,(0,K.jsx)(_,{bold:!0,children:t}),` will impact performance (`,De(e.content.length),` chars > `,De(Ft),`)`,(0,K.jsx)(_,{dimColor:!0,children:` · /memory to edit`})]})]},e.path)})})},Sa={id:`claude-ai-external-token`,type:`warning`,isActive:()=>{let e=fe();return I()&&(e.source===`ANTHROPIC_AUTH_TOKEN`||e.source===`apiKeyHelper`)},render:()=>{let e=fe();return(0,K.jsxs)(x,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Auth conflict: Using `,e.source,` instead of Claude account subscription token. Either unset`,` `,e.source,", or run `claude /logout`."]})]})}},Ca={id:`api-key-conflict`,type:`warning`,isActive:()=>{let{source:e}=k({skipRetrievingKeyFromApiKeyHelper:!0});return!!te()&&(e===`ANTHROPIC_API_KEY`||e===`apiKeyHelper`)},render:()=>{let{source:e}=k({skipRetrievingKeyFromApiKeyHelper:!0});return(0,K.jsxs)(x,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Auth conflict: Using `,e,` instead of Anthropic Console key. Either unset `,e,", or run `claude /logout`."]})]})}},wa={id:`both-auth-methods`,type:`warning`,isActive:()=>{let{source:e}=k({skipRetrievingKeyFromApiKeyHelper:!0}),t=fe();return e!==`none`&&t.source!==`none`&&!(e===`apiKeyHelper`&&t.source===`apiKeyHelper`)},render:()=>{let{source:e}=k({skipRetrievingKeyFromApiKeyHelper:!0}),t=fe();return(0,K.jsxs)(x,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(x,{flexDirection:`row`,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Auth conflict: Both a token (`,t.source,`) and an API key (`,e,`) are set. This may lead to unexpected behavior.`]})]}),(0,K.jsxs)(x,{flexDirection:`column`,marginLeft:3,children:[(0,K.jsxs)(_,{color:`warning`,children:[`· Trying to use `,t.source===`claude.ai`?`claude.ai`:t.source,`?`,` `,e===`ANTHROPIC_API_KEY`?`Unset the ANTHROPIC_API_KEY environment variable, or claude /logout then say "No" to the API key approval before login.`:e===`apiKeyHelper`?`Unset the apiKeyHelper setting.`:`claude /logout`]}),(0,K.jsxs)(_,{color:`warning`,children:[`· Trying to use `,e,`?`,` `,t.source===`claude.ai`?`claude /logout to sign out of claude.ai.`:`Unset the ${t.source} environment variable.`]})]})]})}},Ta={id:`large-agent-descriptions`,type:`warning`,isActive:e=>Zn(e.agentDefinitions)>$n,render:e=>{let t=Zn(e.agentDefinitions);return(0,K.jsxs)(x,{flexDirection:`row`,children:[(0,K.jsx)(_,{color:`warning`,children:s.warning}),(0,K.jsxs)(_,{color:`warning`,children:[`Large cumulative agent descriptions will impact performance (~`,De(t),` tokens > `,De($n),`)`,(0,K.jsx)(_,{dimColor:!0,children:` · /agents to manage`})]})]})}},Ea={id:`jetbrains-plugin-install`,type:`info`,isActive:e=>{if(!Vt()||!(e.config.autoInstallIdeExtension??!0))return!1;let t=vt();return t!==null&&!zt(t)},render:()=>{let e=qt(vt());return(0,K.jsxs)(x,{flexDirection:`row`,gap:1,marginLeft:1,children:[(0,K.jsx)(_,{color:`ide`,children:s.arrowUp}),(0,K.jsxs)(_,{children:[`Install the `,(0,K.jsx)(_,{color:`ide`,children:e}),` plugin from the JetBrains Marketplace:`,` `,(0,K.jsx)(_,{bold:!0,children:`https://docs.claude.com/s/claude-code-jetbrains`})]})]})}},Da=[xa,Ta,Sa,Ca,wa,Ea]}));function ka({agentDefinitions:e}={}){let t={config:P(),agentDefinitions:e,memoryFiles:(0,ja.use)(en())},n=ba(t);return n.length===0?null:(0,Ma.jsx)(x,{flexDirection:`column`,paddingLeft:1,children:n.map(e=>(0,Ma.jsx)(Aa.Fragment,{children:e.render(t)},e.id))})}var Aa,ja,Ma,Na=t((()=>{Aa=n(h(),1),ja=n(h(),1),y(),He(),D(),Oa(),Ma=C()}));function Pa(e,t,n){let r=(0,q.useRef)(new Map),i=(0,q.useRef)(0),a=(0,q.useRef)(0),o=(0,q.useRef)({arr:new Float64Array,version:-1,n:-1}),s=(0,q.useRef)(new Map),c=(0,q.useRef)(new Map),l=(0,q.useRef)(n),u=(0,q.useRef)(!1),d=(0,q.useRef)(null),f=(0,q.useRef)(0);if(l.current!==n){let e=l.current/n;l.current=n;for(let[t,n]of r.current)r.current.set(t,Math.max(1,Math.round(n*e)));i.current++,u.current=!0,f.current=2}let p=f.current>0?d.current:null,m=(0,q.useRef)(0),h=(0,q.useRef)(null);(0,q.useSyncExternalStore)((0,q.useCallback)(t=>e.current?.subscribe(t)??Ha,[e]),()=>{let t=e.current;if(!t)return NaN;let n=t.getScrollTop()+t.getPendingDelta(),r=Math.floor(n/Ra);return t.isSticky()?~r:r});let g=e.current?.getScrollTop()??-1,_=e.current?.getPendingDelta()??0,v=e.current?.getViewportHeight()??0,y=e.current?.isSticky()??!0;(0,q.useMemo)(()=>{let e=new Set(t),n=!1;for(let t of r.current.keys())e.has(t)||(r.current.delete(t),n=!0);for(let t of c.current.keys())e.has(t)||c.current.delete(t);n&&i.current++},[t]);let b=t.length;if(o.current.version!==i.current||o.current.n!==b){let e=o.current.arr.length>=b+1?o.current.arr:new Float64Array(b+1);e[0]=0;for(let n=0;n<b;n++)e[n+1]=e[n]+(r.current.get(t[n])??Fa);o.current={arr:e,version:i.current,n:b}}let x=o.current.arr,S=x[b],C,w;if(p)[C,w]=p,C=Math.min(C,b),w=Math.min(w,b);else if(v===0||g<0)C=Math.max(0,b-La),w=b;else{if(y){let e=v+Ia;for(C=b;C>0&&S-x[C-1]<e;)C--;w=b}else{let e=m.current,n=v*3,i=Math.min(g,g+_),a=Math.max(g,g+_),o=a-i,c=o>n&&_<0?a-n:i,l=c+Math.min(o,n),u=Math.max(0,c-e),f=l-e,p=u-Ia;{let e=0,t=b;for(;e<t;){let n=e+t>>1;x[n+1]<=p?e=n+1:t=n}C=e}{let e=d.current;if(e&&e[0]<C)for(let n=e[0];n<Math.min(C,e[1]);n++){let e=t[n];if(s.current.has(e)&&!r.current.has(e)){C=n;break}}}let h=v+2*Ia,y=Math.min(b,C+Ba),S=0;for(w=C;w<y&&(S<h||x[w]<f+v+Ia);)S+=r.current.get(t[w])??za,w++}let e=v+2*Ia,n=Math.max(0,w-Ba),i=0;for(let e=C;e<w;e++)i+=r.current.get(t[e])??za;for(;C>n&&i<e;)C--,i+=r.current.get(t[C])??za;let o=d.current,c=Math.abs(g-a.current)+Math.abs(_);if(o&&c>v*2){let[e,t]=o;C<e-Va&&(C=e-Va),w>t+Va&&(w=t+Va),C>w&&(w=Math.min(C+Va,b))}a.current=g}f.current>0?f.current--:d.current=[C,w];let ee=(0,q.useDeferredValue)(C),T=(0,q.useDeferredValue)(w),E=C<ee?ee:C,D=w>T?T:w;if((E>D||y)&&(E=C,D=w),_>0&&(D=w),D-E>Ba){let e=(x[E]+x[D])/2;g-m.current<e?D=E+Ba:E=D-Ba}let O=m.current,te=x[E],ne=E===0?0:te+O,k=D===b?1/0:Math.max(te,x[D]-v)+O;(0,q.useLayoutEffect)(()=>{y?e.current?.setClampBounds(void 0,void 0):e.current?.setClampBounds(ne,k)}),(0,q.useLayoutEffect)(()=>{let e=h.current?.yogaNode;if(e&&e.getComputedWidth()>0&&(m.current=e.getComputedTop()),u.current){u.current=!1;return}let t=!1;for(let[e,n]of s.current){let i=n.yogaNode;if(!i)continue;let a=i.getComputedHeight(),o=r.current.get(e);a>0?o!==a&&(r.current.set(e,a),t=!0):i.getComputedWidth()>0&&o!==0&&(r.current.set(e,0),t=!0)}t&&i.current++});let re=(0,q.useCallback)(e=>{let t=c.current.get(e);return t||(t=t=>{if(t)s.current.set(e,t);else{let t=s.current.get(e)?.yogaNode;if(t&&!u.current){let n=t.getComputedHeight();(n>0||t.getComputedWidth()>0)&&r.current.get(e)!==n&&(r.current.set(e,n),i.current++)}s.current.delete(e)}},c.current.set(e,t)),t},[]),ie=(0,q.useCallback)(e=>{let n=s.current.get(t[e])?.yogaNode;return!n||n.getComputedWidth()===0?-1:n.getComputedTop()},[t]),A=(0,q.useCallback)(e=>s.current.get(t[e])??null,[t]),j=(0,q.useCallback)(e=>r.current.get(t[e]),[t]),M=(0,q.useCallback)(t=>{let n=o.current;t<0||t>=n.n||e.current?.scrollTo(n.arr[t]+m.current)},[e]),N=S-x[D];return{range:[E,D],topSpacer:te,bottomSpacer:N,measureRef:re,spacerRef:h,offsets:x,getItemTop:ie,getItemElement:A,getItemHeight:j,scrollToIndex:M}}var q,Fa,Ia,La,Ra,za,Ba,Va,Ha,Ua=t((()=>{q=n(h(),1),Fa=3,Ia=40,La=30,Ra=Ia>>1,za=1,Ba=200,Va=25,Ha=()=>{}}));function Wa({children:e}){let[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(null);return(0,Ya.jsx)(Za.Provider,{value:n,children:(0,Ya.jsx)($a.Provider,{value:i,children:(0,Ya.jsx)(Xa.Provider,{value:t,children:(0,Ya.jsx)(Qa.Provider,{value:r,children:e})})})})}function Ga(){return(0,J.useContext)(Xa)}function Ka(){return(0,J.useContext)(Qa)}function qa(e){let t=(0,J.useContext)(Za);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}function Ja(e){let t=(0,J.useContext)($a);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}var J,Ya,Xa,Za,Qa,$a,eo=t((()=>{J=n(h(),1),Ya=C(),Xa=(0,J.createContext)(null),Za=(0,J.createContext)(null),Qa=(0,J.createContext)(null),$a=(0,J.createContext)(null)}));function to(e){let[t,n]=(0,Y.useState)(null),r=(0,Y.useRef)(e);r.current=e;let i=(0,Y.useRef)(null),a=(0,Y.useCallback)(()=>{n(null)},[]),o=(0,Y.useCallback)(e=>{let t=Math.max(0,e.getScrollHeight()-e.getViewportHeight());e.getScrollTop()+e.getPendingDelta()>=t||i.current===null&&(i.current=e.getScrollHeight(),n(r.current))},[]),s=(0,Y.useCallback)(e=>{e&&e.scrollToBottom()},[]);return(0,Y.useEffect)(()=>{t===null?i.current=null:e<t&&(i.current=null,n(null))},[e,t]),{dividerIndex:t,dividerYRef:i,onScrollAway:o,onRepin:a,jumpToNew:s,shiftDivider:(0,Y.useCallback)((e,t)=>{n(t=>t===null?null:t+e),i.current!==null&&(i.current+=t)},[])}}function no(e,t){let n=0,r=!1;for(let i=t;i<e.length;i++){let t=e[i];if(t.type===`progress`||t.type===`assistant`&&!ro(t))continue;let a=t.type===`assistant`;a&&!r&&n++,r=a}return n}function ro(e){if(e.type!==`assistant`||!Array.isArray(e.message.content))return!1;for(let t of e.message.content)if(typeof t!=`string`&&t.type===`text`&&t.text.trim()!==``)return!0;return!1}function io(e,t){if(t===null)return;let n=t;for(;n<e.length&&(e[n]?.type===`progress`||_a(e[n]));)n++;let r=e[n]?.uuid;if(!r)return;let i=no(e,t);return{firstUnseenUuid:r,count:Math.max(1,i)}}function ao({scrollable:e,bottom:t,overlay:n,bottomFloat:r,modal:i,modalScrollRef:a,scrollRef:o,dividerYRef:s,hidePill:c=!1,hideSticky:l=!1,newMessageCount:d=0,onPillClick:f}){let{rows:p,columns:h}=u(),[v,y]=(0,Y.useState)(null),b=(0,Y.useMemo)(()=>({setStickyPrompt:y}),[]),S=(0,Y.useSyncExternalStore)((0,Y.useCallback)(e=>o?.current?.subscribe(e)??(()=>{}),[o]),()=>{let e=o?.current,t=s?.current;return!e||t==null?!1:e.getScrollTop()+e.getPendingDelta()+e.getViewportHeight()<t});if((0,Y.useLayoutEffect)(()=>{if(!Mt())return;let e=m.get(process.stdout);if(e)return e.onHyperlinkClick=e=>{if(e.startsWith(`file:`))try{dn(nr(e))}catch{}else un(e)},()=>{e.onHyperlinkClick=void 0}},[]),Mt()){let s=l?null:v,u=s!=null&&s!==`clicked`&&n==null?s:null,m=s!=null&&n==null;return(0,X.jsxs)(Wa,{children:[(0,X.jsx)(x,{flexDirection:`row`,flexGrow:1,overflow:`hidden`,width:`100%`,children:(0,X.jsxs)(x,{flexDirection:`column`,flexGrow:1,width:h,overflow:`hidden`,children:[(0,X.jsxs)(x,{flexGrow:1,flexDirection:`column`,overflow:`hidden`,children:[u&&(0,X.jsx)(so,{text:u.text,onClick:u.scrollTo}),(0,X.jsxs)(g,{ref:o,flexGrow:1,flexDirection:`column`,paddingTop:+!m,stickyScroll:!0,children:[(0,X.jsx)(fo,{value:b,children:e}),n]}),!c&&S&&n==null&&(0,X.jsx)(oo,{count:d,onClick:f}),r!=null&&(0,X.jsx)(x,{position:`absolute`,bottom:0,right:0,opaque:!0,children:r})]}),(0,X.jsxs)(x,{flexDirection:`column`,flexShrink:0,width:`100%`,maxHeight:`50%`,children:[(0,X.jsx)(co,{}),(0,X.jsx)(lo,{}),(0,X.jsx)(x,{flexDirection:`column`,width:`100%`,flexGrow:1,overflowY:`hidden`,children:t})]})]})}),i!=null&&(0,X.jsx)(Gn,{value:{rows:p-uo-1,columns:h-4,scrollRef:a??null},children:(0,X.jsxs)(x,{position:`absolute`,bottom:0,left:0,right:0,maxHeight:p-uo,flexDirection:`column`,overflow:`hidden`,opaque:!0,children:[(0,X.jsx)(x,{flexShrink:0,children:(0,X.jsx)(_,{color:`permission`,children:`▔`.repeat(h)})}),(0,X.jsx)(x,{flexDirection:`column`,paddingX:2,flexShrink:0,overflow:`hidden`,children:i})]})})]})}return(0,X.jsxs)(X.Fragment,{children:[e,t,n,i]})}function oo({count:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(x,{position:`absolute`,bottom:0,left:0,right:0,justifyContent:`center`,children:(0,X.jsx)(x,{onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(_,{backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,dimColor:!0,children:[` `,e>0?`${e} new ${M(e,`message`)}`:`Jump to bottom`,` `,s.arrowDown,` `]})})})}function so({text:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(x,{flexShrink:0,width:`100%`,height:1,paddingRight:1,backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(_,{color:`subtle`,wrap:`truncate-end`,children:[s.pointer,` `,e]})})}function co(){let e=Ga();return!e||e.suggestions.length===0?null:(0,X.jsx)(x,{position:`absolute`,bottom:`100%`,left:0,right:0,paddingX:2,paddingTop:1,flexDirection:`column`,opaque:!0,children:(0,X.jsx)(Bn,{suggestions:e.suggestions,selectedSuggestion:e.selectedSuggestion,maxColumnWidth:e.maxColumnWidth,overlay:!0})})}function lo(){let e=Ka();return e?(0,X.jsx)(x,{position:`absolute`,bottom:`100%`,left:0,right:0,opaque:!0,children:e}):null}var Y,X,uo,fo,po=t((()=>{o(),Y=n(h(),1),Wn(),eo(),nn(),y(),fn(),Zt(),ce(),ya(),Vn(),X=C(),uo=2,fo=(0,Y.createContext)({setStickyPrompt:()=>{}})}));function mo(e){let t=So.get(e);if(t!==void 0)return t;let n=yr(e);return So.set(e,n),n}function ho(e){let t=wo.get(e);if(t!==void 0)return t;let n=go(e);return wo.set(e,n),n}function go(e){let t=null;if(e.type===`user`){if(e.isMeta||e.isVisibleInTranscriptOnly)return null;let n=e.message.content[0];if(n?.type!==`text`)return null;t=n.text??null}else if(e.type===`attachment`&&e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text??``]:[]).join(`
11
- `)}if(t===null)return null;let n=jt(t);return n.startsWith(`<`)||n===``?null:n}function _o({itemKey:e,msg:t,idx:n,measureRef:r,expanded:i,hovered:a,clickable:o,onClickK:s,onEnterK:c,onLeaveK:l,renderItem:u}){return(0,bo.jsx)(x,{ref:r(e),flexDirection:`column`,backgroundColor:i?`userMessageBackgroundHover`:void 0,paddingBottom:i?1:void 0,onClick:o?e=>s(t,e.cellIsBlank):void 0,onMouseEnter:o?()=>c(e):void 0,onMouseLeave:o?()=>l(e):void 0,children:(0,bo.jsx)(S.Provider,{value:a&&!i?`text`:void 0,children:u(t,n)})})}function vo({messages:e,scrollRef:t,columns:n,itemKey:r,renderItem:i,onItemClick:a,isItemClickable:o,isItemExpanded:s,extractSearchText:c=mo,trackStickyPrompt:l,selectedIndex:u,cursorNavRef:d,setCursor:f,jumpRef:p,onSearchMatchesChange:m,scanElement:h,setPositions:g}){let _=(0,Z.useRef)([]),v=(0,Z.useRef)(e),y=(0,Z.useRef)(r);if(y.current!==r||e.length<_.current.length||e[0]!==v.current[0])_.current=e.map(e=>r(e));else for(let t=_.current.length;t<e.length;t++)_.current.push(r(e[t]));v.current=e,y.current=r;let b=_.current,{range:S,topSpacer:C,bottomSpacer:w,measureRef:ee,spacerRef:T,offsets:E,getItemTop:D,getItemElement:O,getItemHeight:te,scrollToIndex:ne}=Pa(t,b,n),[k,re]=S,ie=(0,Z.useCallback)(t=>te(t)===0?!1:et(e[t]),[te,e]);(0,Z.useImperativeHandle)(d,()=>{let n=e=>f?.({uuid:e.uuid,msgType:e.type,expanded:!1,toolName:Dt(e)?.name}),r=u??-1,i=(t,r,i=ie)=>{for(let a=t;a>=0&&a<e.length;a+=r)if(i(a))return n(e[a]),!0;return!1},a=t=>ie(t)&&e[t].type===`user`;return{enterCursor:()=>i(e.length-1,-1,a),navigatePrev:()=>i(r-1,-1),navigateNext:()=>{i(r+1,1)||(t.current?.scrollToBottom(),f?.(null))},navigatePrevUser:()=>i(r-1,-1,a),navigateNextUser:()=>i(r+1,1,a),navigateTop:()=>i(0,1),navigateBottom:()=>i(e.length-1,-1),getSelected:()=>r>=0?e[r]??null:null}},[e,u,f,ie]);let A=(0,Z.useRef)({offsets:E,start:k,getItemElement:O,getItemTop:D,messages:e,scrollToIndex:ne});A.current={offsets:E,start:k,getItemElement:O,getItemTop:D,messages:e,scrollToIndex:ne},(0,Z.useEffect)(()=>{if(u===void 0)return;let e=A.current,n=e.getItemElement(u);n?t.current?.scrollToElement(n,1):e.scrollToIndex(u)},[u,t]);let j=(0,Z.useRef)(null),M=(0,Z.useRef)({msgIdx:-1,positions:[]}),N=(0,Z.useRef)(-1),ae=(0,Z.useRef)(0),P=(0,Z.useRef)(0),oe=(0,Z.useRef)(()=>{}),F=(0,Z.useRef)(()=>{}),I=(0,Z.useRef)({matches:[],ptr:0,screenOrd:0,prefixSum:[]}),se=(0,Z.useRef)(-1),L=(0,Z.useRef)(!1);function ce(e){let t=A.current.getItemTop(e);return Math.max(0,t-xo)}function le(e){let n=t.current,{msgIdx:r,positions:i}=M.current;if(!n||i.length===0||r<0){g?.(null);return}let a=Math.max(0,Math.min(e,i.length-1)),o=i[a],s=A.current.getItemTop(r),c=n.getViewportTop(),l=s-n.getScrollTop(),u=n.getViewportHeight(),d=c+l+o.row;(d<c||d>=c+u)&&(n.scrollTo(Math.max(0,s+o.row-xo)),l=s-n.getScrollTop(),d=c+l+o.row),g?.({positions:i,rowOffset:c+l,currentIdx:a});let f=I.current,p=f.prefixSum.at(-1)??0,h=(f.prefixSum[f.ptr]??0)+a+1;m?.(p,h),R(`highlight(i=${r}, ord=${a}/${i.length}): pos={row:${o.row},col:${o.col}} lo=${l} screenRow=${d} badge=${h}/${p}`)}F.current=le;let[ue,de]=(0,Z.useState)(0),fe=(0,Z.useCallback)(()=>de(e=>e+1),[]);(0,Z.useEffect)(()=>{let e=j.current;if(!e)return;let{idx:n,wantLast:r,tries:i}=e,a=t.current;if(!a)return;let{getItemElement:o,getItemTop:s,scrollToIndex:c}=A.current,l=o(n),u=l?.yogaNode?.getComputedHeight()??0;if(!l||u===0){if(i>1){j.current=null,R(`seek(i=${n}): no mount after scrollToIndex, skip`),oe.current(r?-1:1);return}j.current={idx:n,wantLast:r,tries:i+1},c(n),fe();return}j.current=null,a.scrollTo(Math.max(0,s(n)-xo));let d=h?.(l)??[];if(M.current={msgIdx:n,positions:d},R(`seek(i=${n} t=${i}): ${d.length} positions`),d.length===0){if(++ae.current>20){ae.current=0;return}oe.current(r?-1:1);return}ae.current=0;let f=r?d.length-1:0;I.current.screenOrd=f,N.current=-1,F.current(f);let p=P.current;p&&(P.current=0,oe.current(p))},[ue]);function pe(e,n){let r=t.current;if(!r)return;let i=A.current,{getItemElement:a,scrollToIndex:o}=i;if(e<0||e>=i.messages.length)return;g?.(null),M.current={msgIdx:-1,positions:[]},j.current={idx:e,wantLast:n,tries:0};let s=a(e),c=s?.yogaNode?.getComputedHeight()??0;s&&c>0?r.scrollTo(ce(e)):o(e),fe()}function me(e){let t=I.current,{matches:n,prefixSum:r}=t,i=r.at(-1)??0;if(n.length===0)return;if(j.current){P.current=e;return}N.current<0&&(N.current=t.ptr);let{positions:a}=M.current,o=t.screenOrd+e;if(o>=0&&o<a.length){t.screenOrd=o,le(o),N.current=-1;return}let s=(t.ptr+e+n.length)%n.length;if(s===N.current){g?.(null),N.current=-1,R(`step: wraparound at ptr=${s}, all ${n.length} msgs phantoms`);return}t.ptr=s,t.screenOrd=0,pe(n[s],e<0);let c=e<0?r[s+1]??i:r[s]+1;m?.(i,c)}oe.current=me,(0,Z.useImperativeHandle)(p,()=>({jumpToIndex:e=>{let n=t.current;n&&n.scrollTo(ce(e))},setSearchQuery:e=>{j.current=null,M.current={msgIdx:-1,positions:[]},N.current=-1,g?.(null);let n=e.toLowerCase(),r=[],i=[0];if(n){let e=A.current.messages;for(let t=0;t<e.length;t++){let a=c(e[t]),o=a.indexOf(n),s=0;for(;o>=0;)s++,o=a.indexOf(n,o+n.length);s>0&&(r.push(t),i.push(i.at(-1)+s))}}let a=i.at(-1),o=0,s=t.current,{offsets:l,start:u,getItemTop:d}=A.current,f=d(u),p=f>=0?f-l[u]:0;if(r.length>0&&s){let t=se.current>=0?se.current:s.getScrollTop(),n=1/0;for(let e=0;e<r.length;e++){let i=Math.abs(p+l[r[e]]-t);i<=n&&(n=i,o=e)}R(`setSearchQuery('${e}'): ${r.length} msgs · ptr=${o} msgIdx=${r[o]} curTop=${t} origin=${p}`)}I.current={matches:r,ptr:o,screenOrd:0,prefixSum:i},r.length>0?pe(r[o],!0):se.current>=0&&s&&s.scrollTo(se.current),m?.(a,r.length>0?i[o+1]??a:0)},nextMatch:()=>me(1),prevMatch:()=>me(-1),setAnchor:()=>{let e=t.current;e&&(se.current=e.getScrollTop())},disarmSearch:()=>{g?.(null),j.current=null,M.current={msgIdx:-1,positions:[]},N.current=-1},warmSearchIndex:async()=>{if(L.current)return 0;let e=A.current.messages,t=0,n=performance.now();for(let n=0;n<e.length;n+=500){await Me(0);let r=performance.now(),i=Math.min(n+500,e.length);for(let t=n;t<i;t++)c(e[t]);t+=performance.now()-r}let r=Math.round(performance.now()-n);return R(`warmSearchIndex: ${e.length} msgs · work=${Math.round(t)}ms wall=${r}ms chunks=${Math.ceil(e.length/500)}`),L.current=!0,Math.round(t)}}),[t]);let[he,ge]=(0,Z.useState)(null),_e=(0,Z.useRef)({onItemClick:a,setHoveredKey:ge});_e.current={onItemClick:a,setHoveredKey:ge};let z=(0,Z.useCallback)((e,t)=>{let n=_e.current;!t&&n.onItemClick&&n.onItemClick(e)},[]),ve=(0,Z.useCallback)(e=>{_e.current.setHoveredKey(e)},[]),ye=(0,Z.useCallback)(e=>{_e.current.setHoveredKey(t=>t===e?null:t)},[]);return(0,bo.jsxs)(bo.Fragment,{children:[(0,bo.jsx)(x,{ref:T,height:C,flexShrink:0}),e.slice(k,re).map((e,t)=>{let n=k+t,r=b[n],c=!!a&&(o?.(e)??!0),l=c&&he===r,u=s?.(e);return(0,bo.jsx)(_o,{itemKey:r,msg:e,idx:n,measureRef:ee,expanded:u,hovered:l,clickable:c,onClickK:z,onEnterK:ve,onLeaveK:ye,renderItem:i},r)}),w>0&&(0,bo.jsx)(x,{height:w,flexShrink:0}),l&&(0,bo.jsx)(yo,{messages:e,start:k,end:re,offsets:E,getItemTop:D,getItemElement:O,scrollRef:t})]})}function yo({messages:e,start:t,end:n,offsets:r,getItemTop:i,getItemElement:a,scrollRef:o}){let{setStickyPrompt:s}=(0,Z.useContext)(fo);(0,Z.useSyncExternalStore)((0,Z.useCallback)(e=>o.current?.subscribe(e)??To,[o]),()=>{let e=o.current;if(!e)return NaN;let t=e.getScrollTop()+e.getPendingDelta();return e.isSticky()?-1-t:t});let c=o.current?.isSticky()??!0,l=Math.max(0,(o.current?.getScrollTop()??0)+(o.current?.getPendingDelta()??0)),u=t,d=-1;for(let e=n-1;e>=t;e--){let t=i(e);if(t>=0){if(t<l)break;d=t}u=e}let f=-1,p=null;if(u>0&&!c)for(let t=u-1;t>=0;t--){let n=ho(e[t]);if(n===null)continue;let r=i(t);if(!(r>=0&&r+1>=l)){f=t,p=n;break}}let m=d>=0?d-r[u]:0,h=f>=0?Math.max(0,m+r[f]):-1,g=(0,Z.useRef)({idx:-1,tries:0}),_=(0,Z.useRef)(`none`),v=(0,Z.useRef)(-1);return(0,Z.useEffect)(()=>{if(g.current.idx>=0)return;if(_.current===`armed`){_.current=`force`;return}let e=_.current===`force`;if(_.current=`none`,!e&&v.current===f)return;if(v.current=f,p===null){s(null);return}let t=p.trimStart(),n=t.search(/\n\s*\n/),r=(n>=0?t.slice(0,n):t).slice(0,Co).replace(/\s+/g,` `).trim();if(r===``){s(null);return}let i=f,c=h;s({text:r,scrollTo:()=>{s(`clicked`),_.current=`armed`;let e=a(i);e?o.current?.scrollToElement(e,1):(o.current?.scrollTo(c),g.current={idx:i,tries:0})}})}),(0,Z.useEffect)(()=>{if(g.current.idx<0)return;let e=a(g.current.idx);e?(o.current?.scrollToElement(e,1),g.current={idx:-1,tries:0}):++g.current.tries>5&&(g.current={idx:-1,tries:0})}),null}var Z,bo,xo,So,Co,wo,To,Eo=t((()=>{h(),Z=n(h(),1),Ua(),y(),tt(),po(),bo=C(),ge(),Ne(),Er(),Xt(),xo=3,So=new WeakMap,Co=500,wo=new WeakMap,To=()=>{}}));function Do(e,t){let n=new Set(t),r=new Set;return e.filter(e=>{if(e.type===`system`)return e.subtype!==`api_metrics`;let t=e.message?.content[0];if(e.type===`assistant`)return e.isApiErrorMessage?!0:t?.type===`tool_use`&&t.name&&n.has(t.name)?(`id`in t&&r.add(t.id),!0):!1;if(e.type===`user`)return t?.type===`tool_result`?t.tool_use_id!==void 0&&r.has(t.tool_use_id):!e.isMeta;if(e.type===`attachment`){let t=e.attachment;return t?.type===`queued_command`&&t.commandMode===`prompt`&&!t.isMeta&&t.origin===void 0}return!1})}function Oo(e,t){let n=new Set(t),r=new Set,i=[],a=0;for(let t=0;t<e.length;t++){let o=e[t],s=o.message?.content[0];if(o.type===`user`&&s?.type!==`tool_result`&&!o.isMeta){a++;continue}o.type===`assistant`&&(s?.type===`text`?i[t]=a:s?.type===`tool_use`&&s.name&&n.has(s.name)&&r.add(a))}return r.size===0?e:e.filter((e,t)=>{let n=i[t];return n===void 0||!r.has(n)})}function ko(e,t,n=zo,r=Bo){let i=t.current,a=i?e.findIndex(e=>e.uuid===i.uuid):-1,o=a>=0?a:i?Math.min(i.idx,Math.max(0,e.length-n)):0;e.length-o>n+r&&(o=e.length-n);let s=e[o];return s&&(i?.uuid!==s.uuid||i.idx!==o)?t.current={uuid:s.uuid,idx:o}:!s&&i&&(t.current=null),o}function Ao(e){return(e.type===`assistant`||e.type===`user`?Ht(e):null)??e.uuid}function jo(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Mo(e,t,n,r,i,a){if(i===`transcript`)return!0;switch(e.type){case`attachment`:case`user`:case`assistant`:{if(e.type===`assistant`){let t=e.message.content[0];if(t?.type===`server_tool_use`)return a.resolvedToolUseIDs.has(t.id)}let i=Ht(e);return i?t.has(i)||n.has(i)||Ze(i,`PostToolUse`,a)?!1:rr(r,a.resolvedToolUseIDs):!0}case`system`:return e.subtype!==`api_error`;case`grouped_tool_use`:return e.messages.every(e=>{let t=e.message.content[0];return t?.type===`tool_use`&&a.resolvedToolUseIDs.has(t.id)});case`collapsed_read_search`:return!1;default:return!0}}var No,Q,$,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo=t((()=>{p(),Sn(),No=n(h(),1),Q=n(h(),1),ir(),T(),O(),nn(),y(),bt(),rn(),Pt(),sr(),ur(),it(),pr(),D(),i(),Zt(),vr(),rt(),ce(),Er(),ea(),wt(),ga(),Xt(),gt(),ya(),Le(),Na(),$=C(),Eo(),Po=No.memo(function({agentDefinitions:e}){return(0,$.jsx)(Ut,{children:(0,$.jsxs)(x,{flexDirection:`column`,gap:1,children:[(0,$.jsx)(Xi,{}),(0,$.jsx)(No.Suspense,{fallback:null,children:(0,$.jsx)(ka,{agentDefinitions:e})})]})})}),Fo=(ln(),e(cn)),Io=(ie(),e(de)).BRIEF_TOOL_NAME,Lo=(Ct(),e(We)).SEND_USER_FILE_TOOL_NAME,Ro=30,zo=200,Bo=50,Vo=({messages:e,tools:t,commands:n,verbose:r,toolJSX:i,toolUseConfirmQueue:o,inProgressToolUseIDs:s,isMessageSelectorVisible:c,conversationId:l,screen:p,streamingToolUses:m,showAllInTranscript:h=!1,agentDefinitions:g,onOpenRateLimitOptions:y,hideLogo:b=!1,isLoading:S,hidePastThinking:C=!1,streamingThinking:w,streamingText:T,isBriefOnly:E=!1,unseenDivider:D,scrollRef:O,trackStickyPrompt:te,jumpRef:k,onSearchMatchesChange:re,scanElement:ie,setPositions:A,disableRenderCap:j=!1,cursor:N=null,setCursor:ae,cursorNavRef:oe,renderRange:F})=>{let{columns:I}=u(),se=Ie(`transcript:toggleShowAll`,`Transcript`,`Ctrl+E`),L=(0,Q.useMemo)(()=>Xe(e).filter(Be),[e]),ce=(0,Q.useMemo)(()=>w?w.isStreaming?!0:w.streamingEndedAt?Date.now()-w.streamingEndedAt<3e4:!1:!1,[w]),{lastThinkingBlockId:le,latestBashOutputUUID:ue}=(0,Q.useMemo)(()=>{let e=null,t=null,n=C&&!ce;C&&ce&&(e=`streaming`);for(let r=L.length-1;r>=0;r--){let i=L[r];if(i?.type===`user`){let r=i.message.content;if(!t){for(let e of r)if(e.type===`text`){let n=e.text??``;if(n.startsWith(`<bash-stdout`)||n.startsWith(`<bash-stderr`)){t=i.uuid;break}}}n&&!e&&(r.some(e=>e.type===`tool_result`)||(e=`no-thinking`))}else if(i?.type===`assistant`&&n&&!e){let t=i.message.content;for(let n=t.length-1;n>=0;n--)if(t[n]?.type===`thinking`){e=`${i.uuid}:${n}`;break}}if(e!==null&&t)break}return C||(e=null),{lastThinkingBlockId:e,latestBashOutputUUID:t}},[L,C,ce]),de=(0,Q.useMemo)(()=>ot(L),[L]),fe=(0,Q.useMemo)(()=>m.filter(e=>!s.has(e.contentBlock.id)&&!de.has(e.contentBlock.id)),[m,s,de]),pe=(0,Q.useMemo)(()=>fe.flatMap(e=>{let t=Gt({content:[e.contentBlock]});return t.uuid=tn(e.contentBlock.id,0),Xe([t])}),[fe]),R=p===`transcript`,me=(0,Q.useMemo)(()=>a(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL),[]),he=O!=null&&!me,ge=R&&!h&&!he,_e=(0,Q.useRef)(null),z=(0,Q.useRef)(null),{collapsed:ve,lookups:ye,hasTruncatedMessages:be,hiddenMessageCount:xe}=(0,Q.useMemo)(()=>{let e=$e((r||Mt()?L:mt(L,{includeSnipped:!0})).filter(e=>e.type!==`progress`&&!_a(e)&&At(e,R)),pe),n=[Io,Lo].filter(e=>e!==null),i=[Io].filter(e=>e!==null),a=n.length>0&&!R?E?Do(e,n):i.length>0?Oo(e,i):e:e,o=ge?a.slice(-Ro):a,s=ge&&a.length>Ro,{messages:c}=gr(o,t,r),l=or(lr(fr(ct(c,t))),r),u=Bt(L,o),d=(()=>{let e=o.at(-1);return e?.type===`assistant`?e.message?.id:void 0})(),f;if(z.current&&z.current.key===u)f=z.current.lookups;else if(z.current&&L.length>=z.current.normalizedCount&&o.length>=z.current.messageCount&&z.current.lastAssistantMsgId===d){let e=Fe(z.current.lookups,z.current.normalizedCount,z.current.messageCount,L,o);e?(f=e,z.current={key:u,lookups:f,normalizedCount:L.length,messageCount:o.length,lastAssistantMsgId:d}):(f=$t(L,o),z.current={key:u,lookups:f,normalizedCount:L.length,messageCount:o.length,lastAssistantMsgId:d})}else f=$t(L,o),z.current={key:u,lookups:f,normalizedCount:L.length,messageCount:o.length,lastAssistantMsgId:d};let p=e.length-Ro;return{collapsed:l,lookups:f,hasTruncatedMessages:s,hiddenMessageCount:p}},[r,L,R,pe,ge,t,E]),B=(0,Q.useMemo)(()=>{let e=!he&&!j?ko(ve,_e):0;return F?ve.slice(F[0],F[1]):e>0?ve.slice(e):ve},[ve,F,he,j]),Se=(0,Q.useMemo)(()=>new Set(m.map(e=>e.contentBlock.id)),[m]),{dividerBeforeIndex:Ce,selectedIdx:we}=(0,Q.useMemo)(()=>{if(!D&&!N)return{dividerBeforeIndex:-1,selectedIdx:-1};let e=-1,t=-1,n=D?.firstUnseenUuid.slice(0,24);for(let r=0;r<B.length;r++){let i=B[r];if(e===-1&&n&&i.uuid.slice(0,24)===n&&(e=r),t===-1&&N&&i.uuid===N.uuid&&(t=r),e!==-1&&t!==-1)break}return{dividerBeforeIndex:e,selectedIdx:t}},[D,N,B]),[Te,Ee]=(0,Q.useState)(()=>new Set),De=(0,Q.useCallback)(e=>{let t=Ao(e);Ee(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),Oe=(0,Q.useCallback)(e=>Te.size>0&&Te.has(Ao(e)),[Te]),ke=(0,Q.useRef)(ye);ke.current=ye;let Ae=(0,Q.useCallback)(e=>{if(e.type===`collapsed_read_search`)return!0;if(e.type===`assistant`){let t=e.message.content,n=Array.isArray(t)?t[0]:void 0;return n!=null&&yt(n)&&n.type===`advisor_tool_result`&&n.content.type===`advisor_result`}if(e.type!==`user`)return!1;let n=e.message.content[0];if(n?.type!==`tool_result`||n.is_error||!e.toolUseResult)return!1;let r=ke.current.toolUseByToolUseID.get(n.tool_use_id??``)?.name;return(r?an(t,r):void 0)?.isResultTruncated?.(e.toolUseResult)??!1},[t]),je=(!i||!!i.shouldContinueAnimation)&&!o.length&&!c,Me=s.size>0,{progress:Ne}=d(),Pe=(0,Q.useRef)(null),Le=P().terminalProgressBarEnabled&&!ee()&&!(Fo?.isProactiveActive()??!1);(0,Q.useEffect)(()=>{let e=Le?Me?`indeterminate`:`completed`:null;Pe.current!==e&&(Pe.current=e,Ne(e))},[Ne,Le,Me]),(0,Q.useEffect)(()=>()=>Ne(null),[Ne]);let Re=(0,Q.useCallback)(e=>`${e.uuid}-${l}`,[l]),Ve=(e,i)=>{let a=i>0?B[i-1]?.type:void 0,o=e.type===`user`&&a===`user`,c=e.type===`collapsed_read_search`&&(!!T||sa(B,i,t,Se)),l=B.length-1-i>0,u=Re(e),d=(0,$.jsx)(ha,{message:e,isUserContinuation:o,hasContentAfter:c,tools:t,commands:n,verbose:r||Oe(e)||N?.expanded===!0&&i===we,inProgressToolUseIDs:s,streamingToolUseIDs:Se,screen:p,canAnimate:je,onOpenRateLimitOptions:y,lastThinkingBlockId:le,latestBashOutputUUID:ue,columns:I,isLoading:S,lookups:ye,shouldCollapseDiffs:l},u),f=(0,$.jsx)(nt.Provider,{value:i===we,children:d},u);return D&&i===Ce?[(0,$.jsx)(x,{marginTop:1,children:(0,$.jsx)(v,{title:`${D.count} new ${M(D.count,`message`)}`,width:I,color:`inactive`})},`unseen-divider`),f]:f},He=(0,Q.useRef)(new WeakMap),Ue=(0,Q.useCallback)(e=>{let n=He.current.get(e);if(n!==void 0)return n;let r=yr(e);if(e.type===`user`&&e.toolUseResult&&Array.isArray(e.message.content)){let n=e.message.content.find(e=>e.type===`tool_result`);if(n&&`tool_use_id`in n){let i=ye.toolUseByToolUseID.get(n.tool_use_id),a=(i&&an(t,i.name))?.extractSearchText?.(e.toolUseResult);a!==void 0&&(r=a)}}let i=r.toLowerCase();return He.current.set(e,i),i},[t,ye]);return(0,$.jsxs)(Cn,{name:`MessagesBoundary`,children:[!b&&!(F&&F[0]>0)&&(0,$.jsx)(Po,{agentDefinitions:g}),be&&(0,$.jsx)(v,{title:`${se} to show ${f.bold(xe)} previous messages`,width:I}),R&&h&&xe>0&&!j&&(0,$.jsx)(v,{title:`${se} to hide ${f.bold(xe)} previous messages`,width:I}),he?(0,$.jsx)(Tt.Provider,{value:!0,children:(0,$.jsx)(vo,{messages:B,scrollRef:O,columns:I,itemKey:Re,renderItem:Ve,onItemClick:De,isItemClickable:Ae,isItemExpanded:Oe,trackStickyPrompt:te,selectedIndex:we>=0?we:void 0,cursorNavRef:oe,setCursor:ae,jumpRef:k,onSearchMatchesChange:re,scanElement:ie,setPositions:A,extractSearchText:Ue})}):B.flatMap(Ve),T&&!E&&(0,$.jsx)(x,{alignItems:`flex-start`,flexDirection:`row`,marginTop:1,width:`100%`,children:(0,$.jsxs)(x,{flexDirection:`row`,children:[(0,$.jsx)(x,{minWidth:2,children:(0,$.jsx)(_,{color:`text`,children:ne})}),(0,$.jsx)(x,{flexDirection:`column`,children:(0,$.jsx)(ze,{children:T})})]})}),ce&&w&&!E&&(0,$.jsx)(x,{marginTop:1,children:(0,$.jsx)(ut,{param:{type:`thinking`,thinking:w.thinking},addMargin:!1,isTranscriptMode:!0,verbose:r,hideInTranscript:!1})})]})},Ho=No.memo(Vo,(e,t)=>{let n=Object.keys(e);for(let r of n)if(!(r===`onOpenRateLimitOptions`||r===`scrollRef`||r===`trackStickyPrompt`||r===`setCursor`||r===`cursorNavRef`||r===`jumpRef`||r===`onSearchMatchesChange`||r===`scanElement`||r===`setPositions`)&&e[r]!==t[r]){if(r===`streamingToolUses`){let n=e.streamingToolUses,r=t.streamingToolUses;if(n.length===r.length&&n.every((e,t)=>e.contentBlock===r[t]?.contentBlock))continue}if(r===`inProgressToolUseIDs`&&jo(e.inProgressToolUseIDs,t.inProgressToolUseIDs))continue;if(r===`unseenDivider`){let n=e.unseenDivider,r=t.unseenDivider;if(n?.firstUnseenUuid===r?.firstUnseenUuid&&n?.count===r?.count)continue}if(r===`tools`){let n=e.tools,r=t.tools;if(n.length===r.length&&n.every((e,t)=>e.name===r[t]?.name))continue}return!1}return!0})}));export{po as a,qa as c,io as i,Ja as l,Uo as n,to as o,ao as r,eo as s,Ho as t};