@readmagic/workmate 0.0.7 → 0.0.8

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 (558) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-CwLtQld4.js +1 -0
  2. package/dist/chunks/App-Ba52HvYC.js +1 -0
  3. package/dist/chunks/{ApproveApiKey-B2HJUD7h.js → ApproveApiKey-CEIfuUh0.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-D2MLQu2P.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-IGDrkbWl.js +2 -0
  6. package/dist/chunks/{BypassPermissionsModeDialog-DllL8dxU.js → BypassPermissionsModeDialog-GYhq--JR.js} +1 -1
  7. package/dist/chunks/{ClaudeMdExternalIncludesDialog-BZSyRqeq.js → ClaudeMdExternalIncludesDialog-C-CTa-95.js} +1 -1
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-Catv6BCJ.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-BeQXqUtX.js +1 -0
  10. package/dist/chunks/{DiffDialog-B7hx8i_Y.js → DiffDialog-AC5DSJrq.js} +6 -6
  11. package/dist/chunks/Doctor-B9Rxsoy0.js +1 -0
  12. package/dist/chunks/Doctor-lhUBhEy5.js +3 -0
  13. package/dist/chunks/ExitFlow-Cu8SoQHs.js +2 -0
  14. package/dist/chunks/Grove-Bc4CofEj.js +11 -0
  15. package/dist/chunks/{HybridTransport-rK83Qijz.js → HybridTransport-BJPOG2wl.js} +3 -3
  16. package/dist/chunks/{InvalidConfigDialog-DdO0AxyF.js → InvalidConfigDialog-BI13il58.js} +1 -1
  17. package/dist/chunks/{InvalidSettingsDialog-s1G0DwXF.js → InvalidSettingsDialog-CtOheV1K.js} +1 -1
  18. package/dist/chunks/MCPConnectionManager-ao-P3xSA.js +1 -0
  19. package/dist/chunks/MCPToolListView-dkofcJs4.js +1 -0
  20. package/dist/chunks/{McpParsingWarnings-Du5IxZos.js → McpParsingWarnings-BS4JoR5l.js} +1 -1
  21. package/dist/chunks/MessageSelector-B88b2ypw.js +3 -0
  22. package/dist/chunks/Messages-BPeI7lLV.js +11 -0
  23. package/dist/chunks/Onboarding-c2fQ8Io_.js +1 -0
  24. package/dist/chunks/{PromptInputFooterSuggestions-BmsFdOu9.js → PromptInputFooterSuggestions-D1cH9sDX.js} +1 -1
  25. package/dist/chunks/{PromptInputHelpMenu-DX-0wEDo.js → PromptInputHelpMenu-DDD5WuK0.js} +1 -1
  26. package/dist/chunks/QueryEngine-Cv_meCam.js +1 -0
  27. package/dist/chunks/REPL-BXhAQOXb.js +139 -0
  28. package/dist/chunks/REPL-YqjLnr3A.js +1 -0
  29. package/dist/chunks/RemoteSessionManager-CT7T8BaR.js +2 -0
  30. package/dist/chunks/ResumeConversation-CIZCjms9.js +1 -0
  31. package/dist/chunks/{SSETransport-5VK5okFv.js → SSETransport-CrwbKuVt.js} +3 -3
  32. package/dist/chunks/SearchExtraToolsTool-Dx6093yw.js +1 -0
  33. package/dist/chunks/Settings-CyUm0AtU.js +2 -0
  34. package/dist/chunks/{TeleportProgress-DxN0bQL2.js → TeleportProgress-C3qyp5zy.js} +1 -1
  35. package/dist/chunks/TeleportRepoMismatchDialog-BV--nyYn.js +1 -0
  36. package/dist/chunks/TeleportResumeWrapper-Blo2cZg-.js +1 -0
  37. package/dist/chunks/ThemePicker-EQ6hPUeI.js +1 -0
  38. package/dist/chunks/TrustDialog-BukWGvHZ.js +1 -0
  39. package/dist/chunks/{ValidationErrorsList-BYsDtAvX.js → ValidationErrorsList-DokTJQwi.js} +1 -1
  40. package/dist/chunks/{WelcomeV2-C1BfrqC5.js → WelcomeV2-Ci9VwPYh.js} +1 -1
  41. package/dist/chunks/{add-dir-DfLYgwox.js → add-dir-DPQV0qml.js} +1 -1
  42. package/dist/chunks/{agentDisplay-CMmHIl86.js → agentDisplay-DBQYOaOh.js} +1 -1
  43. package/dist/chunks/agents-DmybpgDN.js +103 -0
  44. package/dist/chunks/{agents-DE_4mAHG.js → agents-HlKk68Qc.js} +1 -1
  45. package/dist/chunks/allErrors-BPn_2TrB.js +1 -0
  46. package/dist/chunks/analytics-CkYUHW_U.js +1 -0
  47. package/dist/chunks/ant-DjdvlLOo.js +1 -0
  48. package/dist/chunks/api-AMgj1zf_.js +1 -0
  49. package/dist/chunks/api-CF5IVtj0.js +1 -0
  50. package/dist/chunks/{asciicast-CbAjUHT_.js → asciicast-BJNYO5sh.js} +1 -1
  51. package/dist/chunks/asciicast-CH6hdK0a.js +1 -0
  52. package/dist/chunks/auth-CNjDn1VY.js +15 -0
  53. package/dist/chunks/auth-CZzP483s.js +1 -0
  54. package/dist/chunks/auth-DDSBm_Yj.js +1 -0
  55. package/dist/chunks/{autoMode-ZW70mpr0.js → autoMode-Cr0AhS1G.js} +5 -5
  56. package/dist/chunks/{autonomy-CwbWsCnv.js → autonomy-ARUQt-Lu.js} +1 -1
  57. package/dist/chunks/{autonomy-Oui8yK8G.js → autonomy-D4xZLOdJ.js} +7 -7
  58. package/dist/chunks/{autonomyPanel-Mq50H7iM.js → autonomyPanel-BQK9MoeB.js} +1 -1
  59. package/dist/chunks/backgroundHousekeeping--eBgphcg.js +17 -0
  60. package/dist/chunks/backgroundHousekeeping-VV1V_Y2Z.js +1 -0
  61. package/dist/chunks/{banner-CWkrK10u.js → banner-Ca7rki2V.js} +2 -2
  62. package/dist/chunks/bg-BK_9J6F6.js +1 -0
  63. package/dist/chunks/{bg-WnYN5ifx.js → bg-DxRHF1yn.js} +2 -2
  64. package/dist/chunks/{branch-DU5O9KZ0.js → branch-BYq0zpzT.js} +1 -1
  65. package/dist/chunks/{break-cache-C_p7Kmx2.js → break-cache-BKvoMOZx.js} +2 -2
  66. package/dist/chunks/bridgeConfig-C82un7rJ.js +1 -0
  67. package/dist/chunks/{bridgeConfig-CE6dMsiJ.js → bridgeConfig-jDEva6Eh.js} +1 -1
  68. package/dist/chunks/bridgeMessaging-YqYdl6ej.js +1 -0
  69. package/dist/chunks/bridgePointer-DIM0sj0x.js +1 -0
  70. package/dist/chunks/btw-CUV3nRrE.js +1 -0
  71. package/dist/chunks/caches-BZ59_En6.js +1 -0
  72. package/dist/chunks/caches-Cg-HtWKG.js +1 -0
  73. package/dist/chunks/capacityWake-CKOiRELo.js +3 -0
  74. package/dist/chunks/ccrClient-BC2q3k44.js +1 -0
  75. package/dist/chunks/{claudeDesktop-Fe-QL-sN.js → claudeDesktop-DQXL5bGm.js} +1 -1
  76. package/dist/chunks/{clear-D8m2utXW.js → clear-1etSJhdg.js} +1 -1
  77. package/dist/chunks/{cliLaunch-BkPAatcs.js → cliLaunch-CQjLYRzM.js} +1 -1
  78. package/dist/chunks/client-DQXvVKND.js +1 -0
  79. package/dist/chunks/{client-C6MbjvOB.js → client-DQwf_b9o.js} +1 -1
  80. package/dist/chunks/client-DkgC-mFB.js +1 -0
  81. package/dist/chunks/{color-DWhgZH7A.js → color-CBsNbt1s.js} +1 -1
  82. package/dist/chunks/commands-qM5z_Uld.js +1 -0
  83. package/dist/chunks/compact-BclJiRJe.js +2 -0
  84. package/dist/chunks/completionCache-BMHAktkM.js +1 -0
  85. package/dist/chunks/config-CE058cvr.js +3 -0
  86. package/dist/chunks/config-D81avYye.js +1 -0
  87. package/dist/chunks/config-DpOOllGk.js +1 -0
  88. package/dist/chunks/context-noninteractive-Ct_ttQfP.js +29 -0
  89. package/dist/chunks/context-noninteractive-DJb8H_hN.js +1 -0
  90. package/dist/chunks/context-sR9fJmXE.js +1 -0
  91. package/dist/chunks/conversation-D48Kt3ar.js +1 -0
  92. package/dist/chunks/conversation-fOFTa7k5.js +1 -0
  93. package/dist/chunks/{createSSHSession-BOdTAX3N.js → createSSHSession-BmHXA2me.js} +1 -1
  94. package/dist/chunks/createSession-C4rukWkv.js +1 -0
  95. package/dist/chunks/createSession-CSwlW2T2.js +1 -0
  96. package/dist/chunks/crossProjectResume-lDFB2ZcY.js +40 -0
  97. package/dist/chunks/cwd-5Xr-Qka6.js +1 -0
  98. package/dist/chunks/cwd-C5ce-7WB.js +1 -0
  99. package/dist/chunks/{daemon-YtZbMQtn.js → daemon-ZtpTZWgQ.js} +1 -1
  100. package/dist/chunks/{datadog-DqHxqiwY.js → datadog-BJn5ECIu.js} +1 -1
  101. package/dist/chunks/{debug-BrXObCdR.js → debug-RZ4NuXyS.js} +1 -1
  102. package/dist/chunks/debugUtils-D30M1cbN.js +1 -0
  103. package/dist/chunks/{detached-TYk4hMFj.js → detached-jrVP11oU.js} +1 -1
  104. package/dist/chunks/{detectRepository-BPr0VWNO.js → detectRepository-CFiHe6Rv.js} +1 -1
  105. package/dist/chunks/detectRepository-DqQvyj_a.js +1 -0
  106. package/dist/chunks/{diff-CJEKvOA5.js → diff-BKiK3xHv.js} +1 -1
  107. package/dist/chunks/directoryCompletion-BagQcynj.js +1 -0
  108. package/dist/chunks/doctor-BEHYm34V.js +1 -0
  109. package/dist/chunks/{entry-DE0uMIf0.js → entry-BzL1MFQG.js} +4 -4
  110. package/dist/chunks/esm-BLPbfHQd.js +1 -0
  111. package/dist/chunks/{execFileNoThrow-D244NytW.js → execFileNoThrow-CCX-JY8h.js} +1 -1
  112. package/dist/chunks/{execSyncWrapper-CCMQShK-.js → execSyncWrapper-dhRSYGFW.js} +1 -1
  113. package/dist/chunks/exit-DE2YiAhQ.js +1 -0
  114. package/dist/chunks/{lazySchema-DULtBUCI.js → external-CEp-aPkt.js} +1 -1
  115. package/dist/chunks/extraUsage-Dw7AXiH7.js +1 -0
  116. package/dist/chunks/extractMemories-DxTUMiv3.js +1 -0
  117. package/dist/chunks/fast-CHmMkIpE.js +1 -0
  118. package/dist/chunks/fast-uQASHWqR.js +1 -0
  119. package/dist/chunks/fileSuggestions-Dyu2kQtE.js +3 -0
  120. package/dist/chunks/firstPartyEventLogger-D5ohKbIe.js +5 -0
  121. package/dist/chunks/firstPartyEventLogger-LsNY6yOt.js +1 -0
  122. package/dist/chunks/flushGate-Cnsu4HET.js +1 -0
  123. package/dist/chunks/gemini-Cudre91e.js +1 -0
  124. package/dist/chunks/generateRecap-CiFxXlmH.js +1 -0
  125. package/dist/chunks/generateSessionName-DitoBxJT.js +1 -0
  126. package/dist/chunks/{genericProcessUtils-CdQTApYX.js → genericProcessUtils-DVfMHhfy.js} +1 -1
  127. package/dist/chunks/git-BerW9bId.js +6 -0
  128. package/dist/chunks/git-D6dOU2mT.js +1 -0
  129. package/dist/chunks/githubRepoPathMapping-DGr0kJ8D.js +1 -0
  130. package/dist/chunks/{goal-B4GsR54_.js → goal-DuUayfDg.js} +3 -3
  131. package/dist/chunks/grok-tRbmZzEh.js +1 -0
  132. package/dist/chunks/grove-Cv19v6Sv.js +7 -0
  133. package/dist/chunks/help-DkqxbFDM.js +1 -0
  134. package/dist/chunks/{hooks-CkA9bhHl.js → hooks-BZJTWD07.js} +2 -2
  135. package/dist/chunks/hooks-CsP42iOp.js +1 -0
  136. package/dist/chunks/initReplBridge-DdsSWVqN.js +1 -0
  137. package/dist/chunks/{install-Dzlm4u58.js → install-BI---dv0.js} +1 -1
  138. package/dist/chunks/{instrumentation-Yt31gxWN.js → instrumentation-CcWzhGfE.js} +4 -4
  139. package/dist/chunks/{job-BXujwZNa.js → job-B0ftcqPF.js} +1 -1
  140. package/dist/chunks/{jwtUtils-DE2GPUcx.js → jwtUtils-C0cE-1Ey.js} +1 -1
  141. package/dist/chunks/keybindings-DZU3vwo3.js +2 -0
  142. package/dist/chunks/language-DHhXLb_Y.js +1 -0
  143. package/dist/chunks/{language-Ca4B018X.js → language-s-dLbdVz.js} +1 -1
  144. package/dist/chunks/launchLocalMemory-twLxpPvg.js +3 -0
  145. package/dist/chunks/{launchOnboarding-gOVAFEFp.js → launchOnboarding-BWz2XSb9.js} +1 -1
  146. package/dist/chunks/lazySchema-B4D4qJVE.js +1 -0
  147. package/dist/chunks/{loadAgentsDir-x3rlgED4.js → loadAgentsDir-ByO8eJqU.js} +1710 -1977
  148. package/dist/chunks/loadAgentsDir-CMNFLt7R.js +1 -0
  149. package/dist/chunks/loadPluginHooks-BPnxcgrL.js +1 -0
  150. package/dist/chunks/{localSearch-DtplGF-l.js → localSearch-CHHCH16D.js} +1 -1
  151. package/dist/chunks/localSearch-DzQODFap.js +1 -0
  152. package/dist/chunks/log-CZ0zYP_c.js +1 -0
  153. package/dist/chunks/logoV2Utils-CGUJ-5gY.js +1 -0
  154. package/dist/chunks/{magicDocs-qdDB_mKb.js → magicDocs-C5i5ruuU.js} +3 -3
  155. package/dist/chunks/{main-D862LI_d.js → main-BLD4QAQg.js} +2 -2
  156. package/dist/chunks/{main-OWFSddRx.js → main-D4Uk-WUs.js} +87 -84
  157. package/dist/chunks/{managedEnv-Aq5BXfY7.js → managedEnv-C-9XSN14.js} +1 -1
  158. package/dist/chunks/managedEnv-DLVRBaA9.js +1 -0
  159. package/dist/chunks/{mappers-04gNXJ3w.js → mappers-CHRFic5q.js} +1 -1
  160. package/dist/chunks/mcp-BMVdGknC.js +1 -0
  161. package/dist/chunks/mcp-COS5RJFS.js +6 -0
  162. package/dist/chunks/mcp-tGsOW1GN.js +2 -0
  163. package/dist/chunks/memoize-B8hfb1JN.js +1 -0
  164. package/dist/chunks/memory-DR6poqeH.js +1 -0
  165. package/dist/chunks/{mode-DY087x_x.js → mode-QV-NW1Wd.js} +2 -2
  166. package/dist/chunks/model-BF_4ebyl.js +1 -0
  167. package/dist/chunks/{model-D0EfJBuw.js → model-BNU_ulDJ.js} +1 -1
  168. package/dist/chunks/model-CwO-g1RW.js +1 -0
  169. package/dist/chunks/nativeInstaller-B-lNJjM-.js +1 -0
  170. package/dist/chunks/observationStore-BpjlK0pG.js +3 -0
  171. package/dist/chunks/omit-DZCEXri5.js +1 -0
  172. package/dist/chunks/onChangeAppState-BmfM5g-D.js +1 -0
  173. package/dist/chunks/{openai-EYRnUsco.js → openai-DPH6rXOZ.js} +3 -3
  174. package/dist/chunks/{panel-BSZGX6jN.js → panel-mD094ALT.js} +1 -1
  175. package/dist/chunks/{panelCall-dMvRPAGE.js → panelCall-SbffM7G4.js} +1 -1
  176. package/dist/chunks/parser-DrBC8nWp.js +1 -0
  177. package/dist/chunks/{parser-DFwaTGf7.js → parser-dbHRgXb8.js} +1 -1
  178. package/dist/chunks/partition-DKuAFJkc.js +1 -0
  179. package/dist/chunks/{path-D5U-tm91.js → path-Cv9QMBAX.js} +1 -1
  180. package/dist/chunks/permissions-ey-bfanE.js +3 -0
  181. package/dist/chunks/{pidLock-CbC_il6r.js → pidLock-DJnS_38v.js} +2 -2
  182. package/dist/chunks/{pipeTransport-CqCnc-Ys.js → pipeTransport-DVOKR4c_.js} +1 -1
  183. package/dist/chunks/{plan-rsb_83Fo.js → plan-Brg9XnRr.js} +1 -1
  184. package/dist/chunks/{platform-BrYefG_2.js → platform-DCXXznJg.js} +1 -1
  185. package/dist/chunks/plugin-CRwa39Y1.js +17 -0
  186. package/dist/chunks/{pluginAutoupdate-0k03PVff.js → pluginAutoupdate-D0LIP7cy.js} +1 -1
  187. package/dist/chunks/pluginBlocklist-PwHHD3nj.js +1 -0
  188. package/dist/chunks/pluginCliCommands-BJM5Bdpf.js +1 -0
  189. package/dist/chunks/pluginFlagging-pBxSselw.js +1 -0
  190. package/dist/chunks/pluginOperations-C7p_Qr2r.js +2 -0
  191. package/dist/chunks/pluginStartupCheck-C0HqhG6D.js +1 -0
  192. package/dist/chunks/pluginStartupCheck-Di4LjHXf.js +1 -0
  193. package/dist/chunks/{plugins-CQNKZmjP.js → plugins-DUKNjLq6.js} +4 -4
  194. package/dist/chunks/pollConfig-BgpfHQPJ.js +1 -0
  195. package/dist/chunks/{poorMode-CBOtooa0.js → poorMode-CYXmr_mU.js} +1 -1
  196. package/dist/chunks/poorMode-CejPNCp-.js +1 -0
  197. package/dist/chunks/print-gyTOCJzk.js +23 -0
  198. package/dist/chunks/processBashCommand-Cze9vCm6.js +1 -0
  199. package/dist/chunks/processSlashCommand-BRajh1v7.js +5 -0
  200. package/dist/chunks/prompt-B7joRiqj.js +139 -0
  201. package/dist/chunks/prompt-DqSMh2x9.js +1 -0
  202. package/dist/chunks/prompt-Eysh8Et_.js +1 -0
  203. package/dist/chunks/{promptEditor-CyTzyjwG.js → promptEditor-R_acDAgI.js} +2 -2
  204. package/dist/chunks/{protocolHandler-JR8pASdH.js → protocolHandler-RNKkhq91.js} +1 -1
  205. package/dist/chunks/{proxy-CRN7jYIi.js → proxy-BmtEnJ02.js} +1 -1
  206. package/dist/chunks/rcDebugLog-CARUIORE.js +1 -0
  207. package/dist/chunks/reconciler-BfkO6X2X.js +4 -0
  208. package/dist/chunks/refresh-C1X3sptR.js +1 -0
  209. package/dist/chunks/registerProtocol-DoKqmqu2.js +36 -0
  210. package/dist/chunks/{reload-plugins-B9ApSp2m.js → reload-plugins-C0osFcNh.js} +1 -1
  211. package/dist/chunks/remoteBridgeCore-Cddqv2WW.js +1 -0
  212. package/dist/chunks/remoteManagedSettings-B1mnRDmA.js +1 -0
  213. package/dist/chunks/rename-B3tf-YiD.js +1 -0
  214. package/dist/chunks/{renderOptions-BUJB9nAm.js → renderOptions-ChLwxtVu.js} +1 -1
  215. package/dist/chunks/replBridgeHandle-CNwNIijW.js +1 -0
  216. package/dist/chunks/{resume-BicEjsPd.js → resume-Be1G_GBL.js} +2 -2
  217. package/dist/chunks/ripgrep-C2PhTJDh.js +1 -0
  218. package/dist/chunks/{ripgrep-BXmXjAzA.js → ripgrep-gaT9Njwi.js} +1 -1
  219. package/dist/chunks/{runtimeObserver-CiwnPFjK.js → runtimeObserver-CsIwinzh.js} +1 -1
  220. package/dist/chunks/runtimeObserver-Dbxxw4ls.js +10 -0
  221. package/dist/chunks/sandbox-adapter-C6GBuJPB.js +1 -0
  222. package/dist/chunks/sandbox-toggle-jEySONTW.js +1 -0
  223. package/dist/chunks/searchExtraTools-C_UTryh_.js +1 -0
  224. package/dist/chunks/session-DDI1Eb2x.js +2 -0
  225. package/dist/chunks/sessionFileAccessHooks-DfJ7Htfl.js +1 -0
  226. package/dist/chunks/sessionIdCompat-DMayYBrf.js +1 -0
  227. package/dist/chunks/sessionMemory-CQBxPkTQ.js +1 -0
  228. package/dist/chunks/sessionMemory-s0ALUHvc.js +1 -0
  229. package/dist/chunks/sessionMemoryUtils-xt7dTHGC.js +1 -0
  230. package/dist/chunks/sessionObserver-C2sYqWL3.js +1 -0
  231. package/dist/chunks/sessionObserver-DoYc0ZOP.js +20 -0
  232. package/dist/chunks/sessionState-CjNY991n.js +11 -0
  233. package/dist/chunks/sessionStorage-DqsY-7pi.js +1 -0
  234. package/dist/chunks/{sessionTitle-DAnM73S0.js → sessionTitle-B0OYf5nM.js} +3 -3
  235. package/dist/chunks/sessionTracing-CwsXt_uA.js +11 -0
  236. package/dist/chunks/settings-BWtOA9A7.js +1 -0
  237. package/dist/chunks/settings-hQDLwPVj.js +20 -0
  238. package/dist/chunks/settingsSync-DdFagwHV.js +1 -0
  239. package/dist/chunks/setup-DzC22EkN.js +3 -0
  240. package/dist/chunks/{shadowedRuleDetection-C6R5zOUe.js → shadowedRuleDetection-C86PTj1m.js} +1 -1
  241. package/dist/chunks/{shellQuote-DkSy9MYE.js → shellQuote-BUVKMu_P.js} +1 -1
  242. package/dist/chunks/{sideQuestion-hUhxls9r.js → sideQuestion-C780iYwd.js} +3 -3
  243. package/dist/chunks/sinks-5G_xhc1Q.js +1 -0
  244. package/dist/chunks/{sinks-BuE17DeZ.js → sinks-Cftq7Es0.js} +2 -2
  245. package/dist/chunks/skillChangeDetector-plLveEbf.js +1 -0
  246. package/dist/chunks/skillGapStore-Dc1arohs.js +5 -0
  247. package/dist/chunks/skillLifecycle-DP6mY1Kp.js +8 -0
  248. package/dist/chunks/{skillSearchPanel-Cll9ccA5.js → skillSearchPanel-CpLTImaL.js} +4 -4
  249. package/dist/chunks/{skills-BPPeYBy7.js → skills-zGYaYfFV.js} +1 -1
  250. package/dist/chunks/{src-D06Xyj4g.js → src-BN7QRYLl.js} +1 -1
  251. package/dist/chunks/startupProfiler-DCn_NxMH.js +3 -0
  252. package/dist/chunks/startupProfiler-JbpAkfNE.js +1 -0
  253. package/dist/chunks/{state-ix0xIunV.js → state-C2OSZkV1.js} +1 -1
  254. package/dist/chunks/state-DU9lRJ9x.js +1 -0
  255. package/dist/chunks/{stats-CqfF4Axp.js → stats-Duk7_xjQ.js} +1 -1
  256. package/dist/chunks/{status-D4IQpsNK.js → status-CFw-FpZM.js} +2 -2
  257. package/dist/chunks/{status-CC9Q-2Yn.js → status-peiVB_2j.js} +1 -1
  258. package/dist/chunks/statusNoticeHelpers-B5U5c9PE.js +1 -0
  259. package/dist/chunks/{stringUtils-DGLPkqJ4.js → stringUtils-B6FudhoZ.js} +1 -1
  260. package/dist/chunks/switcher-BAMqSX7Z.js +1 -0
  261. package/dist/chunks/switcher-hgBgVzLb.js +1 -0
  262. package/dist/chunks/syncCache-Zl9kZRRl.js +1 -0
  263. package/dist/chunks/{tasks-CZvWJYGr.js → tasks-BxpyRhmD.js} +1 -1
  264. package/dist/chunks/teleport-CwxeD5vL.js +1 -0
  265. package/dist/chunks/{templateJobs-D1BdhZsv.js → templateJobs-DR5fKFiO.js} +1 -1
  266. package/dist/chunks/{terminalSetup-Cn6jeYw1.js → terminalSetup-DgRBt-JJ.js} +1 -1
  267. package/dist/chunks/terminalSetup-DlaFWI81.js +33 -0
  268. package/dist/chunks/{theme-Cg4GNOoQ.js → theme-Bz6esfST.js} +1 -1
  269. package/dist/chunks/{tmux-BY7IdQ1f.js → tmux-DSU9tYIo.js} +1 -1
  270. package/dist/chunks/{toolEventObserver-SFwURL5F.js → toolEventObserver-BSekCkM2.js} +1 -1
  271. package/dist/chunks/toolPool-B7SIoDw5.js +1 -0
  272. package/dist/chunks/{trustedDevice-CKedohmT.js → trustedDevice-B0x9X0fb.js} +1 -1
  273. package/dist/chunks/trustedDevice-CjHQtVkO.js +1 -0
  274. package/dist/chunks/{types-Dut4311z.js → types-D7_37tP2.js} +2 -2
  275. package/dist/chunks/{udsClient-BuCtv7dN.js → udsClient-CHoMMH28.js} +1 -1
  276. package/dist/chunks/{up-BHkC97_C.js → up-B8wBSpLg.js} +1 -1
  277. package/dist/chunks/{updateCCB-C2G-U-qA.js → updateCCB-D_kGQKPT.js} +1 -1
  278. package/dist/chunks/{upstreamproxy-DyR_eXO8.js → upstreamproxy-Hmq-n8fw.js} +1 -1
  279. package/dist/chunks/useExitOnCtrlCDWithKeybindings-Cce612uS.js +1 -0
  280. package/dist/chunks/useMainLoopModel-BICP6_Fi.js +1 -0
  281. package/dist/chunks/useManagePlugins-DtbY_vPL.js +1 -0
  282. package/dist/chunks/useMergedTools-Ckx2IEhF.js +1 -0
  283. package/dist/chunks/{useSearchInput-C5OzQnX6.js → useSearchInput-BAgljZUl.js} +1 -1
  284. package/dist/chunks/useSettingsErrors-CAJR_wpd.js +1 -0
  285. package/dist/chunks/userAgent-BxTG7IMk.js +1 -0
  286. package/dist/chunks/{util-8EHwfg4A.js → util-DDtmyq_r.js} +1 -1
  287. package/dist/chunks/validatePlugin-AHl-g4ct.js +1 -0
  288. package/dist/chunks/{vim-CNDzwoTd.js → vim-kg-mRVbu.js} +1 -1
  289. package/dist/chunks/{which-CKQnSouy.js → which-CHLNJmtJ.js} +1 -1
  290. package/dist/chunks/windowsPaths-Pmx8LDR6.js +1 -0
  291. package/dist/chunks/{windowsPaths-DtapVxOo.js → windowsPaths-o62uq6LF.js} +1 -1
  292. package/dist/chunks/{workSecret-CNWiR2uQ.js → workSecret-DG9shvG0.js} +1 -1
  293. package/dist/chunks/workerRegistry-C7H_lsQX.js +6 -0
  294. package/dist/chunks/worktree-O2p-mJdF.js +1 -0
  295. package/dist/cli.js +1 -1
  296. package/package.json +1 -1
  297. package/dist/chunks/AddWorkspaceDirectory-CFrrXnt9.js +0 -1
  298. package/dist/chunks/App-Buad9Llp.js +0 -1
  299. package/dist/chunks/ApproveApiKey-BQbHdvc3.js +0 -1
  300. package/dist/chunks/AssistantSessionChooser-4lm4eXQ8.js +0 -1
  301. package/dist/chunks/BackgroundTasksDialog-D4qA0M5O.js +0 -2
  302. package/dist/chunks/ClaudeMdExternalIncludesDialog--ywODh81.js +0 -1
  303. package/dist/chunks/ConsoleOAuthFlow-Wkfw7Ts-.js +0 -1
  304. package/dist/chunks/DesktopHandoff-DaP4Riar.js +0 -1
  305. package/dist/chunks/Dialog-vfLXEPed.js +0 -1
  306. package/dist/chunks/Doctor-89OgoAUA.js +0 -1
  307. package/dist/chunks/Doctor-CuKJ-nGt.js +0 -3
  308. package/dist/chunks/ExitFlow-DnPydE17.js +0 -2
  309. package/dist/chunks/Feedback-SmGiR3mf.js +0 -2
  310. package/dist/chunks/Grove-CjN9DO47.js +0 -11
  311. package/dist/chunks/Grove-Cq88VBmM.js +0 -1
  312. package/dist/chunks/ListItem-vfLXEPed.js +0 -1
  313. package/dist/chunks/MCPConnectionManager-NRfIjdlj.js +0 -1
  314. package/dist/chunks/MessageSelector-iIroHvXo.js +0 -3
  315. package/dist/chunks/Messages-D4Hm4gaY.js +0 -11
  316. package/dist/chunks/Onboarding-BiZByBK-.js +0 -1
  317. package/dist/chunks/OverageCreditUpsell-BM7szLgm.js +0 -1
  318. package/dist/chunks/PluginSettings-uY5KTCtK.js +0 -17
  319. package/dist/chunks/QueryEngine-CGYaShXD.js +0 -1
  320. package/dist/chunks/REPL-CRJB2t2z.js +0 -142
  321. package/dist/chunks/REPL-u4Yq29Du.js +0 -1
  322. package/dist/chunks/RemoteCallout-B-tyvQOe.js +0 -1
  323. package/dist/chunks/RemoteSessionManager-DCd0O5_l.js +0 -2
  324. package/dist/chunks/ResumeConversation-DAAXlOCd.js +0 -1
  325. package/dist/chunks/SearchExtraToolsTool-B-7Bworf.js +0 -1
  326. package/dist/chunks/Settings-CUjWlncb.js +0 -2
  327. package/dist/chunks/TeleportRepoMismatchDialog-A5Ss0kuk.js +0 -1
  328. package/dist/chunks/TeleportResumeWrapper-Bz14mUqR.js +0 -1
  329. package/dist/chunks/ThemePicker-CVSRqTzW.js +0 -1
  330. package/dist/chunks/TrustDialog-CY8an_Tg.js +0 -1
  331. package/dist/chunks/TungstenTool-Cb7gJvq4.js +0 -1
  332. package/dist/chunks/TungstenTool-CxMQVCuF.js +0 -1
  333. package/dist/chunks/agents-DJtPfvnL.js +0 -103
  334. package/dist/chunks/allErrors-CQE2k0zO.js +0 -1
  335. package/dist/chunks/analytics-BotDBGh0.js +0 -1
  336. package/dist/chunks/ant-ClQkuQjZ.js +0 -1
  337. package/dist/chunks/api-2cdIPaeq.js +0 -1
  338. package/dist/chunks/api-CG-lhKe-.js +0 -1
  339. package/dist/chunks/asciicast-BsWpcxrc.js +0 -1
  340. package/dist/chunks/assistant-Bje16tQx.js +0 -1
  341. package/dist/chunks/assistant-C83quuNj.js +0 -1
  342. package/dist/chunks/assistant-z2o4-UJe.js +0 -1
  343. package/dist/chunks/auth-DMfEiQrC.js +0 -1
  344. package/dist/chunks/auth-D_cGl8WD.js +0 -1
  345. package/dist/chunks/auth-DqcKPbw8.js +0 -15
  346. package/dist/chunks/backgroundHousekeeping-BpLtI45r.js +0 -1
  347. package/dist/chunks/backgroundHousekeeping-DtJNx4Ja.js +0 -17
  348. package/dist/chunks/bg-B0iMGM9C.js +0 -1
  349. package/dist/chunks/bridge-DNNxtPlz.js +0 -2
  350. package/dist/chunks/bridgeConfig-DP9dD1Cv.js +0 -1
  351. package/dist/chunks/bridgeEnabled-Cc0mGlTb.js +0 -1
  352. package/dist/chunks/bridgeEnabled-D8wP3DWQ.js +0 -1
  353. package/dist/chunks/bridgeMain-CwxMa_pd.js +0 -1
  354. package/dist/chunks/bridgeMain-D11t1BYQ.js +0 -68
  355. package/dist/chunks/bridgeMessaging-DdvApEqW.js +0 -1
  356. package/dist/chunks/bridgePointer-DqHMHa2B.js +0 -1
  357. package/dist/chunks/browser-BmZuQom6.js +0 -1
  358. package/dist/chunks/btw-CejSEdNl.js +0 -1
  359. package/dist/chunks/caches-5HVQSevy.js +0 -3
  360. package/dist/chunks/caches-B-nJoHLM.js +0 -1
  361. package/dist/chunks/capacityWake-CV_x9H8j.js +0 -1
  362. package/dist/chunks/ccrClient-BFyfO67b.js +0 -1
  363. package/dist/chunks/client-DKXCfdde.js +0 -1
  364. package/dist/chunks/client-xxikkAoZ.js +0 -1
  365. package/dist/chunks/commands-CxJpmEKF.js +0 -1
  366. package/dist/chunks/commitAttribution-DM6SBMwl.js +0 -1
  367. package/dist/chunks/commitAttribution-DPnHHKSA.js +0 -2
  368. package/dist/chunks/compact-CblM7306.js +0 -2
  369. package/dist/chunks/completionCache-MN3_MqK8.js +0 -4
  370. package/dist/chunks/completionCache-c4aiyZ_f.js +0 -1
  371. package/dist/chunks/config-BLVBFi5v.js +0 -1
  372. package/dist/chunks/config-CMnqm6Se.js +0 -1
  373. package/dist/chunks/config-DRDuVyzE.js +0 -3
  374. package/dist/chunks/context-CdSMMM-0.js +0 -1
  375. package/dist/chunks/context-noninteractive-CPkf2vB9.js +0 -1
  376. package/dist/chunks/context-noninteractive-DNury4JI.js +0 -54
  377. package/dist/chunks/conversation-DCMw_rsE.js +0 -1
  378. package/dist/chunks/conversation-pUtvc-cE.js +0 -1
  379. package/dist/chunks/createSession-8Ei-Lj7V.js +0 -1
  380. package/dist/chunks/createSession-CjqxVh_Q.js +0 -1
  381. package/dist/chunks/cron-3LntnnhJ.js +0 -1
  382. package/dist/chunks/crossProjectResume-Bj_Pe8oe.js +0 -40
  383. package/dist/chunks/cwd--nvsx73T.js +0 -1
  384. package/dist/chunks/cwd-CYmmnQVS.js +0 -1
  385. package/dist/chunks/debugUtils-NO5KtXqi.js +0 -1
  386. package/dist/chunks/desktop-Z5FAfunZ.js +0 -1
  387. package/dist/chunks/detectRepository-BTPgN89l.js +0 -1
  388. package/dist/chunks/directoryCompletion-CW2ckkQg.js +0 -1
  389. package/dist/chunks/doctor-BA2ZLDTl.js +0 -1
  390. package/dist/chunks/envLessBridgeConfig-B-LKYNvv.js +0 -1
  391. package/dist/chunks/envLessBridgeConfig-DyD9XCda.js +0 -1
  392. package/dist/chunks/esm-5w3xFBnt.js +0 -1
  393. package/dist/chunks/exit-Dt9kHtJO.js +0 -1
  394. package/dist/chunks/extra-usage-C7E2Z1p1.js +0 -1
  395. package/dist/chunks/extra-usage-D0Kkjp-2.js +0 -1
  396. package/dist/chunks/extra-usage-core-DjdaD1qO.js +0 -1
  397. package/dist/chunks/extra-usage-noninteractive-BnD1RhKK.js +0 -1
  398. package/dist/chunks/extraUsage-CpgRTcMk.js +0 -1
  399. package/dist/chunks/extractMemories-DhUprYa7.js +0 -1
  400. package/dist/chunks/fast-C4ZevUNL.js +0 -1
  401. package/dist/chunks/fast-CChxlAAF.js +0 -1
  402. package/dist/chunks/feedback-BIhBhV6n.js +0 -1
  403. package/dist/chunks/file-DcZWPH2V.js +0 -12
  404. package/dist/chunks/fileStateCache-DDW5toIs.js +0 -1
  405. package/dist/chunks/files-Cz1-PK3r.js +0 -2
  406. package/dist/chunks/firstPartyEventLogger-BXY1IJ2D.js +0 -5
  407. package/dist/chunks/firstPartyEventLogger-CnkGSojw.js +0 -1
  408. package/dist/chunks/flushGate-CgHq81Gw.js +0 -1
  409. package/dist/chunks/gemini-C1J-x1g7.js +0 -1
  410. package/dist/chunks/generateRecap-C0jjCg0Z.js +0 -1
  411. package/dist/chunks/generateSessionName-w0BMtwS7.js +0 -1
  412. package/dist/chunks/git-CbcnOf0E.js +0 -1
  413. package/dist/chunks/git-Do0wJvux.js +0 -6
  414. package/dist/chunks/githubRepoPathMapping-8D0kpsif.js +0 -1
  415. package/dist/chunks/grok-ffNyU3Lt.js +0 -1
  416. package/dist/chunks/grove-BQisE2JM.js +0 -7
  417. package/dist/chunks/heapdump-DiCjAPR3.js +0 -5
  418. package/dist/chunks/help-2hn8VK2-.js +0 -1
  419. package/dist/chunks/hooks-CBmrBO-J.js +0 -1
  420. package/dist/chunks/hostGuard-BHI6Q8Mt.js +0 -1
  421. package/dist/chunks/inboundAttachments-C5K3XPTC.js +0 -1
  422. package/dist/chunks/inboundAttachments-IH-g95jo.js +0 -1
  423. package/dist/chunks/index.min-D75yiGLN.js +0 -1
  424. package/dist/chunks/initReplBridge-C-P4dgAG.js +0 -1
  425. package/dist/chunks/keybindings-D8FXoO89.js +0 -2
  426. package/dist/chunks/language-Baosud0X.js +0 -1
  427. package/dist/chunks/launchAgentsPlatform-D6DmNuDt.js +0 -1
  428. package/dist/chunks/launchCommand-1qkTCKpf.js +0 -1
  429. package/dist/chunks/launchLocalMemory-C0FzUq7x.js +0 -3
  430. package/dist/chunks/launchLocalVault-DkYAre4O.js +0 -3
  431. package/dist/chunks/launchMemoryStores-D2rKWAPs.js +0 -1
  432. package/dist/chunks/launchSchedule-IZdFstT_.js +0 -1
  433. package/dist/chunks/launchSkillStore-B7LamM1d.js +0 -1
  434. package/dist/chunks/launchTeleport-C2BQMfYP.js +0 -3
  435. package/dist/chunks/launchVault-C60WUcCI.js +0 -1
  436. package/dist/chunks/loadAgentsDir-B9c3Emvg.js +0 -1
  437. package/dist/chunks/loadPluginHooks-BhNdAjeY.js +0 -1
  438. package/dist/chunks/localSearch-BLCGsdyM.js +0 -1
  439. package/dist/chunks/log-BMCygSzM.js +0 -1
  440. package/dist/chunks/logoV2Utils-gGK9gErT.js +0 -1
  441. package/dist/chunks/managedEnv-BHoeDjpS.js +0 -1
  442. package/dist/chunks/mcp-BSNdwbxR.js +0 -1
  443. package/dist/chunks/mcp-CMnDNI-4.js +0 -6
  444. package/dist/chunks/mcp-D1yA9E56.js +0 -2
  445. package/dist/chunks/memoize-B0zhbT8Z.js +0 -1
  446. package/dist/chunks/memory-D1zbyjxN.js +0 -1
  447. package/dist/chunks/model-CZViyZnE.js +0 -1
  448. package/dist/chunks/model-DLLkVV6S.js +0 -1
  449. package/dist/chunks/nativeInstaller-yj81F75v.js +0 -1
  450. package/dist/chunks/observationStore-DzCdXq8U.js +0 -4
  451. package/dist/chunks/onChangeAppState-DhGKPG9g.js +0 -1
  452. package/dist/chunks/output-style-BM3qAHLA.js +0 -1
  453. package/dist/chunks/overageCreditGrant-Du3dOYVu.js +0 -1
  454. package/dist/chunks/panel-Be-OxtqL.js +0 -1
  455. package/dist/chunks/parser-Bf6iasPV.js +0 -1
  456. package/dist/chunks/partition-C4FWzYVm.js +0 -1
  457. package/dist/chunks/passes-Daz-ARWD.js +0 -1
  458. package/dist/chunks/permissions-CeYKbtSC.js +0 -1
  459. package/dist/chunks/permissions-Cn_6f8CB.js +0 -1
  460. package/dist/chunks/permissions-DF8tAmDF.js +0 -3
  461. package/dist/chunks/plugin-Cm31-nej.js +0 -1
  462. package/dist/chunks/pluginBlocklist-wPFCUPdm.js +0 -1
  463. package/dist/chunks/pluginCliCommands-DhL9LbH0.js +0 -1
  464. package/dist/chunks/pluginFlagging-CAdaFV_D.js +0 -1
  465. package/dist/chunks/pluginOperations-Cs_Z4C6O.js +0 -2
  466. package/dist/chunks/pluginStartupCheck-BRXGKGjG.js +0 -1
  467. package/dist/chunks/pluginStartupCheck-KeU0efTj.js +0 -1
  468. package/dist/chunks/policyLimits-D2s8M8P2.js +0 -1
  469. package/dist/chunks/pollConfig-2nFzv6Hy.js +0 -1
  470. package/dist/chunks/poor-DXumVTR4.js +0 -1
  471. package/dist/chunks/poorMode-yNZL5uYf.js +0 -1
  472. package/dist/chunks/print-uxCF5ka5.js +0 -23
  473. package/dist/chunks/privacy-settings-BncbJCV0.js +0 -1
  474. package/dist/chunks/processBashCommand-CGdwvPmD.js +0 -1
  475. package/dist/chunks/processSlashCommand-DQarepEb.js +0 -5
  476. package/dist/chunks/prompt-BgOdcHkd.js +0 -1
  477. package/dist/chunks/prompt-CE3sFmZV.js +0 -139
  478. package/dist/chunks/prompt-CLJKFebn.js +0 -1
  479. package/dist/chunks/rate-limit-options-C-EqWjeI.js +0 -1
  480. package/dist/chunks/rcDebugLog-DBB9r8aw.js +0 -11
  481. package/dist/chunks/reconciler-CYD_XpG4.js +0 -4
  482. package/dist/chunks/referral-CKmHHxj_.js +0 -1
  483. package/dist/chunks/refresh-ZqZdmLK5.js +0 -1
  484. package/dist/chunks/registerProtocol-wZv2uiW_.js +0 -36
  485. package/dist/chunks/release-notes-B5K7wVqZ.js +0 -4
  486. package/dist/chunks/releaseNotes-B8gbyFFJ.js +0 -2
  487. package/dist/chunks/remote-env-CAt1dHIS.js +0 -1
  488. package/dist/chunks/remoteBridgeCore-Bk3UdSLJ.js +0 -1
  489. package/dist/chunks/remoteManagedSettings-bswzAB6W.js +0 -1
  490. package/dist/chunks/rename-CE_U6KE6.js +0 -1
  491. package/dist/chunks/ripgrep-BfIpz5uC.js +0 -1
  492. package/dist/chunks/runtimeObserver-BrGF5QWX.js +0 -10
  493. package/dist/chunks/sandbox-adapter-BtMiHImm.js +0 -1
  494. package/dist/chunks/sandbox-toggle-D8eebdyI.js +0 -1
  495. package/dist/chunks/sanitization-DV-94a9Z.js +0 -1
  496. package/dist/chunks/searchExtraTools-hLLPuh7c.js +0 -1
  497. package/dist/chunks/semver-BMRJYn3q.js +0 -1
  498. package/dist/chunks/session-BZIlR9Gc.js +0 -2
  499. package/dist/chunks/sessionDiscovery-DfDqTrF1.js +0 -1
  500. package/dist/chunks/sessionFileAccessHooks-Bm8wiqwe.js +0 -1
  501. package/dist/chunks/sessionMemory-D37S0-jX.js +0 -1
  502. package/dist/chunks/sessionMemory-DmlAG3jq.js +0 -1
  503. package/dist/chunks/sessionMemoryUtils-6EWDHSGU.js +0 -1
  504. package/dist/chunks/sessionObserver-BUw2rzKl.js +0 -1
  505. package/dist/chunks/sessionObserver-KgquhGWw.js +0 -20
  506. package/dist/chunks/sessionStorage-CucBSK5Q.js +0 -1
  507. package/dist/chunks/sessionTracing-_Hh5VXxt.js +0 -11
  508. package/dist/chunks/settings-BeLFUeie.js +0 -19
  509. package/dist/chunks/settings-Cl16Haug.js +0 -1
  510. package/dist/chunks/settingsSync-BNvFYH3c.js +0 -1
  511. package/dist/chunks/setup-D8kXv3ts.js +0 -3
  512. package/dist/chunks/sinks-FevoYQqP.js +0 -1
  513. package/dist/chunks/skill-learning-CMdxGtxr.js +0 -5
  514. package/dist/chunks/skillChangeDetector-C65ZLSYV.js +0 -1
  515. package/dist/chunks/skillGapStore-D18LRJAM.js +0 -5
  516. package/dist/chunks/skillGapStore-Ep62R-2_.js +0 -1
  517. package/dist/chunks/skillGenerator-Bc7WwNT8.js +0 -8
  518. package/dist/chunks/skillLearning-Cs9fJgkV.js +0 -1
  519. package/dist/chunks/skillLearning-duPZl69A.js +0 -1
  520. package/dist/chunks/skillPanel-Cyzby746.js +0 -28
  521. package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +0 -1
  522. package/dist/chunks/startupProfiler-DIWVcO4e.js +0 -1
  523. package/dist/chunks/startupProfiler-xa3NmN7Z.js +0 -3
  524. package/dist/chunks/state-BOa-3Av3.js +0 -1
  525. package/dist/chunks/statusNoticeHelpers-CEGvdm5d.js +0 -1
  526. package/dist/chunks/stickers-D5teCKMN.js +0 -1
  527. package/dist/chunks/syncCache-CANQZ9mQ.js +0 -1
  528. package/dist/chunks/systemPromptSections-CR_AoPIX.js +0 -1
  529. package/dist/chunks/systemPromptSections-DN0HGVye.js +0 -1
  530. package/dist/chunks/tag-DDbNqBMu.js +0 -11
  531. package/dist/chunks/teleport-Dk5j03Ix.js +0 -1
  532. package/dist/chunks/terminalSetup-3JNy6i_J.js +0 -33
  533. package/dist/chunks/thinkback-p-vKIRW_.js +0 -1
  534. package/dist/chunks/thinkback-play-DnPTDE8B.js +0 -1
  535. package/dist/chunks/thinkback-rFA1do6F.js +0 -1
  536. package/dist/chunks/toolEventObserver-CzsCuUMc.js +0 -1
  537. package/dist/chunks/toolPool-BR27AMJO.js +0 -1
  538. package/dist/chunks/trustedDevice-BYt39fui.js +0 -1
  539. package/dist/chunks/tui-C2yuCuOU.js +0 -6
  540. package/dist/chunks/types-Bh9S_JG5.js +0 -3
  541. package/dist/chunks/types-DHkZVzJe.js +0 -1
  542. package/dist/chunks/ultrareviewCommand-C_4OSBTW.js +0 -3
  543. package/dist/chunks/undercover-D30rKimg.js +0 -31
  544. package/dist/chunks/undercover-DRSwLozU.js +0 -1
  545. package/dist/chunks/upgrade-Bi-bIz7R.js +0 -1
  546. package/dist/chunks/upgrade-Chs-OQFd.js +0 -1
  547. package/dist/chunks/upload-D8FWMSQx.js +0 -1
  548. package/dist/chunks/usage-BxVeUt60.js +0 -1
  549. package/dist/chunks/usage-DUO7Yy1f.js +0 -1
  550. package/dist/chunks/useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js +0 -1
  551. package/dist/chunks/useMainLoopModel-Gy1Vv4Qr.js +0 -1
  552. package/dist/chunks/useManagePlugins-B11_87VN.js +0 -1
  553. package/dist/chunks/useMergedTools-CR56my9t.js +0 -1
  554. package/dist/chunks/useSettingsErrors-B9vOZL41.js +0 -1
  555. package/dist/chunks/validatePlugin-6q1qmnAC.js +0 -1
  556. package/dist/chunks/windowsPaths-9pEkw0oV.js +0 -1
  557. package/dist/chunks/workerRegistry-CvyHvwx-.js +0 -1
  558. package/dist/chunks/worktree-ogmNCIpz.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-DSxRz_kt.js";import{n as a,t as o}from"./figures-5ThXQEtq.js";import{C as s,Gr as c,I as l,N as u,P as d,Pn as f,Rn as p,di as m,fi as h,j as g,mt as _,ot as v,t as y,ui as b,xt as x}from"./src-CDCSSo0U2.js";import{t as S}from"./jsx-runtime-Bb4Xn-E0.js";import{$t as C,B as w}from"./state-C2OSZkV1.js";import{$a as T,$u as E,Aw as D,Ax as O,Bu as k,Ca as ee,Ew as te,Fw as ne,Ga as re,Hd as ie,Hu as ae,Hx as A,Iw as j,Ja as M,Ka as N,Ku as oe,Mw as se,Ow as ce,Qu as le,Ra as ue,Rx as P,SE as F,Sp as de,TE as I,Vd as fe,Vu as pe,Vx as me,Wx as he,Xd as ge,Xu as _e,Ya as ve,Yd as ye,Yu as be,Zu as xe,__ as L,_a as Se,_v as Ce,bp as we,co as Te,do as Ee,dv as De,ed as Oe,eo as R,fo as ke,fw as Ae,g_ as z,ga as je,gh as Me,ha as Ne,hh as Pe,jw as Fe,ka as Ie,kw as Le,kx as Re,mo as ze,mw as Be,pw as Ve,qa as He,ro as Ue,uv as We,vv as Ge,vy as Ke,wa as qe,xp as Je,xw as Ye,za as Xe}from"./loadAgentsDir-ByO8eJqU.js";import{n as Ze,t as Qe}from"./cwd-C5ce-7WB.js";import{a as $e,l as et,o as tt,r as nt,s as rt}from"./debug-RZ4NuXyS.js";import{Cn as it,Ut as at,Vt as ot,bn as st,g as ct,n as lt}from"./settings-hQDLwPVj.js";import{b as ut,c as dt,g as ft}from"./config-CE058cvr.js";import{B as pt,J as mt,L as ht,R as gt}from"./log-CZ0zYP_c.js";import{h as _t,n as vt,p as yt,r as bt,t as xt,x as St,y as Ct}from"./startupProfiler-DCn_NxMH.js";import{l as wt,o as Tt}from"./stringUtils-B6FudhoZ.js";import{Bt as Et,Dt,E as Ot,Gt as kt,St as At,Tt as jt,_ as Mt,_n as Nt,b as Pt,vn as Ft}from"./model-CwO-g1RW.js";import{xn as It,yn as Lt}from"./prompt-B7joRiqj.js";import{C as Rt,D as zt}from"./sessionState-CjNY991n.js";import{d as Bt,f as Vt,h as Ht,p as Ut}from"./terminalSetup-DlaFWI81.js";import{a as Wt,c as Gt,i as Kt,l as qt,n as Jt,o as Yt,r as Xt,t as Zt,u as Qt}from"./logoV2Utils-CGUJ-5gY.js";import{n as $t,t as en}from"./systemTheme-Ceakddth.js";import{n as tn,r as nn}from"./PromptInputFooterSuggestions-D1cH9sDX.js";import{n as rn,t as an}from"./useMainLoopModel-BICP6_Fi.js";import{n as on,t as sn}from"./modalContext-DFjKLCB6.js";import{n as cn,r as ln,t as un}from"./statusNoticeHelpers-B5U5c9PE.js";import{homedir as dn}from"os";import{relative as fn}from"path";import{fileURLToPath as pn}from"url";function mn(e){return Array.isArray?Array.isArray(e):Sn(e)===`[object Array]`}function hn(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function gn(e){return e==null?``:hn(e)}function B(e){return typeof e==`string`}function _n(e){return typeof e==`number`}function vn(e){return e===!0||e===!1||bn(e)&&Sn(e)==`[object Boolean]`}function yn(e){return typeof e==`object`}function bn(e){return yn(e)&&e!==null}function V(e){return e!=null}function xn(e){return!e.trim().length}function Sn(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}function Cn(e){let t=null,n=null,r=null,i=1,a=null;if(B(e)||mn(e))r=e,t=wn(e),n=Tn(e);else{if(!sr.call(e,`name`))throw Error(ir(`name`));let o=e.name;if(r=o,sr.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(ar(Tn(o)));t=wn(o),n=Tn(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function wn(e){return mn(e)?e:e.split(`.`)}function Tn(e){return mn(e)?e.join(`.`):e}function En(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(V(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!V(s))return;if(a===t.length-1&&(B(s)||_n(s)||vn(s)||typeof s==`bigint`))n.push(o===void 0?gn(s):{v:gn(s),i:o});else if(mn(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,B(t)?t.split(`.`):t,0),r?n:n[0]}function Dn(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=1,a=!1;for(let e=0;e<t.length;e++)t.charCodeAt(e)===32?a||(i++,a=!0):a=!1;if(n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}function On(e,t,{getFn:n=H.getFn,fieldNormWeight:r=H.fieldNormWeight}={}){let i=new pr({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(Cn)),i.setSources(t),i.create(),i}function kn(e,{getFn:t=H.getFn,fieldNormWeight:n=H.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new pr({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function An(e=[],t=H.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function jn(e,t,n,{location:r=H.location,distance:i=H.distance,threshold:a=H.threshold,findAllMatches:o=H.findAllMatches,minMatchCharLength:s=H.minMatchCharLength,includeMatches:c=H.includeMatches,ignoreLocation:l=H.ignoreLocation}={}){if(t.length>32)throw Error(rr(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=An(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function Mn(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function Nn(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}function Pn(e){return e.startsWith(`inverse`)}function Fn(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function In(e,t){let n=e.match(t);return n?n[1]:null}function Ln(e,t={}){return e.replace(/\\\|/g,xr).split(Sr).map(e=>{let n=Fn(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<br;){let e=yr[o],n=In(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<br;){let e=yr[o],n=In(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}function Rn(...e){wr.push(...e)}function zn(e,t){for(let n=0,r=wr.length;n<r;n+=1){let r=wr[n];if(r.condition(e,t))return new r(e,t)}return new _r(e,t)}function Bn(e,t,{auto:n=!0}={}){let r=e=>{if(B(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=zn(e,t)),r}let i=Object.keys(e),a=Or(e);if(!a&&i.length>1&&!Dr(e))return r(Ar(e));if(kr(e)){let r=a?e[Er.PATH]:i[0],o=a?e[Er.PATTERN]:e[r];if(!B(o))throw Error(nr(r));let s={keyId:Tn(r),pattern:o};return n&&(s.searcher=zn(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];mn(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Dr(e)||(e=Ar(e)),r(e)}function Vn(e,{ignoreFieldNorm:t=H.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function Hn(e,{ignoreFieldNorm:t=H.ignoreFieldNorm}){e.forEach(e=>{e.score=Vn(e.matches,{ignoreFieldNorm:t})})}function Un(e){let t=[];return e.matches.forEach(e=>{if(!V(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function Wn(e,t,{includeMatches:n=H.includeMatches,includeScore:r=H.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=Un(e)),r&&(a.score=e.score),a})}function Gn(e){Nr.has(e)||(Nr.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Kn(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||Gn(e),t=>t.match(e)||[]):e=>e.match(Mr)||[]}function qn({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=Kn(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=gr(n)),r(n)}}}function Jn(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function Yn(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){Jn(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n)if(Array.isArray(n))for(let t of n)Jn(e,t.v,i,r);else Jn(e,n.v,i,r)}}function Xn(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)Yn(r,i,t,n);return r}function Zn(e,t,n,r){Yn(e,t,n,r)}function Qn(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function $n(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)Qn(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,H,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr=t((()=>{er=`Incorrect 'index' type`,tr=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,nr=e=>`Invalid value for key ${e}`,rr=e=>`Pattern length exceeds max of ${e}.`,ir=e=>`Missing ${e} property in key`,ar=e=>`Property 'weight' in key '${e}' must be a positive integer`,or=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,sr=Object.prototype.hasOwnProperty,cr=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=Cn(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}},lr={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ur={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},dr={location:0,threshold:.6,distance:100},fr={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:En,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},H=Object.freeze({...ur,...lr,...dr,...fr}),pr=class{constructor({getFn:e=H.getFn,fieldNormWeight:t=H.fieldNormWeight}={}){this.norm=Dn(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(B(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(tr);if(B(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(tr);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!V(e)||xn(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(V(i)){if(mn(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(V(n)){if(B(n)){if(!xn(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(V(n.v)){let t=B(n.v)?n.v:gn(n.v);if(!xn(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(B(i)&&!xn(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}},mr={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},hr=RegExp(`[`+Object.keys(mr).join(``)+`]`,`g`),gr=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(hr,e=>mr[e]):e=>e,_r=class{constructor(e,{location:t=H.location,threshold:n=H.threshold,distance:r=H.distance,includeMatches:i=H.includeMatches,findAllMatches:a=H.findAllMatches,minMatchCharLength:o=H.minMatchCharLength,isCaseSensitive:s=H.isCaseSensitive,ignoreDiacritics:c=H.ignoreDiacritics,ignoreLocation:l=H.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?gr(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Mn(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?gr(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=jn(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=Nn(u)),p}},vr=new Set([`fuzzy`,`include`]),yr=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new _r(e,{location:t.location??H.location,threshold:t.threshold??H.threshold,distance:t.distance??H.distance,includeMatches:t.includeMatches??H.includeMatches,findAllMatches:t.findAllMatches??H.findAllMatches,minMatchCharLength:t.minMatchCharLength??H.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??H.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??H.ignoreDiacritics,ignoreLocation:t.ignoreLocation??H.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],br=yr.length,xr=`\0`,Sr=`|`,Cr=class{constructor(e,{isCaseSensitive:t=H.isCaseSensitive,ignoreDiacritics:n=H.ignoreDiacritics,includeMatches:r=H.includeMatches,minMatchCharLength:i=H.minMatchCharLength,ignoreLocation:a=H.ignoreLocation,findAllMatches:o=H.findAllMatches,location:s=H.location,threshold:c=H.threshold,distance:l=H.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?gr(e):e,this.pattern=e,this.query=Ln(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?gr(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,Pn(r.type)&&(c=!0),n&&(vr.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=Nn(o)),e}}return{isMatch:!1,score:1}}},wr=[],Tr={AND:`$and`,OR:`$or`},Er={PATH:`$path`,PATTERN:`$val`},Dr=e=>!!(e[Tr.AND]||e[Tr.OR]),Or=e=>!!e[Er.PATH],kr=e=>!mn(e)&&yn(e)&&!Dr(e),Ar=e=>({[Tr.AND]:Object.keys(e).map(t=>({[t]:e[t]}))}),jr=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}},Mr=/[\p{L}\p{M}\p{N}_]+/gu,Nr=new WeakSet,Pr=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=qn({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new _r(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=Nn(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}},Fr=class{constructor(e,t,n){this.options={...H,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new cr(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=zn(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof pr))throw Error(er);if(this._myIndex=t||On(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=qn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=Xn(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!V(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=qn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});Zn(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&$n(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(tr);this._invertedIndex&&$n(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(B(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return _n(n)&&n>-1&&(e=e.slice(0,n)),e}let c=_n(n)&&n>0&&B(e),l;if(c){let t=new jr(n);B(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=B(e)?B(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Hn(l,{ignoreFieldNorm:s}),a&&l.sort(o),_n(n)&&n>-1&&(l=l.slice(0,n));return Wn(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!V(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=Vn(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=Bn(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===Tr.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(V(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{keys:a,records:o}=this._myIndex,s=t?null:[];return o.forEach(({$:e,i:o})=>{if(!V(e))return;let c=[],l=!1,u=!1;if(a.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:o,item:e,matches:c};t?(r.score=Vn(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!V(t))return[];let r=[];if(mn(t))t.forEach(({v:t,i,n:a})=>{if(!V(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}},Fr.version=`7.4.2`,Fr.createIndex=On,Fr.parseIndex=kn,Fr.config=H,Fr.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(or);return zn(e,{...H,...n}).searchIn(t)},Fr.parseQuery=Bn,Rn(Cr),Rn(Pr),Fr.use=function(...e){e.forEach(e=>Rn(e))},Ir=Fr}));function Rr(e,t){for(let n of e)if(!t.has(n))return!1;return!0}var zr=t((()=>{}));function Br(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`)||Xe(t.text,`status`)!==`completed`?!1:Xe(t.text,`summary`)?.startsWith(`Background command `)??!1}function Vr(e,t){if(!De()||t)return e;let n=[],r=0;for(;r<e.length;){let t=e[r];if(Br(t)){let i=0;for(;r<e.length&&Br(e[r]);)i++,r++;i===1?n.push(t):n.push({...t,message:{role:`user`,content:[{type:`text`,text:`<${pt}><${ht}>completed</${ht}><${gt}>${i} background commands completed</${gt}></${pt}>`}]}})}else n.push(t),r++}return n}var Hr=t((()=>{mt(),Ke(),We(),R()}));function Ur(e){return e.type===`system`&&e.subtype===`stop_hook_summary`&&e.hookLabel!==void 0}function Wr(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(Ur(r)){let i=r.hookLabel,a=[];for(;n<e.length;){let t=e[n];if(!Ur(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 Gr=t((()=>{}));function Kr(e){let t=Yr.get(e);return t||(t=new Set(e.filter(e=>e.renderGroupedToolUse).map(e=>e.name)),Yr.set(e,t)),t}function qr(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 Jr(e,t,n=!1){if(n)return{messages:e};let r=Kr(t),i=new Map;for(let t of e){let e=qr(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=qr(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=qr(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 Yr,Xr=t((()=>{Yr=new WeakMap}));function Zr(e){let t=ri.get(e);if(t!==void 0)return t;let n=Qr(e).toLowerCase();return ri.set(e,n),n}function Qr(e){let t=``;switch(e.type){case`user`:{let n=e.message.content;if(typeof n==`string`)t=ni.has(n)?``:n;else{let r=[];for(let t of n??[])t.type===`text`?ni.has(t.text)||r.push(t.text):t.type===`tool_result`&&r.push(ei(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`?[$r(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(ti,r);if(e<0)break;n=n.slice(0,r)+n.slice(e+18),r=n.indexOf(`<system-reminder>`)}return n}function $r(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 ei(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 ti,ni,ri,ii=t((()=>{R(),ti=`</system-reminder>`,ni=new Set([je,Se]),ri=new WeakMap}));function ai({pose:e=`default`}={}){return(0,oi.jsxs)(l,{flexDirection:`column`,alignItems:`center`,children:[(0,oi.jsx)(d,{color:`clawd_body`,children:` █████ `}),(0,oi.jsx)(d,{color:`clawd_body`,children:`██ ● ● ██`}),(0,oi.jsx)(d,{color:`clawd_body`,children:`██ ▄▄▄ ██`}),(0,oi.jsx)(d,{color:`clawd_body`,children:` █ █ █ █ `})]})}var oi,si=t((()=>{h(),y(),oi=S()}));function ci(e){let{title:t,lines:n,footer:r,emptyMessage:i,customContent:a}=e,o=c(t);if(a!==void 0)o=Math.max(o,a.width);else if(n.length===0&&i)o=Math.max(o,c(i));else{let e=Math.max(0,...n.map(e=>e.timestamp?c(e.timestamp):0));for(let t of n){let n=e>0?e:0,r=c(t.text)+(n>0?n+2:0);o=Math.max(o,r)}}return r&&(o=Math.max(o,c(r))),o}function li({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?c(e.timestamp):0));return(0,U.jsxs)(l,{flexDirection:`column`,width:t,children:[(0,U.jsx)(d,{bold:!0,color:`claude`,children:n}),o?(0,U.jsxs)(U.Fragment,{children:[o.content,i&&(0,U.jsx)(d,{dimColor:!0,italic:!0,children:St(i,t)})]}):r.length===0&&a?(0,U.jsx)(d,{dimColor:!0,children:St(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)(d,{children:[s>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(d,{dimColor:!0,children:(e.timestamp||``).padEnd(s)}),` `]}),(0,U.jsx)(d,{children:St(e.text,r)})]},n)}),i&&(0,U.jsx)(d,{dimColor:!0,italic:!0,children:St(i,t)})]})]})}var U,ui=t((()=>{h(),y(),Ct(),U=S()}));function di({feeds:e,maxWidth:t}){let n=e.map(e=>ci(e)),r=Math.max(...n),i=Math.min(r,t);return(0,pi.jsx)(l,{flexDirection:`column`,children:e.map((t,n)=>(0,pi.jsxs)(fi.Fragment,{children:[(0,pi.jsx)(li,{config:t,actualWidth:i}),n<e.length-1&&(0,pi.jsx)(s,{color:`claude`,width:i})]},n))})}var fi,pi,mi=t((()=>{fi=n(h(),1),y(),ui(),pi=S()}));function hi(e){let t=e.map(e=>{let t=_t(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 gi(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()===dn()?`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 _i=t((()=>{a(),Ze(),Ct()}));function vi(e,t,n){return Array.from({length:n},()=>({pose:e,offset:t}))}function yi(){let{pose:e,bounceOffset:t,onClick:n}=bi();return(0,Si.jsx)(l,{height:Oi,flexDirection:`column`,onClick:n,children:(0,Si.jsx)(l,{marginTop:t,flexShrink:0,children:(0,Si.jsx)(ai,{pose:e})})})}function bi(){let[e]=(0,xi.useState)(()=>lt().prefersReducedMotion??!1),[t,n]=(0,xi.useState)(-1),r=(0,xi.useRef)(Ci),i=()=>{e||t!==-1||(r.current=wi[Math.floor(Math.random()*wi.length)],n(0))};(0,xi.useEffect)(()=>{if(t===-1)return;if(t>=r.current.length){n(-1);return}let e=setTimeout(n,Ei,Di);return()=>clearTimeout(e)},[t]);let a=r.current,o=t>=0&&t<a.length?a[t]:Ti;return{pose:o.pose,bounceOffset:o.offset,onClick:i}}var xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki=t((()=>{h(),xi=n(h(),1),y(),ct(),si(),Si=S(),Ci=[...vi(`default`,1,2),...vi(`arms-up`,0,3),...vi(`default`,0,1),...vi(`default`,1,2),...vi(`arms-up`,0,3),...vi(`default`,0,1)],wi=[Ci,[...vi(`look-right`,0,5),...vi(`look-left`,0,5),...vi(`default`,0,1)]],Ti={pose:`default`,offset:0},Ei=60,Di=e=>e+1,Oi=3}));function Ai(){let{columns:e}=v(),t=Ge(e=>e.agent),n=Ot(rn()),{version:r,cwd:i,billingType:a,agentName:o}=Yt(),s=t??o,u=Math.max(e-15,20),f=St(r,Math.max(u-11,6)),{shouldSplit:p,truncatedModel:m,truncatedBilling:h}=Xt(n,a,u),g=s?u-1-c(s)-3:u,_=Qt(i,Math.max(g,10));return(0,W.jsx)(z,{children:(0,W.jsxs)(l,{flexDirection:`row`,gap:2,alignItems:`center`,children:[De()?(0,W.jsx)(yi,{}):(0,W.jsx)(ai,{}),(0,W.jsxs)(l,{flexDirection:`column`,children:[(0,W.jsxs)(d,{children:[(0,W.jsx)(d,{bold:!0,children:`Work Mate`}),` `,(0,W.jsxs)(d,{dimColor:!0,children:[`v`,f]})]}),p?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(d,{dimColor:!0,children:m}),(0,W.jsx)(d,{dimColor:!0,children:h})]}):(0,W.jsxs)(d,{dimColor:!0,children:[m,` · `,h]}),(0,W.jsx)(d,{dimColor:!0,children:s?`@${s} · ${_}`:_})]})]})})}var W,ji=t((()=>{an(),Ye(),y(),Ce(),Ct(),We(),qt(),Mt(),L(),ki(),si(),W=S()}));function Mi(){let e=(0,Pi.useMemo)(Ni,[]),t=(0,Pi.useMemo)(()=>dt().lastShownEmergencyTip,[]),n=e.tip&&e.tip!==t;return(0,Pi.useEffect)(()=>{n&&ut(t=>t.lastShownEmergencyTip===e.tip?t:{...t,lastShownEmergencyTip:e.tip})},[n,e.tip]),n?(0,Fi.jsx)(l,{paddingLeft:2,flexDirection:`column`,children:(0,Fi.jsx)(d,{...e.color===`warning`?{color:`warning`}:e.color===`error`?{color:`error`}:{dimColor:!0},children:e.tip})}):null}function Ni(){return Ii}var Pi,Fi,Ii,Li=t((()=>{h(),Pi=n(h(),1),y(),ft(),Fi=S(),Ii={tip:``,color:`dim`}}));function Ri({char:e=`✻`}){let[t]=(0,zi.useState)(()=>lt().prefersReducedMotion??!1),[n,r]=(0,zi.useState)(t),i=(0,zi.useRef)(null),[a,o]=_(n?null:50);return(0,zi.useEffect)(()=>{if(n)return;let e=setTimeout(r,Hi,!0);return()=>clearTimeout(e)},[n]),n?(0,Bi.jsx)(l,{ref:a,children:(0,Bi.jsx)(d,{color:Ui,children:e})}):(i.current===null&&(i.current=o),(0,Bi.jsx)(l,{ref:a,children:(0,Bi.jsx)(d,{color:de(we((o-i.current)/Vi*360%360)),children:e})}))}var zi,Bi,Vi,Hi,Ui,Wi=t((()=>{h(),zi=n(h(),1),at(),y(),ct(),Je(),Bi=S(),Vi=1500,Hi=Vi*2,Ui=de({r:153,g:153,b:153})}));function Gi(){return Pt()&&(dt().opus1mMergeNoticeSeenCount??0)<Yi}function Ki(){let[e]=(0,qi.useState)(Gi);return(0,qi.useEffect)(()=>{if(!e)return;let t=(dt().opus1mMergeNoticeSeenCount??0)+1;ut(e=>(e.opus1mMergeNoticeSeenCount??0)>=t?e:{...e,opus1mMergeNoticeSeenCount:t})},[e]),e?(0,Ji.jsxs)(l,{paddingLeft:2,children:[(0,Ji.jsx)(Ri,{char:`↑`}),(0,Ji.jsx)(d,{dimColor:!0,children:` Opus now defaults to 1M context · 5x more room, same pricing`})]}):null}var qi,Ji,Yi,Xi=t((()=>{h(),qi=n(h(),1),at(),y(),ft(),Mt(),Wi(),Ji=S(),Yi=6}));function Zi(){return null}var Qi=t((()=>{}));function $i(){return null}var ea=t((()=>{}));function ta(){let e=Gt(),t=dt().oauthAccount?.displayName??``,{columns:n}=v(),i=Ht(),a=F.isSandboxingEnabled(),o=Ge(e=>e.agent),s=dt(),[u]=(0,na.useState)(()=>{let e=lt().companyAnnouncements;if(!(!e||e.length===0))return s.numStartups===1?e[0]:e[Math.floor(Math.random()*e.length)]});(0,na.useEffect)(()=>{i&&Vt()},[i]),!i&&r(process.env.CLAUDE_CODE_FORCE_FULL_LOGO);let f=Ot(rn()),{version:p,cwd:m,billingType:h,agentName:_}=Yt(),y=o??_,b=St(f,ra-20);if(!i&&!r(process.env.CLAUDE_CODE_FORCE_FULL_LOGO))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ai,{}),(0,G.jsx)(Ki,{}),tt()&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(d,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(d,{dimColor:!0,children:[`Logging to: `,rt()?`stderr`:nt()]})]}),(0,G.jsx)(Mi,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(d,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(d,{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`})]}),u&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(d,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(d,{children:u})]}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsx)(l,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(d,{dimColor:!0,children:`Use /issue to report model behavior issues`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(d,{color:`warning`,children:`[ANT-ONLY] Logs:`}),(0,G.jsxs)(d,{dimColor:!0,children:[`API calls: `,st(Pe())]}),(0,G.jsxs)(d,{dimColor:!0,children:[`Debug logs: `,st(nt())]}),bt()&&(0,G.jsxs)(d,{dimColor:!0,children:[`Startup Perf: `,st(xt())]})]}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)($i,{})]});let x=Wt(n),S=$t(dt().theme),C=` ${g(`claude`,S)(`Work Mate`)} ${g(`inactive`,S)(`v${p}`)} `,w=g(`claude`,S)(` Work Mate `);if(x===`compact`){let e=Kt(t);c(e)>n-4&&(e=Kt(null));let r=y?n-4-1-c(y)-3:n-4,i=Qt(m,Math.max(r,10));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(z,{children:(0,G.jsxs)(l,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:w,position:`top`,align:`start`,offset:1},paddingX:1,paddingY:1,alignItems:`center`,width:n,children:[(0,G.jsx)(d,{bold:!0,children:e}),(0,G.jsx)(l,{marginY:1,children:(0,G.jsx)(ai,{})}),(0,G.jsx)(d,{dimColor:!0,children:b}),(0,G.jsx)(d,{dimColor:!0,children:h}),(0,G.jsx)(d,{dimColor:!0,children:y?`@${y} · ${i}`:i})]})}),(0,G.jsx)(Ki,{}),a&&(0,G.jsx)(l,{marginTop:1,flexDirection:`column`,children:(0,G.jsx)(d,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)($i,{})]})}let T=Kt(t),E=!process.env.IS_DEMO&&s.oauthAccount?.organizationName?`${b} · ${h} · ${s.oauthAccount.organizationName}`:`${b} · ${h}`,D=y?ra-1-c(y)-3:ra,O=Qt(m,Math.max(D,10)),k=y?`@${y} · ${O}`:O,{leftWidth:ee,rightWidth:te}=Zt(n,x,Jt(T,k,E));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(z,{children:(0,G.jsx)(l,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:C,position:`top`,align:`start`,offset:3},children:(0,G.jsxs)(l,{flexDirection:x===`horizontal`?`row`:`column`,paddingX:1,gap:1,children:[(0,G.jsxs)(l,{flexDirection:`column`,width:ee,justifyContent:`space-between`,alignItems:`center`,minHeight:9,children:[(0,G.jsx)(l,{marginTop:1,children:(0,G.jsx)(d,{bold:!0,children:T})}),(0,G.jsx)(ai,{}),(0,G.jsxs)(l,{flexDirection:`column`,alignItems:`center`,children:[(0,G.jsx)(d,{dimColor:!0,children:E}),(0,G.jsx)(d,{dimColor:!0,children:k})]})]}),x===`horizontal`&&(0,G.jsx)(l,{height:`100%`,borderStyle:`single`,borderColor:`claude`,borderDimColor:!0,borderTop:!1,borderBottom:!1,borderLeft:!1}),x===`horizontal`&&(0,G.jsx)(di,{feeds:i?[gi(Bt()),hi(e)]:[hi(e)],maxWidth:te})]})})}),(0,G.jsx)(Ki,{}),tt()&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(d,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(d,{dimColor:!0,children:[`Logging to: `,rt()?`stderr`:nt()]})]}),(0,G.jsx)(Mi,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(d,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(d,{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`})]}),u&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(d,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(d,{children:u})]}),a&&(0,G.jsx)(l,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(d,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsx)(l,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(d,{dimColor:!0,children:`Use /issue to report model behavior issues`})}),process.env.USER_TYPE===`ant`&&!process.env.DEMO_VERSION&&(0,G.jsxs)(l,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(d,{color:`warning`,children:`[ANT-ONLY] Logs:`}),(0,G.jsxs)(d,{dimColor:!0,children:[`API calls: `,st(Pe())]}),(0,G.jsxs)(d,{dimColor:!0,children:[`Debug logs: `,st(nt())]}),bt()&&(0,G.jsxs)(d,{dimColor:!0,children:[`Startup Perf: `,st(xt())]})]}),process.env.USER_TYPE===`ant`&&(0,G.jsx)(Zi,{}),process.env.USER_TYPE===`ant`&&(0,G.jsx)($i,{})]})}var na,G,ra,ia=t((()=>{h(),y(),Ye(),qt(),Ct(),it(),si(),mi(),_i(),ft(),en(),ct(),$e(),na=n(h(),1),Ut(),ji(),L(),Me(),i(),vt(),Li(),Xi(),Qi(),ea(),I(),Ce(),an(),Mt(),G=S(),ra=50}));function aa({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,oa.jsx)(l,{minWidth:c(i)+8,children:(0,oa.jsx)(d,{dimColor:!0,children:i})})}var oa,sa=t((()=>{h(),y(),oa=S()}));function ca({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,la.jsx)(l,{minWidth:c(n),children:(0,la.jsx)(d,{dimColor:!0,children:n})})}var la,ua=t((()=>{h(),y(),la=S()}));function da(e,t,n,r){for(let i=t+1;i<e.length;i++){let t=e[i];if(t?.type===`assistant`){let e=va(t.message.content);if(e?.type===`thinking`||e?.type===`redacted_thinking`||e?.type===`tool_use`&&(xe(e.name,e.input,n).isCollapsible||r.has(e.id)))continue;return!0}if(!(t?.type===`system`||t?.type===`attachment`)&&!(t?.type===`user`&&va(t.message.content)?.type===`tool_result`)){if(t?.type===`grouped_tool_use`){let e=va(t.messages[0]?.message.content)?.input;if(xe(t.toolName,e,n).isCollapsible)continue}return!0}}return!1}function fa({message:e,isUserContinuation:t,hasContentAfter:n,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,streamingToolUseIDs:s,screen:c,canAnimate:u,lastThinkingBlockId:d,latestBashOutputUUID:f,columns:p,isLoading:m,lookups:h,shouldCollapseDiffs:g}){let _=c===`transcript`,v=e.type===`grouped_tool_use`,y=e.type===`collapsed_read_search`,b=y&&(E(e,o)||m&&!n),x=v?e.displayMessage:y?_e(e):e,S=v||y?[]:N(e,h),C=Fo(e,s,o,v||y?Ne:He(e,h),c,h),w=!1;if(u)if(v)w=e.messages.some(e=>{let t=va(e.message.content);return t?.type===`tool_use`&&o.has(t.id)});else if(y)w=E(e,o);else{let t=M(e);w=!t||o.has(t)}let T=_&&x.type===`assistant`&&Array.isArray(x.message.content)&&x.message.content.some(e=>e.type===`text`)&&(x.timestamp||x.message.model),D=(0,_a.jsx)(k,{message:e,lookups:h,addMargin:!T,containerWidth:T?void 0:p,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,progressMessagesForMessage:S,shouldAnimate:w,shouldShowDot:!0,isTranscriptMode:_,isStatic:C,isActiveCollapsedGroup:b,isUserContinuation:t,lastThinkingBlockId:d,latestBashOutputUUID:f,shouldCollapseDiffs:g});return T?(0,_a.jsx)(z,{children:(0,_a.jsxs)(l,{width:p,flexDirection:`column`,children:[(0,_a.jsxs)(l,{flexDirection:`row`,justifyContent:`flex-end`,gap:1,marginTop:1,children:[(0,_a.jsx)(ca,{message:x,isTranscriptMode:_}),(0,_a.jsx)(aa,{message:x,isTranscriptMode:_})]}),D]})}):(0,_a.jsx)(z,{children:D})}function pa(e,t){if(e.type===`grouped_tool_use`)return e.messages.some(e=>{let n=va(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return le(e).some(e=>t.has(e));let n=M(e);return!!n&&t.has(n)}function ma(e,t){if(e.type===`grouped_tool_use`)return e.messages.every(e=>{let n=va(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return le(e).every(e=>t.has(e));if(e.type===`assistant`){let n=va(e.message.content);if(n?.type===`server_tool_use`)return t.has(n.id)}let n=M(e);return!n||t.has(n)}function ha(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&&pe(t.message))return!1;let n=pa(e.message,e.streamingToolUseIDs),r=ma(e.message,e.lookups.resolvedToolUseIDs);return!(n||!r)}var ga,_a,va,ya,ba=t((()=>{ga=n(h(),1),y(),Oe(),R(),ae(),_a=S(),sa(),Ko(),ua(),L(),va=e=>{if(!Array.isArray(e))return;let t=e[0];if(!(t==null||typeof t==`string`))return t},ya=ga.memo(fa,ha)}));function xa(e){return e.type===`attachment`&&Sa.has(e.attachment.type)}var Sa,Ca=t((()=>{Sa=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 wa(e){return Aa.filter(t=>t.isActive(e))}var K,Ta,Ea,Da,Oa,ka,Aa,ja=t((()=>{y(),h(),he(),a(),Ze(),Ct(),Et(),ln(),K=S(),Ta={id:`large-memory-files`,type:`warning`,isActive:e=>me(e.memoryFiles).length>0,render:e=>(0,K.jsx)(K.Fragment,{children:me(e.memoryFiles).map(e=>{let t=e.path.startsWith(Qe())?fn(Qe(),e.path):e.path;return(0,K.jsxs)(l,{flexDirection:`row`,children:[(0,K.jsx)(d,{color:`warning`,children:o.warning}),(0,K.jsxs)(d,{color:`warning`,children:[`Large `,(0,K.jsx)(d,{bold:!0,children:t}),` will impact performance (`,yt(e.content.length),` chars > `,yt(P),`)`,(0,K.jsx)(d,{dimColor:!0,children:` · /memory to edit`})]})]},e.path)})})},Ea={id:`claude-ai-external-token`,type:`warning`,isActive:()=>{let e=Dt();return kt()&&(e.source===`ANTHROPIC_AUTH_TOKEN`||e.source===`apiKeyHelper`)},render:()=>{let e=Dt();return(0,K.jsxs)(l,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(d,{color:`warning`,children:o.warning}),(0,K.jsxs)(d,{color:`warning`,children:[`Auth conflict: Using `,e.source,` instead of Claude account subscription token. Either unset`,` `,e.source,", or run `claude /logout`."]})]})}},Da={id:`api-key-conflict`,type:`warning`,isActive:()=>{let{source:e}=At({skipRetrievingKeyFromApiKeyHelper:!0});return!!jt()&&(e===`ANTHROPIC_API_KEY`||e===`apiKeyHelper`)},render:()=>{let{source:e}=At({skipRetrievingKeyFromApiKeyHelper:!0});return(0,K.jsxs)(l,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(d,{color:`warning`,children:o.warning}),(0,K.jsxs)(d,{color:`warning`,children:[`Auth conflict: Using `,e,` instead of Console key. Either unset `,e,", or run `claude /logout`."]})]})}},Oa={id:`both-auth-methods`,type:`warning`,isActive:()=>{let{source:e}=At({skipRetrievingKeyFromApiKeyHelper:!0}),t=Dt();return e!==`none`&&t.source!==`none`&&!(e===`apiKeyHelper`&&t.source===`apiKeyHelper`)},render:()=>{let{source:e}=At({skipRetrievingKeyFromApiKeyHelper:!0}),t=Dt();return(0,K.jsxs)(l,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(l,{flexDirection:`row`,children:[(0,K.jsx)(d,{color:`warning`,children:o.warning}),(0,K.jsxs)(d,{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)(l,{flexDirection:`column`,marginLeft:3,children:[(0,K.jsxs)(d,{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)(d,{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.`]})]})]})}},ka={id:`large-agent-descriptions`,type:`warning`,isActive:e=>cn(e.agentDefinitions)>un,render:e=>{let t=cn(e.agentDefinitions);return(0,K.jsxs)(l,{flexDirection:`row`,children:[(0,K.jsx)(d,{color:`warning`,children:o.warning}),(0,K.jsxs)(d,{color:`warning`,children:[`Large cumulative agent descriptions will impact performance (~`,yt(t),` tokens > `,yt(un),`)`,(0,K.jsx)(d,{dimColor:!0,children:` · /agents to manage`})]})]})}},Aa=[Ta,ka,Ea,Da,Oa]}));function Ma({agentDefinitions:e}={}){let t={config:dt(),agentDefinitions:e,memoryFiles:(0,Pa.use)(A())},n=wa(t);return n.length===0?null:(0,Fa.jsx)(l,{flexDirection:`column`,paddingLeft:1,children:n.map(e=>(0,Fa.jsx)(Na.Fragment,{children:e.render(t)},e.id))})}var Na,Pa,Fa,Ia=t((()=>{Na=n(h(),1),Pa=n(h(),1),y(),he(),ft(),ja(),Fa=S()}));function La(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)??Ga,[e]),()=>{let t=e.current;if(!t)return NaN;let n=t.getScrollTop()+t.getPendingDelta(),r=Math.floor(n/Va);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])??Ra);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-Ba),w=b;else{if(y){let e=v+za;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-za;{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*za,y=Math.min(b,C+Ua),S=0;for(w=C;w<y&&(S<h||x[w]<f+v+za);)S+=r.current.get(t[w])??Ha,w++}let e=v+2*za,n=Math.max(0,w-Ua),i=0;for(let e=C;e<w;e++)i+=r.current.get(t[e])??Ha;for(;C>n&&i<e;)C--,i+=r.current.get(t[C])??Ha;let o=d.current,c=Math.abs(g-a.current)+Math.abs(_);if(o&&c>v*2){let[e,t]=o;C<e-Wa&&(C=e-Wa),w>t+Wa&&(w=t+Wa),C>w&&(w=Math.min(C+Wa,b))}a.current=g}f.current>0?f.current--:d.current=[C,w];let T=(0,q.useDeferredValue)(C),E=(0,q.useDeferredValue)(w),D=C<T?T:C,O=w>E?E:w;if((D>O||y)&&(D=C,O=w),_>0&&(O=w),O-D>Ua){let e=(x[D]+x[O])/2;g-m.current<e?O=D+Ua:D=O-Ua}let k=m.current,ee=x[D],te=D===0?0:ee+k,ne=O===b?1/0:Math.max(ee,x[O]-v)+k;(0,q.useLayoutEffect)(()=>{y?e.current?.setClampBounds(void 0,void 0):e.current?.setClampBounds(te,ne)}),(0,q.useLayoutEffect)(()=>{let e=h.current?.yogaNode;if(e&&e.getComputedWidth()>0&&(m.current=e.getComputedTop()),u.current){u.current=!1;return}let t=!1;for(let[e,n]of s.current){let i=n.yogaNode;if(!i)continue;let a=i.getComputedHeight(),o=r.current.get(e);a>0?o!==a&&(r.current.set(e,a),t=!0):i.getComputedWidth()>0&&o!==0&&(r.current.set(e,0),t=!0)}t&&i.current++});let re=(0,q.useCallback)(e=>{let t=c.current.get(e);return t||(t=t=>{if(t)s.current.set(e,t);else{let t=s.current.get(e)?.yogaNode;if(t&&!u.current){let n=t.getComputedHeight();(n>0||t.getComputedWidth()>0)&&r.current.get(e)!==n&&(r.current.set(e,n),i.current++)}s.current.delete(e)}},c.current.set(e,t)),t},[]),ie=(0,q.useCallback)(e=>{let n=s.current.get(t[e])?.yogaNode;return!n||n.getComputedWidth()===0?-1:n.getComputedTop()},[t]),ae=(0,q.useCallback)(e=>s.current.get(t[e])??null,[t]),A=(0,q.useCallback)(e=>r.current.get(t[e]),[t]),j=(0,q.useCallback)(t=>{let n=o.current;t<0||t>=n.n||e.current?.scrollTo(n.arr[t]+m.current)},[e]),M=S-x[O];return{range:[D,O],topSpacer:ee,bottomSpacer:M,measureRef:re,spacerRef:h,offsets:x,getItemTop:ie,getItemElement:ae,getItemHeight:A,scrollToIndex:j}}var q,Ra,za,Ba,Va,Ha,Ua,Wa,Ga,Ka=t((()=>{q=n(h(),1),Ra=3,za=40,Ba=30,Va=20,Ha=1,Ua=200,Wa=25,Ga=()=>{}}));function qa({children:e}){let[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(null);return(0,Qa.jsx)(eo.Provider,{value:n,children:(0,Qa.jsx)(no.Provider,{value:i,children:(0,Qa.jsx)($a.Provider,{value:t,children:(0,Qa.jsx)(to.Provider,{value:r,children:e})})})})}function Ja(){return(0,J.useContext)($a)}function Ya(){return(0,J.useContext)(to)}function Xa(e){let t=(0,J.useContext)(eo);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}function Za(e){let t=(0,J.useContext)(no);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}var J,Qa,$a,eo,to,no,ro=t((()=>{J=n(h(),1),Qa=S(),$a=(0,J.createContext)(null),eo=(0,J.createContext)(null),to=(0,J.createContext)(null),no=(0,J.createContext)(null)}));function io(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 ao(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`&&!oo(t))continue;let a=t.type===`assistant`;a&&!r&&n++,r=a}return n}function oo(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 so(e,t){if(t===null)return;let n=t;for(;n<e.length&&(e[n]?.type===`progress`||xa(e[n]));)n++;let r=e[n]?.uuid;if(!r)return;let i=ao(e,t);return{firstUnseenUuid:r,count:Math.max(1,i)}}function co({scrollable:e,bottom:t,overlay:n,bottomFloat:r,modal:i,modalScrollRef:a,scrollRef:o,dividerYRef:s,hidePill:c=!1,hideSticky:u=!1,newMessageCount:f=0,onPillClick:m}){let{rows:h,columns:g}=v(),[_,y]=(0,Y.useState)(null),b=(0,Y.useMemo)(()=>({setStickyPrompt:y}),[]),S=(0,Y.useSyncExternalStore)((0,Y.useCallback)(e=>o?.current?.subscribe(e)??(()=>{}),[o]),()=>{let e=o?.current,t=s?.current;return!e||t==null?!1:e.getScrollTop()+e.getPendingDelta()+e.getViewportHeight()<t});if((0,Y.useLayoutEffect)(()=>{if(!De())return;let e=p.get(process.stdout);if(e)return e.onHyperlinkClick=e=>{if(e.startsWith(`file:`))try{Be(pn(e))}catch{}else Ve(e)},()=>{e.onHyperlinkClick=void 0}},[]),De()){let s=u?null:_,p=s!=null&&s!==`clicked`&&n==null?s:null,v=s!=null&&n==null;return(0,X.jsxs)(qa,{children:[(0,X.jsx)(l,{flexDirection:`row`,flexGrow:1,overflow:`hidden`,width:`100%`,children:(0,X.jsxs)(l,{flexDirection:`column`,flexGrow:1,width:g,overflow:`hidden`,children:[(0,X.jsxs)(l,{flexGrow:1,flexDirection:`column`,overflow:`hidden`,children:[p&&(0,X.jsx)(uo,{text:p.text,onClick:p.scrollTo}),(0,X.jsxs)(x,{ref:o,flexGrow:1,flexDirection:`column`,paddingTop:+!v,stickyScroll:!0,children:[(0,X.jsx)(ho,{value:b,children:e}),n]}),!c&&S&&n==null&&(0,X.jsx)(lo,{count:f,onClick:m}),r!=null&&(0,X.jsx)(l,{position:`absolute`,bottom:0,right:0,opaque:!0,children:r})]}),(0,X.jsxs)(l,{flexDirection:`column`,flexShrink:0,width:`100%`,maxHeight:`50%`,children:[(0,X.jsx)(fo,{}),(0,X.jsx)(po,{}),(0,X.jsx)(l,{flexDirection:`column`,width:`100%`,flexGrow:1,overflowY:`hidden`,children:t})]})]})}),i!=null&&(0,X.jsx)(sn,{value:{rows:h-mo-1,columns:g-4,scrollRef:a??null},children:(0,X.jsxs)(l,{position:`absolute`,bottom:0,left:0,right:0,maxHeight:h-mo,flexDirection:`column`,overflow:`hidden`,opaque:!0,children:[(0,X.jsx)(l,{flexShrink:0,children:(0,X.jsx)(d,{color:`permission`,children:`▔`.repeat(g)})}),(0,X.jsx)(l,{flexDirection:`column`,paddingX:2,flexShrink:0,overflow:`hidden`,children:i})]})})]})}return(0,X.jsxs)(X.Fragment,{children:[e,t,n,i]})}function lo({count:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(l,{position:`absolute`,bottom:0,left:0,right:0,justifyContent:`center`,children:(0,X.jsx)(l,{onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(d,{backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,dimColor:!0,children:[` `,e>0?`${e} new ${wt(e,`message`)}`:`Jump to bottom`,` `,o.arrowDown,` `]})})})}function uo({text:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(l,{flexShrink:0,width:`100%`,height:1,paddingRight:1,backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(d,{color:`subtle`,wrap:`truncate-end`,children:[o.pointer,` `,e]})})}function fo(){let e=Ja();return!e||e.suggestions.length===0?null:(0,X.jsx)(l,{position:`absolute`,bottom:`100%`,left:0,right:0,paddingX:2,paddingTop:1,flexDirection:`column`,opaque:!0,children:(0,X.jsx)(tn,{suggestions:e.suggestions,selectedSuggestion:e.selectedSuggestion,maxColumnWidth:e.maxColumnWidth,overlay:!0})})}function po(){let e=Ya();return e?(0,X.jsx)(l,{position:`absolute`,bottom:`100%`,left:0,right:0,opaque:!0,children:e}):null}var Y,X,mo,ho,go=t((()=>{a(),Y=n(h(),1),on(),ro(),Ye(),y(),Ae(),We(),Tt(),Ca(),nn(),X=S(),mo=2,ho=(0,Y.createContext)({setStickyPrompt:()=>{}})}));function _o(e){let t=To.get(e);if(t!==void 0)return t;let n=Zr(e);return To.set(e,n),n}function vo(e){let t=Do.get(e);if(t!==void 0)return t;let n=yo(e);return Do.set(e,n),n}function yo(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=Fe(t);return n.startsWith(`<`)||n===``?null:n}function bo({itemKey:e,msg:t,idx:n,measureRef:r,expanded:i,hovered:a,clickable:o,onClickK:s,onEnterK:c,onLeaveK:d,renderItem:f}){return(0,Co.jsx)(l,{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?()=>d(e):void 0,children:(0,Co.jsx)(u.Provider,{value:a&&!i?`text`:void 0,children:f(t,n)})})}function xo({messages:e,scrollRef:t,columns:n,itemKey:r,renderItem:i,onItemClick:a,isItemClickable:o,isItemExpanded:s,extractSearchText:c=_o,trackStickyPrompt:u,selectedIndex:d,cursorNavRef:f,setCursor:p,jumpRef:m,onSearchMatchesChange:h,scanElement:g,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:T,spacerRef:E,offsets:O,getItemTop:k,getItemElement:ee,getItemHeight:te,scrollToIndex:ne}=La(t,x,n),[re,ie]=S,ae=(0,Z.useCallback)(t=>te(t)!==0&&D(e[t]),[te,e]);(0,Z.useImperativeHandle)(f,()=>{let n=e=>p?.({uuid:e.uuid,msgType:e.type,expanded:!1,toolName:se(e)?.name}),r=d??-1,i=(t,r,i=ae)=>{for(let a=t;a>=0&&a<e.length;a+=r)if(i(a))return n(e[a]),!0;return!1},a=t=>ae(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(),p?.(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,d,p,ae]);let A=(0,Z.useRef)({offsets:O,start:re,getItemElement:ee,getItemTop:k,messages:e,scrollToIndex:ne});A.current={offsets:O,start:re,getItemElement:ee,getItemTop:k,messages:e,scrollToIndex:ne},(0,Z.useEffect)(()=>{if(d===void 0)return;let e=A.current,n=e.getItemElement(d);n?t.current?.scrollToElement(n,1):e.scrollToIndex(d)},[d,t]);let j=(0,Z.useRef)(null),M=(0,Z.useRef)({msgIdx:-1,positions:[]}),N=(0,Z.useRef)(-1),oe=(0,Z.useRef)(0),ce=(0,Z.useRef)(0),le=(0,Z.useRef)(()=>{}),ue=(0,Z.useRef)(()=>{}),P=(0,Z.useRef)({matches:[],ptr:0,screenOrd:0,prefixSum:[]}),F=(0,Z.useRef)(-1),de=(0,Z.useRef)(!1);function I(e){let t=A.current.getItemTop(e);return Math.max(0,t-wo)}function fe(e){let n=t.current,{msgIdx:r,positions:i}=M.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=A.current.getItemTop(r),c=n.getViewportTop(),l=s-n.getScrollTop(),u=n.getViewportHeight(),d=c+l+o.row;(d<c||d>=c+u)&&(n.scrollTo(Math.max(0,s+o.row-wo)),l=s-n.getScrollTop(),d=c+l+o.row),_?.({positions:i,rowOffset:c+l,currentIdx:a});let f=P.current,p=f.prefixSum.at(-1)??0,m=(f.prefixSum[f.ptr]??0)+a+1;h?.(p,m),et(`highlight(i=${r}, ord=${a}/${i.length}): pos={row:${o.row},col:${o.col}} lo=${l} screenRow=${d} badge=${m}/${p}`)}ue.current=fe;let[pe,me]=(0,Z.useState)(0),he=(0,Z.useCallback)(()=>me(e=>e+1),[]);(0,Z.useEffect)(()=>{let e=j.current;if(!e)return;let{idx:n,wantLast:r,tries:i}=e,a=t.current;if(!a)return;let{getItemElement:o,getItemTop:s,scrollToIndex:c}=A.current,l=o(n),u=l?.yogaNode?.getComputedHeight()??0;if(!l||u===0){if(i>1){j.current=null,et(`seek(i=${n}): no mount after scrollToIndex, skip`),le.current(r?-1:1);return}j.current={idx:n,wantLast:r,tries:i+1},c(n),he();return}j.current=null,a.scrollTo(Math.max(0,s(n)-wo));let d=g?.(l)??[];if(M.current={msgIdx:n,positions:d},et(`seek(i=${n} t=${i}): ${d.length} positions`),d.length===0){if(++oe.current>20){oe.current=0;return}le.current(r?-1:1);return}oe.current=0;let f=r?d.length-1:0;P.current.screenOrd=f,N.current=-1,ue.current(f);let p=ce.current;p&&(ce.current=0,le.current(p))},[pe]);function ge(e,n){let r=t.current;if(!r)return;let i=A.current,{getItemElement:a,scrollToIndex:o}=i;if(e<0||e>=i.messages.length)return;_?.(null),M.current={msgIdx:-1,positions:[]},j.current={idx:e,wantLast:n,tries:0};let s=a(e),c=s?.yogaNode?.getComputedHeight()??0;s&&c>0?r.scrollTo(I(e)):o(e),he()}function _e(e){let t=P.current,{matches:n,prefixSum:r}=t,i=r.at(-1)??0;if(n.length===0)return;if(j.current){ce.current=e;return}N.current<0&&(N.current=t.ptr);let{positions:a}=M.current,o=t.screenOrd+e;if(o>=0&&o<a.length){t.screenOrd=o,fe(o),N.current=-1;return}let s=(t.ptr+e+n.length)%n.length;if(s===N.current){_?.(null),N.current=-1,et(`step: wraparound at ptr=${s}, all ${n.length} msgs phantoms`);return}t.ptr=s,t.screenOrd=0,ge(n[s],e<0);let c=e<0?r[s+1]??i:r[s]+1;h?.(i,c)}le.current=_e,(0,Z.useImperativeHandle)(m,()=>({jumpToIndex:e=>{let n=t.current;n&&n.scrollTo(I(e))},setSearchQuery:e=>{j.current=null,M.current={msgIdx:-1,positions:[]},N.current=-1,_?.(null);let n=e.toLowerCase(),r=[],i=[0];if(n){let e=A.current.messages;for(let t=0;t<e.length;t++){let a=c(e[t]),o=a.indexOf(n),s=0;for(;o>=0;)s++,o=a.indexOf(n,o+n.length);s>0&&(r.push(t),i.push(i.at(-1)+s))}}let a=i.at(-1),o=0,s=t.current,{offsets:l,start:u,getItemTop:d}=A.current,f=d(u),p=f>=0?f-l[u]:0;if(r.length>0&&s){let t=F.current>=0?F.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)}et(`setSearchQuery('${e}'): ${r.length} msgs · ptr=${o} msgIdx=${r[o]} curTop=${t} origin=${p}`)}P.current={matches:r,ptr:o,screenOrd:0,prefixSum:i},r.length>0?ge(r[o],!0):F.current>=0&&s&&s.scrollTo(F.current),h?.(a,r.length>0?i[o+1]??a:0)},nextMatch:()=>_e(1),prevMatch:()=>_e(-1),setAnchor:()=>{let e=t.current;e&&(F.current=e.getScrollTop())},disarmSearch:()=>{_?.(null),j.current=null,M.current={msgIdx:-1,positions:[]},N.current=-1},warmSearchIndex:async()=>{if(de.current)return 0;let e=A.current.messages,t=0,n=performance.now();for(let n=0;n<e.length;n+=500){await Ft(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 et(`warmSearchIndex: ${e.length} msgs · work=${Math.round(t)}ms wall=${r}ms chunks=${Math.ceil(e.length/500)}`),de.current=!0,Math.round(t)}}),[t]);let[ve,ye]=(0,Z.useState)(null),be=(0,Z.useRef)({onItemClick:a,setHoveredKey:ye});be.current={onItemClick:a,setHoveredKey:ye};let xe=(0,Z.useCallback)((e,t)=>{let n=be.current;!t&&n.onItemClick&&n.onItemClick(e)},[]),L=(0,Z.useCallback)(e=>{be.current.setHoveredKey(e)},[]),Se=(0,Z.useCallback)(e=>{be.current.setHoveredKey(t=>t===e?null:t)},[]);return(0,Co.jsxs)(Co.Fragment,{children:[(0,Co.jsx)(l,{ref:E,height:C,flexShrink:0}),e.slice(re,ie).map((e,t)=>{let n=re+t,r=x[n],c=!!a&&(o?.(e)??!0),l=c&&ve===r,u=s?.(e);return(0,Co.jsx)(bo,{itemKey:r,msg:e,idx:n,measureRef:T,expanded:u,hovered:l,clickable:c,onClickK:xe,onEnterK:L,onLeaveK:Se,renderItem:i},r)}),w>0&&(0,Co.jsx)(l,{height:w,flexShrink:0}),u&&(0,Co.jsx)(So,{messages:e,start:re,end:ie,offsets:O,getItemTop:k,getItemElement:ee,scrollRef:t})]})}function So({messages:e,start:t,end:n,offsets:r,getItemTop:i,getItemElement:a,scrollRef:o}){let{setStickyPrompt:s}=(0,Z.useContext)(ho);(0,Z.useSyncExternalStore)((0,Z.useCallback)(e=>o.current?.subscribe(e)??Oo,[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=vo(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,Eo).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,Co,wo,To,Eo,Do,Oo,ko=t((()=>{h(),Z=n(h(),1),Ka(),y(),oe(),go(),Co=S(),$e(),Nt(),ii(),Le(),wo=3,To=new WeakMap,Eo=500,Do=new WeakMap,Oo=()=>{}}));function Ao(e,t){let n=new Set(t),r=new Set;return e.filter(e=>{if(e.type===`system`)return e.subtype!==`api_metrics`;let t=e.message?.content[0];if(e.type===`assistant`)return e.isApiErrorMessage?!0:t?.type===`tool_use`&&t.name&&n.has(t.name)?(`id`in t&&r.add(t.id),!0):!1;if(e.type===`user`)return t?.type===`tool_result`?t.tool_use_id!==void 0&&r.has(t.tool_use_id):!e.isMeta;if(e.type===`attachment`){let t=e.attachment;return t?.type===`queued_command`&&t.commandMode===`prompt`&&!t.isMeta&&t.origin===void 0}return!1})}function jo(e,t){let n=new Set(t),r=new Set,i=[],a=0;for(let t=0;t<e.length;t++){let o=e[t],s=o.message?.content[0];if(o.type===`user`&&s?.type!==`tool_result`&&!o.isMeta){a++;continue}o.type===`assistant`&&(s?.type===`text`?i[t]=a:s?.type===`tool_use`&&s.name&&n.has(s.name)&&r.add(a))}return r.size===0?e:e.filter((e,t)=>{let n=i[t];return n===void 0||!r.has(n)})}function Mo(e,t,n=Ho,r=Uo){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 No(e){return(e.type===`assistant`||e.type===`user`?M(e):null)??e.uuid}function Po(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Fo(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=M(e);return i?t.has(i)||n.has(i)||T(i,`PostToolUse`,a)?!1:Rr(r,a.resolvedToolUseIDs):!0}case`system`:return e.subtype!==`api_error`;case`grouped_tool_use`:return e.messages.every(e=>{let t=e.message.content[0];return t?.type===`tool_use`&&a.resolvedToolUseIDs.has(t.id)});case`collapsed_read_search`:return!1;default:return!0}}var Io,Q,$,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko=t((()=>{m(),Io=n(h(),1),Q=n(h(),1),zr(),C(),at(),Ye(),y(),ne(),It(),Re(),Hr(),Gr(),Oe(),ft(),i(),We(),Xr(),R(),Tt(),ii(),ia(),ge(),ba(),Le(),ie(),Ca(),L(),Ia(),$=S(),ko(),Lo=Io.memo(function({agentDefinitions:e}){return(0,$.jsx)(z,{children:(0,$.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,$.jsx)(ta,{}),(0,$.jsx)(Io.Suspense,{fallback:null,children:(0,$.jsx)(Ma,{agentDefinitions:e})})]})})}),Ro=(Rt(),e(zt)),zo=null,Bo=null,Vo=30,Ho=200,Uo=50,Wo=({messages:e,tools:t,commands:n,verbose:i,toolJSX:a,toolUseConfirmQueue:o,inProgressToolUseIDs:c,isMessageSelectorVisible:u,conversationId:p,screen:m,streamingToolUses:h,showAllInTranscript:g=!1,agentDefinitions:_,hideLogo:y=!1,isLoading:x,hidePastThinking:S=!1,streamingThinking:C,streamingText:T,isBriefOnly:E=!1,unseenDivider:D,scrollRef:k,trackStickyPrompt:ne,jumpRef:ie,onSearchMatchesChange:ae,scanElement:A,setPositions:M,disableRenderCap:N=!1,cursor:oe=null,setCursor:se,cursorNavRef:le,renderRange:P})=>{let{columns:F}=v(),de=j(`transcript:toggleShowAll`,`Transcript`,`Ctrl+E`),I=(0,Q.useMemo)(()=>Te(e).filter(Ue),[e]),pe=(0,Q.useMemo)(()=>C?C.isStreaming?!0:C.streamingEndedAt?Date.now()-C.streamingEndedAt<3e4:!1:!1,[C]),{lastThinkingBlockId:me,latestBashOutputUUID:he}=(0,Q.useMemo)(()=>{let e=null,t=null,n=S&&!pe;S&&pe&&(e=`streaming`);for(let r=I.length-1;r>=0;r--){let i=I[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 S||(e=null),{lastThinkingBlockId:e,latestBashOutputUUID:t}},[I,S,pe]),ge=(0,Q.useMemo)(()=>ve(I),[I]),_e=(0,Q.useMemo)(()=>h.filter(e=>!c.has(e.contentBlock.id)&&!ge.has(e.contentBlock.id)),[h,c,ge]),xe=(0,Q.useMemo)(()=>_e.flatMap(e=>{let t=Ie({content:[e.contentBlock]});return t.uuid=ue(e.contentBlock.id,0),Te([t])}),[_e]),L=m===`transcript`,Se=(0,Q.useMemo)(()=>r(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL),[]),Ce=k!=null&&!Se,we=L&&!g&&!Ce,Oe=(0,Q.useRef)(null),R=(0,Q.useRef)(null),{collapsed:Ae,lookups:z,hasTruncatedMessages:je,hiddenMessageCount:Me}=(0,Q.useMemo)(()=>{let e=Ee((i||De()?I:re(I,{includeSnipped:!0})).filter(e=>e.type!==`progress`&&!xa(e)&&ke(e,L)),xe),n=[zo,Bo].filter(e=>e!==null),r=[zo].filter(e=>e!==null),a=n.length>0&&!L?E?Ao(e,n):r.length>0?jo(e,r):e:e,o=we?a.slice(-30):a,s=we&&a.length>Vo,{messages:c}=Jr(o,t,i),l=Vr(Wr(be(c,t)),i),u=qe(I,o),d=(()=>{let e=o.at(-1);return e?.type===`assistant`?e.message?.id:void 0})(),f;if(R.current&&R.current.key===u)f=R.current.lookups;else if(R.current&&I.length>=R.current.normalizedCount&&o.length>=R.current.messageCount&&R.current.lastAssistantMsgId===d){let e=ze(R.current.lookups,R.current.normalizedCount,R.current.messageCount,I,o);e?(f=e,R.current={key:u,lookups:f,normalizedCount:I.length,messageCount:o.length,lastAssistantMsgId:d}):(f=ee(I,o),R.current={key:u,lookups:f,normalizedCount:I.length,messageCount:o.length,lastAssistantMsgId:d})}else f=ee(I,o),R.current={key:u,lookups:f,normalizedCount:I.length,messageCount:o.length,lastAssistantMsgId:d};let p=e.length-Vo;return{collapsed:l,lookups:f,hasTruncatedMessages:s,hiddenMessageCount:p}},[i,I,L,xe,we,t,E]),Ne=(0,Q.useMemo)(()=>{let e=!Ce&&!N?Mo(Ae,Oe):0;return P?Ae.slice(P[0],P[1]):e>0?Ae.slice(e):Ae},[Ae,P,Ce,N]),Pe=(0,Q.useMemo)(()=>new Set(h.map(e=>e.contentBlock.id)),[h]),{dividerBeforeIndex:Fe,selectedIdx:Le}=(0,Q.useMemo)(()=>{if(!D&&!oe)return{dividerBeforeIndex:-1,selectedIdx:-1};let e=-1,t=-1,n=D?.firstUnseenUuid.slice(0,24);for(let r=0;r<Ne.length;r++){let i=Ne[r];if(e===-1&&n&&i.uuid.slice(0,24)===n&&(e=r),t===-1&&oe&&i.uuid===oe.uuid&&(t=r),e!==-1&&t!==-1)break}return{dividerBeforeIndex:e,selectedIdx:t}},[D,oe,Ne]),[Re,Be]=(0,Q.useState)(()=>new Set),Ve=(0,Q.useCallback)(e=>{let t=No(e);Be(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),He=(0,Q.useCallback)(e=>Re.size>0&&Re.has(No(e)),[Re]),We=(0,Q.useRef)(z);We.current=z;let Ge=(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&&O(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=We.current.toolUseByToolUseID.get(n.tool_use_id??``)?.name;return(r?Lt(t,r):void 0)?.isResultTruncated?.(e.toolUseResult)??!1},[t]),Ke=(!a||!!a.shouldContinueAnimation)&&!o.length&&!u,Je=c.size>0,{progress:Ye}=f(),Xe=(0,Q.useRef)(null),Ze=dt().terminalProgressBarEnabled&&!w()&&!(Ro?.isProactiveActive()??!1);(0,Q.useEffect)(()=>{let e=Ze?Je?`indeterminate`:`completed`:null;Xe.current!==e&&(Xe.current=e,Ye(e))},[Ye,Ze,Je]),(0,Q.useEffect)(()=>()=>Ye(null),[Ye]);let Qe=(0,Q.useCallback)(e=>`${e.uuid}-${p}`,[p]),$e=(e,r)=>{let a=r>0?Ne[r-1]?.type:void 0,o=e.type===`user`&&a===`user`,u=e.type===`collapsed_read_search`&&(!!T||da(Ne,r,t,Pe)),d=Ne.length-1-r>0,f=Qe(e),p=(0,$.jsx)(ya,{message:e,isUserContinuation:o,hasContentAfter:u,tools:t,commands:n,verbose:i||He(e)||oe?.expanded===!0&&r===Le,inProgressToolUseIDs:c,streamingToolUseIDs:Pe,screen:m,canAnimate:Ke,lastThinkingBlockId:me,latestBashOutputUUID:he,columns:F,isLoading:x,lookups:z,shouldCollapseDiffs:d},f),h=(0,$.jsx)(ce.Provider,{value:r===Le,children:p},f);return D&&r===Fe?[(0,$.jsx)(l,{marginTop:1,children:(0,$.jsx)(s,{title:`${D.count} new ${wt(D.count,`message`)}`,width:F,color:`inactive`})},`unseen-divider`),h]:h},et=(0,Q.useRef)(new WeakMap),tt=(0,Q.useCallback)(e=>{let n=et.current.get(e);if(n!==void 0)return n;let r=Zr(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=z.toolUseByToolUseID.get(n.tool_use_id),a=(i&&Lt(t,i.name))?.extractSearchText?.(e.toolUseResult);a!==void 0&&(r=a)}}let i=r.toLowerCase();return et.current.set(e,i),i},[t,z]);return(0,$.jsxs)($.Fragment,{children:[!y&&!(P&&P[0]>0)&&(0,$.jsx)(Lo,{agentDefinitions:_}),je&&(0,$.jsx)(s,{title:`${de} to show ${b.bold(Me)} previous messages`,width:F}),L&&g&&Me>0&&!N&&(0,$.jsx)(s,{title:`${de} to hide ${b.bold(Me)} previous messages`,width:F}),Ce?(0,$.jsx)(te.Provider,{value:!0,children:(0,$.jsx)(xo,{messages:Ne,scrollRef:k,columns:F,itemKey:Qe,renderItem:$e,onItemClick:Ve,isItemClickable:Ge,isItemExpanded:He,trackStickyPrompt:ne,selectedIndex:Le>=0?Le:void 0,cursorNavRef:le,setCursor:se,jumpRef:ie,onSearchMatchesChange:ae,scanElement:A,setPositions:M,extractSearchText:tt})}):Ne.flatMap($e),T&&!E&&(0,$.jsx)(l,{alignItems:`flex-start`,flexDirection:`row`,marginTop:1,width:`100%`,children:(0,$.jsxs)(l,{flexDirection:`row`,children:[(0,$.jsx)(l,{minWidth:2,children:(0,$.jsx)(d,{color:`text`,children:ot})}),(0,$.jsx)(l,{flexDirection:`column`,children:(0,$.jsx)(ye,{children:T})})]})}),pe&&C&&!E&&(0,$.jsx)(l,{marginTop:1,children:(0,$.jsx)(fe,{param:{type:`thinking`,thinking:C.thinking},addMargin:!1,isTranscriptMode:!0,verbose:i,hideInTranscript:!1})})]})},Go=Io.memo(Wo,(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`&&Po(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{go as a,Xa as c,Lr as d,so as i,Za as l,Ko as n,io as o,co as r,ro as s,Go as t,Ir as u};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{d as t,o as n}from"./envUtils-DSxRz_kt.js";import{Gt as r,H as i,I as a,Lt as o,P as s,fi as c,kt as l,t as u}from"./src-CDCSSo0U2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{Bp as f,Pw as p,nm as m,pp as h,tm as g,zp as _}from"./loadAgentsDir-ByO8eJqU.js";import{Gt as v,Jt as y}from"./settings-hQDLwPVj.js";import{g as b,s as x}from"./config-CE058cvr.js";import{n as S,r as C}from"./analytics-CkYUHW_U.js";import{Bt as w,Ht as T,Sr as E,xr as D}from"./model-CwO-g1RW.js";import{c as O,i as k,s as A}from"./terminalSetup-DlaFWI81.js";import{t as j}from"./WelcomeV2-Ci9VwPYh.js";import{n as M,t as N}from"./useExitOnCtrlCDWithKeybindings-Cce612uS.js";import{n as P,t as F}from"./ThemePicker-EQ6hPUeI.js";import{n as I,t as L}from"./PressEnterToContinue-Dl9Hg9Mf.js";import{t as R}from"./ApproveApiKey-CEIfuUh0.js";n();var z=e(c(),1),B=d();S(),y(),b(),D(),w(),p(),k(),N(),u(),u(),h(),m(),f(),P(),I(),u();var V=(0,z.createContext)({marker:``});function H({children:e}){let{marker:t}=(0,z.useContext)(V);return(0,B.jsxs)(a,{gap:1,children:[(0,B.jsx)(s,{dimColor:!0,children:t}),(0,B.jsx)(a,{flexDirection:`column`,children:e})]})}u();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)(a,{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;u();function K({onDone:e}){let[n,c]=(0,z.useState)(0),[u,d]=(0,z.useState)(!1),[f]=(0,z.useState)(()=>T()),[p,m]=i();(0,z.useEffect)(()=>{C(`tengu_began_setup`,{oauthEnabled:f})},[f]);function h(){if(n<N.length-1){let e=n+1;c(e),C(`tengu_onboarding_step`,{oauthEnabled:f,stepId:N[e]?.id})}else e()}function y(e){m(e),h()}let b=M(),S=(0,B.jsx)(a,{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)(a,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,B.jsx)(s,{bold:!0,children:`Before you start, keep in mind:`}),(0,B.jsx)(a,{flexDirection:`column`,width:70,children:(0,B.jsxs)(G,{children:[(0,B.jsxs)(G.Item,{children:[(0,B.jsx)(s,{children:`Always review changes before accepting`}),(0,B.jsxs)(s,{dimColor:!0,wrap:`wrap`,children:[`Claude can make mistakes — especially when running commands`,(0,B.jsx)(l,{}),`or editing files. You stay in control of every action.`,(0,B.jsx)(l,{})]})]}),(0,B.jsxs)(G.Item,{children:[(0,B.jsx)(s,{children:`Only use Claude Code on projects you trust`}),(0,B.jsxs)(s,{dimColor:!0,wrap:`wrap`,children:[`Untrusted code could contain prompt injection attacks.`,(0,B.jsx)(l,{}),(0,B.jsx)(o,{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&&d(!0),h()}let N=[];N.push({id:`theme`,component:S}),D&&N.push({id:`api-key`,component:(0,B.jsx)(R,{customApiKeyTruncated:D,onDone:k})}),f&&N.push({id:`oauth`,component:(0,B.jsx)(q,{skip:u,onSkip:h,children:(0,B.jsx)(g,{onDone:h})})}),N.push({id:`security`,component:w}),O()&&N.push({id:`terminal-setup`,component:(0,B.jsxs)(a,{flexDirection:`column`,gap:1,paddingLeft:1,children:[(0,B.jsx)(s,{bold:!0,children:`Use Claude Code's terminal setup?`}),(0,B.jsxs)(a,{flexDirection:`column`,width:70,gap:1,children:[(0,B.jsxs)(s,{children:[`For the optimal coding experience, enable the recommended settings`,(0,B.jsx)(l,{}),`for your terminal:`,` `,v.terminal===`Apple_Terminal`?`Option+Enter for newlines and visual bell`:`Shift+Enter for newlines`]}),(0,B.jsx)(_,{options:[{label:`Yes, use recommended settings`,value:`install`},{label:`No, maybe later with /terminal-setup`,value:`no`}],onChange:e=>{e===`install`?A(p).catch(()=>{}).finally(h):h()},onCancel:()=>h()}),(0,B.jsx)(s,{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():h()},[n,N.length,f,e]),V=(0,z.useCallback)(()=>{h()},[n,N.length,f,e]);return r({"confirm:yes":I},{context:`Confirmation`,isActive:P?.id===`security`}),r({"confirm:no":V},{context:`Confirmation`,isActive:P?.id===`terminal-setup`}),(0,B.jsxs)(a,{flexDirection:`column`,children:[(0,B.jsx)(j,{}),(0,B.jsxs)(a,{flexDirection:`column`,marginTop:1,children:[P?.component,b.pending&&(0,B.jsx)(a,{padding:1,children:(0,B.jsxs)(s,{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,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as n,I as r,P as i,fi as a,ot as o,t as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{XS as l}from"./loadAgentsDir-x3rlgED4.js";import{C as u,T as d,b as f}from"./startupProfiler-xa3NmN7Z.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:i,overlay:a}){let{rows:s}=o(),c=a?5:Math.min(6,Math.max(1,s-3));if(e.length===0)return null;let l=i??Math.max(...e.map(e=>n(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)(r,{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(a(),1),l(),s(),f(),_=c(),v=(0,g.memo)(function({item:e,maxColumnWidth:t,isSelected:r}){let a=o().columns;if(m(e.id)){let t=p(e.id),o=r?`suggestion`:void 0,s=!r,c=e.id.startsWith(`file-`),l=e.id.startsWith(`mcp-resource-`),f=e.description?3:0,m;if(c){let t=e.description?Math.min(20,n(e.description)):0,r=a-2-4-f-t;m=u(e.displayText,r)}else m=l?d(e.displayText,30):e.displayText;let h=a-2-n(m)-f-4,g;if(e.description){let n=Math.max(0,h),r=d(e.description.replace(/\s+/g,` `),n);g=`${t} ${m} – ${r}`}else g=`${t} ${m}`;return(0,_.jsx)(i,{color:o,dimColor:s,wrap:`truncate`,children:g})}let s=Math.floor(a*.4),c=Math.min(t??n(e.displayText)+5,s),l=e.color||(r?`suggestion`:void 0),f=!r,h=e.displayText;n(h)>c-2&&(h=d(h,c-2));let g=h+` `.repeat(Math.max(0,c-n(h))),v=e.tag?`[${e.tag}] `:``,y=n(v),b=Math.max(0,a-c-y-4),x=e.description?d(e.description.replace(/\s+/g,` `),b):``;return(0,_.jsxs)(i,{wrap:`truncate`,children:[(0,_.jsx)(i,{color:l,dimColor:f,children:g}),v?(0,_.jsx)(i,{color:e.tag===`local`?`ansi:yellow`:void 0,dimColor:e.tag!==`local`,children:v}):null,(0,_.jsx)(i,{color:r?`suggestion`:void 0,dimColor:!r,children:x})]})}),y=(0,g.memo)(h)}));export{y as n,b as r,h as t};
1
+ import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as n,I as r,P as i,fi as a,ot as o,t as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{xw as l}from"./loadAgentsDir-ByO8eJqU.js";import{S as u,w as d,y as f}from"./startupProfiler-DCn_NxMH.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:i,overlay:a}){let{rows:s}=o(),c=a?5:Math.min(6,Math.max(1,s-3));if(e.length===0)return null;let l=i??Math.max(...e.map(e=>n(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)(r,{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(a(),1),l(),s(),f(),_=c(),v=(0,g.memo)(function({item:e,maxColumnWidth:t,isSelected:r}){let a=o().columns;if(m(e.id)){let t=p(e.id),o=r?`suggestion`:void 0,s=!r,c=e.id.startsWith(`file-`),l=e.id.startsWith(`mcp-resource-`),f=e.description?3:0,m;if(c){let t=e.description?Math.min(20,n(e.description)):0,r=a-2-4-f-t;m=u(e.displayText,r)}else m=l?d(e.displayText,30):e.displayText;let h=a-2-n(m)-f-4,g;if(e.description){let n=Math.max(0,h),r=d(e.description.replace(/\s+/g,` `),n);g=`${t} ${m} – ${r}`}else g=`${t} ${m}`;return(0,_.jsx)(i,{color:o,dimColor:s,wrap:`truncate`,children:g})}let s=Math.floor(a*.4),c=Math.min(t??n(e.displayText)+5,s),l=e.color||(r?`suggestion`:void 0),f=!r,h=e.displayText;n(h)>c-2&&(h=d(h,c-2));let g=h+` `.repeat(Math.max(0,c-n(h))),v=e.tag?`[${e.tag}] `:``,y=n(v),b=Math.max(0,a-c-y-4),x=e.description?d(e.description.replace(/\s+/g,` `),b):``;return(0,_.jsxs)(i,{wrap:`truncate`,children:[(0,_.jsx)(i,{color:l,dimColor:f,children:g}),v?(0,_.jsx)(i,{color:e.tag===`local`?`ansi:yellow`:void 0,dimColor:e.tag!==`local`,children:v}):null,(0,_.jsx)(i,{color:r?`suggestion`:void 0,dimColor:!r,children:x})]})}),y=(0,g.memo)(h)}));export{y as n,b as r,h as t};
@@ -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";import{SS as o,hx as s,mx as c,xS as l}from"./loadAgentsDir-x3rlgED4.js";import{$t as u,Xt as d}from"./settings-BeLFUeie.js";import{c as f,g as p}from"./config-DRDuVyzE.js";import{i as m,o as h}from"./platform-BrYefG_2.js";import{et as g,rt as _,tt as v}from"./model-CZViyZnE.js";import{a as y,i as b,r as x}from"./terminalSetup-3JNy6i_J.js";function S(){return f().editorMode===`vim`}function C(){return d.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(),u()}));function E(e){return e.replace(/\+/g,` + `)}function D(e){let{dimColor:r,fixedWidth:i,gap:a,paddingX:c}=e,l=E(s(`app:toggleTranscript`,`Global`,`ctrl+o`)),u=E(s(`app:toggleTodos`,`Global`,`ctrl+t`)),d=E(s(`chat:undo`,`Chat`,`ctrl+_`)),f=E(s(`chat:stash`,`Chat`,`ctrl+s`)),p=E(s(`chat:cycleMode`,`Chat`,`shift+tab`)),h=E(s(`chat:modelPicker`,`Chat`,`alt+p`)),g=E(s(`chat:fastMode`,`Chat`,`alt+o`)),y=E(s(`chat:externalEditor`,`Chat`,`ctrl+g`));E(s(`app:toggleTerminal`,`Global`,`meta+j`));let b=E(s(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,O.jsxs)(t,{paddingX:c,flexDirection:`row`,gap:a,children:[(0,O.jsxs)(t,{flexDirection:`column`,width:i?24:void 0,children:[(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`! for bash mode`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`/ for commands`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`@ for file paths`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`& for background`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`/btw for side question`})})]}),(0,O.jsxs)(t,{flexDirection:`column`,width:i?35:void 0,children:[(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`double tap esc to clear input`})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[p,` `,process.env.USER_TYPE===`ant`?`to cycle modes`:`to auto-accept edits`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[l,` for verbose output`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[u,` to toggle tasks`]})}),null,(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:C()})})]}),(0,O.jsxs)(t,{flexDirection:`column`,children:[(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[d,` to undo`]})}),m()!==`windows`&&(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`ctrl + z to suspend`})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[b,` to paste images`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[h,` to switch model`]})}),_()&&v()&&(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[g,` to toggle fast mode`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[f,` to stash prompt`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[y,` to edit in $EDITOR`]})}),o()&&(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`/keybindings to customize`})})]})]})}var O,k=e((()=>{r(),i(),h(),l(),c(),g(),T(),O=a()}));export{S as a,w as i,k as n,T as r,D 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-CDCSSo0U2.js";import{t as a}from"./jsx-runtime-Bb4Xn-E0.js";import{Fw as o,Hw as s,Iw as c,Uw as l}from"./loadAgentsDir-ByO8eJqU.js";import{Gt as u,Jt as d}from"./settings-hQDLwPVj.js";import{c as f,g as p}from"./config-CE058cvr.js";import{i as m,o as h}from"./platform-DCXXznJg.js";import{et as g,rt as _,tt as v}from"./model-CwO-g1RW.js";import{a as y,i as b,r as x}from"./terminalSetup-DlaFWI81.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:r,fixedWidth:i,gap:a,paddingX:o}=e,s=E(c(`app:toggleTranscript`,`Global`,`ctrl+o`)),u=E(c(`app:toggleTodos`,`Global`,`ctrl+t`)),d=E(c(`chat:undo`,`Chat`,`ctrl+_`)),f=E(c(`chat:stash`,`Chat`,`ctrl+s`)),p=E(c(`chat:cycleMode`,`Chat`,`shift+tab`)),h=E(c(`chat:modelPicker`,`Chat`,`alt+p`)),g=E(c(`chat:fastMode`,`Chat`,`alt+o`)),y=E(c(`chat:externalEditor`,`Chat`,`ctrl+g`));E(c(`app:toggleTerminal`,`Global`,`meta+j`));let b=E(c(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,O.jsxs)(t,{paddingX:o,flexDirection:`row`,gap:a,children:[(0,O.jsxs)(t,{flexDirection:`column`,width:i?24:void 0,children:[(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`! for bash mode`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`/ for commands`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`@ for file paths`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`& for background`})}),(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`/btw for side question`})})]}),(0,O.jsxs)(t,{flexDirection:`column`,width:i?35:void 0,children:[(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`double tap esc to clear input`})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[p,` `,process.env.USER_TYPE===`ant`?`to cycle modes`:`to auto-accept edits`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[s,` for verbose output`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[u,` to toggle tasks`]})}),null,(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:C()})})]}),(0,O.jsxs)(t,{flexDirection:`column`,children:[(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[d,` to undo`]})}),m()!==`windows`&&(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`ctrl + z to suspend`})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[b,` to paste images`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[h,` to switch model`]})}),_()&&v()&&(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[g,` to toggle fast mode`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[f,` to stash prompt`]})}),(0,O.jsx)(t,{children:(0,O.jsxs)(n,{dimColor:r,children:[y,` to edit in $EDITOR`]})}),l()&&(0,O.jsx)(t,{children:(0,O.jsx)(n,{dimColor:r,children:`/keybindings to customize`})})]})]})}var O,k=e((()=>{r(),i(),h(),s(),o(),g(),T(),O=a()}));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-DSxRz_kt.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{Kr as o,qr as s}from"./src-CDCSSo0U2.js";import{$ as c,$t as l,Ot as u,en as d,mt as f,wt as p}from"./state-C2OSZkV1.js";import{$ as m,Ac as h,Cb as g,Do as _,Fy as v,Gn as y,Iy as b,Kn as ee,LS as x,Mv as te,Pd as S,Py as C,RS as w,SD as T,Sa as ne,Sb as re,Sn as ie,Ta as ae,Yg as E,Yi as oe,Yx as D,Zx as O,ay as se,cy as k,dc as ce,dx as le,eo as ue,et as A,fc as j,jd as M,jr as N,jv as P,kc as F,ko as de,lc as fe,lr as I,lt as pe,ny as me,qi as he,rt as ge,si as L,uc as R,ut as z,xD as B,xh as V,xn as _e,yh as H}from"./loadAgentsDir-ByO8eJqU.js";import{n as ve,t as ye}from"./cwd-C5ce-7WB.js";import{N as be,P as xe,c as Se,g as Ce}from"./config-CE058cvr.js";import{J as we,i as Te,o as Ee}from"./log-CZ0zYP_c.js";import{C as De,Y as U,_ as Oe,et as W,u as ke}from"./model-CwO-g1RW.js";import{Sn as Ae,it as je,st as G,xn as Me}from"./prompt-B7joRiqj.js";import{U as Ne,gt as Pe,vt as Fe}from"./sessionState-CjNY991n.js";import{a as Ie,n as Le,r as Re}from"./mappers-CHRFic5q.js";import{c as ze,n as Be,o as Ve,r as K,s as He}from"./MessageSelector-B88b2ypw.js";import{n as Ue,t as We}from"./systemTheme-Ceakddth.js";import{randomUUID as q}from"crypto";n(),i(),o(),l(),ve(),we(),Ee(),xe(),Me(),Ce(),W(),Ne(),B(),O(),le(),g(),G(),k(),V(),F(),_(),ue(),oe(),N(),y(),_e(),A(),z(),b(),w(),Oe(),E(),M();async function Ge({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?pe(e,t,n,r):Promise.resolve([]),v(),i===void 0?C():Promise.resolve({})]);return{defaultSystemPrompt:a,userContext:o,systemContext:s}}async function Ke({tools:e,commands:t,mcpClients:n,messages:r,readFileState:i,getAppState:a,setAppState:o,customSystemPrompt:s,appendSystemPrompt:c,thinkingConfig:l,agents:u}){let d=ke(),f=a(),{defaultSystemPrompt:p,userContext:m,systemContext:h}=await Ge({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(f.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),g=Pe([...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??(S()===!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}}w(),Oe(),P(),E(),We(),M(),Le(),R();var qe=()=>{try{return K(),e(Be)}catch{return null}},J=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=Fe}async*submitMessage(e,n){let{cwd:i,commands:a,tools:o,mcpClients:l,verbose:g=!1,thinkingConfig:_,maxTurns:v,maxBudgetUsd:y,taskBudget:b,canUseTool:x,customSystemPrompt:C,appendSystemPrompt:w,userSpecifiedModel:E,fallbackModel:oe,jsonSchema:D,getAppState:O,setAppState:k,replayUserMessages:le=!1,includePartialMessages:ue=!1,agents:A=[],setSDKStatus:M,orphanedPermission:N}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],te(i);let P=!d(),F=Date.now(),pe=async(e,t,n,r,i,a)=>{let o=await x(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:He(e.name),tool_use_id:i,tool_input:t}),o},R=O(),z=E?De(E):ke(),B=_||(S()===!1?{type:`disabled`}:{type:`adaptive`});H(`before_getSystemPrompt`);let V=typeof C==`string`?C:void 0,{defaultSystemPrompt:_e,userContext:ve,systemContext:xe}=await Ge({tools:o,mainLoopModel:z,additionalWorkingDirectories:Array.from(R.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:l,customSystemPrompt:V});H(`after_getSystemPrompt`);let Ce={...ve},we=V!==void 0&&be()?await ee():null,Ee=Pe([...V===void 0?_e:[V],...we?[we]:[],...w?[w]:[]]),Oe=o.some(e=>Ae(e,je));D&&Oe&&ie(k,f());let W={messages:this.mutableMessages,setMessages:e=>{this.mutableMessages=e(this.mutableMessages)},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:g,mainLoopModel:z,thinkingConfig:B,mcpClients:l,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:C,appendSystemPrompt:w,agentDefinitions:{activeAgents:A,allAgents:[]},theme:Ue(Se().theme),maxBudgetUsd:y},getAppState:O,setAppState:k,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{k(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{k(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:M};if(N&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of fe(N,o,this.mutableMessages,W))yield e}let{messages:G,shouldQuery:Me,allowedTools:Ne,model:Le,resultText:Be}=await ze({input:e,mode:`prompt`,setToolJSX:()=>{},context:{...W,messages:this.mutableMessages},messages:this.mutableMessages,uuid:n?.uuid,isMeta:n?.isMeta,querySource:`sdk`});this.mutableMessages.push(...G);let K=[...this.mutableMessages];if(P&&G.length>0){let e=L(K);r()||(await e,(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await I())}let We=qe(),Ke=G.filter(e=>e.type===`user`&&!e.isMeta&&!e.toolUseResult&&(We?.selectableUserMessagesFilter(e)??!0)||e.type===`system`&&e.subtype===`compact_boundary`),J=le?Ke:[];k(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:Ne}}}));let Y=Le??z;W={messages:K,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:g,mainLoopModel:Y,thinkingConfig:B,mcpClients:l,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:C,appendSystemPrompt:w,theme:Ue(Se().theme),agentDefinitions:{activeAgents:A,allAgents:[]},maxBudgetUsd:y},getAppState:O,setAppState:k,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:W.updateFileHistoryState,updateAttributionState:W.updateAttributionState,setSDKStatus:M},H(`before_skills_plugins`);let[Je,{enabled:Ye}]=await Promise.all([he(ye()),de()]);if(H(`after_skills_plugins`),yield Ve({tools:o,mcpClients:l,model:Y,permissionMode:R.toolPermissionContext.mode,commands:a,agents:A,skills:Je,plugins:Ye,fastMode:R.fastMode}),H(`system_message_yielded`),!Me){for(let e of G)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:s(e.message.content)},session_id:f(),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 Re(e.content,e.uuid)),e.type===`system`&&e.subtype===`compact_boundary`){let t=e;yield{type:`system`,subtype:`compact_boundary`,session_id:f(),uuid:e.uuid,compact_metadata:Ie(t.compactMetadata)}}P&&(await L(K),(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await I()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-F,duration_api_ms:p(),num_turns:K.length-1,result:Be??``,stop_reason:null,session_id:f(),total_cost_usd:u(),usage:this.totalUsage,modelUsage:c(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,R.fastMode),uuid:q()};return}if(me()&&P){let e=qe()?.selectableUserMessagesFilter??(e=>!0);G.filter(e).forEach(e=>{se(e=>{k(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let X=Fe,Z=1,Xe=!1,Ze,Q=null,Qe=Te().at(-1),$e=D?ae(this.mutableMessages,je):0;for await(let e of h({messages:K,systemPrompt:Ee,userContext:Ce,systemContext:xe,canUseTool:pe,toolUseContext:W,fallbackModel:oe,querySource:`sdk`,maxTurns:v,taskBudget:b})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(P&&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 L(this.mutableMessages.slice(0,e+1))}}if(K.push(e),P&&(e.type===`assistant`?L(K):await L(K)),!Xe&&J.length>0){Xe=!0;for(let e of J)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:f(),parent_tool_use_id:null,uuid:e.uuid,timestamp:e.timestamp,isReplay:!0})}}switch(e.type===`user`&&Z++,e.type){case`tombstone`:break;case`assistant`:{let t=e,n=t.message?.stop_reason;n!=null&&(Q=n),this.mutableMessages.push(t),yield*j(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),P&&(K.push(t),L(K)),yield*j(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*j(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){X=Fe;let e=t.message;X=ge(X,e.usage)}if(t.type===`message_delta`){X=ge(X,t.usage);let e=t.delta;e.stop_reason!=null&&(Q=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=m(this.totalUsage,X)),ue&&(yield{type:`stream_event`,event:t,session_id:f(),parent_tool_use_id:null,uuid:q()});break}case`attachment`:{let n=e;this.mutableMessages.push(n),P&&(K.push(n),L(K));let r=n.attachment;if(r.type===`structured_output`)Ze=r.data;else if(r.type===`max_turns_reached`){P&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await I(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-F,duration_api_ms:p(),is_error:!0,num_turns:r.turnCount,stop_reason:Q,session_id:f(),total_cost_usd:u(),usage:this.totalUsage,modelUsage:c(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,R.fastMode),uuid:q(),errors:[`Reached maximum number of turns (${r.maxTurns})`]};return}else le&&r.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:r.prompt},session_id:f(),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=K.length-1;r>0&&K.splice(0,r),yield{type:`system`,subtype:`compact_boundary`,session_id:f(),uuid:t.uuid,compact_metadata:Ie(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:re(e.error),session_id:f(),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:f(),uuid:t.uuid};break}}if(y!==void 0&&u()>=y){P&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await I(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-F,duration_api_ms:p(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:f(),total_cost_usd:u(),usage:this.totalUsage,modelUsage:c(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,R.fastMode),uuid:q(),errors:[`Reached maximum budget ($${y}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&D){let e=ae(this.mutableMessages,je)-$e,n=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=n){P&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await I(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-F,duration_api_ms:p(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:f(),total_cost_usd:u(),usage:this.totalUsage,modelUsage:c(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,R.fastMode),uuid:q(),errors:[`Failed to provide valid structured output after ${n} attempts`]};return}}}let $=K.findLast(e=>e.type===`assistant`||e.type===`user`),et=$?.type??`undefined`,tt=$?.type===`assistant`?T($.message.content)?.type??`none`:`n/a`;if(P&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await I(),!ce($,Q)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-F,duration_api_ms:p(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:f(),total_cost_usd:u(),usage:this.totalUsage,modelUsage:c(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,R.fastMode),uuid:q(),errors:(()=>{let e=Te(),t=Qe?e.lastIndexOf(Qe)+1:0;return[`[ede_diagnostic] result_type=${et} last_content_type=${tt} stop_reason=${Q}`,...e.slice(t).map(e=>e.error)]})()};return}let nt=``,rt=!1;if($.type===`assistant`){let e=T($.message.content);e?.type===`text`&&!ne.has(e.text)&&(nt=e.text),rt=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:rt,duration_ms:Date.now()-F,duration_api_ms:p(),num_turns:Z,result:nt,stop_reason:Q,session_id:f(),total_cost_usd:u(),usage:this.totalUsage,modelUsage:c(),permission_denials:this.permissionDenials,structured_output:Ze,fast_mode_state:U(Y,R.fastMode),uuid:q()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=x()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return f()}setModel(e){this.config.userSpecifiedModel=e}};async function*Y({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:b,getAppState:ee,setAppState:x,abortController:te,replayUserMessages:S=!1,includePartialMessages:C=!1,handleElicitation:w,agents:T=[],setSDKStatus:ne,orphanedPermission:re}){let ie=new J({cwd:i,tools:a,commands:e,mcpClients:o,agents:T??[],canUseTool:f,getAppState:ee,setAppState:x,initialMessages:p,readFileCache:D(m()),customSystemPrompt:g,appendSystemPrompt:_,userSpecifiedModel:v,fallbackModel:y,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:b,verbose:s,handleElicitation:w,replayUserMessages:S,includePartialMessages:C,setSDKStatus:ne,abortController:te,orphanedPermission:re});try{yield*ie.submitMessage(t,{uuid:n,isMeta:r})}finally{h(ie.getReadFileState())}}export{Y as n,Ke as r,J as t};