claude-code-best 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-C7od6sFQ.js → AddWorkspaceDirectory-V2tF7iCY.js} +1 -1
  2. package/dist/chunks/{App-EfHjElWP.js → App-DLdRpU7c.js} +1 -1
  3. package/dist/chunks/ApproveApiKey-B7_TCGwt.js +1 -0
  4. package/dist/chunks/{ApproveApiKey-CSz0291w.js → ApproveApiKey-DPws3jax.js} +1 -1
  5. package/dist/chunks/{AssistantSessionChooser-mLIhDlxW.js → AssistantSessionChooser-D6rS0OVe.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-hGlbm5z5.js +2 -0
  7. package/dist/chunks/{BypassPermissionsModeDialog-BCdft-m_.js → BypassPermissionsModeDialog-CuEpdRVd.js} +1 -1
  8. package/dist/chunks/{ClaudeInChromeOnboarding-BPlrCIo-.js → ClaudeInChromeOnboarding-CTTKMRbt.js} +1 -1
  9. package/dist/chunks/{ClaudeMdExternalIncludesDialog-D8fk-Ib5.js → ClaudeMdExternalIncludesDialog-B-GkVoA_.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-DxJK9NiM.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-LPZ97jsm.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-BQwx7qWA.js → DesktopHandoff-BjPylhOT.js} +1 -1
  13. package/dist/chunks/{DevChannelsDialog-CujM8Ivu.js → DevChannelsDialog-c4YVqBX9.js} +1 -1
  14. package/dist/chunks/{DiffDialog-Byv1UJvS.js → DiffDialog-I5wuXw2C.js} +1 -1
  15. package/dist/chunks/{Doctor-Cv7wbi6C.js → Doctor-Cr_MlSPc.js} +1 -1
  16. package/dist/chunks/Doctor-hgf3dMAW.js +1 -0
  17. package/dist/chunks/{ExitFlow-DKusdm_v.js → ExitFlow-Bz5grDWv.js} +2 -2
  18. package/dist/chunks/{Feedback-Diw8XUr-.js → Feedback-COgMI5tY.js} +1 -1
  19. package/dist/chunks/Grove-Bwmghb-e.js +1 -0
  20. package/dist/chunks/{Grove-CAi037VV.js → Grove-m57x4tY1.js} +1 -1
  21. package/dist/chunks/{HybridTransport-CP0RopXu.js → HybridTransport-Bok4-Ptt.js} +1 -1
  22. package/dist/chunks/{ITermBackend-RvD4VX7c.js → ITermBackend-BBSP-NNa.js} +1 -1
  23. package/dist/chunks/{InvalidConfigDialog-Bhlgysxl.js → InvalidConfigDialog-uTSuSBvO.js} +1 -1
  24. package/dist/chunks/{InvalidSettingsDialog-dGStgJZN.js → InvalidSettingsDialog-B-Os12-H.js} +1 -1
  25. package/dist/chunks/{MCPConnectionManager-D5a9ysw2.js → MCPConnectionManager-y97Inszc.js} +1 -1
  26. package/dist/chunks/{McpParsingWarnings-B_z9pZ_8.js → McpParsingWarnings-DMFUZw92.js} +1 -1
  27. package/dist/chunks/MessageSelector-DwdAC2io.js +3 -0
  28. package/dist/chunks/{Messages-DTmFVhRG.js → Messages-FEBcX-cT.js} +3 -3
  29. package/dist/chunks/{Onboarding-BoAtphYb.js → Onboarding-B8qMJaBh.js} +1 -1
  30. package/dist/chunks/{OverageCreditUpsell-DA7Ne7Mj.js → OverageCreditUpsell-DnFv5z-z.js} +1 -1
  31. package/dist/chunks/PluginSettings-B_xVgTTp.js +17 -0
  32. package/dist/chunks/{PromptInputHelpMenu-B__j9zE6.js → PromptInputHelpMenu-CoMkWchC.js} +1 -1
  33. package/dist/chunks/QueryEngine-C7r7O-hH.js +1 -0
  34. package/dist/chunks/{REPL-B1BS9jwx.js → REPL-CmJdJrGO.js} +36 -36
  35. package/dist/chunks/REPL-nP7H_-qa.js +1 -0
  36. package/dist/chunks/{RemoteCallout-Bwe1ESr9.js → RemoteCallout-4JOZROfT.js} +1 -1
  37. package/dist/chunks/{RemoteSessionManager-BKD4YmzY.js → RemoteSessionManager-jcPnywfY.js} +2 -2
  38. package/dist/chunks/ResumeConversation-CZ2Uedkf.js +1 -0
  39. package/dist/chunks/{SSETransport-D3e5KNL3.js → SSETransport-kEH_p4Yq.js} +1 -1
  40. package/dist/chunks/SearchExtraToolsTool-C64oVFUD.js +1 -0
  41. package/dist/chunks/SentryErrorBoundary-2E2qGV11.js +1 -0
  42. package/dist/chunks/{SentryErrorBoundary-D-YZTGQG.js → SentryErrorBoundary-97iY7Nb7.js} +1 -1
  43. package/dist/chunks/Settings-CuljH0mu.js +2 -0
  44. package/dist/chunks/{TeleportProgress-C3Ubx1Se.js → TeleportProgress-Ctdqi7iS.js} +1 -1
  45. package/dist/chunks/{TeleportRepoMismatchDialog-D_ax3xQy.js → TeleportRepoMismatchDialog-DyTBg1YD.js} +1 -1
  46. package/dist/chunks/{TeleportResumeWrapper-DeVKIXQp.js → TeleportResumeWrapper-B66clYsG.js} +1 -1
  47. package/dist/chunks/{ThemePicker-DKmIL5Ku.js → ThemePicker-WKmYvrqz.js} +1 -1
  48. package/dist/chunks/{TmuxBackend-Bm_cRJ2x.js → TmuxBackend-OKX2NP14.js} +2 -2
  49. package/dist/chunks/{TrustDialog-ClXFMKj6.js → TrustDialog-0anSIf-G.js} +1 -1
  50. package/dist/chunks/{ValidationErrorsList-SdQADfvA.js → ValidationErrorsList-CfgC1KJb.js} +1 -1
  51. package/dist/chunks/{WelcomeV2-BijS6i2Z.js → WelcomeV2-BMHXiNt3.js} +1 -1
  52. package/dist/chunks/{WindowsTerminalBackend-CGEQ5ClB.js → WindowsTerminalBackend-fCSGVe4W.js} +2 -2
  53. package/dist/chunks/{add-dir-B7kleB6k.js → add-dir-CMtuW667.js} +1 -1
  54. package/dist/chunks/{agentDisplay-Dr1XbOAu.js → agentDisplay-CgYKW3G7.js} +1 -1
  55. package/dist/chunks/{agents-CpLvvWpO.js → agents-CdqcGm9o.js} +7 -7
  56. package/dist/chunks/{agents-Dy5YOJC9.js → agents-D90TsYOf.js} +1 -1
  57. package/dist/chunks/{ant-gwf-4eGN.js → ant-DZjimiuz.js} +1 -1
  58. package/dist/chunks/{api-CDmgYrwN.js → api-CQWbpxLP.js} +1 -1
  59. package/dist/chunks/api-quOYYOhi.js +1 -0
  60. package/dist/chunks/assistant-B5_xx00q.js +1 -0
  61. package/dist/chunks/{assistant-BULedprW.js → assistant-CEmC_DlU.js} +1 -1
  62. package/dist/chunks/{assistant-1usDIXtk.js → assistant-CyVcFPIR.js} +1 -1
  63. package/dist/chunks/auth-CjtaiRtF.js +1 -0
  64. package/dist/chunks/{auth-CvHVr2A5.js → auth-DsQEVs9W.js} +1 -1
  65. package/dist/chunks/{autoMode-DSMM2seL.js → autoMode-DEbM9UaE.js} +1 -1
  66. package/dist/chunks/{autonomy-TtBO2TAe.js → autonomy-Clap6Swl.js} +1 -1
  67. package/dist/chunks/{autonomy-Dj6Nzxus.js → autonomy-lNpGnyiu.js} +3 -3
  68. package/dist/chunks/{autonomyPanel-CbmU7lPg.js → autonomyPanel-BqEvfI0e.js} +1 -1
  69. package/dist/chunks/backgroundHousekeeping-D-jt-ocx.js +1 -0
  70. package/dist/chunks/{backgroundHousekeeping-Cp2RvmEN.js → backgroundHousekeeping-KvOpP_4M.js} +2 -2
  71. package/dist/chunks/{branch-Cj5TGroO.js → branch-CSYB04xC.js} +1 -1
  72. package/dist/chunks/{bridge-CsqJAoEg.js → bridge-DDgASypO.js} +2 -2
  73. package/dist/chunks/bridgeConfig-BdZVEqhx.js +1 -0
  74. package/dist/chunks/{bridgeConfig-pjDV5Z2l.js → bridgeConfig-DjC4oig1.js} +1 -1
  75. package/dist/chunks/{bridgeEnabled-D9jI6X-w.js → bridgeEnabled-Csn6Ym3k.js} +1 -1
  76. package/dist/chunks/bridgeEnabled-DLRIH243.js +1 -0
  77. package/dist/chunks/{bridgeMain-CNmR9iDD.js → bridgeMain-B5wsmwkN.js} +11 -11
  78. package/dist/chunks/bridgeMain-BN0Sag35.js +1 -0
  79. package/dist/chunks/{bridgeMessaging-DN0X35NX.js → bridgeMessaging-ChOzzVWj.js} +1 -1
  80. package/dist/chunks/{btw-BOg0RTKl.js → btw-BgjcOoeo.js} +1 -1
  81. package/dist/chunks/{buddy-BFuPeIxM.js → buddy-C1wE3noR.js} +1 -1
  82. package/dist/chunks/{bypassPermissionsKillswitch-kxVnIVRs.js → bypassPermissionsKillswitch-C0diGLRB.js} +1 -1
  83. package/dist/chunks/{caches-BumkMuGA.js → caches-CIoVGP24.js} +2 -2
  84. package/dist/chunks/caches-DMYdTEAr.js +1 -0
  85. package/dist/chunks/{ccrClient-BI1QPLmN.js → ccrClient-C1msT1E3.js} +1 -1
  86. package/dist/chunks/changeDetector-DoOBZOt1.js +1 -0
  87. package/dist/chunks/{channelNotification-CoZSFUlb.js → channelNotification-CWlu9ZWs.js} +1 -1
  88. package/dist/chunks/channelNotification-oZ6vG5R5.js +1 -0
  89. package/dist/chunks/{chrome-C_5EZcdc.js → chrome-Bo9uNZ7s.js} +1 -1
  90. package/dist/chunks/clear-BxdX_MUP.js +1 -0
  91. package/dist/chunks/client-BSoJ_vaA.js +1 -0
  92. package/dist/chunks/color-CkzktPHt.js +1 -0
  93. package/dist/chunks/commands-hyVX9-Lh.js +1 -0
  94. package/dist/chunks/commitAttribution-BwT0TbYF.js +1 -0
  95. package/dist/chunks/{commitAttribution-iKd8bTOI.js → commitAttribution-csu3NO7Y.js} +1 -1
  96. package/dist/chunks/{compact-B6Muofhz.js → compact-DNGIVZRN.js} +3 -3
  97. package/dist/chunks/{companion-B_LrjSk5.js → companion-Diuav3lA.js} +1 -1
  98. package/dist/chunks/{config-CQd4IkXo.js → config-B25IrkTA.js} +1 -1
  99. package/dist/chunks/{config-CJd9kJ57.js → config-ODoYZY8i.js} +1 -1
  100. package/dist/chunks/{context-qAHTuazZ.js → context-CZ5enuPE.js} +1 -1
  101. package/dist/chunks/{context-noninteractive-DZsSp-ES.js → context-noninteractive-62P5EnN5.js} +1 -1
  102. package/dist/chunks/context-noninteractive-CjuzL9q5.js +1 -0
  103. package/dist/chunks/conversation-DyhWeHw2.js +1 -0
  104. package/dist/chunks/conversation-uY-V0SNK.js +1 -0
  105. package/dist/chunks/{copy-B2jhZndZ.js → copy-9JLr2-Xs.js} +1 -1
  106. package/dist/chunks/{createSSHSession-CKdoEmAg.js → createSSHSession-B1hTuDpB.js} +1 -1
  107. package/dist/chunks/createSession-Qurw-N4x.js +1 -0
  108. package/dist/chunks/{createSession-WkBw7wdn.js → createSession-fzjzy0aS.js} +1 -1
  109. package/dist/chunks/cron-DwR6OJuW.js +1 -0
  110. package/dist/chunks/{cronJitterConfig-2u6WAlti.js → cronJitterConfig-9OmmYmIT.js} +1 -1
  111. package/dist/chunks/{crossProjectResume-CjJISRBQ.js → crossProjectResume-B6efoIur.js} +3 -3
  112. package/dist/chunks/datadog-C-llbwzP.js +1 -0
  113. package/dist/chunks/{datadog-YsyhnDmr.js → datadog-SSxsxcC-.js} +1 -1
  114. package/dist/chunks/{desktop-BN9pHpK_.js → desktop-CQnMcbex.js} +1 -1
  115. package/dist/chunks/{diff-BTtUFuf-.js → diff-uAwKYa51.js} +1 -1
  116. package/dist/chunks/{doctor-BKBb426q.js → doctor-CBF0fkBF.js} +1 -1
  117. package/dist/chunks/{effort-ClhxMqY6.js → effort-F-bhAM2u.js} +1 -1
  118. package/dist/chunks/{entry-CJlJ47nP.js → entry-DHN_Gr1b.js} +3 -3
  119. package/dist/chunks/envLessBridgeConfig-CDVtIEWT.js +1 -0
  120. package/dist/chunks/{envLessBridgeConfig-C9UUbQCo.js → envLessBridgeConfig-Dg0hNsdi.js} +1 -1
  121. package/dist/chunks/{exit-DxY3yJrp.js → exit-CqcvZJwI.js} +1 -1
  122. package/dist/chunks/{export-DS2esu8D.js → export-c6WoGlsG.js} +1 -1
  123. package/dist/chunks/{exportRenderer-DX2L5fQ7.js → exportRenderer-CaegIP5N.js} +1 -1
  124. package/dist/chunks/{extra-usage-XJxfHsbe.js → extra-usage-Cj8fokgc.js} +1 -1
  125. package/dist/chunks/extra-usage-Dk-wcvAu.js +1 -0
  126. package/dist/chunks/{extra-usage-core-D84ifgBo.js → extra-usage-core-sHzc4eE1.js} +1 -1
  127. package/dist/chunks/{extra-usage-noninteractive-fxqxHnIt.js → extra-usage-noninteractive-D0kqrqsg.js} +1 -1
  128. package/dist/chunks/{extraUsage-P_NGI1-I.js → extraUsage-CbkqfG1U.js} +1 -1
  129. package/dist/chunks/extractMemories-BP8Opsbp.js +1 -0
  130. package/dist/chunks/{fast-CpN8lLnE.js → fast-DS3iQ1CH.js} +1 -1
  131. package/dist/chunks/fast-DklfqySb.js +1 -0
  132. package/dist/chunks/{feedback-CqRsOG3c.js → feedback-QJynmG5q.js} +1 -1
  133. package/dist/chunks/{firstPartyEventLogger-CM0V7Uev.js → firstPartyEventLogger-DlW8BUXq.js} +1 -1
  134. package/dist/chunks/{flushGate-DNutWuOE.js → flushGate-CK5B9-Zn.js} +1 -1
  135. package/dist/chunks/gates-6amRNsYl.js +1 -0
  136. package/dist/chunks/{gates-C4JvRq4i.js → gates-vlrMjO-X.js} +1 -1
  137. package/dist/chunks/{gemini-B0M6SQSG.js → gemini-B5ZRjDrh.js} +1 -1
  138. package/dist/chunks/{generateRecap-DhDOgXn3.js → generateRecap-SgRMdsyN.js} +1 -1
  139. package/dist/chunks/{generateSessionName-CoFR2wgK.js → generateSessionName-sZFzpwsq.js} +1 -1
  140. package/dist/chunks/{githubRepoPathMapping-DGiSNykv.js → githubRepoPathMapping-DUGvTwPB.js} +1 -1
  141. package/dist/chunks/{goal-DRb6pPAp.js → goal-Dy-GGn9r.js} +3 -3
  142. package/dist/chunks/{grok-emDua_hT.js → grok-BG4_buNt.js} +1 -1
  143. package/dist/chunks/{growthbook-COAneL48.js → growthbook-Br1dDRtd.js} +1 -1
  144. package/dist/chunks/{heapdump-CA6DHA8G.js → heapdump-B9PVKMxa.js} +1 -1
  145. package/dist/chunks/{help-XXY7deZm.js → help-BfWF7xij.js} +1 -1
  146. package/dist/chunks/hooks-BVrhxysz.js +1 -0
  147. package/dist/chunks/{hooks-C6zZYnDi.js → hooks-KK32pxq3.js} +2 -2
  148. package/dist/chunks/{hostAdapter-DZbdeXCV.js → hostAdapter-TBJav3vX.js} +1 -1
  149. package/dist/chunks/{ide-BLRNkzVx.js → ide-BU1A79BE.js} +2 -2
  150. package/dist/chunks/{inboundAttachments-60kD5Qt_.js → inboundAttachments-D4tBPCB8.js} +1 -1
  151. package/dist/chunks/inboundAttachments-DWJplT9p.js +1 -0
  152. package/dist/chunks/initReplBridge-99sUBVEk.js +1 -0
  153. package/dist/chunks/{insights-BBugI3tW.js → insights-lDHodCMG.js} +1 -1
  154. package/dist/chunks/{install-CuVHbwyW.js → install-Bg4ZgW81.js} +1 -1
  155. package/dist/chunks/{install-github-app-ByyzrlM9.js → install-github-app-RLbUq5EL.js} +2 -2
  156. package/dist/chunks/{install-slack-app-CJGtmacz.js → install-slack-app-CHmIwsbm.js} +1 -1
  157. package/dist/chunks/{instrumentation-C8zvzMg1.js → instrumentation-BCiV3SKX.js} +3 -3
  158. package/dist/chunks/{job-DBf6aPQX.js → job-xOGf0j5Q.js} +1 -1
  159. package/dist/chunks/{keybindings-Bi7SMp5-.js → keybindings-DMbReZ4p.js} +1 -1
  160. package/dist/chunks/{lang-CVDkUhjk.js → lang-A6LUGP_7.js} +1 -1
  161. package/dist/chunks/language-Bzp5KDCE.js +1 -0
  162. package/dist/chunks/{language-BYeqMX74.js → language-CGfURU2y.js} +1 -1
  163. package/dist/chunks/{launchAgentsPlatform-BKqxMFFn.js → launchAgentsPlatform-Dbpm7Jyo.js} +1 -1
  164. package/dist/chunks/{launchAutofixPr-CauX6gOB.js → launchAutofixPr-RZfqx5eM.js} +3 -3
  165. package/dist/chunks/{launchLocalMemory-Brrd_BJC.js → launchLocalMemory-DIntbsvg.js} +2 -2
  166. package/dist/chunks/{launchLocalVault-DtAn656A.js → launchLocalVault-CCUw0ayu.js} +3 -3
  167. package/dist/chunks/{launchMemoryStores-x7_Id7Yr.js → launchMemoryStores-QJTh8KSP.js} +1 -1
  168. package/dist/chunks/{launchOnboarding-DkamFByn.js → launchOnboarding--Pe30AYd.js} +1 -1
  169. package/dist/chunks/{launchSchedule-DjNQNxW4.js → launchSchedule-DjN1RbRX.js} +1 -1
  170. package/dist/chunks/{launchSkillStore-D2GUGhDD.js → launchSkillStore-CcKmVDz1.js} +1 -1
  171. package/dist/chunks/{launchTeleport-DTfhiZkf.js → launchTeleport-BKlEo0yF.js} +3 -3
  172. package/dist/chunks/{launchVault-BZ2Po4r8.js → launchVault-C7UHA-IG.js} +1 -1
  173. package/dist/chunks/{loadAgentsDir-C_wFhytF.js → loadAgentsDir-ClTeo0nk.js} +560 -560
  174. package/dist/chunks/loadAgentsDir-CshktEpX.js +1 -0
  175. package/dist/chunks/loadPluginHooks-DVZmzYLl.js +1 -0
  176. package/dist/chunks/localSearch-BtLNJRij.js +1 -0
  177. package/dist/chunks/{localSearch-B0p0_bjP.js → localSearch-Koc8naSr.js} +1 -1
  178. package/dist/chunks/login-BngE89_j.js +1 -0
  179. package/dist/chunks/{login-C1uE6Pg9.js → login-C3MZQTDL.js} +1 -1
  180. package/dist/chunks/{logoV2Utils-BJHvwGup.js → logoV2Utils-DAIIwt5R.js} +1 -1
  181. package/dist/chunks/logout-CXZBaUen.js +1 -0
  182. package/dist/chunks/{magicDocs-DPZzG7Z2.js → magicDocs-C_inI3JJ.js} +1 -1
  183. package/dist/chunks/{main-CNwSLti2.js → main-qqcmncHA.js} +36 -36
  184. package/dist/chunks/{mappers-Dxs_kNJH.js → mappers-7BSMbYvH.js} +1 -1
  185. package/dist/chunks/{mcp-CbDDqdzF.js → mcp-DRBiobrN.js} +1 -1
  186. package/dist/chunks/mcp-DV8Prhgi.js +1 -0
  187. package/dist/chunks/mcp-HQ8-nEZ1.js +6 -0
  188. package/dist/chunks/{mcpServer-BJNjQXsU.js → mcpServer-CLIYAgGs.js} +1 -1
  189. package/dist/chunks/{mcpServer-Py4Iz9Hx.js → mcpServer-DS0yRfcu.js} +1 -1
  190. package/dist/chunks/memory-Cz_JaFLF.js +1 -0
  191. package/dist/chunks/{mode-CqGusjoT.js → mode-Kx0kSZkr.js} +1 -1
  192. package/dist/chunks/model-Bwvn_acH.js +1 -0
  193. package/dist/chunks/{model-BBULcn7y.js → model-CNXtfiLg.js} +1 -1
  194. package/dist/chunks/{onChangeAppState-BkRihYau.js → onChangeAppState-C4ic-Mib.js} +1 -1
  195. package/dist/chunks/{openai-yNI_zoao.js → openai-CGGSfpPh.js} +3 -3
  196. package/dist/chunks/{overageCreditGrant-Cbh0_fbM.js → overageCreditGrant-BqW_6R5v.js} +1 -1
  197. package/dist/chunks/{panelCall-t10Sud9A.js → panelCall-DgPjuhQf.js} +1 -1
  198. package/dist/chunks/{passes-D_iS6DaC.js → passes-sYE91Vtr.js} +1 -1
  199. package/dist/chunks/{paths-Ci1iwL5Y.js → paths-DO4WOQtD.js} +2 -2
  200. package/dist/chunks/{permissions-CHvu4-yX.js → permissions-BPerbf1I.js} +3 -3
  201. package/dist/chunks/{pipeTransport-EAYXsubu.js → pipeTransport-CW9zF_UN.js} +1 -1
  202. package/dist/chunks/{plan-CP5nq_EB.js → plan-CDKBVRw6.js} +1 -1
  203. package/dist/chunks/{plugin-8apy_RBT.js → plugin-C6US4b8W.js} +1 -1
  204. package/dist/chunks/{pluginAutoupdate-ClrgF5b3.js → pluginAutoupdate-BQKtcAhC.js} +1 -1
  205. package/dist/chunks/{pluginBlocklist-B1LVo0j_.js → pluginBlocklist-B8DKXi0i.js} +1 -1
  206. package/dist/chunks/{pluginCliCommands-eqyMBWcP.js → pluginCliCommands-DWCeXYTl.js} +1 -1
  207. package/dist/chunks/{pluginFlagging-BiTDVP10.js → pluginFlagging-DFMlWw2P.js} +1 -1
  208. package/dist/chunks/{pluginOperations-gZ-iCmhu.js → pluginOperations-CKmwDC3G.js} +1 -1
  209. package/dist/chunks/{pluginStartupCheck-DCDWHam6.js → pluginStartupCheck-D6IbyWKe.js} +1 -1
  210. package/dist/chunks/pluginStartupCheck-cYnLsWOs.js +1 -0
  211. package/dist/chunks/{plugins-BAIVqfi8.js → plugins-BwZIRMh_.js} +1 -1
  212. package/dist/chunks/policyLimits-CFLBtFh3.js +1 -0
  213. package/dist/chunks/{pollConfig-_2W7bHoW.js → pollConfig-C3NjXYFc.js} +1 -1
  214. package/dist/chunks/{poor-Dii0mpOW.js → poor-BHhbua95.js} +1 -1
  215. package/dist/chunks/poorMode-CCK7Ek5w.js +1 -0
  216. package/dist/chunks/{poorMode-aDmmvJ_e.js → poorMode-mtlnXU-z.js} +1 -1
  217. package/dist/chunks/{print-BwSmcUQu.js → print-kxnXkqGc.js} +12 -12
  218. package/dist/chunks/{privacy-settings-DaAgSLKw.js → privacy-settings-DjY1annR.js} +1 -1
  219. package/dist/chunks/{processBashCommand-BZ1_JKu4.js → processBashCommand-BrqLqSva.js} +1 -1
  220. package/dist/chunks/processSlashCommand-DJGdVGbK.js +6 -0
  221. package/dist/chunks/prompt-BZjXpviP.js +1 -0
  222. package/dist/chunks/{prompt-6ZKyqv6z.js → prompt-CfM_xGPc.js} +1 -1
  223. package/dist/chunks/prompt-CusKF4-p.js +1 -0
  224. package/dist/chunks/{promptEditor-Dz41P-3I.js → promptEditor-FI_ewCpV.js} +2 -2
  225. package/dist/chunks/{protocolHandler-CHGHjfdf.js → protocolHandler-B7ybKpgJ.js} +1 -1
  226. package/dist/chunks/{rate-limit-options-BlU9av7g.js → rate-limit-options-DPJMNNou.js} +1 -1
  227. package/dist/chunks/{rcDebugLog-C42A0pX1.js → rcDebugLog-CwU_wJBE.js} +1 -1
  228. package/dist/chunks/{referral-IIcY3jkp.js → referral-Da4mpbd3.js} +1 -1
  229. package/dist/chunks/{refresh-DTGEx7X_.js → refresh-B6X4xb9r.js} +1 -1
  230. package/dist/chunks/{registerProtocol-BkNncGMI.js → registerProtocol-D8fFnceq.js} +1 -1
  231. package/dist/chunks/registry-y_z3pTg3.js +1 -0
  232. package/dist/chunks/{release-notes-BxzOD-zP.js → release-notes--tnd4K56.js} +1 -1
  233. package/dist/chunks/{releaseNotes-C8KQGZHq.js → releaseNotes-BPA229-J.js} +2 -2
  234. package/dist/chunks/{reload-plugins-gYyC6_g8.js → reload-plugins-yQ7tEUVh.js} +1 -1
  235. package/dist/chunks/{remote-env-CEJH5aJh.js → remote-env-CER5UxTX.js} +1 -1
  236. package/dist/chunks/{remoteBridgeCore-Dte7ZUAN.js → remoteBridgeCore-Bi31i8gt.js} +1 -1
  237. package/dist/chunks/{remoteControlServer-GN-eDbEz.js → remoteControlServer-oUAcWB4i.js} +1 -1
  238. package/dist/chunks/{rename-BEU6BNRp.js → rename-BTngRRZU.js} +1 -1
  239. package/dist/chunks/{resume-D36S2rXg.js → resume-DZHKfBmm.js} +2 -2
  240. package/dist/chunks/{runtimeObserver-CDMCeww2.js → runtimeObserver-B4KekIF0.js} +1 -1
  241. package/dist/chunks/{runtimeObserver-DaKaKNVW.js → runtimeObserver-BUOcYxiK.js} +2 -2
  242. package/dist/chunks/sandbox-adapter-C--j-c76.js +1 -0
  243. package/dist/chunks/{sandbox-toggle-BPO26t48.js → sandbox-toggle-DLBL7myN.js} +1 -1
  244. package/dist/chunks/searchExtraTools-CBYp5XeI.js +1 -0
  245. package/dist/chunks/{sentry-9EbPa1Xu.js → sentry-B7ZBc8fA.js} +1 -1
  246. package/dist/chunks/{session-D18B22u4.js → session-DWYQk9YN.js} +1 -1
  247. package/dist/chunks/{sessionDiscovery-B-OTvXJf.js → sessionDiscovery-BP0nv36F.js} +1 -1
  248. package/dist/chunks/sessionFileAccessHooks-DVilA3Mm.js +1 -0
  249. package/dist/chunks/sessionMemory-cMgcTxtP.js +1 -0
  250. package/dist/chunks/{sessionMemory-Ctauybzs.js → sessionMemory-pT4lc1C-.js} +1 -1
  251. package/dist/chunks/sessionMemoryUtils-BgYf2OvX.js +1 -0
  252. package/dist/chunks/sessionObserver-CzyEF7mg.js +1 -0
  253. package/dist/chunks/{sessionObserver-ardnTJ37.js → sessionObserver-D4SV0Ar3.js} +1 -1
  254. package/dist/chunks/sessionStorage-CXBgVAx-.js +1 -0
  255. package/dist/chunks/{sessionTitle-DEKvIVCK.js → sessionTitle-CkrnWEW1.js} +1 -1
  256. package/dist/chunks/{sessionTracing-CJUUEWZ4.js → sessionTracing-Caw-kvQr.js} +1 -1
  257. package/dist/chunks/{settingsSync-BWt3oUR7.js → settingsSync-Dn_lGonC.js} +1 -1
  258. package/dist/chunks/{setup-CDxkPTCq.js → setup-DGkOT4DX.js} +2 -2
  259. package/dist/chunks/{setup-BECFDOT9.js → setup-Dihjl7jo.js} +1 -1
  260. package/dist/chunks/{setup-CmCTB2T_.js → setup-II1titXI.js} +1 -1
  261. package/dist/chunks/{shadowedRuleDetection-BbALfdxE.js → shadowedRuleDetection-DASW3j9H.js} +1 -1
  262. package/dist/chunks/{sideQuestion-BHK6dd1q.js → sideQuestion-C1qbLTAL.js} +1 -1
  263. package/dist/chunks/sink-BSPyC453.js +1 -0
  264. package/dist/chunks/{sink-Do5fWbUC.js → sink-CqOAfFlL.js} +1 -1
  265. package/dist/chunks/{sinks-Dc9V7k6a.js → sinks-BT_lBY6T.js} +2 -2
  266. package/dist/chunks/sinks-CpuRIC3H.js +1 -0
  267. package/dist/chunks/{skill-learning-BHW9G3Dn.js → skill-learning-kh0HKn6u.js} +1 -1
  268. package/dist/chunks/skillChangeDetector-DQuNepIV.js +1 -0
  269. package/dist/chunks/{skillGapStore-Wa7s6orv.js → skillGapStore-B1gUQXhE.js} +2 -2
  270. package/dist/chunks/{skillGapStore-DVMbI2yy.js → skillGapStore-CFmLJlYm.js} +1 -1
  271. package/dist/chunks/{skillGenerator-CBuoIFsH.js → skillGenerator-DIAwRpPg.js} +2 -2
  272. package/dist/chunks/skillLearning-Bxu1Uzl-.js +1 -0
  273. package/dist/chunks/skillLearning-CxAbHYEk.js +1 -0
  274. package/dist/chunks/{skillPanel-2w82nkOl.js → skillPanel-B9zJLHKV.js} +3 -3
  275. package/dist/chunks/{skillSearchPanel-7BhCBkdh.js → skillSearchPanel-C1O9sxYS.js} +2 -2
  276. package/dist/chunks/{skills-D5rMEo2w.js → skills-C6_3snFY.js} +1 -1
  277. package/dist/chunks/{sprites-uNWgVZT6.js → sprites-59l7vF4l.js} +1 -1
  278. package/dist/chunks/{stats-D0CJB2HV.js → stats-BmGdg4nj.js} +1 -1
  279. package/dist/chunks/{status-nte1Arzy.js → status-KLPT7uYP.js} +1 -1
  280. package/dist/chunks/{statusNoticeHelpers-Lqf99003.js → statusNoticeHelpers-DuqyBY-N.js} +1 -1
  281. package/dist/chunks/{tag-BnvWS9HE.js → tag-0vahEnrx.js} +1 -1
  282. package/dist/chunks/{tasks-CEs-pxkC.js → tasks-zVPemGv7.js} +1 -1
  283. package/dist/chunks/teamHelpers-B83RwCCC.js +1 -0
  284. package/dist/chunks/{teamHelpers-D8R_gGLb.js → teamHelpers-CXAmvFco.js} +1 -1
  285. package/dist/chunks/teammateModeSnapshot-AdUFmPGC.js +1 -0
  286. package/dist/chunks/{teammateModeSnapshot-Bdra3VIJ.js → teammateModeSnapshot-CdiglTzv.js} +1 -1
  287. package/dist/chunks/teleport-D6PvdjPy.js +1 -0
  288. package/dist/chunks/{templateJobs-BDKGtmr3.js → templateJobs-Ox5ZTKjW.js} +1 -1
  289. package/dist/chunks/{terminalSetup-Bbvq-9Xl.js → terminalSetup-Dh70ynBX.js} +1 -1
  290. package/dist/chunks/{terminalSetup-C1X-sXwp.js → terminalSetup-hLCi-2uB.js} +1 -1
  291. package/dist/chunks/{theme-DXv6bV7f.js → theme-DxgUVq9C.js} +1 -1
  292. package/dist/chunks/thinkback-C5vFU8dM.js +1 -0
  293. package/dist/chunks/{thinkback-CMsW7mvG.js → thinkback-DWgU7Qhr.js} +1 -1
  294. package/dist/chunks/{thinkback-play-CFdkpzlj.js → thinkback-play-CDzY6Ux4.js} +1 -1
  295. package/dist/chunks/{toolEventObserver-CF7T7FBH.js → toolEventObserver-DPoMAJwr.js} +1 -1
  296. package/dist/chunks/{toolEventObserver-DDJV8cvW.js → toolEventObserver-jO6-mlFU.js} +1 -1
  297. package/dist/chunks/toolPool-BmA-BnAq.js +1 -0
  298. package/dist/chunks/{toolPool-BJv0sBnR.js → toolPool-Dgn1Clq8.js} +1 -1
  299. package/dist/chunks/{trustedDevice-C9nJhhyZ.js → trustedDevice-CYR5AgSB.js} +1 -1
  300. package/dist/chunks/{trustedDevice-C5s2au0k.js → trustedDevice-D35gYkBT.js} +1 -1
  301. package/dist/chunks/{ultrareviewCommand-BEv1_AS1.js → ultrareviewCommand-o4GjzoXK.js} +2 -2
  302. package/dist/chunks/{undercover-DPVt2WN7.js → undercover-B4xr62Ux.js} +1 -1
  303. package/dist/chunks/undercover-nakrQDLh.js +1 -0
  304. package/dist/chunks/{updateCCB-D-4naIUu.js → updateCCB-Cthn50OV.js} +1 -1
  305. package/dist/chunks/{upgrade-CSld83v7.js → upgrade-D4Id4ebd.js} +1 -1
  306. package/dist/chunks/upgrade-DJTCV8sr.js +1 -0
  307. package/dist/chunks/{upload-DVlE8SRp.js → upload-BFDXvdfb.js} +1 -1
  308. package/dist/chunks/{usage-D4Ubnttz.js → usage-Csbso5mD.js} +1 -1
  309. package/dist/chunks/{usage-B_bY46ep.js → usage-DxudeFLL.js} +1 -1
  310. package/dist/chunks/{useMainLoopModel-D3tJJC3y.js → useMainLoopModel-CEqP4HOc.js} +1 -1
  311. package/dist/chunks/{useManagePlugins-B4kcqcyY.js → useManagePlugins-BmS3Adja.js} +1 -1
  312. package/dist/chunks/{useMergedTools-CTQl4cdV.js → useMergedTools-wR6Bglqq.js} +1 -1
  313. package/dist/chunks/{useSearchInput-JPayBRPC.js → useSearchInput-BhKAGgEN.js} +1 -1
  314. package/dist/chunks/{useSettingsErrors-YTgPxnRZ.js → useSettingsErrors-CjK3P-Ki.js} +1 -1
  315. package/dist/chunks/{useVoice-CaBv3G13.js → useVoice-DP1hHBWA.js} +1 -1
  316. package/dist/chunks/{util-Q70qdjeS.js → util-CMSErQoz.js} +1 -1
  317. package/dist/chunks/utils-CAQfwbv8.js +1 -0
  318. package/dist/chunks/{validatePlugin-6lg9B564.js → validatePlugin-_g0AqWZG.js} +1 -1
  319. package/dist/chunks/{vim-zOsQBIp4.js → vim-8y-2Q09k.js} +1 -1
  320. package/dist/chunks/{voice-DBQevAhk.js → voice-BJAsr0K-.js} +1 -1
  321. package/dist/chunks/{voiceModeEnabled-CjBjjeNR.js → voiceModeEnabled-BD9GZhQ3.js} +1 -1
  322. package/dist/chunks/voiceModeEnabled-DZbxaFIg.js +1 -0
  323. package/dist/chunks/{voiceStreamSTT-B8CTbb_6.js → voiceStreamSTT-B1T-8adN.js} +1 -1
  324. package/dist/chunks/voiceStreamSTT-B39XaGOU.js +1 -0
  325. package/dist/chunks/{web-tools-CGqBqo07.js → web-tools-DVIvcP41.js} +1 -1
  326. package/dist/chunks/{workerRegistry-Bx6FvTZF.js → workerRegistry-60_UCyc3.js} +1 -1
  327. package/dist/chunks/worktree-DNK8NprA.js +1 -0
  328. package/dist/chunks/{xml-CVF7dWfi.js → xml-CTdKuU6f.js} +1 -1
  329. package/dist/cli.js +1 -1
  330. package/package.json +1 -1
  331. package/dist/chunks/ApproveApiKey-Cc5SaLqs.js +0 -1
  332. package/dist/chunks/BackgroundTasksDialog-OkUSMj0I.js +0 -2
  333. package/dist/chunks/ClaudeMdExternalIncludesDialog-BbPaorIs.js +0 -1
  334. package/dist/chunks/ConsoleOAuthFlow-Dyv4mI_o.js +0 -1
  335. package/dist/chunks/Doctor-CRrE5Sf4.js +0 -1
  336. package/dist/chunks/Grove-CgX5Fdeh.js +0 -1
  337. package/dist/chunks/MessageSelector-CEvbAZGv.js +0 -3
  338. package/dist/chunks/PluginSettings-D3bQRsge.js +0 -17
  339. package/dist/chunks/QueryEngine-CMcQGyql.js +0 -1
  340. package/dist/chunks/REPL-C9f3ToGu.js +0 -1
  341. package/dist/chunks/ResumeConversation-DxqbAKA4.js +0 -1
  342. package/dist/chunks/SearchExtraToolsTool-BVAhywUI.js +0 -1
  343. package/dist/chunks/SentryErrorBoundary-M1ipwe1n.js +0 -1
  344. package/dist/chunks/Settings-D5EWYL40.js +0 -2
  345. package/dist/chunks/api-BdbBnz5c.js +0 -1
  346. package/dist/chunks/assistant-BMviqf0l.js +0 -1
  347. package/dist/chunks/auth-ORBmEqnH.js +0 -1
  348. package/dist/chunks/backgroundHousekeeping-BAvSPaZ5.js +0 -1
  349. package/dist/chunks/bridgeConfig-B49H_B9L.js +0 -1
  350. package/dist/chunks/bridgeEnabled-DsG2JvIr.js +0 -1
  351. package/dist/chunks/bridgeMain-DYCShrcV.js +0 -1
  352. package/dist/chunks/caches-BsYvQnWV.js +0 -1
  353. package/dist/chunks/changeDetector-By54zja0.js +0 -1
  354. package/dist/chunks/channelNotification-Cx82K1CD.js +0 -1
  355. package/dist/chunks/clear-BQr2zTyP.js +0 -1
  356. package/dist/chunks/client-BbavFXJZ.js +0 -1
  357. package/dist/chunks/color-DOsgZO2n.js +0 -1
  358. package/dist/chunks/commands-CfwfGt3T.js +0 -1
  359. package/dist/chunks/commitAttribution-CH9C_hoL.js +0 -1
  360. package/dist/chunks/context-noninteractive-DCYvLxWx.js +0 -1
  361. package/dist/chunks/conversation-DYUVAAQt.js +0 -1
  362. package/dist/chunks/conversation-NrAy2em3.js +0 -1
  363. package/dist/chunks/createSession-Czx7_nf6.js +0 -1
  364. package/dist/chunks/cron-g_P3I5uT.js +0 -1
  365. package/dist/chunks/datadog-QSR9B7CZ.js +0 -1
  366. package/dist/chunks/envLessBridgeConfig-DSJqg3Ox.js +0 -1
  367. package/dist/chunks/extra-usage-DaxUQk9I.js +0 -1
  368. package/dist/chunks/extractMemories-B3cTWsph.js +0 -1
  369. package/dist/chunks/fast-CHiQGMBE.js +0 -1
  370. package/dist/chunks/gates-DvjyKZVA.js +0 -1
  371. package/dist/chunks/hooks-DOej0jqp.js +0 -1
  372. package/dist/chunks/inboundAttachments-BBYxcnvj.js +0 -1
  373. package/dist/chunks/initReplBridge-Dt2aQBia.js +0 -1
  374. package/dist/chunks/language-BoKr5ylY.js +0 -1
  375. package/dist/chunks/loadAgentsDir-whRB0phu.js +0 -1
  376. package/dist/chunks/loadPluginHooks-CYZjzxyO.js +0 -1
  377. package/dist/chunks/localSearch-DAwFmV2Y.js +0 -1
  378. package/dist/chunks/login-DOyB64Rv.js +0 -1
  379. package/dist/chunks/logout-DTPo3Myl.js +0 -1
  380. package/dist/chunks/mcp-CVnFM6nR.js +0 -6
  381. package/dist/chunks/mcp-CzfQB8BT.js +0 -1
  382. package/dist/chunks/memory-BdUqEKio.js +0 -1
  383. package/dist/chunks/model-BOc_-7m0.js +0 -1
  384. package/dist/chunks/pluginStartupCheck-EjLvCXru.js +0 -1
  385. package/dist/chunks/policyLimits-Cdp3QwZ1.js +0 -1
  386. package/dist/chunks/poorMode-DzEL0cu0.js +0 -1
  387. package/dist/chunks/processSlashCommand-v1Rvzxwn.js +0 -6
  388. package/dist/chunks/prompt-DPqKtC0b.js +0 -1
  389. package/dist/chunks/prompt-WjMHPk90.js +0 -1
  390. package/dist/chunks/registry-CBqb7wbi.js +0 -1
  391. package/dist/chunks/sandbox-adapter-DqTuhgud.js +0 -1
  392. package/dist/chunks/searchExtraTools-Brae4wmG.js +0 -1
  393. package/dist/chunks/sessionFileAccessHooks-BXsK8Dwf.js +0 -1
  394. package/dist/chunks/sessionMemory-Bv-AYifm.js +0 -1
  395. package/dist/chunks/sessionMemoryUtils-D-bzdsAT.js +0 -1
  396. package/dist/chunks/sessionObserver-j8D9hidw.js +0 -1
  397. package/dist/chunks/sessionStorage-Cw5ibYWA.js +0 -1
  398. package/dist/chunks/sink-DFWgcGHX.js +0 -1
  399. package/dist/chunks/sinks-BnkxTOU9.js +0 -1
  400. package/dist/chunks/skillChangeDetector-DwAvG835.js +0 -1
  401. package/dist/chunks/skillLearning-BI2YDG3K.js +0 -1
  402. package/dist/chunks/skillLearning-BZMJRJPp.js +0 -1
  403. package/dist/chunks/teamHelpers-D4vCj2hP.js +0 -1
  404. package/dist/chunks/teammateModeSnapshot-BDJ1JTcl.js +0 -1
  405. package/dist/chunks/teleport-RxTr4aCi.js +0 -1
  406. package/dist/chunks/thinkback-DRJBz3Is.js +0 -1
  407. package/dist/chunks/toolPool-0zCdXfEu.js +0 -1
  408. package/dist/chunks/undercover-DYa00dVv.js +0 -1
  409. package/dist/chunks/upgrade-BHj8ALep.js +0 -1
  410. package/dist/chunks/utils-Cr-x1Oyd.js +0 -1
  411. package/dist/chunks/voiceModeEnabled-DK6u8Aaj.js +0 -1
  412. package/dist/chunks/voiceStreamSTT-CCkOfmdI.js +0 -1
  413. package/dist/chunks/worktree-DPpgPLLG.js +0 -1
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Cc as t,Ka as n,dc as r,lo as i,oo as a,yc as o}from"./paths-Ci1iwL5Y.js";import{n as s,r as c}from"./analytics-DqMQntaB.js";import{AT as l,BA as u,WA as d,jT as f}from"./loadAgentsDir-C_wFhytF.js";import{n as p,r as m}from"./voiceModeEnabled-CjBjjeNR.js";import{n as h,t as g}from"./useVoice-CaBv3G13.js";var _,v;e((()=>{g(),f(),s(),o(),u(),a(),p(),_=2,v=async e=>{if(!m())return{type:`text`,value:`Voice mode is not available.`};let a=n(),o=a.voiceEnabled===!0,s=e?.trim().toLowerCase();if(o&&s===`doubao`)return i(`userSettings`,{voiceProvider:`doubao`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Doubao ASR. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o&&s===`anthropic`)return i(`userSettings`,{voiceProvider:`anthropic`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Anthropic STT. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o)return i(`userSettings`,{voiceEnabled:!1}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!1}),{type:`text`,value:`Voice mode disabled.`});let u=s===`doubao`?`doubao`:`anthropic`,{isVoiceStreamAvailable:f}=await import(`./voiceStreamSTT-CCkOfmdI.js`),{checkRecordingAvailability:p}=await import(`./voice-YtzCcIoM.js`),g=await p();if(!g.available)return{type:`text`,value:g.reason??`Voice mode is not available in this environment.`};if(u!==`doubao`&&!f())return{type:`text`,value:`Voice mode requires a Claude.ai account. Please run /login to sign in.`};let{checkVoiceDependencies:v,requestMicrophonePermission:y}=await import(`./voice-YtzCcIoM.js`),b=await v();if(!b.available)return{type:`text`,value:`No audio recording tool found.${b.installCommand?`\nInstall audio recording tools? Run: ${b.installCommand}`:`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Cc as t,Ka as n,dc as r,lo as i,oo as a,yc as o}from"./paths-DO4WOQtD.js";import{n as s,r as c}from"./analytics-DqMQntaB.js";import{AT as l,BA as u,WA as d,jT as f}from"./loadAgentsDir-ClTeo0nk.js";import{n as p,r as m}from"./voiceModeEnabled-BD9GZhQ3.js";import{n as h,t as g}from"./useVoice-DP1hHBWA.js";var _,v;e((()=>{g(),f(),s(),o(),u(),a(),p(),_=2,v=async e=>{if(!m())return{type:`text`,value:`Voice mode is not available.`};let a=n(),o=a.voiceEnabled===!0,s=e?.trim().toLowerCase();if(o&&s===`doubao`)return i(`userSettings`,{voiceProvider:`doubao`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Doubao ASR. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o&&s===`anthropic`)return i(`userSettings`,{voiceProvider:`anthropic`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Anthropic STT. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o)return i(`userSettings`,{voiceEnabled:!1}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(d.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!1}),{type:`text`,value:`Voice mode disabled.`});let u=s===`doubao`?`doubao`:`anthropic`,{isVoiceStreamAvailable:f}=await import(`./voiceStreamSTT-B39XaGOU.js`),{checkRecordingAvailability:p}=await import(`./voice-YtzCcIoM.js`),g=await p();if(!g.available)return{type:`text`,value:g.reason??`Voice mode is not available in this environment.`};if(u!==`doubao`&&!f())return{type:`text`,value:`Voice mode requires a Claude.ai account. Please run /login to sign in.`};let{checkVoiceDependencies:v,requestMicrophonePermission:y}=await import(`./voice-YtzCcIoM.js`),b=await v();if(!b.available)return{type:`text`,value:`No audio recording tool found.${b.installCommand?`\nInstall audio recording tools? Run: ${b.installCommand}`:`
2
2
  Install SoX manually for audio recording.`}`};if(!await y()){let e;return e=process.platform===`win32`?`Settings → Privacy → Microphone`:process.platform===`linux`?`your system's audio settings`:`System Settings → Privacy & Security → Microphone`,{type:`text`,value:`Microphone access is denied. To enable it, go to ${e}, then run /voice again.`}}if(i(`userSettings`,{voiceEnabled:!0,...u===`doubao`?{voiceProvider:`doubao`}:{}}).error)return{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`};d.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!0});let x=l(`voice:pushToTalk`,`Chat`,`Space`),S=``,C=u===`doubao`?`Doubao ASR`:`Anthropic`;if(u!==`doubao`){let e=h(a.language),n=r(),i=n.voiceLangHintLastLanguage!==e.code,o=i?0:n.voiceLangHintShownCount??0,s=!e.fellBackFrom&&o<_;e.fellBackFrom?S=` Note: "${e.fellBackFrom}" is not a supported dictation language; using English. Change it via /config.`:s&&(S=` Dictation language: ${e.code} (/config to change).`),(i||s)&&t(t=>({...t,voiceLangHintShownCount:o+ +!!s,voiceLangHintLastLanguage:e.code}))}return{type:`text`,value:`Voice mode enabled (${C}). Hold ${x} to record.${S}`}}}))();export{v as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-Ci1iwL5Y.js";function o(){return!r(`tengu_amber_quartz_disabled`,!1)}function s(){return i()?!!t()?.accessToken:!1}function c(){return s()&&o()}function l(){return o()}var u=e((()=>{n(),a()}));export{c as a,o as i,u as n,l as r,s as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-DO4WOQtD.js";function o(){return!r(`tengu_amber_quartz_disabled`,!1)}function s(){return i()?!!t()?.accessToken:!1}function c(){return s()&&o()}function l(){return o()}var u=e((()=>{n(),a()}));export{c as a,o as i,u as n,l as r,s as t};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,n}from"./voiceModeEnabled-BD9GZhQ3.js";n();export{t as isVoiceGrowthBookEnabled,e as isVoiceModeEnabled};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-Ci1iwL5Y.js";import{D as d,E as f,O as p,l as m,p as h}from"./debug-otxXY3j-.js";import{l as g,u as _}from"./oauth-CdZEzMww.js";import{o as v,s as y}from"./log-DSV4Ht5l.js";import{c as b,g as x,h as S,l as C,u as w}from"./proxy-CF7ZDxaW.js";function T(){if(!c())return!1;let e=r();return e!==null&&e.accessToken!==null}async function E(e,t){await i();let a=r();if(!a?.accessToken)return h(`[voice_stream] No OAuth token available`),null;let c=process.env.VOICE_STREAM_BASE_URL||g().BASE_API_URL.replace(`https://`,`wss://`).replace(`http://`,`ws://`);process.env.VOICE_STREAM_BASE_URL&&h(`[voice_stream] Using VOICE_STREAM_BASE_URL override: ${process.env.VOICE_STREAM_BASE_URL}`);let l=new URLSearchParams({encoding:`linear16`,sample_rate:`16000`,channels:`1`,endpointing_ms:`300`,utterance_end_ms:`1000`,language:t?.language??`en`}),u=s(`tengu_cobalt_frost`,!1);if(u&&(l.set(`use_conversation_engine`,`true`),l.set(`stt_provider`,`deepgram-nova3`),h(`[voice_stream] Nova 3 gate enabled (tengu_cobalt_frost)`)),t?.keyterms?.length)for(let e of t.keyterms)l.append(`keyterms`,e);let f=`${c}${k}?${l.toString()}`;h(`[voice_stream] Connecting to ${f}`);let m={Authorization:`Bearer ${a.accessToken}`,"User-Agent":o(),"x-app":`cli`},_=S(),v=new n(f,typeof Bun<`u`?{headers:m,proxy:C(f),tls:_||void 0}:{headers:m,agent:b(f),..._}),x=null,w=!1,T=!1,E=!1,M=!1,N=null,P=null,F={send(e){if(v.readyState===n.OPEN){if(T){h(`[voice_stream] Dropping audio chunk after CloseStream: ${String(e.length)} bytes`);return}h(`[voice_stream] Sending audio chunk: ${String(e.length)} bytes`),v.send(Buffer.from(e))}},finalize(){return E||T?Promise.resolve(`ws_already_closed`):(E=!0,new Promise(t=>{let r=setTimeout(()=>N?.(`safety_timeout`),j.safety),i=setTimeout(()=>N?.(`no_data_timeout`),j.noData);if(P=()=>{clearTimeout(i),P=null},N=n=>{if(clearTimeout(r),clearTimeout(i),N=null,P=null,I){h(`[voice_stream] Promoting unreported interim before ${n} resolve`);let t=I;I=``,e.onTranscript(t,!0)}h(`[voice_stream] Finalize resolved via ${n}`),t(n)},v.readyState===n.CLOSED||v.readyState===n.CLOSING){N(`ws_already_closed`);return}setTimeout(()=>{T=!0,v.readyState===n.OPEN&&(h(`[voice_stream] Sending CloseStream (finalize)`),v.send(O))},0)}))},close(){T=!0,x&&(clearInterval(x),x=null),w=!1,v.readyState===n.OPEN&&v.close()},isConnected(){return w&&v.readyState===n.OPEN}};v.on(`open`,()=>{h(`[voice_stream] WebSocket connected`),w=!0,h(`[voice_stream] Sending initial KeepAlive`),v.send(D),x=setInterval(e=>{e.readyState===n.OPEN&&(h(`[voice_stream] Sending periodic KeepAlive`),e.send(D))},A,v),e.onReady(F)});let I=``;return v.on(`message`,t=>{let n=t.toString();h(`[voice_stream] Message received (${String(n.length)} chars): ${n.slice(0,200)}`);let r;try{r=d(n)}catch{return}switch(r.type){case`TranscriptText`:{let t=r.data;if(h(`[voice_stream] TranscriptText: "${t??``}"`),T&&P?.(),t){if(!u&&I){let n=I.trimStart(),r=t.trimStart();n&&r&&!r.startsWith(n)&&!n.startsWith(r)&&(h(`[voice_stream] Auto-finalizing previous segment (new segment detected): "${I}"`),e.onTranscript(I,!0))}I=t,e.onTranscript(t,!1)}break}case`TranscriptEndpoint`:{h(`[voice_stream] TranscriptEndpoint received, lastTranscriptText="${I}"`);let t=I;I=``,t&&e.onTranscript(t,!0),T&&N?.(`post_closestream_endpoint`);break}case`TranscriptError`:{let t=r.description??r.error_code??`unknown transcription error`;h(`[voice_stream] TranscriptError: ${t}`),E||e.onError(t);break}case`error`:{let t=r.message??p(r);h(`[voice_stream] Server error: ${t}`),E||e.onError(t);break}default:break}}),v.on(`close`,(t,n)=>{let r=n?.toString()??``;if(h(`[voice_stream] WebSocket closed: code=${String(t)} reason="${r}"`),w=!1,x&&(clearInterval(x),x=null),I){h(`[voice_stream] Promoting unreported interim transcript to final on close`);let t=I;I=``,e.onTranscript(t,!0)}N?.(`ws_close`),!E&&!M&&t!==1e3&&t!==1005&&e.onError(`Connection closed: code ${String(t)}${r?` — ${r}`:``}`),e.onClose()}),v.on(`unexpected-response`,(t,n)=>{let r=n.statusCode??0;if(r===101){h(`[voice_stream] unexpected-response fired with 101; ignoring`);return}h(`[voice_stream] Upgrade rejected: status=${String(r)} cf-mitigated=${String(n.headers[`cf-mitigated`])} cf-ray=${String(n.headers[`cf-ray`])}`),M=!0,n.resume(),t.destroy(),!E&&e.onError(`WebSocket upgrade rejected with HTTP ${String(r)}`,{fatal:r>=400&&r<500})}),v.on(`error`,t=>{y(t),h(`[voice_stream] WebSocket error: ${t.message}`),E||e.onError(`Voice stream connection error: ${t.message}`)}),F}var D,O,k,A,j,M=e((()=>{t(),_(),l(),m(),u(),v(),x(),w(),f(),a(),D=`{"type":"KeepAlive"}`,O=`{"type":"CloseStream"}`,k=`/api/ws/speech_to_text/voice_stream`,A=8e3,j={safety:5e3,noData:1500}}));export{T as i,E as n,M as r,j as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-DO4WOQtD.js";import{D as d,E as f,O as p,l as m,p as h}from"./debug-otxXY3j-.js";import{l as g,u as _}from"./oauth-CdZEzMww.js";import{o as v,s as y}from"./log-DSV4Ht5l.js";import{c as b,g as x,h as S,l as C,u as w}from"./proxy-CF7ZDxaW.js";function T(){if(!c())return!1;let e=r();return e!==null&&e.accessToken!==null}async function E(e,t){await i();let a=r();if(!a?.accessToken)return h(`[voice_stream] No OAuth token available`),null;let c=process.env.VOICE_STREAM_BASE_URL||g().BASE_API_URL.replace(`https://`,`wss://`).replace(`http://`,`ws://`);process.env.VOICE_STREAM_BASE_URL&&h(`[voice_stream] Using VOICE_STREAM_BASE_URL override: ${process.env.VOICE_STREAM_BASE_URL}`);let l=new URLSearchParams({encoding:`linear16`,sample_rate:`16000`,channels:`1`,endpointing_ms:`300`,utterance_end_ms:`1000`,language:t?.language??`en`}),u=s(`tengu_cobalt_frost`,!1);if(u&&(l.set(`use_conversation_engine`,`true`),l.set(`stt_provider`,`deepgram-nova3`),h(`[voice_stream] Nova 3 gate enabled (tengu_cobalt_frost)`)),t?.keyterms?.length)for(let e of t.keyterms)l.append(`keyterms`,e);let f=`${c}${k}?${l.toString()}`;h(`[voice_stream] Connecting to ${f}`);let m={Authorization:`Bearer ${a.accessToken}`,"User-Agent":o(),"x-app":`cli`},_=S(),v=new n(f,typeof Bun<`u`?{headers:m,proxy:C(f),tls:_||void 0}:{headers:m,agent:b(f),..._}),x=null,w=!1,T=!1,E=!1,M=!1,N=null,P=null,F={send(e){if(v.readyState===n.OPEN){if(T){h(`[voice_stream] Dropping audio chunk after CloseStream: ${String(e.length)} bytes`);return}h(`[voice_stream] Sending audio chunk: ${String(e.length)} bytes`),v.send(Buffer.from(e))}},finalize(){return E||T?Promise.resolve(`ws_already_closed`):(E=!0,new Promise(t=>{let r=setTimeout(()=>N?.(`safety_timeout`),j.safety),i=setTimeout(()=>N?.(`no_data_timeout`),j.noData);if(P=()=>{clearTimeout(i),P=null},N=n=>{if(clearTimeout(r),clearTimeout(i),N=null,P=null,I){h(`[voice_stream] Promoting unreported interim before ${n} resolve`);let t=I;I=``,e.onTranscript(t,!0)}h(`[voice_stream] Finalize resolved via ${n}`),t(n)},v.readyState===n.CLOSED||v.readyState===n.CLOSING){N(`ws_already_closed`);return}setTimeout(()=>{T=!0,v.readyState===n.OPEN&&(h(`[voice_stream] Sending CloseStream (finalize)`),v.send(O))},0)}))},close(){T=!0,x&&(clearInterval(x),x=null),w=!1,v.readyState===n.OPEN&&v.close()},isConnected(){return w&&v.readyState===n.OPEN}};v.on(`open`,()=>{h(`[voice_stream] WebSocket connected`),w=!0,h(`[voice_stream] Sending initial KeepAlive`),v.send(D),x=setInterval(e=>{e.readyState===n.OPEN&&(h(`[voice_stream] Sending periodic KeepAlive`),e.send(D))},A,v),e.onReady(F)});let I=``;return v.on(`message`,t=>{let n=t.toString();h(`[voice_stream] Message received (${String(n.length)} chars): ${n.slice(0,200)}`);let r;try{r=d(n)}catch{return}switch(r.type){case`TranscriptText`:{let t=r.data;if(h(`[voice_stream] TranscriptText: "${t??``}"`),T&&P?.(),t){if(!u&&I){let n=I.trimStart(),r=t.trimStart();n&&r&&!r.startsWith(n)&&!n.startsWith(r)&&(h(`[voice_stream] Auto-finalizing previous segment (new segment detected): "${I}"`),e.onTranscript(I,!0))}I=t,e.onTranscript(t,!1)}break}case`TranscriptEndpoint`:{h(`[voice_stream] TranscriptEndpoint received, lastTranscriptText="${I}"`);let t=I;I=``,t&&e.onTranscript(t,!0),T&&N?.(`post_closestream_endpoint`);break}case`TranscriptError`:{let t=r.description??r.error_code??`unknown transcription error`;h(`[voice_stream] TranscriptError: ${t}`),E||e.onError(t);break}case`error`:{let t=r.message??p(r);h(`[voice_stream] Server error: ${t}`),E||e.onError(t);break}default:break}}),v.on(`close`,(t,n)=>{let r=n?.toString()??``;if(h(`[voice_stream] WebSocket closed: code=${String(t)} reason="${r}"`),w=!1,x&&(clearInterval(x),x=null),I){h(`[voice_stream] Promoting unreported interim transcript to final on close`);let t=I;I=``,e.onTranscript(t,!0)}N?.(`ws_close`),!E&&!M&&t!==1e3&&t!==1005&&e.onError(`Connection closed: code ${String(t)}${r?` — ${r}`:``}`),e.onClose()}),v.on(`unexpected-response`,(t,n)=>{let r=n.statusCode??0;if(r===101){h(`[voice_stream] unexpected-response fired with 101; ignoring`);return}h(`[voice_stream] Upgrade rejected: status=${String(r)} cf-mitigated=${String(n.headers[`cf-mitigated`])} cf-ray=${String(n.headers[`cf-ray`])}`),M=!0,n.resume(),t.destroy(),!E&&e.onError(`WebSocket upgrade rejected with HTTP ${String(r)}`,{fatal:r>=400&&r<500})}),v.on(`error`,t=>{y(t),h(`[voice_stream] WebSocket error: ${t.message}`),E||e.onError(`Voice stream connection error: ${t.message}`)}),F}var D,O,k,A,j,M=e((()=>{t(),_(),l(),m(),u(),v(),x(),w(),f(),a(),D=`{"type":"KeepAlive"}`,O=`{"type":"CloseStream"}`,k=`/api/ws/speech_to_text/voice_stream`,A=8e3,j={safety:5e3,noData:1500}}));export{T as i,E as n,M as r,j as t};
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./voiceStreamSTT-B1T-8adN.js";t();export{e as isVoiceStreamAvailable};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,n as a,r as o,t as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,no as f,oo as p}from"./paths-Ci1iwL5Y.js";import{t as m}from"./useTerminalSize-Du-EamDN.js";import{n as h,t as g}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as _,r as v}from"./modalContext-c5Yqx_CQ.js";function y({tab:e,adapters:t,current:n,fieldLabel:r,onConfigure:a,onSwitchTab:o,onSelectAdapter:s,onClose:u,contentHeight:d}){let[f,p]=(0,T.useState)(Math.max(0,t.findIndex(e=>e.key===n)));return l((n,r)=>{if(r.upArrow)p(e=>Math.max(0,e-1));else if(r.downArrow)p(e=>Math.min(e+1,t.length-1));else if(r.tab&&e===`search`)o(`fetch`),p(0);else if(r.tab&&e===`fetch`)o(`search`),p(0);else if(r.escape)u();else if(r.return){let e=t[f];e&&a(e)}else if(n===` `){let e=t[f];e&&s(e.key)}}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:r}),(0,E.jsx)(c,{flexDirection:`column`,marginTop:1,children:t.map((e,t)=>{let r=e.key===n,a=t===f,o=a||r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{color:r?`success`:void 0,children:[a?`›`:` `,(0,E.jsxs)(i,{color:r?`success`:void 0,children:[` `,r?`●`:`○`,` `]})]}),(0,E.jsx)(i,{bold:r,backgroundColor:o?`suggestion`:void 0,color:o?`inverseText`:void 0,children:e.label}),(0,E.jsx)(i,{children:` `}),(0,E.jsx)(i,{dimColor:!r,children:e.description})]},e.key)})}),(0,E.jsxs)(c,{marginTop:1,flexDirection:`row`,gap:2,children:[(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Space select · Enter config · Esc close`]}),(0,E.jsx)(i,{dimColor:!0,children:`Tab switch tab`})]})]})}function b(e){let t=[];switch(e.key){case`tavily`:t.push({key:`tavilyEndpointUrl`,label:`Endpoint URL`,placeholder:`https://tavily.claude-code-best.win`,maskInput:!1,getValue:e=>e.tavilyEndpointUrl??`https://tavily.claude-code-best.win`,setValue:(e,t)=>({...e,tavilyEndpointUrl:t||void 0})});break;case`brave`:t.push({key:`braveApiKey`,label:`API Key`,placeholder:`BSA...`,maskInput:!0,getValue:e=>e.braveApiKey??``,setValue:(e,t)=>({...e,braveApiKey:t||void 0})});break;case`exa`:t.push({key:`exaApiKey`,label:`API Key`,placeholder:`exa-...`,maskInput:!0,getValue:e=>e.exaApiKey??``,setValue:(e,t)=>({...e,exaApiKey:t||void 0})}),t.push({key:`exaEndpointUrl`,label:`Endpoint URL`,placeholder:`https://mcp.exa.ai/mcp`,maskInput:!1,getValue:e=>e.exaEndpointUrl??`https://mcp.exa.ai/mcp`,setValue:(e,t)=>({...e,exaEndpointUrl:t||void 0})});break;case`http`:t.push({key:`webFetchHttpTimeoutMs`,label:`Timeout (ms)`,placeholder:`60000`,maskInput:!1,getValue:e=>String(e.webFetchHttpTimeoutMs??6e4),setValue:(e,t)=>({...e,webFetchHttpTimeoutMs:t&&Number(t)||void 0})});break;default:break}return t}function x({adapter:e,onBack:t,onSave:n,onSelect:r}){let i=b(e),a=f();return i.length===0?(0,E.jsx)(S,{adapter:e,onBack:t,onSelect:r}):(0,E.jsx)(C,{fields:i,adapter:e,onBack:t,onSave:n,settings:a})}function S({adapter:e,onBack:t,onSelect:n}){let[r,a]=(0,T.useState)(0);return l((i,o)=>{o.upArrow||o.downArrow?a(e=>+(e===0)):o.escape?t():o.return&&(r===0?n(`Selected ${e.label}.`):t())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:e.label}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsx)(i,{children:e.description}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:`No additional configuration needed.`})})]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===0?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===0?`suggestion`:void 0,color:r===0?`inverseText`:void 0,bold:!0,children:`[ Select & Close ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===1?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===1?`suggestion`:void 0,color:r===1?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Enter confirm · Esc back`]})})]})}function C({fields:e,adapter:t,onBack:n,onSave:r,settings:a}){let[o,s]=(0,T.useState)(0),[u,f]=(0,T.useState)(!1),[p,m]=(0,T.useState)(``),[h,g]=(0,T.useState)(0),_=(0,T.useCallback)(()=>{f(!1),m(``),g(0)},[]);e.length-1;let v=e.length,y=e.length+1,b=(0,T.useCallback)(()=>{let n={...a};for(let t of e){let e=t.getValue(a);n=t.setValue(n,e)}d(`userSettings`,n),r(`Configuration saved for ${t.label}.`)},[e,a,t.label,r]),x=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.getValue(a);m(n),g(n.length),f(!0)},[o,e,a]),S=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.setValue({...a},p);Object.assign(a,n),f(!1)},[o,e,a,p]);return l((e,t)=>{u?t.escape?_():t.return?S():t.backspace||t.delete?m(e=>{let t=h;return t>0?(g(t-1),e.slice(0,t-1)+e.slice(t)):e}):t.leftArrow?g(e=>Math.max(0,e-1)):t.rightArrow?g(e=>Math.min(p.length,e+1)):e&&e.length===1&&!t.ctrl&&!t.meta&&m(t=>{let n=h;return g(n+1),t.slice(0,n)+e+t.slice(n)}):t.upArrow?s(e=>Math.max(0,e-1)):t.downArrow?s(e=>Math.min(y,e+1)):t.escape?n():t.return&&(o===v?b():o===y?n():x())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsxs)(i,{bold:!0,children:[t.label,` Configuration`]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[e.map((e,t)=>{let n=t===o&&!u,r=e.getValue(a),s=u&&t===o?e.maskInput?`•`.repeat(p.length):p:e.maskInput&&r?`•`.repeat(Math.min(r.length,16)):r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{children:[n?`›`:` `,` `]}),(0,E.jsxs)(i,{dimColor:!0,children:[e.label,`: `]}),(0,E.jsx)(i,{backgroundColor:n?`suggestion`:void 0,color:u&&t===o?`success`:n?`inverseText`:void 0,children:s||(0,E.jsx)(i,{dimColor:!0,children:`(empty)`})}),u&&t===o&&(0,E.jsxs)(i,{dimColor:!0,children:[` |`,` pos `,h,`/`,p.length]})]},e.key)}),(0,E.jsxs)(c,{marginTop:1,children:[(0,E.jsxs)(i,{children:[o===v?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===v?`suggestion`:void 0,color:o===v?`inverseText`:void 0,bold:!0,children:`[ Save ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[o===y?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===y?`suggestion`:void 0,color:o===y?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:u?`←→ move cursor · Type to edit · Enter confirm · Esc cancel edit`:`↑↓ navigate · Enter edit field · Esc go back`})})]})}function w({onClose:e,_context:t}){let[r,i]=(0,T.useState)(`search`),[s,c]=(0,T.useState)({kind:`main`}),l=f(),u=l.webSearchAdapter??`tavily`,p=l.webFetchAdapter??`tavily`,m=v(),{rows:g}=n(),_=m?g+1:Math.max(14,Math.min(Math.floor(g*.7),24));h();let b=(0,T.useCallback)(t=>{let n=r;d(`userSettings`,{[n===`search`?`webSearchAdapter`:`webFetchAdapter`]:t});let i=(n===`search`?D:O).find(e=>e.key===t)?.label??t;e(`${n===`search`?`Web search`:`Web fetch`} backend set to ${i}.`)},[r,e]),S=(0,T.useCallback)(e=>{c({kind:`config`,adapter:e})},[]),C=(0,T.useCallback)(()=>{c({kind:`main`})},[]),w=(0,T.useCallback)(t=>{e(t)},[e]),k=(0,T.useCallback)(t=>{let n=s.adapter;d(`userSettings`,{[(s.kind===`config`?D.some(e=>e.key===n.key)?`search`:`fetch`:r)===`search`?`webSearchAdapter`:`webFetchAdapter`]:n.key}),e(t)},[e,s,r]);return s.kind===`config`?(0,E.jsx)(x,{adapter:s.adapter,onBack:C,onSave:w,onSelect:k}):(0,E.jsxs)(o,{title:`Web Tools`,contentHeight:_,children:[(0,E.jsx)(a,{title:`Search`,children:(0,E.jsx)(y,{tab:r,adapters:D,current:u,fieldLabel:`Choose a web search backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`search`),(0,E.jsx)(a,{title:`Fetch`,children:(0,E.jsx)(y,{tab:r,adapters:O,current:p,fieldLabel:`Choose a web fetch backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`fetch`)]})}var T,E,D,O,k;e((()=>{r(),T=t(r(),1),s(),g(),m(),_(),p(),E=u(),D=[{key:`tavily`,label:`Tavily`,description:`Tavily Search API (default)`,hasConfig:!0},{key:`api`,label:`Anthropic API`,description:`Anthropic server-side web search`,hasConfig:!1},{key:`bing`,label:`Bing`,description:`Scrape Bing HTML results`,hasConfig:!1},{key:`brave`,label:`Brave`,description:`Brave Search API (needs API key)`,hasConfig:!0},{key:`exa`,label:`Exa`,description:`Exa AI search (MCP endpoint)`,hasConfig:!0}],O=[{key:`tavily`,label:`Tavily Extract`,description:`Use Tavily /extract (default)`,hasConfig:!0},{key:`http`,label:`HTTP Direct`,description:`Fetch URL directly via HTTP`,hasConfig:!0}],k=async(e,t)=>(0,E.jsx)(w,{onClose:e,_context:t})}))();export{k as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,n as a,r as o,t as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{lo as d,no as f,oo as p}from"./paths-DO4WOQtD.js";import{t as m}from"./useTerminalSize-Du-EamDN.js";import{n as h,t as g}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as _,r as v}from"./modalContext-c5Yqx_CQ.js";function y({tab:e,adapters:t,current:n,fieldLabel:r,onConfigure:a,onSwitchTab:o,onSelectAdapter:s,onClose:u,contentHeight:d}){let[f,p]=(0,T.useState)(Math.max(0,t.findIndex(e=>e.key===n)));return l((n,r)=>{if(r.upArrow)p(e=>Math.max(0,e-1));else if(r.downArrow)p(e=>Math.min(e+1,t.length-1));else if(r.tab&&e===`search`)o(`fetch`),p(0);else if(r.tab&&e===`fetch`)o(`search`),p(0);else if(r.escape)u();else if(r.return){let e=t[f];e&&a(e)}else if(n===` `){let e=t[f];e&&s(e.key)}}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:r}),(0,E.jsx)(c,{flexDirection:`column`,marginTop:1,children:t.map((e,t)=>{let r=e.key===n,a=t===f,o=a||r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{color:r?`success`:void 0,children:[a?`›`:` `,(0,E.jsxs)(i,{color:r?`success`:void 0,children:[` `,r?`●`:`○`,` `]})]}),(0,E.jsx)(i,{bold:r,backgroundColor:o?`suggestion`:void 0,color:o?`inverseText`:void 0,children:e.label}),(0,E.jsx)(i,{children:` `}),(0,E.jsx)(i,{dimColor:!r,children:e.description})]},e.key)})}),(0,E.jsxs)(c,{marginTop:1,flexDirection:`row`,gap:2,children:[(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Space select · Enter config · Esc close`]}),(0,E.jsx)(i,{dimColor:!0,children:`Tab switch tab`})]})]})}function b(e){let t=[];switch(e.key){case`tavily`:t.push({key:`tavilyEndpointUrl`,label:`Endpoint URL`,placeholder:`https://tavily.claude-code-best.win`,maskInput:!1,getValue:e=>e.tavilyEndpointUrl??`https://tavily.claude-code-best.win`,setValue:(e,t)=>({...e,tavilyEndpointUrl:t||void 0})});break;case`brave`:t.push({key:`braveApiKey`,label:`API Key`,placeholder:`BSA...`,maskInput:!0,getValue:e=>e.braveApiKey??``,setValue:(e,t)=>({...e,braveApiKey:t||void 0})});break;case`exa`:t.push({key:`exaApiKey`,label:`API Key`,placeholder:`exa-...`,maskInput:!0,getValue:e=>e.exaApiKey??``,setValue:(e,t)=>({...e,exaApiKey:t||void 0})}),t.push({key:`exaEndpointUrl`,label:`Endpoint URL`,placeholder:`https://mcp.exa.ai/mcp`,maskInput:!1,getValue:e=>e.exaEndpointUrl??`https://mcp.exa.ai/mcp`,setValue:(e,t)=>({...e,exaEndpointUrl:t||void 0})});break;case`http`:t.push({key:`webFetchHttpTimeoutMs`,label:`Timeout (ms)`,placeholder:`60000`,maskInput:!1,getValue:e=>String(e.webFetchHttpTimeoutMs??6e4),setValue:(e,t)=>({...e,webFetchHttpTimeoutMs:t&&Number(t)||void 0})});break;default:break}return t}function x({adapter:e,onBack:t,onSave:n,onSelect:r}){let i=b(e),a=f();return i.length===0?(0,E.jsx)(S,{adapter:e,onBack:t,onSelect:r}):(0,E.jsx)(C,{fields:i,adapter:e,onBack:t,onSave:n,settings:a})}function S({adapter:e,onBack:t,onSelect:n}){let[r,a]=(0,T.useState)(0);return l((i,o)=>{o.upArrow||o.downArrow?a(e=>+(e===0)):o.escape?t():o.return&&(r===0?n(`Selected ${e.label}.`):t())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:e.label}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsx)(i,{children:e.description}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:`No additional configuration needed.`})})]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===0?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===0?`suggestion`:void 0,color:r===0?`inverseText`:void 0,bold:!0,children:`[ Select & Close ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===1?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===1?`suggestion`:void 0,color:r===1?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Enter confirm · Esc back`]})})]})}function C({fields:e,adapter:t,onBack:n,onSave:r,settings:a}){let[o,s]=(0,T.useState)(0),[u,f]=(0,T.useState)(!1),[p,m]=(0,T.useState)(``),[h,g]=(0,T.useState)(0),_=(0,T.useCallback)(()=>{f(!1),m(``),g(0)},[]);e.length-1;let v=e.length,y=e.length+1,b=(0,T.useCallback)(()=>{let n={...a};for(let t of e){let e=t.getValue(a);n=t.setValue(n,e)}d(`userSettings`,n),r(`Configuration saved for ${t.label}.`)},[e,a,t.label,r]),x=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.getValue(a);m(n),g(n.length),f(!0)},[o,e,a]),S=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.setValue({...a},p);Object.assign(a,n),f(!1)},[o,e,a,p]);return l((e,t)=>{u?t.escape?_():t.return?S():t.backspace||t.delete?m(e=>{let t=h;return t>0?(g(t-1),e.slice(0,t-1)+e.slice(t)):e}):t.leftArrow?g(e=>Math.max(0,e-1)):t.rightArrow?g(e=>Math.min(p.length,e+1)):e&&e.length===1&&!t.ctrl&&!t.meta&&m(t=>{let n=h;return g(n+1),t.slice(0,n)+e+t.slice(n)}):t.upArrow?s(e=>Math.max(0,e-1)):t.downArrow?s(e=>Math.min(y,e+1)):t.escape?n():t.return&&(o===v?b():o===y?n():x())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsxs)(i,{bold:!0,children:[t.label,` Configuration`]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[e.map((e,t)=>{let n=t===o&&!u,r=e.getValue(a),s=u&&t===o?e.maskInput?`•`.repeat(p.length):p:e.maskInput&&r?`•`.repeat(Math.min(r.length,16)):r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{children:[n?`›`:` `,` `]}),(0,E.jsxs)(i,{dimColor:!0,children:[e.label,`: `]}),(0,E.jsx)(i,{backgroundColor:n?`suggestion`:void 0,color:u&&t===o?`success`:n?`inverseText`:void 0,children:s||(0,E.jsx)(i,{dimColor:!0,children:`(empty)`})}),u&&t===o&&(0,E.jsxs)(i,{dimColor:!0,children:[` |`,` pos `,h,`/`,p.length]})]},e.key)}),(0,E.jsxs)(c,{marginTop:1,children:[(0,E.jsxs)(i,{children:[o===v?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===v?`suggestion`:void 0,color:o===v?`inverseText`:void 0,bold:!0,children:`[ Save ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[o===y?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===y?`suggestion`:void 0,color:o===y?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:u?`←→ move cursor · Type to edit · Enter confirm · Esc cancel edit`:`↑↓ navigate · Enter edit field · Esc go back`})})]})}function w({onClose:e,_context:t}){let[r,i]=(0,T.useState)(`search`),[s,c]=(0,T.useState)({kind:`main`}),l=f(),u=l.webSearchAdapter??`tavily`,p=l.webFetchAdapter??`tavily`,m=v(),{rows:g}=n(),_=m?g+1:Math.max(14,Math.min(Math.floor(g*.7),24));h();let b=(0,T.useCallback)(t=>{let n=r;d(`userSettings`,{[n===`search`?`webSearchAdapter`:`webFetchAdapter`]:t});let i=(n===`search`?D:O).find(e=>e.key===t)?.label??t;e(`${n===`search`?`Web search`:`Web fetch`} backend set to ${i}.`)},[r,e]),S=(0,T.useCallback)(e=>{c({kind:`config`,adapter:e})},[]),C=(0,T.useCallback)(()=>{c({kind:`main`})},[]),w=(0,T.useCallback)(t=>{e(t)},[e]),k=(0,T.useCallback)(t=>{let n=s.adapter;d(`userSettings`,{[(s.kind===`config`?D.some(e=>e.key===n.key)?`search`:`fetch`:r)===`search`?`webSearchAdapter`:`webFetchAdapter`]:n.key}),e(t)},[e,s,r]);return s.kind===`config`?(0,E.jsx)(x,{adapter:s.adapter,onBack:C,onSave:w,onSelect:k}):(0,E.jsxs)(o,{title:`Web Tools`,contentHeight:_,children:[(0,E.jsx)(a,{title:`Search`,children:(0,E.jsx)(y,{tab:r,adapters:D,current:u,fieldLabel:`Choose a web search backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`search`),(0,E.jsx)(a,{title:`Fetch`,children:(0,E.jsx)(y,{tab:r,adapters:O,current:p,fieldLabel:`Choose a web fetch backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`fetch`)]})}var T,E,D,O,k;e((()=>{r(),T=t(r(),1),s(),g(),m(),_(),p(),E=u(),D=[{key:`tavily`,label:`Tavily`,description:`Tavily Search API (default)`,hasConfig:!0},{key:`api`,label:`Anthropic API`,description:`Anthropic server-side web search`,hasConfig:!1},{key:`bing`,label:`Bing`,description:`Scrape Bing HTML results`,hasConfig:!1},{key:`brave`,label:`Brave`,description:`Brave Search API (needs API key)`,hasConfig:!0},{key:`exa`,label:`Exa`,description:`Exa AI search (MCP endpoint)`,hasConfig:!0}],O=[{key:`tavily`,label:`Tavily Extract`,description:`Use Tavily /extract (default)`,hasConfig:!0},{key:`http`,label:`HTTP Direct`,description:`Fetch URL directly via HTTP`,hasConfig:!0}],k=async(e,t)=>(0,E.jsx)(w,{onClose:e,_context:t})}))();export{k as call};
@@ -1 +1 @@
1
- import{Jt as e,on as t}from"./paths-Ci1iwL5Y.js";import{U as n,z as r}from"./debug-otxXY3j-.js";import{o as i,t as a}from"./bridgeMain-CNmR9iDD.js";import{resolve as o}from"path";t(),n();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),n=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:n,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${r(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
1
+ import{Jt as e,on as t}from"./paths-DO4WOQtD.js";import{U as n,z as r}from"./debug-otxXY3j-.js";import{o as i,t as a}from"./bridgeMain-B5wsmwkN.js";import{resolve as o}from"path";t(),n();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),n=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:n,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${r(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
@@ -0,0 +1 @@
1
+ import{Ct as e,Ot as t}from"./loadAgentsDir-ClTeo0nk.js";t();export{e as execIntoTmuxWorktree};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{es as t,no as n,oo as r,us as i}from"./paths-Ci1iwL5Y.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=n(),t=[],r=[];for(let[n,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${n}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:n,manifest:{name:n,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):r.push(c)}return{enabled:t,disabled:r}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{r(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&t.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function S(e){return x(e).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{es as t,no as n,oo as r,us as i}from"./paths-DO4WOQtD.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=n(),t=[],r=[];for(let[n,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${n}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:n,manifest:{name:n,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):r.push(c)}return{enabled:t,disabled:r}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{r(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&t.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function S(e){return x(e).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bun
2
- import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.7.1 (Claude Code)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-WtUzkMKV.js`);if(t(`cli_entry`),process.argv[2]===`--claude-in-chrome-mcp`){t(`cli_claude_in_chrome_mcp_path`);let{runClaudeInChromeMcpServer:e}=await import(`./chunks/mcpServer-Py4Iz9Hx.js`);await e();return}else if(process.argv[2]===`--chrome-native-host`){t(`cli_chrome_native_host_path`);let{runChromeNativeHost:e}=await import(`./chunks/chromeNativeHost-BldB1Zzi.js`);await e();return}else if(process.argv[2]===`--computer-use-mcp`){t(`cli_computer_use_mcp_path`);let{runComputerUseMcpServer:e}=await import(`./chunks/mcpServer-BJNjQXsU.js`);await e();return}if(process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-CJlJ47nP.js`);await e();return}if(e[0]===`weixin`){t(`cli_weixin_path`);let{handleWeixinCli:n}=await import(`./chunks/src-BGzuPZ5q.js`),{enableConfigs:r}=await import(`./chunks/config-CJd9kJ57.js`),{initializeAnalyticsSink:i}=await import(`./chunks/sink-DFWgcGHX.js`),{shutdownDatadog:a}=await import(`./chunks/datadog-QSR9B7CZ.js`),{shutdown1PEventLogging:o}=await import(`./chunks/firstPartyEventLogger-CM0V7Uev.js`),{logForDebugging:s}=await import(`./chunks/debug-DIYxb3SF.js`),{ChannelPermissionRequestNotificationSchema:c}=await import(`./chunks/channelNotification-Cx82K1CD.js`);await n(e.slice(1),{enableConfigs:r,initializeAnalyticsSink:i,shutdownDatadog:a,shutdown1PEventLogging:o,logForDebugging:s,registerPermissionHandler(e,t){e.setNotificationHandler(c(),async e=>t(e.params))}},`2.7.1`);return}if(e[0]===`--daemon-worker`||e[0]?.startsWith(`--daemon-worker=`)){let t=e[0]===`--daemon-worker`?e[1]:e[0].split(`=`)[1],{runDaemonWorker:n}=await import(`./chunks/workerRegistry-Bx6FvTZF.js`);await n(t);return}if(e[0]===`remote-control`||e[0]===`rc`||e[0]===`remote`||e[0]===`sync`||e[0]===`bridge`){t(`cli_bridge_path`);let{enableConfigs:n}=await import(`./chunks/config-CJd9kJ57.js`);n();let{getBridgeDisabledReason:r,checkBridgeMinVersion:i}=await import(`./chunks/bridgeEnabled-DsG2JvIr.js`),{BRIDGE_LOGIN_ERROR:a}=await import(`./chunks/types-BCy5hsQR.js`),{bridgeMain:o}=await import(`./chunks/bridgeMain-DYCShrcV.js`),{exitWithError:s}=await import(`./chunks/process-CWupreF6.js`),{getClaudeAIOAuthTokens:c}=await import(`./chunks/auth-CvHVr2A5.js`),{getBridgeAccessToken:l}=await import(`./chunks/bridgeConfig-B49H_B9L.js`);!c()?.accessToken&&!l()&&s(a);let u=await r();u&&s(`Error: ${u}`);let d=i();d&&s(d);let{waitForPolicyLimitsToLoad:f,isPolicyAllowed:p}=await import(`./chunks/policyLimits-Cdp3QwZ1.js`);await f(),p(`allow_remote_control`)||s(`Error: Remote Control is disabled by your organization's policy.`),await o(e.slice(1));return}if(e[0]===`daemon`){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-CJd9kJ57.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);r();let{initSinks:i}=await import(`./chunks/sinks-BnkxTOU9.js`);i();let{daemonMain:a}=await import(`./chunks/main-CfkIGrBF.js`);await a(e.slice(1));return}if(e[0]===`autonomy`){t(`cli_autonomy_path`);let{getAutonomyCommandText:n}=await import(`./chunks/autonomy-TtBO2TAe.js`),r=await n(e.slice(1).join(` `));await new Promise((e,t)=>{process.stdout.write(`${r}\n`,n=>{if(n){t(n);return}e()})}),process.exit(0)}if(e.includes(`--bg`)||e.includes(`--background`)){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-CJd9kJ57.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);r(),await(await import(`./chunks/bg-CngkAkgc.js`)).handleBgStart(e.filter(e=>e!==`--bg`&&e!==`--background`));return}if(e[0]===`ps`||e[0]===`logs`||e[0]===`attach`||e[0]===`kill`){let n=e[0]===`ps`?`status`:e[0];console.error(`[deprecated] Use: claude daemon ${n}${e[1]?` `+e[1]:``}`),t(`cli_daemon_path`);let{enableConfigs:r}=await import(`./chunks/config-CJd9kJ57.js`);r();let{setShellIfWindows:i}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);i();let{initSinks:a}=await import(`./chunks/sinks-BnkxTOU9.js`);a();let{daemonMain:o}=await import(`./chunks/main-CfkIGrBF.js`);await o([e[0]===`ps`?`status`:e[0],...e.slice(1)]);return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-BDKGtmr3.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: claude job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-BDKGtmr3.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-CJd9kJ57.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-RtizNgNg.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-DPpgPLLG.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CWupreF6.js`);e(n.error)}}}e.length===1&&(e[0]===`--update`||e[0]===`--upgrade`)&&(process.argv=[process.argv[0],process.argv[1],`update`]),e.includes(`--bare`)&&(process.env.CLAUDE_CODE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-D3OhUZ4G.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-CNwSLti2.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
2
+ import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.7.2 (Claude Code)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-WtUzkMKV.js`);if(t(`cli_entry`),process.argv[2]===`--claude-in-chrome-mcp`){t(`cli_claude_in_chrome_mcp_path`);let{runClaudeInChromeMcpServer:e}=await import(`./chunks/mcpServer-DS0yRfcu.js`);await e();return}else if(process.argv[2]===`--chrome-native-host`){t(`cli_chrome_native_host_path`);let{runChromeNativeHost:e}=await import(`./chunks/chromeNativeHost-BldB1Zzi.js`);await e();return}else if(process.argv[2]===`--computer-use-mcp`){t(`cli_computer_use_mcp_path`);let{runComputerUseMcpServer:e}=await import(`./chunks/mcpServer-CLIYAgGs.js`);await e();return}if(process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-DHN_Gr1b.js`);await e();return}if(e[0]===`weixin`){t(`cli_weixin_path`);let{handleWeixinCli:n}=await import(`./chunks/src-BGzuPZ5q.js`),{enableConfigs:r}=await import(`./chunks/config-ODoYZY8i.js`),{initializeAnalyticsSink:i}=await import(`./chunks/sink-BSPyC453.js`),{shutdownDatadog:a}=await import(`./chunks/datadog-C-llbwzP.js`),{shutdown1PEventLogging:o}=await import(`./chunks/firstPartyEventLogger-DlW8BUXq.js`),{logForDebugging:s}=await import(`./chunks/debug-DIYxb3SF.js`),{ChannelPermissionRequestNotificationSchema:c}=await import(`./chunks/channelNotification-oZ6vG5R5.js`);await n(e.slice(1),{enableConfigs:r,initializeAnalyticsSink:i,shutdownDatadog:a,shutdown1PEventLogging:o,logForDebugging:s,registerPermissionHandler(e,t){e.setNotificationHandler(c(),async e=>t(e.params))}},`2.7.2`);return}if(e[0]===`--daemon-worker`||e[0]?.startsWith(`--daemon-worker=`)){let t=e[0]===`--daemon-worker`?e[1]:e[0].split(`=`)[1],{runDaemonWorker:n}=await import(`./chunks/workerRegistry-60_UCyc3.js`);await n(t);return}if(e[0]===`remote-control`||e[0]===`rc`||e[0]===`remote`||e[0]===`sync`||e[0]===`bridge`){t(`cli_bridge_path`);let{enableConfigs:n}=await import(`./chunks/config-ODoYZY8i.js`);n();let{getBridgeDisabledReason:r,checkBridgeMinVersion:i}=await import(`./chunks/bridgeEnabled-DLRIH243.js`),{BRIDGE_LOGIN_ERROR:a}=await import(`./chunks/types-BCy5hsQR.js`),{bridgeMain:o}=await import(`./chunks/bridgeMain-BN0Sag35.js`),{exitWithError:s}=await import(`./chunks/process-CWupreF6.js`),{getClaudeAIOAuthTokens:c}=await import(`./chunks/auth-DsQEVs9W.js`),{getBridgeAccessToken:l}=await import(`./chunks/bridgeConfig-BdZVEqhx.js`);!c()?.accessToken&&!l()&&s(a);let u=await r();u&&s(`Error: ${u}`);let d=i();d&&s(d);let{waitForPolicyLimitsToLoad:f,isPolicyAllowed:p}=await import(`./chunks/policyLimits-CFLBtFh3.js`);await f(),p(`allow_remote_control`)||s(`Error: Remote Control is disabled by your organization's policy.`),await o(e.slice(1));return}if(e[0]===`daemon`){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-ODoYZY8i.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);r();let{initSinks:i}=await import(`./chunks/sinks-CpuRIC3H.js`);i();let{daemonMain:a}=await import(`./chunks/main-CfkIGrBF.js`);await a(e.slice(1));return}if(e[0]===`autonomy`){t(`cli_autonomy_path`);let{getAutonomyCommandText:n}=await import(`./chunks/autonomy-Clap6Swl.js`),r=await n(e.slice(1).join(` `));await new Promise((e,t)=>{process.stdout.write(`${r}\n`,n=>{if(n){t(n);return}e()})}),process.exit(0)}if(e.includes(`--bg`)||e.includes(`--background`)){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-ODoYZY8i.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);r(),await(await import(`./chunks/bg-CngkAkgc.js`)).handleBgStart(e.filter(e=>e!==`--bg`&&e!==`--background`));return}if(e[0]===`ps`||e[0]===`logs`||e[0]===`attach`||e[0]===`kill`){let n=e[0]===`ps`?`status`:e[0];console.error(`[deprecated] Use: claude daemon ${n}${e[1]?` `+e[1]:``}`),t(`cli_daemon_path`);let{enableConfigs:r}=await import(`./chunks/config-ODoYZY8i.js`);r();let{setShellIfWindows:i}=await import(`./chunks/windowsPaths-ttHiMKpR.js`);i();let{initSinks:a}=await import(`./chunks/sinks-CpuRIC3H.js`);a();let{daemonMain:o}=await import(`./chunks/main-CfkIGrBF.js`);await o([e[0]===`ps`?`status`:e[0],...e.slice(1)]);return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-Ox5ZTKjW.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: claude job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-Ox5ZTKjW.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-ODoYZY8i.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-RtizNgNg.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-DNK8NprA.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CWupreF6.js`);e(n.error)}}}e.length===1&&(e[0]===`--update`||e[0]===`--upgrade`)&&(process.argv=[process.argv[0],process.argv[1],`update`]),e.includes(`--bare`)&&(process.env.CLAUDE_CODE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-D3OhUZ4G.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-qqcmncHA.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-best",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
5
5
  "type": "module",
6
6
  "author": "claude-code-best <claude-code-best@proton.me>",
@@ -1 +0,0 @@
1
- import{t as e}from"./ApproveApiKey-CSz0291w.js";export{e as ApproveApiKey};
@@ -1,2 +0,0 @@
1
- import{a as e,n as t,o as n,r}from"./chunk-DR8-3Aex.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{B as o,F as s,Q as c,Rn as l,T as u,b as d,f,g as p,h as m,nt as h,t as g,x as _}from"./src-Di342QoJ.js";import{t as v}from"./jsx-runtime-D-D469L8.js";import{Ko as y,Ps as b}from"./paths-Ci1iwL5Y.js";import{S as x,U as S,_ as C,z as w}from"./debug-otxXY3j-.js";import{n as T,r as ee}from"./analytics-DqMQntaB.js";import{S as te,b as E,x as D}from"./teammate-CbskW5G9.js";import{C as O,E as k,d as ne,f as re,m as ie,x as A}from"./startupProfiler-CAntGAbs.js";import{l as j,o as M}from"./stringUtils-KZoO4GUd.js";import{$u as N,A_ as ae,Au as oe,BE as se,Cv as ce,DT as le,Dv as ue,Eu as de,Ev as P,Fj as fe,Fv as pe,Ij as me,In as he,Mn as ge,Mu as _e,OT as ve,Oo as ye,Pn as be,Pu as xe,Qh as Se,Qu as Ce,Uo as we,Uu as Te,Wu as Ee,Xg as De,Xy as F,Yy as I,Zg as Oe,Zo as ke,aS as Ae,ab as je,bp as Me,da as Ne,db as Pe,eb as Fe,eg as Ie,eo as Le,fC as Re,fb as ze,j_ as Be,jn as Ve,ku as He,lC as Ue,la as We,lb as Ge,nC as Ke,oS as qe,rC as Je,sS as Ye,uC as Xe,uS as Ze,ub as Qe,vp as $e,xp as et,yp as tt,zE as nt,zv as rt}from"./loadAgentsDir-C_wFhytF.js";import{Qn as it,Xn as at,Zn as ot,fn as st,sn as ct}from"./prompt-6ZKyqv6z.js";import{n as lt,t as ut}from"./browser-Bt-ckCaU.js";import{t as L}from"./useKeybinding-DPOUuymz.js";import{t as dt}from"./useTerminalSize-Du-EamDN.js";import{a as ft,c as pt}from"./constants-BljlAJOX.js";import{t as mt}from"./Dialog-91X6ZGg9.js";import{i as ht,n as gt}from"./mappers-Dxs_kNJH.js";function _t(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`local_agent`}function vt(e){return{...e,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:ge(e.status)?Date.now()+St:void 0}}function yt(e,t){ee(`tengu_transcript_view_enter`,{}),t(t=>{let n=t.tasks[e],r=t.viewingAgentTaskId,i=r===void 0?void 0:t.tasks[r],a=r!==void 0&&r!==e&&_t(i)&&i.retain,o=_t(n)&&(!n.retain||n.evictAfter!==void 0),s=t.viewingAgentTaskId!==e||t.viewSelectionMode!==`viewing-agent`;if(!o&&!s&&!a)return t;let c=t.tasks;return(a||o)&&(c={...t.tasks},a&&(c[r]=vt(i)),o&&(c[e]={...n,retain:!0,evictAfter:void 0})),{...t,viewingAgentTaskId:e,viewSelectionMode:`viewing-agent`,tasks:c}})}function bt(e){ee(`tengu_transcript_view_exit`,{}),e(e=>{let t=e.viewingAgentTaskId,n={...e,viewingAgentTaskId:void 0,viewSelectionMode:`none`};if(t===void 0)return e.viewSelectionMode===`none`?e:n;let r=e.tasks[t];return!_t(r)||!r.retain?n:{...n,tasks:{...e.tasks,[t]:vt(r)}}})}function xt(e,t){t(t=>{let n=t.tasks[e];if(!_t(n))return t;if(n.status===`running`)return n.abortController?.abort(),t;if(n.evictAfter===0)return t;let r=t.viewingAgentTaskId===e;return{...t,tasks:{...t.tasks,[e]:{...vt(n),evictAfter:0}},...r&&{viewingAgentTaskId:void 0,viewSelectionMode:`none`}}})}var St,Ct=t((()=>{T(),Ve(),St=3e4}));function wt(e,t,n){let r=at(t,e.toolName);if(!r)return e.toolName;try{let t=r.inputSchema.safeParse(e.input),i=t.success?t.data:{},a=r.userFacingName(i);if(!a)return e.toolName;let o=r.renderToolUseMessage(i,{theme:n,verbose:!1});return o?(0,Tt.jsxs)(d,{children:[a,`(`,o,`)`]}):a}catch{return e.toolName}}var Tt,Et=t((()=>{l(),g(),it(),Tt=v()}));function Dt(e){return e===`completed`||e===`failed`||e===`killed`}function Ot(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:o}=t??{};return i?a.cross:r?a.questionMarkPrefix:o?a.warning:e===`running`?n?a.ellipsis:a.play:e===`completed`?a.tick:e===`failed`||e===`killed`?a.cross:a.bullet}function kt(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:a}=t??{};return i?`error`:r||a?`warning`:n?`background`:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:`background`}function At(e){return e.shutdownRequested?`stopping`:e.awaitingPlanApproval?`awaiting approval`:e.isIdle?`idle`:(e.progress?.recentActivities&&Ee(e.progress.recentActivities))??e.progress?.lastActivity?.activityDescription??`working`}function jt(e,t){if(!t)return!1;let n=!1;for(let t of Object.values(e))if(!(!Qe(t)||process.env.USER_TYPE===`ant`&&xe(t))&&(n=!0,t.type!==`in_process_teammate`))return!1;return n}var Mt=t((()=>{i(),_e(),Ge(),Te()}));function Nt({agent:e,onDone:t,onKillAgent:n,onBack:r}){let[i]=u(),a=(0,Pt.useMemo)(()=>Ce(ot()),[]),o=F(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);h({"confirm:yes":t},{context:`Confirmation`});let s=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},c=ye(e.prompt,`plan`),l=e.prompt.length>300?e.prompt.substring(0,297)+`…`:e.prompt,g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount;return(0,R.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:s,children:(0,R.jsx)(f,{title:(0,R.jsxs)(d,{children:[e.selectedAgent?.agentType??`agent`,` › `,e.description||`Async agent`]}),subtitle:(0,R.jsxs)(d,{children:[e.status!==`running`&&(0,R.jsxs)(d,{color:kt(e.status),children:[Ot(e.status),` `,e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,R.jsxs)(d,{dimColor:!0,children:[o,g!==void 0&&g>0&&(0,R.jsxs)(R.Fragment,{children:[` · `,ie(g),` tokens`]}),v!==void 0&&v>0&&(0,R.jsxs)(R.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,R.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,R.jsxs)(m,{children:[r&&(0,R.jsx)(p,{shortcut:`←`,action:`go back`}),(0,R.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,R.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,R.jsxs)(_,{flexDirection:`column`,children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,R.jsxs)(_,{flexDirection:`column`,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,R.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,wt(t,a,i)]},n))]}),c?(0,R.jsx)(_,{marginTop:1,children:(0,R.jsx)(De,{addMargin:!1,planContent:c})}):(0,R.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,R.jsx)(d,{wrap:`wrap`,children:l})]}),e.status===`failed`&&e.error&&(0,R.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,R.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})})}var Pt,R,Ft=t((()=>{Pt=n(l(),1),I(),g(),L(),it(),N(),A(),we(),Oe(),Et(),Mt(),R=v()}));function It(e,t,n,r){if(!e)return`${t} found · ${n} verified`;if(e===`synthesizing`){let e=[`${n} verified`];return r>0&&e.push(`${r} refuted`),e.push(`deduping`),e.join(` · `)}if(e===`verifying`){let e=[`${t} found`,`${n} verified`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return t>0?`${t} found`:`finding`}function Lt({text:e,phase:t=0}){return(0,z.jsx)(z.Fragment,{children:[...e].map((e,n)=>(0,z.jsx)(d,{color:fe(n+t),children:e},n))})}function Rt(e,t,n){let r=(0,Vt.useRef)(e),i=(0,Vt.useRef)(t);return n||e<r.current?r.current=e:e>r.current&&t!==i.current&&(r.current+=1,i.current=t),r.current}function zt({session:e}){let t=Je().prefersReducedMotion??!1,n=e.reviewProgress,r=e.status===`running`,[,i]=o(r&&!t?Ht:null),a=n?.bugsFound??0,s=n?.bugsVerified??0,c=n?.bugsRefuted??0,l=t||!r,u=Rt(a,i,l),f=Rt(s,i,l),p=Rt(c,i,l),m=Math.floor(i/(Ht*3))%7;if(e.status===`completed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(Lt,{text:`ultrareview`,phase:0}),(0,z.jsx)(d,{dimColor:!0,children:` ready · shift+↓ to view`})]});if(e.status===`failed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(Lt,{text:`ultrareview`,phase:0}),(0,z.jsxs)(d,{color:`error`,dimColor:!0,children:[` · `,`error`]})]});let h=n?It(n.stage,u,f,p):`setting up`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◇`,` `]}),(0,z.jsx)(Lt,{text:`ultrareview`,phase:r?m:0}),(0,z.jsxs)(d,{dimColor:!0,children:[` · `,h]})]})}function Bt({session:e}){if(e.isRemoteReview)return(0,z.jsx)(zt,{session:e});if(e.status===`completed`)return(0,z.jsx)(d,{bold:!0,color:`success`,dimColor:!0,children:`done`});if(e.status===`failed`)return(0,z.jsx)(d,{bold:!0,color:`error`,dimColor:!0,children:`error`});if(!e.todoList.length)return(0,z.jsxs)(d,{dimColor:!0,children:[e.status,`…`]});let t=E(e.todoList,e=>e.status===`completed`),n=e.todoList.length;return(0,z.jsxs)(d,{dimColor:!0,children:[t,`/`,n]})}var Vt,z,Ht,Ut=t((()=>{Vt=n(l(),1),b(),Ke(),g(),D(),me(),z=v(),Ht=80}));function B({status:e,label:t,suffix:n}){return(0,V.jsxs)(d,{color:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:void 0,dimColor:!0,children:[`(`,t??e,n,`)`]})}function Wt({shell:e}){switch(e.status){case`completed`:return(0,V.jsx)(B,{status:`completed`,label:`done`});case`failed`:return(0,V.jsx)(B,{status:`failed`,label:`error`});case`killed`:return(0,V.jsx)(B,{status:`killed`,label:`stopped`});case`running`:case`pending`:return(0,V.jsx)(B,{status:`running`})}}var V,Gt=t((()=>{g(),V=v()}));function Kt({task:e,maxActivityWidth:t}){let n=t??40;switch(e.type){case`local_bash`:return(0,H.jsxs)(d,{children:[O(e.kind===`monitor`?e.description:e.command,n,!0),` `,(0,H.jsx)(Wt,{shell:e})]});case`remote_agent`:return e.isRemoteReview?(0,H.jsx)(d,{children:(0,H.jsx)(Bt,{session:e})}):(0,H.jsxs)(d,{children:[(0,H.jsxs)(d,{dimColor:!0,children:[e.status===`running`||e.status===`pending`?`◇`:`◆`,` `]}),O(e.title,n,!0),(0,H.jsx)(d,{dimColor:!0,children:` · `}),(0,H.jsx)(Bt,{session:e})]});case`local_agent`:return(0,H.jsxs)(d,{children:[O(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`in_process_teammate`:{let t=At(e);return(0,H.jsxs)(d,{children:[(0,H.jsxs)(d,{color:ze(e.identity.color),children:[`@`,e.identity.agentName]}),(0,H.jsxs)(d,{dimColor:!0,children:[`: `,O(t,n,!0)]})]})}case`local_workflow`:{let t=e;return(0,H.jsxs)(d,{children:[O(t.workflowName??e.summary??e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`running`?`${t.agentCount} ${j(t.agentCount,`agent`)}`:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}case`monitor_mcp`:return(0,H.jsxs)(d,{children:[O(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`dream`:{let t=e.filesTouched.length,n=e.phase===`updating`&&t>0?`${t} ${j(t,`file`)}`:`${e.sessionsReviewing} ${j(e.sessionsReviewing,`session`)}`;return(0,H.jsxs)(d,{children:[e.description,` `,(0,H.jsxs)(d,{dimColor:!0,children:[`· `,e.phase,` · `,n]}),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}}}var H,qt=t((()=>{l(),g(),Pe(),A(),M(),b(),Ut(),Gt(),Mt(),H=v()}));function Jt({task:e,onDone:t,onBack:n,onKill:r}){let i=F(e.startTime,e.status===`running`,1e3,0);h({"confirm:yes":t},{context:`Confirmation`});let a=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&n?(i.preventDefault(),n()):i.key===`x`&&e.status===`running`&&r&&(i.preventDefault(),r())},o=e.turns.filter(e=>e.text!==``),s=o.slice(-Yt),c=o.length-s.length;return(0,U.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:a,children:(0,U.jsx)(f,{title:`Memory consolidation`,subtitle:(0,U.jsxs)(d,{dimColor:!0,children:[i,` · reviewing `,e.sessionsReviewing,` `,j(e.sessionsReviewing,`session`),e.filesTouched.length>0&&(0,U.jsxs)(U.Fragment,{children:[` `,`· `,e.filesTouched.length,` `,j(e.filesTouched.length,`file`),` touched`]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,U.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,U.jsxs)(m,{children:[n&&(0,U.jsx)(p,{shortcut:`←`,action:`go back`}),(0,U.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&r&&(0,U.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,U.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,U.jsxs)(d,{children:[(0,U.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,U.jsx)(d,{color:`background`,children:`running`}):e.status===`completed`?(0,U.jsx)(d,{color:`success`,children:e.status}):(0,U.jsx)(d,{color:`error`,children:e.status})]}),s.length===0?(0,U.jsx)(d,{dimColor:!0,children:e.status===`running`?`Starting…`:`(no text output)`}):(0,U.jsxs)(U.Fragment,{children:[c>0&&(0,U.jsxs)(d,{dimColor:!0,children:[`(`,c,` earlier `,j(c,`turn`),`)`]}),s.map((e,t)=>(0,U.jsxs)(_,{flexDirection:`column`,children:[(0,U.jsx)(d,{wrap:`wrap`,children:e.text}),e.toolUseCount>0&&(0,U.jsxs)(d,{dimColor:!0,children:[` `,`(`,e.toolUseCount,` `,j(e.toolUseCount,`tool`),`)`]})]},t))]})]})})})}var U,Yt,Xt=t((()=>{l(),I(),g(),L(),M(),U=v(),Yt=6}));function Zt({teammate:e,onDone:t,onKill:n,onBack:r,onForeground:i}){let[a]=u(),o=(0,Qt.useMemo)(()=>Ce(ot()),[]),s=F(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);h({"confirm:yes":t},{context:`Confirmation`});let c=a=>{a.key===` `?(a.preventDefault(),t()):a.key===`left`&&r?(a.preventDefault(),r()):a.key===`x`&&e.status===`running`&&n?(a.preventDefault(),n()):a.key===`f`&&e.status===`running`&&i&&(a.preventDefault(),i())},l=At(e),g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount,y=k(e.prompt,300);return(0,W.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:c,children:(0,W.jsxs)(f,{title:(0,W.jsxs)(d,{children:[(0,W.jsxs)(d,{color:ze(e.identity.color),children:[`@`,e.identity.agentName]}),l&&(0,W.jsxs)(d,{dimColor:!0,children:[` (`,l,`)`]})]}),subtitle:(0,W.jsxs)(d,{children:[e.status!==`running`&&(0,W.jsxs)(d,{color:e.status===`completed`?`success`:e.status===`killed`?`warning`:`error`,children:[e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,W.jsxs)(d,{dimColor:!0,children:[s,g!==void 0&&g>0&&(0,W.jsxs)(W.Fragment,{children:[` · `,ie(g),` tokens`]}),v!==void 0&&v>0&&(0,W.jsxs)(W.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,W.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,W.jsxs)(m,{children:[r&&(0,W.jsx)(p,{shortcut:`←`,action:`go back`}),(0,W.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,W.jsx)(p,{shortcut:`x`,action:`stop`}),e.status===`running`&&i&&(0,W.jsx)(p,{shortcut:`f`,action:`foreground`})]}),children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,W.jsxs)(_,{flexDirection:`column`,children:[(0,W.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,W.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,wt(t,o,a)]},n))]}),(0,W.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,W.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,W.jsx)(d,{wrap:`wrap`,children:y})]}),e.status===`failed`&&e.error&&(0,W.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,W.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,W.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})}var Qt,W,$t=t((()=>{Qt=n(l(),1),I(),g(),L(),it(),N(),A(),Pe(),Et(),Mt(),W=v()}));function en(e,t){if(e===`ExitPlanMode`)return`Review the plan in Claude Code on the web`;if(!t||typeof t!=`object`)return e;if(e===`AskUserQuestion`&&`questions`in t){let e=t.questions;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`){let t=`question`in e[0]&&typeof e[0].question==`string`&&e[0].question?e[0].question:`header`in e[0]&&typeof e[0].header==`string`?e[0].header:null;if(t)return`Answer in browser: ${k(t.replace(/\s+/g,` `).trim(),50)}`}}for(let n of Object.values(t))if(typeof n==`string`&&n.trim())return`${e} ${k(n.replace(/\s+/g,` `).trim(),60)}`;return e}function tn({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`running`||e.status===`pending`,o=e.ultraplanPhase,s=i?o?sn[o]:`running`:e.status,l=F(e.startTime,i,1e3,0,e.endTime),{agentsWorking:u,toolCalls:p,lastToolCall:m}=(0,G.useMemo)(()=>{let t=0,n=0,r=null;for(let i of e.log){if(i.type!==`assistant`)continue;let e=i.message?.content??[];for(let i of e)i.type===`tool_use`&&(n++,r=i,(i.name===`Agent`||i.name===`Task`)&&t++)}return{agentsWorking:1+t,toolCalls:n,lastToolCall:r?en(r.name,r.input):null}},[e.log]),h=P(e.sessionId),g=n??(()=>t(`Remote session details dismissed`,{display:`system`})),[v,y]=(0,G.useState)(!1);return v?(0,K.jsx)(f,{title:`Stop ultraplan?`,onCancel:()=>y(!1),color:`background`,children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsx)(d,{dimColor:!0,children:`This will terminate the Claude Code on the web session.`}),(0,K.jsx)(Ae,{options:[{label:`Terminate session`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),g()):y(!1)}})]})}):(0,K.jsx)(f,{title:(0,K.jsxs)(d,{children:[(0,K.jsxs)(d,{color:`background`,children:[o===`plan_ready`?`◆`:`◇`,` `]}),(0,K.jsx)(d,{bold:!0,children:`ultraplan`}),(0,K.jsxs)(d,{dimColor:!0,children:[` · `,l,` · `,s]})]}),onCancel:g,color:`background`,children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsxs)(d,{children:[o===`plan_ready`&&(0,K.jsxs)(d,{color:`success`,children:[a.tick,` `]}),u,` `,j(u,`agent`),` `,o?cn[o]:`working`,` · `,p,` tool`,` `,j(p,`call`)]}),m&&(0,K.jsx)(d,{dimColor:!0,children:m}),(0,K.jsx)(c,{url:h,children:(0,K.jsx)(d,{dimColor:!0,children:h})}),(0,K.jsx)(Ae,{options:[{label:`Review in Claude Code on the web`,value:`open`},...r&&i?[{label:`Stop ultraplan`,value:`stop`}]:[],{label:`Back`,value:`back`}],onChange:e=>{switch(e){case`open`:lt(h),t();return;case`stop`:y(!0);return;case`back`:g();return}}})]})})}function nn({stage:e,completed:t,hasProgress:n}){let r=e?ln.indexOf(e):-1,i=!t&&!n;return(0,K.jsxs)(d,{children:[i?(0,K.jsx)(d,{color:`background`,children:`Setup`}):(0,K.jsx)(d,{dimColor:!0,children:`Setup`}),(0,K.jsx)(d,{dimColor:!0,children:` → `}),ln.map((e,n)=>{let a=!t&&!i&&n===r;return(0,K.jsxs)(G.Fragment,{children:[n>0&&(0,K.jsx)(d,{dimColor:!0,children:` → `}),a?(0,K.jsx)(d,{color:`background`,children:un[e]}):(0,K.jsx)(d,{dimColor:!0,children:un[e]})]},e)}),t&&(0,K.jsx)(d,{color:`success`,children:` ✓`})]})}function rn(e){let t=e.reviewProgress;if(!t)return e.status===`completed`?`done`:`setting up`;let n=t.bugsVerified,r=t.bugsRefuted??0;if(e.status===`completed`){let e=[`${n} ${j(n,`finding`)}`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return It(t.stage,t.bugsFound,n,r)}function an({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`completed`,a=e.status===`running`||e.status===`pending`,[o,s]=(0,G.useState)(!1),l=F(e.startTime,a,1e3,0,e.endTime),u=()=>t(`Remote session details dismissed`,{display:`system`}),h=n??u,g=P(e.sessionId),v=i?`ready`:a?`running`:e.status;if(o)return(0,K.jsx)(f,{title:`Stop ultrareview?`,onCancel:()=>s(!1),color:`background`,children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsx)(d,{dimColor:!0,children:`This archives the remote session and stops local tracking. The review will not complete and any findings so far are discarded.`}),(0,K.jsx)(Ae,{options:[{label:`Stop ultrareview`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),h()):s(!1)}})]})});let y=i?[{label:`Open in Claude Code on the web`,value:`open`},{label:`Dismiss`,value:`dismiss`}]:[{label:`Open in Claude Code on the web`,value:`open`},...r&&a?[{label:`Stop ultrareview`,value:`stop`}]:[],{label:`Back`,value:`back`}];return(0,K.jsx)(f,{title:(0,K.jsxs)(d,{children:[(0,K.jsxs)(d,{color:`background`,children:[i?`◆`:`◇`,` `]}),(0,K.jsx)(d,{bold:!0,children:`ultrareview`}),(0,K.jsxs)(d,{dimColor:!0,children:[` · `,l,` · `,v]})]}),onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,K.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,K.jsxs)(m,{children:[(0,K.jsx)(p,{shortcut:`Enter`,action:`select`}),(0,K.jsx)(p,{shortcut:`Esc`,action:`go back`})]}),children:(0,K.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,K.jsx)(nn,{stage:e.reviewProgress?.stage,completed:i,hasProgress:!!e.reviewProgress}),(0,K.jsxs)(_,{flexDirection:`column`,children:[(0,K.jsx)(d,{children:rn(e)}),(0,K.jsx)(c,{url:g,children:(0,K.jsx)(d,{dimColor:!0,children:g})})]}),(0,K.jsx)(Ae,{options:y,onChange:e=>{switch(e){case`open`:lt(g),t();break;case`stop`:s(!0);break;case`back`:h();break;case`dismiss`:u();break}}})]})})}function on({session:e,toolUseContext:t,onDone:n,onBack:r,onKill:i}){let[a,o]=(0,G.useState)(!1),[s,l]=(0,G.useState)(null),u=(0,G.useMemo)(()=>e.isUltraplan||e.isRemoteReview?[]:ke(ht(e.log)).filter(e=>e.type!==`progress`).slice(-3),[e]);if(e.isUltraplan)return(0,K.jsx)(tn,{session:e,onDone:n,onBack:r,onKill:i});if(e.isRemoteReview)return(0,K.jsx)(an,{session:e,onDone:n,onBack:r,onKill:i});let h=()=>n(`Remote session details dismissed`,{display:`system`}),g=e=>{e.key===` `?(e.preventDefault(),n(`Remote session details dismissed`,{display:`system`})):e.key===`left`&&r?(e.preventDefault(),r()):e.key===`t`&&!a?(e.preventDefault(),v()):e.key===`return`&&(e.preventDefault(),h())};async function v(){o(!0),l(null);try{await rt(e.sessionId)}catch(e){l(w(e))}finally{o(!1)}}let y=k(e.title,50),b=e.status===`pending`?`starting`:e.status;return(0,K.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:g,children:(0,K.jsxs)(f,{title:`Remote session details`,onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,K.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,K.jsxs)(m,{children:[r&&(0,K.jsx)(p,{shortcut:`←`,action:`go back`}),(0,K.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),!a&&(0,K.jsx)(p,{shortcut:`t`,action:`teleport`})]}),children:[(0,K.jsxs)(_,{flexDirection:`column`,children:[(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Status`}),`:`,` `,b===`running`||b===`starting`?(0,K.jsx)(d,{color:`background`,children:b}):b===`completed`?(0,K.jsx)(d,{color:`success`,children:b}):(0,K.jsx)(d,{color:`error`,children:b})]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Runtime`}),`: `,ne((e.endTime??Date.now())-e.startTime)]}),(0,K.jsxs)(d,{wrap:`truncate-end`,children:[(0,K.jsx)(d,{bold:!0,children:`Title`}),`: `,y]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Progress`}),`: `,(0,K.jsx)(Bt,{session:e})]}),(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Session URL`}),`:`,` `,(0,K.jsx)(c,{url:P(e.sessionId),children:(0,K.jsx)(d,{dimColor:!0,children:P(e.sessionId)})})]})]}),e.log.length>0&&(0,K.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,K.jsxs)(d,{children:[(0,K.jsx)(d,{bold:!0,children:`Recent messages`}),`:`]}),(0,K.jsx)(_,{flexDirection:`column`,height:10,overflowY:`hidden`,children:u.map((e,n)=>(0,K.jsx)(Se,{message:e,lookups:Le,addMargin:n>0,tools:t.options.tools,commands:t.options.commands,verbose:t.options.verbose,inProgressToolUseIDs:new Set,progressMessagesForMessage:[],shouldAnimate:!1,shouldShowDot:!1,style:`condensed`,isTranscriptMode:!1,isStatic:!0},n))}),(0,K.jsx)(_,{marginTop:1,children:(0,K.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing last `,u.length,` of `,e.log.length,` messages`]})})]}),s&&(0,K.jsx)(_,{marginTop:1,children:(0,K.jsxs)(d,{color:`error`,children:[`Teleport failed: `,s]})}),a&&(0,K.jsx)(d,{color:`background`,children:`Teleporting to session…`})]})})}var G,K,sn,cn,ln,un,dn=t((()=>{i(),G=n(l(),1),b(),I(),g(),ue(),y(),ct(),st(),ut(),S(),A(),gt(),we(),M(),pe(),qe(),Ie(),Ut(),K=v(),sn={needs_input:`input required`,plan_ready:`ready`},cn={needs_input:`waiting`,plan_ready:`done`},ln=[`finding`,`verifying`,`synthesizing`],un={finding:`Find`,verifying:`Verify`,synthesizing:`Dedupe`}}));async function fn(e){let t=be(e.id);try{let e=await x(t,hn);return{content:e.content,bytesTotal:e.bytesTotal}}catch{return{content:``,bytesTotal:0}}}function pn({shell:e,onDone:t,onKillShell:n,onBack:r}){let{columns:i}=s(),[a,o]=(0,q.useState)(()=>fn(e)),c=(0,q.useDeferredValue)(a);(0,q.useEffect)(()=>{if(e.status!==`running`)return;let t=setInterval((e,t)=>e(fn(t)),1e3,o,e);return()=>clearInterval(t)},[e.id,e.status]);let l=()=>t(`Shell details dismissed`,{display:`system`});h({"confirm:yes":l},{context:`Confirmation`});let u=i=>{i.key===` `?(i.preventDefault(),t(`Shell details dismissed`,{display:`system`})):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},g=e.kind===`monitor`,v=k(e.command,280);return(0,J.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:u,children:(0,J.jsxs)(f,{title:g?`Monitor details`:`Shell details`,onCancel:l,color:`background`,inputGuide:t=>t.pending?(0,J.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,J.jsxs)(m,{children:[r&&(0,J.jsx)(p,{shortcut:`←`,action:`go back`}),(0,J.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,J.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:[(0,J.jsxs)(_,{flexDirection:`column`,children:[(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,J.jsxs)(d,{color:`background`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):e.status===`completed`?(0,J.jsxs)(d,{color:`success`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):(0,J.jsxs)(d,{color:`error`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]})]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Runtime:`}),` `,ne((e.endTime??Date.now())-e.startTime)]}),(0,J.jsxs)(d,{wrap:`wrap`,children:[(0,J.jsx)(d,{bold:!0,children:g?`Script:`:`Command:`}),` `,v]})]}),(0,J.jsxs)(_,{flexDirection:`column`,children:[(0,J.jsx)(d,{bold:!0,children:`Output:`}),(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(d,{dimColor:!0,children:`Loading output…`}),children:(0,J.jsx)(mn,{outputPromise:c,columns:i})})]})]})})}function mn({outputPromise:e,columns:t}){let{content:n,bytesTotal:r}=(0,q.use)(e);if(!n)return(0,J.jsx)(d,{dimColor:!0,children:`No output available`});let i=[],a=n.length;for(let e=0;e<10&&a>0;e++){let e=n.lastIndexOf(`
2
- `,a-1);i.push(e+1),a=e}i.reverse();let o=r>n.length,s=[];for(let e=0;e<i.length;e++){let t=i[e],r=e<i.length-1?i[e+1]-1:n.length,a=n.slice(t,r);a&&s.push(a)}return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(_,{borderStyle:`round`,paddingX:1,flexDirection:`column`,height:12,maxWidth:t-6,children:s.map((e,t)=>(0,J.jsx)(d,{wrap:`truncate-end`,children:e},t))}),(0,J.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing ${s.length} lines`,o?` of ${re(r)}`:``]})]})}var q,J,hn,gn=t((()=>{q=n(l(),1),dt(),g(),L(),A(),C(),he(),J=v(),hn=8192})),_n=t((()=>{g()})),vn=t((()=>{g()})),yn=r({MonitorMcpDetailDialog:()=>bn});function bn({task:e,onBack:t,onKill:n}){let r=F(e.startTime,e.status===`running`,1e3,0);return h({},{context:`MonitorMcpDetail`}),(0,Y.jsx)(_,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:r=>{r.key===`left`&&t?(r.preventDefault(),t()):r.key===`x`&&e.status===`running`&&n&&(r.preventDefault(),n())},children:(0,Y.jsx)(f,{title:`MCP Monitor`,subtitle:(0,Y.jsxs)(d,{dimColor:!0,children:[r,` · `,e.serverName,`:`,e.resourceUri]}),onCancel:t??(()=>{}),inputGuide:()=>(0,Y.jsxs)(m,{children:[t&&(0,Y.jsx)(p,{shortcut:`←`,action:`go back`}),(0,Y.jsx)(p,{shortcut:`Esc`,action:`close`}),e.status===`running`&&n&&(0,Y.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,Y.jsx)(d,{color:`ansi:green`,children:`running`}):e.status===`completed`?(0,Y.jsx)(d,{color:`ansi:green`,children:e.status}):(0,Y.jsx)(d,{color:`ansi:red`,children:e.status})]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Description:`}),` `,e.description]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Server:`}),` `,e.serverName]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Resource:`}),` `,e.resourceUri]}),e.command&&(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Command:`}),` `,e.command]})]})})})}var Y,xn=t((()=>{l(),I(),g(),L(),_n(),mt(),vn(),Y=v()}));function Sn(e,t){return Object.values(e??{}).filter(Qe).filter(e=>!(e.type===`local_agent`&&e.id===t))}function Cn({onDone:e,toolUseContext:t,initialDetailTaskId:n}){let r=Xe(e=>e.tasks),i=Xe(e=>e.foregroundedTaskId),a=Xe(e=>e.expandedView)===`teammates`,o=Re(),s=ve(`chat:killAgents`,`Chat`,`ctrl+x ctrl+k`),c=r,l=(0,Z.useRef)(!1),[u,g]=(0,Z.useState)(()=>{if(n)return l.current=!0,{mode:`detail`,itemId:n};let e=Sn(c,i);return e.length===1?(l.current=!0,{mode:`detail`,itemId:e[0].id}):{mode:`list`}}),[v,y]=(0,Z.useState)(0);Ze(`background-tasks-dialog`);let{bashTasks:b,remoteSessions:x,agentTasks:S,teammateTasks:C,workflowTasks:w,mcpMonitors:T,dreamTasks:ee,allSelectableItems:D}=(0,Z.useMemo)(()=>{let e=Object.values(c??{}).filter(Qe).map(wn).sort((e,t)=>{let n=e.status,r=t.status;if(n===`running`&&r!==`running`)return-1;if(n!==`running`&&r===`running`)return 1;let i=`task`in e?e.task.startTime:0;return(`task`in t?t.task.startTime:0)-i}),t=e.filter(e=>e.type===`local_bash`),n=e.filter(e=>e.type===`remote_agent`),r=e.filter(e=>e.type===`local_agent`&&e.id!==i),o=e.filter(e=>e.type===`local_workflow`),s=e.filter(e=>e.type===`monitor_mcp`),l=e.filter(e=>e.type===`dream`),u=a?[]:e.filter(e=>e.type===`in_process_teammate`),d=u.length>0?[{id:`__leader__`,type:`leader`,label:`@${ft}`,status:`running`}]:[];return{bashTasks:t,remoteSessions:n,agentTasks:r,workflowTasks:o,mcpMonitors:s,dreamTasks:l,teammateTasks:[...d,...u],allSelectableItems:[...d,...u,...t,...s,...n,...r,...o,...l]}},[c,i,a]),O=D[v]??null;h({"confirm:previous":()=>y(e=>Math.max(0,e-1)),"confirm:next":()=>y(e=>Math.min(D.length-1,e+1)),"confirm:yes":()=>{let t=D[v];t&&(t.type===`leader`?(bt(o),e(`Viewing leader`,{display:`system`})):g({mode:`detail`,itemId:t.id}))}},{context:`Confirmation`,isActive:u.mode===`list`});let k=t=>{if(u.mode!==`list`)return;if(t.key===`left`){t.preventDefault(),e(`Background tasks dialog dismissed`,{display:`system`});return}let n=D[v];n&&(t.key===`x`&&(t.preventDefault(),n.type===`local_bash`&&n.status===`running`?ne(n.id):n.type===`local_agent`&&n.status===`running`?re(n.id):n.type===`in_process_teammate`&&n.status===`running`?ie(n.id):n.type===`local_workflow`&&n.status===`running`&&$?$(n.id,o):n.type===`monitor_mcp`&&n.status===`running`&&En?En(n.id,o):n.type===`dream`&&n.status===`running`?A(n.id):n.type===`remote_agent`&&n.status===`running`&&(n.task.isUltraplan?Ne(n.id,n.task.sessionId,o):j(n.id))),t.key===`f`&&(n.type===`in_process_teammate`&&n.status===`running`?(t.preventDefault(),yt(n.id,o),e(`Viewing teammate`,{display:`system`})):n.type===`leader`&&(t.preventDefault(),bt(o),e(`Viewing leader`,{display:`system`}))))};async function ne(e){await de.kill(e,o)}async function re(e){await oe.kill(e,o)}async function ie(e){await Fe.kill(e,o)}async function A(e){await Me.kill(e,o)}async function j(e){await ce.kill(e,o)}let M=(0,Z.useEffectEvent)(e);(0,Z.useEffect)(()=>{if(u.mode!==`list`){let e=(c??{})[u.itemId];(!e||e.type!==`local_workflow`&&!Qe(e))&&(l.current?M(`Background tasks dialog dismissed`,{display:`system`}):g({mode:`list`}))}let e=D.length;v>=e&&e>0&&y(e-1)},[u,c,v,D,M]);let N=()=>{l.current&&D.length<=1?e(`Background tasks dialog dismissed`,{display:`system`}):(l.current=!1,g({mode:`list`}))};if(u.mode!==`list`&&c){let n=c[u.itemId];if(!n)return null;switch(n.type){case`local_bash`:return(0,Q.jsx)(pn,{shell:n,onDone:e,onKillShell:()=>void ne(n.id),onBack:N},`shell-${n.id}`);case`local_agent`:return(0,Q.jsx)(Nt,{agent:n,onDone:e,onKillAgent:()=>void re(n.id),onBack:N},`agent-${n.id}`);case`remote_agent`:return(0,Q.jsx)(on,{session:n,onDone:e,toolUseContext:t,onBack:N,onKill:n.status===`running`?n.isUltraplan?()=>void Ne(n.id,n.sessionId,o):()=>void j(n.id):void 0},`session-${n.id}`);case`in_process_teammate`:return(0,Q.jsx)(Zt,{teammate:n,onDone:e,onKill:n.status===`running`?()=>void ie(n.id):void 0,onBack:N,onForeground:n.status===`running`?()=>{yt(n.id,o),e(`Viewing teammate`,{display:`system`})}:void 0},`teammate-${n.id}`);case`local_workflow`:{let e=n.status===`running`&&$?()=>$(n.id,o):void 0;return(0,Q.jsx)(_,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:t=>{t.key===`left`?(t.preventDefault(),N()):t.key===`x`&&e&&(t.preventDefault(),e())},children:(0,Q.jsx)(f,{title:n.workflowName,subtitle:(0,Q.jsxs)(d,{dimColor:!0,children:[n.status,n.summary?` · ${n.summary}`:``]}),onCancel:N,inputGuide:()=>(0,Q.jsxs)(m,{children:[(0,Q.jsx)(p,{shortcut:`←`,action:`go back`}),(0,Q.jsx)(p,{shortcut:`Esc`,action:`close`}),e&&(0,Q.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:n.status===`failed`&&n.error?(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsxs)(d,{color:`error`,children:[`失败原因:`,n.error]}),(0,Q.jsx)(d,{color:`subtle`,children:`用 /workflows 查看阶段与 agent 实时进度`})]}):(0,Q.jsx)(d,{color:`subtle`,children:`用 /workflows 查看阶段与 agent 实时进度`})})},`workflow-${n.id}`)}case`monitor_mcp`:return Dn?(0,Q.jsx)(Dn,{task:n,onKill:n.status===`running`&&En?()=>En(n.id,o):void 0,onBack:N},`monitor-mcp-${n.id}`):null;case`dream`:return(0,Q.jsx)(Jt,{task:n,onDone:()=>e(`Background tasks dialog dismissed`,{display:`system`}),onBack:N,onKill:n.status===`running`?()=>void A(n.id):void 0},`dream-${n.id}`)}}let ae=E(b,e=>e.status===`running`),se=E(x,e=>e.status===`running`||e.status===`pending`)+E(S,e=>e.status===`running`),le=E(C,e=>e.status===`running`),ue=te([...le>0?[(0,Q.jsxs)(d,{children:[le,` `,le===1?`agent`:`agents`]},`teammates`)]:[],...ae>0?[(0,Q.jsxs)(d,{children:[ae,` `,ae===1?`active shell`:`active shells`]},`shells`)]:[],...se>0?[(0,Q.jsxs)(d,{children:[se,` `,se===1?`active agent`:`active agents`]},`agents`)]:[]],e=>(0,Q.jsx)(d,{children:` · `},`separator-${e}`)),P=[(0,Q.jsx)(p,{shortcut:`↑/↓`,action:`select`},`upDown`),(0,Q.jsx)(p,{shortcut:`Enter`,action:`view`},`enter`),...O?.type===`in_process_teammate`&&O.status===`running`?[(0,Q.jsx)(p,{shortcut:`f`,action:`foreground`},`foreground`)]:[],...(O?.type===`local_bash`||O?.type===`local_agent`||O?.type===`in_process_teammate`||O?.type===`local_workflow`||O?.type===`monitor_mcp`||O?.type===`dream`||O?.type===`remote_agent`)&&O.status===`running`?[(0,Q.jsx)(p,{shortcut:`x`,action:`stop`},`kill`)]:[],...S.some(e=>e.status===`running`)?[(0,Q.jsx)(p,{shortcut:s,action:`stop all agents`},`kill-all`)]:[],(0,Q.jsx)(p,{shortcut:`←/Esc`,action:`close`},`esc`)],fe=()=>e(`Background tasks dialog dismissed`,{display:`system`});function pe(e){return e.pending?(0,Q.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,Q.jsx)(m,{children:P})}return(0,Q.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:k,children:(0,Q.jsx)(f,{title:`Background tasks`,subtitle:(0,Q.jsx)(Q.Fragment,{children:ue}),onCancel:fe,color:`background`,inputGuide:pe,children:D.length===0?(0,Q.jsx)(d,{dimColor:!0,children:`No tasks currently running`}):(0,Q.jsxs)(_,{flexDirection:`column`,children:[C.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,children:[(b.length>0||x.length>0||S.length>0)&&(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Agents`]}),` (`,E(C,e=>e.type!==`leader`),`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:(0,Q.jsx)(Tn,{teammateTasks:C,currentSelectionId:O?.id})})]}),b.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0),children:[(C.length>0||x.length>0||S.length>0)&&(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Shells`]}),` (`,b.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:b.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),T.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Monitors`]}),` (`,T.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:T.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),x.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Remote agents`]}),` (`,x.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:x.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),S.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Local agents`]}),` (`,S.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:S.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),w.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Workflows`]}),` (`,w.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:w.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})]}),ee.length>0&&(0,Q.jsx)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0||w.length>0),children:(0,Q.jsx)(_,{flexDirection:`column`,children:ee.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===O?.id},e.id))})})]})})})}function wn(e){switch(e.type){case`local_bash`:return{id:e.id,type:`local_bash`,label:e.kind===`monitor`?e.description:e.command,status:e.status,task:e};case`remote_agent`:return{id:e.id,type:`remote_agent`,label:e.title,status:e.status,task:e};case`local_agent`:return{id:e.id,type:`local_agent`,label:e.description,status:e.status,task:e};case`in_process_teammate`:return{id:e.id,type:`in_process_teammate`,label:`@${e.identity.agentName}`,status:e.status,task:e};case`local_workflow`:return{id:e.id,type:`local_workflow`,label:e.summary??e.description,status:e.status,task:e};case`monitor_mcp`:return{id:e.id,type:`monitor_mcp`,label:e.description,status:e.status,task:e};case`dream`:return{id:e.id,type:`dream`,label:e.description,status:e.status,task:e}}}function X({item:e,isSelected:t}){let{columns:n}=s(),r=Math.max(30,n-26),i=se();return(0,Q.jsxs)(_,{flexDirection:`row`,children:[(0,Q.jsx)(d,{dimColor:i&&t,children:t?a.pointer+` `:` `}),(0,Q.jsx)(d,{color:t&&!i?`suggestion`:void 0,children:e.type===`leader`?(0,Q.jsxs)(d,{children:[`@`,ft]}):(0,Q.jsx)(Kt,{task:e.task,maxActivityWidth:r})})]})}function Tn({teammateTasks:e,currentSelectionId:t}){let n=e.filter(e=>e.type===`leader`),r=e.filter(e=>e.type===`in_process_teammate`),i=new Map;for(let e of r){let t=e.task.identity.teamName,n=i.get(t);n?n.push(e):i.set(t,[e])}return(0,Q.jsx)(Q.Fragment,{children:[...i.entries()].map(([e,r])=>(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsxs)(d,{dimColor:!0,children:[` `,`Team: `,e,` (`,r.length+n.length,`)`]}),n.map(n=>(0,Q.jsx)(X,{item:n,isSelected:n.id===t},`${n.id}-${e}`)),r.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===t},e.id))]},e))})}var Z,Q,$,En,Dn,On=t((()=>{i(),Z=n(l(),1),nt(),dt(),Ue(),Ct(),et(),je(),_e(),He(),ue(),Ge(),D(),pt(),We(),Ye(),g(),L(),le(),Ft(),qt(),Xt(),$t(),dn(),gn(),Q=v(),$=(tt(),e($e))?.killWorkflowTask??null,En=(Be(),e(ae))?.killMonitorMcp??null,Dn=(xn(),e(yn)).MonitorMcpDetailDialog}));export{jt as a,Ct as c,Dt as i,xt as l,On as n,yt as o,Mt as r,bt as s,Cn as t};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./ClaudeMdExternalIncludesDialog-D8fk-Ib5.js";e();export{t as ClaudeMdExternalIncludesDialog};
@@ -1 +0,0 @@
1
- import{Uy as e,Wy as t}from"./loadAgentsDir-C_wFhytF.js";t();export{e as ConsoleOAuthFlow};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./Doctor-Cv7wbi6C.js";e();export{t as Doctor};
@@ -1 +0,0 @@
1
- import{r as e,t}from"./Grove-CAi037VV.js";e();export{t as GroveDialog};
@@ -1,3 +0,0 @@
1
- import{n as e,o as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./figures-gfT9mM8P.js";import{F as a,Rn as o,b as s,m as c,nt as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{Ct as m,cn as h,mr as g,vt as _}from"./state-sIHsFpDu.js";import{Ht as v,Ko as y,Uo as b,no as x,on as S,oo as C,pi as w,vi as T}from"./paths-Ci1iwL5Y.js";import{n as E,r as D}from"./analytics-DqMQntaB.js";import{n as O,t as k}from"./cwd--iizewsn.js";import{O as A,et as j,h as ee,m as te,o as ne,s as M}from"./log-DSV4Ht5l.js";import{b as N,x as re}from"./teammate-CbskW5G9.js";import{C as ie,g as ae,x as P}from"./startupProfiler-CAntGAbs.js";import{Cn as oe,Co as F,Dy as se,Eo as I,Ey as ce,Fc as le,Gc as L,Go as ue,Jy as de,Ky as fe,Mc as pe,Mo as me,NC as he,Nc as ge,Ny as R,Oo as z,Oy as _e,Uo as B,Wc as ve,Yi as ye,Yo as be,_D as xe,aS as Se,cu as Ce,dk as we,fk as Te,fs as Ee,gD as De,ha as Oe,jC as ke,lC as Ae,lk as V,ln as je,na as Me,oS as Ne,qi as Pe,qo as Fe,uC as Ie,uu as H,vo as Le,yn as Re}from"./loadAgentsDir-C_wFhytF.js";import{E as ze,T as Be,c as Ve,d as He,w as Ue}from"./sessionTracing-CJUUEWZ4.js";import{t as We}from"./useKeybinding-DPOUuymz.js";import{t as Ge}from"./useTerminalSize-Du-EamDN.js";import{n as Ke,t as qe}from"./useExitOnCtrlCDWithKeybindings-BHi41Ku_.js";import{n as Je,t as Ye}from"./slashCommandParsing-BfanVchF.js";import*as U from"path";import{randomUUID as W}from"crypto";o();var G=p();r(),u(),h(),E(),O(),j(),te(),ne(),re(),P(),y(),C(),S(),we(),Ue(),De(),ke(),Ve(),Ce(),ve(),le(),Ee(),B(),Me(),oe(),Ye();var Xe={"`":"`",'"':`"`,"<":`>`,"{":`}`,"[":`]`,"(":`)`,"'":`'`};function Ze(e,t){if(!new RegExp(t,`i`).test(e)||e.startsWith(`/`))return[];let n=[],r=null,i=0,a=e=>!!e&&/[\p{L}\p{N}_]/u.test(e);for(let t=0;t<e.length;t++){let o=e[t];if(r){if(r===`[`&&o===`[`){i=t;continue}if(o!==Xe[r]||r===`'`&&a(e[t+1]))continue;n.push({start:i,end:t+1}),r=null}else (o===`<`&&t+1<e.length&&/[a-zA-Z/]/.test(e[t+1])||o===`'`&&!a(e[t-1])||o!==`<`&&o!==`'`&&o in Xe)&&(r=o,i=t)}let o=[],s=RegExp(`\\b${t}\\b`,`gi`),c=e.matchAll(s);for(let t of c){if(t.index===void 0)continue;let r=t.index,i=r+t[0].length;if(n.some(e=>r>=e.start&&r<e.end))continue;let s=e[r-1],c=e[i];s===`/`||s===`\\`||s===`-`||c===`/`||c===`\\`||c===`-`||c===`?`||c===`.`&&a(e[i+1])||o.push({word:t[0],start:r,end:i})}return o}function K(e){return Ze(e,`ultraplan`)}function Qe(e){return Ze(e,`ultrareview`)}function $e(e){return K(e).length>0}function et(e){let[t]=K(e);if(!t)return e;let n=e.slice(0,t.start),r=e.slice(t.end);return(n+r).trim()?n+t.word.slice(5)+r:``}function tt(e){let t=e.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(t)}function nt(e){let t=e.toLowerCase().trim();return t===`continue`?!0:/\b(keep going|go on)\b/.test(t)}function rt(e,t,n,r,i,a,o){let s=W();g(s);let c=typeof e==`string`?e:e.find(e=>e.type===`text`)?.text||``;He(c);let l=typeof e==`string`?e:e.findLast(e=>e.type===`text`)?.text||``;return l&&Be(`user_prompt`,{prompt_length:String(l.length),prompt:ze(l),"prompt.id":s}),D(`tengu_input_prompt`,{is_negative:tt(c),is_keep_going:nt(c)}),t.length>0?{messages:[I({content:[...typeof e==`string`?e.trim()?[{type:`text`,text:e}]:[]:e,...t],uuid:i,imagePasteIds:n.length>0?n:void 0,permissionMode:a,isMeta:o||void 0}),...r],shouldQuery:!0}:{messages:[I({content:e,uuid:i,permissionMode:a,isMeta:o||void 0}),...r],shouldQuery:!0}}E(),B();async function it({input:e,preExpansionInput:t,mode:n,setToolJSX:r,context:i,pastedContents:a,ideSelection:o,messages:s,setUserInputOnProcessing:c,uuid:l,isAlreadyProcessing:u,querySource:d,canUseTool:f,skipSlashCommands:p,bridgeOrigin:m,isMeta:h,skipAttachments:g,autonomy:_}){let v=typeof e==`string`?e:null,y=v?.startsWith(`/`)&&!p;n===`prompt`&&v!==null&&!h&&!y&&c?.(v),H(`query_process_user_input_base_start`);let b=i.getAppState(),x=await ot(e,n,r,i,a,o,s,l,u,d,f,b.toolPermissionContext.mode,p,m,h,g,t,_);if(H(`query_process_user_input_base_end`),!x.shouldQuery)return x;H(`query_hooks_start`);let S=me(e)||``;for await(let t of je(S,b.toolPermissionContext.mode,i,i.requestPrompt))if(t.message?.type!==`progress`){if(t.blockingError)return{messages:[F(`${Re(t.blockingError)}\n\nOriginal prompt: ${e}`,`warning`)],shouldQuery:!1,allowedTools:x.allowedTools};if(t.preventContinuation){let e=t.stopReason?`Operation stopped by hook: ${t.stopReason}`:`Operation stopped by hook`;return x.messages.push(I({content:e})),x.shouldQuery=!1,x}if(t.additionalContexts&&t.additionalContexts.length>0&&x.messages.push(pe({type:`hook_additional_context`,content:t.additionalContexts.map(at),hookName:`UserPromptSubmit`,toolUseID:`hook-${W()}`,hookEvent:`UserPromptSubmit`})),t.message)switch(t.message.attachment.type){case`hook_success`:if(!t.message.attachment.content)break;x.messages.push({...t.message,attachment:{...t.message.attachment,content:at(t.message.attachment.content)}});break;default:x.messages.push(t.message);break}}return H(`query_hooks_end`),x}var q=1e4;function at(e){return e.length>q?`${e.substring(0,q)}… [output truncated - exceeded ${q} characters]`:e}async function ot(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_){let v=null,y=[],b=[],x=e;if(typeof e==`string`)v=e;else if(e.length>0){H(`query_image_processing_start`);let t=[];for(let n of e)if(n.type===`image`){let e=await Te(n);if(e.dimensions){let t=V(e.dimensions);t&&b.push(t)}t.push(e.block)}else t.push(n);x=t,H(`query_image_processing_end`);let n=t[t.length-1];n?.type===`text`?(v=n.text,y=t.slice(0,-1)):y=t}if(v===null&&t!==`prompt`)throw Error(`Mode: ${t} requires a string input.`);let S=i?Object.values(i).filter(L):[],C=S.map(e=>e.id),w=i?await he(i):new Map;H(`query_pasted_image_processing_start`);let T=await Promise.all(S.map(async e=>{let t={type:`image`,source:{type:`base64`,media_type:e.mediaType||`image/png`,data:e.content}};return D(`tengu_pasted_image_resize_attempt`,{original_size_bytes:e.content.length}),{resized:await Te(t),originalDimensions:e.dimensions,sourcePath:e.sourcePath??w.get(e.id)}})),E=[];for(let{resized:e,originalDimensions:t,sourcePath:n}of T){if(e.dimensions){let t=V(e.dimensions,n);t&&b.push(t)}else if(t){let e=V(t,n);e&&b.push(e)}else n&&b.push(`[Image source: ${n}]`);E.push(e.block)}H(`query_pasted_image_processing_end`);let O=f;if(p&&v!==null&&v.startsWith(`/`)){let e=Je(v),t=e?Pe(e.commandName,r.options.commands):void 0;if(t){let n=ye(t,e?.args??``);if(n.ok)O=!1;else{let e=n.reason??`/${Oe(t)} isn't available over Remote Control.`;return{messages:[I({content:v,uuid:s}),Le(`<local-command-stdout>${e}</local-command-stdout>`)],shouldQuery:!1,resultText:e}}}}if(t===`prompt`&&!r.options.isNonInteractiveSession&&v!==null&&!O&&!v.startsWith(`/`)&&!r.getAppState().ultraplanSessionUrl&&!r.getAppState().ultraplanLaunching&&$e(g??v)){D(`tengu_ultraplan_keyword`,{});let e=et(v).trim(),{processSlashCommand:t}=await import(`./processSlashCommand-v1Rvzxwn.js`);return J(await t(`/ultraplan ${e}`,y,E,[],r,n,s,c,u,_),b)}let k=!h&&v!==null&&(t!==`prompt`||O||!v.startsWith(`/`));H(`query_attachment_loading_start`);let A=k?await xe(ge(v,r,a??null,[],o,l)):[];if(H(`query_attachment_loading_end`),v!==null&&t===`bash`){let{processBashCommand:e}=await import(`./processBashCommand-BZ1_JKu4.js`);return J(await e(v,y,A,r,n),b)}if(v!==null&&!O&&v.startsWith(`/`)){let{processSlashCommand:e}=await import(`./processSlashCommand-v1Rvzxwn.js`);return J(await e(v,y,E,A,r,n,s,c,u,_),b)}if(v!==null&&t===`prompt`){let e=v.trim(),t=A.find(e=>e.attachment.type===`agent_mention`);if(t){let n=`@agent-${t.attachment.agentType}`,r=e===n;D(`tengu_subagent_at_mention`,{is_subagent_only:r,is_prefix:e.startsWith(n)&&!r})}}return J(rt(x,E,C,A,s,d,m),b)}function J(e,t){return t.length>0&&e.messages.push(I({content:t.map(e=>({type:`text`,text:e})),isMeta:!0})),e}h(),T();function st(e){return e===`Agent`?b:e}function ct(e){let t=x()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:k(),session_id:m(),tools:e.tools.map(e=>st(e.name)),mcp_servers:e.mcpClients.map(e=>({name:e.name,status:e.type})),model:e.model,permissionMode:e.permissionMode,slash_commands:e.commands.filter(e=>e.userInvocable!==!1).map(e=>e.name),apiKeySource:v().source,betas:_(),claude_code_version:`2.7.1`,output_style:t,agents:e.agents.map(e=>e.agentType),skills:e.skills.filter(e=>e.userInvocable!==!1).map(e=>e.name),plugins:e.plugins.map(e=>({name:e.name,path:e.path,source:e.source})),uuid:W()};return n.fast_mode_state=w(e.model,e.fastMode),n}var lt=n({MessageSelector:()=>dt,messagesAfterAreOnlySynthetic:()=>Z,selectableUserMessagesFilter:()=>X});function ut(e){return e.type===`text`}function Y(e){return e===`summarize`||e===`summarize_up_to`}function dt({messages:e,onPreRestore:t,onRestoreMessage:n,onRestoreCode:r,onSummarize:a,onClose:o,preselectedMessage:u}){let p=Ie(e=>e.fileHistory),[m,h]=(0,Q.useState)(void 0),g=se(),_=(0,Q.useMemo)(W,[]),v=(0,Q.useMemo)(()=>[...e.filter(X),{...I({content:``}),uuid:_}],[e,_]),[y,b]=(0,Q.useState)(v.length-1),x=Math.max(0,Math.min(y-Math.floor($/2),v.length-$)),S=v.length>1,[C,w]=(0,Q.useState)(u),[T,E]=(0,Q.useState)(void 0);(0,Q.useEffect)(()=>{if(!u||!g)return;let e=!1;return _e(p,u.uuid).then(t=>{e||E(t)}),()=>{e=!0}},[u,g,p]);let[O,k]=(0,Q.useState)(!1),[A,j]=(0,Q.useState)(null),[ee,te]=(0,Q.useState)(`both`),[ne,N]=(0,Q.useState)(``),[re,ie]=(0,Q.useState)(``);function P(e){let t=e?[{value:`both`,label:`Restore code and conversation`},{value:`conversation`,label:`Restore conversation`},{value:`code`,label:`Restore code`}]:[{value:`conversation`,label:`Restore conversation`}],n={type:`input`,placeholder:`add context (optional)`,initialValue:``,allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:`: `};return t.push({value:`summarize`,label:`Summarize from here`,...n,onChange:N}),process.env.USER_TYPE===`ant`&&t.push({value:`summarize_up_to`,label:`Summarize up to here`,...n,onChange:ie}),t.push({value:`nevermind`,label:`Never mind`}),t}(0,Q.useEffect)(()=>{D(`tengu_message_selector_opened`,{})},[]);async function oe(e){t(),k(!0);try{await n(e),k(!1),o()}catch(e){M(e),k(!1),h(`Failed to restore the conversation:\n${e}`)}}async function F(t){let n=e.indexOf(t);if(D(`tengu_message_selector_selected`,{index_from_end:e.length-1-n,message_type:t.type,is_current_prompt:!1}),!e.includes(t)){o();return}if(!g){await oe(t);return}let r=await _e(p,t.uuid);w(t),E(r)}async function le(e){if(D(`tengu_message_selector_restore_option_selected`,{option:e}),!C){h(`Message not found.`);return}if(e===`nevermind`){u?o():w(void 0);return}if(Y(e)){t(),k(!0),j(e),h(void 0);try{let t=e===`summarize_up_to`?`up_to`:`from`;await a(C,(t===`up_to`?re:ne).trim()||void 0,t),k(!1),j(null),w(void 0),o()}catch(e){M(e),k(!1),j(null),w(void 0),h(`Failed to summarize:\n${e}`)}return}t(),k(!0),h(void 0);let i=null,s=null;if(e===`code`||e===`both`)try{await r(C)}catch(e){i=e,M(i)}if(e===`conversation`||e===`both`)try{await n(C)}catch(e){s=e,M(s)}k(!1),w(void 0),s&&i?h(`Failed to restore the conversation and code:\n${s}\n${i}`):s?h(`Failed to restore the conversation:\n${s}`):i?h(`Failed to restore the code:\n${i}`):o()}let L=Ke(),ue=(0,Q.useCallback)(()=>{if(C&&!u){w(void 0);return}D(`tengu_message_selector_cancelled`,{}),o()},[o,C,u]),de=(0,Q.useCallback)(()=>b(e=>Math.max(0,e-1)),[]),pe=(0,Q.useCallback)(()=>b(e=>Math.min(v.length-1,e+1)),[v.length]),me=(0,Q.useCallback)(()=>b(0),[]),he=(0,Q.useCallback)(()=>b(v.length-1),[v.length]),ge=(0,Q.useCallback)(()=>{let e=v[y];e&&F(e)},[v,y,F]);d(`confirm:no`,ue,{context:`Confirmation`,isActive:!C}),l({"messageSelector:up":de,"messageSelector:down":pe,"messageSelector:top":me,"messageSelector:bottom":he,"messageSelector:select":ge},{context:`MessageSelector`,isActive:!O&&!m&&!C&&S});let[R,z]=(0,Q.useState)({});(0,Q.useEffect)(()=>{async function t(){g&&Promise.all(v.map(async(t,n)=>{if(t.uuid!==_){let r=ce(p,t.uuid),i=v.at(n+1),a=r?_t(e,t.uuid,i?.uuid===_?void 0:i?.uuid):void 0;z(a===void 0?e=>({...e,[n]:void 0}):e=>({...e,[n]:a}))}}))}t()},[v,e,_,p,g]);let B=g&&T?.filesChanged&&T.filesChanged.length>0,ve=!m&&!C&&!u&&S;return(0,G.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,G.jsx)(c,{color:`suggestion`}),(0,G.jsxs)(f,{flexDirection:`column`,marginX:1,gap:1,children:[(0,G.jsx)(s,{bold:!0,color:`suggestion`,children:`Rewind`}),m&&(0,G.jsx)(G.Fragment,{children:(0,G.jsxs)(s,{color:`error`,children:[`Error: `,m]})}),!S&&(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(s,{children:`Nothing to rewind to yet.`})}),!m&&C&&S&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(s,{children:[`Confirm you want to restore `,!T&&`the conversation `,`to the point before you sent this message:`]}),(0,G.jsxs)(f,{flexDirection:`column`,paddingLeft:1,borderStyle:`single`,borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[(0,G.jsx)(gt,{userMessage:C,color:`text`,isCurrent:!1}),(0,G.jsxs)(s,{dimColor:!0,children:[`(`,ae(new Date(C.timestamp)),`)`]})]}),(0,G.jsx)(pt,{selectedRestoreOption:ee,canRestoreCode:!!B,diffStatsForRestore:T}),O&&Y(A)?(0,G.jsxs)(f,{flexDirection:`row`,gap:1,children:[(0,G.jsx)(fe,{}),(0,G.jsx)(s,{children:`Summarizing…`})]}):(0,G.jsx)(Se,{isDisabled:O,options:P(!!B),defaultFocusValue:B?`both`:`conversation`,onFocus:e=>te(e),onChange:e=>le(e),onCancel:()=>u?o():w(void 0)}),B&&(0,G.jsx)(f,{marginBottom:1,children:(0,G.jsxs)(s,{dimColor:!0,children:[i.warning,` Rewinding does not affect files edited manually or via bash.`]})})]}),ve&&(0,G.jsxs)(G.Fragment,{children:[g?(0,G.jsx)(s,{children:`Restore the code and/or conversation to the point before…`}):(0,G.jsx)(s,{children:`Restore and fork the conversation to the point before…`}),(0,G.jsx)(f,{width:`100%`,flexDirection:`column`,children:v.slice(x,x+$).map((e,t)=>{let n=x+t,r=n===y,a=e.uuid===_,o=n in R,c=R[n],l=c?.filesChanged&&c.filesChanged.length;return(0,G.jsxs)(f,{height:g?3:2,overflow:`hidden`,width:`100%`,flexDirection:`row`,children:[(0,G.jsx)(f,{width:2,minWidth:2,children:r?(0,G.jsxs)(s,{color:`permission`,bold:!0,children:[i.pointer,` `]}):(0,G.jsx)(s,{children:` `})}),(0,G.jsxs)(f,{flexDirection:`column`,children:[(0,G.jsx)(f,{flexShrink:1,height:1,overflow:`hidden`,children:(0,G.jsx)(gt,{userMessage:e,color:r?`suggestion`:void 0,isCurrent:a,paddingRight:10})}),g&&o&&(0,G.jsx)(f,{height:1,flexDirection:`row`,children:c?(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(s,{dimColor:!r,color:`inactive`,children:l?(0,G.jsxs)(G.Fragment,{children:[l===1&&c.filesChanged[0]?`${U.basename(c.filesChanged[0])} `:`${l} files changed `,(0,G.jsx)(ht,{diffStats:c})]}):(0,G.jsx)(G.Fragment,{children:`No code changes`})})}):(0,G.jsxs)(s,{dimColor:!0,color:`warning`,children:[i.warning,` No code restore`]})})]})]},e.uuid)})})]}),!C&&(0,G.jsx)(s,{dimColor:!0,italic:!0,children:L.pending?(0,G.jsxs)(G.Fragment,{children:[`Press `,L.keyName,` again to exit`]}):(0,G.jsxs)(G.Fragment,{children:[!m&&S&&`Enter to continue · `,`Esc to exit`]})})]})]})}function ft(e){switch(e){case`summarize`:return`Messages after this point will be summarized.`;case`summarize_up_to`:return`Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.`;case`both`:case`conversation`:return`The conversation will be forked.`;case`code`:case`nevermind`:return`The conversation will be unchanged.`}}function pt({selectedRestoreOption:e,canRestoreCode:t,diffStatsForRestore:n}){let r=t&&(e===`both`||e===`code`);return(0,G.jsxs)(f,{flexDirection:`column`,children:[(0,G.jsx)(s,{dimColor:!0,children:ft(e)}),!Y(e)&&(r?(0,G.jsx)(mt,{diffStatsForRestore:n}):(0,G.jsx)(s,{dimColor:!0,children:`The code will be unchanged.`}))]})}function mt({diffStatsForRestore:e}){if(e===void 0)return;if(!e.filesChanged||!e.filesChanged[0])return(0,G.jsx)(s,{dimColor:!0,children:`The code has not changed (nothing will be restored).`});let t=e.filesChanged.length,n=``;return n=t===1?U.basename(e.filesChanged[0]||``):t===2?`${U.basename(e.filesChanged[0]||``)} and ${U.basename(e.filesChanged[1]||``)}`:`${U.basename(e.filesChanged[0]||``)} and ${e.filesChanged.length-1} other files`,(0,G.jsx)(G.Fragment,{children:(0,G.jsxs)(s,{dimColor:!0,children:[`The code will be restored `,(0,G.jsx)(ht,{diffStats:e}),` in `,n,`.`]})})}function ht({diffStats:e}){if(!(!e||!e.filesChanged))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(s,{color:`diffAddedWord`,children:[`+`,e.insertions,` `]}),(0,G.jsxs)(s,{color:`diffRemovedWord`,children:[`-`,e.deletions]})]})}function gt({userMessage:e,color:t,dimColor:n,isCurrent:r,paddingRight:i}){let{columns:o}=a();if(r)return(0,G.jsx)(f,{width:`100%`,children:(0,G.jsx)(s,{italic:!0,color:t,dimColor:n,children:`(current)`})});let c=e.message.content,l=typeof c==`string`?null:c[c.length-1],u=ee(typeof c==`string`?c.trim():l&&ut(l)?l.text.trim():`(no prompt)`);if(ue(u))return(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsx)(s,{italic:!0,color:t,dimColor:n,children:`((empty message))`})});if(u.includes(`<bash-input>`)){let e=z(u,`bash-input`);if(e)return(0,G.jsxs)(f,{flexDirection:`row`,width:`100%`,children:[(0,G.jsx)(s,{color:`bashBorder`,children:`!`}),(0,G.jsxs)(s,{color:t,dimColor:n,children:[` `,e]})]})}if(u.includes(`<command-message>`)){let e=z(u,A),r=z(u,`command-args`),i=z(u,`skill-format`)===`true`;if(e)return i?(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsxs)(s,{color:t,dimColor:n,children:[`Skill(`,e,`)`]})}):(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsxs)(s,{color:t,dimColor:n,children:[`/`,e,` `,r]})})}return(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsx)(s,{color:t,dimColor:n,children:i?ie(u,o-i,!0):u.slice(0,500).split(`
2
- `).slice(0,4).join(`
3
- `)})})}function _t(e,t,n){let r=e.findIndex(e=>e.uuid===t);if(r===-1)return;let i=n?e.findIndex(e=>e.uuid===n):e.length;i===-1&&(i=e.length);let a=[],o=0,s=0;for(let t=r+1;t<i;t++){let n=e[t];if(!n||!be(n))continue;let r=n.toolUseResult;if(!(!r||!r.filePath||!r.structuredPatch)){a.includes(r.filePath)||a.push(r.filePath);try{if(`type`in r&&r.type===`create`)o+=r.content.split(/\r?\n/).length;else for(let e of r.structuredPatch){let t=N(e.lines,e=>e.startsWith(`+`)),n=N(e.lines,e=>e.startsWith(`-`));o+=t,s+=n}}catch{}}}return{filesChanged:a,insertions:o,deletions:s}}function X(e){if(e.type!==`user`||Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_result`||Fe(e)||e.isMeta||e.isCompactSummary||e.isVisibleInTranscriptOnly)return!1;let t=e.message.content,n=typeof t==`string`?null:t[t.length-1],r=typeof t==`string`?t.trim():n&&ut(n)?n.text.trim():``;return!(r.indexOf(`<local-command-stdout>`)!==-1||r.indexOf(`<local-command-stderr>`)!==-1||r.indexOf(`<bash-stdout>`)!==-1||r.indexOf(`<bash-stderr>`)!==-1||r.indexOf(`<task-notification>`)!==-1||r.indexOf(`<tick>`)!==-1||r.indexOf(`<teammate-message`)!==-1)}function Z(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(t&&!Fe(t)&&!be(t)&&t.type!==`progress`&&t.type!==`system`&&t.type!==`attachment`&&!(t.type===`user`&&t.isMeta)){if(t.type===`assistant`){let e=t.message.content;if(Array.isArray(e)&&e.some(e=>e.type===`text`&&e.text.trim()||e.type===`tool_use`))return!1;continue}if(t.type===`user`)return!1}}return!0}var Q,$,vt=e((()=>{Q=t(o()),E(),Ae(),R(),qe(),We(),B(),Ne(),de(),Ge(),$=7}));export{X as a,it as c,Z as i,K as l,lt as n,ct as o,vt as r,st as s,dt as t,Qe as u};