@readmagic/workmate 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (512) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-Vmmm7p1c.js +1 -0
  2. package/dist/chunks/App-C2yQjBgY.js +1 -0
  3. package/dist/chunks/ApproveApiKey-CKbv5C1x.js +1 -0
  4. package/dist/chunks/ApproveApiKey-MscC-ssL.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-CL5NWsFL.js +2 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-CLSACUmo.js +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-BqNxQOXJ.js +1 -0
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-C0-psohX.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-4mOvEer_.js +1 -0
  10. package/dist/chunks/DiffDialog-9AYwtupw.js +6 -0
  11. package/dist/chunks/Doctor-DmgAwce2.js +1 -0
  12. package/dist/chunks/Doctor-jEs9chPk.js +3 -0
  13. package/dist/chunks/ExitFlow-DVKxFdpX.js +2 -0
  14. package/dist/chunks/Grove-B9-hhkZA.js +11 -0
  15. package/dist/chunks/{HybridTransport-BJPOG2wl.js → HybridTransport-MxJ_W_np.js} +3 -3
  16. package/dist/chunks/InvalidConfigDialog-o9DF1REI.js +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-YyQcHocx.js +1 -0
  18. package/dist/chunks/MCPConnectionManager-CUTuaa8T.js +1 -0
  19. package/dist/chunks/MCPToolListView-CvqB4nCw.js +1 -0
  20. package/dist/chunks/McpParsingWarnings-BCpfHaBK.js +1 -0
  21. package/dist/chunks/MessageSelector-BLzw172f.js +3 -0
  22. package/dist/chunks/Messages-4K5sLmNh.js +11 -0
  23. package/dist/chunks/Onboarding-ClwHS5rh.js +1 -0
  24. package/dist/chunks/{PermissionDialog-0ya1CU5k.js → PermissionDialog-Cb3z8OUP.js} +1 -1
  25. package/dist/chunks/{PressEnterToContinue-Dl9Hg9Mf.js → PressEnterToContinue-Dq0Imo9c.js} +1 -1
  26. package/dist/chunks/PromptInputFooterSuggestions-BSA9NrZc.js +1 -0
  27. package/dist/chunks/PromptInputHelpMenu-Bb4KdIX_.js +1 -0
  28. package/dist/chunks/QueryEngine-DPHLSsax.js +1 -0
  29. package/dist/chunks/REPL-Bf46iQCN.js +1 -0
  30. package/dist/chunks/REPL-DIaAo9M9.js +133 -0
  31. package/dist/chunks/RemoteSessionManager-CS6mywIn.js +2 -0
  32. package/dist/chunks/ResumeConversation-Br2KsBoe.js +1 -0
  33. package/dist/chunks/{SSETransport-CrwbKuVt.js → SSETransport-CoxQ8YpH.js} +1 -1
  34. package/dist/chunks/{SearchBox-vfLXEPed.js → SearchBox-C9vUA4IM.js} +1 -1
  35. package/dist/chunks/SearchExtraToolsTool-i_YO3QvV.js +1 -0
  36. package/dist/chunks/Settings-BMXysXIx.js +2 -0
  37. package/dist/chunks/TeleportProgress-Doucj-50.js +1 -0
  38. package/dist/chunks/TeleportRepoMismatchDialog-B5I73j7Y.js +1 -0
  39. package/dist/chunks/TeleportResumeWrapper-D6kpr2c6.js +1 -0
  40. package/dist/chunks/ThemePicker-DrC8tlp0.js +1 -0
  41. package/dist/chunks/{TrustDialog-BukWGvHZ.js → TrustDialog-Fk4m_Sy4.js} +1 -1
  42. package/dist/chunks/{ValidationErrorsList-DokTJQwi.js → ValidationErrorsList-D_OUa4RT.js} +1 -1
  43. package/dist/chunks/WelcomeV2-DvfQHnZY.js +1 -0
  44. package/dist/chunks/add-dir-CZ6Clvq8.js +1 -0
  45. package/dist/chunks/{agentDisplay-DBQYOaOh.js → agentDisplay-B755vMZE.js} +1 -1
  46. package/dist/chunks/{agents-HlKk68Qc.js → agents-CIvP8l0s.js} +1 -1
  47. package/dist/chunks/agents-DHnNg4h6.js +103 -0
  48. package/dist/chunks/allErrors-CU89tF-z.js +1 -0
  49. package/dist/chunks/analytics-DJobLaWP.js +1 -0
  50. package/dist/chunks/api-BSeE6MwB.js +1 -0
  51. package/dist/chunks/{api-CF5IVtj0.js → api-nSHc_GIQ.js} +1 -1
  52. package/dist/chunks/auth-5QB6tsfB.js +15 -0
  53. package/dist/chunks/auth-BIGJth5U.js +1 -0
  54. package/dist/chunks/auth-CDQMhIZP.js +1 -0
  55. package/dist/chunks/{autoMode-Cr0AhS1G.js → autoMode-BnUiK9Cu.js} +4 -4
  56. package/dist/chunks/{autonomy-ARUQt-Lu.js → autonomy-C1aSgWPQ.js} +1 -1
  57. package/dist/chunks/autonomy-Src6sKCp.js +15 -0
  58. package/dist/chunks/{autonomyPanel-BQK9MoeB.js → autonomyPanel-DnHpuiy4.js} +1 -1
  59. package/dist/chunks/backgroundHousekeeping-B-cw0UcS.js +17 -0
  60. package/dist/chunks/backgroundHousekeeping-BS_8z3_x.js +1 -0
  61. package/dist/chunks/{banner-Ca7rki2V.js → banner-D0P7wXdw.js} +1 -1
  62. package/dist/chunks/bg-50rllUNh.js +1 -0
  63. package/dist/chunks/{bg-DxRHF1yn.js → bg-DAPORXF3.js} +2 -2
  64. package/dist/chunks/branch-DFWa4Oxo.js +3 -0
  65. package/dist/chunks/{break-cache-BKvoMOZx.js → break-cache-Chj9i9MP.js} +2 -2
  66. package/dist/chunks/{bridgeConfig-jDEva6Eh.js → bridgeConfig-Bb6URf4Q.js} +1 -1
  67. package/dist/chunks/bridgeConfig-BeqChxJC.js +1 -0
  68. package/dist/chunks/bridgeMessaging-C3huGcR3.js +1 -0
  69. package/dist/chunks/{bridgePointer-DIM0sj0x.js → bridgePointer-DLYyvRKb.js} +1 -1
  70. package/dist/chunks/bridgeStatusUtil-DFMftajD.js +1 -0
  71. package/dist/chunks/btw-DSK9R2C8.js +1 -0
  72. package/dist/chunks/caches-BTQAW9zc.js +1 -0
  73. package/dist/chunks/caches-BVtSCnV1.js +1 -0
  74. package/dist/chunks/{capacityWake-CKOiRELo.js → capacityWake-amzeeBz0.js} +1 -1
  75. package/dist/chunks/{ccrClient-BC2q3k44.js → ccrClient-Bu7Tf1Z5.js} +1 -1
  76. package/dist/chunks/{claudeDesktop-DQXL5bGm.js → claudeDesktop-CsJfF1b-.js} +1 -1
  77. package/dist/chunks/{clear-1etSJhdg.js → clear-ClFDpWVJ.js} +1 -1
  78. package/dist/chunks/{cliLaunch-CQjLYRzM.js → cliLaunch-BWcoyZDP.js} +1 -1
  79. package/dist/chunks/client-BWQ4-rN7.js +1 -0
  80. package/dist/chunks/{client-DQwf_b9o.js → client-DFlE4fYh.js} +1 -1
  81. package/dist/chunks/client-c-3-PW1F.js +1 -0
  82. package/dist/chunks/commands-Bi7k3Wg-.js +1 -0
  83. package/dist/chunks/compact-J-h0Yf4b.js +2 -0
  84. package/dist/chunks/config-CVHMRMwd.js +1 -0
  85. package/dist/chunks/config-Do1870_d.js +3 -0
  86. package/dist/chunks/config-yyFe87vW.js +1 -0
  87. package/dist/chunks/context-Tb1Ca2Q-.js +1 -0
  88. package/dist/chunks/{context-noninteractive-Ct_ttQfP.js → context-noninteractive-D5iQhasu.js} +2 -2
  89. package/dist/chunks/context-noninteractive-soPYKAc9.js +1 -0
  90. package/dist/chunks/conversation-CSEtUxOY.js +1 -0
  91. package/dist/chunks/conversation-Dk1WDQuN.js +1 -0
  92. package/dist/chunks/{createSSHSession-BmHXA2me.js → createSSHSession-CJtzNQdZ.js} +1 -1
  93. package/dist/chunks/{createSession-C4rukWkv.js → createSession-DkT1GL8y.js} +1 -1
  94. package/dist/chunks/createSession-eE8mswkv.js +1 -0
  95. package/dist/chunks/crossProjectResume-04n3Ppy9.js +40 -0
  96. package/dist/chunks/cwd-Cfdf7z7s.js +1 -0
  97. package/dist/chunks/cwd-ClLru_7T.js +1 -0
  98. package/dist/chunks/datadog-DjeJThpV.js +1 -0
  99. package/dist/chunks/{debug-RZ4NuXyS.js → debug-RAynG_nM.js} +4 -4
  100. package/dist/chunks/{debugUtils-D30M1cbN.js → debugUtils-DX0KAXNK.js} +1 -1
  101. package/dist/chunks/{detached-jrVP11oU.js → detached-X_yjYR7x.js} +1 -1
  102. package/dist/chunks/{detectRepository-CFiHe6Rv.js → detectRepository-DgpNd87p.js} +1 -1
  103. package/dist/chunks/detectRepository-ctF9KDbb.js +1 -0
  104. package/dist/chunks/{diff-BKiK3xHv.js → diff-jEJJe58I.js} +1 -1
  105. package/dist/chunks/directoryCompletion-BbXR2bfy.js +1 -0
  106. package/dist/chunks/doctor-B-Wag4C1.js +1 -0
  107. package/dist/chunks/earlyInput-BEjRkAtH.js +1 -0
  108. package/dist/chunks/{earlyInput-BTC_Wucv.js → earlyInput-IghoCjG5.js} +1 -1
  109. package/dist/chunks/entry-oIqjxIjQ.js +14 -0
  110. package/dist/chunks/envUtils-BDhHQY0-.js +1 -0
  111. package/dist/chunks/esm-Cf4nSRjF.js +1 -0
  112. package/dist/chunks/{execFileNoThrow-CCX-JY8h.js → execFileNoThrow-Dwu6psHW.js} +1 -1
  113. package/dist/chunks/{execSyncWrapper-dhRSYGFW.js → execSyncWrapper-BTZJjCuv.js} +1 -1
  114. package/dist/chunks/exit-BtW7LfRX.js +1 -0
  115. package/dist/chunks/extraUsage-Mi66JwFZ.js +1 -0
  116. package/dist/chunks/extractMemories-CUrdiNcr.js +1 -0
  117. package/dist/chunks/fast-BU4iUZ8E.js +1 -0
  118. package/dist/chunks/fast-C60p6AqJ.js +1 -0
  119. package/dist/chunks/featureCheck-D6FjD-nt.js +1 -0
  120. package/dist/chunks/featureCheck-JOur3pHb.js +1 -0
  121. package/dist/chunks/fileSuggestions-BMfQIDdW.js +3 -0
  122. package/dist/chunks/firstPartyEventLogger-B3cXgR67.js +5 -0
  123. package/dist/chunks/firstPartyEventLogger-BfCYN7lt.js +1 -0
  124. package/dist/chunks/flushGate-DgSDVGKZ.js +1 -0
  125. package/dist/chunks/{fpsMetrics-Cf_hdtiJ.js → fpsMetrics-DffAomdg.js} +1 -1
  126. package/dist/chunks/gemini-BwvSxGgn.js +1 -0
  127. package/dist/chunks/generateSessionName-DlrdedOk.js +1 -0
  128. package/dist/chunks/{genericProcessUtils-DVfMHhfy.js → genericProcessUtils-CmsUPyRz.js} +1 -1
  129. package/dist/chunks/{git-BerW9bId.js → git-2c7WlGDL.js} +1 -1
  130. package/dist/chunks/git-XtKbtJMc.js +1 -0
  131. package/dist/chunks/githubRepoPathMapping-DbWG4hFQ.js +1 -0
  132. package/dist/chunks/goal-ZmSRBx4q.js +3 -0
  133. package/dist/chunks/grok-BXMvezWb.js +1 -0
  134. package/dist/chunks/grove-CeOjTaY6.js +7 -0
  135. package/dist/chunks/help-5DNZO6_H.js +1 -0
  136. package/dist/chunks/{hooks-BZJTWD07.js → hooks-C637tFtd.js} +2 -2
  137. package/dist/chunks/hooks-DWg07LmS.js +1 -0
  138. package/dist/chunks/initReplBridge-D1h10vQ9.js +1 -0
  139. package/dist/chunks/{install-BI---dv0.js → install-C-6ItpH0.js} +1 -1
  140. package/dist/chunks/{instrumentation-CcWzhGfE.js → instrumentation-DaiPDUst.js} +4 -4
  141. package/dist/chunks/intl-D2kgJmX7.js +1 -0
  142. package/dist/chunks/{job-B0ftcqPF.js → job-BeYzQUiR.js} +1 -1
  143. package/dist/chunks/{jwtUtils-C0cE-1Ey.js → jwtUtils-CUPXdX3W.js} +1 -1
  144. package/dist/chunks/keybindings-DgIPdBy9.js +2 -0
  145. package/dist/chunks/launchLocalMemory-CE4J98xO.js +3 -0
  146. package/dist/chunks/launchOnboarding-BfTdC6vp.js +8 -0
  147. package/dist/chunks/{loadAgentsDir-ByO8eJqU.js → loadAgentsDir-C7lOqvfh.js} +2233 -2454
  148. package/dist/chunks/loadAgentsDir-zikjxLvn.js +1 -0
  149. package/dist/chunks/loadPluginHooks-Cp8MSwAc.js +1 -0
  150. package/dist/chunks/{localSearch-CHHCH16D.js → localSearch-BKrznW5x.js} +1 -1
  151. package/dist/chunks/localSearch-ZFyFy5FN.js +1 -0
  152. package/dist/chunks/log-CezCRpAN.js +1 -0
  153. package/dist/chunks/logoV2Utils-BkQfyQ1-.js +1 -0
  154. package/dist/chunks/{magicDocs-C5i5ruuU.js → magicDocs-BpVcON9o.js} +3 -3
  155. package/dist/chunks/main-9r5gLzUW.js +605 -0
  156. package/dist/chunks/{main-BLD4QAQg.js → main-CvOv59-7.js} +4 -4
  157. package/dist/chunks/managedEnv-B61yLpwp.js +1 -0
  158. package/dist/chunks/{managedEnv-C-9XSN14.js → managedEnv-DhWRJ5DK.js} +1 -1
  159. package/dist/chunks/{mappers-CHRFic5q.js → mappers-bOab8ipV.js} +1 -1
  160. package/dist/chunks/mcp-BckPBjaM.js +6 -0
  161. package/dist/chunks/mcp-CS1DA3JL.js +1 -0
  162. package/dist/chunks/mcp-VcGPYCkW.js +2 -0
  163. package/dist/chunks/{memoize-B8hfb1JN.js → memoize-DsqYrbeR.js} +1 -1
  164. package/dist/chunks/memory-C5ohwh-T.js +1 -0
  165. package/dist/chunks/{modalContext-DFjKLCB6.js → modalContext-CUThy6Ph.js} +1 -1
  166. package/dist/chunks/mode-DlKnUM8l.js +2 -0
  167. package/dist/chunks/model-BGu1AGq0.js +1 -0
  168. package/dist/chunks/model-BsZ4sP_H.js +1 -0
  169. package/dist/chunks/model-D19IIcll.js +1 -0
  170. package/dist/chunks/modelOptions-CxP067Qv.js +1 -0
  171. package/dist/chunks/nativeInstaller-QB8cEJ18.js +1 -0
  172. package/dist/chunks/oauth-BN2I0_jl.js +1 -0
  173. package/dist/chunks/oauth-C9VBDB0Y.js +1 -0
  174. package/dist/chunks/omit-DDUIPHnl.js +1 -0
  175. package/dist/chunks/onChangeAppState-RBl6H7ho.js +1 -0
  176. package/dist/chunks/{openai-DPH6rXOZ.js → openai-B9C2XN5Q.js} +3 -3
  177. package/dist/chunks/{panel-mD094ALT.js → panel-KW-wmEvU.js} +1 -1
  178. package/dist/chunks/{parser-dbHRgXb8.js → parser-BwPXQomy.js} +1 -1
  179. package/dist/chunks/parser-xSBaQRLH.js +1 -0
  180. package/dist/chunks/partition-D-UhsUCx.js +1 -0
  181. package/dist/chunks/permissions-BoLXYN1j.js +3 -0
  182. package/dist/chunks/pidLock-nJHbufJN.js +3 -0
  183. package/dist/chunks/plan-CyU2zrCK.js +1 -0
  184. package/dist/chunks/{platform-DCXXznJg.js → platform-BMPbglug.js} +1 -1
  185. package/dist/chunks/plugin-C6-GQke5.js +17 -0
  186. package/dist/chunks/pluginAutoupdate-SlRFJlTT.js +1 -0
  187. package/dist/chunks/{pluginBlocklist-PwHHD3nj.js → pluginBlocklist-n6Imlh3y.js} +1 -1
  188. package/dist/chunks/pluginCliCommands-Bd96zSOQ.js +1 -0
  189. package/dist/chunks/{pluginFlagging-pBxSselw.js → pluginFlagging-DZaYzecY.js} +1 -1
  190. package/dist/chunks/pluginOperations-D90IRawu.js +2 -0
  191. package/dist/chunks/pluginStartupCheck-Bxkxpm4k.js +1 -0
  192. package/dist/chunks/{pluginStartupCheck-Di4LjHXf.js → pluginStartupCheck-CB2q2dLv.js} +1 -1
  193. package/dist/chunks/plugins-B9eSjLSA.js +4 -0
  194. package/dist/chunks/poorMode-BAnubpn1.js +1 -0
  195. package/dist/chunks/{poorMode-CYXmr_mU.js → poorMode-DEwQOAJt.js} +1 -1
  196. package/dist/chunks/print-eCRv_Li-.js +26 -0
  197. package/dist/chunks/processBashCommand-B5F2Cl7K.js +1 -0
  198. package/dist/chunks/processSlashCommand-BC_D3cH5.js +5 -0
  199. package/dist/chunks/{projectContext-D9MDwJUF.js → projectContext-CIxul6vA.js} +1 -1
  200. package/dist/chunks/{projectContext-BaDZBAoK.js → projectContext-RUMJB798.js} +1 -1
  201. package/dist/chunks/prompt-C1JPqinc.js +1 -0
  202. package/dist/chunks/prompt-DZhBz_Vu.js +1 -0
  203. package/dist/chunks/prompt-M2lu8_Oa.js +139 -0
  204. package/dist/chunks/promptEditor-DhcZY-iu.js +4 -0
  205. package/dist/chunks/{protocolHandler-RNKkhq91.js → protocolHandler-CkFaJKKo.js} +1 -1
  206. package/dist/chunks/{proxy-BmtEnJ02.js → proxy-CuMaO_YV.js} +1 -1
  207. package/dist/chunks/reconciler-B4GDm_iC.js +1 -0
  208. package/dist/chunks/refresh-DBVizOzg.js +1 -0
  209. package/dist/chunks/{registerProtocol-DoKqmqu2.js → registerProtocol-CsNYRZKr.js} +1 -1
  210. package/dist/chunks/reload-plugins-B7JAE3b4.js +1 -0
  211. package/dist/chunks/{remoteBridgeCore-Cddqv2WW.js → remoteBridgeCore-CFLJhsB6.js} +1 -1
  212. package/dist/chunks/remoteManagedSettings-xh_MViZH.js +1 -0
  213. package/dist/chunks/rename-BCp2Vtqu.js +1 -0
  214. package/dist/chunks/{renderOptions-ChLwxtVu.js → renderOptions-Q5oCLFIC.js} +1 -1
  215. package/dist/chunks/resume-DVCSzKvv.js +2 -0
  216. package/dist/chunks/{ripgrep-gaT9Njwi.js → ripgrep-DvOOsDMv.js} +1 -1
  217. package/dist/chunks/ripgrep-e-iewvTf.js +1 -0
  218. package/dist/chunks/{runtimeObserver-Dbxxw4ls.js → runtimeObserver-CS_3BDNo.js} +4 -4
  219. package/dist/chunks/{runtimeObserver-CsIwinzh.js → runtimeObserver-DYUva6g-.js} +1 -1
  220. package/dist/chunks/sandbox-adapter-BFZFHplu.js +1 -0
  221. package/dist/chunks/sandbox-toggle--zNSKce_.js +1 -0
  222. package/dist/chunks/searchExtraTools-ui5y2VSE.js +1 -0
  223. package/dist/chunks/session-CO3gEqQP.js +2 -0
  224. package/dist/chunks/sessionFileAccessHooks-CZvCqQJ6.js +1 -0
  225. package/dist/chunks/sessionObserver-Ba7um95p.js +1 -0
  226. package/dist/chunks/{sessionObserver-DoYc0ZOP.js → sessionObserver-YkRHC-Aa.js} +2 -2
  227. package/dist/chunks/sessionState-Bifmu95-.js +11 -0
  228. package/dist/chunks/sessionStorage-CedwLLQs.js +1 -0
  229. package/dist/chunks/{sessionStoragePortable-Cx6JQ5Ye.js → sessionStoragePortable-JZnGwqUM.js} +1 -1
  230. package/dist/chunks/sessionTitle-COBSgSXS.js +14 -0
  231. package/dist/chunks/sessionTracing-BrNx1k2V.js +11 -0
  232. package/dist/chunks/settings-DkDH7WQT.js +1 -0
  233. package/dist/chunks/settings-DnptdP79.js +20 -0
  234. package/dist/chunks/settingsSync-PmU7SmkU.js +1 -0
  235. package/dist/chunks/setup-BEsBuzsk.js +3 -0
  236. package/dist/chunks/shadowedRuleDetection-DEaw-X5j.js +1 -0
  237. package/dist/chunks/{shellQuote-BUVKMu_P.js → shellQuote-BYeOv3Ip.js} +1 -1
  238. package/dist/chunks/{sideQuestion-C780iYwd.js → sideQuestion-D0OKljee.js} +3 -3
  239. package/dist/chunks/sinks-BJHgxz6Y.js +1 -0
  240. package/dist/chunks/sinks-D5-yhcgU.js +2 -0
  241. package/dist/chunks/skillChangeDetector-Dd0WPdkO.js +1 -0
  242. package/dist/chunks/{skillGapStore-Dc1arohs.js → skillGapStore-N_kmvXML.js} +2 -2
  243. package/dist/chunks/{skillLifecycle-DP6mY1Kp.js → skillLifecycle-C4F5RXuh.js} +2 -2
  244. package/dist/chunks/{skillSearchPanel-CpLTImaL.js → skillSearchPanel-CftorvAM.js} +4 -4
  245. package/dist/chunks/skills-C4CTRN9o.js +1 -0
  246. package/dist/chunks/{src-CDCSSo0U2.js → src-P_wYS_NJ2.js} +1 -1
  247. package/dist/chunks/{src-CST_jFnT.js → src-r6ZFgWPx2.js} +1 -1
  248. package/dist/chunks/startupProfiler-D4FBdEQr.js +1 -0
  249. package/dist/chunks/{startupProfiler-DCn_NxMH.js → startupProfiler-L_UWZ03w.js} +3 -3
  250. package/dist/chunks/{state-Cn_m2NOf.js → state-BAGmpVBn.js} +1 -1
  251. package/dist/chunks/state-BemZdQIl.js +1 -0
  252. package/dist/chunks/state-D_lk6z-C.js +1 -0
  253. package/dist/chunks/{staticRender-BIxpgNUq.js → staticRender-DrU6eWoq.js} +1 -1
  254. package/dist/chunks/{stats-Duk7_xjQ.js → stats-IzV0_vEc.js} +1 -1
  255. package/dist/chunks/{status-peiVB_2j.js → status-CeVP_uDT.js} +1 -1
  256. package/dist/chunks/status-Dzuw3hBv.js +2 -0
  257. package/dist/chunks/statusNoticeHelpers-Bb9gxdSt.js +1 -0
  258. package/dist/chunks/{stringUtils-B6FudhoZ.js → stringUtils-C84IJ91d.js} +1 -1
  259. package/dist/chunks/subprocessEnv-CZkA9Cdp.js +1 -0
  260. package/dist/chunks/{subprocessEnv-vrwzMgKn.js → subprocessEnv-Ci8VV_bi.js} +1 -1
  261. package/dist/chunks/switcher-4KzBvuKH.js +1 -0
  262. package/dist/chunks/{switcher-BAMqSX7Z.js → switcher-CCs9xl1z.js} +1 -1
  263. package/dist/chunks/{syncCache-Zl9kZRRl.js → syncCache-CBRiRU5x.js} +1 -1
  264. package/dist/chunks/tasks-DZDhgx0w.js +1 -0
  265. package/dist/chunks/teleport-Bw0jSxe9.js +1 -0
  266. package/dist/chunks/{templateJobs-DR5fKFiO.js → templateJobs-CrNPEKkh.js} +1 -1
  267. package/dist/chunks/{terminalSetup-DgRBt-JJ.js → terminalSetup-CBqcwQll.js} +1 -1
  268. package/dist/chunks/terminalSetup-D-N8YPiQ.js +33 -0
  269. package/dist/chunks/{theme-Bz6esfST.js → theme-Dazsirbw.js} +1 -1
  270. package/dist/chunks/{tmux-DSU9tYIo.js → tmux-DewYVEBm.js} +1 -1
  271. package/dist/chunks/{toolEventObserver-BSekCkM2.js → toolEventObserver-lnHJ9fLQ.js} +1 -1
  272. package/dist/chunks/toolPool-CkXFlqsn.js +1 -0
  273. package/dist/chunks/{trustedDevice-B0x9X0fb.js → trustedDevice-CFf5yaG-.js} +1 -1
  274. package/dist/chunks/trustedDevice-CuwSv8dG.js +1 -0
  275. package/dist/chunks/{types-D7_37tP2.js → types-3j8PS-Du.js} +1 -1
  276. package/dist/chunks/{udsClient-CHoMMH28.js → udsClient-e9dIkwVA.js} +1 -1
  277. package/dist/chunks/updateCCB-BPe9_FW6.js +11 -0
  278. package/dist/chunks/{upstreamproxy-Hmq-n8fw.js → upstreamproxy-DF00RzGG.js} +1 -1
  279. package/dist/chunks/useExitOnCtrlCDWithKeybindings-ChqBs9Lr.js +1 -0
  280. package/dist/chunks/useMainLoopModel-2-eujv0n.js +1 -0
  281. package/dist/chunks/useManagePlugins-CYBIkaB1.js +1 -0
  282. package/dist/chunks/useMergedTools-Dk5cPqLc.js +1 -0
  283. package/dist/chunks/useSearchInput-C7Y1I9P9.js +1 -0
  284. package/dist/chunks/useSettingsErrors-DAEO7AyB.js +1 -0
  285. package/dist/chunks/{userAgent-BxTG7IMk.js → userAgent-CIq27vUR.js} +1 -1
  286. package/dist/chunks/util-VO98TdOz.js +1 -0
  287. package/dist/chunks/{validatePlugin-AHl-g4ct.js → validatePlugin-Kk6pxnO2.js} +1 -1
  288. package/dist/chunks/vim-EYQn94Kx.js +1 -0
  289. package/dist/chunks/{which-CHLNJmtJ.js → which-DzFN5TNM.js} +1 -1
  290. package/dist/chunks/{windowsPaths-o62uq6LF.js → windowsPaths-BU3yQWTB.js} +1 -1
  291. package/dist/chunks/windowsPaths-DgZ3YY4a.js +1 -0
  292. package/dist/chunks/{workSecret-DG9shvG0.js → workSecret-DUqdPy44.js} +1 -1
  293. package/dist/chunks/workerRegistry-C07BcZIw.js +6 -0
  294. package/dist/chunks/worktree-dFUkhVE_.js +1 -0
  295. package/dist/cli.js +1 -1
  296. package/package.json +1 -1
  297. package/dist/chunks/AddWorkspaceDirectory-CwLtQld4.js +0 -1
  298. package/dist/chunks/App-Ba52HvYC.js +0 -1
  299. package/dist/chunks/ApproveApiKey-CEIfuUh0.js +0 -1
  300. package/dist/chunks/ApproveApiKey-D2MLQu2P.js +0 -1
  301. package/dist/chunks/BackgroundTasksDialog-IGDrkbWl.js +0 -2
  302. package/dist/chunks/BypassPermissionsModeDialog-GYhq--JR.js +0 -1
  303. package/dist/chunks/ClaudeMdExternalIncludesDialog-C-CTa-95.js +0 -1
  304. package/dist/chunks/ClaudeMdExternalIncludesDialog-Catv6BCJ.js +0 -1
  305. package/dist/chunks/ConsoleOAuthFlow-BeQXqUtX.js +0 -1
  306. package/dist/chunks/DiffDialog-AC5DSJrq.js +0 -6
  307. package/dist/chunks/Doctor-B9Rxsoy0.js +0 -1
  308. package/dist/chunks/Doctor-lhUBhEy5.js +0 -3
  309. package/dist/chunks/ExitFlow-Cu8SoQHs.js +0 -2
  310. package/dist/chunks/Grove-Bc4CofEj.js +0 -11
  311. package/dist/chunks/InvalidConfigDialog-BI13il58.js +0 -1
  312. package/dist/chunks/InvalidSettingsDialog-CtOheV1K.js +0 -1
  313. package/dist/chunks/MCPConnectionManager-ao-P3xSA.js +0 -1
  314. package/dist/chunks/MCPToolListView-dkofcJs4.js +0 -1
  315. package/dist/chunks/McpParsingWarnings-BS4JoR5l.js +0 -1
  316. package/dist/chunks/MessageSelector-B88b2ypw.js +0 -3
  317. package/dist/chunks/Messages-BPeI7lLV.js +0 -11
  318. package/dist/chunks/Onboarding-c2fQ8Io_.js +0 -1
  319. package/dist/chunks/PromptInputFooterSuggestions-D1cH9sDX.js +0 -1
  320. package/dist/chunks/PromptInputHelpMenu-DDD5WuK0.js +0 -1
  321. package/dist/chunks/QueryEngine-Cv_meCam.js +0 -1
  322. package/dist/chunks/REPL-BXhAQOXb.js +0 -139
  323. package/dist/chunks/REPL-YqjLnr3A.js +0 -1
  324. package/dist/chunks/RemoteSessionManager-CT7T8BaR.js +0 -2
  325. package/dist/chunks/ResumeConversation-CIZCjms9.js +0 -1
  326. package/dist/chunks/SearchExtraToolsTool-Dx6093yw.js +0 -1
  327. package/dist/chunks/Settings-CyUm0AtU.js +0 -2
  328. package/dist/chunks/TeleportProgress-C3qyp5zy.js +0 -1
  329. package/dist/chunks/TeleportRepoMismatchDialog-BV--nyYn.js +0 -1
  330. package/dist/chunks/TeleportResumeWrapper-Blo2cZg-.js +0 -1
  331. package/dist/chunks/ThemePicker-EQ6hPUeI.js +0 -1
  332. package/dist/chunks/WelcomeV2-Ci9VwPYh.js +0 -1
  333. package/dist/chunks/add-dir-DPQV0qml.js +0 -1
  334. package/dist/chunks/agents-DmybpgDN.js +0 -103
  335. package/dist/chunks/allErrors-BPn_2TrB.js +0 -1
  336. package/dist/chunks/analytics-CkYUHW_U.js +0 -1
  337. package/dist/chunks/ant-DjdvlLOo.js +0 -1
  338. package/dist/chunks/api-AMgj1zf_.js +0 -1
  339. package/dist/chunks/asciicast-BJNYO5sh.js +0 -4
  340. package/dist/chunks/asciicast-CH6hdK0a.js +0 -1
  341. package/dist/chunks/attributionTrailer-oKKrF3z8.js +0 -1
  342. package/dist/chunks/auth-CNjDn1VY.js +0 -15
  343. package/dist/chunks/auth-CZzP483s.js +0 -1
  344. package/dist/chunks/auth-DDSBm_Yj.js +0 -1
  345. package/dist/chunks/autonomy-D4xZLOdJ.js +0 -15
  346. package/dist/chunks/backgroundHousekeeping--eBgphcg.js +0 -17
  347. package/dist/chunks/backgroundHousekeeping-VV1V_Y2Z.js +0 -1
  348. package/dist/chunks/bg-BK_9J6F6.js +0 -1
  349. package/dist/chunks/branch-BYq0zpzT.js +0 -3
  350. package/dist/chunks/bridgeConfig-C82un7rJ.js +0 -1
  351. package/dist/chunks/bridgeMessaging-YqYdl6ej.js +0 -1
  352. package/dist/chunks/btw-CUV3nRrE.js +0 -1
  353. package/dist/chunks/caches-BZ59_En6.js +0 -1
  354. package/dist/chunks/caches-Cg-HtWKG.js +0 -1
  355. package/dist/chunks/client-DQXvVKND.js +0 -1
  356. package/dist/chunks/client-DkgC-mFB.js +0 -1
  357. package/dist/chunks/color-CBsNbt1s.js +0 -1
  358. package/dist/chunks/commands-qM5z_Uld.js +0 -1
  359. package/dist/chunks/compact-BclJiRJe.js +0 -2
  360. package/dist/chunks/completionCache-BMHAktkM.js +0 -1
  361. package/dist/chunks/config-CE058cvr.js +0 -3
  362. package/dist/chunks/config-D81avYye.js +0 -1
  363. package/dist/chunks/config-DpOOllGk.js +0 -1
  364. package/dist/chunks/context-noninteractive-DJb8H_hN.js +0 -1
  365. package/dist/chunks/context-sR9fJmXE.js +0 -1
  366. package/dist/chunks/conversation-D48Kt3ar.js +0 -1
  367. package/dist/chunks/conversation-fOFTa7k5.js +0 -1
  368. package/dist/chunks/createSession-CSwlW2T2.js +0 -1
  369. package/dist/chunks/crossProjectResume-lDFB2ZcY.js +0 -40
  370. package/dist/chunks/cwd-5Xr-Qka6.js +0 -1
  371. package/dist/chunks/cwd-C5ce-7WB.js +0 -1
  372. package/dist/chunks/daemon-ZtpTZWgQ.js +0 -2
  373. package/dist/chunks/datadog-BJn5ECIu.js +0 -1
  374. package/dist/chunks/detectRepository-DqQvyj_a.js +0 -1
  375. package/dist/chunks/directoryCompletion-BagQcynj.js +0 -1
  376. package/dist/chunks/doctor-BEHYm34V.js +0 -1
  377. package/dist/chunks/earlyInput-xcoTbKQn.js +0 -1
  378. package/dist/chunks/entry-BzL1MFQG.js +0 -14
  379. package/dist/chunks/envUtils-DSxRz_kt.js +0 -1
  380. package/dist/chunks/esm-BLPbfHQd.js +0 -1
  381. package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +0 -1
  382. package/dist/chunks/exit-DE2YiAhQ.js +0 -1
  383. package/dist/chunks/extraUsage-Dw7AXiH7.js +0 -1
  384. package/dist/chunks/extractMemories-DxTUMiv3.js +0 -1
  385. package/dist/chunks/fast-CHmMkIpE.js +0 -1
  386. package/dist/chunks/fast-uQASHWqR.js +0 -1
  387. package/dist/chunks/featureCheck-CrJeuheQ.js +0 -1
  388. package/dist/chunks/featureCheck-HslM03dr.js +0 -1
  389. package/dist/chunks/fileSuggestions-Dyu2kQtE.js +0 -3
  390. package/dist/chunks/firstPartyEventLogger-D5ohKbIe.js +0 -5
  391. package/dist/chunks/firstPartyEventLogger-LsNY6yOt.js +0 -1
  392. package/dist/chunks/flushGate-Cnsu4HET.js +0 -1
  393. package/dist/chunks/gemini-Cudre91e.js +0 -1
  394. package/dist/chunks/generateRecap-CiFxXlmH.js +0 -1
  395. package/dist/chunks/generateSessionName-DitoBxJT.js +0 -1
  396. package/dist/chunks/git-D6dOU2mT.js +0 -1
  397. package/dist/chunks/githubRepoPathMapping-DGr0kJ8D.js +0 -1
  398. package/dist/chunks/goal-DuUayfDg.js +0 -3
  399. package/dist/chunks/grok-tRbmZzEh.js +0 -1
  400. package/dist/chunks/grove-Cv19v6Sv.js +0 -7
  401. package/dist/chunks/help-DkqxbFDM.js +0 -1
  402. package/dist/chunks/hooks-CsP42iOp.js +0 -1
  403. package/dist/chunks/initReplBridge-DdsSWVqN.js +0 -1
  404. package/dist/chunks/intl-cKc-V6Mq.js +0 -1
  405. package/dist/chunks/keybindings-DZU3vwo3.js +0 -2
  406. package/dist/chunks/language-DHhXLb_Y.js +0 -1
  407. package/dist/chunks/language-s-dLbdVz.js +0 -1
  408. package/dist/chunks/launchLocalMemory-twLxpPvg.js +0 -3
  409. package/dist/chunks/launchOnboarding-BWz2XSb9.js +0 -8
  410. package/dist/chunks/lib-rQZENxQg.js +0 -8
  411. package/dist/chunks/loadAgentsDir-CMNFLt7R.js +0 -1
  412. package/dist/chunks/loadPluginHooks-BPnxcgrL.js +0 -1
  413. package/dist/chunks/localSearch-DzQODFap.js +0 -1
  414. package/dist/chunks/log-CZ0zYP_c.js +0 -1
  415. package/dist/chunks/logoV2Utils-CGUJ-5gY.js +0 -1
  416. package/dist/chunks/main-D4Uk-WUs.js +0 -862
  417. package/dist/chunks/managedEnv-DLVRBaA9.js +0 -1
  418. package/dist/chunks/mcp-BMVdGknC.js +0 -1
  419. package/dist/chunks/mcp-COS5RJFS.js +0 -6
  420. package/dist/chunks/mcp-tGsOW1GN.js +0 -2
  421. package/dist/chunks/memory-DR6poqeH.js +0 -1
  422. package/dist/chunks/mode-QV-NW1Wd.js +0 -2
  423. package/dist/chunks/model-BF_4ebyl.js +0 -1
  424. package/dist/chunks/model-BNU_ulDJ.js +0 -1
  425. package/dist/chunks/model-CwO-g1RW.js +0 -1
  426. package/dist/chunks/nativeInstaller-B-lNJjM-.js +0 -1
  427. package/dist/chunks/oauth-BqJqV-2M.js +0 -1
  428. package/dist/chunks/oauth-C8X_p8Gc.js +0 -1
  429. package/dist/chunks/omit-DZCEXri5.js +0 -1
  430. package/dist/chunks/onChangeAppState-BmfM5g-D.js +0 -1
  431. package/dist/chunks/p-map-B1EeBuI8.js +0 -1
  432. package/dist/chunks/p-map-HKDr3iDo.js +0 -1
  433. package/dist/chunks/panelCall-SbffM7G4.js +0 -1
  434. package/dist/chunks/parser-DrBC8nWp.js +0 -1
  435. package/dist/chunks/partition-DKuAFJkc.js +0 -1
  436. package/dist/chunks/path-Cv9QMBAX.js +0 -1
  437. package/dist/chunks/permissions-ey-bfanE.js +0 -3
  438. package/dist/chunks/pidLock-DJnS_38v.js +0 -3
  439. package/dist/chunks/pipeTransport-DVOKR4c_.js +0 -1
  440. package/dist/chunks/plan-Brg9XnRr.js +0 -1
  441. package/dist/chunks/plugin-CRwa39Y1.js +0 -17
  442. package/dist/chunks/pluginAutoupdate-D0LIP7cy.js +0 -1
  443. package/dist/chunks/pluginCliCommands-BJM5Bdpf.js +0 -1
  444. package/dist/chunks/pluginOperations-C7p_Qr2r.js +0 -2
  445. package/dist/chunks/pluginStartupCheck-C0HqhG6D.js +0 -1
  446. package/dist/chunks/plugins-DUKNjLq6.js +0 -4
  447. package/dist/chunks/poorMode-CejPNCp-.js +0 -1
  448. package/dist/chunks/print-gyTOCJzk.js +0 -23
  449. package/dist/chunks/processBashCommand-Cze9vCm6.js +0 -1
  450. package/dist/chunks/processSlashCommand-BRajh1v7.js +0 -5
  451. package/dist/chunks/prompt-B7joRiqj.js +0 -139
  452. package/dist/chunks/prompt-DqSMh2x9.js +0 -1
  453. package/dist/chunks/prompt-Eysh8Et_.js +0 -1
  454. package/dist/chunks/promptEditor-R_acDAgI.js +0 -4
  455. package/dist/chunks/reconciler-BfkO6X2X.js +0 -4
  456. package/dist/chunks/refresh-C1X3sptR.js +0 -1
  457. package/dist/chunks/reload-plugins-C0osFcNh.js +0 -1
  458. package/dist/chunks/remoteManagedSettings-B1mnRDmA.js +0 -1
  459. package/dist/chunks/rename-B3tf-YiD.js +0 -1
  460. package/dist/chunks/replBridgeHandle-CNwNIijW.js +0 -1
  461. package/dist/chunks/resume-Be1G_GBL.js +0 -2
  462. package/dist/chunks/ripgrep-C2PhTJDh.js +0 -1
  463. package/dist/chunks/rollback-BPWRKlIZ.js +0 -11
  464. package/dist/chunks/sandbox-adapter-C6GBuJPB.js +0 -1
  465. package/dist/chunks/sandbox-toggle-jEySONTW.js +0 -1
  466. package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +0 -1
  467. package/dist/chunks/searchExtraTools-C_UTryh_.js +0 -1
  468. package/dist/chunks/session-DDI1Eb2x.js +0 -2
  469. package/dist/chunks/sessionDataUploader-CaCjwsA2.js +0 -1
  470. package/dist/chunks/sessionFileAccessHooks-DfJ7Htfl.js +0 -1
  471. package/dist/chunks/sessionMemory-CQBxPkTQ.js +0 -1
  472. package/dist/chunks/sessionMemory-s0ALUHvc.js +0 -1
  473. package/dist/chunks/sessionMemoryUtils-xt7dTHGC.js +0 -1
  474. package/dist/chunks/sessionObserver-C2sYqWL3.js +0 -1
  475. package/dist/chunks/sessionState-CjNY991n.js +0 -11
  476. package/dist/chunks/sessionStorage-DqsY-7pi.js +0 -1
  477. package/dist/chunks/sessionTitle-B0OYf5nM.js +0 -14
  478. package/dist/chunks/sessionTracing-CwsXt_uA.js +0 -11
  479. package/dist/chunks/settings-BWtOA9A7.js +0 -1
  480. package/dist/chunks/settings-hQDLwPVj.js +0 -20
  481. package/dist/chunks/settingsSync-DdFagwHV.js +0 -1
  482. package/dist/chunks/setup-DzC22EkN.js +0 -3
  483. package/dist/chunks/shadowedRuleDetection-C86PTj1m.js +0 -1
  484. package/dist/chunks/sinks-5G_xhc1Q.js +0 -1
  485. package/dist/chunks/sinks-Cftq7Es0.js +0 -2
  486. package/dist/chunks/skillChangeDetector-plLveEbf.js +0 -1
  487. package/dist/chunks/skills-zGYaYfFV.js +0 -1
  488. package/dist/chunks/startupProfiler-JbpAkfNE.js +0 -1
  489. package/dist/chunks/state-C2OSZkV1.js +0 -1
  490. package/dist/chunks/state-DU9lRJ9x.js +0 -1
  491. package/dist/chunks/status-CFw-FpZM.js +0 -2
  492. package/dist/chunks/statusNoticeHelpers-B5U5c9PE.js +0 -1
  493. package/dist/chunks/subprocessEnv-BSQSomcK.js +0 -1
  494. package/dist/chunks/switcher-hgBgVzLb.js +0 -1
  495. package/dist/chunks/tasks-BxpyRhmD.js +0 -1
  496. package/dist/chunks/teleport-CwxeD5vL.js +0 -1
  497. package/dist/chunks/terminalSetup-DlaFWI81.js +0 -33
  498. package/dist/chunks/toolPool-B7SIoDw5.js +0 -1
  499. package/dist/chunks/trustedDevice-CjHQtVkO.js +0 -1
  500. package/dist/chunks/up-B8wBSpLg.js +0 -12
  501. package/dist/chunks/updateCCB-D_kGQKPT.js +0 -11
  502. package/dist/chunks/useExitOnCtrlCDWithKeybindings-Cce612uS.js +0 -1
  503. package/dist/chunks/useMainLoopModel-BICP6_Fi.js +0 -1
  504. package/dist/chunks/useManagePlugins-DtbY_vPL.js +0 -1
  505. package/dist/chunks/useMergedTools-Ckx2IEhF.js +0 -1
  506. package/dist/chunks/useSearchInput-BAgljZUl.js +0 -1
  507. package/dist/chunks/useSettingsErrors-CAJR_wpd.js +0 -1
  508. package/dist/chunks/util-DDtmyq_r.js +0 -1
  509. package/dist/chunks/vim-kg-mRVbu.js +0 -1
  510. package/dist/chunks/windowsPaths-Pmx8LDR6.js +0 -1
  511. package/dist/chunks/workerRegistry-C7H_lsQX.js +0 -6
  512. package/dist/chunks/worktree-O2p-mJdF.js +0 -1
@@ -0,0 +1,11 @@
1
+ import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{l as r,o as i}from"./envUtils-BDhHQY0-.js";import{n as a,t as o}from"./figures-5ThXQEtq.js";import{$C as s,$f as c,BT as l,Ba as u,Bf as d,Cg as f,Da as p,Ea as m,Fa as h,GC as g,Gu as _,HC as v,Ia as y,JC as b,Ja as x,LS as S,LT as C,MT as w,Ma as ee,Mp as te,NT as T,Na as E,Np as ne,Pa as re,Qa as ie,Qf as ae,RS as oe,Sb as D,Tp as O,UC as se,Ua as k,Uu as A,VC as j,Vf as M,WC as ce,Wu as N,Xf as le,YC as ue,Za as de,Zf as fe,_a as pe,_g as me,aa as he,eo as ge,ep as _e,fa as ve,gg as P,ia as ye,oa as be,pa as xe,qf as Se,r_ as Ce,tp as we,vb as Te,vh as Ee,wb as F,wg as De,wp as Oe,xb as ke,yh as Ae,zC as je,zS as Me,za as I,zf as Ne}from"./loadAgentsDir-C7lOqvfh.js";import{C as Pe,Gr as L,I as R,N as Fe,P as z,Pn as Ie,Rn as Le,di as Re,fi as B,j as ze,mt as Be,ot as Ve,t as V,ui as He,xt as Ue}from"./src-P_wYS_NJ2.js";import{t as H}from"./jsx-runtime-Bb4Xn-E0.js";import{B as We,Wt as Ge}from"./state-BemZdQIl.js";import{n as Ke,t as qe}from"./cwd-Cfdf7z7s.js";import{a as Je,l as Ye,o as Xe,r as Ze,s as Qe}from"./debug-RAynG_nM.js";import{Ut as $e,Vt as et,g as tt,n as nt}from"./settings-DnptdP79.js";import{c as rt,h as it,y as at}from"./config-Do1870_d.js";import{B as ot,L as st,R as ct,q as lt}from"./log-CezCRpAN.js";import{b as ut,f as dt,m as ft,v as pt}from"./startupProfiler-L_UWZ03w.js";import{l as mt,o as ht}from"./stringUtils-C84IJ91d.js";import{Bt as gt,Dt as _t,E as vt,Gt as yt,St as bt,Tt as xt,_ as St,_n as Ct,b as wt,vn as Tt}from"./model-BsZ4sP_H.js";import{bn as Et,vn as Dt}from"./prompt-M2lu8_Oa.js";import{d as Ot,f as kt,h as At,p as jt}from"./terminalSetup-D-N8YPiQ.js";import{_ as Mt,x as Nt}from"./sessionState-Bifmu95-.js";import{n as Pt,t as Ft}from"./systemTheme-Ceakddth.js";import{n as It,r as Lt}from"./PromptInputFooterSuggestions-BSA9NrZc.js";import{n as Rt,t as zt}from"./useMainLoopModel-2-eujv0n.js";import{n as Bt,t as Vt}from"./modalContext-CUThy6Ph.js";import{n as Ht,r as Ut,t as Wt}from"./statusNoticeHelpers-Bb9gxdSt.js";import{a as Gt,c as Kt,i as qt,l as Jt,n as Yt,o as Xt,r as Zt,t as Qt,u as $t}from"./logoV2Utils-BkQfyQ1-.js";import{homedir as en}from"os";import{relative as tn}from"path";import{fileURLToPath as nn}from"url";function rn(e,t){for(let n of e)if(!t.has(n))return!1;return!0}var an=t((()=>{}));function on(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`)||p(t.text,`status`)!==`completed`?!1:p(t.text,`summary`)?.startsWith(`Background command `)??!1}function sn(e,t){if(!me()||t)return e;let n=[],r=0;for(;r<e.length;){let t=e[r];if(on(t)){let i=0;for(;r<e.length&&on(e[r]);)i++,r++;i===1?n.push(t):n.push({...t,message:{role:`user`,content:[{type:`text`,text:`<${ot}><${st}>completed</${st}><${ct}>${i} background commands completed</${ct}></${ot}>`}]}})}else n.push(t),r++}return n}var cn=t((()=>{lt(),Ce(),P(),u()}));function ln(e){return e.type===`system`&&e.subtype===`stop_hook_summary`&&e.hookLabel!==void 0}function un(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(ln(r)){let i=r.hookLabel,a=[];for(;n<e.length;){let t=e[n];if(!ln(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 dn=t((()=>{}));function fn(e){let t=hn.get(e);return t||(t=new Set(e.filter(e=>e.renderGroupedToolUse).map(e=>e.name)),hn.set(e,t)),t}function pn(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 mn(e,t,n=!1){if(n)return{messages:e};let r=fn(t),i=new Map;for(let t of e){let e=pn(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=pn(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=pn(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 hn,gn=t((()=>{hn=new WeakMap}));function _n(e){let t=Cn.get(e);if(t!==void 0)return t;let n=vn(e).toLowerCase();return Cn.set(e,n),n}function vn(e){let t=``;switch(e.type){case`user`:{let n=e.message.content;if(typeof n==`string`)t=Sn.has(n)?``:n;else{let r=[];for(let t of n??[])t.type===`text`?Sn.has(t.text)||r.push(t.text):t.type===`tool_result`&&r.push(bn(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`?[yn(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(xn,r);if(e<0)break;n=n.slice(0,r)+n.slice(e+18),r=n.indexOf(`<system-reminder>`)}return n}function yn(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 bn(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 xn,Sn,Cn,wn=t((()=>{u(),xn=`</system-reminder>`,Sn=new Set([he,be]),Cn=new WeakMap}));function Tn({pose:e=`default`}={}){return(0,En.jsxs)(R,{flexDirection:`column`,alignItems:`center`,children:[(0,En.jsx)(z,{color:`clawd_body`,children:` █████ `}),(0,En.jsx)(z,{color:`clawd_body`,children:`██ ● ● ██`}),(0,En.jsx)(z,{color:`clawd_body`,children:`██ ▄▄▄ ██`}),(0,En.jsx)(z,{color:`clawd_body`,children:` █ █ █ █ `})]})}var En,Dn=t((()=>{B(),V(),En=H()}));function On(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 kn({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,U.jsxs)(R,{flexDirection:`column`,width:t,children:[(0,U.jsx)(z,{bold:!0,color:`claude`,children:n}),o?(0,U.jsxs)(U.Fragment,{children:[o.content,i&&(0,U.jsx)(z,{dimColor:!0,italic:!0,children:ut(i,t)})]}):r.length===0&&a?(0,U.jsx)(z,{dimColor:!0,children:ut(a,t)}):(0,U.jsxs)(U.Fragment,{children:[r.map((e,n)=>{let r=Math.max(10,t-(s>0?s+2:0));return(0,U.jsxs)(z,{children:[s>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(z,{dimColor:!0,children:(e.timestamp||``).padEnd(s)}),` `]}),(0,U.jsx)(z,{children:ut(e.text,r)})]},n)}),i&&(0,U.jsx)(z,{dimColor:!0,italic:!0,children:ut(i,t)})]})]})}var U,An=t((()=>{B(),V(),pt(),U=H()}));function jn({feeds:e,maxWidth:t}){let n=e.map(e=>On(e)),r=Math.max(...n),i=Math.min(r,t);return(0,Nn.jsx)(R,{flexDirection:`column`,children:e.map((t,n)=>(0,Nn.jsxs)(Mn.Fragment,{children:[(0,Nn.jsx)(kn,{config:t,actualWidth:i}),n<e.length-1&&(0,Nn.jsx)(Pe,{color:`claude`,width:i})]},n))})}var Mn,Nn,Pn=t((()=>{Mn=n(B(),1),V(),An(),Nn=H()}));function Fn(e){let t=e.map(e=>{let t=ft(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 In(e){let t=e.filter(({isEnabled:e})=>e).sort((e,t)=>Number(e.isComplete)-Number(t.isComplete)).map(({text:e,isComplete:t})=>({text:`${t?`${o.tick} `:``}${e}`})),n=qe()===en()?`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}}var Ln=t((()=>{a(),Ke(),pt()}));function Rn(e,t,n){return Array.from({length:n},()=>({pose:e,offset:t}))}function zn(){let{pose:e,bounceOffset:t,onClick:n}=Bn();return(0,Hn.jsx)(R,{height:Jn,flexDirection:`column`,onClick:n,children:(0,Hn.jsx)(R,{marginTop:t,flexShrink:0,children:(0,Hn.jsx)(Tn,{pose:e})})})}function Bn(){let[e]=(0,Vn.useState)(()=>nt().prefersReducedMotion??!1),[t,n]=(0,Vn.useState)(-1),r=(0,Vn.useRef)(Un),i=()=>{e||t!==-1||(r.current=Wn[Math.floor(Math.random()*Wn.length)],n(0))};(0,Vn.useEffect)(()=>{if(t===-1)return;if(t>=r.current.length){n(-1);return}let e=setTimeout(n,Kn,qn);return()=>clearTimeout(e)},[t]);let a=r.current,o=t>=0&&t<a.length?a[t]:Gn;return{pose:o.pose,bounceOffset:o.offset,onClick:i}}var Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn=t((()=>{B(),Vn=n(B(),1),V(),tt(),Dn(),Hn=H(),Un=[...Rn(`default`,1,2),...Rn(`arms-up`,0,3),...Rn(`default`,0,1),...Rn(`default`,1,2),...Rn(`arms-up`,0,3),...Rn(`default`,0,1)],Wn=[Un,[...Rn(`look-right`,0,5),...Rn(`look-left`,0,5),...Rn(`default`,0,1)]],Gn={pose:`default`,offset:0},Kn=60,qn=e=>e+1,Jn=3}));function Xn(){let{columns:e}=Ve(),t=De(e=>e.agent),n=vt(Rt()),{version:r,cwd:i,billingType:a,agentName:o}=Xt(),s=t??o,c=Math.max(e-15,20),l=ut(r,Math.max(c-11,6)),{shouldSplit:u,truncatedModel:d,truncatedBilling:f}=Zt(n,a,c),p=s?c-1-L(s)-3:c,m=$t(i,Math.max(p,10));return(0,W.jsx)(Ee,{children:(0,W.jsxs)(R,{flexDirection:`row`,gap:2,alignItems:`center`,children:[me()?(0,W.jsx)(zn,{}):(0,W.jsx)(Tn,{}),(0,W.jsxs)(R,{flexDirection:`column`,children:[(0,W.jsxs)(z,{children:[(0,W.jsx)(z,{bold:!0,children:`Work Mate`}),` `,(0,W.jsxs)(z,{dimColor:!0,children:[`v`,l]})]}),u?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(z,{dimColor:!0,children:d}),(0,W.jsx)(z,{dimColor:!0,children:f})]}):(0,W.jsxs)(z,{dimColor:!0,children:[d,` · `,f]}),(0,W.jsx)(z,{dimColor:!0,children:s?`@${s} · ${m}`:m})]})]})})}var W,Zn=t((()=>{zt(),s(),V(),f(),pt(),P(),Jt(),St(),Ae(),Yn(),Dn(),W=H()}));function Qn(){let e=(0,er.useMemo)($n,[]),t=(0,er.useMemo)(()=>rt().lastShownEmergencyTip,[]),n=e.tip&&e.tip!==t;return(0,er.useEffect)(()=>{n&&at(t=>t.lastShownEmergencyTip===e.tip?t:{...t,lastShownEmergencyTip:e.tip})},[n,e.tip]),n?(0,tr.jsx)(R,{paddingLeft:2,flexDirection:`column`,children:(0,tr.jsx)(z,{...e.color===`warning`?{color:`warning`}:e.color===`error`?{color:`error`}:{dimColor:!0},children:e.tip})}):null}function $n(){return nr}var er,tr,nr,rr=t((()=>{B(),er=n(B(),1),V(),it(),tr=H(),nr={tip:``,color:`dim`}}));function ir({char:e=`✻`}){let[t]=(0,ar.useState)(()=>nt().prefersReducedMotion??!1),[n,r]=(0,ar.useState)(t),i=(0,ar.useRef)(null),[a,o]=Be(n?null:50);return(0,ar.useEffect)(()=>{if(n)return;let e=setTimeout(r,cr,!0);return()=>clearTimeout(e)},[n]),n?(0,or.jsx)(R,{ref:a,children:(0,or.jsx)(z,{color:lr,children:e})}):(i.current===null&&(i.current=o),(0,or.jsx)(R,{ref:a,children:(0,or.jsx)(z,{color:_(A((o-i.current)/sr*360%360)),children:e})}))}var ar,or,sr,cr,lr,ur=t((()=>{B(),ar=n(B(),1),$e(),V(),tt(),N(),or=H(),sr=1500,cr=sr*2,lr=_({r:153,g:153,b:153})}));function dr(){return wt()&&(rt().opus1mMergeNoticeSeenCount??0)<hr}function fr(){let[e]=(0,pr.useState)(dr);return(0,pr.useEffect)(()=>{if(!e)return;let t=(rt().opus1mMergeNoticeSeenCount??0)+1;at(e=>(e.opus1mMergeNoticeSeenCount??0)>=t?e:{...e,opus1mMergeNoticeSeenCount:t})},[e]),e?(0,mr.jsxs)(R,{paddingLeft:2,children:[(0,mr.jsx)(ir,{char:`↑`}),(0,mr.jsx)(z,{dimColor:!0,children:` Opus now defaults to 1M context · 5x more room, same pricing`})]}):null}var pr,mr,hr,gr=t((()=>{B(),pr=n(B(),1),$e(),V(),it(),St(),ur(),mr=H(),hr=6}));function _r(){let e=Kt(),t=rt().oauthAccount?.displayName??``,{columns:n}=Ve(),i=At(),a=C.isSandboxingEnabled(),o=De(e=>e.agent),s=rt(),[c]=(0,vr.useState)(()=>{let e=nt().companyAnnouncements;if(!(!e||e.length===0))return s.numStartups===1?e[0]:e[Math.floor(Math.random()*e.length)]});(0,vr.useEffect)(()=>{i&&kt()},[i]),!i&&r(process.env.CLAUDE_CODE_FORCE_FULL_LOGO);let l=vt(Rt()),{version:u,cwd:d,billingType:f,agentName:p}=Xt(),m=o??p,h=ut(l,yr-20);if(!i&&!r(process.env.CLAUDE_CODE_FORCE_FULL_LOGO))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Xn,{}),(0,G.jsx)(fr,{}),Xe()&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(z,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(z,{dimColor:!0,children:[`Logging to: `,Qe()?`stderr`:Ze()]})]}),(0,G.jsx)(Qn,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(z,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(z,{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`})]}),c&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(z,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(z,{children:c})]})]});let g=Gt(n),_=Pt(rt().theme),v=` ${ze(`claude`,_)(`Work Mate`)} ${ze(`inactive`,_)(`v${u}`)} `,y=ze(`claude`,_)(` Work Mate `);if(g===`compact`){let e=qt(t);L(e)>n-4&&(e=qt(null));let r=m?n-4-1-L(m)-3:n-4,i=$t(d,Math.max(r,10));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ee,{children:(0,G.jsxs)(R,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:y,position:`top`,align:`start`,offset:1},paddingX:1,paddingY:1,alignItems:`center`,width:n,children:[(0,G.jsx)(z,{bold:!0,children:e}),(0,G.jsx)(R,{marginY:1,children:(0,G.jsx)(Tn,{})}),(0,G.jsx)(z,{dimColor:!0,children:h}),(0,G.jsx)(z,{dimColor:!0,children:f}),(0,G.jsx)(z,{dimColor:!0,children:m?`@${m} · ${i}`:i})]})}),(0,G.jsx)(fr,{}),a&&(0,G.jsx)(R,{marginTop:1,flexDirection:`column`,children:(0,G.jsx)(z,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})})]})}let b=qt(t),x=!process.env.IS_DEMO&&s.oauthAccount?.organizationName?`${h} · ${f} · ${s.oauthAccount.organizationName}`:`${h} · ${f}`,S=m?yr-1-L(m)-3:yr,w=$t(d,Math.max(S,10)),ee=m?`@${m} · ${w}`:w,{leftWidth:te,rightWidth:T}=Qt(n,g,Yt(b,ee,x));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ee,{children:(0,G.jsx)(R,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:v,position:`top`,align:`start`,offset:3},children:(0,G.jsxs)(R,{flexDirection:g===`horizontal`?`row`:`column`,paddingX:1,gap:1,children:[(0,G.jsxs)(R,{flexDirection:`column`,width:te,justifyContent:`space-between`,alignItems:`center`,minHeight:9,children:[(0,G.jsx)(R,{marginTop:1,children:(0,G.jsx)(z,{bold:!0,children:b})}),(0,G.jsx)(Tn,{}),(0,G.jsxs)(R,{flexDirection:`column`,alignItems:`center`,children:[(0,G.jsx)(z,{dimColor:!0,children:x}),(0,G.jsx)(z,{dimColor:!0,children:ee})]})]}),g===`horizontal`&&(0,G.jsx)(R,{height:`100%`,borderStyle:`single`,borderColor:`claude`,borderDimColor:!0,borderTop:!1,borderBottom:!1,borderLeft:!1}),g===`horizontal`&&(0,G.jsx)(jn,{feeds:i?[In(Ot()),Fn(e)]:[Fn(e)],maxWidth:T})]})})}),(0,G.jsx)(fr,{}),Xe()&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(z,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(z,{dimColor:!0,children:[`Logging to: `,Qe()?`stderr`:Ze()]})]}),(0,G.jsx)(Qn,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(z,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(z,{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`})]}),c&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(z,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(z,{children:c})]}),a&&(0,G.jsx)(R,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(z,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})})]})}var vr,G,yr,br=t((()=>{B(),V(),s(),Jt(),pt(),Dn(),Pn(),Ln(),it(),Ft(),tt(),Je(),vr=n(B(),1),jt(),Zn(),Ae(),i(),rr(),gr(),l(),f(),zt(),St(),G=H(),yr=50}));function xr({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,Sr.jsx)(R,{minWidth:L(i)+8,children:(0,Sr.jsx)(z,{dimColor:!0,children:i})})}var Sr,Cr=t((()=>{B(),V(),Sr=H()}));function wr({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,Tr.jsx)(R,{minWidth:L(n),children:(0,Tr.jsx)(z,{dimColor:!0,children:n})})}var Tr,Er=t((()=>{B(),V(),Tr=H()}));function Dr(e,t,n,r){for(let i=t+1;i<e.length;i++){let t=e[i];if(t?.type===`assistant`){let e=Pr(t.message.content);if(e?.type===`thinking`||e?.type===`redacted_thinking`||e?.type===`tool_use`&&(ae(e.name,e.input,n).isCollapsible||r.has(e.id)))continue;return!0}if(!(t?.type===`system`||t?.type===`attachment`)&&!(t?.type===`user`&&Pr(t.message.content)?.type===`tool_result`)){if(t?.type===`grouped_tool_use`){let e=Pr(t.messages[0]?.message.content)?.input;if(ae(t.toolName,e,n).isCollapsible)continue}return!0}}return!1}function Or({message:e,isUserContinuation:t,hasContentAfter:n,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,streamingToolUseIDs:s,screen:c,canAnimate:l,lastThinkingBlockId:u,latestBashOutputUUID:d,columns:f,isLoading:p,lookups:m,shouldCollapseDiffs:g}){let _=c===`transcript`,v=e.type===`grouped_tool_use`,y=e.type===`collapsed_read_search`,b=y&&(_e(e,o)||p&&!n),x=v?e.displayMessage:y?fe(e):e,S=v||y?[]:E(e,m),C=Ji(e,s,o,v||y?ye:re(e,m),c,m),w=!1;if(l)if(v)w=e.messages.some(e=>{let t=Pr(e.message.content);return t?.type===`tool_use`&&o.has(t.id)});else if(y)w=_e(e,o);else{let t=h(e);w=!t||o.has(t)}let ee=_&&x.type===`assistant`&&Array.isArray(x.message.content)&&x.message.content.some(e=>e.type===`text`)&&(x.timestamp||x.message.model),te=(0,Nr.jsx)(Ne,{message:e,lookups:m,addMargin:!ee,containerWidth:ee?void 0:f,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,progressMessagesForMessage:S,shouldAnimate:w,shouldShowDot:!0,isTranscriptMode:_,isStatic:C,isActiveCollapsedGroup:b,isUserContinuation:t,lastThinkingBlockId:u,latestBashOutputUUID:d,shouldCollapseDiffs:g});return ee?(0,Nr.jsx)(Ee,{children:(0,Nr.jsxs)(R,{width:f,flexDirection:`column`,children:[(0,Nr.jsxs)(R,{flexDirection:`row`,justifyContent:`flex-end`,gap:1,marginTop:1,children:[(0,Nr.jsx)(wr,{message:x,isTranscriptMode:_}),(0,Nr.jsx)(xr,{message:x,isTranscriptMode:_})]}),te]})}):(0,Nr.jsx)(Ee,{children:te})}function kr(e,t){if(e.type===`grouped_tool_use`)return e.messages.some(e=>{let n=Pr(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return c(e).some(e=>t.has(e));let n=h(e);return!!n&&t.has(n)}function Ar(e,t){if(e.type===`grouped_tool_use`)return e.messages.every(e=>{let n=Pr(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return c(e).every(e=>t.has(e));if(e.type===`assistant`){let n=Pr(e.message.content);if(n?.type===`server_tool_use`)return t.has(n.id)}let n=h(e);return!n||t.has(n)}function jr(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&&d(t.message))return!1;let n=kr(e.message,e.streamingToolUseIDs),r=Ar(e.message,e.lookups.resolvedToolUseIDs);return!(n||!r)}var Mr,Nr,Pr,Fr,Ir=t((()=>{Mr=n(B(),1),V(),we(),u(),M(),Nr=H(),Cr(),ra(),Er(),Ae(),Pr=e=>{if(!Array.isArray(e))return;let t=e[0];if(!(t==null||typeof t==`string`))return t},Fr=Mr.memo(Or,jr)}));function Lr(e){return e.type===`attachment`&&Rr.has(e.attachment.type)}var Rr,zr=t((()=>{Rr=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.todo_reminder.context_efficiency.deferred_tools_delta.mcp_instructions_delta.token_usage.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 Br(e){return Kr.filter(t=>t.isActive(e))}var K,Vr,Hr,Ur,Wr,Gr,Kr,qr=t((()=>{V(),B(),F(),a(),Ke(),pt(),gt(),Ut(),K=H(),Vr={id:`large-memory-files`,type:`warning`,isActive:e=>ke(e.memoryFiles).length>0,render:e=>(0,K.jsx)(K.Fragment,{children:ke(e.memoryFiles).map(e=>{let t=e.path.startsWith(qe())?tn(qe(),e.path):e.path;return(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Large `,(0,K.jsx)(z,{bold:!0,children:t}),` will impact performance (`,dt(e.content.length),` chars > `,dt(Te),`)`,(0,K.jsx)(z,{dimColor:!0,children:` · /memory to edit`})]})]},e.path)})})},Hr={id:`claude-ai-external-token`,type:`warning`,isActive:()=>{let e=_t();return yt()&&(e.source===`ANTHROPIC_AUTH_TOKEN`||e.source===`apiKeyHelper`)},render:()=>{let e=_t();return(0,K.jsxs)(R,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Using `,e.source,` instead of Claude account subscription token. Either unset`,` `,e.source,", or run `claude /logout`."]})]})}},Ur={id:`api-key-conflict`,type:`warning`,isActive:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0});return!!xt()&&(e===`ANTHROPIC_API_KEY`||e===`apiKeyHelper`)},render:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0});return(0,K.jsxs)(R,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Using `,e,` instead of Console key. Either unset `,e,", or run `claude /logout`."]})]})}},Wr={id:`both-auth-methods`,type:`warning`,isActive:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0}),t=_t();return e!==`none`&&t.source!==`none`&&!(e===`apiKeyHelper`&&t.source===`apiKeyHelper`)},render:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0}),t=_t();return(0,K.jsxs)(R,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{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)(R,{flexDirection:`column`,marginLeft:3,children:[(0,K.jsxs)(z,{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)(z,{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.`]})]})]})}},Gr={id:`large-agent-descriptions`,type:`warning`,isActive:e=>Ht(e.agentDefinitions)>Wt,render:e=>{let t=Ht(e.agentDefinitions);return(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Large cumulative agent descriptions will impact performance (~`,dt(t),` tokens > `,dt(Wt),`)`,(0,K.jsx)(z,{dimColor:!0,children:` · /agents to manage`})]})]})}},Kr=[Vr,Gr,Hr,Ur,Wr]}));function Jr({agentDefinitions:e}={}){let t={config:rt(),agentDefinitions:e,memoryFiles:(0,Xr.use)(D())},n=Br(t);return n.length===0?null:(0,Zr.jsx)(R,{flexDirection:`column`,paddingLeft:1,children:n.map(e=>(0,Zr.jsx)(Yr.Fragment,{children:e.render(t)},e.id))})}var Yr,Xr,Zr,Qr=t((()=>{Yr=n(B(),1),Xr=n(B(),1),V(),F(),it(),qr(),Zr=H()}));function $r(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)??si,[e]),()=>{let t=e.current;if(!t)return NaN;let n=t.getScrollTop()+t.getPendingDelta(),r=Math.floor(n/ri);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])??ei);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-ni),w=b;else{if(y){let e=v+ti;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-ti;{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*ti,y=Math.min(b,C+ai),S=0;for(w=C;w<y&&(S<h||x[w]<f+v+ti);)S+=r.current.get(t[w])??ii,w++}let e=v+2*ti,n=Math.max(0,w-ai),i=0;for(let e=C;e<w;e++)i+=r.current.get(t[e])??ii;for(;C>n&&i<e;)C--,i+=r.current.get(t[C])??ii;let o=d.current,c=Math.abs(g-a.current)+Math.abs(_);if(o&&c>v*2){let[e,t]=o;C<e-oi&&(C=e-oi),w>t+oi&&(w=t+oi),C>w&&(w=Math.min(C+oi,b))}a.current=g}f.current>0?f.current--:d.current=[C,w];let ee=(0,q.useDeferredValue)(C),te=(0,q.useDeferredValue)(w),T=C<ee?ee:C,E=w>te?te:w;if((T>E||y)&&(T=C,E=w),_>0&&(E=w),E-T>ai){let e=(x[T]+x[E])/2;g-m.current<e?E=T+ai:T=E-ai}let ne=m.current,re=x[T],ie=T===0?0:re+ne,ae=E===b?1/0:Math.max(re,x[E]-v)+ne;(0,q.useLayoutEffect)(()=>{y?e.current?.setClampBounds(void 0,void 0):e.current?.setClampBounds(ie,ae)}),(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 oe=(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},[]),D=(0,q.useCallback)(e=>{let n=s.current.get(t[e])?.yogaNode;return!n||n.getComputedWidth()===0?-1:n.getComputedTop()},[t]),O=(0,q.useCallback)(e=>s.current.get(t[e])??null,[t]),se=(0,q.useCallback)(e=>r.current.get(t[e]),[t]),k=(0,q.useCallback)(t=>{let n=o.current;t<0||t>=n.n||e.current?.scrollTo(n.arr[t]+m.current)},[e]),A=S-x[E];return{range:[T,E],topSpacer:re,bottomSpacer:A,measureRef:oe,spacerRef:h,offsets:x,getItemTop:D,getItemElement:O,getItemHeight:se,scrollToIndex:k}}var q,ei,ti,ni,ri,ii,ai,oi,si,ci=t((()=>{q=n(B(),1),ei=3,ti=40,ni=30,ri=20,ii=1,ai=200,oi=25,si=()=>{}}));function li({children:e}){let[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(null);return(0,mi.jsx)(gi.Provider,{value:n,children:(0,mi.jsx)(vi.Provider,{value:i,children:(0,mi.jsx)(hi.Provider,{value:t,children:(0,mi.jsx)(_i.Provider,{value:r,children:e})})})})}function ui(){return(0,J.useContext)(hi)}function di(){return(0,J.useContext)(_i)}function fi(e){let t=(0,J.useContext)(gi);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}function pi(e){let t=(0,J.useContext)(vi);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}var J,mi,hi,gi,_i,vi,yi=t((()=>{J=n(B(),1),mi=H(),hi=(0,J.createContext)(null),gi=(0,J.createContext)(null),_i=(0,J.createContext)(null),vi=(0,J.createContext)(null)}));function bi(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 xi(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`&&!Si(t))continue;let a=t.type===`assistant`;a&&!r&&n++,r=a}return n}function Si(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 Ci(e,t){if(t===null)return;let n=t;for(;n<e.length&&(e[n]?.type===`progress`||Lr(e[n]));)n++;let r=e[n]?.uuid;if(!r)return;let i=xi(e,t);return{firstUnseenUuid:r,count:Math.max(1,i)}}function wi({scrollable:e,bottom:t,overlay:n,bottomFloat:r,modal:i,modalScrollRef:a,scrollRef:o,dividerYRef:s,hidePill:c=!1,hideSticky:l=!1,newMessageCount:u=0,onPillClick:d}){let{rows:f,columns:p}=Ve(),[m,h]=(0,Y.useState)(null),g=(0,Y.useMemo)(()=>({setStickyPrompt:h}),[]),_=(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(!me())return;let e=Le.get(process.stdout);if(e)return e.onHyperlinkClick=e=>{if(e.startsWith(`file:`))try{Me(nn(e))}catch{}else oe(e)},()=>{e.onHyperlinkClick=void 0}},[]),me()){let s=l?null:m,h=s!=null&&s!==`clicked`&&n==null?s:null,v=s!=null&&n==null;return(0,X.jsxs)(li,{children:[(0,X.jsx)(R,{flexDirection:`row`,flexGrow:1,overflow:`hidden`,width:`100%`,children:(0,X.jsxs)(R,{flexDirection:`column`,flexGrow:1,width:p,overflow:`hidden`,children:[(0,X.jsxs)(R,{flexGrow:1,flexDirection:`column`,overflow:`hidden`,children:[h&&(0,X.jsx)(Ei,{text:h.text,onClick:h.scrollTo}),(0,X.jsxs)(Ue,{ref:o,flexGrow:1,flexDirection:`column`,paddingTop:+!v,stickyScroll:!0,children:[(0,X.jsx)(Ai,{value:g,children:e}),n]}),!c&&_&&n==null&&(0,X.jsx)(Ti,{count:u,onClick:d}),r!=null&&(0,X.jsx)(R,{position:`absolute`,bottom:0,right:0,opaque:!0,children:r})]}),(0,X.jsxs)(R,{flexDirection:`column`,flexShrink:0,width:`100%`,maxHeight:`50%`,children:[(0,X.jsx)(Di,{}),(0,X.jsx)(Oi,{}),(0,X.jsx)(R,{flexDirection:`column`,width:`100%`,flexGrow:1,overflowY:`hidden`,children:t})]})]})}),i!=null&&(0,X.jsx)(Vt,{value:{rows:f-ki-1,columns:p-4,scrollRef:a??null},children:(0,X.jsxs)(R,{position:`absolute`,bottom:0,left:0,right:0,maxHeight:f-ki,flexDirection:`column`,overflow:`hidden`,opaque:!0,children:[(0,X.jsx)(R,{flexShrink:0,children:(0,X.jsx)(z,{color:`permission`,children:`▔`.repeat(p)})}),(0,X.jsx)(R,{flexDirection:`column`,paddingX:2,flexShrink:0,overflow:`hidden`,children:i})]})})]})}return(0,X.jsxs)(X.Fragment,{children:[e,t,n,i]})}function Ti({count:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(R,{position:`absolute`,bottom:0,left:0,right:0,justifyContent:`center`,children:(0,X.jsx)(R,{onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(z,{backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,dimColor:!0,children:[` `,e>0?`${e} new ${mt(e,`message`)}`:`Jump to bottom`,` `,o.arrowDown,` `]})})})}function Ei({text:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(R,{flexShrink:0,width:`100%`,height:1,paddingRight:1,backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(z,{color:`subtle`,wrap:`truncate-end`,children:[o.pointer,` `,e]})})}function Di(){let e=ui();return!e||e.suggestions.length===0?null:(0,X.jsx)(R,{position:`absolute`,bottom:`100%`,left:0,right:0,paddingX:2,paddingTop:1,flexDirection:`column`,opaque:!0,children:(0,X.jsx)(It,{suggestions:e.suggestions,selectedSuggestion:e.selectedSuggestion,maxColumnWidth:e.maxColumnWidth,overlay:!0})})}function Oi(){let e=di();return e?(0,X.jsx)(R,{position:`absolute`,bottom:`100%`,left:0,right:0,opaque:!0,children:e}):null}var Y,X,ki,Ai,ji=t((()=>{a(),Y=n(B(),1),Bt(),yi(),s(),V(),S(),P(),ht(),zr(),Lt(),X=H(),ki=2,Ai=(0,Y.createContext)({setStickyPrompt:()=>{}})}));function Mi(e){let t=Bi.get(e);if(t!==void 0)return t;let n=_n(e);return Bi.set(e,n),n}function Ni(e){let t=Hi.get(e);if(t!==void 0)return t;let n=Pi(e);return Hi.set(e,n),n}function Pi(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=ce(t);return n.startsWith(`<`)||n===``?null:n}function Fi({itemKey:e,msg:t,idx:n,measureRef:r,expanded:i,hovered:a,clickable:o,onClickK:s,onEnterK:c,onLeaveK:l,renderItem:u}){return(0,Ri.jsx)(R,{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,Ri.jsx)(Fe.Provider,{value:a&&!i?`text`:void 0,children:u(t,n)})})}function Ii({messages:e,scrollRef:t,columns:n,itemKey:r,renderItem:i,onItemClick:a,isItemClickable:o,isItemExpanded:s,extractSearchText:c=Mi,trackStickyPrompt:l,selectedIndex:u,cursorNavRef:d,setCursor:f,jumpRef:p,onSearchMatchesChange:m,scanElement:h,setPositions:_}){let v=(0,Z.useRef)([]),y=(0,Z.useRef)(e),b=(0,Z.useRef)(r);if(b.current!==r||e.length<v.current.length||e[0]!==y.current[0])v.current=e.map(e=>r(e));else for(let t=v.current.length;t<e.length;t++)v.current.push(r(e[t]));y.current=e,b.current=r;let x=v.current,{range:S,topSpacer:C,bottomSpacer:w,measureRef:ee,spacerRef:te,offsets:T,getItemTop:E,getItemElement:ne,getItemHeight:re,scrollToIndex:ie}=$r(t,x,n),[ae,oe]=S,D=(0,Z.useCallback)(t=>re(t)!==0&&se(e[t]),[re,e]);(0,Z.useImperativeHandle)(d,()=>{let n=e=>f?.({uuid:e.uuid,msgType:e.type,expanded:!1,toolName:g(e)?.name}),r=u??-1,i=(t,r,i=D)=>{for(let a=t;a>=0&&a<e.length;a+=r)if(i(a))return n(e[a]),!0;return!1},a=t=>D(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,D]);let O=(0,Z.useRef)({offsets:T,start:ae,getItemElement:ne,getItemTop:E,messages:e,scrollToIndex:ie});O.current={offsets:T,start:ae,getItemElement:ne,getItemTop:E,messages:e,scrollToIndex:ie},(0,Z.useEffect)(()=>{if(u===void 0)return;let e=O.current,n=e.getItemElement(u);n?t.current?.scrollToElement(n,1):e.scrollToIndex(u)},[u,t]);let k=(0,Z.useRef)(null),A=(0,Z.useRef)({msgIdx:-1,positions:[]}),j=(0,Z.useRef)(-1),M=(0,Z.useRef)(0),ce=(0,Z.useRef)(0),N=(0,Z.useRef)(()=>{}),le=(0,Z.useRef)(()=>{}),ue=(0,Z.useRef)({matches:[],ptr:0,screenOrd:0,prefixSum:[]}),de=(0,Z.useRef)(-1),fe=(0,Z.useRef)(!1);function pe(e){let t=O.current.getItemTop(e);return Math.max(0,t-zi)}function me(e){let n=t.current,{msgIdx:r,positions:i}=A.current;if(!n||i.length===0||r<0){_?.(null);return}let a=Math.max(0,Math.min(e,i.length-1)),o=i[a],s=O.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-zi)),l=s-n.getScrollTop(),d=c+l+o.row),_?.({positions:i,rowOffset:c+l,currentIdx:a});let f=ue.current,p=f.prefixSum.at(-1)??0,h=(f.prefixSum[f.ptr]??0)+a+1;m?.(p,h),Ye(`highlight(i=${r}, ord=${a}/${i.length}): pos={row:${o.row},col:${o.col}} lo=${l} screenRow=${d} badge=${h}/${p}`)}le.current=me;let[he,ge]=(0,Z.useState)(0),_e=(0,Z.useCallback)(()=>ge(e=>e+1),[]);(0,Z.useEffect)(()=>{let e=k.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}=O.current,l=o(n),u=l?.yogaNode?.getComputedHeight()??0;if(!l||u===0){if(i>1){k.current=null,Ye(`seek(i=${n}): no mount after scrollToIndex, skip`),N.current(r?-1:1);return}k.current={idx:n,wantLast:r,tries:i+1},c(n),_e();return}k.current=null,a.scrollTo(Math.max(0,s(n)-zi));let d=h?.(l)??[];if(A.current={msgIdx:n,positions:d},Ye(`seek(i=${n} t=${i}): ${d.length} positions`),d.length===0){if(++M.current>20){M.current=0;return}N.current(r?-1:1);return}M.current=0;let f=r?d.length-1:0;ue.current.screenOrd=f,j.current=-1,le.current(f);let p=ce.current;p&&(ce.current=0,N.current(p))},[he]);function ve(e,n){let r=t.current;if(!r)return;let i=O.current,{getItemElement:a,scrollToIndex:o}=i;if(e<0||e>=i.messages.length)return;_?.(null),A.current={msgIdx:-1,positions:[]},k.current={idx:e,wantLast:n,tries:0};let s=a(e),c=s?.yogaNode?.getComputedHeight()??0;s&&c>0?r.scrollTo(pe(e)):o(e),_e()}function P(e){let t=ue.current,{matches:n,prefixSum:r}=t,i=r.at(-1)??0;if(n.length===0)return;if(k.current){ce.current=e;return}j.current<0&&(j.current=t.ptr);let{positions:a}=A.current,o=t.screenOrd+e;if(o>=0&&o<a.length){t.screenOrd=o,me(o),j.current=-1;return}let s=(t.ptr+e+n.length)%n.length;if(s===j.current){_?.(null),j.current=-1,Ye(`step: wraparound at ptr=${s}, all ${n.length} msgs phantoms`);return}t.ptr=s,t.screenOrd=0,ve(n[s],e<0);let c=e<0?r[s+1]??i:r[s]+1;m?.(i,c)}N.current=P,(0,Z.useImperativeHandle)(p,()=>({jumpToIndex:e=>{let n=t.current;n&&n.scrollTo(pe(e))},setSearchQuery:e=>{k.current=null,A.current={msgIdx:-1,positions:[]},j.current=-1,_?.(null);let n=e.toLowerCase(),r=[],i=[0];if(n){let e=O.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}=O.current,f=d(u),p=f>=0?f-l[u]:0;if(r.length>0&&s){let t=de.current>=0?de.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)}Ye(`setSearchQuery('${e}'): ${r.length} msgs · ptr=${o} msgIdx=${r[o]} curTop=${t} origin=${p}`)}ue.current={matches:r,ptr:o,screenOrd:0,prefixSum:i},r.length>0?ve(r[o],!0):de.current>=0&&s&&s.scrollTo(de.current),m?.(a,r.length>0?i[o+1]??a:0)},nextMatch:()=>P(1),prevMatch:()=>P(-1),setAnchor:()=>{let e=t.current;e&&(de.current=e.getScrollTop())},disarmSearch:()=>{_?.(null),k.current=null,A.current={msgIdx:-1,positions:[]},j.current=-1},warmSearchIndex:async()=>{if(fe.current)return 0;let e=O.current.messages,t=0,n=performance.now();for(let n=0;n<e.length;n+=500){await Tt(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 Ye(`warmSearchIndex: ${e.length} msgs · work=${Math.round(t)}ms wall=${r}ms chunks=${Math.ceil(e.length/500)}`),fe.current=!0,Math.round(t)}}),[t]);let[ye,be]=(0,Z.useState)(null),xe=(0,Z.useRef)({onItemClick:a,setHoveredKey:be});xe.current={onItemClick:a,setHoveredKey:be};let Se=(0,Z.useCallback)((e,t)=>{let n=xe.current;!t&&n.onItemClick&&n.onItemClick(e)},[]),Ce=(0,Z.useCallback)(e=>{xe.current.setHoveredKey(e)},[]),we=(0,Z.useCallback)(e=>{xe.current.setHoveredKey(t=>t===e?null:t)},[]);return(0,Ri.jsxs)(Ri.Fragment,{children:[(0,Ri.jsx)(R,{ref:te,height:C,flexShrink:0}),e.slice(ae,oe).map((e,t)=>{let n=ae+t,r=x[n],c=!!a&&(o?.(e)??!0),l=c&&ye===r,u=s?.(e);return(0,Ri.jsx)(Fi,{itemKey:r,msg:e,idx:n,measureRef:ee,expanded:u,hovered:l,clickable:c,onClickK:Se,onEnterK:Ce,onLeaveK:we,renderItem:i},r)}),w>0&&(0,Ri.jsx)(R,{height:w,flexShrink:0}),l&&(0,Ri.jsx)(Li,{messages:e,start:ae,end:oe,offsets:T,getItemTop:E,getItemElement:ne,scrollRef:t})]})}function Li({messages:e,start:t,end:n,offsets:r,getItemTop:i,getItemElement:a,scrollRef:o}){let{setStickyPrompt:s}=(0,Z.useContext)(Ai);(0,Z.useSyncExternalStore)((0,Z.useCallback)(e=>o.current?.subscribe(e)??Ui,[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=Ni(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,Vi).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,Ri,zi,Bi,Vi,Hi,Ui,Wi=t((()=>{B(),Z=n(B(),1),ci(),V(),Se(),ji(),Ri=H(),Je(),Ct(),wn(),v(),zi=3,Bi=new WeakMap,Vi=500,Hi=new WeakMap,Ui=()=>{}}));function Gi(e,t,n=$i,r=ea){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 Ki(e){return(e.type===`assistant`||e.type===`user`?h(e):null)??e.uuid}function qi(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ji(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=h(e);return i?t.has(i)||n.has(i)||I(i,`PostToolUse`,a)?!1:rn(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 Yi,Q,$,Xi,Zi,Qi,$i,ea,ta,na,ra=t((()=>{Re(),Yi=n(B(),1),Q=n(B(),1),an(),Ge(),$e(),s(),V(),b(),Et(),w(),cn(),dn(),we(),it(),i(),P(),gn(),u(),ht(),wn(),br(),ne(),Ir(),v(),O(),zr(),Ae(),Qr(),$=H(),Wi(),Xi=Yi.memo(function({agentDefinitions:e}){return(0,$.jsx)(Ee,{children:(0,$.jsxs)(R,{flexDirection:`column`,gap:1,children:[(0,$.jsx)(_r,{}),(0,$.jsx)(Yi.Suspense,{fallback:null,children:(0,$.jsx)(Jr,{agentDefinitions:e})})]})})}),Zi=(Mt(),e(Nt)),Qi=30,$i=200,ea=50,ta=({messages:e,tools:t,commands:n,verbose:i,toolJSX:a,toolUseConfirmQueue:o,inProgressToolUseIDs:s,isMessageSelectorVisible:c,conversationId:l,screen:u,streamingToolUses:d,showAllInTranscript:f=!1,agentDefinitions:p,hideLogo:h=!1,isLoading:g,hidePastThinking:_=!1,streamingThinking:v,streamingText:b,unseenDivider:S,scrollRef:C,trackStickyPrompt:w,jumpRef:E,onSearchMatchesChange:ne,scanElement:re,setPositions:ae,disableRenderCap:oe=!1,cursor:D=null,setCursor:O,cursorNavRef:se,renderRange:A})=>{let{columns:M}=Ve(),ce=ue(`transcript:toggleShowAll`,`Transcript`,`Ctrl+E`),N=(0,Q.useMemo)(()=>x(e).filter(k),[e]),fe=(0,Q.useMemo)(()=>v?v.isStreaming?!0:v.streamingEndedAt?Date.now()-v.streamingEndedAt<3e4:!1:!1,[v]),{lastThinkingBlockId:he,latestBashOutputUUID:_e}=(0,Q.useMemo)(()=>{let e=null,t=null,n=_&&!fe;_&&fe&&(e=`streaming`);for(let r=N.length-1;r>=0;r--){let i=N[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 _||(e=null),{lastThinkingBlockId:e,latestBashOutputUUID:t}},[N,_,fe]),P=(0,Q.useMemo)(()=>y(N),[N]),ye=(0,Q.useMemo)(()=>d.filter(e=>!s.has(e.contentBlock.id)&&!P.has(e.contentBlock.id)),[d,s,P]),be=(0,Q.useMemo)(()=>ye.flatMap(e=>{let t=pe({content:[e.contentBlock]});return t.uuid=m(e.contentBlock.id,0),x([t])}),[ye]),Se=u===`transcript`,Ce=(0,Q.useMemo)(()=>r(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL),[]),we=C!=null&&!Ce,Te=Se&&!f&&!we,Ee=(0,Q.useRef)(null),F=(0,Q.useRef)(null),{collapsed:De,lookups:ke,hasTruncatedMessages:Ae,hiddenMessageCount:Me}=(0,Q.useMemo)(()=>{let e=de((i||me()?N:ee(N,{includeSnipped:!0})).filter(e=>e.type!==`progress`&&!Lr(e)&&ie(e,Se)),be),n=Te?e.slice(-30):e,r=Te&&e.length>Qi,{messages:a}=mn(n,t,i),o=sn(un(le(a,t)),i),s=xe(N,n),c=(()=>{let e=n.at(-1);return e?.type===`assistant`?e.message?.id:void 0})(),l;if(F.current&&F.current.key===s)l=F.current.lookups;else if(F.current&&N.length>=F.current.normalizedCount&&n.length>=F.current.messageCount&&F.current.lastAssistantMsgId===c){let e=ge(F.current.lookups,F.current.normalizedCount,F.current.messageCount,N,n);e?(l=e,F.current={key:s,lookups:l,normalizedCount:N.length,messageCount:n.length,lastAssistantMsgId:c}):(l=ve(N,n),F.current={key:s,lookups:l,normalizedCount:N.length,messageCount:n.length,lastAssistantMsgId:c})}else l=ve(N,n),F.current={key:s,lookups:l,normalizedCount:N.length,messageCount:n.length,lastAssistantMsgId:c};let u=e.length-Qi;return{collapsed:o,lookups:l,hasTruncatedMessages:r,hiddenMessageCount:u}},[i,N,Se,be,Te,t]),I=(0,Q.useMemo)(()=>{let e=!we&&!oe?Gi(De,Ee):0;return A?De.slice(A[0],A[1]):e>0?De.slice(e):De},[De,A,we,oe]),Ne=(0,Q.useMemo)(()=>new Set(d.map(e=>e.contentBlock.id)),[d]),{dividerBeforeIndex:L,selectedIdx:Fe}=(0,Q.useMemo)(()=>{if(!S&&!D)return{dividerBeforeIndex:-1,selectedIdx:-1};let e=-1,t=-1,n=S?.firstUnseenUuid.slice(0,24);for(let r=0;r<I.length;r++){let i=I[r];if(e===-1&&n&&i.uuid.slice(0,24)===n&&(e=r),t===-1&&D&&i.uuid===D.uuid&&(t=r),e!==-1&&t!==-1)break}return{dividerBeforeIndex:e,selectedIdx:t}},[S,D,I]),[Le,Re]=(0,Q.useState)(()=>new Set),B=(0,Q.useCallback)(e=>{let t=Ki(e);Re(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),ze=(0,Q.useCallback)(e=>Le.size>0&&Le.has(Ki(e)),[Le]),Be=(0,Q.useRef)(ke);Be.current=ke;let V=(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&&T(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=Be.current.toolUseByToolUseID.get(n.tool_use_id??``)?.name;return(r?Dt(t,r):void 0)?.isResultTruncated?.(e.toolUseResult)??!1},[t]),Ue=(!a||!!a.shouldContinueAnimation)&&!o.length&&!c,H=s.size>0,{progress:Ge}=Ie(),Ke=(0,Q.useRef)(null),qe=rt().terminalProgressBarEnabled&&!We()&&!(Zi?.isProactiveActive()??!1);(0,Q.useEffect)(()=>{let e=qe?H?`indeterminate`:`completed`:null;Ke.current!==e&&(Ke.current=e,Ge(e))},[Ge,qe,H]),(0,Q.useEffect)(()=>()=>Ge(null),[Ge]);let Je=(0,Q.useCallback)(e=>`${e.uuid}-${l}`,[l]),Ye=(e,r)=>{let a=r>0?I[r-1]?.type:void 0,o=e.type===`user`&&a===`user`,c=e.type===`collapsed_read_search`&&(!!b||Dr(I,r,t,Ne)),l=I.length-1-r>0,d=Je(e),f=(0,$.jsx)(Fr,{message:e,isUserContinuation:o,hasContentAfter:c,tools:t,commands:n,verbose:i||ze(e)||D?.expanded===!0&&r===Fe,inProgressToolUseIDs:s,streamingToolUseIDs:Ne,screen:u,canAnimate:Ue,lastThinkingBlockId:he,latestBashOutputUUID:_e,columns:M,isLoading:g,lookups:ke,shouldCollapseDiffs:l},d),p=(0,$.jsx)(j.Provider,{value:r===Fe,children:f},d);return S&&r===L?[(0,$.jsx)(R,{marginTop:1,children:(0,$.jsx)(Pe,{title:`${S.count} new ${mt(S.count,`message`)}`,width:M,color:`inactive`})},`unseen-divider`),p]:p},Xe=(0,Q.useRef)(new WeakMap),Ze=(0,Q.useCallback)(e=>{let n=Xe.current.get(e);if(n!==void 0)return n;let r=_n(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=ke.toolUseByToolUseID.get(n.tool_use_id),a=(i&&Dt(t,i.name))?.extractSearchText?.(e.toolUseResult);a!==void 0&&(r=a)}}let i=r.toLowerCase();return Xe.current.set(e,i),i},[t,ke]);return(0,$.jsxs)($.Fragment,{children:[!h&&!(A&&A[0]>0)&&(0,$.jsx)(Xi,{agentDefinitions:p}),Ae&&(0,$.jsx)(Pe,{title:`${ce} to show ${He.bold(Me)} previous messages`,width:M}),Se&&f&&Me>0&&!oe&&(0,$.jsx)(Pe,{title:`${ce} to hide ${He.bold(Me)} previous messages`,width:M}),we?(0,$.jsx)(je.Provider,{value:!0,children:(0,$.jsx)(Ii,{messages:I,scrollRef:C,columns:M,itemKey:Je,renderItem:Ye,onItemClick:B,isItemClickable:V,isItemExpanded:ze,trackStickyPrompt:w,selectedIndex:Fe>=0?Fe:void 0,cursorNavRef:se,setCursor:O,jumpRef:E,onSearchMatchesChange:ne,scanElement:re,setPositions:ae,extractSearchText:Ze})}):I.flatMap(Ye),b&&(0,$.jsx)(R,{alignItems:`flex-start`,flexDirection:`row`,marginTop:1,width:`100%`,children:(0,$.jsxs)(R,{flexDirection:`row`,children:[(0,$.jsx)(R,{minWidth:2,children:(0,$.jsx)(z,{color:`text`,children:et})}),(0,$.jsx)(R,{flexDirection:`column`,children:(0,$.jsx)(te,{children:b})})]})}),fe&&v&&(0,$.jsx)(R,{marginTop:1,children:(0,$.jsx)(Oe,{param:{type:`thinking`,thinking:v.thinking},addMargin:!1,isTranscriptMode:!0,verbose:i,hideInTranscript:!1})})]})},na=Yi.memo(ta,(e,t)=>{let n=Object.keys(e);for(let r of n)if(!(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`&&qi(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{ji as a,fi as c,Ci as i,pi as l,ra as n,bi as o,wi as r,yi as s,na as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{d as t,o as n}from"./envUtils-BDhHQY0-.js";import{Ru as r,dd as i,nd as a,qC as o,rd as s,ud as c}from"./loadAgentsDir-C7lOqvfh.js";import{Gt as l,H as u,I as d,Lt as f,P as p,fi as m,kt as h,t as g}from"./src-P_wYS_NJ2.js";import{t as _}from"./jsx-runtime-Bb4Xn-E0.js";import{Gt as v,Jt as y}from"./settings-DnptdP79.js";import{h as b,s as x}from"./config-Do1870_d.js";import{n as S,r as C}from"./analytics-DJobLaWP.js";import{Bt as w,Ht as T,Sr as E,xr as D}from"./model-BsZ4sP_H.js";import{c as O,i as k,s as A}from"./terminalSetup-D-N8YPiQ.js";import{t as j}from"./WelcomeV2-DvfQHnZY.js";import{n as M,t as N}from"./useExitOnCtrlCDWithKeybindings-ChqBs9Lr.js";import{n as P,t as F}from"./ThemePicker-DrC8tlp0.js";import{n as I,t as L}from"./PressEnterToContinue-Dq0Imo9c.js";import{t as R}from"./ApproveApiKey-MscC-ssL.js";n();var z=e(m(),1),B=_();S(),y(),b(),D(),w(),o(),k(),N(),g(),g(),r(),i(),s(),P(),I(),g();var V=(0,z.createContext)({marker:``});function H({children:e}){let{marker:t}=(0,z.useContext)(V);return(0,B.jsxs)(d,{gap:1,children:[(0,B.jsx)(p,{dimColor:!0,children:t}),(0,B.jsx)(d,{flexDirection:`column`,children:e})]})}g();var U=(0,z.createContext)({marker:``});function W({children:e}){let{marker:t}=(0,z.useContext)(U),n=0;for(let t of z.Children.toArray(e))!(0,z.isValidElement)(t)||t.type!==H||n++;let r=String(n).length;return(0,B.jsx)(d,{flexDirection:`column`,children:z.Children.map(e,(e,n)=>{if(!(0,z.isValidElement)(e)||e.type!==H)return e;let i=`${String(n+1).padStart(r)}.`,a=`${t}${i}`;return(0,B.jsx)(U.Provider,{value:{marker:a},children:(0,B.jsx)(V.Provider,{value:{marker:a},children:e})})})})}W.Item=H;var G=W;g();function K({onDone:e}){let[n,r]=(0,z.useState)(0),[i,o]=(0,z.useState)(!1),[s]=(0,z.useState)(()=>T()),[m,g]=u();(0,z.useEffect)(()=>{C(`tengu_began_setup`,{oauthEnabled:s})},[s]);function _(){if(n<N.length-1){let e=n+1;r(e),C(`tengu_onboarding_step`,{oauthEnabled:s,stepId:N[e]?.id})}else e()}function y(e){g(e),_()}let b=M(),S=(0,B.jsx)(d,{marginX:1,children:(0,B.jsx)(F,{onThemeSelect:y,showIntroText:!0,helpText:`To change this later, run /theme`,hideEscToCancel:!0,skipExitHandling:!0})}),w=(0,B.jsxs)(d,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,B.jsx)(p,{bold:!0,children:`Before you start, keep in mind:`}),(0,B.jsx)(d,{flexDirection:`column`,width:70,children:(0,B.jsxs)(G,{children:[(0,B.jsxs)(G.Item,{children:[(0,B.jsx)(p,{children:`Always review changes before accepting`}),(0,B.jsxs)(p,{dimColor:!0,wrap:`wrap`,children:[`Claude can make mistakes — especially when running commands`,(0,B.jsx)(h,{}),`or editing files. You stay in control of every action.`,(0,B.jsx)(h,{})]})]}),(0,B.jsxs)(G.Item,{children:[(0,B.jsx)(p,{children:`Only use Claude Code on projects you trust`}),(0,B.jsxs)(p,{dimColor:!0,wrap:`wrap`,children:[`Untrusted code could contain prompt injection attacks.`,(0,B.jsx)(h,{}),(0,B.jsx)(f,{url:`https://code.claude.com/docs/en/security`})]})]})]})}),(0,B.jsx)(L,{})]}),D=(0,z.useMemo)(()=>{if(!process.env.ANTHROPIC_API_KEY||t())return``;let e=E(process.env.ANTHROPIC_API_KEY);if(x(e)===`new`)return e},[]);function k(e){e&&o(!0),_()}let N=[];N.push({id:`theme`,component:S}),D&&N.push({id:`api-key`,component:(0,B.jsx)(R,{customApiKeyTruncated:D,onDone:k})}),s&&N.push({id:`oauth`,component:(0,B.jsx)(q,{skip:i,onSkip:_,children:(0,B.jsx)(c,{onDone:_})})}),N.push({id:`security`,component:w}),O()&&N.push({id:`terminal-setup`,component:(0,B.jsxs)(d,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,B.jsx)(p,{bold:!0,children:`Use Claude Code's terminal setup?`}),(0,B.jsxs)(d,{flexDirection:`column`,width:70,gap:1,children:[(0,B.jsxs)(p,{children:[`For the optimal coding experience, enable the recommended settings`,(0,B.jsx)(h,{}),`for your terminal:`,` `,v.terminal===`Apple_Terminal`?`Option+Enter for newlines and visual bell`:`Shift+Enter for newlines`]}),(0,B.jsx)(a,{options:[{label:`Yes, use recommended settings`,value:`install`},{label:`No, maybe later with /terminal-setup`,value:`no`}],onChange:e=>{e===`install`?A(m).catch(()=>{}).finally(_):_()},onCancel:()=>_()}),(0,B.jsx)(p,{dimColor:!0,children:b.pending?(0,B.jsxs)(B.Fragment,{children:[`Press `,b.keyName,` again to exit`]}):(0,B.jsx)(B.Fragment,{children:`Enter to confirm · Esc to skip`})})]})]})});let P=N[n],I=(0,z.useCallback)(()=>{n===N.length-1?e():_()},[n,N.length,s,e]),V=(0,z.useCallback)(()=>{_()},[n,N.length,s,e]);return l({"confirm:yes":I},{context:`Confirmation`,isActive:P?.id===`security`}),l({"confirm:no":V},{context:`Confirmation`,isActive:P?.id===`terminal-setup`}),(0,B.jsxs)(d,{flexDirection:`column`,children:[(0,B.jsx)(j,{}),(0,B.jsxs)(d,{flexDirection:`column`,marginTop:1,children:[P?.component,b.pending&&(0,B.jsx)(d,{padding:1,children:(0,B.jsxs)(p,{dimColor:!0,children:[`Press `,b.keyName,` again to exit`]})})]})]})}function q({skip:e,onSkip:t,children:n}){return(0,z.useEffect)(()=>{e&&t()},[e,t]),e?null:n}export{K as Onboarding};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,fi as r,t as i}from"./src-CDCSSo0U2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";function o({title:e,subtitle:r,color:i=`permission`}){return(0,s.jsxs)(t,{flexDirection:`column`,children:[(0,s.jsx)(t,{flexDirection:`row`,gap:1,children:(0,s.jsx)(n,{bold:!0,color:i,children:e})}),r!=null&&(typeof r==`string`?(0,s.jsx)(n,{dimColor:!0,wrap:`truncate-start`,children:r}):r)]})}var s,c=e((()=>{r(),i(),s=a()}));function l({title:e,subtitle:n,color:r=`permission`,titleColor:i,innerPaddingX:a=1,titleRight:s,children:c}){return(0,u.jsxs)(t,{flexDirection:`column`,borderStyle:`round`,borderColor:r,borderLeft:!1,borderRight:!1,borderBottom:!1,marginTop:1,children:[(0,u.jsx)(t,{paddingX:1,flexDirection:`column`,children:(0,u.jsxs)(t,{justifyContent:`space-between`,children:[(0,u.jsx)(o,{title:e,subtitle:n,color:i}),s]})}),(0,u.jsx)(t,{flexDirection:`column`,paddingX:a,children:c})]})}var u,d=e((()=>{r(),i(),c(),u=a()}));export{c as i,d as n,o as r,l as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,P as n,fi as r,t as i}from"./src-P_wYS_NJ2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";function o({title:e,subtitle:r,color:i=`permission`}){return(0,s.jsxs)(t,{flexDirection:`column`,children:[(0,s.jsx)(t,{flexDirection:`row`,gap:1,children:(0,s.jsx)(n,{bold:!0,color:i,children:e})}),r!=null&&(typeof r==`string`?(0,s.jsx)(n,{dimColor:!0,wrap:`truncate-start`,children:r}):r)]})}var s,c=e((()=>{r(),i(),s=a()}));function l({title:e,subtitle:n,color:r=`permission`,titleColor:i,innerPaddingX:a=1,titleRight:s,children:c}){return(0,u.jsxs)(t,{flexDirection:`column`,borderStyle:`round`,borderColor:r,borderLeft:!1,borderRight:!1,borderBottom:!1,marginTop:1,children:[(0,u.jsx)(t,{paddingX:1,flexDirection:`column`,children:(0,u.jsxs)(t,{justifyContent:`space-between`,children:[(0,u.jsx)(o,{title:e,subtitle:n,color:i}),s]})}),(0,u.jsx)(t,{flexDirection:`column`,paddingX:a,children:c})]})}var u,d=e((()=>{r(),i(),c(),u=a()}));export{c as i,d as n,o as r,l as t};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{P as t,fi as n,t as r}from"./src-CDCSSo0U2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";function a(){return(0,o.jsxs)(t,{color:`permission`,children:[`Press `,(0,o.jsx)(t,{bold:!0,children:`Enter`}),` to continue…`]})}var o,s=e((()=>{n(),r(),o=i()}));export{s as n,a as t};
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{P as t,fi as n,t as r}from"./src-P_wYS_NJ2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";function a(){return(0,o.jsxs)(t,{color:`permission`,children:[`Press `,(0,o.jsx)(t,{bold:!0,children:`Enter`}),` to continue…`]})}var o,s=e((()=>{n(),r(),o=i()}));export{s as n,a as t};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{$C as n}from"./loadAgentsDir-C7lOqvfh.js";import{Gr as r,I as i,P as a,fi as o,ot as s,t as c}from"./src-P_wYS_NJ2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{C as u,v as d,x as f}from"./startupProfiler-L_UWZ03w.js";function p(e){return e.startsWith(`file-`)?`+`:e.startsWith(`mcp-resource-`)?`◇`:e.startsWith(`agent-`)?`*`:`+`}function m(e){return e.startsWith(`file-`)||e.startsWith(`mcp-resource-`)||e.startsWith(`agent-`)}function h({suggestions:e,selectedSuggestion:t,maxColumnWidth:n,overlay:a}){let{rows:o}=s(),c=a?5:Math.min(6,Math.max(1,o-3));if(e.length===0)return null;let l=n??Math.max(...e.map(e=>r(e.displayText)))+5,u=Math.max(0,Math.min(t-Math.floor(c/2),e.length-c)),d=Math.min(u+c,e.length),f=e.slice(u,d);return(0,_.jsx)(i,{flexDirection:`column`,justifyContent:a?void 0:`flex-end`,children:f.map(n=>(0,_.jsx)(v,{item:n,maxColumnWidth:l,isSelected:n.id===e[t]?.id},n.id))})}var g,_,v,y,b=e((()=>{g=t(o(),1),n(),c(),d(),_=l(),v=(0,g.memo)(function({item:e,maxColumnWidth:t,isSelected:n}){let i=s().columns;if(m(e.id)){let t=p(e.id),o=n?`suggestion`:void 0,s=!n,c=e.id.startsWith(`file-`),l=e.id.startsWith(`mcp-resource-`),d=e.description?3:0,m;if(c){let t=e.description?Math.min(20,r(e.description)):0,n=i-2-4-d-t;m=f(e.displayText,n)}else m=l?u(e.displayText,30):e.displayText;let h=i-2-r(m)-d-4,g;if(e.description){let n=Math.max(0,h),r=u(e.description.replace(/\s+/g,` `),n);g=`${t} ${m} – ${r}`}else g=`${t} ${m}`;return(0,_.jsx)(a,{color:o,dimColor:s,wrap:`truncate`,children:g})}let o=Math.floor(i*.4),c=Math.min(t??r(e.displayText)+5,o),l=e.color||(n?`suggestion`:void 0),d=!n,h=e.displayText;r(h)>c-2&&(h=u(h,c-2));let g=h+` `.repeat(Math.max(0,c-r(h))),v=e.tag?`[${e.tag}] `:``,y=r(v),b=Math.max(0,i-c-y-4),x=e.description?u(e.description.replace(/\s+/g,` `),b):``;return(0,_.jsxs)(a,{wrap:`truncate`,children:[(0,_.jsx)(a,{color:l,dimColor:d,children:g}),v?(0,_.jsx)(a,{color:e.tag===`local`?`ansi:yellow`:void 0,dimColor:e.tag!==`local`,children:v}):null,(0,_.jsx)(a,{color:n?`suggestion`:void 0,dimColor:!n,children:x})]})}),y=(0,g.memo)(h)}));export{y as n,b as r,h as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{JC as t,YC as n,gE as r,hE as i}from"./loadAgentsDir-C7lOqvfh.js";import{I as a,P as o,fi as s,t as c}from"./src-P_wYS_NJ2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{Gt as u,Jt as d}from"./settings-DnptdP79.js";import{c as f,h as p}from"./config-Do1870_d.js";import{i as m,o as h}from"./platform-BMPbglug.js";import{et as g,rt as _,tt as v}from"./model-BsZ4sP_H.js";import{a as y,i as b,r as x}from"./terminalSetup-D-N8YPiQ.js";function S(){return f().editorMode===`vim`}function C(){return u.terminal===`Apple_Terminal`&&process.platform===`darwin`||y()?`shift + ⏎ for newline`:x()?`\\⏎ for newline`:`backslash (\\) + return (⏎) for newline`}function w(e,t){return t.ctrl||t.meta||t.escape||t.return||t.tab||t.backspace||t.delete||t.upArrow||t.downArrow||t.leftArrow||t.rightArrow||t.pageUp||t.pageDown||t.home||t.end?!1:e.length>0&&!/^\s/.test(e)&&!e.startsWith(`\x1B`)}var T=e((()=>{b(),p(),d()}));function E(e){return e.replace(/\+/g,` + `)}function D(e){let{dimColor:t,fixedWidth:i,gap:s,paddingX:c}=e,l=E(n(`app:toggleTranscript`,`Global`,`ctrl+o`)),u=E(n(`app:toggleTodos`,`Global`,`ctrl+t`)),d=E(n(`chat:undo`,`Chat`,`ctrl+_`)),f=E(n(`chat:stash`,`Chat`,`ctrl+s`)),p=E(n(`chat:cycleMode`,`Chat`,`shift+tab`)),h=E(n(`chat:modelPicker`,`Chat`,`alt+p`)),g=E(n(`chat:fastMode`,`Chat`,`alt+o`)),y=E(n(`chat:externalEditor`,`Chat`,`ctrl+g`));E(n(`app:toggleTerminal`,`Global`,`meta+j`));let b=E(n(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,O.jsxs)(a,{paddingX:c,flexDirection:`row`,gap:s,children:[(0,O.jsxs)(a,{flexDirection:`column`,width:i?24:void 0,children:[(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`! for bash mode`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`/ for commands`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`@ for file paths`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`& for background`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`/btw for side question`})})]}),(0,O.jsxs)(a,{flexDirection:`column`,width:i?35:void 0,children:[(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`double tap esc to clear input`})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[p,` to auto-accept edits`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[l,` for verbose output`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[u,` to toggle tasks`]})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:C()})})]}),(0,O.jsxs)(a,{flexDirection:`column`,children:[(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[d,` to undo`]})}),m()!==`windows`&&(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`ctrl + z to suspend`})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[b,` to paste images`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[h,` to switch model`]})}),_()&&v()&&(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[g,` to toggle fast mode`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[f,` to stash prompt`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[y,` to edit in $EDITOR`]})}),r()&&(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`/keybindings to customize`})})]})]})}var O,k=e((()=>{s(),c(),h(),i(),t(),g(),T(),O=l()}));export{S as a,w as i,k as n,T as r,D as t};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,s as r}from"./envUtils-BDhHQY0-.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{$ as o,$r as s,$s as c,Ba as l,Bi as u,Cr as d,Cv as f,Q as p,Qs as m,Qy as h,Ri as g,Sm as _,Sv as v,UE as y,Vg as ee,WE as te,Wg as ne,Zs as re,_c as b,_x as x,bn as S,ct as C,da as ie,ec as w,fw as T,gp as E,ho as ae,iE as oe,jb as D,kb as se,lt as O,ma as ce,nr as k,nt as le,oy as ue,po as de,pw as fe,qg as pe,rE as A,so as j,sy as me,vc as he,vx as M,wm as N,xn as ge,xv as P,yp as _e,yv as F}from"./loadAgentsDir-C7lOqvfh.js";import{Kr as ve,qr as ye}from"./src-P_wYS_NJ2.js";import{Et as I,Gt as be,Q as L,St as R,Wt as z,dt as xe,pt as B}from"./state-BemZdQIl.js";import{n as V,t as Se}from"./cwd-Cfdf7z7s.js";import{Q as H,Y as Ce,f as we,g as U}from"./settings-DnptdP79.js";import{M as W,c as Te,h as Ee,j as De}from"./config-Do1870_d.js";import{i as Oe,o as ke,q as Ae}from"./log-CezCRpAN.js";import{Bt as je,C as Me,St as G,Y as K,_ as Ne,et as Pe,u as Fe}from"./model-BsZ4sP_H.js";import{bn as Ie,ot as q,rt as Le,xn as Re}from"./prompt-M2lu8_Oa.js";import{M as ze,at as Be,st as Ve}from"./sessionState-Bifmu95-.js";import{a as He,n as Ue,r as We}from"./mappers-bOab8ipV.js";import{n as J,o as Ge,r as Y}from"./MessageSelector-BLzw172f.js";import{n as Ke,t as qe}from"./systemTheme-Ceakddth.js";import{randomUUID as X}from"crypto";n(),i(),ve(),z(),V(),Ae(),ke(),H(),U(),W(),Ie(),Ee(),y(),je(),Pe(),A(),ze(),D(),h(),me(),q(),pe(),N(),b(),de(),j(),l(),u(),d(),S(),o(),O(),f(),M(),Ne(),F(),E();async function Je({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?C(e,t,n,r):Promise.resolve([]),v(),i===void 0?P():Promise.resolve({})]);return{defaultSystemPrompt:a,userContext:o,systemContext:s}}async function Ye({tools:e,commands:t,mcpClients:n,messages:r,readFileState:i,getAppState:a,setAppState:o,customSystemPrompt:s,appendSystemPrompt:c,thinkingConfig:l,agents:u}){let d=Fe(),f=a(),{defaultSystemPrompt:p,userContext:m,systemContext:h}=await Je({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(f.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),g=Be([...s===void 0?p:[s],...c?[c]:[]]),_=r.at(-1),v=_?.type===`assistant`&&_.message.stop_reason===null?r.slice(0,-1):r;return{systemPrompt:g,userContext:m,systemContext:h,toolUseContext:{options:{commands:t,debug:!1,mainLoopModel:d,tools:e,verbose:!1,thinkingConfig:l??(_e()===!1?{type:`disabled`}:{type:`adaptive`}),mcpClients:n,mcpResources:{},isNonInteractiveSession:!0,agentDefinitions:{activeAgents:u,allAgents:[]},customSystemPrompt:s,appendSystemPrompt:c},abortController:x(),readFileState:i,getAppState:a,setAppState:o,messages:v,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}},forkContextMessages:v}}T(),Ue(),qe();function Xe(e){return e===`Agent`?Ce:e}function Ze(e){let t=we()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:Se(),session_id:B(),tools:e.tools.map(e=>Xe(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:G().source,betas:xe(),claude_code_version:`0.0.10`,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:X()};return n.fast_mode_state=K(e.model,e.fastMode),n}z(),M(),V(),Pe(),Ne(),F(),E(),m();var Qe=()=>{try{return Y(),e(J)}catch{return null}},Z=class{constructor(e){a(this,`config`,void 0),a(this,`mutableMessages`,void 0),a(this,`abortController`,void 0),a(this,`permissionDenials`,void 0),a(this,`totalUsage`,void 0),a(this,`hasHandledOrphanedPermission`,!1),a(this,`readFileState`,void 0),a(this,`discoveredSkillNames`,new Set),a(this,`loadedNestedMemoryPaths`,new Set),this.config=e,this.mutableMessages=e.initialMessages??[],this.abortController=e.abortController??x(),this.permissionDenials=[],this.readFileState=e.readFileCache,this.totalUsage=Ve}async*submitMessage(e,n){let{cwd:i,commands:a,tools:o,mcpClients:l,verbose:u=!1,thinkingConfig:d,maxTurns:f,maxBudgetUsd:m,taskBudget:h,canUseTool:v,customSystemPrompt:y,appendSystemPrompt:b,userSpecifiedModel:x,fallbackModel:S,jsonSchema:C,getAppState:T,setAppState:E,replayUserMessages:D=!1,includePartialMessages:se=!1,agents:O=[],setSDKStatus:de,orphanedPermission:pe}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],fe(i);let A=!be(),j=Date.now(),me=async(e,t,n,r,i,a)=>{let o=await v(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:Xe(e.name),tool_use_id:i,tool_input:t}),o},M=T(),N=x?Me(x):Fe(),P=d||(_e()===!1?{type:`disabled`}:{type:`adaptive`});_(`before_getSystemPrompt`);let F=typeof y==`string`?y:void 0,{defaultSystemPrompt:ve,userContext:z,systemContext:xe}=await Je({tools:o,mainLoopModel:N,additionalWorkingDirectories:Array.from(M.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:l,customSystemPrompt:F});_(`after_getSystemPrompt`);let V={...z},H=F!==void 0&&De()?await te():null,Ce=Be([...F===void 0?ve:[F],...H?[H]:[],...b?[b]:[]]),we=o.some(e=>Re(e,Le));C&&we&&ge(E,B());let U={messages:this.mutableMessages,setMessages:e=>{this.mutableMessages=e(this.mutableMessages)},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:u,mainLoopModel:N,thinkingConfig:P,mcpClients:l,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,agentDefinitions:{activeAgents:O,allAgents:[]},theme:Ke(Te().theme),maxBudgetUsd:m},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{E(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{E(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:de};if(pe&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of re(pe,o,this.mutableMessages,U))yield e}let{messages:W,shouldQuery:Ee,allowedTools:ke,model:Ae,resultText:je}=await Ge({input:e,mode:`prompt`,setToolJSX:()=>{},context:{...U,messages:this.mutableMessages},messages:this.mutableMessages,uuid:n?.uuid,isMeta:n?.isMeta,querySource:`sdk`});this.mutableMessages.push(...W);let G=[...this.mutableMessages];if(A&&W.length>0){let e=s(G);r()||(await e,(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await k())}let Ne=Qe(),Pe=W.filter(e=>e.type===`user`&&!e.isMeta&&!e.toolUseResult&&(Ne?.selectableUserMessagesFilter(e)??!0)||e.type===`system`&&e.subtype===`compact_boundary`),Ie=D?Pe:[];E(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:ke}}}));let q=Ae??N;U={messages:G,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:u,mainLoopModel:q,thinkingConfig:P,mcpClients:l,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,theme:Ke(Te().theme),agentDefinitions:{activeAgents:O,allAgents:[]},maxBudgetUsd:m},getAppState:T,setAppState:E,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:U.updateFileHistoryState,updateAttributionState:U.updateAttributionState,setSDKStatus:de},_(`before_skills_plugins`);let[ze,{enabled:Ue}]=await Promise.all([g(Se()),ae()]);if(_(`after_skills_plugins`),yield Ze({tools:o,mcpClients:l,model:q,permissionMode:M.toolPermissionContext.mode,commands:a,agents:O,skills:ze,plugins:Ue,fastMode:M.fastMode}),_(`system_message_yielded`),!Ee){for(let e of W)if(e.type===`user`&&typeof e.message.content==`string`&&(e.message.content.includes(`<local-command-stdout>`)||e.message.content.includes(`<local-command-stderr>`)||e.isCompactSummary)&&(yield{type:`user`,message:{...e.message,content:ye(e.message.content)},session_id:B(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!e.isCompactSummary,isSynthetic:e.isMeta||e.isVisibleInTranscriptOnly}),e.type===`system`&&e.subtype===`local_command`&&typeof e.content==`string`&&(e.content.includes(`<local-command-stdout>`)||e.content.includes(`<local-command-stderr>`))&&(yield We(e.content,e.uuid)),e.type===`system`&&e.subtype===`compact_boundary`){let t=e;yield{type:`system`,subtype:`compact_boundary`,session_id:B(),uuid:e.uuid,compact_metadata:He(t.compactMetadata)}}A&&(await s(G),(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await k()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-j,duration_api_ms:R(),num_turns:G.length-1,result:je??``,stop_reason:null,session_id:B(),total_cost_usd:I(),usage:this.totalUsage,modelUsage:L(),permission_denials:this.permissionDenials,fast_mode_state:K(q,M.fastMode),uuid:X()};return}if(ee()&&A){let e=Qe()?.selectableUserMessagesFilter??(e=>!0);W.filter(e).forEach(e=>{ne(e=>{E(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let J=Ve,Y=1,qe=!1,Ye,Z=null,Q=Oe().at(-1),$e=C?ce(this.mutableMessages,Le):0;for await(let e of he({messages:G,systemPrompt:Ce,userContext:V,systemContext:xe,canUseTool:me,toolUseContext:U,fallbackModel:S,querySource:`sdk`,maxTurns:f,taskBudget:h})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(A&&e.type===`system`&&e.subtype===`compact_boundary`){let t=e.compactMetadata?.preservedSegment?.tailUuid;if(t){let e=this.mutableMessages.findLastIndex(e=>e.uuid===t);e!==-1&&await s(this.mutableMessages.slice(0,e+1))}}if(G.push(e),A&&(e.type===`assistant`?s(G):await s(G)),!qe&&Ie.length>0){qe=!0;for(let e of Ie)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:B(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}}switch(e.type===`user`&&Y++,e.type){case`tombstone`:break;case`assistant`:{let t=e,n=t.message?.stop_reason;n!=null&&(Z=n),this.mutableMessages.push(t),yield*w(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),A&&(G.push(t),s(G)),yield*w(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*w(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){J=Ve;let e=t.message;J=le(J,e.usage)}if(t.type===`message_delta`){J=le(J,t.usage);let e=t.delta;e.stop_reason!=null&&(Z=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=p(this.totalUsage,J)),se&&(yield{type:`stream_event`,event:t,session_id:B(),parent_tool_use_id:null,uuid:X()});break}case`attachment`:{let n=e;this.mutableMessages.push(n),A&&(G.push(n),s(G));let r=n.attachment;if(r.type===`structured_output`)Ye=r.data;else if(r.type===`max_turns_reached`){A&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await k(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-j,duration_api_ms:R(),is_error:!0,num_turns:r.turnCount,stop_reason:Z,session_id:B(),total_cost_usd:I(),usage:this.totalUsage,modelUsage:L(),permission_denials:this.permissionDenials,fast_mode_state:K(q,M.fastMode),uuid:X(),errors:[`Reached maximum number of turns (${r.maxTurns})`]};return}else D&&r.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:r.prompt},session_id:B(),parent_tool_use_id:null,uuid:r.source_uuid||n.uuid,timestamp:n.timestamp,isReplay:!0});break}case`stream_request_start`:break;case`system`:{let t=e,n=this.config.snipReplay?.(t,this.mutableMessages);if(n!==void 0){n.executed&&(this.mutableMessages.length=0,this.mutableMessages.push(...n.messages));break}if(this.mutableMessages.push(t),t.subtype===`compact_boundary`&&t.compactMetadata){let e=t,n=this.mutableMessages.length-1;n>0&&this.mutableMessages.splice(0,n);let r=G.length-1;r>0&&G.splice(0,r),yield{type:`system`,subtype:`compact_boundary`,session_id:B(),uuid:t.uuid,compact_metadata:He(e.compactMetadata)}}if(t.subtype===`api_error`){let e=t;yield{type:`system`,subtype:`api_retry`,attempt:e.retryAttempt,max_retries:e.maxRetries,retry_delay_ms:e.retryInMs,error_status:e.error.status??null,error:ue(e.error),session_id:B(),uuid:t.uuid}}break}case`tool_use_summary`:{let t=e;yield{type:`tool_use_summary`,summary:t.summary,preceding_tool_use_ids:t.precedingToolUseIds,session_id:B(),uuid:t.uuid};break}}if(m!==void 0&&I()>=m){A&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await k(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-j,duration_api_ms:R(),is_error:!0,num_turns:Y,stop_reason:Z,session_id:B(),total_cost_usd:I(),usage:this.totalUsage,modelUsage:L(),permission_denials:this.permissionDenials,fast_mode_state:K(q,M.fastMode),uuid:X(),errors:[`Reached maximum budget ($${m}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&C){let e=ce(this.mutableMessages,Le)-$e,n=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=n){A&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await k(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-j,duration_api_ms:R(),is_error:!0,num_turns:Y,stop_reason:Z,session_id:B(),total_cost_usd:I(),usage:this.totalUsage,modelUsage:L(),permission_denials:this.permissionDenials,fast_mode_state:K(q,M.fastMode),uuid:X(),errors:[`Failed to provide valid structured output after ${n} attempts`]};return}}}let $=G.findLast(e=>e.type===`assistant`||e.type===`user`),et=$?.type??`undefined`,tt=$?.type===`assistant`?oe($.message.content)?.type??`none`:`n/a`;if(A&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await k(),!c($,Z)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-j,duration_api_ms:R(),is_error:!0,num_turns:Y,stop_reason:Z,session_id:B(),total_cost_usd:I(),usage:this.totalUsage,modelUsage:L(),permission_denials:this.permissionDenials,fast_mode_state:K(q,M.fastMode),uuid:X(),errors:(()=>{let e=Oe(),t=Q?e.lastIndexOf(Q)+1:0;return[`[ede_diagnostic] result_type=${et} last_content_type=${tt} stop_reason=${Z}`,...e.slice(t).map(e=>e.error)]})()};return}let nt=``,rt=!1;if($.type===`assistant`){let e=oe($.message.content);e?.type===`text`&&!ie.has(e.text)&&(nt=e.text),rt=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:rt,duration_ms:Date.now()-j,duration_api_ms:R(),num_turns:Y,result:nt,stop_reason:Z,session_id:B(),total_cost_usd:I(),usage:this.totalUsage,modelUsage:L(),permission_denials:this.permissionDenials,structured_output:Ye,fast_mode_state:K(q,M.fastMode),uuid:X()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=x()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return B()}setModel(e){this.config.userSpecifiedModel=e}};async function*Q({commands:e,prompt:t,promptUuid:n,isMeta:r,cwd:i,tools:a,mcpClients:o,verbose:s=!1,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,canUseTool:f,mutableMessages:p=[],getReadFileCache:m,setReadFileCache:h,customSystemPrompt:g,appendSystemPrompt:_,userSpecifiedModel:v,fallbackModel:y,jsonSchema:ee,getAppState:te,setAppState:ne,abortController:re,replayUserMessages:b=!1,includePartialMessages:x=!1,handleElicitation:S,agents:C=[],setSDKStatus:ie,orphanedPermission:w}){let T=new Z({cwd:i,tools:a,commands:e,mcpClients:o,agents:C??[],canUseTool:f,getAppState:te,setAppState:ne,initialMessages:p,readFileCache:se(m()),customSystemPrompt:g,appendSystemPrompt:_,userSpecifiedModel:v,fallbackModel:y,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:ee,verbose:s,handleElicitation:S,replayUserMessages:b,includePartialMessages:x,setSDKStatus:ie,abortController:re,orphanedPermission:w});try{yield*T.submitMessage(t,{uuid:n,isMeta:r})}finally{h(T.getReadFileState())}}export{Q as n,Ye as r,Z as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./REPL-DIaAo9M9.js";export{e as REPL};