@readmagic/workmate 0.0.9 → 0.0.11

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 (445) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-qFZy3FOD.js → AddWorkspaceDirectory-ag2JTpmU.js} +1 -1
  2. package/dist/chunks/{App-DW4elk6E.js → App-BuKmqFPm.js} +1 -1
  3. package/dist/chunks/ApproveApiKey-CIWOi_7v.js +1 -0
  4. package/dist/chunks/ApproveApiKey-M6U-NafA.js +1 -0
  5. package/dist/chunks/BackgroundTasksDialog-Pnpl3Ixx.js +2 -0
  6. package/dist/chunks/{BypassPermissionsModeDialog-BuRFF1fQ.js → BypassPermissionsModeDialog-B05t83wa.js} +1 -1
  7. package/dist/chunks/{ClaudeMdExternalIncludesDialog-CDrArsSX.js → ClaudeMdExternalIncludesDialog-CSywJdVL.js} +1 -1
  8. package/dist/chunks/ClaudeMdExternalIncludesDialog-D-w166RC.js +1 -0
  9. package/dist/chunks/ConsoleOAuthFlow-CV6PcJOP.js +1 -0
  10. package/dist/chunks/{DiffDialog-BIcwpgSr.js → DiffDialog-DUbFrzKu.js} +3 -3
  11. package/dist/chunks/Doctor-BcnUfJ4I.js +1 -0
  12. package/dist/chunks/Doctor-Dz4TuYas.js +3 -0
  13. package/dist/chunks/ExitFlow-BwyAtIHx.js +2 -0
  14. package/dist/chunks/{Grove-BmirUB6V.js → Grove-BDoVj02t.js} +2 -2
  15. package/dist/chunks/{HybridTransport-BVmSUHf0.js → HybridTransport-C_U0IJfz.js} +4 -4
  16. package/dist/chunks/{InvalidConfigDialog-WRywkKeS.js → InvalidConfigDialog-bih293Xt.js} +1 -1
  17. package/dist/chunks/{InvalidSettingsDialog-C4n3A72C.js → InvalidSettingsDialog-Br8kQOHz.js} +1 -1
  18. package/dist/chunks/MCPConnectionManager-B9n4SXN4.js +1 -0
  19. package/dist/chunks/MCPToolListView-DJ06N1DG.js +1 -0
  20. package/dist/chunks/{McpParsingWarnings-CH4yyMAL.js → McpParsingWarnings-COa71S9q.js} +1 -1
  21. package/dist/chunks/MessageSelector-o4ULADFg.js +3 -0
  22. package/dist/chunks/Messages-qqwHuAW5.js +11 -0
  23. package/dist/chunks/{Onboarding-BboWs1pp.js → Onboarding-BzuQjney.js} +1 -1
  24. package/dist/chunks/{PromptInputFooterSuggestions-BpC9COmh.js → PromptInputFooterSuggestions-to5eYBvI.js} +1 -1
  25. package/dist/chunks/PromptInputHelpMenu-CfMFx-TF.js +1 -0
  26. package/dist/chunks/QueryEngine-Dt0BKUeF.js +1 -0
  27. package/dist/chunks/REPL-CUbEDqEl.js +133 -0
  28. package/dist/chunks/REPL-DMaKNhTa.js +1 -0
  29. package/dist/chunks/RemoteSessionManager-Bf44A0Ol.js +2 -0
  30. package/dist/chunks/ResumeConversation-Ctw5Q1g9.js +1 -0
  31. package/dist/chunks/{SSETransport-1KBBUikF.js → SSETransport-DN4tCDEh.js} +3 -3
  32. package/dist/chunks/SearchExtraToolsTool-C80OdtPZ.js +1 -0
  33. package/dist/chunks/Settings-DfdcmvOV.js +2 -0
  34. package/dist/chunks/{TeleportProgress-BmgPAZAi.js → TeleportProgress-C2LQVLav.js} +1 -1
  35. package/dist/chunks/{TeleportRepoMismatchDialog-sgxNOeM_.js → TeleportRepoMismatchDialog-BZL8Zblz.js} +1 -1
  36. package/dist/chunks/{TeleportResumeWrapper-GptvrUdv.js → TeleportResumeWrapper-wPiIs8xg.js} +1 -1
  37. package/dist/chunks/{ThemePicker-gAMqqD1P.js → ThemePicker-BT_NaRQC.js} +1 -1
  38. package/dist/chunks/{TrustDialog-CWt-4Evl.js → TrustDialog-ACaJ_m7A.js} +1 -1
  39. package/dist/chunks/{ValidationErrorsList-De3kzHtz.js → ValidationErrorsList-C-hWdy_8.js} +1 -1
  40. package/dist/chunks/WelcomeV2-ZQRKlcT4.js +1 -0
  41. package/dist/chunks/add-dir-SAKTkw0S.js +1 -0
  42. package/dist/chunks/{agentDisplay-5gnCQwUY.js → agentDisplay-CuSHqgZc.js} +1 -1
  43. package/dist/chunks/{agents-Bz1MLp4A.js → agents-CMC0iQP4.js} +1 -1
  44. package/dist/chunks/agents-ZgRKpjHv.js +103 -0
  45. package/dist/chunks/allErrors-_cOQksHC.js +1 -0
  46. package/dist/chunks/{api-DzccRM_z.js → api-BbJfMXRS.js} +1 -1
  47. package/dist/chunks/api-DS1MiW01.js +1 -0
  48. package/dist/chunks/{auth-Cjnyy10u.js → auth-7mJGtlZp.js} +2 -2
  49. package/dist/chunks/auth-DGZzCbU0.js +1 -0
  50. package/dist/chunks/auth-DN1MUpB8.js +1 -0
  51. package/dist/chunks/{autoMode-CQ5nqP9c.js → autoMode-CBtY7ACs.js} +6 -6
  52. package/dist/chunks/autonomy-DuQmYhq6.js +15 -0
  53. package/dist/chunks/{autonomy-CPUCe-YU.js → autonomy-lJV7yWUl.js} +1 -1
  54. package/dist/chunks/autonomyPanel-DAQm6lDz.js +1 -0
  55. package/dist/chunks/backgroundHousekeeping-BTy71bcY.js +1 -0
  56. package/dist/chunks/backgroundHousekeeping-Cc7Ag7JG.js +17 -0
  57. package/dist/chunks/{banner-BJZNMppT.js → banner-1Wyeyawe.js} +1 -1
  58. package/dist/chunks/{bg-w3Vlsm3Y.js → bg-CJ0YWFli.js} +2 -2
  59. package/dist/chunks/bg-CeUrRz_7.js +1 -0
  60. package/dist/chunks/branch-k3kirqbA.js +3 -0
  61. package/dist/chunks/{break-cache-DXV0brco.js → break-cache-CAoZ9b72.js} +2 -2
  62. package/dist/chunks/bridgeConfig-CzRUPn-D.js +1 -0
  63. package/dist/chunks/{bridgeConfig-vORehbGG.js → bridgeConfig-UgaUfuP6.js} +1 -1
  64. package/dist/chunks/bridgeMessaging-Ci5H68MX.js +1 -0
  65. package/dist/chunks/{bridgePointer-D4W9GpWw.js → bridgePointer-BL8-lGvN.js} +1 -1
  66. package/dist/chunks/bridgeStatusUtil-C36w15ge.js +1 -0
  67. package/dist/chunks/{btw-DDUC_t0w.js → btw-nVoVuIae.js} +1 -1
  68. package/dist/chunks/caches-B8sM3Zys.js +1 -0
  69. package/dist/chunks/caches-Bp9MZ7IE.js +1 -0
  70. package/dist/chunks/{capacityWake-L7b1mMft.js → capacityWake-BOySRJUJ.js} +1 -1
  71. package/dist/chunks/ccrClient-Br4LAofR.js +1 -0
  72. package/dist/chunks/{claudeDesktop-CAmnheYx.js → claudeDesktop-Bgds1-YT.js} +1 -1
  73. package/dist/chunks/{clear-DdWexxbM.js → clear-C4Vtnbye.js} +1 -1
  74. package/dist/chunks/{cliLaunch-BWWOgBFh.js → cliLaunch-BTpfAGGI.js} +1 -1
  75. package/dist/chunks/{client-CoXtVRzi.js → client-B9404qIP.js} +1 -1
  76. package/dist/chunks/client-BCAbKdNz.js +1 -0
  77. package/dist/chunks/client-CJE6gEvU.js +1 -0
  78. package/dist/chunks/commands-DL-BzoMQ.js +1 -0
  79. package/dist/chunks/compact-Cx7BPXLU.js +2 -0
  80. package/dist/chunks/config-S5OW4Xqr.js +1 -0
  81. package/dist/chunks/config-aRiTrtCv.js +3 -0
  82. package/dist/chunks/{config-CVvUNkj2.js → config-kB2eazPX.js} +1 -1
  83. package/dist/chunks/{context-BWcfhhDj.js → context-BN7DEjoH.js} +1 -1
  84. package/dist/chunks/{context-noninteractive-c7jGVWHQ.js → context-noninteractive-D91W2B8e.js} +5 -5
  85. package/dist/chunks/context-noninteractive-DPacEFJ1.js +1 -0
  86. package/dist/chunks/conversation-D5Nbu9eT.js +1 -0
  87. package/dist/chunks/conversation-hcUx9e-C.js +1 -0
  88. package/dist/chunks/{createSSHSession-DP7B8yvb.js → createSSHSession-DecOR6M5.js} +6 -6
  89. package/dist/chunks/createSession-D27zvmOs.js +1 -0
  90. package/dist/chunks/createSession-DRqkLZWt.js +1 -0
  91. package/dist/chunks/crossProjectResume-Bw3U0Ty6.js +40 -0
  92. package/dist/chunks/cwd-Cfdf7z7s.js +1 -0
  93. package/dist/chunks/cwd-ClLru_7T.js +1 -0
  94. package/dist/chunks/datadog-bm551AVV.js +1 -0
  95. package/dist/chunks/debug-BecbSVoN.js +39 -0
  96. package/dist/chunks/{debugUtils-CezNYZ-4.js → debugUtils-CmJfIUxW.js} +1 -1
  97. package/dist/chunks/{detached-CkPpYMJj.js → detached-CIyF0M5O.js} +1 -1
  98. package/dist/chunks/detectRepository-C15umvKN.js +1 -0
  99. package/dist/chunks/detectRepository-DDfLfKcM.js +1 -0
  100. package/dist/chunks/{diff-DHzz9WAp.js → diff-DeK4bwjw.js} +1 -1
  101. package/dist/chunks/{directoryCompletion-D5AvL7TF.js → directoryCompletion-BJCu19HJ.js} +1 -1
  102. package/dist/chunks/doctor-BJORBomU.js +1 -0
  103. package/dist/chunks/earlyInput-BEjRkAtH.js +1 -0
  104. package/dist/chunks/{earlyInput-BTC_Wucv.js → earlyInput-IghoCjG5.js} +1 -1
  105. package/dist/chunks/entry-mdegyj8z.js +14 -0
  106. package/dist/chunks/esm-Ka3lhafK.js +1 -0
  107. package/dist/chunks/{execFileNoThrow-5SylUnAI.js → execFileNoThrow-DHyW8FMX.js} +2 -2
  108. package/dist/chunks/execSyncWrapper-CDzB0BM1.js +1 -0
  109. package/dist/chunks/exit-CF3KBl-S.js +1 -0
  110. package/dist/chunks/{extraUsage-Dt5mw35U.js → extraUsage-BrKbpBK-.js} +1 -1
  111. package/dist/chunks/extractMemories-4lBn134y.js +1 -0
  112. package/dist/chunks/fast-0Vi354KI.js +1 -0
  113. package/dist/chunks/{fast-ClYQcEv5.js → fast-DWn40OcQ.js} +1 -1
  114. package/dist/chunks/featureCheck-D6FjD-nt.js +1 -0
  115. package/dist/chunks/featureCheck-JOur3pHb.js +1 -0
  116. package/dist/chunks/{fileSuggestions-fNxREjpe.js → fileSuggestions-C7Pwq2yj.js} +3 -3
  117. package/dist/chunks/firstPartyEventLogger-BHjBQH0J.js +5 -0
  118. package/dist/chunks/firstPartyEventLogger-BNBnLYPK.js +1 -0
  119. package/dist/chunks/flushGate-DdJjxCes.js +1 -0
  120. package/dist/chunks/{gemini-fZ0VPU2A.js → gemini-DHv2iVfy.js} +1 -1
  121. package/dist/chunks/generateSessionName-DhS_6oHd.js +1 -0
  122. package/dist/chunks/{genericProcessUtils-BmDSLcMf.js → genericProcessUtils-B2HcDYhg.js} +1 -1
  123. package/dist/chunks/git-DBlOv64X.js +6 -0
  124. package/dist/chunks/git-DF4RFFaT.js +1 -0
  125. package/dist/chunks/githubRepoPathMapping-CK56bUDe.js +1 -0
  126. package/dist/chunks/{goal-IasZVqKh.js → goal-BZG4gtnb.js} +3 -3
  127. package/dist/chunks/{grok-Dk3LyzMa.js → grok-BS57ZhyW.js} +1 -1
  128. package/dist/chunks/{grove-BE4fQ6tG.js → grove-_zlQ83yR.js} +2 -2
  129. package/dist/chunks/help-C_2tdXHC.js +1 -0
  130. package/dist/chunks/{hooks-BrKy5XWQ.js → hooks-C7Bn7MBe.js} +2 -2
  131. package/dist/chunks/hooks-DT80Arzc.js +1 -0
  132. package/dist/chunks/initReplBridge-NkZRcM77.js +1 -0
  133. package/dist/chunks/{install-CVGZ55wV.js → install-Du-DSVzj.js} +1 -1
  134. package/dist/chunks/{instrumentation-BmWotlxR.js → instrumentation-DMs3b82f.js} +5 -5
  135. package/dist/chunks/intl-D2kgJmX7.js +1 -0
  136. package/dist/chunks/{job-DEXxW_Zo.js → job-rbX1VZmp.js} +1 -1
  137. package/dist/chunks/jwtUtils-OzxN2zts.js +1 -0
  138. package/dist/chunks/keybindings-CwdC_8S0.js +2 -0
  139. package/dist/chunks/{launchLocalMemory-CLSSVFoj.js → launchLocalMemory-BLRCK1_o.js} +2 -2
  140. package/dist/chunks/{launchOnboarding-BkJfKviO.js → launchOnboarding-Al_X75Vz.js} +1 -1
  141. package/dist/chunks/{loadAgentsDir-CKSb56Gp.js → loadAgentsDir-BL93ulMm.js} +2197 -2332
  142. package/dist/chunks/loadAgentsDir-eVKq8efm.js +1 -0
  143. package/dist/chunks/loadPluginHooks-B0au35a4.js +1 -0
  144. package/dist/chunks/{localSearch-CPOnyi8I.js → localSearch-C5ipegd9.js} +1 -1
  145. package/dist/chunks/localSearch-CZlFfR_X.js +1 -0
  146. package/dist/chunks/log-Dauqle-Z.js +1 -0
  147. package/dist/chunks/{logoV2Utils-we1sfJvf.js → logoV2Utils-CkvOihX7.js} +1 -1
  148. package/dist/chunks/{magicDocs-DmKlTQvK.js → magicDocs-DLav5QK0.js} +3 -3
  149. package/dist/chunks/main-CVNWNAoh.js +513 -0
  150. package/dist/chunks/{main-ClXu1ilx.js → main-LMyE3jXY.js} +4 -4
  151. package/dist/chunks/managedEnv-CYepSnm8.js +1 -0
  152. package/dist/chunks/{managedEnv-Cl7YbYzf.js → managedEnv-DJSCuqCb.js} +1 -1
  153. package/dist/chunks/{mappers-xQC-Z4-h.js → mappers-DQxMcezy.js} +1 -1
  154. package/dist/chunks/mcp-BAbbEaBA.js +1 -0
  155. package/dist/chunks/mcp-Ct4Sum6A.js +6 -0
  156. package/dist/chunks/mcp-D5HkCqUh.js +2 -0
  157. package/dist/chunks/{memoize-FJv2HV1u.js → memoize-FeyE7JEh.js} +1 -1
  158. package/dist/chunks/memory-COa7aUbx.js +1 -0
  159. package/dist/chunks/{mode-lYTs0XHs.js → mode-Bl2RZC8M.js} +2 -2
  160. package/dist/chunks/model-B7rtZ7KV.js +1 -0
  161. package/dist/chunks/model-Bgh_r4lg.js +1 -0
  162. package/dist/chunks/model-DiuEAv6h.js +1 -0
  163. package/dist/chunks/{modelOptions-efCGKnXT.js → modelOptions-BtEZe5BB.js} +1 -1
  164. package/dist/chunks/nativeInstaller-BEwayifa.js +1 -0
  165. package/dist/chunks/omit--yH_T4rf.js +1 -0
  166. package/dist/chunks/onChangeAppState-ZdwI7boX.js +1 -0
  167. package/dist/chunks/{openai-DJLYqiRl.js → openai-DWs4D-nQ.js} +3 -3
  168. package/dist/chunks/panel-CoNfXy3K.js +1 -0
  169. package/dist/chunks/{parser-BdCj2GrE.js → parser-BH4u7QiV.js} +1 -1
  170. package/dist/chunks/parser-BMIaRErw.js +1 -0
  171. package/dist/chunks/partition-DLcW5Oo_.js +1 -0
  172. package/dist/chunks/permissions-CaucYK3s.js +3 -0
  173. package/dist/chunks/pidLock-DgOBc1Xo.js +3 -0
  174. package/dist/chunks/{plan-BeoIjNPv.js → plan-BNYDTnQd.js} +1 -1
  175. package/dist/chunks/{platform-D6IMiyqT.js → platform-B0uTQc9P.js} +1 -1
  176. package/dist/chunks/plugin-BN-of1_H.js +17 -0
  177. package/dist/chunks/pluginAutoupdate-BBU9Jn4p.js +1 -0
  178. package/dist/chunks/pluginBlocklist-DXQlbG0P.js +1 -0
  179. package/dist/chunks/pluginCliCommands-CfdVNs8D.js +1 -0
  180. package/dist/chunks/pluginFlagging-DcJ_FQuv.js +1 -0
  181. package/dist/chunks/pluginOperations-DnhzFbYI.js +2 -0
  182. package/dist/chunks/pluginStartupCheck-CKBFaMFr.js +1 -0
  183. package/dist/chunks/pluginStartupCheck-CpNB4jxG.js +1 -0
  184. package/dist/chunks/{plugins-pmipe7kE.js → plugins-CBW7kPyp.js} +4 -4
  185. package/dist/chunks/{poorMode-BxsyllUK.js → poorMode-B_xEvuEV.js} +1 -1
  186. package/dist/chunks/poorMode-yH1o41cQ.js +1 -0
  187. package/dist/chunks/print-BZOx09SU.js +26 -0
  188. package/dist/chunks/processBashCommand-dcCNCiBp.js +1 -0
  189. package/dist/chunks/processSlashCommand-YDiM63Qr.js +5 -0
  190. package/dist/chunks/prompt-CXGy0llt.js +1 -0
  191. package/dist/chunks/prompt-DovNDmcx.js +1 -0
  192. package/dist/chunks/{prompt-CybUvG8G.js → prompt-Dx7IWhBt.js} +34 -34
  193. package/dist/chunks/{promptEditor-0Ug93P2I.js → promptEditor-WCkmpejM.js} +2 -2
  194. package/dist/chunks/{protocolHandler-ClfbHTjI.js → protocolHandler-BiVWrpHi.js} +4 -4
  195. package/dist/chunks/{proxy-Blq4W6Ox.js → proxy-CVn7o19p.js} +3 -3
  196. package/dist/chunks/reconciler-C2Nd_e4n.js +1 -0
  197. package/dist/chunks/refresh-B84H2Ezd.js +1 -0
  198. package/dist/chunks/{registerProtocol-3_ozAuDK.js → registerProtocol-E0Iu5hEx.js} +2 -2
  199. package/dist/chunks/{reload-plugins-Dn1ibOiI.js → reload-plugins-D-3AUT9g.js} +1 -1
  200. package/dist/chunks/{remoteBridgeCore-Dpg6Se9C.js → remoteBridgeCore-CV6we3ZA.js} +1 -1
  201. package/dist/chunks/remoteManagedSettings-D26Q09-7.js +1 -0
  202. package/dist/chunks/rename-CSavuBIE.js +1 -0
  203. package/dist/chunks/{renderOptions-CLcco6fc.js → renderOptions-DDLbSMQU.js} +1 -1
  204. package/dist/chunks/resume-CROylN3J.js +2 -0
  205. package/dist/chunks/ripgrep-2M1GkXqJ.js +1 -0
  206. package/dist/chunks/{ripgrep-DkL2S7-I.js → ripgrep-C1ydIMzT.js} +5 -5
  207. package/dist/chunks/{runtimeObserver-DonWCJOx.js → runtimeObserver-L7pSIWBT.js} +4 -4
  208. package/dist/chunks/{runtimeObserver-B0xfyLiA.js → runtimeObserver-OU8KrZQG.js} +1 -1
  209. package/dist/chunks/sandbox-adapter-6UwMLh6e.js +1 -0
  210. package/dist/chunks/{sandbox-toggle-CSdnHWp-.js → sandbox-toggle-YrQNWGsr.js} +1 -1
  211. package/dist/chunks/searchExtraTools-Bdv5HJ74.js +1 -0
  212. package/dist/chunks/{session-BbQlh2S5.js → session-DUYsfPy_.js} +2 -2
  213. package/dist/chunks/sessionFileAccessHooks-Czen7Ejz.js +1 -0
  214. package/dist/chunks/sessionObserver-B0zucj_c.js +1 -0
  215. package/dist/chunks/{sessionObserver-XV6N0XER.js → sessionObserver-Dv3Ba8eA.js} +2 -2
  216. package/dist/chunks/sessionState-D-SaBzWD.js +11 -0
  217. package/dist/chunks/sessionStorage-BM1x51Z7.js +1 -0
  218. package/dist/chunks/{sessionTitle-E1FvsKM9.js → sessionTitle-uCuYaNif.js} +2 -2
  219. package/dist/chunks/{sessionTracing-ClGQ08jM.js → sessionTracing-Bqb3vJTt.js} +3 -3
  220. package/dist/chunks/settings-BG15IFYx.js +1 -0
  221. package/dist/chunks/settings-D4CpDv2y.js +20 -0
  222. package/dist/chunks/settingsSync-BSrpnyqo.js +1 -0
  223. package/dist/chunks/setup-C62oq4AZ.js +3 -0
  224. package/dist/chunks/{shadowedRuleDetection-B9iSx6mB.js → shadowedRuleDetection-BzAZ57p2.js} +1 -1
  225. package/dist/chunks/{shellQuote-Bth6IZgX.js → shellQuote-DS6WrivY.js} +2 -2
  226. package/dist/chunks/{sideQuestion-D2dPToW8.js → sideQuestion-CvMBBjI8.js} +3 -3
  227. package/dist/chunks/sinks-WJ7nzLQs.js +1 -0
  228. package/dist/chunks/sinks-f7qYjbKJ.js +2 -0
  229. package/dist/chunks/skillChangeDetector-U5kRU5nd.js +1 -0
  230. package/dist/chunks/{skillGapStore-DylpOKJ6.js → skillGapStore-CqaT8c0C.js} +2 -2
  231. package/dist/chunks/{skillLifecycle-GK-8eyyn.js → skillLifecycle-CnR8IqJM.js} +2 -2
  232. package/dist/chunks/skillSearchPanel-D9qrOXpI.js +21 -0
  233. package/dist/chunks/{skills-t6krW8GZ.js → skills-BgcFh0vy.js} +1 -1
  234. package/dist/chunks/startupProfiler-B4HBBbHN.js +1 -0
  235. package/dist/chunks/{startupProfiler-jeId9f2i.js → startupProfiler-CmH_aVy2.js} +3 -3
  236. package/dist/chunks/state-BemZdQIl.js +1 -0
  237. package/dist/chunks/state-D_lk6z-C.js +1 -0
  238. package/dist/chunks/{stats-BJBhl-Lc.js → stats-B8uQ-UDi.js} +1 -1
  239. package/dist/chunks/{status-BtsnKNVY.js → status-BekdWoIj.js} +1 -1
  240. package/dist/chunks/{status-nZQEar7T.js → status-D6KlRJmR.js} +2 -2
  241. package/dist/chunks/statusNoticeHelpers-BMM8_uJ1.js +1 -0
  242. package/dist/chunks/{stringUtils-CbS6OkmE.js → stringUtils-C8PaYpQF.js} +1 -1
  243. package/dist/chunks/switcher-Ck9CrXrr.js +1 -0
  244. package/dist/chunks/{switcher-77h2J5HC.js → switcher-DnAhkyIn.js} +1 -1
  245. package/dist/chunks/syncCache-ClP9aBqK.js +1 -0
  246. package/dist/chunks/{tasks-BNrdmF9p.js → tasks-Dmh6qikm.js} +1 -1
  247. package/dist/chunks/teleport-DH3IuAUQ.js +1 -0
  248. package/dist/chunks/{templateJobs-Dkv4I9c1.js → templateJobs-CxqU-s5i.js} +1 -1
  249. package/dist/chunks/{terminalSetup-DQopnSPR.js → terminalSetup-BKGcmlWp.js} +1 -1
  250. package/dist/chunks/{terminalSetup-DTGm1Eo2.js → terminalSetup-Cy19F1Js.js} +4 -4
  251. package/dist/chunks/{theme-BjpBVRf5.js → theme-U7lMFHQ0.js} +1 -1
  252. package/dist/chunks/{tmux-CMRiI6CD.js → tmux-D5EvHWi3.js} +1 -1
  253. package/dist/chunks/{toolEventObserver-D-sNBvOe.js → toolEventObserver-D9qjoVl5.js} +1 -1
  254. package/dist/chunks/toolPool-69mfSPAs.js +1 -0
  255. package/dist/chunks/trustedDevice-B6AKlsl_.js +1 -0
  256. package/dist/chunks/trustedDevice-DL0pWP4_.js +1 -0
  257. package/dist/chunks/{types-DWRxAH0E.js → types-DafcFtmb.js} +2 -2
  258. package/dist/chunks/udsClient-CWnfsgFP.js +1 -0
  259. package/dist/chunks/updateCCB-C6XftzIG.js +11 -0
  260. package/dist/chunks/{upstreamproxy-DDVMwoRi.js → upstreamproxy-CXmjxHpl.js} +2 -2
  261. package/dist/chunks/{useExitOnCtrlCDWithKeybindings-D2FvHieH.js → useExitOnCtrlCDWithKeybindings-DEEJhm_W.js} +1 -1
  262. package/dist/chunks/useMainLoopModel-6w7mhwhU.js +1 -0
  263. package/dist/chunks/useManagePlugins-CjnsO-Of.js +1 -0
  264. package/dist/chunks/{useMergedTools-B-Z9XQ6U.js → useMergedTools-DbhqKk1-.js} +1 -1
  265. package/dist/chunks/{useSearchInput-C6d6nt9S.js → useSearchInput-gUDbkLaC.js} +1 -1
  266. package/dist/chunks/useSettingsErrors-CgPad-H0.js +1 -0
  267. package/dist/chunks/{userAgent-Ng_TTjWr.js → userAgent-CU7Ndh79.js} +1 -1
  268. package/dist/chunks/util-B4oMhJKh.js +1 -0
  269. package/dist/chunks/validatePlugin-y_O_tCEL.js +1 -0
  270. package/dist/chunks/{vim-3mUqsEJm.js → vim-w37BfGZ5.js} +1 -1
  271. package/dist/chunks/{which-DznMOwny.js → which-BRWBO7Gu.js} +1 -1
  272. package/dist/chunks/windowsPaths-BY-IVNwQ.js +1 -0
  273. package/dist/chunks/windowsPaths-DtWHLjmE.js +1 -0
  274. package/dist/chunks/{workSecret-DtiFreRl.js → workSecret-BEhXgH2M.js} +1 -1
  275. package/dist/chunks/workerRegistry-Bq9bS5pw.js +6 -0
  276. package/dist/chunks/worktree-4SUJ4dtz.js +1 -0
  277. package/dist/cli.js +1 -1
  278. package/package.json +2 -3
  279. package/dist/chunks/ApproveApiKey-D05WywHU.js +0 -1
  280. package/dist/chunks/ApproveApiKey-DHAbdwkC.js +0 -1
  281. package/dist/chunks/BackgroundTasksDialog-QgFwoaaC.js +0 -2
  282. package/dist/chunks/ClaudeMdExternalIncludesDialog-DpecRCAt.js +0 -1
  283. package/dist/chunks/ConsoleOAuthFlow-D1MYL1dJ.js +0 -1
  284. package/dist/chunks/Doctor-D160J8Ad.js +0 -3
  285. package/dist/chunks/Doctor-VhJi2cmL.js +0 -1
  286. package/dist/chunks/ExitFlow-CoWHhKHJ.js +0 -2
  287. package/dist/chunks/MCPConnectionManager-DPFe4hPh.js +0 -1
  288. package/dist/chunks/MCPToolListView-BPmE0C2o.js +0 -1
  289. package/dist/chunks/MessageSelector-kOn2GaU-.js +0 -3
  290. package/dist/chunks/Messages-4EnHFeh1.js +0 -11
  291. package/dist/chunks/PromptInputHelpMenu-BvcAzbSi.js +0 -1
  292. package/dist/chunks/QueryEngine-J6ElcO16.js +0 -1
  293. package/dist/chunks/REPL-DBjbAJsm.js +0 -133
  294. package/dist/chunks/REPL-oBemMXvp.js +0 -1
  295. package/dist/chunks/RemoteSessionManager-CoIyFKKa.js +0 -2
  296. package/dist/chunks/ResumeConversation-wBG8OD9P.js +0 -1
  297. package/dist/chunks/SearchExtraToolsTool-BugrzImr.js +0 -1
  298. package/dist/chunks/Settings-DptKuJE7.js +0 -2
  299. package/dist/chunks/WelcomeV2-BWF-cJOu.js +0 -1
  300. package/dist/chunks/add-dir-DBVT1cEK.js +0 -1
  301. package/dist/chunks/agents-CnwTOlqO.js +0 -103
  302. package/dist/chunks/allErrors-DYw_q14e.js +0 -1
  303. package/dist/chunks/api-DXDXTFGa.js +0 -1
  304. package/dist/chunks/attributionTrailer-oKKrF3z8.js +0 -1
  305. package/dist/chunks/auth-CnLb6RWc.js +0 -1
  306. package/dist/chunks/auth-D-SGHS0K.js +0 -1
  307. package/dist/chunks/autonomy-dSJl0hN1.js +0 -15
  308. package/dist/chunks/autonomyPanel-Ccr9ilei.js +0 -1
  309. package/dist/chunks/backgroundHousekeeping--cs5crp7.js +0 -17
  310. package/dist/chunks/backgroundHousekeeping-CcbHitKC.js +0 -1
  311. package/dist/chunks/bg-DWloqGwk.js +0 -1
  312. package/dist/chunks/branch-CG0AKS1J.js +0 -3
  313. package/dist/chunks/bridgeConfig-Dmc1ZDev.js +0 -1
  314. package/dist/chunks/bridgeMessaging-DlczTV9X.js +0 -1
  315. package/dist/chunks/caches-1IFb6_M_.js +0 -1
  316. package/dist/chunks/caches-CB8MHqy2.js +0 -1
  317. package/dist/chunks/ccrClient-CG6HTv_n.js +0 -1
  318. package/dist/chunks/client-Crrwkw7g.js +0 -1
  319. package/dist/chunks/client-D8hKghba.js +0 -1
  320. package/dist/chunks/color-Cuq0c6xy.js +0 -1
  321. package/dist/chunks/commands-D3sESsTp.js +0 -1
  322. package/dist/chunks/compact-DIpwuBDq.js +0 -2
  323. package/dist/chunks/config-D4G8_MqJ.js +0 -3
  324. package/dist/chunks/config-q9D4hFiK.js +0 -1
  325. package/dist/chunks/context-noninteractive-Bwt9A3XD.js +0 -1
  326. package/dist/chunks/conversation-Bjo_8kia.js +0 -1
  327. package/dist/chunks/conversation-DrHZIQX2.js +0 -1
  328. package/dist/chunks/createSession-CPo6GBSb.js +0 -1
  329. package/dist/chunks/createSession-DnykRoia.js +0 -1
  330. package/dist/chunks/crossProjectResume-D2A-qjgP.js +0 -40
  331. package/dist/chunks/cwd--q1ONL7P.js +0 -1
  332. package/dist/chunks/cwd-L4wygFqJ.js +0 -1
  333. package/dist/chunks/daemon-D2vFIVOz.js +0 -2
  334. package/dist/chunks/datadog-DrmHyl3_.js +0 -1
  335. package/dist/chunks/debug-BdqxZ7rV.js +0 -39
  336. package/dist/chunks/detectRepository-DA1Q_Skc.js +0 -1
  337. package/dist/chunks/detectRepository-DvxoaPlk.js +0 -1
  338. package/dist/chunks/doctor-PWqB46xd.js +0 -1
  339. package/dist/chunks/earlyInput-xcoTbKQn.js +0 -1
  340. package/dist/chunks/entry-4JtoJONR.js +0 -14
  341. package/dist/chunks/esm-DcIr7tVd.js +0 -1
  342. package/dist/chunks/execSyncWrapper-DKuxVTaf.js +0 -1
  343. package/dist/chunks/exit-OW9g7b9A.js +0 -1
  344. package/dist/chunks/extractMemories-1VlmCGwa.js +0 -1
  345. package/dist/chunks/fast-CrvLdpy3.js +0 -1
  346. package/dist/chunks/featureCheck-CrJeuheQ.js +0 -1
  347. package/dist/chunks/featureCheck-HslM03dr.js +0 -1
  348. package/dist/chunks/firstPartyEventLogger-BBXEQUf0.js +0 -1
  349. package/dist/chunks/firstPartyEventLogger-DhEPWcit.js +0 -5
  350. package/dist/chunks/flushGate-ch-Tvwjj.js +0 -1
  351. package/dist/chunks/generateRecap-BIBVlB__.js +0 -1
  352. package/dist/chunks/generateSessionName-nZj_VvKZ.js +0 -1
  353. package/dist/chunks/git-B9uvt96d.js +0 -6
  354. package/dist/chunks/git-BfS5Hk4S.js +0 -1
  355. package/dist/chunks/githubRepoPathMapping-Cqx3pSfc.js +0 -1
  356. package/dist/chunks/help-D2-v9Ug9.js +0 -1
  357. package/dist/chunks/hooks-DGd02IKF.js +0 -1
  358. package/dist/chunks/initReplBridge-RhCAlmHE.js +0 -1
  359. package/dist/chunks/intl-cKc-V6Mq.js +0 -1
  360. package/dist/chunks/jwtUtils-C9sdGhvT.js +0 -1
  361. package/dist/chunks/keybindings-BRdSOSUD.js +0 -2
  362. package/dist/chunks/language-C0cIpKE2.js +0 -1
  363. package/dist/chunks/language-CxThoWRC.js +0 -1
  364. package/dist/chunks/loadAgentsDir-8UprzS4w.js +0 -1
  365. package/dist/chunks/loadPluginHooks-LbaURHVH.js +0 -1
  366. package/dist/chunks/localSearch-DNjbr4S9.js +0 -1
  367. package/dist/chunks/log-CTFl4qpD.js +0 -1
  368. package/dist/chunks/main-BIiwW4mM.js +0 -605
  369. package/dist/chunks/managedEnv-CpiiQx_v.js +0 -1
  370. package/dist/chunks/mcp-B_m1XBDt.js +0 -6
  371. package/dist/chunks/mcp-BiyfH9Sd.js +0 -1
  372. package/dist/chunks/mcp-BjlaPUWX.js +0 -2
  373. package/dist/chunks/memory-LN8f_p2b.js +0 -1
  374. package/dist/chunks/model-C2e73CJD.js +0 -1
  375. package/dist/chunks/model-CvmS-Esk.js +0 -1
  376. package/dist/chunks/model-DJ8mFfuR.js +0 -1
  377. package/dist/chunks/nativeInstaller-DQIFwdat.js +0 -1
  378. package/dist/chunks/omit-CLPZGevl.js +0 -1
  379. package/dist/chunks/onChangeAppState-DhBO34OK.js +0 -1
  380. package/dist/chunks/panel-q0_iT9cg.js +0 -1
  381. package/dist/chunks/panelCall-sum-3zvi.js +0 -1
  382. package/dist/chunks/parser-BcdhBGx0.js +0 -1
  383. package/dist/chunks/partition-CpfoVrg1.js +0 -1
  384. package/dist/chunks/permissions-DTb9wkAP.js +0 -3
  385. package/dist/chunks/pidLock-BR5M6RQw.js +0 -3
  386. package/dist/chunks/pipeTransport-B3TIkTAp.js +0 -1
  387. package/dist/chunks/plugin-D_dHjTud.js +0 -17
  388. package/dist/chunks/pluginAutoupdate-BHKlOOXI.js +0 -1
  389. package/dist/chunks/pluginBlocklist-D93Hd1GF.js +0 -1
  390. package/dist/chunks/pluginCliCommands-vv0wNt4O.js +0 -1
  391. package/dist/chunks/pluginFlagging-CxuRF2Vc.js +0 -1
  392. package/dist/chunks/pluginOperations-BTq4AjYB.js +0 -2
  393. package/dist/chunks/pluginStartupCheck-B6leNWq9.js +0 -1
  394. package/dist/chunks/pluginStartupCheck-DBOCHUHQ.js +0 -1
  395. package/dist/chunks/poorMode-iV1NwC5L.js +0 -1
  396. package/dist/chunks/print-CAUvczBM.js +0 -23
  397. package/dist/chunks/processBashCommand-CdeQg_c6.js +0 -1
  398. package/dist/chunks/processSlashCommand-CbkshIC6.js +0 -5
  399. package/dist/chunks/prompt-RBn4JdEg.js +0 -1
  400. package/dist/chunks/prompt-Rb8zXlDo.js +0 -1
  401. package/dist/chunks/reconciler-Drq3HSkj.js +0 -4
  402. package/dist/chunks/refresh-D8TLHO_T.js +0 -1
  403. package/dist/chunks/remoteManagedSettings-CCrq-qL-.js +0 -1
  404. package/dist/chunks/rename-CKsSc7Z3.js +0 -1
  405. package/dist/chunks/replBridgeHandle-DNC797_T.js +0 -1
  406. package/dist/chunks/resume-B1a5gLVR.js +0 -2
  407. package/dist/chunks/ripgrep-BisRODQ2.js +0 -1
  408. package/dist/chunks/sandbox-adapter-BnBOSkKJ.js +0 -1
  409. package/dist/chunks/searchExtraTools-DbgfnQkH.js +0 -1
  410. package/dist/chunks/sessionFileAccessHooks-Xfr1NiXG.js +0 -1
  411. package/dist/chunks/sessionMemory-7UOFdp29.js +0 -1
  412. package/dist/chunks/sessionMemory-fAzgAS7Q.js +0 -1
  413. package/dist/chunks/sessionMemoryUtils-DVjFw5Bd.js +0 -1
  414. package/dist/chunks/sessionObserver-Cl26OdaW.js +0 -1
  415. package/dist/chunks/sessionState-BvECKycx.js +0 -11
  416. package/dist/chunks/sessionStorage-DSj9yZkl.js +0 -1
  417. package/dist/chunks/settings-B-R9ZJNY.js +0 -1
  418. package/dist/chunks/settings-Xbq6AaD-.js +0 -20
  419. package/dist/chunks/settingsSync-NCN0a4sc.js +0 -1
  420. package/dist/chunks/setup-uZ0dSekt.js +0 -3
  421. package/dist/chunks/sinks-C7q46rvE.js +0 -2
  422. package/dist/chunks/sinks-D3bXeHlQ.js +0 -1
  423. package/dist/chunks/skillChangeDetector-C1EJ7rUL.js +0 -1
  424. package/dist/chunks/skillSearchPanel-mpaC62y4.js +0 -21
  425. package/dist/chunks/startupProfiler-BaiXZ9tr.js +0 -1
  426. package/dist/chunks/state-B4HwLt8i.js +0 -1
  427. package/dist/chunks/state-Bs5xweDL.js +0 -1
  428. package/dist/chunks/statusNoticeHelpers-DMqRGFOh.js +0 -1
  429. package/dist/chunks/switcher-B2CYzCC_.js +0 -1
  430. package/dist/chunks/syncCache-By_-buUC.js +0 -1
  431. package/dist/chunks/teleport-mdnhIZBj.js +0 -1
  432. package/dist/chunks/toolPool-Di30gn_Y.js +0 -1
  433. package/dist/chunks/trustedDevice-CupLMpO8.js +0 -1
  434. package/dist/chunks/trustedDevice-j1u2TG5U.js +0 -1
  435. package/dist/chunks/udsClient-Cm3HqYUu.js +0 -1
  436. package/dist/chunks/updateCCB-BlUAU2Vp.js +0 -11
  437. package/dist/chunks/useMainLoopModel-ylPQNj7Z.js +0 -1
  438. package/dist/chunks/useManagePlugins-BbWJNLe8.js +0 -1
  439. package/dist/chunks/useSettingsErrors-DKh4rkGi.js +0 -1
  440. package/dist/chunks/util-D-X8i5Z2.js +0 -1
  441. package/dist/chunks/validatePlugin-DSw08u76.js +0 -1
  442. package/dist/chunks/windowsPaths-1mgenSWa.js +0 -1
  443. package/dist/chunks/windowsPaths-BVztIhXM.js +0 -1
  444. package/dist/chunks/workerRegistry-DdOYjLm3.js +0 -6
  445. package/dist/chunks/worktree-BX1ULzrw.js +0 -1
@@ -1,11 +0,0 @@
1
- import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{l as r,o as i}from"./envUtils-BDhHQY0-.js";import{n as a,t as o}from"./figures-5ThXQEtq.js";import{$_ as s,Ax as c,Ca as l,Cw as u,Dw as d,Ga as f,Ix as p,Ja as m,Ju as h,Ka as g,Ku as _,La as v,Nx as y,Oa as b,Ow as x,Px as S,Qa as C,Qf as w,Ra as T,Sw as ee,Sx as E,Wa as D,Xf as te,Za as ne,Zf as re,_a as ie,aE as ae,am as oe,aw as O,bw as k,cE as A,cp as j,dp as se,ev as ce,fo as le,fp as M,ga as ue,ha as de,ip as N,iw as fe,lo as pe,lp as me,mm as he,o_ as P,om as ge,oo as _e,ov as ve,ow as ye,pm as be,pw as xe,qa as F,qu as Se,s_ as Ce,sp as we,sv as I,sy as Te,to as Ee,uo as De,up as Oe,vw as ke,wa as Ae,ww as je,xw as Me,xx as Ne}from"./loadAgentsDir-CKSb56Gp.js";import{C as Pe,Gr as L,I as R,N as Fe,P as z,Pn as Ie,Rn as Le,di as Re,fi as B,j as ze,mt as Be,ot as Ve,t as V,ui as He,xt as Ue}from"./src-P_wYS_NJ2.js";import{t as H}from"./jsx-runtime-Bb4Xn-E0.js";import{B as We,Kt as Ge}from"./state-Bs5xweDL.js";import{n as Ke,t as qe}from"./cwd-L4wygFqJ.js";import{a as Je,l as Ye,o as Xe,r as Ze,s as Qe}from"./debug-BdqxZ7rV.js";import{Ut as $e,Vt as et,g as tt,n as nt}from"./settings-Xbq6AaD-.js";import{c as rt,h as it,y as at}from"./config-D4G8_MqJ.js";import{B as ot,J as st,L as ct,R as lt}from"./log-CTFl4qpD.js";import{b as ut,f as dt,m as ft,v as pt}from"./startupProfiler-jeId9f2i.js";import{l as mt,o as ht}from"./stringUtils-CbS6OkmE.js";import{Bt as gt,Dt as _t,E as vt,Gt as yt,St as bt,Tt as xt,_ as St,_n as Ct,b as wt,vn as Tt}from"./model-C2e73CJD.js";import{bn as Et,vn as Dt}from"./prompt-CybUvG8G.js";import{C as Ot,D as kt}from"./sessionState-BvECKycx.js";import{d as At,f as jt,h as Mt,p as Nt}from"./terminalSetup-DTGm1Eo2.js";import{n as Pt,t as Ft}from"./systemTheme-Ceakddth.js";import{n as It,r as Lt}from"./PromptInputFooterSuggestions-BpC9COmh.js";import{n as Rt,t as zt}from"./useMainLoopModel-ylPQNj7Z.js";import{n as Bt,t as Vt}from"./modalContext-CUThy6Ph.js";import{n as Ht,r as Ut,t as Wt}from"./statusNoticeHelpers-DMqRGFOh.js";import{a as Gt,c as Kt,i as qt,l as Jt,n as Yt,o as Xt,r as Zt,t as Qt,u as $t}from"./logoV2Utils-we1sfJvf.js";import{homedir as en}from"os";import{relative as tn}from"path";import{fileURLToPath as nn}from"url";function rn(e,t){for(let n of e)if(!t.has(n))return!1;return!0}var an=t((()=>{}));function on(e){if(e.type!==`user`)return!1;let t=Array.isArray(e.message.content)?e.message.content[0]:void 0;return!t||typeof t==`string`||t?.type!==`text`||!t.text.includes(`<task-notification`)||T(t.text,`status`)!==`completed`?!1:T(t.text,`summary`)?.startsWith(`Background command `)??!1}function sn(e,t){if(!ce()||t)return e;let n=[],r=0;for(;r<e.length;){let t=e[r];if(on(t)){let i=0;for(;r<e.length&&on(e[r]);)i++,r++;i===1?n.push(t):n.push({...t,message:{role:`user`,content:[{type:`text`,text:`<${ot}><${ct}>completed</${ct}><${lt}>${i} background commands completed</${lt}></${ot}>`}]}})}else n.push(t),r++}return n}var cn=t((()=>{st(),Te(),s(),C()}));function ln(e){return e.type===`system`&&e.subtype===`stop_hook_summary`&&e.hookLabel!==void 0}function un(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(ln(r)){let i=r.hookLabel,a=[];for(;n<e.length;){let t=e[n];if(!ln(t)||t.hookLabel!==i)break;a.push(t),n++}a.length===1?t.push(r):t.push({...r,hookCount:a.reduce((e,t)=>e+t.hookCount,0),hookInfos:a.flatMap(e=>e.hookInfos),hookErrors:a.flatMap(e=>e.hookErrors),preventedContinuation:a.some(e=>e.preventedContinuation),hasOutput:a.some(e=>e.hasOutput),totalDurationMs:Math.max(...a.map(e=>e.totalDurationMs??0))})}else t.push(r),n++}return t}var dn=t((()=>{}));function fn(e){let t=hn.get(e);return t||(t=new Set(e.filter(e=>e.renderGroupedToolUse).map(e=>e.name)),hn.set(e,t)),t}function pn(e){if(e.type===`assistant`&&e.message?.content&&Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_use`){let t=e.message.content[0];return{messageId:e.message.id,toolUseId:t.id,toolName:t.name}}return null}function mn(e,t,n=!1){if(n)return{messages:e};let r=fn(t),i=new Map;for(let t of e){let e=pn(t);if(e&&r.has(e.toolName)){let n=`${e.messageId}:${e.toolName}`,r=i.get(n)??[];r.push(t),i.set(n,r)}}let a=new Map,o=new Set;for(let[e,t]of i)if(t.length>=2){a.set(e,t);for(let e of t){let t=pn(e);t&&o.add(t.toolUseId)}}let s=new Map;for(let t of e)if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content))for(let e of t.message.content)e.type===`tool_result`&&o.has(e.tool_use_id)&&s.set(e.tool_use_id,t);let c=[],l=new Set;for(let t of e){let e=pn(t);if(e){let t=`${e.messageId}:${e.toolName}`,n=a.get(t);if(n){if(!l.has(t)){l.add(t);let r=n[0],i=[];for(let e of n){let t=e.message.content[0].id,n=s.get(t);n&&i.push(n)}let a={type:`grouped_tool_use`,toolName:e.toolName,messages:n,results:i,displayMessage:r,uuid:`grouped-${r.uuid}`,timestamp:r.timestamp,messageId:e.messageId};c.push(a)}continue}}if(t.type===`user`&&t.message?.content&&Array.isArray(t.message.content)){let e=t.message.content.filter(e=>e.type===`tool_result`);if(e.length>0&&e.every(e=>o.has(e.tool_use_id)))continue}c.push(t)}return{messages:c}}var hn,gn=t((()=>{hn=new WeakMap}));function _n(e){let t=Cn.get(e);if(t!==void 0)return t;let n=vn(e).toLowerCase();return Cn.set(e,n),n}function vn(e){let t=``;switch(e.type){case`user`:{let n=e.message.content;if(typeof n==`string`)t=Sn.has(n)?``:n;else{let r=[];for(let t of n??[])t.type===`text`?Sn.has(t.text)||r.push(t.text):t.type===`tool_result`&&r.push(bn(e.toolUseResult));t=r.join(`
2
- `)}break}case`assistant`:{let n=e.message.content;Array.isArray(n)&&(t=n.flatMap(e=>e.type===`text`?[e.text]:e.type===`tool_use`?[yn(e.input)]:[]).join(`
3
- `));break}case`attachment`:if(e.attachment.type===`relevant_memories`)t=(e.attachment.memories??[]).map(e=>e.content).join(`
4
- `);else if(e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
5
- `)}break;case`collapsed_read_search`:e.relevantMemories&&(t=e.relevantMemories.map(e=>e.content).join(`
6
- `));break;default:break}let n=t,r=n.indexOf(`<system-reminder>`);for(;r>=0;){let e=n.indexOf(xn,r);if(e<0)break;n=n.slice(0,r)+n.slice(e+18),r=n.indexOf(`<system-reminder>`)}return n}function yn(e){if(!e||typeof e!=`object`)return``;let t=e,n=[];for(let e of[`command`,`pattern`,`file_path`,`path`,`prompt`,`description`,`query`,`url`,`skill`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`args`,`files`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(` `))}return n.join(`
7
- `)}function bn(e){if(!e||typeof e!=`object`)return typeof e==`string`?e:``;let t=e;if(typeof t.stdout==`string`){let e=typeof t.stderr==`string`?t.stderr:``;return t.stdout+(e?`
8
- `+e:``)}if(t.file&&typeof t.file==`object`&&typeof t.file.content==`string`)return t.file.content;let n=[];for(let e of[`content`,`output`,`result`,`text`,`message`]){let r=t[e];typeof r==`string`&&n.push(r)}for(let e of[`filenames`,`lines`,`results`]){let r=t[e];Array.isArray(r)&&r.every(e=>typeof e==`string`)&&n.push(r.join(`
9
- `))}return n.join(`
10
- `)}var xn,Sn,Cn,wn=t((()=>{C(),xn=`</system-reminder>`,Sn=new Set([ue,ie]),Cn=new WeakMap}));function Tn({pose:e=`default`}={}){return(0,En.jsxs)(R,{flexDirection:`column`,alignItems:`center`,children:[(0,En.jsx)(z,{color:`clawd_body`,children:` █████ `}),(0,En.jsx)(z,{color:`clawd_body`,children:`██ ● ● ██`}),(0,En.jsx)(z,{color:`clawd_body`,children:`██ ▄▄▄ ██`}),(0,En.jsx)(z,{color:`clawd_body`,children:` █ █ █ █ `})]})}var En,Dn=t((()=>{B(),V(),En=H()}));function On(e){let{title:t,lines:n,footer:r,emptyMessage:i,customContent:a}=e,o=L(t);if(a!==void 0)o=Math.max(o,a.width);else if(n.length===0&&i)o=Math.max(o,L(i));else{let e=Math.max(0,...n.map(e=>e.timestamp?L(e.timestamp):0));for(let t of n){let n=e>0?e:0,r=L(t.text)+(n>0?n+2:0);o=Math.max(o,r)}}return r&&(o=Math.max(o,L(r))),o}function kn({config:e,actualWidth:t}){let{title:n,lines:r,footer:i,emptyMessage:a,customContent:o}=e,s=Math.max(0,...r.map(e=>e.timestamp?L(e.timestamp):0));return(0,U.jsxs)(R,{flexDirection:`column`,width:t,children:[(0,U.jsx)(z,{bold:!0,color:`claude`,children:n}),o?(0,U.jsxs)(U.Fragment,{children:[o.content,i&&(0,U.jsx)(z,{dimColor:!0,italic:!0,children:ut(i,t)})]}):r.length===0&&a?(0,U.jsx)(z,{dimColor:!0,children:ut(a,t)}):(0,U.jsxs)(U.Fragment,{children:[r.map((e,n)=>{let r=Math.max(10,t-(s>0?s+2:0));return(0,U.jsxs)(z,{children:[s>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(z,{dimColor:!0,children:(e.timestamp||``).padEnd(s)}),` `]}),(0,U.jsx)(z,{children:ut(e.text,r)})]},n)}),i&&(0,U.jsx)(z,{dimColor:!0,italic:!0,children:ut(i,t)})]})]})}var U,An=t((()=>{B(),V(),pt(),U=H()}));function jn({feeds:e,maxWidth:t}){let n=e.map(e=>On(e)),r=Math.max(...n),i=Math.min(r,t);return(0,Nn.jsx)(R,{flexDirection:`column`,children:e.map((t,n)=>(0,Nn.jsxs)(Mn.Fragment,{children:[(0,Nn.jsx)(kn,{config:t,actualWidth:i}),n<e.length-1&&(0,Nn.jsx)(Pe,{color:`claude`,width:i})]},n))})}var Mn,Nn,Pn=t((()=>{Mn=n(B(),1),V(),An(),Nn=H()}));function Fn(e){let t=e.map(e=>{let t=ft(e.modified);return{text:(e.summary&&e.summary!==`No prompt`?e.summary:e.firstPrompt)||``,timestamp:t}});return{title:`Recent activity`,lines:t,footer:t.length>0?`/resume for more`:void 0,emptyMessage:`No recent activity`}}function In(e){let t=e.filter(({isEnabled:e})=>e).sort((e,t)=>Number(e.isComplete)-Number(t.isComplete)).map(({text:e,isComplete:t})=>({text:`${t?`${o.tick} `:``}${e}`})),n=qe()===en()?`Note: You have launched claude in your home directory. For the best experience, launch it in a project directory instead.`:void 0;return n&&t.push({text:n}),{title:`Tips for getting started`,lines:t}}var Ln=t((()=>{a(),Ke(),pt()}));function Rn(e,t,n){return Array.from({length:n},()=>({pose:e,offset:t}))}function zn(){let{pose:e,bounceOffset:t,onClick:n}=Bn();return(0,Hn.jsx)(R,{height:Jn,flexDirection:`column`,onClick:n,children:(0,Hn.jsx)(R,{marginTop:t,flexShrink:0,children:(0,Hn.jsx)(Tn,{pose:e})})})}function Bn(){let[e]=(0,Vn.useState)(()=>nt().prefersReducedMotion??!1),[t,n]=(0,Vn.useState)(-1),r=(0,Vn.useRef)(Un),i=()=>{e||t!==-1||(r.current=Wn[Math.floor(Math.random()*Wn.length)],n(0))};(0,Vn.useEffect)(()=>{if(t===-1)return;if(t>=r.current.length){n(-1);return}let e=setTimeout(n,Kn,qn);return()=>clearTimeout(e)},[t]);let a=r.current,o=t>=0&&t<a.length?a[t]:Gn;return{pose:o.pose,bounceOffset:o.offset,onClick:i}}var Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn=t((()=>{B(),Vn=n(B(),1),V(),tt(),Dn(),Hn=H(),Un=[...Rn(`default`,1,2),...Rn(`arms-up`,0,3),...Rn(`default`,0,1),...Rn(`default`,1,2),...Rn(`arms-up`,0,3),...Rn(`default`,0,1)],Wn=[Un,[...Rn(`look-right`,0,5),...Rn(`look-left`,0,5),...Rn(`default`,0,1)]],Gn={pose:`default`,offset:0},Kn=60,qn=e=>e+1,Jn=3}));function Xn(){let{columns:e}=Ve(),t=I(e=>e.agent),n=vt(Rt()),{version:r,cwd:i,billingType:a,agentName:o}=Xt(),s=t??o,c=Math.max(e-15,20),l=ut(r,Math.max(c-11,6)),{shouldSplit:u,truncatedModel:d,truncatedBilling:f}=Zt(n,a,c),p=s?c-1-L(s)-3:c,m=$t(i,Math.max(p,10));return(0,W.jsx)(P,{children:(0,W.jsxs)(R,{flexDirection:`row`,gap:2,alignItems:`center`,children:[ce()?(0,W.jsx)(zn,{}):(0,W.jsx)(Tn,{}),(0,W.jsxs)(R,{flexDirection:`column`,children:[(0,W.jsxs)(z,{children:[(0,W.jsx)(z,{bold:!0,children:`Work Mate`}),` `,(0,W.jsxs)(z,{dimColor:!0,children:[`v`,l]})]}),u?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(z,{dimColor:!0,children:d}),(0,W.jsx)(z,{dimColor:!0,children:f})]}):(0,W.jsxs)(z,{dimColor:!0,children:[d,` · `,f]}),(0,W.jsx)(z,{dimColor:!0,children:s?`@${s} · ${m}`:m})]})]})})}var W,Zn=t((()=>{zt(),xe(),V(),ve(),pt(),s(),Jt(),St(),Ce(),Yn(),Dn(),W=H()}));function Qn(){let e=(0,er.useMemo)($n,[]),t=(0,er.useMemo)(()=>rt().lastShownEmergencyTip,[]),n=e.tip&&e.tip!==t;return(0,er.useEffect)(()=>{n&&at(t=>t.lastShownEmergencyTip===e.tip?t:{...t,lastShownEmergencyTip:e.tip})},[n,e.tip]),n?(0,tr.jsx)(R,{paddingLeft:2,flexDirection:`column`,children:(0,tr.jsx)(z,{...e.color===`warning`?{color:`warning`}:e.color===`error`?{color:`error`}:{dimColor:!0},children:e.tip})}):null}function $n(){return nr}var er,tr,nr,rr=t((()=>{B(),er=n(B(),1),V(),it(),tr=H(),nr={tip:``,color:`dim`}}));function ir({char:e=`✻`}){let[t]=(0,ar.useState)(()=>nt().prefersReducedMotion??!1),[n,r]=(0,ar.useState)(t),i=(0,ar.useRef)(null),[a,o]=Be(n?null:50);return(0,ar.useEffect)(()=>{if(n)return;let e=setTimeout(r,cr,!0);return()=>clearTimeout(e)},[n]),n?(0,or.jsx)(R,{ref:a,children:(0,or.jsx)(z,{color:lr,children:e})}):(i.current===null&&(i.current=o),(0,or.jsx)(R,{ref:a,children:(0,or.jsx)(z,{color:h(_((o-i.current)/sr*360%360)),children:e})}))}var ar,or,sr,cr,lr,ur=t((()=>{B(),ar=n(B(),1),$e(),V(),tt(),Se(),or=H(),sr=1500,cr=sr*2,lr=h({r:153,g:153,b:153})}));function dr(){return wt()&&(rt().opus1mMergeNoticeSeenCount??0)<hr}function fr(){let[e]=(0,pr.useState)(dr);return(0,pr.useEffect)(()=>{if(!e)return;let t=(rt().opus1mMergeNoticeSeenCount??0)+1;at(e=>(e.opus1mMergeNoticeSeenCount??0)>=t?e:{...e,opus1mMergeNoticeSeenCount:t})},[e]),e?(0,mr.jsxs)(R,{paddingLeft:2,children:[(0,mr.jsx)(ir,{char:`↑`}),(0,mr.jsx)(z,{dimColor:!0,children:` Opus now defaults to 1M context · 5x more room, same pricing`})]}):null}var pr,mr,hr,gr=t((()=>{B(),pr=n(B(),1),$e(),V(),it(),St(),ur(),mr=H(),hr=6}));function _r(){let e=Kt(),t=rt().oauthAccount?.displayName??``,{columns:n}=Ve(),i=Mt(),a=ae.isSandboxingEnabled(),o=I(e=>e.agent),s=rt(),[c]=(0,vr.useState)(()=>{let e=nt().companyAnnouncements;if(!(!e||e.length===0))return s.numStartups===1?e[0]:e[Math.floor(Math.random()*e.length)]});(0,vr.useEffect)(()=>{i&&jt()},[i]),!i&&r(process.env.CLAUDE_CODE_FORCE_FULL_LOGO);let l=vt(Rt()),{version:u,cwd:d,billingType:f,agentName:p}=Xt(),m=o??p,h=ut(l,yr-20);if(!i&&!r(process.env.CLAUDE_CODE_FORCE_FULL_LOGO))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Xn,{}),(0,G.jsx)(fr,{}),Xe()&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(z,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(z,{dimColor:!0,children:[`Logging to: `,Qe()?`stderr`:Ze()]})]}),(0,G.jsx)(Qn,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(z,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(z,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Claude uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),c&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(z,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(z,{children:c})]})]});let g=Gt(n),_=Pt(rt().theme),v=` ${ze(`claude`,_)(`Work Mate`)} ${ze(`inactive`,_)(`v${u}`)} `,y=ze(`claude`,_)(` Work Mate `);if(g===`compact`){let e=qt(t);L(e)>n-4&&(e=qt(null));let r=m?n-4-1-L(m)-3:n-4,i=$t(d,Math.max(r,10));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(P,{children:(0,G.jsxs)(R,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:y,position:`top`,align:`start`,offset:1},paddingX:1,paddingY:1,alignItems:`center`,width:n,children:[(0,G.jsx)(z,{bold:!0,children:e}),(0,G.jsx)(R,{marginY:1,children:(0,G.jsx)(Tn,{})}),(0,G.jsx)(z,{dimColor:!0,children:h}),(0,G.jsx)(z,{dimColor:!0,children:f}),(0,G.jsx)(z,{dimColor:!0,children:m?`@${m} · ${i}`:i})]})}),(0,G.jsx)(fr,{}),a&&(0,G.jsx)(R,{marginTop:1,flexDirection:`column`,children:(0,G.jsx)(z,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})})]})}let b=qt(t),x=!process.env.IS_DEMO&&s.oauthAccount?.organizationName?`${h} · ${f} · ${s.oauthAccount.organizationName}`:`${h} · ${f}`,S=m?yr-1-L(m)-3:yr,C=$t(d,Math.max(S,10)),w=m?`@${m} · ${C}`:C,{leftWidth:T,rightWidth:ee}=Qt(n,g,Yt(b,w,x));return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(P,{children:(0,G.jsx)(R,{flexDirection:`column`,borderStyle:`round`,borderColor:`claude`,borderText:{content:v,position:`top`,align:`start`,offset:3},children:(0,G.jsxs)(R,{flexDirection:g===`horizontal`?`row`:`column`,paddingX:1,gap:1,children:[(0,G.jsxs)(R,{flexDirection:`column`,width:T,justifyContent:`space-between`,alignItems:`center`,minHeight:9,children:[(0,G.jsx)(R,{marginTop:1,children:(0,G.jsx)(z,{bold:!0,children:b})}),(0,G.jsx)(Tn,{}),(0,G.jsxs)(R,{flexDirection:`column`,alignItems:`center`,children:[(0,G.jsx)(z,{dimColor:!0,children:x}),(0,G.jsx)(z,{dimColor:!0,children:w})]})]}),g===`horizontal`&&(0,G.jsx)(R,{height:`100%`,borderStyle:`single`,borderColor:`claude`,borderDimColor:!0,borderTop:!1,borderBottom:!1,borderLeft:!1}),g===`horizontal`&&(0,G.jsx)(jn,{feeds:i?[In(At()),Fn(e)]:[Fn(e)],maxWidth:ee})]})})}),(0,G.jsx)(fr,{}),Xe()&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsx)(z,{color:`warning`,children:`Debug mode enabled`}),(0,G.jsxs)(z,{dimColor:!0,children:[`Logging to: `,Qe()?`stderr`:Ze()]})]}),(0,G.jsx)(Qn,{}),process.env.CLAUDE_CODE_TMUX_SESSION&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[(0,G.jsxs)(z,{dimColor:!0,children:[`tmux session: `,process.env.CLAUDE_CODE_TMUX_SESSION]}),(0,G.jsx)(z,{dimColor:!0,children:process.env.CLAUDE_CODE_TMUX_PREFIX_CONFLICTS?`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} ${process.env.CLAUDE_CODE_TMUX_PREFIX} d (press prefix twice - Claude uses ${process.env.CLAUDE_CODE_TMUX_PREFIX})`:`Detach: ${process.env.CLAUDE_CODE_TMUX_PREFIX} d`})]}),c&&(0,G.jsxs)(R,{paddingLeft:2,flexDirection:`column`,children:[!process.env.IS_DEMO&&s.oauthAccount?.organizationName&&(0,G.jsxs)(z,{dimColor:!0,children:[`Message from `,s.oauthAccount.organizationName,`:`]}),(0,G.jsx)(z,{children:c})]}),a&&(0,G.jsx)(R,{paddingLeft:2,flexDirection:`column`,children:(0,G.jsx)(z,{color:`warning`,children:`Your bash commands will be sandboxed. Disable with /sandbox.`})})]})}var vr,G,yr,br=t((()=>{B(),V(),xe(),Jt(),pt(),Dn(),Pn(),Ln(),it(),Ft(),tt(),Je(),vr=n(B(),1),Nt(),Zn(),Ce(),i(),rr(),gr(),A(),ve(),zt(),St(),G=H(),yr=50}));function xr({message:e,isTranscriptMode:t}){let n=e.message?.content,r=Array.isArray(n)?n:[];if(!(t&&e.type===`assistant`&&e.message?.model&&r.some(e=>e?.type===`text`)))return null;let i=e.message.model;return(0,Sr.jsx)(R,{minWidth:L(i)+8,children:(0,Sr.jsx)(z,{dimColor:!0,children:i})})}var Sr,Cr=t((()=>{B(),V(),Sr=H()}));function wr({message:e,isTranscriptMode:t}){if(!(t&&e.timestamp&&e.type===`assistant`&&Array.isArray(e.message.content)&&e.message.content.some(e=>e.type===`text`)))return null;let n=new Date(e.timestamp).toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,hour12:!0});return(0,Tr.jsx)(R,{minWidth:L(n),children:(0,Tr.jsx)(z,{dimColor:!0,children:n})})}var Tr,Er=t((()=>{B(),V(),Tr=H()}));function Dr(e,t,n,r){for(let i=t+1;i<e.length;i++){let t=e[i];if(t?.type===`assistant`){let e=Pr(t.message.content);if(e?.type===`thinking`||e?.type===`redacted_thinking`||e?.type===`tool_use`&&(me(e.name,e.input,n).isCollapsible||r.has(e.id)))continue;return!0}if(!(t?.type===`system`||t?.type===`attachment`)&&!(t?.type===`user`&&Pr(t.message.content)?.type===`tool_result`)){if(t?.type===`grouped_tool_use`){let e=Pr(t.messages[0]?.message.content)?.input;if(me(t.toolName,e,n).isCollapsible)continue}return!0}}return!1}function Or({message:e,isUserContinuation:t,hasContentAfter:n,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,streamingToolUseIDs:s,screen:c,canAnimate:l,lastThinkingBlockId:u,latestBashOutputUUID:d,columns:p,isLoading:m,lookups:h,shouldCollapseDiffs:_}){let v=c===`transcript`,y=e.type===`grouped_tool_use`,b=e.type===`collapsed_read_search`,x=b&&(se(e,o)||m&&!n),S=y?e.displayMessage:b?j(e):e,C=y||b?[]:f(e,h),w=Xi(e,s,o,y||b?de:g(e,h),c,h),T=!1;if(l)if(y)T=e.messages.some(e=>{let t=Pr(e.message.content);return t?.type===`tool_use`&&o.has(t.id)});else if(b)T=se(e,o);else{let t=F(e);T=!t||o.has(t)}let ee=v&&S.type===`assistant`&&Array.isArray(S.message.content)&&S.message.content.some(e=>e.type===`text`)&&(S.timestamp||S.message.model),E=(0,Nr.jsx)(te,{message:e,lookups:h,addMargin:!ee,containerWidth:ee?void 0:p,tools:r,commands:i,verbose:a,inProgressToolUseIDs:o,progressMessagesForMessage:C,shouldAnimate:T,shouldShowDot:!0,isTranscriptMode:v,isStatic:w,isActiveCollapsedGroup:x,isUserContinuation:t,lastThinkingBlockId:u,latestBashOutputUUID:d,shouldCollapseDiffs:_});return ee?(0,Nr.jsx)(P,{children:(0,Nr.jsxs)(R,{width:p,flexDirection:`column`,children:[(0,Nr.jsxs)(R,{flexDirection:`row`,justifyContent:`flex-end`,gap:1,marginTop:1,children:[(0,Nr.jsx)(wr,{message:S,isTranscriptMode:v}),(0,Nr.jsx)(xr,{message:S,isTranscriptMode:v})]}),E]})}):(0,Nr.jsx)(P,{children:E})}function kr(e,t){if(e.type===`grouped_tool_use`)return e.messages.some(e=>{let n=Pr(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return Oe(e).some(e=>t.has(e));let n=F(e);return!!n&&t.has(n)}function Ar(e,t){if(e.type===`grouped_tool_use`)return e.messages.every(e=>{let n=Pr(e.message.content);return n?.type===`tool_use`&&t.has(n.id)});if(e.type===`collapsed_read_search`)return Oe(e).every(e=>t.has(e));if(e.type===`assistant`){let n=Pr(e.message.content);if(n?.type===`server_tool_use`)return t.has(n.id)}let n=F(e);return!n||t.has(n)}function jr(e,t){if(e.message!==t.message||e.screen!==t.screen||e.verbose!==t.verbose||e.message.type===`collapsed_read_search`&&t.screen!==`transcript`||e.columns!==t.columns||e.latestBashOutputUUID===e.message.uuid!=(t.latestBashOutputUUID===t.message.uuid)||e.lastThinkingBlockId!==t.lastThinkingBlockId&&re(t.message))return!1;let n=kr(e.message,e.streamingToolUseIDs),r=Ar(e.message,e.lookups.resolvedToolUseIDs);return!(n||!r)}var Mr,Nr,Pr,Fr,Ir=t((()=>{Mr=n(B(),1),V(),M(),C(),w(),Nr=H(),Cr(),sa(),Er(),Ce(),Pr=e=>{if(!Array.isArray(e))return;let t=e[0];if(!(t==null||typeof t==`string`))return t},Fr=Mr.memo(Or,jr)}));function Lr(e){return e.type===`attachment`&&Rr.has(e.attachment.type)}var Rr,zr=t((()=>{Rr=new Set(`hook_success.hook_additional_context.hook_cancelled.command_permissions.agent_mention.budget_usd.critical_system_reminder.edited_image_file.edited_text_file.opened_file_in_ide.output_style.plan_mode.plan_mode_exit.plan_mode_reentry.structured_output.todo_reminder.context_efficiency.deferred_tools_delta.mcp_instructions_delta.token_usage.max_turns_reached.task_reminder.auto_mode.auto_mode_exit.output_token_usage.verify_plan_reminder.current_session_memory.compaction_reminder.date_change`.split(`.`))}));function Br(e){return Kr.filter(t=>t.isActive(e))}var K,Vr,Hr,Ur,Wr,Gr,Kr,qr=t((()=>{V(),B(),p(),a(),Ke(),pt(),gt(),Ut(),K=H(),Vr={id:`large-memory-files`,type:`warning`,isActive:e=>y(e.memoryFiles).length>0,render:e=>(0,K.jsx)(K.Fragment,{children:y(e.memoryFiles).map(e=>{let t=e.path.startsWith(qe())?tn(qe(),e.path):e.path;return(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Large `,(0,K.jsx)(z,{bold:!0,children:t}),` will impact performance (`,dt(e.content.length),` chars > `,dt(c),`)`,(0,K.jsx)(z,{dimColor:!0,children:` · /memory to edit`})]})]},e.path)})})},Hr={id:`claude-ai-external-token`,type:`warning`,isActive:()=>{let e=_t();return yt()&&(e.source===`ANTHROPIC_AUTH_TOKEN`||e.source===`apiKeyHelper`)},render:()=>{let e=_t();return(0,K.jsxs)(R,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Using `,e.source,` instead of Claude account subscription token. Either unset`,` `,e.source,", or run `claude /logout`."]})]})}},Ur={id:`api-key-conflict`,type:`warning`,isActive:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0});return!!xt()&&(e===`ANTHROPIC_API_KEY`||e===`apiKeyHelper`)},render:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0});return(0,K.jsxs)(R,{flexDirection:`row`,marginTop:1,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Using `,e,` instead of Console key. Either unset `,e,", or run `claude /logout`."]})]})}},Wr={id:`both-auth-methods`,type:`warning`,isActive:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0}),t=_t();return e!==`none`&&t.source!==`none`&&!(e===`apiKeyHelper`&&t.source===`apiKeyHelper`)},render:()=>{let{source:e}=bt({skipRetrievingKeyFromApiKeyHelper:!0}),t=_t();return(0,K.jsxs)(R,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Auth conflict: Both a token (`,t.source,`) and an API key (`,e,`) are set. This may lead to unexpected behavior.`]})]}),(0,K.jsxs)(R,{flexDirection:`column`,marginLeft:3,children:[(0,K.jsxs)(z,{color:`warning`,children:[`· Trying to use `,t.source===`claude.ai`?`claude.ai`:t.source,`?`,` `,e===`ANTHROPIC_API_KEY`?`Unset the ANTHROPIC_API_KEY environment variable, or claude /logout then say "No" to the API key approval before login.`:e===`apiKeyHelper`?`Unset the apiKeyHelper setting.`:`claude /logout`]}),(0,K.jsxs)(z,{color:`warning`,children:[`· Trying to use `,e,`?`,` `,t.source===`claude.ai`?`claude /logout to sign out of claude.ai.`:`Unset the ${t.source} environment variable.`]})]})]})}},Gr={id:`large-agent-descriptions`,type:`warning`,isActive:e=>Ht(e.agentDefinitions)>Wt,render:e=>{let t=Ht(e.agentDefinitions);return(0,K.jsxs)(R,{flexDirection:`row`,children:[(0,K.jsx)(z,{color:`warning`,children:o.warning}),(0,K.jsxs)(z,{color:`warning`,children:[`Large cumulative agent descriptions will impact performance (~`,dt(t),` tokens > `,dt(Wt),`)`,(0,K.jsx)(z,{dimColor:!0,children:` · /agents to manage`})]})]})}},Kr=[Vr,Gr,Hr,Ur,Wr]}));function Jr({agentDefinitions:e}={}){let t={config:rt(),agentDefinitions:e,memoryFiles:(0,Xr.use)(S())},n=Br(t);return n.length===0?null:(0,Zr.jsx)(R,{flexDirection:`column`,paddingLeft:1,children:n.map(e=>(0,Zr.jsx)(Yr.Fragment,{children:e.render(t)},e.id))})}var Yr,Xr,Zr,Qr=t((()=>{Yr=n(B(),1),Xr=n(B(),1),V(),p(),it(),qr(),Zr=H()}));function $r(e,t,n){let r=(0,q.useRef)(new Map),i=(0,q.useRef)(0),a=(0,q.useRef)(0),o=(0,q.useRef)({arr:new Float64Array,version:-1,n:-1}),s=(0,q.useRef)(new Map),c=(0,q.useRef)(new Map),l=(0,q.useRef)(n),u=(0,q.useRef)(!1),d=(0,q.useRef)(null),f=(0,q.useRef)(0);if(l.current!==n){let e=l.current/n;l.current=n;for(let[t,n]of r.current)r.current.set(t,Math.max(1,Math.round(n*e)));i.current++,u.current=!0,f.current=2}let p=f.current>0?d.current:null,m=(0,q.useRef)(0),h=(0,q.useRef)(null);(0,q.useSyncExternalStore)((0,q.useCallback)(t=>e.current?.subscribe(t)??si,[e]),()=>{let t=e.current;if(!t)return NaN;let n=t.getScrollTop()+t.getPendingDelta(),r=Math.floor(n/ri);return t.isSticky()?~r:r});let g=e.current?.getScrollTop()??-1,_=e.current?.getPendingDelta()??0,v=e.current?.getViewportHeight()??0,y=e.current?.isSticky()??!0;(0,q.useMemo)(()=>{let e=new Set(t),n=!1;for(let t of r.current.keys())e.has(t)||(r.current.delete(t),n=!0);for(let t of c.current.keys())e.has(t)||c.current.delete(t);n&&i.current++},[t]);let b=t.length;if(o.current.version!==i.current||o.current.n!==b){let e=o.current.arr.length>=b+1?o.current.arr:new Float64Array(b+1);e[0]=0;for(let n=0;n<b;n++)e[n+1]=e[n]+(r.current.get(t[n])??ei);o.current={arr:e,version:i.current,n:b}}let x=o.current.arr,S=x[b],C,w;if(p)[C,w]=p,C=Math.min(C,b),w=Math.min(w,b);else if(v===0||g<0)C=Math.max(0,b-ni),w=b;else{if(y){let e=v+ti;for(C=b;C>0&&S-x[C-1]<e;)C--;w=b}else{let e=m.current,n=v*3,i=Math.min(g,g+_),a=Math.max(g,g+_),o=a-i,c=o>n&&_<0?a-n:i,l=c+Math.min(o,n),u=Math.max(0,c-e),f=l-e,p=u-ti;{let e=0,t=b;for(;e<t;){let n=e+t>>1;x[n+1]<=p?e=n+1:t=n}C=e}{let e=d.current;if(e&&e[0]<C)for(let n=e[0];n<Math.min(C,e[1]);n++){let e=t[n];if(s.current.has(e)&&!r.current.has(e)){C=n;break}}}let h=v+2*ti,y=Math.min(b,C+ai),S=0;for(w=C;w<y&&(S<h||x[w]<f+v+ti);)S+=r.current.get(t[w])??ii,w++}let e=v+2*ti,n=Math.max(0,w-ai),i=0;for(let e=C;e<w;e++)i+=r.current.get(t[e])??ii;for(;C>n&&i<e;)C--,i+=r.current.get(t[C])??ii;let o=d.current,c=Math.abs(g-a.current)+Math.abs(_);if(o&&c>v*2){let[e,t]=o;C<e-oi&&(C=e-oi),w>t+oi&&(w=t+oi),C>w&&(w=Math.min(C+oi,b))}a.current=g}f.current>0?f.current--:d.current=[C,w];let T=(0,q.useDeferredValue)(C),ee=(0,q.useDeferredValue)(w),E=C<T?T:C,D=w>ee?ee:w;if((E>D||y)&&(E=C,D=w),_>0&&(D=w),D-E>ai){let e=(x[E]+x[D])/2;g-m.current<e?D=E+ai:E=D-ai}let te=m.current,ne=x[E],re=E===0?0:ne+te,ie=D===b?1/0:Math.max(ne,x[D]-v)+te;(0,q.useLayoutEffect)(()=>{y?e.current?.setClampBounds(void 0,void 0):e.current?.setClampBounds(re,ie)}),(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 ae=(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},[]),oe=(0,q.useCallback)(e=>{let n=s.current.get(t[e])?.yogaNode;return!n||n.getComputedWidth()===0?-1:n.getComputedTop()},[t]),O=(0,q.useCallback)(e=>s.current.get(t[e])??null,[t]),k=(0,q.useCallback)(e=>r.current.get(t[e]),[t]),A=(0,q.useCallback)(t=>{let n=o.current;t<0||t>=n.n||e.current?.scrollTo(n.arr[t]+m.current)},[e]),j=S-x[D];return{range:[E,D],topSpacer:ne,bottomSpacer:j,measureRef:ae,spacerRef:h,offsets:x,getItemTop:oe,getItemElement:O,getItemHeight:k,scrollToIndex:A}}var q,ei,ti,ni,ri,ii,ai,oi,si,ci=t((()=>{q=n(B(),1),ei=3,ti=40,ni=30,ri=20,ii=1,ai=200,oi=25,si=()=>{}}));function li({children:e}){let[t,n]=(0,J.useState)(null),[r,i]=(0,J.useState)(null);return(0,mi.jsx)(gi.Provider,{value:n,children:(0,mi.jsx)(vi.Provider,{value:i,children:(0,mi.jsx)(hi.Provider,{value:t,children:(0,mi.jsx)(_i.Provider,{value:r,children:e})})})})}function ui(){return(0,J.useContext)(hi)}function di(){return(0,J.useContext)(_i)}function fi(e){let t=(0,J.useContext)(gi);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}function pi(e){let t=(0,J.useContext)(vi);(0,J.useEffect)(()=>{if(t)return t(e),()=>t(null)},[t,e])}var J,mi,hi,gi,_i,vi,yi=t((()=>{J=n(B(),1),mi=H(),hi=(0,J.createContext)(null),gi=(0,J.createContext)(null),_i=(0,J.createContext)(null),vi=(0,J.createContext)(null)}));function bi(e){let[t,n]=(0,Y.useState)(null),r=(0,Y.useRef)(e);r.current=e;let i=(0,Y.useRef)(null),a=(0,Y.useCallback)(()=>{n(null)},[]),o=(0,Y.useCallback)(e=>{let t=Math.max(0,e.getScrollHeight()-e.getViewportHeight());e.getScrollTop()+e.getPendingDelta()>=t||i.current===null&&(i.current=e.getScrollHeight(),n(r.current))},[]),s=(0,Y.useCallback)(e=>{e&&e.scrollToBottom()},[]);return(0,Y.useEffect)(()=>{t===null?i.current=null:e<t&&(i.current=null,n(null))},[e,t]),{dividerIndex:t,dividerYRef:i,onScrollAway:o,onRepin:a,jumpToNew:s,shiftDivider:(0,Y.useCallback)((e,t)=>{n(t=>t===null?null:t+e),i.current!==null&&(i.current+=t)},[])}}function xi(e,t){let n=0,r=!1;for(let i=t;i<e.length;i++){let t=e[i];if(t.type===`progress`||t.type===`assistant`&&!Si(t))continue;let a=t.type===`assistant`;a&&!r&&n++,r=a}return n}function Si(e){if(e.type!==`assistant`||!Array.isArray(e.message.content))return!1;for(let t of e.message.content)if(typeof t!=`string`&&t.type===`text`&&t.text.trim()!==``)return!0;return!1}function Ci(e,t){if(t===null)return;let n=t;for(;n<e.length&&(e[n]?.type===`progress`||Lr(e[n]));)n++;let r=e[n]?.uuid;if(!r)return;let i=xi(e,t);return{firstUnseenUuid:r,count:Math.max(1,i)}}function wi({scrollable:e,bottom:t,overlay:n,bottomFloat:r,modal:i,modalScrollRef:a,scrollRef:o,dividerYRef:s,hidePill:c=!1,hideSticky:l=!1,newMessageCount:u=0,onPillClick:d}){let{rows:f,columns:p}=Ve(),[m,h]=(0,Y.useState)(null),g=(0,Y.useMemo)(()=>({setStickyPrompt:h}),[]),_=(0,Y.useSyncExternalStore)((0,Y.useCallback)(e=>o?.current?.subscribe(e)??(()=>{}),[o]),()=>{let e=o?.current,t=s?.current;return!e||t==null?!1:e.getScrollTop()+e.getPendingDelta()+e.getViewportHeight()<t});if((0,Y.useLayoutEffect)(()=>{if(!ce())return;let e=Le.get(process.stdout);if(e)return e.onHyperlinkClick=e=>{if(e.startsWith(`file:`))try{ye(nn(e))}catch{}else O(e)},()=>{e.onHyperlinkClick=void 0}},[]),ce()){let s=l?null:m,h=s!=null&&s!==`clicked`&&n==null?s:null,v=s!=null&&n==null;return(0,X.jsxs)(li,{children:[(0,X.jsx)(R,{flexDirection:`row`,flexGrow:1,overflow:`hidden`,width:`100%`,children:(0,X.jsxs)(R,{flexDirection:`column`,flexGrow:1,width:p,overflow:`hidden`,children:[(0,X.jsxs)(R,{flexGrow:1,flexDirection:`column`,overflow:`hidden`,children:[h&&(0,X.jsx)(Ei,{text:h.text,onClick:h.scrollTo}),(0,X.jsxs)(Ue,{ref:o,flexGrow:1,flexDirection:`column`,paddingTop:+!v,stickyScroll:!0,children:[(0,X.jsx)(Ai,{value:g,children:e}),n]}),!c&&_&&n==null&&(0,X.jsx)(Ti,{count:u,onClick:d}),r!=null&&(0,X.jsx)(R,{position:`absolute`,bottom:0,right:0,opaque:!0,children:r})]}),(0,X.jsxs)(R,{flexDirection:`column`,flexShrink:0,width:`100%`,maxHeight:`50%`,children:[(0,X.jsx)(Di,{}),(0,X.jsx)(Oi,{}),(0,X.jsx)(R,{flexDirection:`column`,width:`100%`,flexGrow:1,overflowY:`hidden`,children:t})]})]})}),i!=null&&(0,X.jsx)(Vt,{value:{rows:f-ki-1,columns:p-4,scrollRef:a??null},children:(0,X.jsxs)(R,{position:`absolute`,bottom:0,left:0,right:0,maxHeight:f-ki,flexDirection:`column`,overflow:`hidden`,opaque:!0,children:[(0,X.jsx)(R,{flexShrink:0,children:(0,X.jsx)(z,{color:`permission`,children:`▔`.repeat(p)})}),(0,X.jsx)(R,{flexDirection:`column`,paddingX:2,flexShrink:0,overflow:`hidden`,children:i})]})})]})}return(0,X.jsxs)(X.Fragment,{children:[e,t,n,i]})}function Ti({count:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(R,{position:`absolute`,bottom:0,left:0,right:0,justifyContent:`center`,children:(0,X.jsx)(R,{onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(z,{backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,dimColor:!0,children:[` `,e>0?`${e} new ${mt(e,`message`)}`:`Jump to bottom`,` `,o.arrowDown,` `]})})})}function Ei({text:e,onClick:t}){let[n,r]=(0,Y.useState)(!1);return(0,X.jsx)(R,{flexShrink:0,width:`100%`,height:1,paddingRight:1,backgroundColor:n?`userMessageBackgroundHover`:`userMessageBackground`,onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:(0,X.jsxs)(z,{color:`subtle`,wrap:`truncate-end`,children:[o.pointer,` `,e]})})}function Di(){let e=ui();return!e||e.suggestions.length===0?null:(0,X.jsx)(R,{position:`absolute`,bottom:`100%`,left:0,right:0,paddingX:2,paddingTop:1,flexDirection:`column`,opaque:!0,children:(0,X.jsx)(It,{suggestions:e.suggestions,selectedSuggestion:e.selectedSuggestion,maxColumnWidth:e.maxColumnWidth,overlay:!0})})}function Oi(){let e=di();return e?(0,X.jsx)(R,{position:`absolute`,bottom:`100%`,left:0,right:0,opaque:!0,children:e}):null}var Y,X,ki,Ai,ji=t((()=>{a(),Y=n(B(),1),Bt(),yi(),xe(),V(),fe(),s(),ht(),zr(),Lt(),X=H(),ki=2,Ai=(0,Y.createContext)({setStickyPrompt:()=>{}})}));function Mi(e){let t=Bi.get(e);if(t!==void 0)return t;let n=_n(e);return Bi.set(e,n),n}function Ni(e){let t=Hi.get(e);if(t!==void 0)return t;let n=Pi(e);return Hi.set(e,n),n}function Pi(e){let t=null;if(e.type===`user`){if(e.isMeta||e.isVisibleInTranscriptOnly)return null;let n=e.message.content[0];if(n?.type!==`text`)return null;t=n.text??null}else if(e.type===`attachment`&&e.attachment.type===`queued_command`&&e.attachment.commandMode!==`task-notification`&&!e.attachment.isMeta){let n=e.attachment.prompt;t=typeof n==`string`?n:n.flatMap(e=>e.type===`text`?[e.text??``]:[]).join(`
11
- `)}if(t===null)return null;let n=u(t);return n.startsWith(`<`)||n===``?null:n}function Fi({itemKey:e,msg:t,idx:n,measureRef:r,expanded:i,hovered:a,clickable:o,onClickK:s,onEnterK:c,onLeaveK:l,renderItem:u}){return(0,Ri.jsx)(R,{ref:r(e),flexDirection:`column`,backgroundColor:i?`userMessageBackgroundHover`:void 0,paddingBottom:i?1:void 0,onClick:o?e=>s(t,e.cellIsBlank):void 0,onMouseEnter:o?()=>c(e):void 0,onMouseLeave:o?()=>l(e):void 0,children:(0,Ri.jsx)(Fe.Provider,{value:a&&!i?`text`:void 0,children:u(t,n)})})}function Ii({messages:e,scrollRef:t,columns:n,itemKey:r,renderItem:i,onItemClick:a,isItemClickable:o,isItemExpanded:s,extractSearchText:c=Mi,trackStickyPrompt:l,selectedIndex:u,cursorNavRef:d,setCursor:f,jumpRef:p,onSearchMatchesChange:m,scanElement:h,setPositions:g}){let _=(0,Z.useRef)([]),v=(0,Z.useRef)(e),y=(0,Z.useRef)(r);if(y.current!==r||e.length<_.current.length||e[0]!==v.current[0])_.current=e.map(e=>r(e));else for(let t=_.current.length;t<e.length;t++)_.current.push(r(e[t]));v.current=e,y.current=r;let b=_.current,{range:x,topSpacer:S,bottomSpacer:C,measureRef:w,spacerRef:T,offsets:E,getItemTop:D,getItemElement:te,getItemHeight:ne,scrollToIndex:re}=$r(t,b,n),[ie,ae]=x,oe=(0,Z.useCallback)(t=>ne(t)!==0&&ee(e[t]),[ne,e]);(0,Z.useImperativeHandle)(d,()=>{let n=e=>f?.({uuid:e.uuid,msgType:e.type,expanded:!1,toolName:je(e)?.name}),r=u??-1,i=(t,r,i=oe)=>{for(let a=t;a>=0&&a<e.length;a+=r)if(i(a))return n(e[a]),!0;return!1},a=t=>oe(t)&&e[t].type===`user`;return{enterCursor:()=>i(e.length-1,-1,a),navigatePrev:()=>i(r-1,-1),navigateNext:()=>{i(r+1,1)||(t.current?.scrollToBottom(),f?.(null))},navigatePrevUser:()=>i(r-1,-1,a),navigateNextUser:()=>i(r+1,1,a),navigateTop:()=>i(0,1),navigateBottom:()=>i(e.length-1,-1),getSelected:()=>r>=0?e[r]??null:null}},[e,u,f,oe]);let O=(0,Z.useRef)({offsets:E,start:ie,getItemElement:te,getItemTop:D,messages:e,scrollToIndex:re});O.current={offsets:E,start:ie,getItemElement:te,getItemTop:D,messages:e,scrollToIndex:re},(0,Z.useEffect)(()=>{if(u===void 0)return;let e=O.current,n=e.getItemElement(u);n?t.current?.scrollToElement(n,1):e.scrollToIndex(u)},[u,t]);let k=(0,Z.useRef)(null),A=(0,Z.useRef)({msgIdx:-1,positions:[]}),j=(0,Z.useRef)(-1),se=(0,Z.useRef)(0),ce=(0,Z.useRef)(0),le=(0,Z.useRef)(()=>{}),M=(0,Z.useRef)(()=>{}),ue=(0,Z.useRef)({matches:[],ptr:0,screenOrd:0,prefixSum:[]}),de=(0,Z.useRef)(-1),N=(0,Z.useRef)(!1);function fe(e){let t=O.current.getItemTop(e);return Math.max(0,t-zi)}function pe(e){let n=t.current,{msgIdx:r,positions:i}=A.current;if(!n||i.length===0||r<0){g?.(null);return}let a=Math.max(0,Math.min(e,i.length-1)),o=i[a],s=O.current.getItemTop(r),c=n.getViewportTop(),l=s-n.getScrollTop(),u=n.getViewportHeight(),d=c+l+o.row;(d<c||d>=c+u)&&(n.scrollTo(Math.max(0,s+o.row-zi)),l=s-n.getScrollTop(),d=c+l+o.row),g?.({positions:i,rowOffset:c+l,currentIdx:a});let f=ue.current,p=f.prefixSum.at(-1)??0,h=(f.prefixSum[f.ptr]??0)+a+1;m?.(p,h),Ye(`highlight(i=${r}, ord=${a}/${i.length}): pos={row:${o.row},col:${o.col}} lo=${l} screenRow=${d} badge=${h}/${p}`)}M.current=pe;let[me,he]=(0,Z.useState)(0),P=(0,Z.useCallback)(()=>he(e=>e+1),[]);(0,Z.useEffect)(()=>{let e=k.current;if(!e)return;let{idx:n,wantLast:r,tries:i}=e,a=t.current;if(!a)return;let{getItemElement:o,getItemTop:s,scrollToIndex:c}=O.current,l=o(n),u=l?.yogaNode?.getComputedHeight()??0;if(!l||u===0){if(i>1){k.current=null,Ye(`seek(i=${n}): no mount after scrollToIndex, skip`),le.current(r?-1:1);return}k.current={idx:n,wantLast:r,tries:i+1},c(n),P();return}k.current=null,a.scrollTo(Math.max(0,s(n)-zi));let d=h?.(l)??[];if(A.current={msgIdx:n,positions:d},Ye(`seek(i=${n} t=${i}): ${d.length} positions`),d.length===0){if(++se.current>20){se.current=0;return}le.current(r?-1:1);return}se.current=0;let f=r?d.length-1:0;ue.current.screenOrd=f,j.current=-1,M.current(f);let p=ce.current;p&&(ce.current=0,le.current(p))},[me]);function ge(e,n){let r=t.current;if(!r)return;let i=O.current,{getItemElement:a,scrollToIndex:o}=i;if(e<0||e>=i.messages.length)return;g?.(null),A.current={msgIdx:-1,positions:[]},k.current={idx:e,wantLast:n,tries:0};let s=a(e),c=s?.yogaNode?.getComputedHeight()??0;s&&c>0?r.scrollTo(fe(e)):o(e),P()}function _e(e){let t=ue.current,{matches:n,prefixSum:r}=t,i=r.at(-1)??0;if(n.length===0)return;if(k.current){ce.current=e;return}j.current<0&&(j.current=t.ptr);let{positions:a}=A.current,o=t.screenOrd+e;if(o>=0&&o<a.length){t.screenOrd=o,pe(o),j.current=-1;return}let s=(t.ptr+e+n.length)%n.length;if(s===j.current){g?.(null),j.current=-1,Ye(`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;m?.(i,c)}le.current=_e,(0,Z.useImperativeHandle)(p,()=>({jumpToIndex:e=>{let n=t.current;n&&n.scrollTo(fe(e))},setSearchQuery:e=>{k.current=null,A.current={msgIdx:-1,positions:[]},j.current=-1,g?.(null);let n=e.toLowerCase(),r=[],i=[0];if(n){let e=O.current.messages;for(let t=0;t<e.length;t++){let a=c(e[t]),o=a.indexOf(n),s=0;for(;o>=0;)s++,o=a.indexOf(n,o+n.length);s>0&&(r.push(t),i.push(i.at(-1)+s))}}let a=i.at(-1),o=0,s=t.current,{offsets:l,start:u,getItemTop:d}=O.current,f=d(u),p=f>=0?f-l[u]:0;if(r.length>0&&s){let t=de.current>=0?de.current:s.getScrollTop(),n=1/0;for(let e=0;e<r.length;e++){let i=Math.abs(p+l[r[e]]-t);i<=n&&(n=i,o=e)}Ye(`setSearchQuery('${e}'): ${r.length} msgs · ptr=${o} msgIdx=${r[o]} curTop=${t} origin=${p}`)}ue.current={matches:r,ptr:o,screenOrd:0,prefixSum:i},r.length>0?ge(r[o],!0):de.current>=0&&s&&s.scrollTo(de.current),m?.(a,r.length>0?i[o+1]??a:0)},nextMatch:()=>_e(1),prevMatch:()=>_e(-1),setAnchor:()=>{let e=t.current;e&&(de.current=e.getScrollTop())},disarmSearch:()=>{g?.(null),k.current=null,A.current={msgIdx:-1,positions:[]},j.current=-1},warmSearchIndex:async()=>{if(N.current)return 0;let e=O.current.messages,t=0,n=performance.now();for(let n=0;n<e.length;n+=500){await Tt(0);let r=performance.now(),i=Math.min(n+500,e.length);for(let t=n;t<i;t++)c(e[t]);t+=performance.now()-r}let r=Math.round(performance.now()-n);return Ye(`warmSearchIndex: ${e.length} msgs · work=${Math.round(t)}ms wall=${r}ms chunks=${Math.ceil(e.length/500)}`),N.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)},[]),F=(0,Z.useCallback)(e=>{be.current.setHoveredKey(e)},[]),Se=(0,Z.useCallback)(e=>{be.current.setHoveredKey(t=>t===e?null:t)},[]);return(0,Ri.jsxs)(Ri.Fragment,{children:[(0,Ri.jsx)(R,{ref:T,height:S,flexShrink:0}),e.slice(ie,ae).map((e,t)=>{let n=ie+t,r=b[n],c=!!a&&(o?.(e)??!0),l=c&&ve===r,u=s?.(e);return(0,Ri.jsx)(Fi,{itemKey:r,msg:e,idx:n,measureRef:w,expanded:u,hovered:l,clickable:c,onClickK:xe,onEnterK:F,onLeaveK:Se,renderItem:i},r)}),C>0&&(0,Ri.jsx)(R,{height:C,flexShrink:0}),l&&(0,Ri.jsx)(Li,{messages:e,start:ie,end:ae,offsets:E,getItemTop:D,getItemElement:te,scrollRef:t})]})}function Li({messages:e,start:t,end:n,offsets:r,getItemTop:i,getItemElement:a,scrollRef:o}){let{setStickyPrompt:s}=(0,Z.useContext)(Ai);(0,Z.useSyncExternalStore)((0,Z.useCallback)(e=>o.current?.subscribe(e)??Ui,[o]),()=>{let e=o.current;if(!e)return NaN;let t=e.getScrollTop()+e.getPendingDelta();return e.isSticky()?-1-t:t});let c=o.current?.isSticky()??!0,l=Math.max(0,(o.current?.getScrollTop()??0)+(o.current?.getPendingDelta()??0)),u=t,d=-1;for(let e=n-1;e>=t;e--){let t=i(e);if(t>=0){if(t<l)break;d=t}u=e}let f=-1,p=null;if(u>0&&!c)for(let t=u-1;t>=0;t--){let n=Ni(e[t]);if(n===null)continue;let r=i(t);if(!(r>=0&&r+1>=l)){f=t,p=n;break}}let m=d>=0?d-r[u]:0,h=f>=0?Math.max(0,m+r[f]):-1,g=(0,Z.useRef)({idx:-1,tries:0}),_=(0,Z.useRef)(`none`),v=(0,Z.useRef)(-1);return(0,Z.useEffect)(()=>{if(g.current.idx>=0)return;if(_.current===`armed`){_.current=`force`;return}let e=_.current===`force`;if(_.current=`none`,!e&&v.current===f)return;if(v.current=f,p===null){s(null);return}let t=p.trimStart(),n=t.search(/\n\s*\n/),r=(n>=0?t.slice(0,n):t).slice(0,Vi).replace(/\s+/g,` `).trim();if(r===``){s(null);return}let i=f,c=h;s({text:r,scrollTo:()=>{s(`clicked`),_.current=`armed`;let e=a(i);e?o.current?.scrollToElement(e,1):(o.current?.scrollTo(c),g.current={idx:i,tries:0})}})}),(0,Z.useEffect)(()=>{if(g.current.idx<0)return;let e=a(g.current.idx);e?(o.current?.scrollToElement(e,1),g.current={idx:-1,tries:0}):++g.current.tries>5&&(g.current={idx:-1,tries:0})}),null}var Z,Ri,zi,Bi,Vi,Hi,Ui,Wi=t((()=>{B(),Z=n(B(),1),ci(),V(),N(),ji(),Ri=H(),Je(),Ct(),wn(),Me(),zi=3,Bi=new WeakMap,Vi=500,Hi=new WeakMap,Ui=()=>{}}));function Gi(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 Ki(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 qi(e,t,n=ra,r=ia){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 Ji(e){return(e.type===`assistant`||e.type===`user`?F(e):null)??e.uuid}function Yi(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Xi(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=F(e);return i?t.has(i)||n.has(i)||ne(i,`PostToolUse`,a)?!1:rn(r,a.resolvedToolUseIDs):!0}case`system`:return e.subtype!==`api_error`;case`grouped_tool_use`:return e.messages.every(e=>{let t=e.message.content[0];return t?.type===`tool_use`&&a.resolvedToolUseIDs.has(t.id)});case`collapsed_read_search`:return!1;default:return!0}}var Zi,Q,$,Qi,$i,ea,ta,na,ra,ia,aa,oa,sa=t((()=>{Re(),Zi=n(B(),1),Q=n(B(),1),an(),Ge(),$e(),xe(),V(),d(),Et(),Ne(),cn(),dn(),M(),it(),i(),s(),gn(),C(),ht(),wn(),br(),he(),Ir(),Me(),ge(),zr(),Ce(),Qr(),$=H(),Wi(),Qi=Zi.memo(function({agentDefinitions:e}){return(0,$.jsx)(P,{children:(0,$.jsxs)(R,{flexDirection:`column`,gap:1,children:[(0,$.jsx)(_r,{}),(0,$.jsx)(Zi.Suspense,{fallback:null,children:(0,$.jsx)(Jr,{agentDefinitions:e})})]})})}),$i=(Ot(),e(kt)),ea=null,ta=null,na=30,ra=200,ia=50,aa=({messages:e,tools:t,commands:n,verbose:i,toolJSX:a,toolUseConfirmQueue:o,inProgressToolUseIDs:s,isMessageSelectorVisible:c,conversationId:u,screen:d,streamingToolUses:f,showAllInTranscript:p=!1,agentDefinitions:h,hideLogo:g=!1,isLoading:_,hidePastThinking:y=!1,streamingThinking:S,streamingText:C,isBriefOnly:w=!1,unseenDivider:T,scrollRef:ee,trackStickyPrompt:te,jumpRef:ne,onSearchMatchesChange:re,scanElement:ie,setPositions:ae,disableRenderCap:O=!1,cursor:A=null,setCursor:j,cursorNavRef:se,renderRange:M})=>{let{columns:ue}=Ve(),de=x(`transcript:toggleShowAll`,`Transcript`,`Ctrl+E`),N=(0,Q.useMemo)(()=>_e(e).filter(Ee),[e]),fe=(0,Q.useMemo)(()=>S?S.isStreaming?!0:S.streamingEndedAt?Date.now()-S.streamingEndedAt<3e4:!1:!1,[S]),{lastThinkingBlockId:me,latestBashOutputUUID:he}=(0,Q.useMemo)(()=>{let e=null,t=null,n=y&&!fe;y&&fe&&(e=`streaming`);for(let r=N.length-1;r>=0;r--){let i=N[r];if(i?.type===`user`){let r=i.message.content;if(!t){for(let e of r)if(e.type===`text`){let n=e.text??``;if(n.startsWith(`<bash-stdout`)||n.startsWith(`<bash-stderr`)){t=i.uuid;break}}}n&&!e&&(r.some(e=>e.type===`tool_result`)||(e=`no-thinking`))}else if(i?.type===`assistant`&&n&&!e){let t=i.message.content;for(let n=t.length-1;n>=0;n--)if(t[n]?.type===`thinking`){e=`${i.uuid}:${n}`;break}}if(e!==null&&t)break}return y||(e=null),{lastThinkingBlockId:e,latestBashOutputUUID:t}},[N,y,fe]),P=(0,Q.useMemo)(()=>m(N),[N]),ge=(0,Q.useMemo)(()=>f.filter(e=>!s.has(e.contentBlock.id)&&!P.has(e.contentBlock.id)),[f,s,P]),ve=(0,Q.useMemo)(()=>ge.flatMap(e=>{let t=b({content:[e.contentBlock]});return t.uuid=v(e.contentBlock.id,0),_e([t])}),[ge]),ye=d===`transcript`,xe=(0,Q.useMemo)(()=>r(process.env.CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL),[]),F=ee!=null&&!xe,Se=ye&&!p&&!F,Ce=(0,Q.useRef)(null),I=(0,Q.useRef)(null),{collapsed:Te,lookups:Oe,hasTruncatedMessages:je,hiddenMessageCount:Me}=(0,Q.useMemo)(()=>{let e=pe((i||ce()?N:D(N,{includeSnipped:!0})).filter(e=>e.type!==`progress`&&!Lr(e)&&De(e,ye)),ve),n=[ea,ta].filter(e=>e!==null),r=[ea].filter(e=>e!==null),a=n.length>0&&!ye?w?Gi(e,n):r.length>0?Ki(e,r):e:e,o=Se?a.slice(-30):a,s=Se&&a.length>na,{messages:c}=mn(o,t,i),u=sn(un(we(c,t)),i),d=Ae(N,o),f=(()=>{let e=o.at(-1);return e?.type===`assistant`?e.message?.id:void 0})(),p;if(I.current&&I.current.key===d)p=I.current.lookups;else if(I.current&&N.length>=I.current.normalizedCount&&o.length>=I.current.messageCount&&I.current.lastAssistantMsgId===f){let e=le(I.current.lookups,I.current.normalizedCount,I.current.messageCount,N,o);e?(p=e,I.current={key:d,lookups:p,normalizedCount:N.length,messageCount:o.length,lastAssistantMsgId:f}):(p=l(N,o),I.current={key:d,lookups:p,normalizedCount:N.length,messageCount:o.length,lastAssistantMsgId:f})}else p=l(N,o),I.current={key:d,lookups:p,normalizedCount:N.length,messageCount:o.length,lastAssistantMsgId:f};let m=e.length-na;return{collapsed:u,lookups:p,hasTruncatedMessages:s,hiddenMessageCount:m}},[i,N,ye,ve,Se,t,w]),Ne=(0,Q.useMemo)(()=>{let e=!F&&!O?qi(Te,Ce):0;return M?Te.slice(M[0],M[1]):e>0?Te.slice(e):Te},[Te,M,F,O]),L=(0,Q.useMemo)(()=>new Set(f.map(e=>e.contentBlock.id)),[f]),{dividerBeforeIndex:Fe,selectedIdx:Le}=(0,Q.useMemo)(()=>{if(!T&&!A)return{dividerBeforeIndex:-1,selectedIdx:-1};let e=-1,t=-1,n=T?.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&&A&&i.uuid===A.uuid&&(t=r),e!==-1&&t!==-1)break}return{dividerBeforeIndex:e,selectedIdx:t}},[T,A,Ne]),[Re,B]=(0,Q.useState)(()=>new Set),ze=(0,Q.useCallback)(e=>{let t=Ji(e);B(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},[]),Be=(0,Q.useCallback)(e=>Re.size>0&&Re.has(Ji(e)),[Re]),V=(0,Q.useRef)(Oe);V.current=Oe;let Ue=(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&&E(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=V.current.toolUseByToolUseID.get(n.tool_use_id??``)?.name;return(r?Dt(t,r):void 0)?.isResultTruncated?.(e.toolUseResult)??!1},[t]),H=(!a||!!a.shouldContinueAnimation)&&!o.length&&!c,Ge=s.size>0,{progress:Ke}=Ie(),qe=(0,Q.useRef)(null),Je=rt().terminalProgressBarEnabled&&!We()&&!($i?.isProactiveActive()??!1);(0,Q.useEffect)(()=>{let e=Je?Ge?`indeterminate`:`completed`:null;qe.current!==e&&(qe.current=e,Ke(e))},[Ke,Je,Ge]),(0,Q.useEffect)(()=>()=>Ke(null),[Ke]);let Ye=(0,Q.useCallback)(e=>`${e.uuid}-${u}`,[u]),Xe=(e,r)=>{let a=r>0?Ne[r-1]?.type:void 0,o=e.type===`user`&&a===`user`,c=e.type===`collapsed_read_search`&&(!!C||Dr(Ne,r,t,L)),l=Ne.length-1-r>0,u=Ye(e),f=(0,$.jsx)(Fr,{message:e,isUserContinuation:o,hasContentAfter:c,tools:t,commands:n,verbose:i||Be(e)||A?.expanded===!0&&r===Le,inProgressToolUseIDs:s,streamingToolUseIDs:L,screen:d,canAnimate:H,lastThinkingBlockId:me,latestBashOutputUUID:he,columns:ue,isLoading:_,lookups:Oe,shouldCollapseDiffs:l},u),p=(0,$.jsx)(k.Provider,{value:r===Le,children:f},u);return T&&r===Fe?[(0,$.jsx)(R,{marginTop:1,children:(0,$.jsx)(Pe,{title:`${T.count} new ${mt(T.count,`message`)}`,width:ue,color:`inactive`})},`unseen-divider`),p]:p},Ze=(0,Q.useRef)(new WeakMap),Qe=(0,Q.useCallback)(e=>{let n=Ze.current.get(e);if(n!==void 0)return n;let r=_n(e);if(e.type===`user`&&e.toolUseResult&&Array.isArray(e.message.content)){let n=e.message.content.find(e=>e.type===`tool_result`);if(n&&`tool_use_id`in n){let i=Oe.toolUseByToolUseID.get(n.tool_use_id),a=(i&&Dt(t,i.name))?.extractSearchText?.(e.toolUseResult);a!==void 0&&(r=a)}}let i=r.toLowerCase();return Ze.current.set(e,i),i},[t,Oe]);return(0,$.jsxs)($.Fragment,{children:[!g&&!(M&&M[0]>0)&&(0,$.jsx)(Qi,{agentDefinitions:h}),je&&(0,$.jsx)(Pe,{title:`${de} to show ${He.bold(Me)} previous messages`,width:ue}),ye&&p&&Me>0&&!O&&(0,$.jsx)(Pe,{title:`${de} to hide ${He.bold(Me)} previous messages`,width:ue}),F?(0,$.jsx)(ke.Provider,{value:!0,children:(0,$.jsx)(Ii,{messages:Ne,scrollRef:ee,columns:ue,itemKey:Ye,renderItem:Xe,onItemClick:ze,isItemClickable:Ue,isItemExpanded:Be,trackStickyPrompt:te,selectedIndex:Le>=0?Le:void 0,cursorNavRef:se,setCursor:j,jumpRef:ne,onSearchMatchesChange:re,scanElement:ie,setPositions:ae,extractSearchText:Qe})}):Ne.flatMap(Xe),C&&!w&&(0,$.jsx)(R,{alignItems:`flex-start`,flexDirection:`row`,marginTop:1,width:`100%`,children:(0,$.jsxs)(R,{flexDirection:`row`,children:[(0,$.jsx)(R,{minWidth:2,children:(0,$.jsx)(z,{color:`text`,children:et})}),(0,$.jsx)(R,{flexDirection:`column`,children:(0,$.jsx)(be,{children:C})})]})}),fe&&S&&!w&&(0,$.jsx)(R,{marginTop:1,children:(0,$.jsx)(oe,{param:{type:`thinking`,thinking:S.thinking},addMargin:!1,isTranscriptMode:!0,verbose:i,hideInTranscript:!1})})]})},oa=Zi.memo(aa,(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`&&Yi(e.inProgressToolUseIDs,t.inProgressToolUseIDs))continue;if(r===`unseenDivider`){let n=e.unseenDivider,r=t.unseenDivider;if(n?.firstUnseenUuid===r?.firstUnseenUuid&&n?.count===r?.count)continue}if(r===`tools`){let n=e.tools,r=t.tools;if(n.length===r.length&&n.every((e,t)=>e.name===r[t]?.name))continue}return!1}return!0})}));export{ji as a,fi as c,Ci as i,pi as l,sa as n,bi as o,wi as r,yi as s,oa as t};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Dw as t,Fw as n,Ow as r,Pw as i}from"./loadAgentsDir-CKSb56Gp.js";import{I as a,P as o,fi as s,t as c}from"./src-P_wYS_NJ2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{Gt as u,Jt as d}from"./settings-Xbq6AaD-.js";import{c as f,h as p}from"./config-D4G8_MqJ.js";import{i as m,o as h}from"./platform-D6IMiyqT.js";import{et as g,rt as _,tt as v}from"./model-C2e73CJD.js";import{a as y,i as b,r as x}from"./terminalSetup-DTGm1Eo2.js";function S(){return f().editorMode===`vim`}function C(){return u.terminal===`Apple_Terminal`&&process.platform===`darwin`||y()?`shift + ⏎ for newline`:x()?`\\⏎ for newline`:`backslash (\\) + return (⏎) for newline`}function w(e,t){return t.ctrl||t.meta||t.escape||t.return||t.tab||t.backspace||t.delete||t.upArrow||t.downArrow||t.leftArrow||t.rightArrow||t.pageUp||t.pageDown||t.home||t.end?!1:e.length>0&&!/^\s/.test(e)&&!e.startsWith(`\x1B`)}var T=e((()=>{b(),p(),d()}));function E(e){return e.replace(/\+/g,` + `)}function D(e){let{dimColor:t,fixedWidth:i,gap:s,paddingX:c}=e,l=E(r(`app:toggleTranscript`,`Global`,`ctrl+o`)),u=E(r(`app:toggleTodos`,`Global`,`ctrl+t`)),d=E(r(`chat:undo`,`Chat`,`ctrl+_`)),f=E(r(`chat:stash`,`Chat`,`ctrl+s`)),p=E(r(`chat:cycleMode`,`Chat`,`shift+tab`)),h=E(r(`chat:modelPicker`,`Chat`,`alt+p`)),g=E(r(`chat:fastMode`,`Chat`,`alt+o`)),y=E(r(`chat:externalEditor`,`Chat`,`ctrl+g`));E(r(`app:toggleTerminal`,`Global`,`meta+j`));let b=E(r(`chat:imagePaste`,`Chat`,`ctrl+v`));return(0,O.jsxs)(a,{paddingX:c,flexDirection:`row`,gap:s,children:[(0,O.jsxs)(a,{flexDirection:`column`,width:i?24:void 0,children:[(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`! for bash mode`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`/ for commands`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`@ for file paths`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`& for background`})}),(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`/btw for side question`})})]}),(0,O.jsxs)(a,{flexDirection:`column`,width:i?35:void 0,children:[(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`double tap esc to clear input`})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[p,` to auto-accept edits`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[l,` for verbose output`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[u,` to toggle tasks`]})}),null,(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:C()})})]}),(0,O.jsxs)(a,{flexDirection:`column`,children:[(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[d,` to undo`]})}),m()!==`windows`&&(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`ctrl + z to suspend`})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[b,` to paste images`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[h,` to switch model`]})}),_()&&v()&&(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[g,` to toggle fast mode`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[f,` to stash prompt`]})}),(0,O.jsx)(a,{children:(0,O.jsxs)(o,{dimColor:t,children:[y,` to edit in $EDITOR`]})}),n()&&(0,O.jsx)(a,{children:(0,O.jsx)(o,{dimColor:t,children:`/keybindings to customize`})})]})]})}var O,k=e((()=>{s(),c(),h(),i(),t(),g(),T(),O=l()}));export{S as a,w as i,k as n,T as r,D as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-DaDcL9Zw.js";import{l as t,o as n,s as r}from"./envUtils-BDhHQY0-.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{$ as o,AS as s,Ar as c,Cy as l,Dc as u,Do as d,Ec as f,Gn as ee,Gv as te,Ji as p,Jv as ne,Ki as m,Q as h,Qa as g,Qp as re,Sa as ie,Ta as _,To as v,Ty as y,Ux as b,Vx as x,Wn as S,Yp as C,Zv as w,aD as ae,bn as T,bv as oe,cc as se,cr as E,ct as ce,db as le,dh as D,fb as ue,iD as O,kS as k,lc as A,lh as j,lt as M,nt as de,oc as fe,oi as N,rx as pe,sc as P,wy as F,xn as me,xv as he,zg as I}from"./loadAgentsDir-CKSb56Gp.js";import{Kr as L,qr as ge}from"./src-P_wYS_NJ2.js";import{$ as R,Ct as z,Dt as B,Kt as _e,mt as V,qt as ve}from"./state-Bs5xweDL.js";import{n as ye,t as be}from"./cwd-L4wygFqJ.js";import{M as xe,c as Se,h as Ce,j as we}from"./config-D4G8_MqJ.js";import{J as H,i as Te,o as Ee}from"./log-CTFl4qpD.js";import{C as De,Y as U,_ as Oe,et as W,u as ke}from"./model-C2e73CJD.js";import{bn as G,ot as Ae,rt as je,xn as Me}from"./prompt-CybUvG8G.js";import{U as Ne,gt as Pe,vt as Fe}from"./sessionState-BvECKycx.js";import{a as Ie,n as Le,r as Re}from"./mappers-xQC-Z4-h.js";import{c as ze,n as Be,o as Ve,r as K,s as He}from"./MessageSelector-kOn2GaU-.js";import{n as Ue,t as We}from"./systemTheme-Ceakddth.js";import{randomUUID as q}from"crypto";n(),i(),L(),_e(),ye(),H(),Ee(),xe(),G(),Ce(),W(),Ne(),O(),b(),pe(),ue(),Ae(),w(),D(),f(),v(),g(),p(),c(),S(),T(),o(),M(),y(),s(),Oe(),I(),C();async function Ge({tools:e,mainLoopModel:t,additionalWorkingDirectories:n,mcpClients:r,customSystemPrompt:i}){let[a,o,s]=await Promise.all([i===void 0?ce(e,t,n,r):Promise.resolve([]),F(),i===void 0?l():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:ee,userContext:te,systemContext:p}=await Ge({tools:e,mainLoopModel:d,additionalWorkingDirectories:Array.from(f.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:n,customSystemPrompt:s}),ne=Pe([...s===void 0?ee:[s],...c?[c]:[]]),m=r.at(-1),h=m?.type===`assistant`&&m.message.stop_reason===null?r.slice(0,-1):r;return{systemPrompt:ne,userContext:te,systemContext:p,toolUseContext:{options:{commands:t,debug:!1,mainLoopModel:d,tools:e,verbose:!1,thinkingConfig:l??(re()===!1?{type:`disabled`}:{type:`adaptive`}),mcpClients:n,mcpResources:{},isNonInteractiveSession:!0,agentDefinitions:{activeAgents:u,allAgents:[]},customSystemPrompt:s,appendSystemPrompt:c},abortController:k(),readFileState:i,getAppState:a,setAppState:o,messages:h,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:()=>{},updateAttributionState:()=>{}},forkContextMessages:h}}s(),Oe(),oe(),I(),We(),C(),Le(),P();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??k(),this.permissionDenials=[],this.readFileState=e.readFileCache,this.totalUsage=Fe}async*submitMessage(e,n){let{cwd:i,commands:a,tools:o,mcpClients:s,verbose:c=!1,thinkingConfig:l,maxTurns:f,maxBudgetUsd:p,taskBudget:g,canUseTool:v,customSystemPrompt:y,appendSystemPrompt:b,userSpecifiedModel:x,fallbackModel:S,jsonSchema:C,getAppState:w,setAppState:T,replayUserMessages:oe=!1,includePartialMessages:ce=!1,agents:D=[],setSDKStatus:ue,orphanedPermission:O}=this.config;this.discoveredSkillNames.clear(),this.permissionDenials=[],he(i);let k=!ve(),M=Date.now(),pe=async(e,t,n,r,i,a)=>{let o=await v(e,t,n,r,i,a);return o.behavior!==`allow`&&this.permissionDenials.push({type:`permission_denial`,tool_name:He(e.name),tool_use_id:i,tool_input:t}),o},P=w(),F=x?De(x):ke(),I=l||(re()===!1?{type:`disabled`}:{type:`adaptive`});j(`before_getSystemPrompt`);let L=typeof y==`string`?y:void 0,{defaultSystemPrompt:_e,userContext:ye,systemContext:xe}=await Ge({tools:o,mainLoopModel:F,additionalWorkingDirectories:Array.from(P.toolPermissionContext.additionalWorkingDirectories.keys()),mcpClients:s,customSystemPrompt:L});j(`after_getSystemPrompt`);let Ce={...ye},H=L!==void 0&&we()?await ee():null,Ee=Pe([...L===void 0?_e:[L],...H?[H]:[],...b?[b]:[]]),Oe=o.some(e=>Me(e,je));C&&Oe&&me(T,V());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:c,mainLoopModel:F,thinkingConfig:I,mcpClients:s,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,agentDefinitions:{activeAgents:D,allAgents:[]},theme:Ue(Se().theme),maxBudgetUsd:p},getAppState:w,setAppState:T,abortController:this.abortController,readFileState:this.readFileState,nestedMemoryAttachmentTriggers:new Set,loadedNestedMemoryPaths:this.loadedNestedMemoryPaths,dynamicSkillDirTriggers:new Set,discoveredSkillNames:this.discoveredSkillNames,setInProgressToolUseIDs:()=>{},setResponseLength:()=>{},updateFileHistoryState:e=>{T(t=>{let n=e(t.fileHistory);return n===t.fileHistory?t:{...t,fileHistory:n}})},updateAttributionState:e=>{T(t=>{let n=e(t.attribution);return n===t.attribution?t:{...t,attribution:n}})},setSDKStatus:ue};if(O&&!this.hasHandledOrphanedPermission){this.hasHandledOrphanedPermission=!0;for await(let e of fe(O,o,this.mutableMessages,W))yield e}let{messages:G,shouldQuery:Ae,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(k&&G.length>0){let e=N(K);r()||(await e,(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await E())}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=oe?Ke:[];T(e=>({...e,toolPermissionContext:{...e.toolPermissionContext,alwaysAllowRules:{...e.toolPermissionContext.alwaysAllowRules,command:Ne}}}));let Y=Le??F;W={messages:K,setMessages:()=>{},onChangeAPIKey:()=>{},handleElicitation:this.config.handleElicitation,options:{commands:a,debug:!1,tools:o,verbose:c,mainLoopModel:Y,thinkingConfig:I,mcpClients:s,mcpResources:{},ideInstallationStatus:null,isNonInteractiveSession:!0,customSystemPrompt:y,appendSystemPrompt:b,theme:Ue(Se().theme),agentDefinitions:{activeAgents:D,allAgents:[]},maxBudgetUsd:p},getAppState:w,setAppState:T,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:ue},j(`before_skills_plugins`);let[Je,{enabled:Ye}]=await Promise.all([m(be()),d()]);if(j(`after_skills_plugins`),yield Ve({tools:o,mcpClients:s,model:Y,permissionMode:P.toolPermissionContext.mode,commands:a,agents:D,skills:Je,plugins:Ye,fastMode:P.fastMode}),j(`system_message_yielded`),!Ae){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:ge(e.message.content)},session_id:V(),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:V(),uuid:e.uuid,compact_metadata:Ie(t.compactMetadata)}}k&&(await N(K),(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await E()),yield{type:`result`,subtype:`success`,is_error:!1,duration_ms:Date.now()-M,duration_api_ms:z(),num_turns:K.length-1,result:Be??``,stop_reason:null,session_id:V(),total_cost_usd:B(),usage:this.totalUsage,modelUsage:R(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,P.fastMode),uuid:q()};return}if(te()&&k){let e=qe()?.selectableUserMessagesFilter??(e=>!0);G.filter(e).forEach(e=>{ne(e=>{T(t=>({...t,fileHistory:e(t.fileHistory)}))},e.uuid)})}let X=Fe,Z=1,Xe=!1,Ze,Q=null,Qe=Te().at(-1),$e=C?_(this.mutableMessages,je):0;for await(let e of u({messages:K,systemPrompt:Ee,userContext:Ce,systemContext:xe,canUseTool:pe,toolUseContext:W,fallbackModel:S,querySource:`sdk`,maxTurns:f,taskBudget:g})){if(e.type===`assistant`||e.type===`user`||e.type===`system`&&e.subtype===`compact_boundary`){if(k&&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 N(this.mutableMessages.slice(0,e+1))}}if(K.push(e),k&&(e.type===`assistant`?N(K):await N(K)),!Xe&&J.length>0){Xe=!0;for(let e of J)e.type===`user`&&(yield{type:`user`,message:e.message,session_id:V(),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*A(t);break}case`progress`:{let t=e;this.mutableMessages.push(t),k&&(K.push(t),N(K)),yield*A(t);break}case`user`:{let t=e;this.mutableMessages.push(t),yield*A(t);break}case`stream_event`:{let t=e.event;if(t.type===`message_start`){X=Fe;let e=t.message;X=de(X,e.usage)}if(t.type===`message_delta`){X=de(X,t.usage);let e=t.delta;e.stop_reason!=null&&(Q=e.stop_reason)}t.type===`message_stop`&&(this.totalUsage=h(this.totalUsage,X)),ce&&(yield{type:`stream_event`,event:t,session_id:V(),parent_tool_use_id:null,uuid:q()});break}case`attachment`:{let n=e;this.mutableMessages.push(n),k&&(K.push(n),N(K));let r=n.attachment;if(r.type===`structured_output`)Ze=r.data;else if(r.type===`max_turns_reached`){k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await E(),yield{type:`result`,subtype:`error_max_turns`,duration_ms:Date.now()-M,duration_api_ms:z(),is_error:!0,num_turns:r.turnCount,stop_reason:Q,session_id:V(),total_cost_usd:B(),usage:this.totalUsage,modelUsage:R(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,P.fastMode),uuid:q(),errors:[`Reached maximum number of turns (${r.maxTurns})`]};return}else oe&&r.type===`queued_command`&&(yield{type:`user`,message:{role:`user`,content:r.prompt},session_id:V(),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:V(),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:le(e.error),session_id:V(),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:V(),uuid:t.uuid};break}}if(p!==void 0&&B()>=p){k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await E(),yield{type:`result`,subtype:`error_max_budget_usd`,duration_ms:Date.now()-M,duration_api_ms:z(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:V(),total_cost_usd:B(),usage:this.totalUsage,modelUsage:R(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,P.fastMode),uuid:q(),errors:[`Reached maximum budget ($${p}). Increase the limit with --max-budget-usd or start a new session.`]};return}if(e.type===`user`&&C){let e=_(this.mutableMessages,je)-$e,n=parseInt(process.env.MAX_STRUCTURED_OUTPUT_RETRIES||`5`,10);if(e>=n){k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await E(),yield{type:`result`,subtype:`error_max_structured_output_retries`,duration_ms:Date.now()-M,duration_api_ms:z(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:V(),total_cost_usd:B(),usage:this.totalUsage,modelUsage:R(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,P.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`?ae($.message.content)?.type??`none`:`n/a`;if(k&&(t(process.env.CLAUDE_CODE_EAGER_FLUSH)||t(process.env.CLAUDE_CODE_IS_COWORK))&&await E(),!se($,Q)){yield{type:`result`,subtype:`error_during_execution`,duration_ms:Date.now()-M,duration_api_ms:z(),is_error:!0,num_turns:Z,stop_reason:Q,session_id:V(),total_cost_usd:B(),usage:this.totalUsage,modelUsage:R(),permission_denials:this.permissionDenials,fast_mode_state:U(Y,P.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=ae($.message.content);e?.type===`text`&&!ie.has(e.text)&&(nt=e.text),rt=!!$.isApiErrorMessage}yield{type:`result`,subtype:`success`,is_error:rt,duration_ms:Date.now()-M,duration_api_ms:z(),num_turns:Z,result:nt,stop_reason:Q,session_id:V(),total_cost_usd:B(),usage:this.totalUsage,modelUsage:R(),permission_denials:this.permissionDenials,structured_output:Ze,fast_mode_state:U(Y,P.fastMode),uuid:q()}}interrupt(){this.abortController.abort()}resetAbortController(){this.abortController=k()}getAbortSignal(){return this.abortController.signal}getMessages(){return this.mutableMessages}getReadFileState(){return this.readFileState}getSessionId(){return V()}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:ee=[],getReadFileCache:te,setReadFileCache:p,customSystemPrompt:ne,appendSystemPrompt:m,userSpecifiedModel:h,fallbackModel:g,jsonSchema:re,getAppState:ie,setAppState:_,abortController:v,replayUserMessages:y=!1,includePartialMessages:b=!1,handleElicitation:S,agents:C=[],setSDKStatus:w,orphanedPermission:ae}){let T=new J({cwd:i,tools:a,commands:e,mcpClients:o,agents:C??[],canUseTool:f,getAppState:ie,setAppState:_,initialMessages:ee,readFileCache:x(te()),customSystemPrompt:ne,appendSystemPrompt:m,userSpecifiedModel:h,fallbackModel:g,thinkingConfig:c,maxTurns:l,maxBudgetUsd:u,taskBudget:d,jsonSchema:re,verbose:s,handleElicitation:S,replayUserMessages:y,includePartialMessages:b,setSDKStatus:w,abortController:v,orphanedPermission:ae});try{yield*T.submitMessage(t,{uuid:n,isMeta:r})}finally{p(T.getReadFileState())}}export{Y as n,Ke as r,J as t};