claude-code-best 2.6.5 → 2.6.6

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 (430) hide show
  1. package/dist/chunks/{AddWorkspaceDirectory-BYyM_V0q.js → AddWorkspaceDirectory-Bb6crGWh.js} +1 -1
  2. package/dist/chunks/{App-BboadKdn.js → App-CW0Y4ceR.js} +1 -1
  3. package/dist/chunks/{ApproveApiKey-BLp4742y.js → ApproveApiKey-9rkwQfgT.js} +1 -1
  4. package/dist/chunks/ApproveApiKey-BhMr2Y5F.js +1 -0
  5. package/dist/chunks/{AssistantSessionChooser-B88DM0Oq.js → AssistantSessionChooser-XzXZZdiH.js} +1 -1
  6. package/dist/chunks/BackgroundTasksDialog-BL_dfbZP.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-DlLWAKw2.js +1 -0
  8. package/dist/chunks/{ClaudeInChromeOnboarding-B6XNhFqq.js → ClaudeInChromeOnboarding-CjGydpBk.js} +1 -1
  9. package/dist/chunks/{ClaudeMdExternalIncludesDialog-BNhlq7_K.js → ClaudeMdExternalIncludesDialog-B04cjDwX.js} +1 -1
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-DPki55Xa.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-D_j1NebK.js +1 -0
  12. package/dist/chunks/{DesktopHandoff-S-w4bs5T.js → DesktopHandoff-CFBUqcCf.js} +1 -1
  13. package/dist/chunks/DevChannelsDialog-ByTf41du.js +1 -0
  14. package/dist/chunks/DiffDialog-CY-8kw_Q.js +3 -0
  15. package/dist/chunks/Doctor-2D5Wz58o.js +1 -0
  16. package/dist/chunks/Doctor-CDez_u_U.js +3 -0
  17. package/dist/chunks/{ExitFlow-CSBDxw9H.js → ExitFlow-BlON8IgH.js} +2 -2
  18. package/dist/chunks/Feedback-CSeD3k4M.js +2 -0
  19. package/dist/chunks/Grove-Dwu_0zRw.js +1 -0
  20. package/dist/chunks/{Grove-DSXRnXKv.js → Grove-Tp_UtIMg.js} +1 -1
  21. package/dist/chunks/{HybridTransport-CuT3KI5e.js → HybridTransport-CAko699F.js} +2 -2
  22. package/dist/chunks/{ITermBackend-mokGZVH_.js → ITermBackend-5P3WJumD.js} +1 -1
  23. package/dist/chunks/{InvalidConfigDialog-Bi4RKYlk.js → InvalidConfigDialog-CVcdra9v.js} +1 -1
  24. package/dist/chunks/{InvalidSettingsDialog-0zKo4-so.js → InvalidSettingsDialog-CfLdbmSI.js} +1 -1
  25. package/dist/chunks/MCPConnectionManager-BK_3uwQj.js +1 -0
  26. package/dist/chunks/{McpParsingWarnings-EzgsOoHw.js → McpParsingWarnings-BOj-T8F3.js} +1 -1
  27. package/dist/chunks/MessageSelector-BRkxpO1O.js +3 -0
  28. package/dist/chunks/Messages-wyMyMP7U.js +11 -0
  29. package/dist/chunks/{Onboarding-odmthwzz.js → Onboarding-C06Mxlf-.js} +1 -1
  30. package/dist/chunks/{OverageCreditUpsell-Cpk_5Lv0.js → OverageCreditUpsell-abcPm3PB.js} +1 -1
  31. package/dist/chunks/PluginSettings-DGpIVGvV.js +17 -0
  32. package/dist/chunks/{PromptInputFooterSuggestions-DrrkNOuS.js → PromptInputFooterSuggestions-ihnbjU0K.js} +1 -1
  33. package/dist/chunks/{PromptInputHelpMenu-DMsF4D6d.js → PromptInputHelpMenu-CMm8z7Gk.js} +1 -1
  34. package/dist/chunks/QueryEngine-I3Bqzbiz.js +1 -0
  35. package/dist/chunks/REPL-BxAsVlx3.js +1 -0
  36. package/dist/chunks/REPL-CBFcgD4r.js +97 -0
  37. package/dist/chunks/{RemoteCallout-CnpCWRPk.js → RemoteCallout-Cy6lH-CZ.js} +1 -1
  38. package/dist/chunks/{RemoteSessionManager-OWg_Yccq.js → RemoteSessionManager-C7iGd5Og.js} +2 -2
  39. package/dist/chunks/ResumeConversation-AdLtgdVB.js +1 -0
  40. package/dist/chunks/{SSETransport-BpnapvlK.js → SSETransport-B5xlXeAN.js} +1 -1
  41. package/dist/chunks/SearchExtraToolsTool-BJ8Nx_Nu.js +1 -0
  42. package/dist/chunks/SentryErrorBoundary-Bs7mtkPb.js +1 -0
  43. package/dist/chunks/{SentryErrorBoundary-C-NlfQZw.js → SentryErrorBoundary-iih9eFpM.js} +1 -1
  44. package/dist/chunks/Settings-PioHwsvg.js +2 -0
  45. package/dist/chunks/{TeleportProgress-CYXay2ZL.js → TeleportProgress-BX-uLwuL.js} +1 -1
  46. package/dist/chunks/TeleportRepoMismatchDialog-D8oPPTWd.js +1 -0
  47. package/dist/chunks/{TeleportResumeWrapper-DiHQeZIM.js → TeleportResumeWrapper-B_CvNDbr.js} +1 -1
  48. package/dist/chunks/{ThemePicker-BRh027fA.js → ThemePicker-BG1ykSpX.js} +1 -1
  49. package/dist/chunks/{TmuxBackend-BaX2U7iZ.js → TmuxBackend-CnMCWNS4.js} +1 -1
  50. package/dist/chunks/TrustDialog-Z_maAYj8.js +1 -0
  51. package/dist/chunks/{ValidationErrorsList-CdCUgfIl.js → ValidationErrorsList-C9swVkZ-.js} +1 -1
  52. package/dist/chunks/{WelcomeV2-DCXcYd2x.js → WelcomeV2-Au_5ddlT.js} +1 -1
  53. package/dist/chunks/WindowsTerminalBackend-CGxaYH74.js +2 -0
  54. package/dist/chunks/{add-dir-ldGd3Ppz.js → add-dir-Cm9u56YX.js} +1 -1
  55. package/dist/chunks/{agentDisplay-CVnAeURF.js → agentDisplay-Bi_bEyEn.js} +1 -1
  56. package/dist/chunks/{agents-DH5fmbVw.js → agents-CMF9fLzV.js} +7 -7
  57. package/dist/chunks/{agents-C08NzRZx.js → agents-CbjR7hNr.js} +1 -1
  58. package/dist/chunks/{ant-DJren1Aa.js → ant-Bu1Gs4WJ.js} +1 -1
  59. package/dist/chunks/api-CFNGoLoL.js +1 -0
  60. package/dist/chunks/{api-CGOR_Xfl.js → api-D_t0nHsS.js} +1 -1
  61. package/dist/chunks/assistant-BLd4y2FJ.js +1 -0
  62. package/dist/chunks/{assistant-aWkDcurV.js → assistant-C_pfWe2a.js} +1 -1
  63. package/dist/chunks/{assistant-BlzrMSkM.js → assistant-EA-MHNQ-.js} +1 -1
  64. package/dist/chunks/{auth-CSB2RDKF.js → auth-D7PZvVPf.js} +1 -1
  65. package/dist/chunks/auth-DGfZCD_B.js +1 -0
  66. package/dist/chunks/{autoMode-CWvZs1jO.js → autoMode-B8iO05xy.js} +6 -6
  67. package/dist/chunks/{autonomy-BkVcSMCZ.js → autonomy-CaLvE5N6.js} +12 -12
  68. package/dist/chunks/{autonomy-DK42aJYt.js → autonomy-dQVtSiCJ.js} +1 -1
  69. package/dist/chunks/{autonomyPanel-Cn4IhXgE.js → autonomyPanel-DSswVlCF.js} +1 -1
  70. package/dist/chunks/backgroundHousekeeping-Ckj8W3RO.js +1 -0
  71. package/dist/chunks/backgroundHousekeeping-D2_Uopt7.js +17 -0
  72. package/dist/chunks/{branch-juox_fko.js → branch-C7pM8Sjh.js} +1 -1
  73. package/dist/chunks/{bridge-DudsCZkh.js → bridge-CTYdzSWg.js} +2 -2
  74. package/dist/chunks/bridgeConfig-7c07tJm9.js +1 -0
  75. package/dist/chunks/{bridgeConfig-lRZfQqmA.js → bridgeConfig-Df6uyp3q.js} +1 -1
  76. package/dist/chunks/{bridgeEnabled-D2IykaHE.js → bridgeEnabled-A-_xJ94c.js} +1 -1
  77. package/dist/chunks/bridgeEnabled-Z2S8lk0l.js +1 -0
  78. package/dist/chunks/bridgeMain-B7FZpvo0.js +68 -0
  79. package/dist/chunks/bridgeMain-C5UxF8ST.js +1 -0
  80. package/dist/chunks/{bridgeMessaging-CqNURC4-.js → bridgeMessaging-DPVLAIzl.js} +1 -1
  81. package/dist/chunks/{btw-DKlE3Dea.js → btw-CqgjLlFN.js} +1 -1
  82. package/dist/chunks/{buddy-DQYgHR63.js → buddy-DCGBAqF2.js} +1 -1
  83. package/dist/chunks/{bypassPermissionsKillswitch-Bof-UtM-.js → bypassPermissionsKillswitch-CK0jeZTW.js} +1 -1
  84. package/dist/chunks/{caches-B5QZDncQ.js → caches-CdVW8fYV.js} +2 -2
  85. package/dist/chunks/caches-Dt52PedI.js +1 -0
  86. package/dist/chunks/{ccrClient-BaWg4E9-.js → ccrClient-B_3AmY7K.js} +1 -1
  87. package/dist/chunks/changeDetector-uO9CBvut.js +1 -0
  88. package/dist/chunks/{channelNotification-B7A-9DIl.js → channelNotification-BbDQdLZC.js} +1 -1
  89. package/dist/chunks/channelNotification-DzTzUrCe.js +1 -0
  90. package/dist/chunks/{chrome-jMAks7-w.js → chrome-CGyqsCkL.js} +1 -1
  91. package/dist/chunks/clear-B_cVk64B.js +1 -0
  92. package/dist/chunks/client-BcqXgcrx.js +1 -0
  93. package/dist/chunks/{color-DG_R5-hl.js → color-DEXUx7gE.js} +1 -1
  94. package/dist/chunks/commands-BX0_wEGw.js +1 -0
  95. package/dist/chunks/commitAttribution-CSVDcgTO.js +1 -0
  96. package/dist/chunks/{commitAttribution-C22a3OCi.js → commitAttribution-e0kkanVT.js} +1 -1
  97. package/dist/chunks/{compact-BWvnb4or.js → compact-Dh9RewNA.js} +3 -3
  98. package/dist/chunks/{companion-Bkn2lSLj.js → companion-DVFacTUw.js} +1 -1
  99. package/dist/chunks/{config-BvpTbJ5p.js → config-CkSmYDJY.js} +1 -1
  100. package/dist/chunks/{config-D-dzD6n-.js → config-DwiVCSrY.js} +1 -1
  101. package/dist/chunks/{context-DzNahdyP.js → context-B8VDDHTv.js} +1 -1
  102. package/dist/chunks/{context-noninteractive-yiyJriiw.js → context-noninteractive-IZfWniex.js} +2 -2
  103. package/dist/chunks/context-noninteractive-SBxqQ3iu.js +1 -0
  104. package/dist/chunks/conversation-CQBl9Yy2.js +1 -0
  105. package/dist/chunks/conversation-DVZplNag.js +1 -0
  106. package/dist/chunks/{copy-9k9JPRqW.js → copy-CIjrYoFa.js} +2 -2
  107. package/dist/chunks/{createSSHSession-BZf-Loo5.js → createSSHSession-ArNlbIZB.js} +1 -1
  108. package/dist/chunks/{createSession-kiTHYXSL.js → createSession-CBheIT_G.js} +1 -1
  109. package/dist/chunks/createSession-DfEQy2dZ.js +1 -0
  110. package/dist/chunks/cronJitterConfig-DcMGWOa-.js +6 -0
  111. package/dist/chunks/crossProjectResume-Z-aR2q-d.js +40 -0
  112. package/dist/chunks/{datadog-Bg-zL-i7.js → datadog-BK8eJz8B.js} +1 -1
  113. package/dist/chunks/datadog-Uj6FjEuU.js +1 -0
  114. package/dist/chunks/{desktop-DpaStjc-.js → desktop-B9vWJeRu.js} +1 -1
  115. package/dist/chunks/{diff-N_VSBo3Z.js → diff-BTV7_Dca.js} +1 -1
  116. package/dist/chunks/{doctor-CUWjbh1X.js → doctor-Dpbh0aRz.js} +1 -1
  117. package/dist/chunks/{effort-loH1TUvE.js → effort-Czlwa5qF.js} +2 -2
  118. package/dist/chunks/{entry-D58E-E6Y.js → entry-CdfuWjKu.js} +3 -3
  119. package/dist/chunks/{envLessBridgeConfig-SPEr9oqO.js → envLessBridgeConfig-BAFYaZ0E.js} +1 -1
  120. package/dist/chunks/envLessBridgeConfig-DOO9eX07.js +1 -0
  121. package/dist/chunks/{exit-D-tuPpbx.js → exit-DzOm62Dn.js} +1 -1
  122. package/dist/chunks/{export-BIZ_SPXJ.js → export-DHOR3z3Z.js} +1 -1
  123. package/dist/chunks/{exportRenderer-CWPSMaqM.js → exportRenderer-CiNXeNr9.js} +1 -1
  124. package/dist/chunks/extra-usage-CJcyfVCt.js +1 -0
  125. package/dist/chunks/{extra-usage-CCMwIa85.js → extra-usage-DIYR_3ZR.js} +1 -1
  126. package/dist/chunks/{extra-usage-core-BNW4VT7o.js → extra-usage-core-C3uM9bOP.js} +1 -1
  127. package/dist/chunks/{extra-usage-noninteractive-B_WjXO1E.js → extra-usage-noninteractive-Ctz9TfY8.js} +1 -1
  128. package/dist/chunks/{extraUsage-CNMMTNJi.js → extraUsage-CBwIvl73.js} +1 -1
  129. package/dist/chunks/extractMemories-C3SU-Osb.js +1 -0
  130. package/dist/chunks/fast-7iinMwk-.js +1 -0
  131. package/dist/chunks/{fast-CG1v3fRr.js → fast-BpBwjbSD.js} +1 -1
  132. package/dist/chunks/{feedback-CG4mS_-B.js → feedback-BkVnsZVx.js} +1 -1
  133. package/dist/chunks/{firstPartyEventLogger-Y_jAnHoR.js → firstPartyEventLogger-BCzGkdpd.js} +1 -1
  134. package/dist/chunks/{flushGate-COPcye5f.js → flushGate-CQsnMw8g.js} +1 -1
  135. package/dist/chunks/{gates-CSKxLmMJ.js → gates-CxWIWtmd.js} +1 -1
  136. package/dist/chunks/gates-qgzva-fO.js +1 -0
  137. package/dist/chunks/{gemini-B3uSLiNp.js → gemini-BbV8D2SS.js} +1 -1
  138. package/dist/chunks/{generateRecap-D7rG3jIm.js → generateRecap-B3j2nUgh.js} +1 -1
  139. package/dist/chunks/{generateSessionName-zbqanivg.js → generateSessionName-aGnXSNgN.js} +1 -1
  140. package/dist/chunks/{githubRepoPathMapping-B04nEUDG.js → githubRepoPathMapping-DCJLSTLl.js} +1 -1
  141. package/dist/chunks/{grok-CDOpos8E.js → grok-C4QFXJnR.js} +1 -1
  142. package/dist/chunks/{growthbook-C_EY78Sn.js → growthbook-prtWhMRg.js} +1 -1
  143. package/dist/chunks/{heapdump-CpmhJ55b.js → heapdump-Czm-2XiG.js} +1 -1
  144. package/dist/chunks/{help-EHn2neTv.js → help-CSAFsN0-.js} +1 -1
  145. package/dist/chunks/hooks-Ch2vPE8u.js +1 -0
  146. package/dist/chunks/{hooks-BV6HqbU4.js → hooks-DkbOP-bI.js} +2 -2
  147. package/dist/chunks/{hostAdapter-_SmFAVNf.js → hostAdapter-BcdDPVTj.js} +1 -1
  148. package/dist/chunks/{ide-DkN0KdTR.js → ide-BXERRFZF.js} +2 -2
  149. package/dist/chunks/{inboundAttachments-DnGQw7Pf.js → inboundAttachments-7rXrAtkb.js} +1 -1
  150. package/dist/chunks/inboundAttachments-C0rkLl2x.js +1 -0
  151. package/dist/chunks/initReplBridge-tXqkba08.js +1 -0
  152. package/dist/chunks/{insights-Bs9kJDG6.js → insights-DrvqJgF8.js} +25 -25
  153. package/dist/chunks/{install-CFX_ph9z.js → install-BGnxwO00.js} +1 -1
  154. package/dist/chunks/{install-github-app-CvRjY1Wi.js → install-github-app-CIpBHlr9.js} +2 -2
  155. package/dist/chunks/{install-slack-app-DjhnVSe0.js → install-slack-app-By4Lh7ww.js} +1 -1
  156. package/dist/chunks/{instrumentation-c5zlOWom.js → instrumentation-D9y7Ph_R.js} +3 -3
  157. package/dist/chunks/{job-3QwLq609.js → job-BPVIMW_P.js} +1 -1
  158. package/dist/chunks/{keybindings-7mDm3UKD.js → keybindings-Ce6AHMLI.js} +2 -2
  159. package/dist/chunks/{lang-DyyjY20G.js → lang-DfDG_fSa.js} +1 -1
  160. package/dist/chunks/language-B1yHC1d6.js +1 -0
  161. package/dist/chunks/{language-CPRGmY8Q.js → language-yGoDFP3X.js} +1 -1
  162. package/dist/chunks/{launchAgentsPlatform-CpsMsTqQ.js → launchAgentsPlatform-DT01xZM7.js} +1 -1
  163. package/dist/chunks/launchAutofixPr-DrYd7WVf.js +18 -0
  164. package/dist/chunks/{launchLocalMemory-DlYQcEQJ.js → launchLocalMemory-Bt3tMYVJ.js} +1 -1
  165. package/dist/chunks/{launchLocalVault-CP0AyPjj.js → launchLocalVault-jyRHEa_Y.js} +1 -1
  166. package/dist/chunks/{launchMemoryStores-BHoDFkJ5.js → launchMemoryStores-cmXnLAF5.js} +1 -1
  167. package/dist/chunks/{launchOnboarding-CFTNXcnc.js → launchOnboarding-BPTNFftb.js} +1 -1
  168. package/dist/chunks/{launchSchedule-5KQr6x_A.js → launchSchedule-141GqGC8.js} +1 -1
  169. package/dist/chunks/{launchSkillStore-D0yGuE68.js → launchSkillStore-Bz0lok_o.js} +1 -1
  170. package/dist/chunks/{launchTeleport-DRKnXOwY.js → launchTeleport-BMquJxIq.js} +2 -2
  171. package/dist/chunks/{launchVault-XA-zAswX.js → launchVault-Bsuwqad6.js} +1 -1
  172. package/dist/chunks/{loadAgentsDir-DI1a76pd.js → loadAgentsDir-D7kapZB5.js} +506 -498
  173. package/dist/chunks/loadAgentsDir-DxPE2bIO.js +1 -0
  174. package/dist/chunks/{loadPluginHooks-C0Ei-0E2.js → loadPluginHooks-CL5aGDrb.js} +1 -1
  175. package/dist/chunks/localSearch-iozuZZhZ.js +1 -0
  176. package/dist/chunks/{localSearch-CDOJNc_E.js → localSearch-r1_G8kfV.js} +1 -1
  177. package/dist/chunks/{login-nwTOoyxv.js → login-7MvpaOkt.js} +1 -1
  178. package/dist/chunks/login-Dxza_KNT.js +1 -0
  179. package/dist/chunks/{logoV2Utils-DDUoPClc.js → logoV2Utils-DjThKW15.js} +1 -1
  180. package/dist/chunks/logout-BeGQR78E.js +1 -0
  181. package/dist/chunks/{magicDocs-CmUlOWjI.js → magicDocs-Dy72LHIj.js} +2 -2
  182. package/dist/chunks/{main-CeG_nUsC.js → main-CF6Im-LV.js} +46 -46
  183. package/dist/chunks/{mappers-CJ8IO1o1.js → mappers-CkMESMy7.js} +1 -1
  184. package/dist/chunks/mcp-BTgHgOhR.js +2 -0
  185. package/dist/chunks/mcp-UJZ22IDJ.js +6 -0
  186. package/dist/chunks/mcp-fHf8Uc7h.js +1 -0
  187. package/dist/chunks/{mcpServer-lIneUZ5p.js → mcpServer-BueM5fWI.js} +1 -1
  188. package/dist/chunks/{mcpServer-DPHQVYdC.js → mcpServer-Dqm2PQQx.js} +1 -1
  189. package/dist/chunks/{memory-BcWBkKV8.js → memory-BNZmqma1.js} +1 -1
  190. package/dist/chunks/model-D3g2QdU-.js +1 -0
  191. package/dist/chunks/{model-DJLzVvcF.js → model-DOw7wIKQ.js} +1 -1
  192. package/dist/chunks/{onChangeAppState-Dxbl8fvk.js → onChangeAppState-Cb9_yIuW.js} +1 -1
  193. package/dist/chunks/{openai-DkYK4THc.js → openai-Bvo0Gcec.js} +3 -3
  194. package/dist/chunks/{overageCreditGrant-DLKadMYU.js → overageCreditGrant-BrN7dk3d.js} +1 -1
  195. package/dist/chunks/{passes-BIfuerjL.js → passes-vgcY8_l8.js} +1 -1
  196. package/dist/chunks/{paths-BBvuDQl9.js → paths-1ngPRtu3.js} +2 -2
  197. package/dist/chunks/permissions-BDbIjTT6.js +3 -0
  198. package/dist/chunks/{pipeTransport-DVoIA1uN.js → pipeTransport-KU8psPDI.js} +1 -1
  199. package/dist/chunks/{plan--lnWxB3Q.js → plan-5NVPuxp6.js} +1 -1
  200. package/dist/chunks/{plugin-DWLyrLw4.js → plugin-t8jMqdsY.js} +1 -1
  201. package/dist/chunks/{pluginAutoupdate-CGXIWBrb.js → pluginAutoupdate-CAa4KLro.js} +1 -1
  202. package/dist/chunks/{pluginBlocklist-DJrMdzT0.js → pluginBlocklist-BG2LkLq1.js} +1 -1
  203. package/dist/chunks/{pluginCliCommands-C08q9dHk.js → pluginCliCommands-vqAtVibb.js} +1 -1
  204. package/dist/chunks/{pluginFlagging-Dggxke70.js → pluginFlagging-BFCtv3kY.js} +1 -1
  205. package/dist/chunks/{pluginOperations-CNCImIe8.js → pluginOperations-C9XP-mko.js} +2 -2
  206. package/dist/chunks/pluginStartupCheck-DZp0wnXP.js +1 -0
  207. package/dist/chunks/{pluginStartupCheck-BW2fjg2P.js → pluginStartupCheck-RRcAbKfx.js} +1 -1
  208. package/dist/chunks/plugins-0SyID4Kx.js +4 -0
  209. package/dist/chunks/policyLimits-Cmmzuv-E.js +1 -0
  210. package/dist/chunks/{pollConfig-DAQ-ives.js → pollConfig-DTYIJ8lQ.js} +1 -1
  211. package/dist/chunks/{poor-DqfrQT61.js → poor-Dw5dMZpM.js} +1 -1
  212. package/dist/chunks/{poorMode-DzYT47KW.js → poorMode-CsGLI_hm.js} +1 -1
  213. package/dist/chunks/poorMode-D_hB-rDf.js +1 -0
  214. package/dist/chunks/{print-GGVp62vj.js → print-Ct8N4PYT.js} +12 -12
  215. package/dist/chunks/{privacy-settings-agwqjYJo.js → privacy-settings-P2r-kg2i.js} +1 -1
  216. package/dist/chunks/processBashCommand-a8W8aTRu.js +1 -0
  217. package/dist/chunks/{processSlashCommand-COtIO6Jy.js → processSlashCommand-BaUdUg3T.js} +3 -3
  218. package/dist/chunks/prompt-B1Qy8mi4.js +1 -0
  219. package/dist/chunks/{prompt-CjFAtm3w.js → prompt-BBg3jtfc.js} +1 -1
  220. package/dist/chunks/prompt-D4kWWEZC.js +1 -0
  221. package/dist/chunks/{promptEditor-EgosPsy-.js → promptEditor-CvaugNTt.js} +2 -2
  222. package/dist/chunks/{protocolHandler-mtPUT9U0.js → protocolHandler-DxBaHlaD.js} +1 -1
  223. package/dist/chunks/{rate-limit-options-C6SFOHue.js → rate-limit-options-Df_sgE0b.js} +1 -1
  224. package/dist/chunks/rcDebugLog-CPGWJbI4.js +11 -0
  225. package/dist/chunks/{referral-DeDr9zAE.js → referral-BKeCKnOJ.js} +1 -1
  226. package/dist/chunks/{refresh-D7pdoY_X.js → refresh-Cjv4jA6L.js} +1 -1
  227. package/dist/chunks/{registerProtocol-BZBH8Zgl.js → registerProtocol-DLuRm0mf.js} +1 -1
  228. package/dist/chunks/{registry-Dz6AbiYP.js → registry-DVSgtCq5.js} +1 -1
  229. package/dist/chunks/{release-notes-DiUNOrg9.js → release-notes-CZcf8zB7.js} +1 -1
  230. package/dist/chunks/{releaseNotes-CnhQit0y.js → releaseNotes-CvfZb3fZ.js} +2 -2
  231. package/dist/chunks/{reload-plugins-Dx52GcaG.js → reload-plugins-pSlDLk3b.js} +1 -1
  232. package/dist/chunks/{remote-env-B67Oo3sI.js → remote-env-BH89NuwC.js} +1 -1
  233. package/dist/chunks/{remoteBridgeCore-BzSUgPbt.js → remoteBridgeCore-CrXlWEL1.js} +1 -1
  234. package/dist/chunks/{remoteControlServer-L8smP7Zu.js → remoteControlServer-BSOnq4yY.js} +1 -1
  235. package/dist/chunks/{rename-C4PauyTZ.js → rename-DNGvNQm2.js} +1 -1
  236. package/dist/chunks/{resume-CrSn26xq.js → resume-6UL38yL3.js} +2 -2
  237. package/dist/chunks/{runtimeObserver-nAhH4Wca.js → runtimeObserver-BhvHeiwD.js} +4 -4
  238. package/dist/chunks/{runtimeObserver-YNy3mIb7.js → runtimeObserver-Cp-DN8fP.js} +1 -1
  239. package/dist/chunks/sandbox-adapter-DGVtPPD0.js +1 -0
  240. package/dist/chunks/{sandbox-toggle-BYqbcI5d.js → sandbox-toggle-D19YbI5G.js} +1 -1
  241. package/dist/chunks/searchExtraTools-DXWkpOIg.js +1 -0
  242. package/dist/chunks/{sentry-BNVxoVLS.js → sentry-BZmpC-iI.js} +1 -1
  243. package/dist/chunks/{session-BuEmHrqM.js → session-lLpGqp0B.js} +2 -2
  244. package/dist/chunks/{sessionDiscovery-Mcsfa0g-.js → sessionDiscovery-BX3fjgzD.js} +1 -1
  245. package/dist/chunks/sessionFileAccessHooks-BeuS4m7a.js +1 -0
  246. package/dist/chunks/sessionMemory-LMOQk90c.js +1 -0
  247. package/dist/chunks/sessionMemory-UpILj5ww.js +1 -0
  248. package/dist/chunks/sessionMemoryUtils-DE7AezA0.js +1 -0
  249. package/dist/chunks/{sessionObserver-DG2zQgfi.js → sessionObserver-CujNIWks.js} +1 -1
  250. package/dist/chunks/sessionObserver-HqvTXhs9.js +1 -0
  251. package/dist/chunks/sessionStorage-BN56DAAd.js +1 -0
  252. package/dist/chunks/{sessionTitle-zUVSAHO7.js → sessionTitle-QxXslbJY.js} +1 -1
  253. package/dist/chunks/{sessionTracing-DoRJ4nSa.js → sessionTracing-DognYcDf.js} +1 -1
  254. package/dist/chunks/{settingsSync-B9bz77E1.js → settingsSync-DEPET5O1.js} +1 -1
  255. package/dist/chunks/{setup-B1JbPepL.js → setup-BUBUidOg.js} +1 -1
  256. package/dist/chunks/setup-BZMVuIIx.js +2 -0
  257. package/dist/chunks/{setup-CCOLlRtP.js → setup-C6G0lasE.js} +1 -1
  258. package/dist/chunks/{shadowedRuleDetection-BBR3uEgx.js → shadowedRuleDetection-CQayPrmM.js} +1 -1
  259. package/dist/chunks/{sideQuestion-DHW5rgKz.js → sideQuestion-B9EE1vTM.js} +1 -1
  260. package/dist/chunks/sink-BRrEbL6h.js +1 -0
  261. package/dist/chunks/{sink-DxDOsLa2.js → sink-Cugto5We.js} +1 -1
  262. package/dist/chunks/{sinks-BrrTUxkC.js → sinks-B9A94oIj.js} +2 -2
  263. package/dist/chunks/sinks-CKaSBvU8.js +1 -0
  264. package/dist/chunks/{skill-learning-C0nOKZfg.js → skill-learning-CroDcatu.js} +1 -1
  265. package/dist/chunks/skillChangeDetector-DnyEQqe6.js +1 -0
  266. package/dist/chunks/{skillGapStore-_YuJP5KI.js → skillGapStore-91Mb3xDY.js} +2 -2
  267. package/dist/chunks/{skillGapStore-Czi5jKjJ.js → skillGapStore-LKwap3o4.js} +1 -1
  268. package/dist/chunks/{skillGenerator-kbaRbpqJ.js → skillGenerator-B9GM0LHk.js} +2 -2
  269. package/dist/chunks/skillLearning-D6latSKi.js +1 -0
  270. package/dist/chunks/skillLearning-DbOOqb6b.js +1 -0
  271. package/dist/chunks/{skillPanel-BxDvlPzd.js → skillPanel-rIIYgnBE.js} +3 -3
  272. package/dist/chunks/{skillSearchPanel-D-MX6Qgt.js → skillSearchPanel-xAL-6uJF.js} +4 -4
  273. package/dist/chunks/{skills-NpEgFkFZ.js → skills-Doe47wxK.js} +1 -1
  274. package/dist/chunks/{sprites-DD4eIkN7.js → sprites-D11F3i1M.js} +1 -1
  275. package/dist/chunks/{stats-xL3NHwhp.js → stats-WNUyieG-.js} +1 -1
  276. package/dist/chunks/{status-B5E70xRv.js → status-CjBS9SkF.js} +1 -1
  277. package/dist/chunks/{statusNoticeHelpers-DcssRhLw.js → statusNoticeHelpers-cnI4TiGw.js} +1 -1
  278. package/dist/chunks/{tag-BELr-qIa.js → tag-Gfb8vTAR.js} +2 -2
  279. package/dist/chunks/{tasks-CrdWcSt-.js → tasks-BwX1rzOD.js} +1 -1
  280. package/dist/chunks/{teamHelpers--3ZyNDlv.js → teamHelpers-DEgaCpta.js} +1 -1
  281. package/dist/chunks/teamHelpers-EJxTXoTV.js +1 -0
  282. package/dist/chunks/teammateModeSnapshot-BgUQ4Phz.js +1 -0
  283. package/dist/chunks/{teammateModeSnapshot-DOQMTKbQ.js → teammateModeSnapshot-Dyukgtp9.js} +1 -1
  284. package/dist/chunks/teleport-B4p8XlAv.js +1 -0
  285. package/dist/chunks/{templateJobs-8IY2Cgig.js → templateJobs-DQXuFnkl.js} +1 -1
  286. package/dist/chunks/{terminalSetup-C4psrmpb.js → terminalSetup-CTEIn08j.js} +1 -1
  287. package/dist/chunks/{terminalSetup-Lyg4NbGA.js → terminalSetup-bSbq4LE7.js} +1 -1
  288. package/dist/chunks/{theme-B8GNnJ_q.js → theme-DazaKPy8.js} +1 -1
  289. package/dist/chunks/thinkback-BOfZP_QG.js +1 -0
  290. package/dist/chunks/{thinkback-DPXwEK3B.js → thinkback-CxWZV2Oz.js} +1 -1
  291. package/dist/chunks/{thinkback-play-BMOE-ceh.js → thinkback-play-CHe1x2Hc.js} +1 -1
  292. package/dist/chunks/{toolEventObserver-DzLd0MSn.js → toolEventObserver-D4h-QqVP.js} +1 -1
  293. package/dist/chunks/{toolEventObserver-D0TSHm01.js → toolEventObserver-Dfvv2trb.js} +1 -1
  294. package/dist/chunks/toolPool-BHChMuLr.js +1 -0
  295. package/dist/chunks/toolPool-C5K43w4_.js +1 -0
  296. package/dist/chunks/{trustedDevice-1iTu4LEm.js → trustedDevice-CQ9PK-8m.js} +1 -1
  297. package/dist/chunks/{trustedDevice-BvYYXfd8.js → trustedDevice-rdvUkS1W.js} +1 -1
  298. package/dist/chunks/{ultrareviewCommand-BTXAN2wP.js → ultrareviewCommand-Zf9hO4wr.js} +2 -2
  299. package/dist/chunks/{undercover-DvvnEmsX.js → undercover-DLyKv5TE.js} +1 -1
  300. package/dist/chunks/undercover-DNS9V_JT.js +1 -0
  301. package/dist/chunks/{updateCCB-C-qfLi0j.js → updateCCB-7WQRz9lW.js} +4 -4
  302. package/dist/chunks/{upgrade-DTBZSxwv.js → upgrade-ByIumMQe.js} +1 -1
  303. package/dist/chunks/upgrade-bK4x32Ma.js +1 -0
  304. package/dist/chunks/{upload-BF8tf_Eo.js → upload-CvOMbA9_.js} +1 -1
  305. package/dist/chunks/{usage-DvSTXEYY.js → usage-C_d-Z-eb.js} +1 -1
  306. package/dist/chunks/{usage-BRYRRgNt.js → usage-DE4PSQiF.js} +1 -1
  307. package/dist/chunks/useMainLoopModel-Os8Ao8-x.js +1 -0
  308. package/dist/chunks/{useManagePlugins-GmnI9K53.js → useManagePlugins-BYBubfHU.js} +1 -1
  309. package/dist/chunks/{useMergedTools-Dah5KDMi.js → useMergedTools-BJAn2i-F.js} +1 -1
  310. package/dist/chunks/{useSearchInput-BV_azHiA.js → useSearchInput-CF77X2OV.js} +1 -1
  311. package/dist/chunks/useSettingsErrors-DD7fQ-fU.js +1 -0
  312. package/dist/chunks/{useVoice-DR69NLxp.js → useVoice-DwzMN0fq.js} +1 -1
  313. package/dist/chunks/{util-BpyJ4Bom.js → util-DD30Y4o8.js} +1 -1
  314. package/dist/chunks/utils-D44M8obg.js +1 -0
  315. package/dist/chunks/validatePlugin-DpHiJRsT.js +1 -0
  316. package/dist/chunks/{vim-DvOw8dfR.js → vim-zc9EiMil.js} +1 -1
  317. package/dist/chunks/{voice-B3BZs53f.js → voice-BRhZt4jW.js} +2 -2
  318. package/dist/chunks/{voiceModeEnabled-DA76xN1Q.js → voiceModeEnabled-168-1Ocs.js} +1 -1
  319. package/dist/chunks/voiceModeEnabled-CTT25yFj.js +1 -0
  320. package/dist/chunks/{voiceStreamSTT-_w1VjIOs.js → voiceStreamSTT-B80UegKG.js} +1 -1
  321. package/dist/chunks/voiceStreamSTT-BpYhKo2H.js +1 -0
  322. package/dist/chunks/{workerRegistry-2_MZVih1.js → workerRegistry-s8nnpmUO.js} +1 -1
  323. package/dist/chunks/worktree-CkB4jLXK.js +1 -0
  324. package/dist/chunks/{xml-Dx--sNE1.js → xml-DTMvLcPg.js} +1 -1
  325. package/dist/cli.js +1 -1
  326. package/package.json +1 -1
  327. package/dist/chunks/ApproveApiKey-DiEe4eui.js +0 -1
  328. package/dist/chunks/BackgroundTasksDialog-ByraVuXh.js +0 -2
  329. package/dist/chunks/BypassPermissionsModeDialog-BDvmz12S.js +0 -1
  330. package/dist/chunks/ClaudeMdExternalIncludesDialog-B4ocUjev.js +0 -1
  331. package/dist/chunks/ConsoleOAuthFlow-BvaB9b0y.js +0 -1
  332. package/dist/chunks/DevChannelsDialog-BljR0X9X.js +0 -1
  333. package/dist/chunks/DiffDialog-BhQ2QaLW.js +0 -3
  334. package/dist/chunks/Doctor-BXb0qv6n.js +0 -3
  335. package/dist/chunks/Doctor-C5DYPEGl.js +0 -1
  336. package/dist/chunks/Feedback-DwHzc4UT.js +0 -2
  337. package/dist/chunks/Grove-DnTo982-.js +0 -1
  338. package/dist/chunks/MCPConnectionManager-DYGoS1Ht.js +0 -1
  339. package/dist/chunks/MessageSelector-DTmUuEKJ.js +0 -3
  340. package/dist/chunks/Messages-DWiKTx5o.js +0 -11
  341. package/dist/chunks/PluginSettings-eYcWehI8.js +0 -17
  342. package/dist/chunks/QueryEngine-C_KZts4y.js +0 -1
  343. package/dist/chunks/REPL-C6YR0VKU.js +0 -1
  344. package/dist/chunks/REPL-DzHz-LOY.js +0 -97
  345. package/dist/chunks/ResumeConversation-BktSnsCm.js +0 -1
  346. package/dist/chunks/SearchExtraToolsTool-CqFD8vVS.js +0 -1
  347. package/dist/chunks/SentryErrorBoundary-BUirJRWU.js +0 -1
  348. package/dist/chunks/Settings-vfFvcweR.js +0 -2
  349. package/dist/chunks/TeleportRepoMismatchDialog-_zbZTvcJ.js +0 -1
  350. package/dist/chunks/TrustDialog-CVbzrv6g.js +0 -1
  351. package/dist/chunks/WindowsTerminalBackend-BE9NX5IH.js +0 -2
  352. package/dist/chunks/api-6tcwJlf_.js +0 -1
  353. package/dist/chunks/assistant-CwbhlCM-.js +0 -1
  354. package/dist/chunks/auth-GxZhOvQ1.js +0 -1
  355. package/dist/chunks/backgroundHousekeeping-BIZTAYho.js +0 -17
  356. package/dist/chunks/backgroundHousekeeping-Csh58CxV.js +0 -1
  357. package/dist/chunks/bridgeConfig-D4tpc568.js +0 -1
  358. package/dist/chunks/bridgeEnabled-B8_c_Ppq.js +0 -1
  359. package/dist/chunks/bridgeMain-C5RDihlX.js +0 -68
  360. package/dist/chunks/bridgeMain-D7_lg2iJ.js +0 -1
  361. package/dist/chunks/caches-dGk7xsDu.js +0 -1
  362. package/dist/chunks/changeDetector-DoLfg8a6.js +0 -1
  363. package/dist/chunks/channelNotification-DDErroWn.js +0 -1
  364. package/dist/chunks/clear-OudnCGa7.js +0 -1
  365. package/dist/chunks/client-DxDmXXTh.js +0 -1
  366. package/dist/chunks/commands-BWIOEBPs.js +0 -1
  367. package/dist/chunks/commitAttribution-BA4fcbHf.js +0 -1
  368. package/dist/chunks/context-noninteractive-CM1-lUSe.js +0 -1
  369. package/dist/chunks/conversation-DKlz47xf.js +0 -1
  370. package/dist/chunks/conversation-cUxdb8MN.js +0 -1
  371. package/dist/chunks/createSession-BuJcoBAj.js +0 -1
  372. package/dist/chunks/cronJitterConfig-CYP7yrQu.js +0 -6
  373. package/dist/chunks/crossProjectResume-BJisir9Z.js +0 -40
  374. package/dist/chunks/datadog-CVeFkaQu.js +0 -1
  375. package/dist/chunks/envLessBridgeConfig-CT8sdmFu.js +0 -1
  376. package/dist/chunks/extra-usage-rdJ7ecEb.js +0 -1
  377. package/dist/chunks/extractMemories-BrvZVsmM.js +0 -1
  378. package/dist/chunks/fast-CLKKsx2H.js +0 -1
  379. package/dist/chunks/gates-CSHuXnUx.js +0 -1
  380. package/dist/chunks/hooks-BFdX17Za.js +0 -1
  381. package/dist/chunks/inboundAttachments-BVUunfAX.js +0 -1
  382. package/dist/chunks/initReplBridge-tPRGPBq7.js +0 -1
  383. package/dist/chunks/language-Cf6bMI4N.js +0 -1
  384. package/dist/chunks/launchAutofixPr-D9h6YAZY.js +0 -2
  385. package/dist/chunks/loadAgentsDir-DCyiY0MN.js +0 -1
  386. package/dist/chunks/localSearch-MBx7KzC2.js +0 -1
  387. package/dist/chunks/login-D8UKKaud.js +0 -1
  388. package/dist/chunks/logout-B0BjqlGi.js +0 -1
  389. package/dist/chunks/mcp-CanCqnch.js +0 -2
  390. package/dist/chunks/mcp-Dq0kxZFx.js +0 -6
  391. package/dist/chunks/mcp-zbxZM9BP.js +0 -1
  392. package/dist/chunks/model-H3rtl6eR.js +0 -1
  393. package/dist/chunks/permissions-S2EvIRKj.js +0 -3
  394. package/dist/chunks/pluginStartupCheck-DpxQPXJE.js +0 -1
  395. package/dist/chunks/plugins-DQ3CRWWO.js +0 -4
  396. package/dist/chunks/policyLimits-BotYrS-v.js +0 -1
  397. package/dist/chunks/poorMode-DEAe3hiK.js +0 -1
  398. package/dist/chunks/processBashCommand-DHHN8Ca4.js +0 -1
  399. package/dist/chunks/prompt-CO160cIr.js +0 -1
  400. package/dist/chunks/prompt-GY9hlRvI.js +0 -1
  401. package/dist/chunks/rcDebugLog-CPKZCtR8.js +0 -11
  402. package/dist/chunks/sandbox-adapter-CzwHes1i.js +0 -1
  403. package/dist/chunks/searchExtraTools-CcpdCO6l.js +0 -1
  404. package/dist/chunks/sessionFileAccessHooks-qnNiGMnE.js +0 -1
  405. package/dist/chunks/sessionMemory-CMahwDdW.js +0 -1
  406. package/dist/chunks/sessionMemory-pFSn4HSN.js +0 -1
  407. package/dist/chunks/sessionMemoryUtils-Du5jUl7M.js +0 -1
  408. package/dist/chunks/sessionObserver-Je868MC9.js +0 -1
  409. package/dist/chunks/sessionStorage-D3FhAADV.js +0 -1
  410. package/dist/chunks/setup-DWkSjA49.js +0 -2
  411. package/dist/chunks/sink-cQOgsnw3.js +0 -1
  412. package/dist/chunks/sinks-Djiz_5-Z.js +0 -1
  413. package/dist/chunks/skillChangeDetector-D8C-uQSQ.js +0 -1
  414. package/dist/chunks/skillLearning-3KWrBczS.js +0 -1
  415. package/dist/chunks/skillLearning-DBbdGbk-.js +0 -1
  416. package/dist/chunks/teamHelpers-CUAiXng3.js +0 -1
  417. package/dist/chunks/teammateModeSnapshot-C6EWhR0X.js +0 -1
  418. package/dist/chunks/teleport-LXFOan9C.js +0 -1
  419. package/dist/chunks/thinkback-DZW3Mcx_.js +0 -1
  420. package/dist/chunks/toolPool-DVOfpjDz.js +0 -1
  421. package/dist/chunks/toolPool-Dq-Vtvrj.js +0 -1
  422. package/dist/chunks/undercover-C_44e3oN.js +0 -1
  423. package/dist/chunks/upgrade-CGXa5Dwy.js +0 -1
  424. package/dist/chunks/useMainLoopModel-CwvuTRXn.js +0 -1
  425. package/dist/chunks/useSettingsErrors-C-j_Zt7g.js +0 -1
  426. package/dist/chunks/utils-CrZcpypC.js +0 -1
  427. package/dist/chunks/validatePlugin-vptAYuYu.js +0 -1
  428. package/dist/chunks/voiceModeEnabled-DIveLYGb.js +0 -1
  429. package/dist/chunks/voiceStreamSTT-hpzWd_zl.js +0 -1
  430. package/dist/chunks/worktree-CCuDwRmS.js +0 -1
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Ac as s,Jt as c,Pc as l,Sc as u,on as d}from"./paths-BBvuDQl9.js";import{Dx as f,Ox as p}from"./loadAgentsDir-DI1a76pd.js";import{i as m,r as h}from"./bridgeEnabled-D2IykaHE.js";import{n as g,t as _}from"./PermissionDialog-5MlJf7ew.js";function v({onDone:e}){let t=(0,b.useRef)(e);t.current=e;let n=(0,b.useCallback)(()=>{t.current(`dismiss`)},[]);(0,b.useEffect)(()=>{l(e=>e.remoteDialogSeen?e:{...e,remoteDialogSeen:!0})},[]);let i=(0,b.useCallback)(e=>{t.current(e)},[]);return(0,x.jsx)(_,{title:`Remote Control`,children:(0,x.jsxs)(a,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,x.jsxs)(a,{marginBottom:1,flexDirection:`column`,children:[(0,x.jsx)(r,{children:`Remote Control lets you access this CLI session from the web (claude.ai/code) or the Claude app, so you can pick up where you left off on any device.`}),(0,x.jsx)(r,{children:` `}),(0,x.jsx)(r,{children:`You can disconnect remote access anytime by running /remote-control again.`})]}),(0,x.jsx)(a,{children:(0,x.jsx)(f,{options:[{label:`Enable Remote Control for this session`,description:`Opens a secure connection to claude.ai.`,value:`enable`},{label:`Never mind`,description:`You can always enable it later with /remote-control.`,value:`dismiss`}],onChange:i,onCancel:n})})]})})}function y(){return!(u().remoteDialogSeen||!m()||!c()?.accessToken)}var b,x,S=e((()=>{b=t(n(),1),h(),i(),d(),s(),p(),g(),x=o()}));export{S as n,y as r,v as t};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Ac as s,Jt as c,Pc as l,Sc as u,on as d}from"./paths-1ngPRtu3.js";import{Ax as f,kx as p}from"./loadAgentsDir-D7kapZB5.js";import{i as m,r as h}from"./bridgeEnabled-A-_xJ94c.js";import{n as g,t as _}from"./PermissionDialog-5MlJf7ew.js";function v({onDone:e}){let t=(0,b.useRef)(e);t.current=e;let n=(0,b.useCallback)(()=>{t.current(`dismiss`)},[]);(0,b.useEffect)(()=>{l(e=>e.remoteDialogSeen?e:{...e,remoteDialogSeen:!0})},[]);let i=(0,b.useCallback)(e=>{t.current(e)},[]);return(0,x.jsx)(_,{title:`Remote Control`,children:(0,x.jsxs)(a,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,x.jsxs)(a,{marginBottom:1,flexDirection:`column`,children:[(0,x.jsx)(r,{children:`Remote Control lets you access this CLI session from the web (claude.ai/code) or the Claude app, so you can pick up where you left off on any device.`}),(0,x.jsx)(r,{children:` `}),(0,x.jsx)(r,{children:`You can disconnect remote access anytime by running /remote-control again.`})]}),(0,x.jsx)(a,{children:(0,x.jsx)(p,{options:[{label:`Enable Remote Control for this session`,description:`Opens a secure connection to claude.ai.`,value:`enable`},{label:`Never mind`,description:`You can always enable it later with /remote-control.`,value:`dismiss`}],onChange:i,onCancel:n})})]})})}function y(){return!(u().remoteDialogSeen||!m()||!c()?.accessToken)}var b,x,S=e((()=>{b=t(n(),1),h(),i(),d(),s(),f(),g(),x=o()}));export{S as n,y as r,v as t};
@@ -1,2 +1,2 @@
1
- import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{In as a,Ln as o,Rn as s,b as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as ee}from"./jsx-runtime-D-D469L8.js";import{Ac as f,Cl as te,Dr as ne,Fa as re,Ka as p,Na as m,Nc as ie,Nr as ae,Pc as h,Pr as oe,Qa as se,S as g,Sc as _,_ as v,bc as y,g as ce,gt as le,no as b,on as x,oo as S,sn as C,vt as ue,wl as w}from"./paths-BBvuDQl9.js";import{E as T,L as de,T as fe,V as pe,d as E,s as D,w as me}from"./debug-UI3T040K.js";import{n as he,r as ge}from"./analytics-DqMQntaB.js";import{n as _e,t as O}from"./cwd--iizewsn.js";import{_ as ve,f as ye,g as be,v as k}from"./git-CN3qtTb_.js";import{l as A,u as j}from"./oauth-CdZEzMww.js";import{a as M,n as N}from"./env-chR0gV31.js";import{o as P,s as F}from"./log-CzsijfHZ.js";import{i as I,o as xe}from"./platform-CuyedWpe.js";import{n as L,r as Se}from"./execFileNoThrow-CuQN1sz8.js";import{l as Ce,r as we}from"./teammate-DMYOtLTK.js";import{c as Te,g as Ee,h as R,l as De,u as Oe}from"./proxy-CfZp-wce.js";import{$A as ke,$w as z,Ar as Ae,As as je,DA as Me,Dx as Ne,Es as Pe,KA as Fe,Kb as Ie,Mr as Le,Ox as Re,Qb as ze,TA as B,Us as Be,Vs as Ve,Yb as He,Yv as V,ZA as Ue,ax as We,cd as Ge,eT as Ke,ex as qe,ix as Je,ox as Ye,pr as Xe,rx as Ze,sd as Qe,ty as $e}from"./loadAgentsDir-DI1a76pd.js";import{M as et,P as tt}from"./prompt-CjFAtm3w.js";import{n as nt,o as rt}from"./fileStateCache-C7-TxF8G.js";import{a as H,i as U,o as W}from"./teamHelpers--3ZyNDlv.js";import{d as it,o as at}from"./api-CGOR_Xfl.js";import{c as ot,i as st}from"./terminalSetup-Lyg4NbGA.js";import{a as ct,r as lt,s as ut,t as dt}from"./referral-DeDr9zAE.js";import{n as ft,t as pt}from"./PermissionDialog-5MlJf7ew.js";import{n as mt,r as ht,t as gt}from"./overageCreditGrant-DLKadMYU.js";import{i as _t,o as vt}from"./OverageCreditUpsell-Cpk_5Lv0.js";import{n as yt,t as bt}from"./DesktopHandoff-S-w4bs5T.js";import{randomUUID as xt}from"crypto";D(),P(),Ce(),H();function St(){let e=we();if(!e?.teamName||!e?.agentName){E(`[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)`);return}let{teamName:t,agentId:n,agentName:r}=e,i=W(t);if(!i){F(Error(`[computeInitialTeamContext] Could not read team file for ${t}`));return}let a=U(t),o=!n;return E(`[Reconnection] Computed initial team context for ${o?`leader`:`teammate ${r}`} in team ${t}`),{teamName:t,teamFilePath:a,leadAgentId:i.leadAgentId,selfAgentId:n,selfAgentName:r,isLeader:o,teammates:{}}}function Ct(e,t,n){let r=W(t);if(!r){F(Error(`[initializeTeammateContextFromSession] Could not read team file for ${t} (agent: ${n})`));return}let i=r.members.find(e=>e.name===n);i||E(`[Reconnection] Member ${n} not found in team ${t} - may have been removed`);let a=i?.agentId,o=U(t);e(e=>({...e,teamContext:{teamName:t,teamFilePath:o,leadAgentId:r.leadAgentId,selfAgentId:a,selfAgentName:n,isLeader:!1,teammates:{}}})),E(`[Reconnection] Initialized agent context from session for ${n} in team ${t}`)}n(),te(),_e(),f(),M(),Se(),k(),P(),ue();var wt=[/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,/\.generated\./,/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,/\.(?:min\.js|min\.css|map|pyc|pyo)$/,/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,/(?:^|\/)\.(?:github|vscode|idea|claude)\//,/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i];function Tt(e){return!wt.some(t=>t.test(e))}function Et(e,t){let n=[],r=new Set,i=new Map;for(let a=1;n.length<t&&a<=t;a++)for(let o of e){if(n.length>=t)break;if(!Tt(o))continue;let e=Math.max(o.lastIndexOf(`/`),o.lastIndexOf(`\\`)),s=e>=0?o.slice(e+1):o;if(!s||r.has(s))continue;let c=e>=0?o.slice(0,e):`.`;(i.get(c)??0)>=a||(n.push(s),r.add(s),i.set(c,(i.get(c)??0)+1))}return n.length>=t?n:[]}async function Dt(){if(N.platform===`win32`||!await ye())return[];try{let e=await le(),t=[`log`,`-n`,`1000`,`--pretty=format:`,`--name-only`,`--diff-filter=M`],n=new Map,r=e=>{for(let t of e.split(`
2
- `)){let e=t.trim();e&&n.set(e,(n.get(e)??0)+1)}};if(e){let{stdout:n}=await L(`git`,[...t,`--author=${e}`],{cwd:O()});r(n)}if(n.size<10){let{stdout:e}=await L(ve(),t,{cwd:O()});r(e)}return Et(Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e])=>e),5)}catch(e){return F(e),[]}}var Ot=10080*60*1e3,kt=t(()=>{let e=y(),t=e.exampleFiles?.length?w(e.exampleFiles):`<filepath>`;return`Try "${w([`fix lint errors`,`fix typecheck errors`,`how does ${t} work?`,`refactor ${t}`,`how do I log an error?`,`edit ${t} to...`,`write a test for ${t}`,`create a util logging.py that...`])}"`}),At=t(async()=>{let e=y();Date.now()-(e.exampleFilesGeneratedAt??0)>Ot&&(e.exampleFiles=[]),e.exampleFiles?.length||Dt().then(e=>{e.length&&ie(t=>({...t,exampleFiles:e,exampleFilesGeneratedAt:Date.now()}))})});re();var jt={"claude-3-opus":{modelName:`Claude 3 Opus`,retirementDates:{firstParty:`January 5, 2026`,bedrock:`January 15, 2026`,vertex:`January 5, 2026`,foundry:`January 5, 2026`}},"claude-3-7-sonnet":{modelName:`Claude 3.7 Sonnet`,retirementDates:{firstParty:`February 19, 2026`,bedrock:`April 28, 2026`,vertex:`May 11, 2026`,foundry:`February 19, 2026`}},"claude-3-5-haiku":{modelName:`Claude 3.5 Haiku`,retirementDates:{firstParty:`February 19, 2026`,bedrock:null,vertex:null,foundry:null}}};function Mt(e){let t=e.toLowerCase(),n=m();for(let[e,r]of Object.entries(jt)){let i=r.retirementDates[n];if(!(!t.includes(e)||!i))return{isDeprecated:!0,modelName:r.modelName,retirementDate:i}}return{isDeprecated:!1}}function Nt(e){if(!e)return null;let t=Mt(e);return t.isDeprecated?`⚠ ${t.modelName} will be retired on ${t.retirementDate}. Consider switching to a newer model.`:null}r(),o(),pe(),me(),j(),xe(),S(),x(),st(),$e(),Ge(),Ae();var G=e(s(),1);l(),g(),he(),f(),Re(),yt(),ft();var K=ee(),Pt={enable_shortcut_tip:!1,enable_startup_dialog:!1};function q(){return ce(`tengu_desktop_upsell`,Pt)}function Ft(){return process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`}function It(){if(!Ft()||!q().enable_startup_dialog)return!1;let e=_();return!(e.desktopUpsellDismissed||(e.desktopUpsellSeenCount??0)>=3)}function Lt({onDone:e}){let[t,n]=(0,G.useState)(!1);if((0,G.useEffect)(()=>{let e=(_().desktopUpsellSeenCount??0)+1;h(t=>(t.desktopUpsellSeenCount??0)>=e?t:{...t,desktopUpsellSeenCount:e}),ge(`tengu_desktop_upsell_shown`,{seen_count:e})},[]),t)return(0,K.jsx)(bt,{onDone:()=>e()});function r(t){switch(t){case`try`:n(!0);return;case`never`:h(e=>e.desktopUpsellDismissed?e:{...e,desktopUpsellDismissed:!0}),e();return;case`not-now`:e();return}}return(0,K.jsx)(pt,{title:`Try Claude Code Desktop`,children:(0,K.jsxs)(d,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,K.jsx)(d,{marginBottom:1,children:(0,K.jsx)(c,{children:`Same Claude Code with visual diffs, live app preview, parallel sessions, and more.`})}),(0,K.jsx)(Ne,{options:[{label:`Open in Claude Code Desktop`,value:`try`},{label:`Not now`,value:`not-now`},{label:`Don't ask again`,value:`never`}],onChange:r,onCancel:()=>r(`not-now`)})]})})}oe(),Ue(),Me(),et(),rt(),at(),Ke(),ze(),Ve(),Pe(),ut(),ht(),_t(),f();function Rt(e){let t=_().numStartups;h(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function J(e){let t=_(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}D(),l(),f(),M(),k(),g();var Y;async function zt(){return Y===void 0&&(Y=B in await Be()),Y}async function X(e,t,n){if(!await zt()||je(`${e}@claude-plugins-official`))return!1;let{bashTools:r}=t??{};return!!(n.cli&&r?.size&&n.cli.some(e=>r.has(e))||n.filePath&&t?.readFileState&&nt(t.readFileState).some(e=>n.filePath.test(e)))}var Bt=[{id:`new-user-warmup`,content:async()=>`Start with small features or bug fixes, tell Claude to propose a plan, and verify its suggested edits`,cooldownSessions:3,async isRelevant(){return _().numStartups<10}},{id:`plan-mode-for-complex-tasks`,content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${z(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let e=_();return(e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0)>7}},{id:`default-permission-mode-config`,content:async()=>`Use /config to change your default permission mode (including Plan Mode)`,cooldownSessions:10,isRelevant:async()=>{try{let e=_(),t=b(),n=!!e.lastPlanModeUse,r=!!t?.permissions?.defaultMode;return n&&!r}catch(e){return E(`Failed to check default-permission-mode-config tip relevance: ${e}`,{level:`warn`}),!1}}},{id:`git-worktrees`,content:async()=>`Use git worktrees to run multiple Claude sessions in parallel.`,cooldownSessions:10,isRelevant:async()=>{try{let e=_();return await be()<=1&&e.numStartups>50}catch{return!1}}},{id:`color-when-multi-clauding`,content:async()=>`Running multiple Claude sessions? Use /color and /rename to tell them apart at a glance.`,cooldownSessions:10,isRelevant:async()=>Xe()?!1:await Qe()>=2},{id:`terminal-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more`:`Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more`,cooldownSessions:10,async isRelevant(){let e=_();return N.terminal===`Apple_Terminal`?!e.optionAsMetaKeyInstalled:!e.shiftEnterKeyBindingInstalled}},{id:`shift-enter`,content:async()=>N.terminal===`Apple_Terminal`?`Press Option+Enter to send a multi-line message`:`Press Shift+Enter to send a multi-line message`,cooldownSessions:10,async isRelevant(){let e=_();return!!((N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)&&e.numStartups>3)}},{id:`shift-enter-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable Option+Enter for new lines`:`Run /terminal-setup to enable Shift+Enter for new lines`,cooldownSessions:10,async isRelevant(){if(!ot())return!1;let e=_();return!(N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)}},{id:`memory-command`,content:async()=>`Use /memory to view and manage Claude memory`,cooldownSessions:15,async isRelevant(){return _().memoryUsageCount<=0}},{id:`theme-command`,content:async()=>`Use /theme to change the color theme`,cooldownSessions:20,isRelevant:async()=>!0},{id:`colorterm-truecolor`,content:async()=>`Try setting environment variable COLORTERM=truecolor for richer colors`,cooldownSessions:30,isRelevant:async()=>!process.env.COLORTERM&&a.level<3},{id:`powershell-tool-env`,content:async()=>`Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)`,cooldownSessions:10,isRelevant:async()=>I()===`windows`&&process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL===void 0},{id:`status-line`,content:async()=>`Use /statusline to set up a custom status line that will display beneath the input box`,cooldownSessions:25,isRelevant:async()=>b().statusLine===void 0},{id:`prompt-queue`,content:async()=>`Hit Enter to queue up additional messages while Claude is working.`,cooldownSessions:5,async isRelevant(){return _().promptQueueUseCount<=3}},{id:`enter-to-steer-in-relatime`,content:async()=>`Send messages to Claude while it works to steer Claude in real-time`,cooldownSessions:20,isRelevant:async()=>!0},{id:`todo-list`,content:async()=>`Ask Claude to create a todo list when working on complex tasks to track progress and remain on track`,cooldownSessions:20,isRelevant:async()=>!0},{id:`vscode-command-install`,content:async()=>`Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${N.terminal===`vscode`?`code`:N.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!Je()||I()!==`macos`)return!1;switch(N.terminal){case`vscode`:return!await We();case`cursor`:return!await qe();case`windsurf`:return!await Ye();default:return!1}}},{id:`ide-upsell-external-terminal`,content:async()=>`Connect Claude to your IDE · /ide`,cooldownSessions:4,async isRelevant(){return Ze()||(await He()).length!==0?!1:(await Ie()).length>0}},{id:`install-github-app`,content:async()=>`Run /install-github-app to tag @claude right from your Github issues and PRs`,cooldownSessions:10,isRelevant:async()=>!_().githubActionSetupCount},{id:`install-slack-app`,content:async()=>`Run /install-slack-app to use Claude in Slack`,cooldownSessions:10,isRelevant:async()=>!_().slackAppInstallCount},{id:`permissions`,content:async()=>`Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools`,cooldownSessions:10,async isRelevant(){return _().numStartups>10}},{id:`drag-and-drop-images`,content:async()=>`Did you know you can drag and drop image files into your terminal?`,cooldownSessions:10,isRelevant:async()=>!N.isSSH()},{id:`paste-images-mac`,content:async()=>`Paste images into Claude Code using control+v (not cmd+v!)`,cooldownSessions:10,isRelevant:async()=>I()===`macos`},{id:`double-esc`,content:async()=>`Double-tap esc to rewind the conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>!V()},{id:`double-esc-code-restore`,content:async()=>`Double-tap esc to rewind the code and/or conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>V()},{id:`continue`,content:async()=>`Run claude --continue or claude --resume to resume a conversation`,cooldownSessions:10,isRelevant:async()=>!0},{id:`rename-conversation`,content:async()=>`Name your conversations with /rename to find them easily in /resume later`,cooldownSessions:15,isRelevant:async()=>Le()&&_().numStartups>10},{id:`custom-commands`,content:async()=>`Create skills by adding .md files to .claude/skills/ in your project or ~/.claude/skills/ for skills that work in any project`,cooldownSessions:15,async isRelevant(){return _().numStartups>10}},{id:`shift-tab`,content:async()=>`Hit ${z(`chat:cycleMode`,`Chat`,`shift+tab`)} to cycle between default, accept edits, plan, auto, and bypass modes`,cooldownSessions:10,isRelevant:async()=>!0},{id:`image-paste`,content:async()=>`Use ${z(`chat:imagePaste`,`Chat`,`ctrl+v`)} to paste images from your clipboard`,cooldownSessions:20,isRelevant:async()=>!0},{id:`custom-agents`,content:async()=>`Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer`,cooldownSessions:15,async isRelevant(){return _().numStartups>5}},{id:`agent-flag`,content:async()=>`Use --agent <agent_name> to directly start a conversation with a subagent`,cooldownSessions:15,async isRelevant(){return _().numStartups>5}},{id:`desktop-app`,content:async()=>`Run Claude Code locally or remotely using the Claude desktop app: clau.de/desktop`,cooldownSessions:15,isRelevant:async()=>I()!==`linux`},{id:`desktop-shortcut`,content:async e=>`Continue your session in Claude Code Desktop with ${u(`suggestion`,e?.theme??`dark`)(`/desktop`)}`,cooldownSessions:15,isRelevant:async()=>q().enable_shortcut_tip?process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`:!1},{id:`web-app`,content:async()=>`Run tasks in the cloud while you keep coding locally · clau.de/web`,cooldownSessions:15,isRelevant:async()=>!0},{id:`mobile-app`,content:async()=>`/mobile to use Claude Code from the Claude app on your phone`,cooldownSessions:15,isRelevant:async()=>!0},{id:`opusplan-mode-reminder`,content:async()=>`Your default model setting is Opus Plan Mode. Press ${z(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to activate Plan Mode and plan with Claude Opus.`,cooldownSessions:2,async isRelevant(){if(process.env.USER_TYPE===`ant`)return!1;let e=_(),t=ae()===`opusplan`,n=e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0;return t&&n>3}},{id:`frontend-design-plugin`,content:async e=>`Working with HTML/CSS? Install the frontend-design plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install frontend-design@${B}`)}`,cooldownSessions:3,isRelevant:async e=>X(`frontend-design`,e,{filePath:/\.(html|css|htm)$/i})},{id:`vercel-plugin`,content:async e=>`Working with Vercel? Install the vercel plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install vercel@${B}`)}`,cooldownSessions:3,isRelevant:async e=>X(`vercel`,e,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:[`vercel`]})},{id:`effort-high-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`)(`/effort high`);return v(`tengu_tide_elm`,`off`)===`copy_b`?`Use ${t} for better one-shot answers. Claude thinks it through first.`:`Working on something tricky? ${t} gives better first answers`},cooldownSessions:3,isRelevant:async()=>{if(!C()||!ke(ne())||se(`policySettings`)?.effortLevel!==void 0||Fe()!==void 0)return!1;let e=p().effortLevel;return e===`high`||e===`max`?!1:v(`tengu_tide_elm`,`off`)!==`off`}},{id:`subagent-fanout-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return v(`tengu_tern_alloy`,`off`)===`copy_b`?`For big tasks, tell Claude to ${t(`use subagents`)}. They work in parallel and keep your main thread clean.`:`Say ${t(`"fan out subagents"`)} and Claude sends a team. Each one digs deep so nothing gets missed.`},cooldownSessions:3,isRelevant:async()=>C()?v(`tengu_tern_alloy`,`off`)!==`off`:!1},{id:`loop-command-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return v(`tengu_timber_lark`,`off`)===`copy_b`?`Use ${t(`/loop 5m check the deploy`)} to run any prompt on a schedule. Set it and forget it.`:`${t(`/loop`)} runs any prompt on a recurring schedule. Great for monitoring deploys, babysitting PRs, or polling status.`},cooldownSessions:3,isRelevant:async()=>!C()||!tt()?!1:v(`tengu_timber_lark`,`off`)!==`off`},{id:`guest-passes`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=ct();return n?`Share Claude Code and earn ${t(lt(n))} of extra usage · ${t(`/passes`)}`:`You have free guest passes to share · ${t(`/passes`)}`},cooldownSessions:3,isRelevant:async()=>{if(_().hasVisitedPasses)return!1;let{eligible:e}=dt();return e}},{id:`overage-credit`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=mt(),r=n?gt(n):null;return r?`${t(`${r} in extra usage, on us`)} · third-party apps · ${t(`/extra-usage`)}`:``},cooldownSessions:3,isRelevant:async()=>vt()},{id:`feedback-command`,content:async()=>`Use /feedback to help us improve!`,cooldownSessions:15,async isRelevant(){return process.env.USER_TYPE===`ant`?!1:_().numStartups>5}}],Vt=process.env.USER_TYPE===`ant`?[{id:`important-claudemd`,content:async()=>`[ANT-ONLY] Use "IMPORTANT:" prefix for must-follow CLAUDE.md rules`,cooldownSessions:30,isRelevant:async()=>!0},{id:`skillify`,content:async()=>`[ANT-ONLY] Use /skillify at the end of a workflow to turn it into a reusable skill`,cooldownSessions:15,isRelevant:async()=>!0}]:[];function Ht(){let e=p().spinnerTipsOverride;return e?.tips?.length?e.tips.map((e,t)=>({id:`custom-tip-${t}`,content:async()=>e,cooldownSessions:0,isRelevant:async()=>!0})):[]}async function Ut(e){let t=p().spinnerTipsOverride,n=Ht();if(t?.excludeDefault&&n.length>0)return n;let r=[...Bt,...Vt],i=await Promise.all(r.map(t=>t.isRelevant?.(e)??Promise.resolve(!0)));return[...r.filter((e,t)=>i[t]).filter(e=>J(e.id)>=e.cooldownSessions),...n]}D(),P(),Ee(),Oe();var Z=2e3,Q=5,Wt=3e4,$=3,Gt=new Set([4003]);function Kt(e){return typeof e!=`object`||!e||!(`type`in e)?!1:typeof e.type==`string`}var qt=class{constructor(e,t,n,r){i(this,`ws`,null),i(this,`state`,`closed`),i(this,`reconnectAttempts`,0),i(this,`sessionNotFoundRetries`,0),i(this,`pingInterval`,null),i(this,`reconnectTimer`,null),this.sessionId=e,this.orgUuid=t,this.getAccessToken=n,this.callbacks=r}async connect(){if(this.state===`connecting`){E(`[SessionsWebSocket] Already connecting`);return}this.state=`connecting`;let e=`${A().BASE_API_URL.replace(`http`,`ws`)}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;E(`[SessionsWebSocket] Connecting to ${e}`);let t={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":`2023-06-01`};if(typeof Bun<`u`){let n=new globalThis.WebSocket(e,{headers:t,proxy:De(e),tls:R()||void 0});this.ws=n,n.addEventListener(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),n.addEventListener(`message`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.handleMessage(t)}),n.addEventListener(`error`,()=>{let e=Error(`[SessionsWebSocket] WebSocket error`);F(e),this.callbacks.onError?.(e)}),n.addEventListener(`close`,e=>{E(`[SessionsWebSocket] Closed: code=${e.code} reason=${e.reason}`),this.handleClose(e.code)}),n.addEventListener(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}else{let{default:n}=await import(`./wrapper-BSK0MCQH.js`),r=new n(e,{headers:t,agent:Te(e),...R()});this.ws=r,r.on(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),r.on(`message`,e=>{this.handleMessage(e.toString())}),r.on(`error`,e=>{F(Error(`[SessionsWebSocket] Error: ${e.message}`)),this.callbacks.onError?.(e)}),r.on(`close`,(e,t)=>{E(`[SessionsWebSocket] Closed: code=${e} reason=${t.toString()}`),this.handleClose(e)}),r.on(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}}handleMessage(e){try{let t=fe(e);Kt(t)?this.callbacks.onMessage(t):E(`[SessionsWebSocket] Ignoring message type: ${typeof t==`object`&&t&&`type`in t?String(t.type):`unknown`}`)}catch(e){F(Error(`[SessionsWebSocket] Failed to parse message: ${de(e)}`))}}handleClose(e){if(this.stopPingInterval(),this.state===`closed`)return;this.ws=null;let t=this.state;if(this.state=`closed`,Gt.has(e)){E(`[SessionsWebSocket] Permanent close code ${e}, not reconnecting`),this.callbacks.onClose?.();return}if(e===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>$){E(`[SessionsWebSocket] 4001 retry budget exhausted (${$}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(Z*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${$}`);return}t===`connected`&&this.reconnectAttempts<Q?(this.reconnectAttempts++,this.scheduleReconnect(Z,`attempt ${this.reconnectAttempts}/${Q}`)):(E(`[SessionsWebSocket] Not reconnecting`),this.callbacks.onClose?.())}scheduleReconnect(e,t){this.callbacks.onReconnecting?.(),E(`[SessionsWebSocket] Scheduling reconnect (${t}) in ${e}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state===`connected`)try{this.ws.ping?.()}catch{}},Wt)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}sendControlResponse(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}E(`[SessionsWebSocket] Sending control response`),this.ws.send(T(e))}sendControlRequest(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}let t={type:`control_request`,request_id:xt(),request:e};E(`[SessionsWebSocket] Sending control request: ${e.subtype}`),this.ws.send(T(t))}isConnected(){return this.state===`connected`}close(){E(`[SessionsWebSocket] Closing connection`),this.state=`closed`,this.stopPingInterval(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null)}reconnect(){E(`[SessionsWebSocket] Force reconnecting`),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}};D(),P(),r();function Jt(e){return e.type!==`control_request`&&e.type!==`control_response`&&e.type!==`control_cancel_request`}var Yt=class{constructor(e,t){i(this,`websocket`,null),i(this,`pendingPermissionRequests`,new Map),this.config=e,this.callbacks=t}connect(){E(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`),this.websocket=new qt(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,{onMessage:e=>this.handleMessage(e),onConnected:()=>{E(`[RemoteSessionManager] Connected`),this.callbacks.onConnected?.()},onClose:()=>{E(`[RemoteSessionManager] Disconnected`),this.callbacks.onDisconnected?.()},onReconnecting:()=>{E(`[RemoteSessionManager] Reconnecting`),this.callbacks.onReconnecting?.()},onError:e=>{F(e),this.callbacks.onError?.(e)}}),this.websocket.connect()}handleMessage(e){if(e.type===`control_request`){this.handleControlRequest(e);return}if(e.type===`control_cancel_request`){let{request_id:t}=e,n=this.pendingPermissionRequests.get(t);E(`[RemoteSessionManager] Permission request cancelled: ${t}`),this.pendingPermissionRequests.delete(t),this.callbacks.onPermissionCancelled?.(t,n?.tool_use_id);return}if(e.type===`control_response`){E(`[RemoteSessionManager] Received control response`);return}Jt(e)&&this.callbacks.onMessage(e)}handleControlRequest(e){let t=e.request_id,n=e.request;if(n.subtype===`can_use_tool`)E(`[RemoteSessionManager] Permission request for tool: ${n.tool_name}`),this.pendingPermissionRequests.set(t,n),this.callbacks.onPermissionRequest(n,t);else{E(`[RemoteSessionManager] Unsupported control request subtype: ${n.subtype}`);let e={type:`control_response`,response:{subtype:`error`,request_id:t,error:`Unsupported control request subtype: ${n.subtype}`}};this.websocket?.sendControlResponse(e)}}async sendMessage(e,t){E(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let n=await it(this.config.sessionId,e,t);return n||F(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`)),n}respondToPermissionRequest(e,t){if(!this.pendingPermissionRequests.get(e)){F(Error(`[RemoteSessionManager] No pending permission request with ID: ${e}`));return}this.pendingPermissionRequests.delete(e);let n={type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}};E(`[RemoteSessionManager] Sending permission response: ${t.behavior}`),this.websocket?.sendControlResponse(n)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){E(`[RemoteSessionManager] Sending interrupt signal`),this.websocket?.sendControlRequest({subtype:`interrupt`})}getSessionId(){return this.config.sessionId}disconnect(){E(`[RemoteSessionManager] Disconnecting`),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){E(`[RemoteSessionManager] Reconnecting WebSocket`),this.websocket?.reconnect()}};function Xt(e,t,n,r=!1,i=!1){return{sessionId:e,getAccessToken:t,orgUuid:n,hasInitialPrompt:r,viewerOnly:i}}export{Rt as a,Nt as c,St as d,Ct as f,J as i,kt as l,Xt as n,Lt as o,Ut as r,It as s,Yt as t,At as u};
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{In as a,Ln as o,Rn as s,b as c,t as l,v as u,x as d}from"./src-Di342QoJ.js";import{t as ee}from"./jsx-runtime-D-D469L8.js";import{Ac as f,Cl as te,Dr as ne,Fa as re,Ka as p,Na as m,Nc as ie,Nr as ae,Pc as h,Pr as oe,Qa as se,S as g,Sc as _,_ as v,bc as y,g as ce,gt as le,no as b,on as x,oo as S,sn as C,vt as ue,wl as w}from"./paths-1ngPRtu3.js";import{E as T,L as de,T as fe,V as pe,d as E,s as D,w as me}from"./debug-UI3T040K.js";import{n as he,r as ge}from"./analytics-DqMQntaB.js";import{n as _e,t as O}from"./cwd--iizewsn.js";import{_ as ve,f as ye,g as be,v as k}from"./git-CN3qtTb_.js";import{l as A,u as j}from"./oauth-CdZEzMww.js";import{a as M,n as N}from"./env-chR0gV31.js";import{o as P,s as F}from"./log-CzsijfHZ.js";import{i as I,o as xe}from"./platform-CuyedWpe.js";import{n as L,r as Se}from"./execFileNoThrow-CuQN1sz8.js";import{l as Ce,r as we}from"./teammate-DMYOtLTK.js";import{c as Te,g as Ee,h as R,l as De,u as Oe}from"./proxy-CfZp-wce.js";import{$A as ke,Ar as Ae,As as je,Ax as Me,DA as z,Es as Ne,JA as Pe,Jb as Fe,Mr as Ie,Us as Le,Vs as Re,Zb as ze,Zv as B,ax as Be,cd as Ve,cx as He,ex as Ue,kA as We,kx as Ge,nT as Ke,nx as qe,ox as Je,pr as Ye,ry as Xe,sd as Ze,sx as Qe,tT as V,tj as $e}from"./loadAgentsDir-D7kapZB5.js";import{M as et,P as tt}from"./prompt-BBg3jtfc.js";import{n as nt,o as rt}from"./fileStateCache-C7-TxF8G.js";import{a as H,i as U,o as W}from"./teamHelpers-DEgaCpta.js";import{d as it,o as at}from"./api-D_t0nHsS.js";import{c as ot,i as st}from"./terminalSetup-bSbq4LE7.js";import{a as ct,r as lt,s as ut,t as dt}from"./referral-BKeCKnOJ.js";import{n as ft,t as pt}from"./PermissionDialog-5MlJf7ew.js";import{n as mt,r as ht,t as gt}from"./overageCreditGrant-BrN7dk3d.js";import{i as _t,o as vt}from"./OverageCreditUpsell-abcPm3PB.js";import{n as yt,t as bt}from"./DesktopHandoff-CFBUqcCf.js";import{randomUUID as xt}from"crypto";D(),P(),Ce(),H();function St(){let e=we();if(!e?.teamName||!e?.agentName){E(`[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)`);return}let{teamName:t,agentId:n,agentName:r}=e,i=W(t);if(!i){F(Error(`[computeInitialTeamContext] Could not read team file for ${t}`));return}let a=U(t),o=!n;return E(`[Reconnection] Computed initial team context for ${o?`leader`:`teammate ${r}`} in team ${t}`),{teamName:t,teamFilePath:a,leadAgentId:i.leadAgentId,selfAgentId:n,selfAgentName:r,isLeader:o,teammates:{}}}function Ct(e,t,n){let r=W(t);if(!r){F(Error(`[initializeTeammateContextFromSession] Could not read team file for ${t} (agent: ${n})`));return}let i=r.members.find(e=>e.name===n);i||E(`[Reconnection] Member ${n} not found in team ${t} - may have been removed`);let a=i?.agentId,o=U(t);e(e=>({...e,teamContext:{teamName:t,teamFilePath:o,leadAgentId:r.leadAgentId,selfAgentId:a,selfAgentName:n,isLeader:!1,teammates:{}}})),E(`[Reconnection] Initialized agent context from session for ${n} in team ${t}`)}n(),te(),_e(),f(),M(),Se(),k(),P(),ue();var wt=[/(?:^|\/)(?:package-lock\.json|yarn\.lock|bun\.lock|bun\.lockb|pnpm-lock\.yaml|Pipfile\.lock|poetry\.lock|Cargo\.lock|Gemfile\.lock|go\.sum|composer\.lock|uv\.lock)$/,/\.generated\./,/(?:^|\/)(?:dist|build|out|target|node_modules|\.next|__pycache__)\//,/\.(?:min\.js|min\.css|map|pyc|pyo)$/,/\.(?:json|ya?ml|toml|xml|ini|cfg|conf|env|lock|txt|md|mdx|rst|csv|log|svg)$/i,/(?:^|\/)\.?(?:eslintrc|prettierrc|babelrc|editorconfig|gitignore|gitattributes|dockerignore|npmrc)/,/(?:^|\/)(?:tsconfig|jsconfig|biome|vitest\.config|jest\.config|webpack\.config|vite\.config|rollup\.config)\.[a-z]+$/,/(?:^|\/)\.(?:github|vscode|idea|claude)\//,/(?:^|\/)(?:CHANGELOG|LICENSE|CONTRIBUTING|CODEOWNERS|README)(?:\.[a-z]+)?$/i];function Tt(e){return!wt.some(t=>t.test(e))}function Et(e,t){let n=[],r=new Set,i=new Map;for(let a=1;n.length<t&&a<=t;a++)for(let o of e){if(n.length>=t)break;if(!Tt(o))continue;let e=Math.max(o.lastIndexOf(`/`),o.lastIndexOf(`\\`)),s=e>=0?o.slice(e+1):o;if(!s||r.has(s))continue;let c=e>=0?o.slice(0,e):`.`;(i.get(c)??0)>=a||(n.push(s),r.add(s),i.set(c,(i.get(c)??0)+1))}return n.length>=t?n:[]}async function Dt(){if(N.platform===`win32`||!await ye())return[];try{let e=await le(),t=[`log`,`-n`,`1000`,`--pretty=format:`,`--name-only`,`--diff-filter=M`],n=new Map,r=e=>{for(let t of e.split(`
2
+ `)){let e=t.trim();e&&n.set(e,(n.get(e)??0)+1)}};if(e){let{stdout:n}=await L(`git`,[...t,`--author=${e}`],{cwd:O()});r(n)}if(n.size<10){let{stdout:e}=await L(ve(),t,{cwd:O()});r(e)}return Et(Array.from(n.entries()).sort((e,t)=>t[1]-e[1]).map(([e])=>e),5)}catch(e){return F(e),[]}}var Ot=10080*60*1e3,kt=t(()=>{let e=y(),t=e.exampleFiles?.length?w(e.exampleFiles):`<filepath>`;return`Try "${w([`fix lint errors`,`fix typecheck errors`,`how does ${t} work?`,`refactor ${t}`,`how do I log an error?`,`edit ${t} to...`,`write a test for ${t}`,`create a util logging.py that...`])}"`}),At=t(async()=>{let e=y();Date.now()-(e.exampleFilesGeneratedAt??0)>Ot&&(e.exampleFiles=[]),e.exampleFiles?.length||Dt().then(e=>{e.length&&ie(t=>({...t,exampleFiles:e,exampleFilesGeneratedAt:Date.now()}))})});re();var jt={"claude-3-opus":{modelName:`Claude 3 Opus`,retirementDates:{firstParty:`January 5, 2026`,bedrock:`January 15, 2026`,vertex:`January 5, 2026`,foundry:`January 5, 2026`}},"claude-3-7-sonnet":{modelName:`Claude 3.7 Sonnet`,retirementDates:{firstParty:`February 19, 2026`,bedrock:`April 28, 2026`,vertex:`May 11, 2026`,foundry:`February 19, 2026`}},"claude-3-5-haiku":{modelName:`Claude 3.5 Haiku`,retirementDates:{firstParty:`February 19, 2026`,bedrock:null,vertex:null,foundry:null}}};function Mt(e){let t=e.toLowerCase(),n=m();for(let[e,r]of Object.entries(jt)){let i=r.retirementDates[n];if(!(!t.includes(e)||!i))return{isDeprecated:!0,modelName:r.modelName,retirementDate:i}}return{isDeprecated:!1}}function Nt(e){if(!e)return null;let t=Mt(e);return t.isDeprecated?`⚠ ${t.modelName} will be retired on ${t.retirementDate}. Consider switching to a newer model.`:null}r(),o(),pe(),me(),j(),xe(),S(),x(),st(),Xe(),Ve(),Ae();var G=e(s(),1);l(),g(),he(),f(),Me(),yt(),ft();var K=ee(),Pt={enable_shortcut_tip:!1,enable_startup_dialog:!1};function q(){return ce(`tengu_desktop_upsell`,Pt)}function Ft(){return process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`}function It(){if(!Ft()||!q().enable_startup_dialog)return!1;let e=_();return!(e.desktopUpsellDismissed||(e.desktopUpsellSeenCount??0)>=3)}function Lt({onDone:e}){let[t,n]=(0,G.useState)(!1);if((0,G.useEffect)(()=>{let e=(_().desktopUpsellSeenCount??0)+1;h(t=>(t.desktopUpsellSeenCount??0)>=e?t:{...t,desktopUpsellSeenCount:e}),ge(`tengu_desktop_upsell_shown`,{seen_count:e})},[]),t)return(0,K.jsx)(bt,{onDone:()=>e()});function r(t){switch(t){case`try`:n(!0);return;case`never`:h(e=>e.desktopUpsellDismissed?e:{...e,desktopUpsellDismissed:!0}),e();return;case`not-now`:e();return}}return(0,K.jsx)(pt,{title:`Try Claude Code Desktop`,children:(0,K.jsxs)(d,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,K.jsx)(d,{marginBottom:1,children:(0,K.jsx)(c,{children:`Same Claude Code with visual diffs, live app preview, parallel sessions, and more.`})}),(0,K.jsx)(Ge,{options:[{label:`Open in Claude Code Desktop`,value:`try`},{label:`Not now`,value:`not-now`},{label:`Don't ask again`,value:`never`}],onChange:r,onCancel:()=>r(`not-now`)})]})})}oe(),ke(),We(),et(),rt(),at(),Ke(),Ue(),Re(),Ne(),ut(),ht(),_t(),f();function Rt(e){let t=_().numStartups;h(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function J(e){let t=_(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}D(),l(),f(),M(),k(),g();var Y;async function zt(){return Y===void 0&&(Y=z in await Le()),Y}async function X(e,t,n){if(!await zt()||je(`${e}@claude-plugins-official`))return!1;let{bashTools:r}=t??{};return!!(n.cli&&r?.size&&n.cli.some(e=>r.has(e))||n.filePath&&t?.readFileState&&nt(t.readFileState).some(e=>n.filePath.test(e)))}var Bt=[{id:`new-user-warmup`,content:async()=>`Start with small features or bug fixes, tell Claude to propose a plan, and verify its suggested edits`,cooldownSessions:3,async isRelevant(){return _().numStartups<10}},{id:`plan-mode-for-complex-tasks`,content:async()=>`Use Plan Mode to prepare for a complex request before making changes. Press ${V(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to enable.`,cooldownSessions:5,isRelevant:async()=>{let e=_();return(e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0)>7}},{id:`default-permission-mode-config`,content:async()=>`Use /config to change your default permission mode (including Plan Mode)`,cooldownSessions:10,isRelevant:async()=>{try{let e=_(),t=b(),n=!!e.lastPlanModeUse,r=!!t?.permissions?.defaultMode;return n&&!r}catch(e){return E(`Failed to check default-permission-mode-config tip relevance: ${e}`,{level:`warn`}),!1}}},{id:`git-worktrees`,content:async()=>`Use git worktrees to run multiple Claude sessions in parallel.`,cooldownSessions:10,isRelevant:async()=>{try{let e=_();return await be()<=1&&e.numStartups>50}catch{return!1}}},{id:`color-when-multi-clauding`,content:async()=>`Running multiple Claude sessions? Use /color and /rename to tell them apart at a glance.`,cooldownSessions:10,isRelevant:async()=>Ye()?!1:await Ze()>=2},{id:`terminal-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more`:`Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more`,cooldownSessions:10,async isRelevant(){let e=_();return N.terminal===`Apple_Terminal`?!e.optionAsMetaKeyInstalled:!e.shiftEnterKeyBindingInstalled}},{id:`shift-enter`,content:async()=>N.terminal===`Apple_Terminal`?`Press Option+Enter to send a multi-line message`:`Press Shift+Enter to send a multi-line message`,cooldownSessions:10,async isRelevant(){let e=_();return!!((N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)&&e.numStartups>3)}},{id:`shift-enter-setup`,content:async()=>N.terminal===`Apple_Terminal`?`Run /terminal-setup to enable Option+Enter for new lines`:`Run /terminal-setup to enable Shift+Enter for new lines`,cooldownSessions:10,async isRelevant(){if(!ot())return!1;let e=_();return!(N.terminal===`Apple_Terminal`?e.optionAsMetaKeyInstalled:e.shiftEnterKeyBindingInstalled)}},{id:`memory-command`,content:async()=>`Use /memory to view and manage Claude memory`,cooldownSessions:15,async isRelevant(){return _().memoryUsageCount<=0}},{id:`theme-command`,content:async()=>`Use /theme to change the color theme`,cooldownSessions:20,isRelevant:async()=>!0},{id:`colorterm-truecolor`,content:async()=>`Try setting environment variable COLORTERM=truecolor for richer colors`,cooldownSessions:30,isRelevant:async()=>!process.env.COLORTERM&&a.level<3},{id:`powershell-tool-env`,content:async()=>`Set CLAUDE_CODE_USE_POWERSHELL_TOOL=1 to enable the PowerShell tool (preview)`,cooldownSessions:10,isRelevant:async()=>I()===`windows`&&process.env.CLAUDE_CODE_USE_POWERSHELL_TOOL===void 0},{id:`status-line`,content:async()=>`Use /statusline to set up a custom status line that will display beneath the input box`,cooldownSessions:25,isRelevant:async()=>b().statusLine===void 0},{id:`prompt-queue`,content:async()=>`Hit Enter to queue up additional messages while Claude is working.`,cooldownSessions:5,async isRelevant(){return _().promptQueueUseCount<=3}},{id:`enter-to-steer-in-relatime`,content:async()=>`Send messages to Claude while it works to steer Claude in real-time`,cooldownSessions:20,isRelevant:async()=>!0},{id:`todo-list`,content:async()=>`Ask Claude to create a todo list when working on complex tasks to track progress and remain on track`,cooldownSessions:20,isRelevant:async()=>!0},{id:`vscode-command-install`,content:async()=>`Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${N.terminal===`vscode`?`code`:N.terminal}' command in PATH" to enable IDE integration`,cooldownSessions:0,async isRelevant(){if(!Je()||I()!==`macos`)return!1;switch(N.terminal){case`vscode`:return!await Qe();case`cursor`:return!await qe();case`windsurf`:return!await He();default:return!1}}},{id:`ide-upsell-external-terminal`,content:async()=>`Connect Claude to your IDE · /ide`,cooldownSessions:4,async isRelevant(){return Be()||(await ze()).length!==0?!1:(await Fe()).length>0}},{id:`install-github-app`,content:async()=>`Run /install-github-app to tag @claude right from your Github issues and PRs`,cooldownSessions:10,isRelevant:async()=>!_().githubActionSetupCount},{id:`install-slack-app`,content:async()=>`Run /install-slack-app to use Claude in Slack`,cooldownSessions:10,isRelevant:async()=>!_().slackAppInstallCount},{id:`permissions`,content:async()=>`Use /permissions to pre-approve and pre-deny bash, edit, and MCP tools`,cooldownSessions:10,async isRelevant(){return _().numStartups>10}},{id:`drag-and-drop-images`,content:async()=>`Did you know you can drag and drop image files into your terminal?`,cooldownSessions:10,isRelevant:async()=>!N.isSSH()},{id:`paste-images-mac`,content:async()=>`Paste images into Claude Code using control+v (not cmd+v!)`,cooldownSessions:10,isRelevant:async()=>I()===`macos`},{id:`double-esc`,content:async()=>`Double-tap esc to rewind the conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>!B()},{id:`double-esc-code-restore`,content:async()=>`Double-tap esc to rewind the code and/or conversation to a previous point in time`,cooldownSessions:10,isRelevant:async()=>B()},{id:`continue`,content:async()=>`Run claude --continue or claude --resume to resume a conversation`,cooldownSessions:10,isRelevant:async()=>!0},{id:`rename-conversation`,content:async()=>`Name your conversations with /rename to find them easily in /resume later`,cooldownSessions:15,isRelevant:async()=>Ie()&&_().numStartups>10},{id:`custom-commands`,content:async()=>`Create skills by adding .md files to .claude/skills/ in your project or ~/.claude/skills/ for skills that work in any project`,cooldownSessions:15,async isRelevant(){return _().numStartups>10}},{id:`shift-tab`,content:async()=>`Hit ${V(`chat:cycleMode`,`Chat`,`shift+tab`)} to cycle between default, accept edits, plan, auto, and bypass modes`,cooldownSessions:10,isRelevant:async()=>!0},{id:`image-paste`,content:async()=>`Use ${V(`chat:imagePaste`,`Chat`,`ctrl+v`)} to paste images from your clipboard`,cooldownSessions:20,isRelevant:async()=>!0},{id:`custom-agents`,content:async()=>`Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer`,cooldownSessions:15,async isRelevant(){return _().numStartups>5}},{id:`agent-flag`,content:async()=>`Use --agent <agent_name> to directly start a conversation with a subagent`,cooldownSessions:15,async isRelevant(){return _().numStartups>5}},{id:`desktop-app`,content:async()=>`Run Claude Code locally or remotely using the Claude desktop app: clau.de/desktop`,cooldownSessions:15,isRelevant:async()=>I()!==`linux`},{id:`desktop-shortcut`,content:async e=>`Continue your session in Claude Code Desktop with ${u(`suggestion`,e?.theme??`dark`)(`/desktop`)}`,cooldownSessions:15,isRelevant:async()=>q().enable_shortcut_tip?process.platform===`darwin`||process.platform===`win32`&&process.arch===`x64`:!1},{id:`web-app`,content:async()=>`Run tasks in the cloud while you keep coding locally · clau.de/web`,cooldownSessions:15,isRelevant:async()=>!0},{id:`mobile-app`,content:async()=>`/mobile to use Claude Code from the Claude app on your phone`,cooldownSessions:15,isRelevant:async()=>!0},{id:`opusplan-mode-reminder`,content:async()=>`Your default model setting is Opus Plan Mode. Press ${V(`chat:cycleMode`,`Chat`,`shift+tab`)} twice to activate Plan Mode and plan with Claude Opus.`,cooldownSessions:2,async isRelevant(){if(process.env.USER_TYPE===`ant`)return!1;let e=_(),t=ae()===`opusplan`,n=e.lastPlanModeUse?(Date.now()-e.lastPlanModeUse)/(1e3*60*60*24):1/0;return t&&n>3}},{id:`frontend-design-plugin`,content:async e=>`Working with HTML/CSS? Install the frontend-design plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install frontend-design@${z}`)}`,cooldownSessions:3,isRelevant:async e=>X(`frontend-design`,e,{filePath:/\.(html|css|htm)$/i})},{id:`vercel-plugin`,content:async e=>`Working with Vercel? Install the vercel plugin:\n${u(`suggestion`,e?.theme??`dark`)(`/plugin install vercel@${z}`)}`,cooldownSessions:3,isRelevant:async e=>X(`vercel`,e,{filePath:/(?:^|[/\\])vercel\.json$/i,cli:[`vercel`]})},{id:`effort-high-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`)(`/effort high`);return v(`tengu_tide_elm`,`off`)===`copy_b`?`Use ${t} for better one-shot answers. Claude thinks it through first.`:`Working on something tricky? ${t} gives better first answers`},cooldownSessions:3,isRelevant:async()=>{if(!C()||!$e(ne())||se(`policySettings`)?.effortLevel!==void 0||Pe()!==void 0)return!1;let e=p().effortLevel;return e===`high`||e===`max`?!1:v(`tengu_tide_elm`,`off`)!==`off`}},{id:`subagent-fanout-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return v(`tengu_tern_alloy`,`off`)===`copy_b`?`For big tasks, tell Claude to ${t(`use subagents`)}. They work in parallel and keep your main thread clean.`:`Say ${t(`"fan out subagents"`)} and Claude sends a team. Each one digs deep so nothing gets missed.`},cooldownSessions:3,isRelevant:async()=>C()?v(`tengu_tern_alloy`,`off`)!==`off`:!1},{id:`loop-command-nudge`,content:async e=>{let t=u(`suggestion`,e?.theme??`dark`);return v(`tengu_timber_lark`,`off`)===`copy_b`?`Use ${t(`/loop 5m check the deploy`)} to run any prompt on a schedule. Set it and forget it.`:`${t(`/loop`)} runs any prompt on a recurring schedule. Great for monitoring deploys, babysitting PRs, or polling status.`},cooldownSessions:3,isRelevant:async()=>!C()||!tt()?!1:v(`tengu_timber_lark`,`off`)!==`off`},{id:`guest-passes`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=ct();return n?`Share Claude Code and earn ${t(lt(n))} of extra usage · ${t(`/passes`)}`:`You have free guest passes to share · ${t(`/passes`)}`},cooldownSessions:3,isRelevant:async()=>{if(_().hasVisitedPasses)return!1;let{eligible:e}=dt();return e}},{id:`overage-credit`,content:async e=>{let t=u(`claude`,e?.theme??`dark`),n=mt(),r=n?gt(n):null;return r?`${t(`${r} in extra usage, on us`)} · third-party apps · ${t(`/extra-usage`)}`:``},cooldownSessions:3,isRelevant:async()=>vt()},{id:`feedback-command`,content:async()=>`Use /feedback to help us improve!`,cooldownSessions:15,async isRelevant(){return process.env.USER_TYPE===`ant`?!1:_().numStartups>5}}],Vt=process.env.USER_TYPE===`ant`?[{id:`important-claudemd`,content:async()=>`[ANT-ONLY] Use "IMPORTANT:" prefix for must-follow CLAUDE.md rules`,cooldownSessions:30,isRelevant:async()=>!0},{id:`skillify`,content:async()=>`[ANT-ONLY] Use /skillify at the end of a workflow to turn it into a reusable skill`,cooldownSessions:15,isRelevant:async()=>!0}]:[];function Ht(){let e=p().spinnerTipsOverride;return e?.tips?.length?e.tips.map((e,t)=>({id:`custom-tip-${t}`,content:async()=>e,cooldownSessions:0,isRelevant:async()=>!0})):[]}async function Ut(e){let t=p().spinnerTipsOverride,n=Ht();if(t?.excludeDefault&&n.length>0)return n;let r=[...Bt,...Vt],i=await Promise.all(r.map(t=>t.isRelevant?.(e)??Promise.resolve(!0)));return[...r.filter((e,t)=>i[t]).filter(e=>J(e.id)>=e.cooldownSessions),...n]}D(),P(),Ee(),Oe();var Z=2e3,Q=5,Wt=3e4,$=3,Gt=new Set([4003]);function Kt(e){return typeof e!=`object`||!e||!(`type`in e)?!1:typeof e.type==`string`}var qt=class{constructor(e,t,n,r){i(this,`ws`,null),i(this,`state`,`closed`),i(this,`reconnectAttempts`,0),i(this,`sessionNotFoundRetries`,0),i(this,`pingInterval`,null),i(this,`reconnectTimer`,null),this.sessionId=e,this.orgUuid=t,this.getAccessToken=n,this.callbacks=r}async connect(){if(this.state===`connecting`){E(`[SessionsWebSocket] Already connecting`);return}this.state=`connecting`;let e=`${A().BASE_API_URL.replace(`http`,`ws`)}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;E(`[SessionsWebSocket] Connecting to ${e}`);let t={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":`2023-06-01`};if(typeof Bun<`u`){let n=new globalThis.WebSocket(e,{headers:t,proxy:De(e),tls:R()||void 0});this.ws=n,n.addEventListener(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),n.addEventListener(`message`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.handleMessage(t)}),n.addEventListener(`error`,()=>{let e=Error(`[SessionsWebSocket] WebSocket error`);F(e),this.callbacks.onError?.(e)}),n.addEventListener(`close`,e=>{E(`[SessionsWebSocket] Closed: code=${e.code} reason=${e.reason}`),this.handleClose(e.code)}),n.addEventListener(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}else{let{default:n}=await import(`./wrapper-BSK0MCQH.js`),r=new n(e,{headers:t,agent:Te(e),...R()});this.ws=r,r.on(`open`,()=>{E(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),r.on(`message`,e=>{this.handleMessage(e.toString())}),r.on(`error`,e=>{F(Error(`[SessionsWebSocket] Error: ${e.message}`)),this.callbacks.onError?.(e)}),r.on(`close`,(e,t)=>{E(`[SessionsWebSocket] Closed: code=${e} reason=${t.toString()}`),this.handleClose(e)}),r.on(`pong`,()=>{E(`[SessionsWebSocket] Pong received`)})}}handleMessage(e){try{let t=fe(e);Kt(t)?this.callbacks.onMessage(t):E(`[SessionsWebSocket] Ignoring message type: ${typeof t==`object`&&t&&`type`in t?String(t.type):`unknown`}`)}catch(e){F(Error(`[SessionsWebSocket] Failed to parse message: ${de(e)}`))}}handleClose(e){if(this.stopPingInterval(),this.state===`closed`)return;this.ws=null;let t=this.state;if(this.state=`closed`,Gt.has(e)){E(`[SessionsWebSocket] Permanent close code ${e}, not reconnecting`),this.callbacks.onClose?.();return}if(e===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>$){E(`[SessionsWebSocket] 4001 retry budget exhausted (${$}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(Z*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${$}`);return}t===`connected`&&this.reconnectAttempts<Q?(this.reconnectAttempts++,this.scheduleReconnect(Z,`attempt ${this.reconnectAttempts}/${Q}`)):(E(`[SessionsWebSocket] Not reconnecting`),this.callbacks.onClose?.())}scheduleReconnect(e,t){this.callbacks.onReconnecting?.(),E(`[SessionsWebSocket] Scheduling reconnect (${t}) in ${e}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state===`connected`)try{this.ws.ping?.()}catch{}},Wt)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}sendControlResponse(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}E(`[SessionsWebSocket] Sending control response`),this.ws.send(T(e))}sendControlRequest(e){if(!this.ws||this.state!==`connected`){F(Error(`[SessionsWebSocket] Cannot send: not connected`));return}let t={type:`control_request`,request_id:xt(),request:e};E(`[SessionsWebSocket] Sending control request: ${e.subtype}`),this.ws.send(T(t))}isConnected(){return this.state===`connected`}close(){E(`[SessionsWebSocket] Closing connection`),this.state=`closed`,this.stopPingInterval(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null)}reconnect(){E(`[SessionsWebSocket] Force reconnecting`),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}};D(),P(),r();function Jt(e){return e.type!==`control_request`&&e.type!==`control_response`&&e.type!==`control_cancel_request`}var Yt=class{constructor(e,t){i(this,`websocket`,null),i(this,`pendingPermissionRequests`,new Map),this.config=e,this.callbacks=t}connect(){E(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`),this.websocket=new qt(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,{onMessage:e=>this.handleMessage(e),onConnected:()=>{E(`[RemoteSessionManager] Connected`),this.callbacks.onConnected?.()},onClose:()=>{E(`[RemoteSessionManager] Disconnected`),this.callbacks.onDisconnected?.()},onReconnecting:()=>{E(`[RemoteSessionManager] Reconnecting`),this.callbacks.onReconnecting?.()},onError:e=>{F(e),this.callbacks.onError?.(e)}}),this.websocket.connect()}handleMessage(e){if(e.type===`control_request`){this.handleControlRequest(e);return}if(e.type===`control_cancel_request`){let{request_id:t}=e,n=this.pendingPermissionRequests.get(t);E(`[RemoteSessionManager] Permission request cancelled: ${t}`),this.pendingPermissionRequests.delete(t),this.callbacks.onPermissionCancelled?.(t,n?.tool_use_id);return}if(e.type===`control_response`){E(`[RemoteSessionManager] Received control response`);return}Jt(e)&&this.callbacks.onMessage(e)}handleControlRequest(e){let t=e.request_id,n=e.request;if(n.subtype===`can_use_tool`)E(`[RemoteSessionManager] Permission request for tool: ${n.tool_name}`),this.pendingPermissionRequests.set(t,n),this.callbacks.onPermissionRequest(n,t);else{E(`[RemoteSessionManager] Unsupported control request subtype: ${n.subtype}`);let e={type:`control_response`,response:{subtype:`error`,request_id:t,error:`Unsupported control request subtype: ${n.subtype}`}};this.websocket?.sendControlResponse(e)}}async sendMessage(e,t){E(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let n=await it(this.config.sessionId,e,t);return n||F(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`)),n}respondToPermissionRequest(e,t){if(!this.pendingPermissionRequests.get(e)){F(Error(`[RemoteSessionManager] No pending permission request with ID: ${e}`));return}this.pendingPermissionRequests.delete(e);let n={type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}};E(`[RemoteSessionManager] Sending permission response: ${t.behavior}`),this.websocket?.sendControlResponse(n)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){E(`[RemoteSessionManager] Sending interrupt signal`),this.websocket?.sendControlRequest({subtype:`interrupt`})}getSessionId(){return this.config.sessionId}disconnect(){E(`[RemoteSessionManager] Disconnecting`),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){E(`[RemoteSessionManager] Reconnecting WebSocket`),this.websocket?.reconnect()}};function Xt(e,t,n,r=!1,i=!1){return{sessionId:e,getAccessToken:t,orgUuid:n,hasInitialPrompt:r,viewerOnly:i}}export{Rt as a,Nt as c,St as d,Ct as f,J as i,kt as l,Xt as n,Lt as o,Ut as r,It as s,Yt as t,At as u};
@@ -0,0 +1 @@
1
+ import{a as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,t as a,tn as ee,tt as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{cn as l,jr as te,ot as ne}from"./state-sIHsFpDu.js";import{n as u,r as d}from"./analytics-DqMQntaB.js";import{o as f,s as p}from"./log-CzsijfHZ.js";import{Ar as m,IS as re,Kr as h,Lo as g,Mr as ie,NS as _,PS as ae,Vr as oe,Yn as se,_E as ce,_m as v,_o as y,ar as b,bv as x,cd as S,di as le,ei as ue,fi as de,gm as C,gy as w,lE as T,o as fe,pd as pe,u as me,uE as E,vE as D,vy as O,wi as he,xv as ge,zw as k}from"./loadAgentsDir-D7kapZB5.js";import{t as A}from"./useKeybinding-FsOnjW6T.js";import{r as j}from"./asciicast-o5Zg4dJt.js";import{a as M,n as N,s as P}from"./skillChangeDetector-DnyEQqe6.js";import{a as F,i as I,n as L,o as R,r as _e,t as ve}from"./crossProjectResume-Z-aR2q-d.js";import{t as ye}from"./REPL-CBFcgD4r.js";import{dirname as be}from"path";var z=t(r(),1);k(),l(),R(),O(),C(),a(),A(),u(),_(),D(),I(),S(),x(),L(),f(),g(),m();var B=c();function xe(e){let t=parseInt(e,10);if(!isNaN(t)&&t>0)return t;let n=e.match(/github\.com\/[^/]+\/[^/]+\/pull\/(\d+)/);return n?.[1]?parseInt(n[1],10):null}function V({commands:t,worktreePaths:r,initialTools:a,mcpClients:o,dynamicMcpConfig:c,debug:l,mainThreadAgentDefinition:u,autoConnectIdeFlag:f,strictMcpConfig:g=!1,systemPrompt:_,appendSystemPrompt:x,initialSearchQuery:S,disableSlashCommands:C=!1,forkSession:D,taskListId:O,filterByPr:k,thinkingConfig:A,onTurnComplete:I}){let{rows:L}=n(),R=ae(e=>e.agentDefinitions),V=re(),[H,U]=z.useState([]),[we,W]=z.useState(!0),[Te,Ee]=z.useState(!1),[G,De]=z.useState(!1),[K,Oe]=z.useState(null),[q,J]=z.useState(null),Y=z.useRef(null),X=z.useRef(0),Z=z.useMemo(()=>{let e=H.filter(e=>!e.isSidechain);if(k!==void 0){if(k===!0)e=e.filter(e=>e.prNumber!==void 0);else if(typeof k==`number`)e=e.filter(e=>e.prNumber===k);else if(typeof k==`string`){let t=xe(k);t!==null&&(e=e.filter(e=>e.prNumber===t))}}return e},[H,k]),ke=ie();z.useEffect(()=>{h(r).then(e=>{Y.current=e,X.current=e.logs.length,U(e.logs),W(!1)}).catch(e=>{p(e),W(!1)})},[r]);let Q=z.useCallback(e=>{let t=Y.current;!t||t.nextIndex>=t.allStatLogs.length||b(t.allStatLogs,t.nextIndex,e).then(n=>{if(t.nextIndex=n.nextIndex,n.logs.length>0){let e=X.current;n.logs.forEach((t,n)=>{t.value=e+n}),U(e=>e.concat(n.logs)),X.current+=n.logs.length}else t.nextIndex<t.allStatLogs.length&&Q(e)})},[]),$=z.useCallback(e=>{W(!0),(e?oe():h(r)).then(e=>{Y.current=e,X.current=e.logs.length,U(e.logs)}).catch(e=>{p(e)}).finally(()=>{W(!1)})},[r]),Ae=z.useCallback(()=>{let e=!G;De(e),$(e)},[G,$]);function je(){process.exit(1)}async function Me(t){Ee(!0);let n=performance.now(),i=ve(t,G,r);if(i.isCrossProject&&!i.isSameRepoWorktree){let e=i.command,t=await ee(e);t&&process.stdout.write(t),J(e);return}try{let r=await ge(t,void 0);if(!r)throw Error(`Failed to load conversation`);{let t=(E(),e(T)).matchSessionMode(r.mode);if(t){let{getAgentDefinitionsWithOverrides:n,getActiveAgentsFromList:i}=(fe(),e(me));n.cache.clear?.();let a=await n(ne());V(e=>({...e,agentDefinitions:{...a,allAgents:a.allAgents,activeAgents:i(a.allAgents)}})),r.messages.push(y(t,`warning`))}}r.sessionId&&!D?(te(ce(r.sessionId),t.fullPath?be(t.fullPath):null),await j(),await le(),v(r.sessionId)):D&&r.contentReplacements?.length&&await ue(r.contentReplacements);let{agentDefinition:i}=M(r.agentSetting,u,R);V(e=>({...e,agent:i?.agentType}));{let{saveMode:t}=(m(),e(he)),{isCoordinatorMode:n}=(E(),e(T));t(n()?`coordinator`:`normal`)}let a=N(r.agentName,r.agentColor);a&&V(e=>({...e,standaloneAgentContext:a})),pe(r.agentName),de(D?{...r,worktreeSession:void 0}:r),D||(P(r.worktreeSession),r.sessionId&&se()),d(`tengu_session_resumed`,{entrypoint:`picker`,success:!0,resume_duration_ms:Math.round(performance.now()-n)}),U([]),Oe({messages:r.messages,fileHistorySnapshots:r.fileHistorySnapshots,contentReplacements:r.contentReplacements,agentName:r.agentName,agentColor:r.agentColor===`default`?void 0:r.agentColor,mainThreadAgentDefinition:i})}catch(e){throw d(`tengu_session_resumed`,{entrypoint:`picker`,success:!1}),p(e),e}}return q?(0,B.jsx)(Ce,{command:q}):K?(0,B.jsx)(ye,{debug:l,commands:t,initialTools:a,initialMessages:K.messages,initialFileHistorySnapshots:K.fileHistorySnapshots,initialContentReplacements:K.contentReplacements,initialAgentName:K.agentName,initialAgentColor:K.agentColor,mcpClients:o,dynamicMcpConfig:c,strictMcpConfig:g,systemPrompt:_,appendSystemPrompt:x,mainThreadAgentDefinition:K.mainThreadAgentDefinition,autoConnectIdeFlag:f,disableSlashCommands:C,taskListId:O,thinkingConfig:A,onTurnComplete:I}):we?(0,B.jsxs)(s,{children:[(0,B.jsx)(w,{}),(0,B.jsx)(i,{children:` Loading conversations…`})]}):Te?(0,B.jsxs)(s,{children:[(0,B.jsx)(w,{}),(0,B.jsx)(i,{children:` Resuming conversation…`})]}):Z.length===0?(0,B.jsx)(Se,{}):(0,B.jsx)(F,{logs:Z,maxHeight:L,onCancel:je,onSelect:Me,onLogsChanged:ke?()=>$(G):void 0,onLoadMore:Q,initialSearchQuery:S,showAllProjects:G,onToggleAllProjects:Ae,onAgenticSearch:_e})}function Se(){return o(`app:interrupt`,()=>{process.exit(1)},{context:`Global`}),(0,B.jsxs)(s,{flexDirection:`column`,children:[(0,B.jsx)(i,{children:`No conversations found to resume.`}),(0,B.jsx)(i,{dimColor:!0,children:`Press Ctrl+C to exit and start a new conversation.`})]})}function Ce({command:e}){return z.useEffect(()=>{let e=setTimeout(()=>{process.exit(0)},100);return()=>clearTimeout(e)},[]),(0,B.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,B.jsx)(i,{children:`This conversation is from a different directory.`}),(0,B.jsxs)(s,{flexDirection:`column`,children:[(0,B.jsx)(i,{children:`To resume, run:`}),(0,B.jsxs)(i,{children:[` `,e]})]}),(0,B.jsx)(i,{dimColor:!0,children:`(Command copied to clipboard)`})]})}export{V as ResumeConversation};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{n as r,t as i}from"./axios-DhfaybwJ.js";import{At as a,jt as o}from"./paths-BBvuDQl9.js";import{E as s,L as c,T as l,V as u,d,s as f,w as p}from"./debug-UI3T040K.js";import{F as m,P as h}from"./git-CN3qtTb_.js";import{n as g,t as _}from"./sleep-8Eb9j_Ly.js";import{E as v,O as y,n as b,t as x}from"./rcDebugLog-CPKZCtR8.js";function S(){return!0}function C(e){let t=[],n=0,r=/\r?\n\r?\n/g;r.lastIndex=n;let i;for(;(i=r.exec(e))!==null;){let r=i.index,a=e.slice(n,r);if(n=r+i[0].length,!a.trim())continue;let o={},s=!1;for(let e of a.split(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{n as r,t as i}from"./axios-DhfaybwJ.js";import{At as a,jt as o}from"./paths-1ngPRtu3.js";import{E as s,L as c,T as l,V as u,d,s as f,w as p}from"./debug-UI3T040K.js";import{F as m,P as h}from"./git-CN3qtTb_.js";import{n as g,t as _}from"./sleep-8Eb9j_Ly.js";import{E as v,O as y,n as b,t as x}from"./rcDebugLog-CPGWJbI4.js";function S(){return!0}function C(e){let t=[],n=0,r=/\r?\n\r?\n/g;r.lastIndex=n;let i;for(;(i=r.exec(e))!==null;){let r=i.index,a=e.slice(n,r);if(n=r+i[0].length,!a.trim())continue;let o={},s=!1;for(let e of a.split(`
2
2
  `)){let t=e[e.length-1]===`\r`?e.slice(0,-1):e;if(t.startsWith(`:`)){s=!0;continue}let n=t.indexOf(`:`);if(n===-1)continue;let r=t.slice(0,n),i=t[n+1]===` `?t.slice(n+2):t.slice(n+1);switch(r){case`event`:o.event=i;break;case`id`:o.id=i;break;case`data`:o.data=o.data?o.data+`
3
3
  `+i:i;break}}(o.data||s)&&t.push(o)}return{frames:t,remaining:e.slice(n)}}function w(e){let t=e.pathname;return t.endsWith(`/stream`)&&(t=t.slice(0,-7)),`${e.protocol}//${e.host}${t}`}var T,E,D,O,k,A,j,M,N,P,F=e((()=>{i(),f(),x(),h(),u(),y(),_(),p(),o(),t(),T=1e3,E=3e4,D=6e5,O=45e3,k=new Set([401,403,404]),A=10,j=500,M=8e3,N={stream:!0},P=class{constructor(e,t={},r,i,a,o){n(this,`state`,`idle`),n(this,`onData`,void 0),n(this,`onCloseCallback`,void 0),n(this,`onEventCallback`,void 0),n(this,`headers`,void 0),n(this,`sessionId`,void 0),n(this,`refreshHeaders`,void 0),n(this,`getAuthHeaders`,void 0),n(this,`abortController`,null),n(this,`lastSequenceNum`,0),n(this,`seenSequenceNums`,new Set),n(this,`reconnectAttempts`,0),n(this,`reconnectStartTime`,null),n(this,`reconnectTimer`,null),n(this,`livenessTimer`,null),n(this,`lastActivityTime`,0),n(this,`postUrl`,void 0),n(this,`onLivenessTimeout`,()=>{this.livenessTimer=null,b(`SSE liveness timeout (${O}ms) lastSeqNum=${this.getLastSequenceNum()} state=${this.state}`),d(`SSETransport: Liveness timeout, reconnecting`,{level:`error`}),m(`error`,`cli_sse_liveness_timeout`),this.abortController?.abort(),this.handleConnectionError()}),this.url=e,this.headers=t,this.sessionId=r,this.refreshHeaders=i,this.getAuthHeaders=o??v,this.postUrl=w(e),a!==void 0&&a>0&&(this.lastSequenceNum=a),d(`SSETransport: SSE URL = ${e.href}`),d(`SSETransport: POST URL = ${this.postUrl}`),m(`info`,`cli_sse_transport_initialized`)}getLastSequenceNum(){return this.lastSequenceNum}async connect(){if(this.state!==`idle`&&this.state!==`reconnecting`){d(`SSETransport: Cannot connect, current state is ${this.state}`,{level:`error`}),m(`error`,`cli_sse_connect_failed`);return}this.state=`reconnecting`;let e=Date.now(),t=new URL(this.url.href);this.lastSequenceNum>0&&t.searchParams.set(`from_sequence_num`,String(this.lastSequenceNum));let n=this.getAuthHeaders(),r={...this.headers,...n,Accept:`text/event-stream`,"anthropic-version":`2023-06-01`,"User-Agent":a()};n.Cookie&&delete r.Authorization,this.lastSequenceNum>0&&(r[`Last-Event-ID`]=String(this.lastSequenceNum)),d(`SSETransport: Opening ${t.href}`),m(`info`,`cli_sse_connect_opening`),this.abortController=new AbortController;try{let n=await fetch(t.href,{headers:r,signal:this.abortController.signal});if(!n.ok){let e=k.has(n.status);if(d(`SSETransport: HTTP ${n.status}${e?` (permanent)`:``}`,{level:`error`}),m(`error`,`cli_sse_connect_http_error`,{status:n.status}),e){this.state=`closed`,this.onCloseCallback?.(n.status);return}this.handleConnectionError();return}if(!n.body){d(`SSETransport: No response body`),this.handleConnectionError();return}let i=Date.now()-e;d(`SSETransport: Connected`),m(`info`,`cli_sse_connect_connected`,{duration_ms:i}),this.state=`connected`,this.reconnectAttempts=0,this.reconnectStartTime=null,this.resetLivenessTimer(),await this.readStream(n.body)}catch(e){if(this.abortController?.signal.aborted)return;d(`SSETransport: Connection error: ${c(e)}`,{level:`error`}),m(`error`,`cli_sse_connect_error`),this.handleConnectionError()}}async readStream(e){let t=e.getReader(),n=new TextDecoder,r=``,i=1024*1024;try{for(;;){let{done:e,value:a}=await t.read();if(e)break;if(r+=n.decode(a,N),r.length>i){d(`SSETransport: Buffer exceeded ${i} bytes — dropping connection`,{level:`error`}),m(`error`,`cli_sse_buffer_overflow`);break}let{frames:o,remaining:s}=C(r);r=s;for(let e of o){if(this.resetLivenessTimer(),e.id){let t=parseInt(e.id,10);if(!isNaN(t)){if(this.seenSequenceNums.has(t))d(`SSETransport: DUPLICATE frame seq=${t} (lastSequenceNum=${this.lastSequenceNum}, seenCount=${this.seenSequenceNums.size})`,{level:`warn`}),m(`warn`,`cli_sse_duplicate_sequence`);else if(this.seenSequenceNums.add(t),this.seenSequenceNums.size>1e3){let e=this.lastSequenceNum-200;for(let t of this.seenSequenceNums)t<e&&this.seenSequenceNums.delete(t)}t>this.lastSequenceNum&&(this.lastSequenceNum=t)}}e.event&&e.data?this.handleSSEFrame(e.event,e.data):e.data&&(d(`SSETransport: Frame has data: but no event: field — dropped`,{level:`warn`}),m(`warn`,`cli_sse_frame_missing_event_field`))}}}catch(e){if(this.abortController?.signal.aborted)return;d(`SSETransport: Stream read error: ${c(e)}`,{level:`error`}),m(`error`,`cli_sse_stream_read_error`)}finally{t.releaseLock()}this.state!==`closing`&&this.state!==`closed`&&(d(`SSETransport: Stream ended, reconnecting`),this.handleConnectionError())}handleSSEFrame(e,t){if(e!==`client_event`){d(`SSETransport: Unexpected SSE event type '${e}' on worker stream`,{level:`warn`}),m(`warn`,`cli_sse_unexpected_event_type`,{event_type:e});return}let n;try{n=l(t)}catch(e){d(`SSETransport: Failed to parse client_event data: ${c(e)}`,{level:`error`});return}let r=n.payload;if(r&&typeof r==`object`&&`type`in r){let e=this.sessionId?` session=${this.sessionId}`:``;d(`SSETransport: Event seq=${n.sequence_num} event_id=${n.event_id} event_type=${n.event_type} payload_type=${String(r.type)}${e}`),m(`info`,`cli_sse_message_received`),this.onData?.(s(r)+`
4
4
  `)}else d(`SSETransport: Ignoring client_event with no type in payload: event_id=${n.event_id}`);this.onEventCallback?.(n)}handleConnectionError(){if(b(`SSE handleConnectionError: state=${this.state} lastSeqNum=${this.getLastSequenceNum()} reconnectAttempts=${this.reconnectAttempts} msSinceLastActivity=${this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1}`),this.clearLivenessTimer(),this.state===`closing`||this.state===`closed`)return;this.abortController?.abort(),this.abortController=null;let e=Date.now();this.reconnectStartTime||(this.reconnectStartTime=e);let t=e-this.reconnectStartTime;if(t<D){if(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.refreshHeaders){let e=this.refreshHeaders();Object.assign(this.headers,e),d(`SSETransport: Refreshed headers for reconnect`)}this.state=`reconnecting`,this.reconnectAttempts++;let e=Math.min(T*2**(this.reconnectAttempts-1),E),n=Math.max(0,e+e*.25*(2*Math.random()-1));d(`SSETransport: Reconnecting in ${Math.round(n)}ms (attempt ${this.reconnectAttempts}, ${Math.round(t/1e3)}s elapsed)`),m(`error`,`cli_sse_reconnect_attempt`,{reconnectAttempts:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}else d(`SSETransport: Reconnection time budget exhausted after ${Math.round(t/1e3)}s`,{level:`error`}),m(`error`,`cli_sse_reconnect_exhausted`,{reconnectAttempts:this.reconnectAttempts,elapsedMs:t}),this.state=`closed`,this.onCloseCallback?.()}resetLivenessTimer(){this.clearLivenessTimer(),this.livenessTimer=setTimeout(this.onLivenessTimeout,O)}clearLivenessTimer(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=null)}async write(e){let t=this.getAuthHeaders();if(Object.keys(t).length===0){d(`SSETransport: No session token available for POST`),m(`warn`,`cli_sse_post_no_token`);return}let n={...t,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`,"User-Agent":a()};d(`SSETransport: POST body keys=${Object.keys(e).join(`,`)}`);for(let t=1;t<=A;t++){try{let i=await r.post(this.postUrl,e,{headers:n,validateStatus:S});if(i.status===200||i.status===201){d(`SSETransport: POST success type=${e.type}`);return}if(d(`SSETransport: POST ${i.status} body=${s(i.data).slice(0,200)}`),i.status>=400&&i.status<500&&i.status!==429){d(`SSETransport: POST returned ${i.status} (client error), not retrying`),m(`warn`,`cli_sse_post_client_error`,{status:i.status});return}d(`SSETransport: POST returned ${i.status}, attempt ${t}/${A}`),m(`warn`,`cli_sse_post_retryable_error`,{status:i.status,attempt:t})}catch(e){d(`SSETransport: POST error: ${e.message}, attempt ${t}/${A}`),m(`warn`,`cli_sse_post_network_error`,{attempt:t})}if(t===A){d(`SSETransport: POST failed after ${A} attempts, continuing`),m(`warn`,`cli_sse_post_retries_exhausted`);return}await g(Math.min(j*2**(t-1),M))}}isConnectedStatus(){return this.state===`connected`}isClosedStatus(){return this.state===`closed`}setOnData(e){this.onData=e}setOnClose(e){this.onCloseCallback=e}setOnEvent(e){this.onEventCallback=e}close(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.clearLivenessTimer(),this.state=`closing`,this.abortController?.abort(),this.abortController=null}}}));export{F as n,C as r,P as t};
@@ -0,0 +1 @@
1
+ import{BO as e,zO as t}from"./loadAgentsDir-D7kapZB5.js";e();export{t as clearSearchExtraToolsDescriptionCache};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./SentryErrorBoundary-iih9eFpM.js";e();export{t as SentryErrorBoundary};
@@ -1,2 +1,2 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{o as s,s as c}from"./log-CzsijfHZ.js";import{i as l,t as u}from"./sentry-BNVxoVLS.js";var d,f,p,m=e((()=>{d=t(n(),1),i(),l(),s(),f=o(),p=class extends d.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({errorInfo:t});let n=this.props.name||`SentryErrorBoundary`,r=[``,`[ErrorBoundary:${n}] React rendering error caught`,` Message: ${e.message}`];t.componentStack&&r.push(` Component stack:\n${t.componentStack}`),console.error(r.join(`
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{o as s,s as c}from"./log-CzsijfHZ.js";import{i as l,t as u}from"./sentry-BZmpC-iI.js";var d,f,p,m=e((()=>{d=t(n(),1),i(),l(),s(),f=o(),p=class extends d.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({errorInfo:t});let n=this.props.name||`SentryErrorBoundary`,r=[``,`[ErrorBoundary:${n}] React rendering error caught`,` Message: ${e.message}`];t.componentStack&&r.push(` Component stack:\n${t.componentStack}`),console.error(r.join(`
2
2
  `)),c(e),u(e,{componentBoundary:n,componentStack:t.componentStack})}render(){return this.state.hasError?(0,f.jsxs)(a,{flexDirection:`column`,paddingX:1,paddingY:1,children:[(0,f.jsx)(r,{color:`error`,bold:!0,children:`React Rendering Error`}),(0,f.jsx)(r,{color:`error`,children:this.state.error?.message}),this.props.name&&(0,f.jsxs)(r,{dimColor:!0,children:[`Boundary: `,this.props.name]})]}):this.props.children}}}));export{m as n,p as t};
@@ -0,0 +1,2 @@
1
+ import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{f as r,s as i,u as a}from"./envUtils-BWeoiL4Y.js";import{n as o,t as s}from"./figures-gfT9mM8P.js";import{E as c,F as ee,In as l,Ln as u,Rn as d,T as te,Ut as ne,_ as re,b as f,c as ie,f as ae,g as p,h as m,i as oe,n as se,nt as ce,p as le,r as ue,t as h,tt as de,x as g}from"./src-Di342QoJ.js";import{t as _}from"./jsx-runtime-D-D469L8.js";import{Ct as v,cn as y,kr as fe,tn as pe}from"./state-sIHsFpDu.js";import{Ac as b,Fs as me,Is as he,Ka as ge,Lr as _e,Ns as ve,Oc as ye,Pc as x,Pr as S,Qa as be,Rr as xe,Rs as Se,S as Ce,Sc as C,Si as we,Vs as Te,Xi as Ee,Zi as De,_ as Oe,bc as ke,di as Ae,it as je,li as Me,lo as w,on as T,oo as Ne,rt as Pe,tn as E,ui as Fe,vc as Ie,vi as Le,xi as Re,yc as ze,yi as Be}from"./paths-1ngPRtu3.js";import{E as D,w as O}from"./debug-UI3T040K.js";import{n as k,r as A}from"./analytics-DqMQntaB.js";import{n as j,t as Ve}from"./cwd--iizewsn.js";import{o as He,s as Ue}from"./log-CzsijfHZ.js";import{i as We,o as Ge}from"./platform-CuyedWpe.js";import{_ as M,x as N}from"./startupProfiler-DnXZaX4A.js";import{r as Ke}from"./permissions-DXLfdE7b.js";import{$b as qe,$f as Je,Ab as Ye,Ar as Xe,Ax as Ze,C as Qe,Cb as $e,Ck as et,Db as tt,Eb as nt,FS as rt,Fx as P,Hu as it,I as at,IS as ot,Ix as F,Lg as st,NS as ct,Ob as lt,PS as I,Rg as ut,Sb as dt,Sk as ft,Tb as pt,Vu as mt,XS as L,Yx as ht,ZS as R,as as gt,ax as _t,ep as vt,ex as yt,gm as z,hr as B,is as V,jb as bt,kb as xt,kx as St,os as Ct,pm as wt,qx as Tt,uy as Et,w as Dt,wb as H,xb as Ot,xk as kt,y as At,yk as jt,zw as Mt}from"./loadAgentsDir-D7kapZB5.js";import{r as Nt,t as Pt}from"./poorMode-CsGLI_hm.js";import{t as U}from"./useKeybinding-FsOnjW6T.js";import{l as W,u as Ft}from"./referral-BKeCKnOJ.js";import{i as It,r as Lt}from"./bridgeEnabled-A-_xJ94c.js";import{a as Rt,n as zt,r as Bt}from"./teammateModeSnapshot-Dyukgtp9.js";import{i as Vt,n as G,r as Ht}from"./modalContext-CmSKRyea.js";import{n as Ut,t as Wt}from"./ThemePicker-BG1ykSpX.js";import{i as Gt,n as Kt,r as qt,t as Jt}from"./extraUsage-CBwIvl73.js";import{n as Yt,t as Xt}from"./ClaudeMdExternalIncludesDialog-B04cjDwX.js";import{t as Zt}from"./SearchBox-DfOmUoaI.js";import{n as Qt,t as $t}from"./useSearchInput-CF77X2OV.js";import{n as en,t as tn}from"./usage-DE4PSQiF.js";import{a as nn,i as rn,t as an}from"./OverageCreditUpsell-abcPm3PB.js";function on(){let e=v();return[{label:`Version`,value:`2.6.6`},{label:`Session name`,value:B(e)??(0,K.jsx)(f,{dimColor:!0,children:`/rename to add a name`})},{label:`Session ID`,value:e},{label:`cwd`,value:Ve()},...dt(),...Ot()]}function sn({mainLoopModel:e,mcp:t,theme:n,context:r}){return[{label:`Model`,value:Ye(e)},...$e(t.clients,r.options.ideInstallationStatus,n),...nt(t.clients,n),...lt(),...xt()]}async function cn(){return[...await H(),...await pt(),...await tt()]}function ln({value:e}){return Array.isArray(e)?(0,K.jsx)(g,{flexWrap:`wrap`,columnGap:1,flexShrink:99,children:e.map((t,n)=>(0,K.jsxs)(f,{children:[t,n<e.length-1?`,`:``]},n))}):typeof e==`string`?(0,K.jsx)(f,{children:e}):e}function un({context:e,diagnosticsPromise:t}){let n=I(e=>e.mainLoopModel),r=I(e=>e.mcp),[i]=te(),a=fn.useMemo(()=>[on(),sn({mainLoopModel:n,mcp:r,theme:i,context:e})],[n,r,i,e]),o=Ht()?1:void 0;return(0,K.jsxs)(g,{flexDirection:`column`,flexGrow:o,children:[(0,K.jsxs)(g,{flexDirection:`column`,gap:1,flexGrow:o,children:[a.map((e,t)=>e.length>0&&(0,K.jsx)(g,{flexDirection:`column`,children:e.map(({label:e,value:t},n)=>(0,K.jsxs)(g,{flexDirection:`row`,gap:1,flexShrink:0,children:[e!==void 0&&(0,K.jsxs)(f,{bold:!0,children:[e,`:`]}),(0,K.jsx)(ln,{value:t})]},n))},t)),(0,K.jsx)(pn.Suspense,{fallback:null,children:(0,K.jsx)(dn,{promise:t})})]}),(0,K.jsx)(f,{dimColor:!0,children:(0,K.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function dn({promise:e}){let t=(0,pn.use)(e);return t.length===0?null:(0,K.jsxs)(g,{flexDirection:`column`,paddingBottom:1,children:[(0,K.jsx)(f,{bold:!0,children:`System Diagnostics`}),t.map((e,t)=>(0,K.jsxs)(g,{flexDirection:`row`,gap:1,paddingX:1,children:[(0,K.jsx)(f,{color:`error`,children:s.warning}),typeof e==`string`?(0,K.jsx)(f,{wrap:`wrap`,children:e}):e]},t))]})}var fn,pn,K,mn=t((()=>{o(),fn=n(d(),1),pn=n(d(),1),y(),G(),h(),ct(),j(),Xe(),bt(),R(),K=_()}));function hn({currentVersion:e,onChoice:t}){function n(e){t(e)}function r(){t(`cancel`)}return(0,gn.jsxs)(ae,{title:`Switch to Stable Channel`,onCancel:r,color:`permission`,hideBorder:!0,hideInputGuide:!0,children:[(0,gn.jsxs)(f,{children:[`The stable channel may have an older version than what you're currently running (`,e,`).`]}),(0,gn.jsx)(f,{dimColor:!0,children:`How would you like to handle this?`}),(0,gn.jsx)(St,{options:[{label:`Allow possible downgrade to stable version`,value:`downgrade`},{label:`Stay on current version (${e}) until stable catches up`,value:`stay`}],onChange:n})]})}var gn,_n=t((()=>{d(),h(),Et(),gn=_()}));function vn(e){return Object.entries(e).map(([e,t])=>({label:t?.name??xn,value:e,description:t?.description??Sn}))}function yn({initialStyle:e,onComplete:t,onCancel:n,isStandaloneCommand:r}){let[i,a]=(0,bn.useState)([]),[o,s]=(0,bn.useState)(!0);(0,bn.useEffect)(()=>{gt(Ve()).then(e=>{a(vn(e)),s(!1)}).catch(()=>{a(vn(V)),s(!1)})},[]);let c=(0,bn.useCallback)(e=>{t(e)},[t]);return(0,q.jsx)(ae,{title:`Preferred output style`,onCancel:n,hideInputGuide:!r,hideBorder:!r,children:(0,q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(g,{marginTop:1,children:(0,q.jsx)(f,{dimColor:!0,children:`This changes how Claude Code communicates with you`})}),o?(0,q.jsx)(f,{dimColor:!0,children:`Loading output styles…`}):(0,q.jsx)(St,{options:i,onChange:c,visibleOptionCount:10,defaultValue:e})]})})}var bn,q,xn,Sn,Cn=t((()=>{d(),bn=n(d(),1),Ct(),h(),j(),Ze(),q=_(),xn=`Default`,Sn=`Claude completes coding tasks efficiently and provides concise responses`}));function wn({initialLanguage:e,onComplete:t,onCancel:n}){let[r,i]=(0,Tn.useState)(e),[a,o]=(0,Tn.useState)((e??``).length);de(`confirm:no`,n,{context:`Settings`});function c(){let e=r?.trim();t(e||void 0)}return(0,J.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,J.jsx)(f,{children:`Enter your preferred response and voice language:`}),(0,J.jsxs)(g,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(f,{children:s.pointer}),(0,J.jsx)(P,{value:r??``,onChange:i,onSubmit:c,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${s.ellipsis}`,columns:60,cursorOffset:a,onChangeCursorOffset:o})]}),(0,J.jsx)(f,{dimColor:!0,children:`Leave empty for default (English)`})]})}var Tn,J,En=t((()=>{o(),Tn=n(d(),1),h(),U(),F(),J=_()}));function Dn({onClose:t,context:n,setTabsHidden:i,onIsSearchModeChange:o,contentHeight:u}){let{headerFocused:d,focusHeader:ie}=oe(),se=Ht(),[,le]=te(),ue=c(),[h,_]=(0,X.useState)(C()),v=Y.useRef(C()),[y,b]=(0,X.useState)(ge()),ve=Y.useRef(ge()),[S,Ce]=(0,X.useState)(y?.outputStyle||`default`),Ee=Y.useRef(S),[T,Ne]=(0,X.useState)(y?.language),Pe=Y.useRef(T),[E,Le]=(0,X.useState)(0),[D,O]=(0,X.useState)(0),[k,j]=(0,X.useState)(!1),Ve=ne(),{rows:He}=ee(),Ge=u??Math.min(Math.floor(He*.8),30),M=Math.max(5,Ge-10),N=I(e=>e.mainLoopModel),Ye=I(e=>e.verbose),Xe=I(e=>e.thinkingEnabled),Ze=I(e=>Re()?e.fastMode:!1),$e=I(e=>e.promptSuggestionEnabled),et=he(y?.permissions?.defaultMode??`default`),tt=Qe()||At()===`enabled`,nt=(vt(),e(Je)).isBriefEntitled(),P=ot(),[it,F]=(0,X.useState)({}),st=Y.useRef(Xe),[ct]=(0,X.useState)(()=>be(`localSettings`)),[lt]=(0,X.useState)(()=>be(`userSettings`)),ut=Y.useRef(ue),dt=rt(),[pt]=(0,X.useState)(()=>{let e=dt.getState();return{mainLoopModel:e.mainLoopModel,mainLoopModelForSession:e.mainLoopModelForSession,verbose:e.verbose,thinkingEnabled:e.thinkingEnabled,fastMode:e.fastMode,promptSuggestionEnabled:e.promptSuggestionEnabled,isBriefOnly:e.isBriefOnly,replBridgeEnabled:e.replBridgeEnabled,replBridgeOutboundOnly:e.replBridgeOutboundOnly,settings:e.settings}}),[mt]=(0,X.useState)(()=>pe()),R=Y.useRef(!1),[gt,yt]=(0,X.useState)(!1),[z,B]=(0,X.useState)(null),{query:V,setQuery:bt,cursorOffset:xt}=Qt({isActive:k&&z===null&&!d,onExit:()=>j(!1),onExitUp:ie,passthroughCtrlKeys:[`c`,`d`]}),Ct=k&&!d;Y.useEffect(()=>{o?.(Ct)},[Ct,o]);let wt=qe(n.options.mcpClients),Tt=!a(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),Et=Y.use(kt(!0)),Dt=ft(Et),H=ze();function Ot(e){A(`tengu_config_model_changed`,{from_model:N,to_model:e}),P(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null})),F(t=>{let n=xe(e)+(Kt(e,!1,_e())?` · Billed as extra usage`:``);if(`model`in t){let{model:e,...r}=t;return{...r,model:n}}return{...t,model:n}})}function Mt(e){x(t=>({...t,verbose:e})),_({...C(),verbose:e}),P(t=>({...t,verbose:e})),F(t=>{if(`verbose`in t){let{verbose:e,...n}=t;return n}return{...t,verbose:e}})}let U=[{id:`autoCompactEnabled`,label:`Auto-compact`,value:h.autoCompactEnabled,type:`boolean`,onChange(e){x(t=>({...t,autoCompactEnabled:e})),_({...C(),autoCompactEnabled:e}),A(`tengu_auto_compact_setting_changed`,{enabled:e})}},{id:`spinnerTipsEnabled`,label:`Show tips`,value:y?.spinnerTipsEnabled??!0,type:`boolean`,onChange(e){w(`localSettings`,{spinnerTipsEnabled:e}),b(t=>({...t,spinnerTipsEnabled:e})),A(`tengu_tips_setting_changed`,{enabled:e})}},{id:`prefersReducedMotion`,label:`Reduce motion`,value:y?.prefersReducedMotion??!1,type:`boolean`,onChange(e){w(`localSettings`,{prefersReducedMotion:e}),b(t=>({...t,prefersReducedMotion:e})),P(t=>({...t,settings:{...t.settings,prefersReducedMotion:e}})),A(`tengu_reduce_motion_setting_changed`,{enabled:e})}},{id:`thinkingEnabled`,label:`Thinking mode`,value:Xe??!0,type:`boolean`,onChange(e){P(t=>({...t,thinkingEnabled:e})),w(`userSettings`,{alwaysThinkingEnabled:e?void 0:!1}),A(`tengu_thinking_toggled`,{enabled:e})}},...Re()&&Be()?[{id:`fastMode`,label:`Fast mode (${Me} only)`,value:!!Ze,type:`boolean`,onChange(e){Fe(),w(`userSettings`,{fastMode:e?!0:void 0}),e?(P(e=>({...e,mainLoopModel:Ae(),mainLoopModelForSession:null,fastMode:!0})),F(e=>({...e,model:Ae(),"Fast mode":`ON`}))):(P(e=>({...e,fastMode:!1})),F(e=>({...e,"Fast mode":`OFF`})))}}]:[],...Oe(`tengu_chomp_inflection`,!1)?[{id:`promptSuggestionEnabled`,label:`Prompt suggestions`,value:$e,type:`boolean`,onChange(e){P(t=>({...t,promptSuggestionEnabled:e})),w(`userSettings`,{promptSuggestionEnabled:e?void 0:!1})}}]:[],...[{id:`poorMode`,label:`Poor mode (save tokens)`,value:(Pt(),e(Nt)).isPoorModeActive(),type:`boolean`,onChange(t){(Pt(),e(Nt)).setPoorMode(t),P(e=>({...e,promptSuggestionEnabled:!t}))}}],...process.env.USER_TYPE===`ant`?[{id:`speculationEnabled`,label:`Speculative execution`,value:h.speculationEnabled??!0,type:`boolean`,onChange(e){x(t=>t.speculationEnabled===e?t:{...t,speculationEnabled:e}),_({...C(),speculationEnabled:e}),A(`tengu_speculation_setting_changed`,{enabled:e})}}]:[],...Tt?[{id:`fileCheckpointingEnabled`,label:`Rewind code (checkpoints)`,value:h.fileCheckpointingEnabled,type:`boolean`,onChange(e){x(t=>({...t,fileCheckpointingEnabled:e})),_({...C(),fileCheckpointingEnabled:e}),A(`tengu_file_history_snapshots_setting_changed`,{enabled:e})}}]:[],{id:`verbose`,label:`Verbose output`,value:Ye,type:`boolean`,onChange:Mt},{id:`terminalProgressBarEnabled`,label:`Terminal progress bar`,value:h.terminalProgressBarEnabled,type:`boolean`,onChange(e){x(t=>({...t,terminalProgressBarEnabled:e})),_({...C(),terminalProgressBarEnabled:e}),A(`tengu_terminal_progress_bar_setting_changed`,{enabled:e})}},...Oe(`tengu_terminal_sidebar`,!1)?[{id:`showStatusInTerminalTab`,label:`Show status in terminal tab`,value:h.showStatusInTerminalTab??!1,type:`boolean`,onChange(e){x(t=>({...t,showStatusInTerminalTab:e})),_({...C(),showStatusInTerminalTab:e}),A(`tengu_terminal_tab_status_setting_changed`,{enabled:e})}}]:[],{id:`showTurnDuration`,label:`Show turn duration`,value:h.showTurnDuration,type:`boolean`,onChange(e){x(t=>({...t,showTurnDuration:e})),_({...C(),showTurnDuration:e}),A(`tengu_show_turn_duration_setting_changed`,{enabled:e})}},{id:`defaultPermissionMode`,label:`Default permission mode`,value:et,options:(()=>{let e=[`default`,`plan`];return[...e,...Ke.filter(t=>!e.includes(t))]})(),type:`enum`,onChange(e){let t=he(e),n=t===`auto`?t:me(t)?Te(t):t,r=w(`userSettings`,{permissions:{...y?.permissions,defaultMode:n}});if(r.error){Ue(r.error);return}b(e=>({...e,permissions:{...e?.permissions,defaultMode:n}})),F(t=>({...t,defaultPermissionMode:e})),A(`tengu_config_changed`,{setting:`defaultPermissionMode`,value:e})}},...tt?[{id:`useAutoModeDuringPlan`,label:`Use auto mode during plan`,value:y?.useAutoModeDuringPlan??!0,type:`boolean`,onChange(e){w(`userSettings`,{useAutoModeDuringPlan:e}),b(t=>({...t,useAutoModeDuringPlan:e})),P(e=>{let t=at(e.toolPermissionContext);return t===e.toolPermissionContext?e:{...e,toolPermissionContext:t}}),F(t=>({...t,"Use auto mode during plan":e}))}}]:[],{id:`respectGitignore`,label:`Respect .gitignore in file picker`,value:h.respectGitignore,type:`boolean`,onChange(e){x(t=>({...t,respectGitignore:e})),_({...C(),respectGitignore:e}),A(`tengu_respect_gitignore_setting_changed`,{enabled:e})}},{id:`copyFullResponse`,label:`Always copy full response (skip /copy picker)`,value:h.copyFullResponse,type:`boolean`,onChange(e){x(t=>({...t,copyFullResponse:e})),_({...C(),copyFullResponse:e}),A(`tengu_config_changed`,{setting:`copyFullResponse`,value:String(e)})}},...ht()?[{id:`copyOnSelect`,label:`Copy on select`,value:h.copyOnSelect??!0,type:`boolean`,onChange(e){x(t=>({...t,copyOnSelect:e})),_({...C(),copyOnSelect:e}),A(`tengu_config_changed`,{setting:`copyOnSelect`,value:String(e)})}}]:[],H?{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:`disabled`,type:`managedEnum`,onChange(){}}:{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:y?.autoUpdatesChannel??`latest`,type:`managedEnum`,onChange(){}},{id:`theme`,label:`Theme`,value:ue,type:`managedEnum`,onChange:le},{id:`notifChannel`,label:`Local notifications`,value:h.preferredNotifChannel,options:[`auto`,`iterm2`,`terminal_bell`,`iterm2_with_bell`,`kitty`,`ghostty`,`notifications_disabled`],type:`enum`,onChange(e){x(t=>({...t,preferredNotifChannel:e})),_({...C(),preferredNotifChannel:e})}},...[{id:`taskCompleteNotifEnabled`,label:`Push when idle`,value:h.taskCompleteNotifEnabled??!1,type:`boolean`,onChange(e){x(t=>({...t,taskCompleteNotifEnabled:e})),_({...C(),taskCompleteNotifEnabled:e})}},{id:`inputNeededNotifEnabled`,label:`Push when input needed`,value:h.inputNeededNotifEnabled??!1,type:`boolean`,onChange(e){x(t=>({...t,inputNeededNotifEnabled:e})),_({...C(),inputNeededNotifEnabled:e})}},{id:`agentPushNotifEnabled`,label:`Push when Claude decides`,value:h.agentPushNotifEnabled??!1,type:`boolean`,onChange(e){x(t=>({...t,agentPushNotifEnabled:e})),_({...C(),agentPushNotifEnabled:e})}}],{id:`outputStyle`,label:`Output style`,value:S,type:`managedEnum`,onChange:()=>{}},...nt?[{id:`defaultView`,label:`What you see by default`,value:y?.defaultView===void 0?`default`:String(y.defaultView),options:[`transcript`,`chat`,`default`],type:`enum`,onChange(e){let t=e===`default`?void 0:e;w(`localSettings`,{defaultView:t}),b(e=>({...e,defaultView:t}));let n=t===`chat`;P(e=>e.isBriefOnly===n?e:{...e,isBriefOnly:n}),fe(n),F(t=>({...t,"Default view":e})),A(`tengu_default_view_setting_changed`,{value:t??`unset`})}}]:[],{id:`language`,label:`Language`,value:T??`Default (English)`,type:`managedEnum`,onChange:()=>{}},{id:`editorMode`,label:`Editor mode`,value:h.editorMode===`emacs`?`normal`:h.editorMode||`normal`,options:[`normal`,`vim`],type:`enum`,onChange(e){x(t=>({...t,editorMode:e})),_({...C(),editorMode:e}),A(`tengu_editor_mode_changed`,{mode:e,source:`config_panel`})}},{id:`prStatusFooterEnabled`,label:`Show PR status footer`,value:h.prStatusFooterEnabled??!0,type:`boolean`,onChange(e){x(t=>t.prStatusFooterEnabled===e?t:{...t,prStatusFooterEnabled:e}),_({...C(),prStatusFooterEnabled:e}),A(`tengu_pr_status_footer_setting_changed`,{enabled:e})}},{id:`model`,label:`Model`,value:N===null?`Default (recommended)`:N,type:`managedEnum`,onChange:Ot},...wt?[{id:`diffTool`,label:`Diff tool`,value:h.diffTool??`auto`,options:[`terminal`,`auto`],type:`enum`,onChange(e){x(t=>({...t,diffTool:e})),_({...C(),diffTool:e}),A(`tengu_diff_tool_changed`,{tool:e,source:`config_panel`})}}]:[],..._t()?[]:[{id:`autoConnectIde`,label:`Auto-connect to IDE (external terminal)`,value:h.autoConnectIde??!1,type:`boolean`,onChange(e){x(t=>({...t,autoConnectIde:e})),_({...C(),autoConnectIde:e}),A(`tengu_auto_connect_ide_changed`,{enabled:e,source:`config_panel`})}}],..._t()?[{id:`autoInstallIdeExtension`,label:`Auto-install IDE extension`,value:h.autoInstallIdeExtension??!0,type:`boolean`,onChange(e){x(t=>({...t,autoInstallIdeExtension:e})),_({...C(),autoInstallIdeExtension:e}),A(`tengu_auto_install_ide_extension_changed`,{enabled:e,source:`config_panel`})}}]:[],{id:`claudeInChromeDefaultEnabled`,label:`Claude in Chrome enabled by default`,value:h.claudeInChromeDefaultEnabled??!0,type:`boolean`,onChange(e){x(t=>({...t,claudeInChromeDefaultEnabled:e})),_({...C(),claudeInChromeDefaultEnabled:e}),A(`tengu_claude_in_chrome_setting_changed`,{enabled:e})}},...je()?(()=>{let e=Bt(),t=e?`Teammate mode [overridden: ${e}]`:`Teammate mode`,n=We()===`windows`,r=n?[`auto`,`tmux`,`windows-terminal`,`in-process`]:[`auto`,`tmux`,`in-process`];return[{id:`teammateMode`,label:t,value:h.teammateMode??`auto`,options:r,type:`enum`,onChange(e){e!==`auto`&&e!==`tmux`&&e!==`windows-terminal`&&e!==`in-process`||e===`windows-terminal`&&!n||(zt(e),x(t=>({...t,teammateMode:e})),_({...C(),teammateMode:e}),A(`tengu_teammate_mode_changed`,{mode:e}))}},{id:`teammateDefaultModel`,label:`Default teammate model`,value:On(h.teammateDefaultModel),type:`managedEnum`,onChange(){}}]})():[],...It()?[{id:`remoteControlAtStartup`,label:`Enable Remote Control for all sessions`,value:h.remoteControlAtStartup===void 0?`default`:String(h.remoteControlAtStartup),options:[`true`,`false`,`default`],type:`enum`,onChange(e){if(e===`default`)x(e=>{if(e.remoteControlAtStartup===void 0)return e;let t={...e};return delete t.remoteControlAtStartup,t}),_({...C(),remoteControlAtStartup:void 0});else{let t=e===`true`;x(e=>e.remoteControlAtStartup===t?e:{...e,remoteControlAtStartup:t}),_({...C(),remoteControlAtStartup:t})}let t=ye();P(e=>e.replBridgeEnabled===t&&!e.replBridgeOutboundOnly?e:{...e,replBridgeEnabled:t,replBridgeOutboundOnly:!1})}}]:[],...Dt?[{id:`showExternalIncludesDialog`,label:`External CLAUDE.md includes`,value:ke().hasClaudeMdExternalIncludesApproved?`true`:`false`,type:`managedEnum`,onChange(){}}]:[],...process.env.ANTHROPIC_API_KEY&&!r()?[{id:`apiKey`,label:(0,Z.jsxs)(f,{children:[`Use custom API key: `,(0,Z.jsx)(f,{bold:!0,children:De(process.env.ANTHROPIC_API_KEY)})]}),searchText:`Use custom API key`,value:!!(process.env.ANTHROPIC_API_KEY&&h.customApiKeyResponses?.approved?.includes(De(process.env.ANTHROPIC_API_KEY))),type:`boolean`,onChange(e){x(t=>{let n={...t};if(n.customApiKeyResponses||(n.customApiKeyResponses={approved:[],rejected:[]}),n.customApiKeyResponses.approved||(n.customApiKeyResponses={...n.customApiKeyResponses,approved:[]}),n.customApiKeyResponses.rejected||(n.customApiKeyResponses={...n.customApiKeyResponses,rejected:[]}),process.env.ANTHROPIC_API_KEY){let t=De(process.env.ANTHROPIC_API_KEY);e?n.customApiKeyResponses={...n.customApiKeyResponses,approved:[...(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),t],rejected:(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t)}:n.customApiKeyResponses={...n.customApiKeyResponses,approved:(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),rejected:[...(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t),t]}}return n}),_(C())}}]:[]],W=Y.useMemo(()=>{if(!V)return U;let e=V.toLowerCase();return U.filter(t=>t.id.toLowerCase().includes(e)?!0:(`searchText`in t?t.searchText:t.label).toLowerCase().includes(e))},[U,V]);Y.useEffect(()=>{if(E>=W.length){let e=Math.max(0,W.length-1);Le(e),O(Math.max(0,e-M+1));return}O(e=>E<e?E:E>=e+M?E-M+1:e)},[W.length,E,M]);let Ft=(0,X.useCallback)(e=>{O(t=>e<t?e:e>=t+M?e-M+1:t)},[M]),Lt=(0,X.useCallback)(()=>{if(z!==null)return;let e=Object.entries(it).map(([e,t])=>(A(`tengu_config_changed`,{key:e,value:t}),`Set ${e} to ${l.bold(t)}`)),n=r()?void 0:process.env.ANTHROPIC_API_KEY,i=!!(n&&v.current.customApiKeyResponses?.approved?.includes(De(n))),a=!!(n&&h.customApiKeyResponses?.approved?.includes(De(n)));if(i!==a&&(e.push(`${a?`Enabled`:`Disabled`} custom API key`),A(`tengu_config_changed`,{key:`env.ANTHROPIC_API_KEY`,value:a})),h.theme!==v.current.theme&&e.push(`Set theme to ${l.bold(h.theme)}`),h.preferredNotifChannel!==v.current.preferredNotifChannel&&e.push(`Set notifications to ${l.bold(h.preferredNotifChannel)}`),S!==Ee.current&&e.push(`Set output style to ${l.bold(S)}`),T!==Pe.current&&e.push(`Set response language to ${l.bold(T??`Default (English)`)}`),h.editorMode!==v.current.editorMode&&e.push(`Set editor mode to ${l.bold(h.editorMode||`emacs`)}`),h.diffTool!==v.current.diffTool&&e.push(`Set diff tool to ${l.bold(h.diffTool)}`),h.autoConnectIde!==v.current.autoConnectIde&&e.push(`${h.autoConnectIde?`Enabled`:`Disabled`} auto-connect to IDE`),h.autoInstallIdeExtension!==v.current.autoInstallIdeExtension&&e.push(`${h.autoInstallIdeExtension?`Enabled`:`Disabled`} auto-install IDE extension`),h.autoCompactEnabled!==v.current.autoCompactEnabled&&e.push(`${h.autoCompactEnabled?`Enabled`:`Disabled`} auto-compact`),h.respectGitignore!==v.current.respectGitignore&&e.push(`${h.respectGitignore?`Enabled`:`Disabled`} respect .gitignore in file picker`),h.copyFullResponse!==v.current.copyFullResponse&&e.push(`${h.copyFullResponse?`Enabled`:`Disabled`} always copy full response`),h.copyOnSelect!==v.current.copyOnSelect&&e.push(`${h.copyOnSelect?`Enabled`:`Disabled`} copy on select`),h.terminalProgressBarEnabled!==v.current.terminalProgressBarEnabled&&e.push(`${h.terminalProgressBarEnabled?`Enabled`:`Disabled`} terminal progress bar`),h.showStatusInTerminalTab!==v.current.showStatusInTerminalTab&&e.push(`${h.showStatusInTerminalTab?`Enabled`:`Disabled`} terminal tab status`),h.showTurnDuration!==v.current.showTurnDuration&&e.push(`${h.showTurnDuration?`Enabled`:`Disabled`} turn duration`),h.remoteControlAtStartup!==v.current.remoteControlAtStartup){let t=h.remoteControlAtStartup===void 0?`Reset Remote Control to default`:`${h.remoteControlAtStartup?`Enabled`:`Disabled`} Remote Control for all sessions`;e.push(t)}y?.autoUpdatesChannel!==ve.current?.autoUpdatesChannel&&e.push(`Set auto-update channel to ${l.bold(y?.autoUpdatesChannel??`latest`)}`),e.length>0?t(e.join(`
2
+ `)):t(`Config dialog dismissed`,{display:`system`})},[z,it,h,N,S,T,y?.autoUpdatesChannel,Re()?y?.fastMode:void 0,t]),Rt=(0,X.useCallback)(()=>{ue!==ut.current&&le(ut.current),x(()=>v.current);let e=ct;w(`localSettings`,{spinnerTipsEnabled:e?.spinnerTipsEnabled,prefersReducedMotion:e?.prefersReducedMotion,defaultView:e?.defaultView,outputStyle:e?.outputStyle});let t=lt;w(`userSettings`,{alwaysThinkingEnabled:t?.alwaysThinkingEnabled,fastMode:t?.fastMode,promptSuggestionEnabled:t?.promptSuggestionEnabled,autoUpdatesChannel:t?.autoUpdatesChannel,minimumVersion:t?.minimumVersion,language:t?.language,useAutoModeDuringPlan:t?.useAutoModeDuringPlan,syntaxHighlightingDisabled:t?.syntaxHighlightingDisabled,permissions:t?.permissions===void 0?void 0:{...t.permissions,defaultMode:t.permissions.defaultMode}});let n=pt;P(e=>({...e,mainLoopModel:n.mainLoopModel,mainLoopModelForSession:n.mainLoopModelForSession,verbose:n.verbose,thinkingEnabled:n.thinkingEnabled,fastMode:n.fastMode,promptSuggestionEnabled:n.promptSuggestionEnabled,isBriefOnly:n.isBriefOnly,replBridgeEnabled:n.replBridgeEnabled,replBridgeOutboundOnly:n.replBridgeOutboundOnly,settings:n.settings,toolPermissionContext:at(e.toolPermissionContext)})),pe()!==mt&&fe(mt)},[ue,le,ct,lt,pt,mt,P]);de(`confirm:no`,(0,X.useCallback)(()=>{z===null&&(R.current&&Rt(),t(`Config dialog dismissed`,{display:`system`}))},[z,Rt,t]),{context:`Settings`,isActive:z===null&&!k&&!d}),de(`settings:close`,Lt,{context:`Settings`,isActive:z===null&&!k&&!d});let Vt=(0,X.useCallback)(()=>{let e=W[E];if(!(!e||!e.onChange)){if(e.type===`boolean`){R.current=!0,e.onChange(!e.value),e.id===`thinkingEnabled`&&(!e.value===st.current?yt(!1):n.messages.some(e=>e.type===`assistant`)&&yt(!0));return}if(e.id===`theme`||e.id===`model`||e.id===`teammateDefaultModel`||e.id===`showExternalIncludesDialog`||e.id===`outputStyle`||e.id===`language`)switch(e.id){case`theme`:B(`Theme`),i(!0);return;case`model`:B(`Model`),i(!0);return;case`teammateDefaultModel`:B(`TeammateModel`),i(!0);return;case`showExternalIncludesDialog`:B(`ExternalIncludes`),i(!0);return;case`outputStyle`:B(`OutputStyle`),i(!0);return;case`language`:B(`Language`),i(!0);return}if(e.id===`autoUpdatesChannel`){if(H){B(`EnableAutoUpdates`),i(!0);return}(y?.autoUpdatesChannel??`latest`)===`latest`?(B(`ChannelDowngrade`),i(!0)):(R.current=!0,w(`userSettings`,{autoUpdatesChannel:`latest`,minimumVersion:void 0}),b(e=>({...e,autoUpdatesChannel:`latest`,minimumVersion:void 0})),A(`tengu_autoupdate_channel_changed`,{channel:`latest`}));return}if(e.type===`enum`){R.current=!0;let t=(e.options.indexOf(e.value)+1)%e.options.length;e.onChange(e.options[t]);return}}},[H,W,E,y?.autoUpdatesChannel,i]),G=e=>{yt(!1);let t=Math.max(0,Math.min(W.length-1,E+e));Le(t),Ft(t)};return ce({"select:previous":()=>{E===0?(yt(!1),j(!0),O(0)):G(-1)},"select:next":()=>G(1),"scroll:lineUp":()=>G(-1),"scroll:lineDown":()=>G(1),"select:accept":Vt,"select:previousValue":()=>Vt(),"select:nextValue":()=>Vt(),"settings:search":()=>{j(!0),bt(``)}},{context:`Settings`,isActive:z===null&&!k&&!d}),(0,Z.jsx)(g,{flexDirection:`column`,width:`100%`,tabIndex:0,autoFocus:!0,onKeyDown:(0,X.useCallback)(e=>{if(z===null&&!d){if(k){if(e.key===`escape`){e.preventDefault(),V.length>0?bt(``):j(!1);return}(e.key===`return`||e.key===`down`||e.key===`wheeldown`)&&(e.preventDefault(),j(!1),Le(0),O(0));return}if(e.key===`left`||e.key===`right`||e.key===`tab`){e.preventDefault(),Vt();return}e.ctrl||e.meta||e.key===`j`||e.key===`k`||e.key===`/`||e.key.length===1&&e.key!==` `&&(e.preventDefault(),j(!0),bt(e.key))}},[z,d,k,V,bt,Vt]),children:z===`Theme`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Wt,{onThemeSelect:e=>{R.current=!0,le(e),B(null),i(!1)},onCancel:()=>{B(null),i(!1)},hideEscToCancel:!0,skipExitHandling:!0}),(0,Z.jsx)(g,{children:(0,Z.jsx)(f,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`select`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]}):z===`Model`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qt,{initial:N,onSelect:(e,t)=>{R.current=!0,Ot(e),B(null),i(!1)},onCancel:()=>{B(null),i(!1)},showFastModeNotice:Re()?Ze&&we(N)&&Be():!1}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):z===`TeammateModel`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(qt,{initial:h.teammateDefaultModel??null,skipSettingsWrite:!0,headerText:`Default model for newly spawned teammates. The leader can override via the tool call's model parameter.`,onSelect:(e,t)=>{B(null),i(!1),!(h.teammateDefaultModel===void 0&&e===null)&&(R.current=!0,x(t=>t.teammateDefaultModel===e?t:{...t,teammateDefaultModel:e}),_({...C(),teammateDefaultModel:e}),F(t=>({...t,teammateDefaultModel:On(e)})),A(`tengu_teammate_default_model_changed`,{model:e}))},onCancel:()=>{B(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):z===`ExternalIncludes`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Xt,{onDone:()=>{B(null),i(!1)},externalIncludes:jt(Et)}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`disable external includes`})]})})]}):z===`OutputStyle`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(yn,{initialStyle:S,onComplete:e=>{R.current=!0,Ce(e??`default`),B(null),i(!1),w(`localSettings`,{outputStyle:e}),A(`tengu_output_style_changed`,{style:e??`default`,source:`config_panel`,settings_source:`localSettings`})},onCancel:()=>{B(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):z===`Language`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(wn,{initialLanguage:T,onComplete:e=>{R.current=!0,Ne(e),B(null),i(!1),w(`userSettings`,{language:e}),A(`tengu_language_changed`,{language:e??`default`,source:`config_panel`})},onCancel:()=>{B(null),i(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]}):z===`EnableAutoUpdates`?(0,Z.jsx)(ae,{title:`Enable Auto-Updates`,onCancel:()=>{B(null),i(!1)},hideBorder:!0,hideInputGuide:!0,children:H?.type===`config`?(0,Z.jsx)(St,{options:[{label:`Enable with latest channel`,value:`latest`},{label:`Enable with stable channel`,value:`stable`}],onChange:e=>{R.current=!0,B(null),i(!1),x(e=>({...e,autoUpdates:!0})),_({...C(),autoUpdates:!0}),w(`userSettings`,{autoUpdatesChannel:e,minimumVersion:void 0}),b(t=>({...t,autoUpdatesChannel:e,minimumVersion:void 0})),A(`tengu_autoupdate_enabled`,{channel:e})}}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{children:H?.type===`env`?`Auto-updates are controlled by an environment variable and cannot be changed here.`:`Auto-updates are disabled in development builds.`}),H?.type===`env`&&(0,Z.jsxs)(f,{dimColor:!0,children:[`Unset `,H.envVar,` to re-enable auto-updates.`]})]})}):z===`ChannelDowngrade`?(0,Z.jsx)(hn,{currentVersion:`2.6.6`,onChoice:e=>{if(B(null),i(!1),e===`cancel`)return;R.current=!0;let t={autoUpdatesChannel:`stable`};e===`stay`&&(t.minimumVersion=`2.6.6`),w(`userSettings`,t),b(e=>({...e,...t})),A(`tengu_autoupdate_channel_changed`,{channel:`stable`,minimum_version_set:e===`stay`})}}):(0,Z.jsxs)(g,{flexDirection:`column`,gap:1,marginY:se?void 0:1,children:[(0,Z.jsx)(re,{query:V,isFocused:k&&!d,isTerminalFocused:Ve,cursorOffset:xt,placeholder:`Search settings…`}),(0,Z.jsx)(g,{flexDirection:`column`,children:W.length===0?(0,Z.jsxs)(f,{dimColor:!0,italic:!0,children:[`No settings match "`,V,`"`]}):(0,Z.jsxs)(Z.Fragment,{children:[D>0&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowUp,` `,D,` more above`]}),W.slice(D,D+M).map((e,t)=>{let n=D+t===E&&!d&&!k;return(0,Z.jsx)(Y.Fragment,{children:(0,Z.jsxs)(g,{width:`100%`,children:[(0,Z.jsx)(g,{width:44,children:(0,Z.jsxs)(f,{color:n?`suggestion`:void 0,children:[n?s.pointer:` `,` `,e.label]})}),(0,Z.jsx)(g,{flexGrow:1,children:e.type===`boolean`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()}),gt&&e.id===`thinkingEnabled`&&(0,Z.jsxs)(f,{color:`warning`,children:[` `,`Changing thinking mode mid-conversation will increase latency and may reduce quality.`]})]}):e.id===`theme`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:An[e.value.toString()]??e.value.toString()}):e.id===`notifChannel`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:(0,Z.jsx)(kn,{value:e.value.toString()})}):e.id===`defaultPermissionMode`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:Se(e.value)}):e.id===`autoUpdatesChannel`&&H?(0,Z.jsxs)(g,{flexDirection:`column`,children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:`disabled`}),(0,Z.jsxs)(f,{dimColor:!0,children:[`(`,Ie(H),`)`]})]}):(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()})})]})},e.id)}),D+M<W.length&&(0,Z.jsxs)(f,{dimColor:!0,children:[s.arrowDown,` `,W.length-D-M,` more below`]})]})}),d?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(p,{shortcut:`←/→ tab`,action:`switch`}),(0,Z.jsx)(p,{shortcut:`↓`,action:`return`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`close`})]})}):k?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(f,{children:`Type to filter`}),(0,Z.jsx)(p,{shortcut:`Enter/↓`,action:`select`}),(0,Z.jsx)(p,{shortcut:`↑`,action:`tabs`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`clear`})]})}):(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(m,{children:[(0,Z.jsx)(L,{action:`select:accept`,context:`Settings`,fallback:`Space`,description:`change`}),(0,Z.jsx)(L,{action:`settings:close`,context:`Settings`,fallback:`Enter`,description:`save`}),(0,Z.jsx)(L,{action:`settings:search`,context:`Settings`,fallback:`/`,description:`search`}),(0,Z.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]})})}function On(e){return e===void 0?xe(mt()):e===null?`Default (leader's model)`:xe(e)}function kn({value:e}){switch(e){case`auto`:return`Auto`;case`iterm2`:return(0,Z.jsxs)(f,{children:[`iTerm2 `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 9)`})]});case`terminal_bell`:return(0,Z.jsxs)(f,{children:[`Terminal Bell `,(0,Z.jsx)(f,{dimColor:!0,children:`(\\a)`})]});case`kitty`:return(0,Z.jsxs)(f,{children:[`Kitty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 99)`})]});case`ghostty`:return(0,Z.jsxs)(f,{children:[`Ghostty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 777)`})]});case`iterm2_with_bell`:return`iTerm2 w/ Bell`;case`notifications_disabled`:return`Disabled`;default:return e}}var Y,X,Z,An,jn=t((()=>{h(),Y=n(d(),1),X=n(d(),1),U(),o(),b(),Ee(),u(),ve(),Dt(),He(),k(),Lt(),Ut(),ct(),Gt(),S(),Jt(),Yt(),_n(),Et(),Cn(),En(),et(),R(),G(),Zt(),yt(),Ne(),y(),Ct(),i(),Ce(),Pe(),Rt(),it(),$t(),Mt(),Le(),Tt(),Ge(),Z=_(),An={auto:`Auto (match terminal)`,dark:`Dark mode`,light:`Light mode`,"dark-daltonized":`Dark mode (colorblind-friendly)`,"light-daltonized":`Light mode (colorblind-friendly)`,"dark-ansi":`Dark mode (ANSI colors only)`,"light-ansi":`Light mode (ANSI colors only)`}}));function Mn({title:e,limit:t,maxWidth:n,showTimeInReset:r=!0,extraSubtext:i}){let{utilization:a,resets_at:o}=t;if(a===null)return null;let s=`${Math.floor(a)}% used`,c;return o&&(c=`Resets ${M(o,!0,r)}`),i&&(c=c?`${i} · ${c}`:i),n>=62?(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:e}),(0,Q.jsxs)(g,{flexDirection:`row`,gap:1,children:[(0,Q.jsx)(ie,{ratio:a/100,width:50,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]}),c&&(0,Q.jsx)(f,{dimColor:!0,children:c})]}):(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsxs)(f,{children:[(0,Q.jsx)(f,{bold:!0,children:e}),c&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(f,{children:` `}),(0,Q.jsxs)(f,{dimColor:!0,children:[`· `,c]})]})]}),(0,Q.jsx)(ie,{ratio:a/100,width:n,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]})}function Nn(){let[e,t]=(0,In.useState)(null),[n,r]=(0,In.useState)(null),[i,a]=(0,In.useState)(!0),{columns:o}=ee(),s=o-2,c=Math.min(s,80),l=Fn.useCallback(async()=>{a(!0),r(null);try{t(await tn())}catch(e){Ue(e);let t=e,n=t.response?.data?D(t.response.data):void 0;r(n?`Failed to load usage data: ${n}`:`Failed to load usage data`)}finally{a(!1)}},[]);if((0,In.useEffect)(()=>{l()},[l]),de(`settings:retry`,()=>{l()},{context:`Settings`,isActive:!!n&&!i}),n)return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,Q.jsxs)(f,{color:`error`,children:[`Error: `,n]}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsxs)(m,{children:[(0,Q.jsx)(L,{action:`settings:retry`,context:`Settings`,fallback:`r`,description:`retry`}),(0,Q.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]});if(!e)return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,children:[(0,Q.jsx)(f,{dimColor:!0,children:`Loading usage data…`}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]});let u=E(),d=u===`max`||u===`team`||u===null,te=[{title:`Current session`,limit:e.five_hour},{title:`Current week (all models)`,limit:e.seven_day},...d?[{title:`Current week (Sonnet only)`,limit:e.seven_day_sonnet}]:[]];return(0,Q.jsxs)(g,{flexDirection:`column`,gap:1,width:`100%`,children:[te.some(({limit:e})=>e)||(0,Q.jsx)(f,{dimColor:!0,children:`/usage is only available for subscription plans.`}),te.map(({title:e,limit:t})=>t&&(0,Q.jsx)(Mn,{title:e,limit:t,maxWidth:c},e)),e.extra_usage&&(0,Q.jsx)(Pn,{extraUsage:e.extra_usage,maxWidth:c}),nn()&&(0,Q.jsx)(an,{maxWidth:c}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(L,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function Pn({extraUsage:e,maxWidth:t}){let n=E();if(!(n===`pro`||n===`max`))return!1;if(!e.is_enabled)return st.isEnabled()?(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Ln}),(0,Q.jsx)(f,{dimColor:!0,children:`Extra usage not enabled · /extra-usage to enable`})]}):null;if(e.monthly_limit===null)return(0,Q.jsxs)(g,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Ln}),(0,Q.jsx)(f,{dimColor:!0,children:`Unlimited`})]});if(typeof e.used_credits!=`number`||typeof e.utilization!=`number`)return null;let r=wt(e.used_credits/100,2),i=wt(e.monthly_limit/100,2),a=new Date,o=new Date(a.getFullYear(),a.getMonth()+1,1);return(0,Q.jsx)(Mn,{title:Ln,limit:{utilization:e.utilization,resets_at:o.toISOString()},showTimeInReset:!1,extraSubtext:`${r} / ${i} spent`,maxWidth:t})}var Fn,In,Q,Ln,Rn=t((()=>{Fn=n(d(),1),In=n(d(),1),ut(),z(),T(),Mt(),h(),U(),en(),N(),He(),O(),R(),rn(),Q=_(),Ln=`Extra usage`}));function zn({onClose:e,context:t,defaultTab:n}){let[r,i]=(0,Bn.useState)(n),[a,o]=(0,Bn.useState)(!1),[s,c]=(0,Bn.useState)(!1),l=Ht(),{rows:u}=Vt(ee()),d=l?u+1:Math.max(15,Math.min(Math.floor(u*.8),30)),[te]=(0,Bn.useState)(()=>cn().catch(()=>[]));return Ft(),de(`confirm:no`,()=>{a||e(`Status dialog dismissed`,{display:`system`})},{context:`Settings`,isActive:!a&&!(r===`Config`&&s)}),(0,$.jsx)(le,{color:`permission`,children:(0,$.jsx)(ue,{color:`permission`,selectedTab:r,onTabChange:i,hidden:a,initialHeaderFocused:n!==`Config`,contentHeight:a||l?void 0:d,children:[(0,$.jsx)(se,{title:`Status`,children:(0,$.jsx)(un,{context:t,diagnosticsPromise:te})},`status`),(0,$.jsx)(se,{title:`Config`,children:(0,$.jsx)(Bn.Suspense,{fallback:null,children:(0,$.jsx)(Dn,{context:t,onClose:e,setTabsHidden:o,onIsSearchModeChange:c,contentHeight:d})})},`config`),(0,$.jsx)(se,{title:`Usage`,children:(0,$.jsx)(Nn,{})},`usage`)]})})}var Bn,$,Vn=t((()=>{d(),Bn=n(d(),1),U(),W(),Mt(),G(),h(),mn(),jn(),Rn(),$=_()}));export{Vn as n,zn as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{B as r,Rn as i,b as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{AS as l,av as u,jS as d,nv as f,rv as p,sv as m}from"./loadAgentsDir-DI1a76pd.js";t();var h=e(i(),1);o(),d(),p();var g=c(),_=[`◐`,`◓`,`◑`,`◒`],v=[{key:`validating`,label:`Validating session`},{key:`fetching_logs`,label:`Fetching session logs`},{key:`fetching_branch`,label:`Getting branch info`},{key:`checking_out`,label:`Checking out branch`}];function y({currentStep:e,sessionId:t}){let[i,o]=r(100),c=Math.floor(o/100)%_.length,l=v.findIndex(t=>t.key===e);return(0,g.jsxs)(s,{ref:i,flexDirection:`column`,paddingX:1,paddingY:1,children:[(0,g.jsx)(s,{marginBottom:1,children:(0,g.jsxs)(a,{bold:!0,color:`claude`,children:[_[c],` Teleporting session…`]})}),t&&(0,g.jsx)(s,{marginBottom:1,children:(0,g.jsx)(a,{dimColor:!0,children:t})}),(0,g.jsx)(s,{flexDirection:`column`,marginLeft:2,children:v.map((e,t)=>{let r=t<l,i=t===l,o=t>l,u,d;return r?(u=n.tick,d=`green`):i?(u=_[c],d=`claude`):(u=n.circle,d=void 0),(0,g.jsxs)(s,{flexDirection:`row`,children:[(0,g.jsx)(s,{width:2,children:(0,g.jsx)(a,{color:d,dimColor:o,children:u})}),(0,g.jsx)(a,{dimColor:o,bold:i,children:e.label})]},e.key)})})]})}async function b(e,t){let n=()=>{};function r(){let[e,r]=(0,h.useState)(`validating`);return n=r,(0,g.jsx)(y,{currentStep:e,sessionId:t})}e.render((0,g.jsx)(l,{children:(0,g.jsx)(r,{})}));let i=await m(t,n);n(`checking_out`);let{branchName:a,branchError:o}=await f(i.branch);return{messages:u(i.log,o),branchName:a}}export{b as teleportWithProgress};
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{B as r,Rn as i,b as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{MS as l,NS as u,av as d,iv as f,lv as p,sv as m}from"./loadAgentsDir-D7kapZB5.js";t();var h=e(i(),1);o(),u(),d();var g=c(),_=[`◐`,`◓`,`◑`,`◒`],v=[{key:`validating`,label:`Validating session`},{key:`fetching_logs`,label:`Fetching session logs`},{key:`fetching_branch`,label:`Getting branch info`},{key:`checking_out`,label:`Checking out branch`}];function y({currentStep:e,sessionId:t}){let[i,o]=r(100),c=Math.floor(o/100)%_.length,l=v.findIndex(t=>t.key===e);return(0,g.jsxs)(s,{ref:i,flexDirection:`column`,paddingX:1,paddingY:1,children:[(0,g.jsx)(s,{marginBottom:1,children:(0,g.jsxs)(a,{bold:!0,color:`claude`,children:[_[c],` Teleporting session…`]})}),t&&(0,g.jsx)(s,{marginBottom:1,children:(0,g.jsx)(a,{dimColor:!0,children:t})}),(0,g.jsx)(s,{flexDirection:`column`,marginLeft:2,children:v.map((e,t)=>{let r=t<l,i=t===l,o=t>l,u,d;return r?(u=n.tick,d=`green`):i?(u=_[c],d=`claude`):(u=n.circle,d=void 0),(0,g.jsxs)(s,{flexDirection:`row`,children:[(0,g.jsx)(s,{width:2,children:(0,g.jsx)(a,{color:d,dimColor:o,children:u})}),(0,g.jsx)(a,{dimColor:o,bold:i,children:e.label})]},e.key)})})]})}async function b(e,t){let n=()=>{};function r(){let[e,r]=(0,h.useState)(`validating`);return n=r,(0,g.jsx)(y,{currentStep:e,sessionId:t})}e.render((0,g.jsx)(l,{children:(0,g.jsx)(r,{})}));let i=await p(t,n);n(`checking_out`);let{branchName:a,branchError:o}=await f(i.branch);return{messages:m(i.log,o),branchName:a}}export{b as teleportWithProgress};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,f as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Zc as s,el as c}from"./paths-1ngPRtu3.js";import{gy as l,kx as u,uy as d,vy as f}from"./loadAgentsDir-D7kapZB5.js";import{a as p,r as m}from"./githubRepoPathMapping-DCJLSTLl.js";var h=e(t(),1);i(),c(),d(),f();var g=o();function _({targetRepo:e,initialPaths:t,onSelectPath:i,onCancel:o}){let[c,d]=(0,h.useState)(t),[f,_]=(0,h.useState)(null),[v,y]=(0,h.useState)(!1),b=(0,h.useCallback)(async t=>{if(t===`cancel`){o();return}if(y(!0),_(null),await p(t,e)){i(t);return}m(e,t),d(c.filter(e=>e!==t)),y(!1),_(`${s(t)} no longer contains the correct repository. Select another path.`)},[e,c,i,o]),x=[...c.map(e=>({label:(0,g.jsxs)(n,{children:[`Use `,(0,g.jsx)(n,{bold:!0,children:s(e)})]}),value:e})),{label:`Cancel`,value:`cancel`}];return(0,g.jsx)(r,{title:`Teleport to Repo`,onCancel:o,color:`background`,children:c.length>0?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(a,{flexDirection:`column`,gap:1,children:[f&&(0,g.jsx)(n,{color:`error`,children:f}),(0,g.jsxs)(n,{children:[`Open Claude Code in `,(0,g.jsx)(n,{bold:!0,children:e}),`:`]})]}),v?(0,g.jsxs)(a,{children:[(0,g.jsx)(l,{}),(0,g.jsx)(n,{children:` Validating repository…`})]}):(0,g.jsx)(u,{options:x,onChange:e=>void b(e)})]}):(0,g.jsxs)(a,{flexDirection:`column`,gap:1,children:[f&&(0,g.jsx)(n,{color:`error`,children:f}),(0,g.jsxs)(n,{dimColor:!0,children:[`Run claude --teleport from a checkout of `,e]})]})})}export{_ as TeleportRepoMismatchDialog};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-DR8-3Aex.js";import{F as t,Rn as n,b as r,g as i,h as a,t as o,tt as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{Er as d,cn as f}from"./state-sIHsFpDu.js";import{F as p,L as m,V as h,d as g,s as _}from"./debug-UI3T040K.js";import{n as v,r as y}from"./analytics-DqMQntaB.js";import{h as b,x}from"./startupProfiler-DnXZaX4A.js";import{Dx as S,JS as C,Lw as w,Xw as T,YS as E,Zw as D,cy as O,gy as k,my as A,oy as j,rv as M,sv as N,sy as P}from"./loadAgentsDir-DI1a76pd.js";import{a as F,n as I}from"./detectRepository-CBk3S2zv.js";import{n as L,o as R}from"./api-CGOR_Xfl.js";import{t as z}from"./useKeybinding-FsOnjW6T.js";var B=e(n(),1);f(),v(),h(),M();function V(e){let[t,n]=(0,B.useState)(!1),[r,i]=(0,B.useState)(null),[a,o]=(0,B.useState)(null);return{resumeSession:(0,B.useCallback)(async t=>{n(!0),i(null),o(t),y(`tengu_teleport_resume_session`,{source:e,session_id:t.id});try{let e=await N(t.id);return d({sessionId:t.id}),n(!1),e}catch(e){return i({message:e instanceof p?e.message:m(e),formattedMessage:e instanceof p?e.formattedMessage:void 0,isOperationError:e instanceof p}),n(!1),null}},[e]),isResuming:t,error:r,selectedSession:a,clearError:(0,B.useCallback)(()=>{i(null)},[])}}w(),R(),o(),z(),T(),_(),F(),x(),E(),O(),k(),P();var H=u(),U=`Updated`,W=` `;function G({onSelect:e,onCancel:n,isEmbedded:o=!1}){let{rows:u}=t(),[d,f]=(0,B.useState)([]),[p,m]=(0,B.useState)(null),[h,_]=(0,B.useState)(!0),[v,y]=(0,B.useState)(null),[x,w]=(0,B.useState)(!1),[T,E]=(0,B.useState)(!1),[O,k]=(0,B.useState)(1),M=D(`confirm:no`,`Confirmation`,`Esc`),N=(0,B.useCallback)(async()=>{try{_(!0),y(null);let e=await I();m(e),g(`Current repository: ${e||`not detected`}`);let t=await L(),n=t;e&&(n=t.filter(t=>t.repo?`${t.repo.owner.login}/${t.repo.name}`===e:!1),g(`Filtered ${n.length} sessions for repo ${e} from ${t.length} total`)),f([...n].sort((e,t)=>{let n=new Date(e.updated_at);return new Date(t.updated_at).getTime()-n.getTime()}))}catch(e){let t=e instanceof Error?e.message:String(e);g(`Error loading code sessions: ${t}`),y(K(t))}finally{_(!1),w(!1)}},[]),P=()=>{w(!0),N()};s(`confirm:no`,n,{context:`Confirmation`}),l((e,t)=>{if(t.ctrl&&e===`c`){n();return}if(t.ctrl&&e===`r`&&v){P();return}if(v!==null&&t.return){n();return}});let F=(0,B.useCallback)(()=>{E(!0),N()},[E,N]);if(!T)return(0,H.jsx)(j,{onComplete:F});if(h)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(c,{flexDirection:`row`,children:[(0,H.jsx)(A,{}),(0,H.jsx)(r,{bold:!0,children:`Loading Claude Code sessions…`})]}),(0,H.jsx)(r,{dimColor:!0,children:x?`Retrying…`:`Fetching your Claude Code sessions…`})]});if(v)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsx)(r,{bold:!0,color:`error`,children:`Error loading Claude Code sessions`}),q(v),(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:`Ctrl+R`}),` to retry · Press `,(0,H.jsx)(r,{bold:!0,children:M}),` to cancel`]})]});if(d.length===0)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(r,{bold:!0,children:[`No Claude Code sessions found`,p&&(0,H.jsxs)(r,{children:[` for `,p]})]}),(0,H.jsx)(c,{marginTop:1,children:(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:M}),` to cancel`]})})]});let R=d.map(e=>({...e,timeString:b(new Date(e.updated_at))})),z=Math.max(7,...R.map(e=>e.timeString.length)),V=R.map(({timeString:e,title:t,id:n})=>({label:`${e.padEnd(z,` `)} ${t}`,value:n})),G=Math.max(1,o?Math.min(d.length,5,u-6-7):Math.min(d.length,u-1-7));return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,height:G+7,children:[(0,H.jsxs)(r,{bold:!0,children:[`Select a session to resume`,d.length>G&&(0,H.jsxs)(r,{dimColor:!0,children:[` `,`(`,O,` of `,d.length,`)`]}),p&&(0,H.jsxs)(r,{dimColor:!0,children:[` (`,p,`)`]}),`:`]}),(0,H.jsxs)(c,{flexDirection:`column`,marginTop:1,flexGrow:1,children:[(0,H.jsx)(c,{marginLeft:2,children:(0,H.jsxs)(r,{bold:!0,children:[U.padEnd(z,` `),W,`Session Title`]})}),(0,H.jsx)(S,{visibleOptionCount:G,options:V,onChange:t=>{let n=d.find(e=>e.id===t);n&&e(n)},onFocus:e=>{let t=V.findIndex(t=>t.value===e);t>=0&&k(t+1)}})]}),(0,H.jsx)(c,{flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:(0,H.jsxs)(a,{children:[(0,H.jsx)(i,{shortcut:`↑/↓`,action:`select`}),(0,H.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,H.jsx)(C,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}function K(e){let t=e.toLowerCase();return t.includes(`fetch`)||t.includes(`network`)||t.includes(`timeout`)?`network`:t.includes(`auth`)||t.includes(`token`)||t.includes(`permission`)||t.includes(`oauth`)||t.includes(`not authenticated`)||t.includes(`/login`)||t.includes(`console account`)||t.includes(`403`)?`auth`:t.includes(`api`)||t.includes(`rate limit`)||t.includes(`500`)||t.includes(`529`)?`api`:`other`}function q(e){switch(e){case`network`:return(0,H.jsx)(c,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Check your internet connection`})});case`auth`:return(0,H.jsxs)(c,{marginY:1,flexDirection:`column`,children:[(0,H.jsx)(r,{dimColor:!0,children:`Teleport requires a Claude account`}),(0,H.jsxs)(r,{dimColor:!0,children:[`Run `,(0,H.jsx)(r,{bold:!0,children:`/login`}),` and select "Claude account with subscription"`]})]});case`api`:return(0,H.jsx)(c,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude encountered an error`})});case`other`:return(0,H.jsx)(c,{marginY:1,flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude Code encountered an error`})})}}v(),o(),z(),k();function J({onComplete:e,onCancel:t,onError:n,isEmbedded:i=!1,source:a}){let{resumeSession:o,isResuming:l,error:u,selectedSession:d}=V(a);(0,B.useEffect)(()=>{y(`tengu_teleport_started`,{source:a})},[a]);let f=async t=>{let r=await o(t);r?e(r):u&&n&&n(u.message,u.formattedMessage)},p=()=>{y(`tengu_teleport_cancelled`,{}),t()};return s(`app:interrupt`,p,{context:`Global`,isActive:!!u&&!n}),l&&d?(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(c,{flexDirection:`row`,children:[(0,H.jsx)(A,{}),(0,H.jsx)(r,{bold:!0,children:`Resuming session…`})]}),(0,H.jsxs)(r,{dimColor:!0,children:[`Loading "`,d.title,`"…`]})]}):u&&!n?(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsx)(r,{bold:!0,color:`error`,children:`Failed to resume session`}),(0,H.jsx)(r,{dimColor:!0,children:u.message}),(0,H.jsx)(c,{marginTop:1,children:(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:`Esc`}),` to cancel`]})})]}):(0,H.jsx)(G,{onSelect:f,onCancel:p,isEmbedded:i})}export{J as TeleportResumeWrapper};
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{F as t,Rn as n,b as r,g as i,h as a,t as o,tt as s,x as c,xt as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{Er as d,cn as f}from"./state-sIHsFpDu.js";import{F as p,L as m,V as h,d as g,s as _}from"./debug-UI3T040K.js";import{n as v,r as y}from"./analytics-DqMQntaB.js";import{h as b,x}from"./startupProfiler-DnXZaX4A.js";import{$w as S,Qw as C,XS as w,ZS as T,av as E,cy as D,gy as O,kx as k,lv as A,ly as j,uy as M,vy as N,zw as P}from"./loadAgentsDir-D7kapZB5.js";import{a as F,n as I}from"./detectRepository-CBk3S2zv.js";import{n as L,o as R}from"./api-D_t0nHsS.js";import{t as z}from"./useKeybinding-FsOnjW6T.js";var B=e(n(),1);f(),v(),h(),E();function V(e){let[t,n]=(0,B.useState)(!1),[r,i]=(0,B.useState)(null),[a,o]=(0,B.useState)(null);return{resumeSession:(0,B.useCallback)(async t=>{n(!0),i(null),o(t),y(`tengu_teleport_resume_session`,{source:e,session_id:t.id});try{let e=await A(t.id);return d({sessionId:t.id}),n(!1),e}catch(e){return i({message:e instanceof p?e.message:m(e),formattedMessage:e instanceof p?e.formattedMessage:void 0,isOperationError:e instanceof p}),n(!1),null}},[e]),isResuming:t,error:r,selectedSession:a,clearError:(0,B.useCallback)(()=>{i(null)},[])}}P(),R(),o(),z(),C(),_(),F(),x(),T(),M(),N(),j();var H=u(),U=`Updated`,W=` `;function G({onSelect:e,onCancel:n,isEmbedded:o=!1}){let{rows:u}=t(),[d,f]=(0,B.useState)([]),[p,m]=(0,B.useState)(null),[h,_]=(0,B.useState)(!0),[v,y]=(0,B.useState)(null),[x,C]=(0,B.useState)(!1),[T,E]=(0,B.useState)(!1),[A,j]=(0,B.useState)(1),M=S(`confirm:no`,`Confirmation`,`Esc`),N=(0,B.useCallback)(async()=>{try{_(!0),y(null);let e=await I();m(e),g(`Current repository: ${e||`not detected`}`);let t=await L(),n=t;e&&(n=t.filter(t=>t.repo?`${t.repo.owner.login}/${t.repo.name}`===e:!1),g(`Filtered ${n.length} sessions for repo ${e} from ${t.length} total`)),f([...n].sort((e,t)=>{let n=new Date(e.updated_at);return new Date(t.updated_at).getTime()-n.getTime()}))}catch(e){let t=e instanceof Error?e.message:String(e);g(`Error loading code sessions: ${t}`),y(K(t))}finally{_(!1),C(!1)}},[]),P=()=>{C(!0),N()};s(`confirm:no`,n,{context:`Confirmation`}),l((e,t)=>{if(t.ctrl&&e===`c`){n();return}if(t.ctrl&&e===`r`&&v){P();return}if(v!==null&&t.return){n();return}});let F=(0,B.useCallback)(()=>{E(!0),N()},[E,N]);if(!T)return(0,H.jsx)(D,{onComplete:F});if(h)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(c,{flexDirection:`row`,children:[(0,H.jsx)(O,{}),(0,H.jsx)(r,{bold:!0,children:`Loading Claude Code sessions…`})]}),(0,H.jsx)(r,{dimColor:!0,children:x?`Retrying…`:`Fetching your Claude Code sessions…`})]});if(v)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsx)(r,{bold:!0,color:`error`,children:`Error loading Claude Code sessions`}),q(v),(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:`Ctrl+R`}),` to retry · Press `,(0,H.jsx)(r,{bold:!0,children:M}),` to cancel`]})]});if(d.length===0)return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(r,{bold:!0,children:[`No Claude Code sessions found`,p&&(0,H.jsxs)(r,{children:[` for `,p]})]}),(0,H.jsx)(c,{marginTop:1,children:(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:M}),` to cancel`]})})]});let R=d.map(e=>({...e,timeString:b(new Date(e.updated_at))})),z=Math.max(7,...R.map(e=>e.timeString.length)),V=R.map(({timeString:e,title:t,id:n})=>({label:`${e.padEnd(z,` `)} ${t}`,value:n})),G=Math.max(1,o?Math.min(d.length,5,u-6-7):Math.min(d.length,u-1-7));return(0,H.jsxs)(c,{flexDirection:`column`,padding:1,height:G+7,children:[(0,H.jsxs)(r,{bold:!0,children:[`Select a session to resume`,d.length>G&&(0,H.jsxs)(r,{dimColor:!0,children:[` `,`(`,A,` of `,d.length,`)`]}),p&&(0,H.jsxs)(r,{dimColor:!0,children:[` (`,p,`)`]}),`:`]}),(0,H.jsxs)(c,{flexDirection:`column`,marginTop:1,flexGrow:1,children:[(0,H.jsx)(c,{marginLeft:2,children:(0,H.jsxs)(r,{bold:!0,children:[U.padEnd(z,` `),W,`Session Title`]})}),(0,H.jsx)(k,{visibleOptionCount:G,options:V,onChange:t=>{let n=d.find(e=>e.id===t);n&&e(n)},onFocus:e=>{let t=V.findIndex(t=>t.value===e);t>=0&&j(t+1)}})]}),(0,H.jsx)(c,{flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:(0,H.jsxs)(a,{children:[(0,H.jsx)(i,{shortcut:`↑/↓`,action:`select`}),(0,H.jsx)(i,{shortcut:`Enter`,action:`confirm`}),(0,H.jsx)(w,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}function K(e){let t=e.toLowerCase();return t.includes(`fetch`)||t.includes(`network`)||t.includes(`timeout`)?`network`:t.includes(`auth`)||t.includes(`token`)||t.includes(`permission`)||t.includes(`oauth`)||t.includes(`not authenticated`)||t.includes(`/login`)||t.includes(`console account`)||t.includes(`403`)?`auth`:t.includes(`api`)||t.includes(`rate limit`)||t.includes(`500`)||t.includes(`529`)?`api`:`other`}function q(e){switch(e){case`network`:return(0,H.jsx)(c,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Check your internet connection`})});case`auth`:return(0,H.jsxs)(c,{marginY:1,flexDirection:`column`,children:[(0,H.jsx)(r,{dimColor:!0,children:`Teleport requires a Claude account`}),(0,H.jsxs)(r,{dimColor:!0,children:[`Run `,(0,H.jsx)(r,{bold:!0,children:`/login`}),` and select "Claude account with subscription"`]})]});case`api`:return(0,H.jsx)(c,{marginY:1,flexDirection:`column`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude encountered an error`})});case`other`:return(0,H.jsx)(c,{marginY:1,flexDirection:`row`,children:(0,H.jsx)(r,{dimColor:!0,children:`Sorry, Claude Code encountered an error`})})}}v(),o(),z(),N();function J({onComplete:e,onCancel:t,onError:n,isEmbedded:i=!1,source:a}){let{resumeSession:o,isResuming:l,error:u,selectedSession:d}=V(a);(0,B.useEffect)(()=>{y(`tengu_teleport_started`,{source:a})},[a]);let f=async t=>{let r=await o(t);r?e(r):u&&n&&n(u.message,u.formattedMessage)},p=()=>{y(`tengu_teleport_cancelled`,{}),t()};return s(`app:interrupt`,p,{context:`Global`,isActive:!!u&&!n}),l&&d?(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsxs)(c,{flexDirection:`row`,children:[(0,H.jsx)(O,{}),(0,H.jsx)(r,{bold:!0,children:`Resuming session…`})]}),(0,H.jsxs)(r,{dimColor:!0,children:[`Loading "`,d.title,`"…`]})]}):u&&!n?(0,H.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,H.jsx)(r,{bold:!0,color:`error`,children:`Failed to resume session`}),(0,H.jsx)(r,{dimColor:!0,children:u.message}),(0,H.jsx)(c,{marginTop:1,children:(0,H.jsxs)(r,{dimColor:!0,children:[`Press `,(0,H.jsx)(r,{bold:!0,children:`Esc`}),` to cancel`]})})]}):(0,H.jsx)(G,{onSelect:f,onCancel:p,isEmbedded:i})}export{J as TeleportResumeWrapper};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,F as n,Rn as r,T as i,b as a,g as o,h as s,ot as c,t as l,tt as u,w as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{lo as m,oo as h}from"./paths-BBvuDQl9.js";import{$p as g,Dx as _,GT as v,Lw as y,MS as b,PS as x,Qw as S,Xw as C,Zw as w,am as T,cy as E,em as D,im as O,jS as k,qT as A,rm as j}from"./loadAgentsDir-DI1a76pd.js";import{t as M}from"./useKeybinding-FsOnjW6T.js";import{l as N,u as P}from"./referral-DeDr9zAE.js";function F({onThemeSelect:e,showIntroText:r=!1,helpText:l=``,showHelpTextBelow:p=!1,hideEscToCancel:h=!1,skipExitHandling:y=!1,onCancel:S}){let[C]=i(),T=t(),{columns:E}=n(),D=j(),k=D===null?O(C):null,{setPreviewTheme:A,savePreview:M,cancelPreview:N}=d(),F=b(e=>e.settings.syntaxHighlightingDisabled)??!1,L=x();c(`ThemePicker`);let R=w(`theme:toggleSyntaxHighlighting`,`ThemePicker`,`ctrl+t`);u(`theme:toggleSyntaxHighlighting`,()=>{if(D===null){let e=!F;m(`userSettings`,{syntaxHighlightingDisabled:e}),L(t=>({...t,settings:{...t.settings,syntaxHighlightingDisabled:e}}))}},{context:`ThemePicker`});let z=P(y?()=>{}:void 0),B=[...[],{label:`Dark mode`,value:`dark`},{label:`Light mode`,value:`light`},{label:`Dark mode (colorblind-friendly)`,value:`dark-daltonized`},{label:`Light mode (colorblind-friendly)`,value:`light-daltonized`},{label:`Dark mode (ANSI colors only)`,value:`dark-ansi`},{label:`Light mode (ANSI colors only)`,value:`light-ansi`}],V=(0,I.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,I.jsxs)(f,{flexDirection:`column`,gap:1,children:[r?(0,I.jsx)(a,{children:`Let's get started.`}):(0,I.jsx)(a,{bold:!0,color:`permission`,children:`Theme`}),(0,I.jsxs)(f,{flexDirection:`column`,children:[(0,I.jsx)(a,{bold:!0,children:`Choose the text style that looks best with your terminal`}),l&&!p&&(0,I.jsx)(a,{dimColor:!0,children:l})]}),(0,I.jsx)(_,{options:B,onFocus:e=>{A(e)},onChange:t=>{M(),e(t)},onCancel:y?()=>{N(),S?.()}:async()=>{N(),await v(0)},visibleOptionCount:B.length,defaultValue:T,defaultFocusValue:T})]}),(0,I.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,I.jsx)(f,{flexDirection:`column`,borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:`dashed`,borderColor:`subtle`,children:(0,I.jsx)(g,{patch:{oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[` function greet() {`,`- console.log("Hello, World!");`,`+ console.log("Hello, Claude!");`,` }`]},dim:!1,filePath:`demo.js`,firstLine:null,width:E})}),(0,I.jsxs)(a,{dimColor:!0,children:[` `,D===`env`?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:F?`Syntax highlighting disabled (${R} to enable)`:k?`Syntax theme: ${k.theme}${k.source?` (from ${k.source})`:``} (${R} to disable)`:`Syntax highlighting enabled (${R} to disable)`]})]})]});return r?V:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{flexDirection:`column`,children:V}),(0,I.jsxs)(f,{marginTop:1,children:[p&&l&&(0,I.jsx)(f,{marginLeft:3,children:(0,I.jsx)(a,{dimColor:!0,children:l})}),!h&&(0,I.jsx)(f,{children:(0,I.jsx)(a,{dimColor:!0,italic:!0,children:z.pending?(0,I.jsxs)(I.Fragment,{children:[`Press `,z.keyName,` again to exit`]}):(0,I.jsxs)(s,{children:[(0,I.jsx)(o,{shortcut:`Enter`,action:`select`}),(0,I.jsx)(o,{shortcut:`Esc`,action:`cancel`})]})})})]})]})}var I,L=e((()=>{r(),N(),y(),l(),S(),M(),C(),k(),A(),h(),E(),T(),D(),I=p()}));export{L as n,F as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,F as n,Rn as r,T as i,b as a,g as o,h as s,ot as c,t as l,tt as u,w as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{lo as m,oo as h}from"./paths-1ngPRtu3.js";import{$p as g,$w as _,IS as v,NS as y,PS as b,Qp as x,Qw as S,YT as C,eT as w,im as T,kx as E,nm as D,qT as O,rm as k,uy as A,zw as j}from"./loadAgentsDir-D7kapZB5.js";import{t as M}from"./useKeybinding-FsOnjW6T.js";import{l as N,u as P}from"./referral-BKeCKnOJ.js";function F({onThemeSelect:e,showIntroText:r=!1,helpText:l=``,showHelpTextBelow:p=!1,hideEscToCancel:h=!1,skipExitHandling:g=!1,onCancel:y}){let[S]=i(),C=t(),{columns:w}=n(),T=D(),A=T===null?k(S):null,{setPreviewTheme:j,savePreview:M,cancelPreview:N}=d(),F=b(e=>e.settings.syntaxHighlightingDisabled)??!1,L=v();c(`ThemePicker`);let R=_(`theme:toggleSyntaxHighlighting`,`ThemePicker`,`ctrl+t`);u(`theme:toggleSyntaxHighlighting`,()=>{if(T===null){let e=!F;m(`userSettings`,{syntaxHighlightingDisabled:e}),L(t=>({...t,settings:{...t.settings,syntaxHighlightingDisabled:e}}))}},{context:`ThemePicker`});let z=P(g?()=>{}:void 0),B=[...[],{label:`Dark mode`,value:`dark`},{label:`Light mode`,value:`light`},{label:`Dark mode (colorblind-friendly)`,value:`dark-daltonized`},{label:`Light mode (colorblind-friendly)`,value:`light-daltonized`},{label:`Dark mode (ANSI colors only)`,value:`dark-ansi`},{label:`Light mode (ANSI colors only)`,value:`light-ansi`}],V=(0,I.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,I.jsxs)(f,{flexDirection:`column`,gap:1,children:[r?(0,I.jsx)(a,{children:`Let's get started.`}):(0,I.jsx)(a,{bold:!0,color:`permission`,children:`Theme`}),(0,I.jsxs)(f,{flexDirection:`column`,children:[(0,I.jsx)(a,{bold:!0,children:`Choose the text style that looks best with your terminal`}),l&&!p&&(0,I.jsx)(a,{dimColor:!0,children:l})]}),(0,I.jsx)(E,{options:B,onFocus:e=>{j(e)},onChange:t=>{M(),e(t)},onCancel:g?()=>{N(),y?.()}:async()=>{N(),await O(0)},visibleOptionCount:B.length,defaultValue:C,defaultFocusValue:C})]}),(0,I.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,I.jsx)(f,{flexDirection:`column`,borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:`dashed`,borderColor:`subtle`,children:(0,I.jsx)(x,{patch:{oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[` function greet() {`,`- console.log("Hello, World!");`,`+ console.log("Hello, Claude!");`,` }`]},dim:!1,filePath:`demo.js`,firstLine:null,width:w})}),(0,I.jsxs)(a,{dimColor:!0,children:[` `,T===`env`?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:F?`Syntax highlighting disabled (${R} to enable)`:A?`Syntax theme: ${A.theme}${A.source?` (from ${A.source})`:``} (${R} to disable)`:`Syntax highlighting enabled (${R} to disable)`]})]})]});return r?V:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{flexDirection:`column`,children:V}),(0,I.jsxs)(f,{marginTop:1,children:[p&&l&&(0,I.jsx)(f,{marginLeft:3,children:(0,I.jsx)(a,{dimColor:!0,children:l})}),!h&&(0,I.jsx)(f,{children:(0,I.jsx)(a,{dimColor:!0,italic:!0,children:z.pending?(0,I.jsxs)(I.Fragment,{children:[`Press `,z.keyName,` again to exit`]}):(0,I.jsxs)(s,{children:[(0,I.jsx)(o,{shortcut:`Enter`,action:`select`}),(0,I.jsx)(o,{shortcut:`Esc`,action:`cancel`})]})})})]})]})}var I,L=e((()=>{r(),N(),j(),l(),w(),M(),S(),y(),C(),h(),A(),T(),g(),I=p()}));export{L as n,F as t};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{d as r,s as i}from"./debug-UI3T040K.js";import{o as a,s as o}from"./log-CzsijfHZ.js";import{r as s,t as c}from"./execFileNoThrow-CuQN1sz8.js";import{b as l,x as u}from"./teammate-DMYOtLTK.js";import{n as d,t as f}from"./sleep-8Eb9j_Ly.js";import{Ed as p,Sd as m}from"./loadAgentsDir-DI1a76pd.js";import{c as h,n as g,o as _,r as v,s as y,t as b}from"./constants-41VpZw2G.js";import{l as x,n as S,o as C,r as w}from"./detection-CQsNad64.js";function T(){return d(N)}function E(){let e,t=new Promise(t=>{e=t}),n=M;return M=t,n.then(()=>e)}function D(e){return{red:`red`,blue:`blue`,green:`green`,yellow:`yellow`,purple:`magenta`,orange:`colour208`,pink:`colour205`,cyan:`cyan`}[e]}function O(e){return c(_,e)}function k(e){return c(_,[`-L`,y(),...e])}var A,j,M,N,P;e((()=>{i(),s(),a(),u(),f(),h(),w(),m(),t(),A=!1,j=null,M=Promise.resolve(),N=200,P=class{constructor(){n(this,`type`,`tmux`),n(this,`displayName`,`tmux`),n(this,`supportsHideShow`,!0)}async isAvailable(){return x()}async isRunningInside(){return C()}async createTeammatePaneInSwarmView(e,t){let n=await E();try{return await this.isRunningInside()?await this.createTeammatePaneWithLeader(e,t):await this.createTeammatePaneExternal(e,t)}finally{n()}}async createTeammateWindowInSwarmView(e,t){let n=`teammate-${e.replace(/[^a-zA-Z0-9]/g,`-`).toLowerCase()}`,{windowTarget:r}=await this.createExternalSwarmSession(),i=await k([`new-window`,`-t`,g,`-n`,n,`-P`,`-F`,`#{pane_id}`]);if(i.code!==0)throw Error(`Failed to create tmux window: ${i.stderr||`Unknown error`}`);let a=i.stdout.trim();return await this.setPaneTitle(a,e,t,!0),await this.setPaneBorderColor(a,t,!0),{paneId:a,isFirstTeammate:!1,windowName:n}}async sendCommandToPane(e,t,n=!1){let r=await(n?k:O)([`send-keys`,`-t`,e,t,`Enter`]);if(r.code!==0)throw Error(`Failed to send command to pane ${e}: ${r.stderr}`)}async setPaneBorderColor(e,t,n=!1){let r=D(t),i=n?k:O;await i([`select-pane`,`-t`,e,`-P`,`bg=default,fg=${r}`]),await i([`set-option`,`-p`,`-t`,e,`pane-border-style`,`fg=${r}`]),await i([`set-option`,`-p`,`-t`,e,`pane-active-border-style`,`fg=${r}`])}async setPaneTitle(e,t,n,r=!1){let i=D(n),a=r?k:O;await a([`select-pane`,`-t`,e,`-T`,t]),await a([`set-option`,`-p`,`-t`,e,`pane-border-format`,`#[fg=${i},bold] #{pane_title} #[default]`])}async enablePaneBorderStatus(e,t=!1){let n=e||await this.getCurrentWindowTarget();n&&await(t?k:O)([`set-option`,`-w`,`-t`,n,`pane-border-status`,`top`])}async rebalancePanes(e,t){t?await this.rebalancePanesWithLeader(e):await this.rebalancePanesTiled(e)}async killPane(e,t=!1){return(await(t?k:O)([`kill-pane`,`-t`,e])).code===0}async hidePane(e,t=!1){let n=t?k:O;await n([`new-session`,`-d`,`-s`,b]);let i=await n([`break-pane`,`-d`,`-s`,e,`-t`,`${b}:`]);return i.code===0?r(`[TmuxBackend] Hidden pane ${e}`):r(`[TmuxBackend] Failed to hide pane ${e}: ${i.stderr}`),i.code===0}async showPane(e,t,n=!1){let i=n?k:O,a=await i([`join-pane`,`-h`,`-s`,e,`-t`,t]);if(a.code!==0)return r(`[TmuxBackend] Failed to show pane ${e}: ${a.stderr}`),!1;r(`[TmuxBackend] Showed pane ${e} in ${t}`),await i([`select-layout`,`-t`,t,`main-vertical`]);let o=(await i([`list-panes`,`-t`,t,`-F`,`#{pane_id}`])).stdout.trim().split(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{d as r,s as i}from"./debug-UI3T040K.js";import{o as a,s as o}from"./log-CzsijfHZ.js";import{r as s,t as c}from"./execFileNoThrow-CuQN1sz8.js";import{b as l,x as u}from"./teammate-DMYOtLTK.js";import{n as d,t as f}from"./sleep-8Eb9j_Ly.js";import{Ed as p,Sd as m}from"./loadAgentsDir-D7kapZB5.js";import{c as h,n as g,o as _,r as v,s as y,t as b}from"./constants-41VpZw2G.js";import{l as x,n as S,o as C,r as w}from"./detection-CQsNad64.js";function T(){return d(N)}function E(){let e,t=new Promise(t=>{e=t}),n=M;return M=t,n.then(()=>e)}function D(e){return{red:`red`,blue:`blue`,green:`green`,yellow:`yellow`,purple:`magenta`,orange:`colour208`,pink:`colour205`,cyan:`cyan`}[e]}function O(e){return c(_,e)}function k(e){return c(_,[`-L`,y(),...e])}var A,j,M,N,P;e((()=>{i(),s(),a(),u(),f(),h(),w(),m(),t(),A=!1,j=null,M=Promise.resolve(),N=200,P=class{constructor(){n(this,`type`,`tmux`),n(this,`displayName`,`tmux`),n(this,`supportsHideShow`,!0)}async isAvailable(){return x()}async isRunningInside(){return C()}async createTeammatePaneInSwarmView(e,t){let n=await E();try{return await this.isRunningInside()?await this.createTeammatePaneWithLeader(e,t):await this.createTeammatePaneExternal(e,t)}finally{n()}}async createTeammateWindowInSwarmView(e,t){let n=`teammate-${e.replace(/[^a-zA-Z0-9]/g,`-`).toLowerCase()}`,{windowTarget:r}=await this.createExternalSwarmSession(),i=await k([`new-window`,`-t`,g,`-n`,n,`-P`,`-F`,`#{pane_id}`]);if(i.code!==0)throw Error(`Failed to create tmux window: ${i.stderr||`Unknown error`}`);let a=i.stdout.trim();return await this.setPaneTitle(a,e,t,!0),await this.setPaneBorderColor(a,t,!0),{paneId:a,isFirstTeammate:!1,windowName:n}}async sendCommandToPane(e,t,n=!1){let r=await(n?k:O)([`send-keys`,`-t`,e,t,`Enter`]);if(r.code!==0)throw Error(`Failed to send command to pane ${e}: ${r.stderr}`)}async setPaneBorderColor(e,t,n=!1){let r=D(t),i=n?k:O;await i([`select-pane`,`-t`,e,`-P`,`bg=default,fg=${r}`]),await i([`set-option`,`-p`,`-t`,e,`pane-border-style`,`fg=${r}`]),await i([`set-option`,`-p`,`-t`,e,`pane-active-border-style`,`fg=${r}`])}async setPaneTitle(e,t,n,r=!1){let i=D(n),a=r?k:O;await a([`select-pane`,`-t`,e,`-T`,t]),await a([`set-option`,`-p`,`-t`,e,`pane-border-format`,`#[fg=${i},bold] #{pane_title} #[default]`])}async enablePaneBorderStatus(e,t=!1){let n=e||await this.getCurrentWindowTarget();n&&await(t?k:O)([`set-option`,`-w`,`-t`,n,`pane-border-status`,`top`])}async rebalancePanes(e,t){t?await this.rebalancePanesWithLeader(e):await this.rebalancePanesTiled(e)}async killPane(e,t=!1){return(await(t?k:O)([`kill-pane`,`-t`,e])).code===0}async hidePane(e,t=!1){let n=t?k:O;await n([`new-session`,`-d`,`-s`,b]);let i=await n([`break-pane`,`-d`,`-s`,e,`-t`,`${b}:`]);return i.code===0?r(`[TmuxBackend] Hidden pane ${e}`):r(`[TmuxBackend] Failed to hide pane ${e}: ${i.stderr}`),i.code===0}async showPane(e,t,n=!1){let i=n?k:O,a=await i([`join-pane`,`-h`,`-s`,e,`-t`,t]);if(a.code!==0)return r(`[TmuxBackend] Failed to show pane ${e}: ${a.stderr}`),!1;r(`[TmuxBackend] Showed pane ${e} in ${t}`),await i([`select-layout`,`-t`,t,`main-vertical`]);let o=(await i([`list-panes`,`-t`,t,`-F`,`#{pane_id}`])).stdout.trim().split(`
2
2
  `).filter(Boolean);return o[0]&&await i([`resize-pane`,`-t`,o[0],`-x`,`30%`]),!0}async getCurrentPaneId(){let e=S();if(e)return e;let t=await c(_,[`display-message`,`-p`,`#{pane_id}`]);return t.code===0?t.stdout.trim():(r(`[TmuxBackend] Failed to get current pane ID (exit ${t.code}): ${t.stderr}`),null)}async getCurrentWindowTarget(){if(j)return j;let e=S(),t=[`display-message`];e&&t.push(`-t`,e),t.push(`-p`,`#{session_name}:#{window_index}`);let n=await c(_,t);return n.code===0?(j=n.stdout.trim(),j):(r(`[TmuxBackend] Failed to get current window target (exit ${n.code}): ${n.stderr}`),null)}async getCurrentWindowPaneCount(e,t=!1){let n=e||await this.getCurrentWindowTarget();if(!n)return null;let r=[`list-panes`,`-t`,n,`-F`,`#{pane_id}`],i=t?await k(r):await O(r);return i.code===0?l(i.stdout.trim().split(`
3
3
  `),Boolean):(o(Error(`[TmuxBackend] Failed to get pane count for ${n} (exit ${i.code}): ${i.stderr}`)),null)}async hasSessionInSwarm(e){return(await k([`has-session`,`-t`,e])).code===0}async createExternalSwarmSession(){if(!await this.hasSessionInSwarm(`claude-swarm`)){let e=await k([`new-session`,`-d`,`-s`,g,`-n`,v,`-P`,`-F`,`#{pane_id}`]);if(e.code!==0)throw Error(`Failed to create swarm session: ${e.stderr||`Unknown error`}`);let t=e.stdout.trim(),n=`${g}:${v}`;return r(`[TmuxBackend] Created external swarm session with window ${n}, pane ${t}`),{windowTarget:n,paneId:t}}let e=(await k([`list-windows`,`-t`,g,`-F`,`#{window_name}`])).stdout.trim().split(`
4
4
  `).filter(Boolean),t=`${g}:${v}`;if(e.includes(`swarm-view`))return{windowTarget:t,paneId:(await k([`list-panes`,`-t`,t,`-F`,`#{pane_id}`])).stdout.trim().split(`
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,b as r,t as i,tt as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{Cr as c,cn as l}from"./state-sIHsFpDu.js";import{Ac as u,Nc as d,Qa as f,gc as p,oo as m}from"./paths-1ngPRtu3.js";import{h,p as g}from"./debug-UI3T040K.js";import{n as _,r as v}from"./analytics-DqMQntaB.js";import{n as y,t as b}from"./cwd--iizewsn.js";import{JT as x,YT as S,ba as C,dD as w,dw as T,kx as E,lw as D,uD as O,uy as k,xa as A}from"./loadAgentsDir-D7kapZB5.js";import{In as j}from"./prompt-BBg3jtfc.js";import{t as M}from"./useKeybinding-FsOnjW6T.js";import{l as N,u as P}from"./referral-BKeCKnOJ.js";import{n as F,t as I}from"./PermissionDialog-5MlJf7ew.js";import{homedir as L}from"os";var R=e(n(),1),z=s();i(),l(),_(),y(),h(),u(),S(),M(),T(),k(),N(),F(),m(),j(),A(),w();function B(e){if(e===null||e.disableAllHooks)return!1;if(e.statusLine||e.fileSuggestion)return!0;if(!e.hooks)return!1;for(let t of Object.values(e.hooks))if(t.length>0)return!0;return!1}function V(){let e=[];return B(f(`projectSettings`))&&e.push(`.claude/settings.json`),B(f(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function H(e){return e.some(e=>e.ruleBehavior===`allow`&&(e.ruleValue.toolName===`Bash`||e.ruleValue.toolName.startsWith(`Bash(`)))}function U(){let e=[];return H(O(`projectSettings`))&&e.push(`.claude/settings.json`),H(O(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function W(e){return!!e?.otelHeadersHelper}function G(){let e=[];return W(f(`projectSettings`))&&e.push(`.claude/settings.json`),W(f(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function K(e){return!!e?.apiKeyHelper}function q(){let e=[];return K(f(`projectSettings`))&&e.push(`.claude/settings.json`),K(f(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function J(e){return!!(e?.awsAuthRefresh||e?.awsCredentialExport)}function Y(){let e=[];return J(f(`projectSettings`))&&e.push(`.claude/settings.json`),J(f(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function X(e){return!!e?.gcpAuthRefresh}function Z(){let e=[];return X(f(`projectSettings`))&&e.push(`.claude/settings.json`),X(f(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function Q(e){return e?.env?Object.keys(e.env).some(e=>!C.has(e.toUpperCase())):!1}function $(){let e=[];return Q(f(`projectSettings`))&&e.push(`.claude/settings.json`),Q(f(`localSettings`))&&e.push(`.claude/settings.local.json`),e}j();function ee({onDone:e,commands:n}){let{servers:i}=D(`project`),s=Object.keys(i).length>0,l=V().length>0,u=U(),f=q().length>0,m=Y().length>0,h=Z().length>0,_=G().length>0,y=$().length>0,S=n?.some(e=>e.type===`prompt`&&e.loadedFrom===`commands_DEPRECATED`&&(e.source===`projectSettings`||e.source===`localSettings`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,C=n?.some(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`)&&(e.source===`projectSettings`||e.source===`localSettings`||e.source===`plugin`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,w=u.length>0||S||C,T=p(),[O,k]=R.useState(null);R.useEffect(()=>{if(O!==null){let e=O,t=setTimeout(()=>x(e));return()=>clearTimeout(t)}},[O]),R.useEffect(()=>{v(`tengu_trust_dialog_shown`,{isHomeDir:L()===b(),hasMcpServers:s,hasHooks:l,hasBashExecution:w,hasApiKeyHelper:f,hasAwsCommands:m,hasGcpCommands:h,hasOtelHeadersHelper:_,hasDangerousEnvVars:y})},[s,l,w,f,m,h,_,y]);function A(t){if(t===`exit`){k(1);return}let n=L()===b();v(`tengu_trust_dialog_accept`,{isHomeDir:n,hasMcpServers:s,hasHooks:l,hasBashExecution:w,hasApiKeyHelper:f,hasAwsCommands:m,hasGcpCommands:h,hasOtelHeadersHelper:_,hasDangerousEnvVars:y}),n?c(!0):d(e=>({...e,hasTrustDialogAccepted:!0})),e()}let j=P(()=>k(1));return a(`confirm:no`,()=>{k(0)},{context:`Confirmation`}),O===null?T?(setTimeout(e),null):(0,z.jsx)(I,{color:`warning`,titleColor:`warning`,title:`Accessing workspace:`,children:(0,z.jsxs)(o,{flexDirection:`column`,gap:1,paddingTop:1,children:[(0,z.jsx)(r,{bold:!0,children:g().cwd()}),(0,z.jsx)(r,{children:`Is this a project you trust? (Your own code, a well-known open source project, or work from your team).`}),(0,z.jsx)(r,{children:`Once trusted, Claude Code can read, edit, and run commands in this folder.`}),(0,z.jsx)(r,{dimColor:!0,children:(0,z.jsx)(t,{url:`https://code.claude.com/docs/en/security`,children:`Security guide`})}),(0,z.jsx)(E,{options:[{label:`Yes, I trust this folder`,value:`enable_all`},{label:`No, exit`,value:`exit`}],onChange:e=>A(e),onCancel:()=>A(`exit`)}),(0,z.jsx)(r,{dimColor:!0,children:j.pending?(0,z.jsxs)(z.Fragment,{children:[`Press `,j.keyName,` again to exit`]}):(0,z.jsx)(z.Fragment,{children:`Enter to confirm · Esc to cancel`})})]})}):null}export{ee as TrustDialog};
@@ -1,2 +1,2 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{Rn as r,T as i,b as a,t as o,v as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Sl as u,xl as d}from"./paths-BBvuDQl9.js";function f(e,t={}){let{showValues:n=!0,hideFunctions:r=!1,themeName:i=`dark`,treeCharColors:a={}}=t,o=[],c=new WeakSet;function l(e,t){return t?s(t,i)(e):e}function u(e,t,i,s=0){if(typeof e==`string`){o.push(t+l(e,a.value));return}if(typeof e!=`object`||!e){if(n){let n=String(e);o.push(t+l(n,a.value))}return}if(c.has(e)){o.push(t+l(`[Circular]`,a.value));return}c.add(e);let d=Object.keys(e).filter(t=>{let n=e[t];return!(r&&typeof n==`function`)});d.forEach((r,i)=>{let f=e[r],m=i===d.length-1,h=s===0&&i===0?``:t,g=l(m?p.lastBranch:p.branch,a.treeChar),_=r.trim()===``?``:l(r,a.key),v=h+g+(_?` `+_:``),y=r.trim()!==``;if(f&&typeof f==`object`&&c.has(f)){let e=l(`[Circular]`,a.value);o.push(v+(y?`: `:v?` `:``)+e)}else if(f&&typeof f==`object`&&!Array.isArray(f))o.push(v),u(f,h+l(m?p.empty:p.line,a.treeChar)+` `,m,s+1);else if(Array.isArray(f))o.push(v+(y?`: `:v?` `:``)+`[Array(`+f.length+`)]`);else if(n){let e=l(typeof f==`function`?`[Function]`:String(f),a.value);v+=(y?`: `:v?` `:``)+e,o.push(v)}else o.push(v)})}let d=Object.keys(e);if(d.length===0)return l(`(empty)`,a.value);if(d.length===1&&d[0]!==void 0&&d[0].trim()===``&&typeof e[d[0]]==`string`){let t=d[0],n=l(p.lastBranch,a.treeChar),r=l(e[t],a.value);return n+` `+r}return u(e,``,!0),o.join(`
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-gfT9mM8P.js";import{Rn as r,T as i,b as a,t as o,v as s,x as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Sl as u,xl as d}from"./paths-1ngPRtu3.js";function f(e,t={}){let{showValues:n=!0,hideFunctions:r=!1,themeName:i=`dark`,treeCharColors:a={}}=t,o=[],c=new WeakSet;function l(e,t){return t?s(t,i)(e):e}function u(e,t,i,s=0){if(typeof e==`string`){o.push(t+l(e,a.value));return}if(typeof e!=`object`||!e){if(n){let n=String(e);o.push(t+l(n,a.value))}return}if(c.has(e)){o.push(t+l(`[Circular]`,a.value));return}c.add(e);let d=Object.keys(e).filter(t=>{let n=e[t];return!(r&&typeof n==`function`)});d.forEach((r,i)=>{let f=e[r],m=i===d.length-1,h=s===0&&i===0?``:t,g=l(m?p.lastBranch:p.branch,a.treeChar),_=r.trim()===``?``:l(r,a.key),v=h+g+(_?` `+_:``),y=r.trim()!==``;if(f&&typeof f==`object`&&c.has(f)){let e=l(`[Circular]`,a.value);o.push(v+(y?`: `:v?` `:``)+e)}else if(f&&typeof f==`object`&&!Array.isArray(f))o.push(v),u(f,h+l(m?p.empty:p.line,a.treeChar)+` `,m,s+1);else if(Array.isArray(f))o.push(v+(y?`: `:v?` `:``)+`[Array(`+f.length+`)]`);else if(n){let e=l(typeof f==`function`?`[Function]`:String(f),a.value);v+=(y?`: `:v?` `:``)+e,o.push(v)}else o.push(v)})}let d=Object.keys(e);if(d.length===0)return l(`(empty)`,a.value);if(d.length===1&&d[0]!==void 0&&d[0].trim()===``&&typeof e[d[0]]==`string`){let t=d[0],n=l(p.lastBranch,a.treeChar),r=l(e[t],a.value);return n+` `+r}return u(e,``,!0),o.join(`
2
2
  `)}var p,m=e((()=>{t(),o(),p={branch:n.lineUpDownRight,lastBranch:n.lineUpRight,line:n.lineVertical,empty:` `}}));function h(e){let t={};return e.forEach(e=>{if(!e.path){t[``]=e.message;return}let n=e.path.split(`.`),r=e.path;if(e.invalidValue!==null&&e.invalidValue!==void 0&&n.length>0){let t=[];for(let r=0;r<n.length;r++){let i=n[r];if(i)if(!isNaN(parseInt(i,10))&&r===n.length-1){let n;n=typeof e.invalidValue==`string`?`"${e.invalidValue}"`:e.invalidValue===null?`null`:e.invalidValue===void 0?`undefined`:String(e.invalidValue),t.push(n)}else t.push(i)}r=t.join(`.`)}u(t,r,e.message,Object)}),t}function g({errors:e}){let[t]=i();if(e.length===0)return null;let n=e.reduce((e,t)=>{let n=t.file||`(file not specified)`;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,_.jsx)(c,{flexDirection:`column`,children:Object.keys(n).sort().map(e=>{let r=n[e]||[];r.sort((e,t)=>!e.path&&t.path?-1:e.path&&!t.path?1:(e.path||``).localeCompare(t.path||``));let i=h(r),o=new Map;r.forEach(e=>{if(e.suggestion||e.docLink){let t=`${e.suggestion||``}|${e.docLink||``}`;o.has(t)||o.set(t,{suggestion:e.suggestion,docLink:e.docLink})}});let s=f(i,{showValues:!0,themeName:t,treeCharColors:{treeChar:`inactive`,key:`text`,value:`inactive`}});return(0,_.jsxs)(c,{flexDirection:`column`,children:[(0,_.jsx)(a,{children:e}),(0,_.jsx)(c,{marginLeft:1,children:(0,_.jsx)(a,{dimColor:!0,children:s})}),o.size>0&&(0,_.jsx)(c,{flexDirection:`column`,marginTop:1,children:Array.from(o.values()).map((e,t)=>(0,_.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[e.suggestion&&(0,_.jsx)(a,{dimColor:!0,wrap:`wrap`,children:e.suggestion}),e.docLink&&(0,_.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Learn more: `,e.docLink]})]},`suggestion-pair-${t}`))})]},e)})})}var _,v=e((()=>{d(),r(),o(),m(),_=l()}));export{v as n,g as t};
@@ -1 +1 @@
1
- import"./chunk-DR8-3Aex.js";import{Rn as e,T as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{a as o,n as s}from"./env-chR0gV31.js";e(),r(),o();var c=a(),l=58;function u(){let[e]=t(),r=`Welcome to Claude Code`;return s.terminal===`Apple_Terminal`?(0,c.jsx)(d,{theme:e,welcomeMessage:r}):[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.5`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` ░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░`}),(0,c.jsx)(n,{children:` ██ `})]}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░`}),(0,c.jsx)(n,{children:` ██▒▒██ `})]}),(0,c.jsx)(n,{children:` ▒▒ ██ ▒`}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` ▒▒░░▒▒ ▒ ▒▒`]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,backgroundColor:`clawd_background`,children:`██▄█████▄██`}),` ▒▒ ▒▒ `]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` ░ ▒ `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{color:`clawd_body`,children:`█ █ █ █`}),`……………………………………………………………………░…………………………▒…………`]})]})}):(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.5`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` * █████▓▓░ `}),(0,c.jsx)(n,{children:` * ███▓░ ░░ `}),(0,c.jsx)(n,{children:` ░░░░░░ ███▓░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` ██▓░░ ▓ `})]}),(0,c.jsx)(n,{children:` ░▓▓███▓▓░ `}),(0,c.jsx)(n,{dimColor:!0,children:` * ░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` `,(0,c.jsx)(n,{dimColor:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`██▄█████▄██`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` * `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{color:`clawd_body`,children:`█ █ █ █`}),`………………………………………………………………………………………………………………`]})]})})}function d({theme:e,welcomeMessage:t}){return[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[t,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.5`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` ░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░`}),(0,c.jsx)(n,{children:` ██ `})]}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░`}),(0,c.jsx)(n,{children:` ██▒▒██ `})]}),(0,c.jsx)(n,{children:` ▒▒ ██ ▒`}),(0,c.jsx)(n,{children:` ▒▒░░▒▒ ▒ ▒▒`}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`▗`}),(0,c.jsxs)(n,{color:`clawd_background`,backgroundColor:`clawd_body`,children:[` `,`▗`,` `,`▖`,` `]}),(0,c.jsx)(n,{color:`clawd_body`,children:`▖`}),` ▒▒ ▒▒ `]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `.repeat(9)}),` ░ ▒ `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),`……………………………………………………………………░…………………………▒…………`]})]})}):(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[t,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.5`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` * █████▓▓░ `}),(0,c.jsx)(n,{children:` * ███▓░ ░░ `}),(0,c.jsx)(n,{children:` ░░░░░░ ███▓░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` ██▓░░ ▓ `})]}),(0,c.jsx)(n,{children:` ░▓▓███▓▓░ `}),(0,c.jsx)(n,{dimColor:!0,children:` * ░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{dimColor:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`▗`}),(0,c.jsxs)(n,{color:`clawd_background`,backgroundColor:`clawd_body`,children:[` `,`▗`,` `,`▖`,` `]}),(0,c.jsx)(n,{color:`clawd_body`,children:`▖`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `.repeat(9)}),` * `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),`………………………………………………………………………………………………………………`]})]})})}export{u as t};
1
+ import"./chunk-DR8-3Aex.js";import{Rn as e,T as t,b as n,t as r,x as i}from"./src-Di342QoJ.js";import{t as a}from"./jsx-runtime-D-D469L8.js";import{a as o,n as s}from"./env-chR0gV31.js";e(),r(),o();var c=a(),l=58;function u(){let[e]=t(),r=`Welcome to Claude Code`;return s.terminal===`Apple_Terminal`?(0,c.jsx)(d,{theme:e,welcomeMessage:r}):[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.6`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` ░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░`}),(0,c.jsx)(n,{children:` ██ `})]}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░`}),(0,c.jsx)(n,{children:` ██▒▒██ `})]}),(0,c.jsx)(n,{children:` ▒▒ ██ ▒`}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` ▒▒░░▒▒ ▒ ▒▒`]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,backgroundColor:`clawd_background`,children:`██▄█████▄██`}),` ▒▒ ▒▒ `]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` ░ ▒ `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{color:`clawd_body`,children:`█ █ █ █`}),`……………………………………………………………………░…………………………▒…………`]})]})}):(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.6`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` * █████▓▓░ `}),(0,c.jsx)(n,{children:` * ███▓░ ░░ `}),(0,c.jsx)(n,{children:` ░░░░░░ ███▓░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` ██▓░░ ▓ `})]}),(0,c.jsx)(n,{children:` ░▓▓███▓▓░ `}),(0,c.jsx)(n,{dimColor:!0,children:` * ░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` `,(0,c.jsx)(n,{dimColor:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`██▄█████▄██`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` * `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{color:`clawd_body`,children:`█ █ █ █`}),`………………………………………………………………………………………………………………`]})]})})}function d({theme:e,welcomeMessage:t}){return[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[t,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.6`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` ░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░`}),(0,c.jsx)(n,{children:` ██ `})]}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░`}),(0,c.jsx)(n,{children:` ██▒▒██ `})]}),(0,c.jsx)(n,{children:` ▒▒ ██ ▒`}),(0,c.jsx)(n,{children:` ▒▒░░▒▒ ▒ ▒▒`}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`▗`}),(0,c.jsxs)(n,{color:`clawd_background`,backgroundColor:`clawd_body`,children:[` `,`▗`,` `,`▖`,` `]}),(0,c.jsx)(n,{color:`clawd_body`,children:`▖`}),` ▒▒ ▒▒ `]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `.repeat(9)}),` ░ ▒ `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),`……………………………………………………………………░…………………………▒…………`]})]})}):(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[t,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.6.6`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` * █████▓▓░ `}),(0,c.jsx)(n,{children:` * ███▓░ ░░ `}),(0,c.jsx)(n,{children:` ░░░░░░ ███▓░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` ██▓░░ ▓ `})]}),(0,c.jsx)(n,{children:` ░▓▓███▓▓░ `}),(0,c.jsx)(n,{dimColor:!0,children:` * ░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{dimColor:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`▗`}),(0,c.jsxs)(n,{color:`clawd_background`,backgroundColor:`clawd_body`,children:[` `,`▗`,` `,`▖`,` `]}),(0,c.jsx)(n,{color:`clawd_body`,children:`▖`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `.repeat(9)}),` * `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),`………………………………………………………………………………………………………………`]})]})})}export{u as t};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{d as r,s as i}from"./debug-UI3T040K.js";import{i as a,o}from"./platform-CuyedWpe.js";import{r as s,t as c}from"./execFileNoThrow-CuQN1sz8.js";import{Dd as l,Sd as u}from"./loadAgentsDir-D7kapZB5.js";import{a as d,r as f}from"./detection-CQsNad64.js";import{tmpdir as p}from"os";import{join as m}from"path";import{randomUUID as h}from"crypto";import{readFile as g,unlink as _}from"fs/promises";function v(e){return`'${e.replace(/'/g,`''`)}'`}function y(e,t){let n=v(t);return[`$ErrorActionPreference = 'Stop'`,`Set-Content -LiteralPath ${n} -Value $PID`,[`try { ${e}; if ($LASTEXITCODE -is [int]) { exit $LASTEXITCODE } }`,`catch { Write-Error $_; exit 1 }`,`finally { Remove-Item -LiteralPath ${n} -Force -ErrorAction SilentlyContinue }`].join(`
2
+ `)].join(`; `)}function b(){let e=process.env.CLAUDE_WT_PANE_TIMEOUT_MS;if(!e)return S;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:S}async function x(e,t){let n=Date.now()+t,r;for(;Date.now()<n;){try{let t=(await g(e,`utf-8`)).trim();if(!/^\d+$/.test(t))r=Error(`pidFile content not a valid pid: ${JSON.stringify(t)}`);else{let e=Number.parseInt(t,10);if(Number.isFinite(e)&&e>0)return e;r=Error(`pidFile content parsed to invalid pid: ${e}`)}}catch(e){r=e}await new Promise(e=>setTimeout(e,C))}throw r??Error(`pidFile never appeared`)}var S,C,w;e((()=>{i(),s(),o(),f(),u(),t(),S=8e3,C=200,w=class{constructor(e,t){n(this,`type`,`windows-terminal`),n(this,`displayName`,`Windows Terminal`),n(this,`supportsHideShow`,!1),n(this,`panes`,new Map),n(this,`runCommand`,void 0),n(this,`getPlatformValue`,void 0),n(this,`pidFileDir`,void 0),typeof e==`function`||e===void 0?(this.runCommand=e??c,this.getPlatformValue=t??a,this.pidFileDir=p()):(this.runCommand=e.runCommand??c,this.getPlatformValue=e.getPlatform??a,this.pidFileDir=e.pidFileDir??p())}makePidFile(e){return m(this.pidFileDir,`${e.replace(/[^a-zA-Z0-9_-]/g,`-`)}.pid`)}async isAvailable(){return this.getPlatformValue()===`windows`?process.env.WT_SESSION?!0:(await this.runCommand(`where.exe`,[`wt.exe`])).code===0:!1}async isRunningInside(){return this.getPlatformValue()===`windows`&&d()}async createTeammatePaneInSwarmView(e,t){let n=`wt-${h()}`,r=this.panes.size===0;return this.panes.set(n,{title:e,mode:`pane`,pidFile:this.makePidFile(n),status:`registered`}),{paneId:n,isFirstTeammate:r}}async createTeammateWindowInSwarmView(e,t){let n=`wt-${h()}`,r=`teammate-${e.replace(/[^a-zA-Z0-9]/g,`-`).toLowerCase()}`;return this.panes.set(n,{title:e,mode:`window`,pidFile:this.makePidFile(n),status:`registered`}),{paneId:n,isFirstTeammate:!1,windowName:r}}async sendCommandToPane(e,t,n){let r=this.panes.get(e);if(!r)throw Error(`Unknown Windows Terminal pane id: ${e}`);if(r.status===`ready`||r.status===`killing`)throw Error(`Pane ${e} already spawned (status=${r.status}); create a new pane to re-launch`);if(r.status===`spawning`)throw Error(`Pane ${e} is currently spawning; wait for the in-flight launch to complete`);if(r.status===`dead`)throw Error(`Pane ${e} is dead; create a new pane`);let i,a,o=new Promise((e,t)=>{i=e,a=t});o.catch(()=>{}),r.status=`spawning`,r.spawnPromise=o;try{let n=y(t,r.pidFile),a=Buffer.from(n,`utf16le`).toString(`base64`),o=r.mode===`window`?[`-w`,`-1`,`new-tab`,`--title`,r.title]:[`-w`,`0`,`split-pane`,`--vertical`,`--title`,r.title];await _(r.pidFile).catch(()=>{});let s=await this.runCommand(`wt.exe`,[...o,`powershell.exe`,`-NoLogo`,`-NoProfile`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`,a]);if(s.code!==0)throw Error(`Failed to launch Windows Terminal teammate ${e}: ${s.stderr}`);let c=b(),l;try{l=await x(r.pidFile,c)}catch(t){throw Error(`Windows Terminal pane failed to launch within ${c}ms\n paneId: ${e}\n pidFile: ${r.pidFile}\n wt.exe stdout: ${s.stdout||`(empty)`}\n wt.exe stderr: ${s.stderr||`(empty)`}\n underlying: ${t instanceof Error?t.message:String(t)}\n override timeout via env CLAUDE_WT_PANE_TIMEOUT_MS`)}r.pid=l,r.status=`ready`,i()}catch(e){throw r.status=`dead`,r.pid=void 0,a(e),e}finally{r.spawnPromise=void 0}}async setPaneBorderColor(e,t,n){}async setPaneTitle(e,t,n,r){}async enablePaneBorderStatus(e,t){}async rebalancePanes(e,t){}async killPane(e,t){let n=this.panes.get(e);if(!n)return!1;if(n.status===`spawning`&&n.spawnPromise&&await n.spawnPromise.catch(()=>{}),n.status===`dead`)return this.panes.delete(e),!1;if(n.status!==`ready`)return!1;n.status=`killing`;let i=n.pid;if(i===void 0){let t=null;for(let r=0;r<3;r++)try{t=(await g(n.pidFile,`utf-8`)).trim();break}catch{if(r===2)return n.status=`dead`,this.panes.delete(e),!1;await new Promise(e=>setTimeout(e,500))}if(!t||!/^\d+$/.test(t))return n.status=`dead`,this.panes.delete(e),!1;let r=Number.parseInt(t,10);if(!Number.isFinite(r)||r<=0)return n.status=`dead`,this.panes.delete(e),!1;i=r}let a=await this.runCommand(`powershell.exe`,[`-NoLogo`,`-NoProfile`,`-Command`,`Stop-Process -Id ${i} -Force -ErrorAction Stop`]);return n.pid=void 0,n.status=`dead`,this.panes.delete(e),r(`[WindowsTerminalBackend] killPane ${e} pid=${i} code=${a.code}`),a.code===0}async hidePane(e,t){return!1}async showPane(e,t,n){return!1}},l(w)}))();export{};
@@ -1 +1 @@
1
- import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{In as i,Ln as a,Rn as o,b as s,t as c,x as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{Cn as d,cn as f,g as p}from"./state-sIHsFpDu.js";import{B as m,R as h,Rw as g,aD as _,eD as v,iA as y,iD as b,tA as x,z as S,zw as C}from"./loadAgentsDir-DI1a76pd.js";import{n as w,t as T}from"./AddWorkspaceDirectory-BYyM_V0q.js";function E({message:e,args:t,onDone:n}){return(0,O.useEffect)(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,k.jsxs)(l,{flexDirection:`column`,children:[(0,k.jsxs)(s,{dimColor:!0,children:[r.pointer,` /add-dir `,t]}),(0,k.jsx)(g,{children:(0,k.jsx)(s,{children:e})})]})}async function D(e,t,n){let r=(n??``).trim(),a=t.getAppState(),o=async(n,r=!1)=>{let a={type:`addDirectories`,directories:[n],destination:r?`localSettings`:`session`},o=v(t.getAppState().toolPermissionContext,a);t.setAppState(e=>({...e,toolPermissionContext:o}));let s=p();s.includes(n)||d([...s,n]),x.refreshConfig();let c;if(r)try{_(a),c=`Added ${i.bold(n)} as a working directory and saved to local settings`}catch(e){c=`Added ${i.bold(n)} as a working directory. Failed to save to local settings: ${e instanceof Error?e.message:`Unknown error`}`}else c=`Added ${i.bold(n)} as a working directory for this session`;e(`${c} ${i.dim(`· /permissions to manage`)}`)};if(!r)return(0,k.jsx)(T,{permissionContext:a.toolPermissionContext,onAddDirectory:o,onCancel:()=>{e(`Did not add a working directory.`)}});let s=await m(r,a.toolPermissionContext);if(s.resultType!==`success`){let t=h(s);return(0,k.jsx)(E,{message:t,args:n??``,onDone:()=>e(t)})}return(0,k.jsx)(T,{directoryPath:s.absolutePath,permissionContext:a.toolPermissionContext,onAddDirectory:o,onCancel:()=>{e(`Did not add ${i.bold(s.absolutePath)} as a working directory.`)}})}var O,k;e((()=>{a(),n(),O=t(o(),1),f(),C(),w(),c(),b(),y(),S(),k=u()}))();export{D as call};
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{In as i,Ln as a,Rn as o,b as s,t as c,x as l}from"./src-Di342QoJ.js";import{t as u}from"./jsx-runtime-D-D469L8.js";import{Cn as d,cn as f,g as p}from"./state-sIHsFpDu.js";import{B as m,Bw as h,R as g,Vw as _,nD as v,oA as y,oD as b,rA as x,sD as S,z as C}from"./loadAgentsDir-D7kapZB5.js";import{n as w,t as T}from"./AddWorkspaceDirectory-Bb6crGWh.js";function E({message:e,args:t,onDone:n}){return(0,O.useEffect)(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,k.jsxs)(l,{flexDirection:`column`,children:[(0,k.jsxs)(s,{dimColor:!0,children:[r.pointer,` /add-dir `,t]}),(0,k.jsx)(h,{children:(0,k.jsx)(s,{children:e})})]})}async function D(e,t,n){let r=(n??``).trim(),a=t.getAppState(),o=async(n,r=!1)=>{let a={type:`addDirectories`,directories:[n],destination:r?`localSettings`:`session`},o=v(t.getAppState().toolPermissionContext,a);t.setAppState(e=>({...e,toolPermissionContext:o}));let s=p();s.includes(n)||d([...s,n]),x.refreshConfig();let c;if(r)try{S(a),c=`Added ${i.bold(n)} as a working directory and saved to local settings`}catch(e){c=`Added ${i.bold(n)} as a working directory. Failed to save to local settings: ${e instanceof Error?e.message:`Unknown error`}`}else c=`Added ${i.bold(n)} as a working directory for this session`;e(`${c} ${i.dim(`· /permissions to manage`)}`)};if(!r)return(0,k.jsx)(T,{permissionContext:a.toolPermissionContext,onAddDirectory:o,onCancel:()=>{e(`Did not add a working directory.`)}});let s=await m(r,a.toolPermissionContext);if(s.resultType!==`success`){let t=g(s);return(0,k.jsx)(E,{message:t,args:n??``,onDone:()=>e(t)})}return(0,k.jsx)(T,{directoryPath:s.absolutePath,permissionContext:a.toolPermissionContext,onAddDirectory:o,onCancel:()=>{e(`Did not add ${i.bold(s.absolutePath)} as a working directory.`)}})}var O,k;e((()=>{a(),n(),O=t(o(),1),f(),_(),w(),c(),b(),y(),C(),k=u()}))();export{D as call};
@@ -1 +1 @@
1
- import{n as e}from"./chunk-DR8-3Aex.js";import{nc as t,tc as n}from"./paths-BBvuDQl9.js";import{S_ as r,x_ as i}from"./loadAgentsDir-DI1a76pd.js";function a(e,t){let n=new Map;for(let e of t)n.set(e.agentType,e);let r=new Set,i=[];for(let t of e){let e=`${t.agentType}:${t.source}`;if(r.has(e))continue;r.add(e);let a=n.get(t.agentType),o=a&&a.source!==t.source?a.source:void 0;i.push({...t,overriddenBy:o})}return i}function o(e){let t=e.model||i();if(t)return t===`inherit`?`inherit`:t}function s(e){return n(e).toLowerCase()}function c(e,t){return e.agentType.localeCompare(t.agentType,void 0,{sensitivity:`base`})}var l,u=e((()=>{r(),t(),l=[{label:`User agents`,source:`userSettings`},{label:`Project agents`,source:`projectSettings`},{label:`Local agents`,source:`localSettings`},{label:`Managed agents`,source:`policySettings`},{label:`Plugin agents`,source:`plugin`},{label:`CLI arg agents`,source:`flagSettings`},{label:`Built-in agents`,source:`built-in`}]}));export{o as a,u as i,c as n,a as o,s as r,l as t};
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{nc as t,tc as n}from"./paths-1ngPRtu3.js";import{b_ as r,x_ as i}from"./loadAgentsDir-D7kapZB5.js";function a(e,t){let n=new Map;for(let e of t)n.set(e.agentType,e);let r=new Set,i=[];for(let t of e){let e=`${t.agentType}:${t.source}`;if(r.has(e))continue;r.add(e);let a=n.get(t.agentType),o=a&&a.source!==t.source?a.source:void 0;i.push({...t,overriddenBy:o})}return i}function o(e){let t=e.model||r();if(t)return t===`inherit`?`inherit`:t}function s(e){return n(e).toLowerCase()}function c(e,t){return e.agentType.localeCompare(t.agentType,void 0,{sensitivity:`base`})}var l,u=e((()=>{i(),t(),l=[{label:`User agents`,source:`userSettings`},{label:`Project agents`,source:`projectSettings`},{label:`Local agents`,source:`localSettings`},{label:`Managed agents`,source:`policySettings`},{label:`Plugin agents`,source:`plugin`},{label:`CLI arg agents`,source:`flagSettings`},{label:`Built-in agents`,source:`built-in`}]}));export{o as a,u as i,c as n,a as o,s as r,l as t};