@readmagic/workmate 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AddWorkspaceDirectory-BSLHrjbt.js → AddWorkspaceDirectory-BgNp7glC.js} +1 -1
- package/dist/chunks/{App-DY5O6IKw.js → App-Coboqa8H.js} +1 -1
- package/dist/chunks/ApproveApiKey-CQsQdQBC.js +1 -0
- package/dist/chunks/{ApproveApiKey-BEzfC6r3.js → ApproveApiKey-CYpBbj0k.js} +1 -1
- package/dist/chunks/{AssistantSessionChooser-Ce3PraaD.js → AssistantSessionChooser-DxKsTdqj.js} +1 -1
- package/dist/chunks/{BackgroundTasksDialog-Dvhcgahe.js → BackgroundTasksDialog-AiVi-1pI.js} +1 -1
- package/dist/chunks/{BypassPermissionsModeDialog-B68V1bCq.js → BypassPermissionsModeDialog-Cx3QGFz-.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-CTWhpIm8.js → ClaudeMdExternalIncludesDialog-BAK9fxwg.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DUu6iRJk.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DVTPwR5I.js +1 -0
- package/dist/chunks/{DesktopHandoff-BRbU4is4.js → DesktopHandoff-BsHgLlTy.js} +1 -1
- package/dist/chunks/{DiffDialog-CBluIK-x.js → DiffDialog-BgTW2Znv.js} +1 -1
- package/dist/chunks/{Doctor-WxNv49HC.js → Doctor-BXhz8eUa.js} +1 -1
- package/dist/chunks/Doctor-D75dsEyb.js +1 -0
- package/dist/chunks/{ExitFlow-CRPgptCN.js → ExitFlow-B1XNACQP.js} +1 -1
- package/dist/chunks/{Feedback-CEtzaLr3.js → Feedback-Cvz80lAn.js} +1 -1
- package/dist/chunks/Grove-B7hhBvFw.js +1 -0
- package/dist/chunks/{Grove--kttLxvs.js → Grove-Dsi4yU08.js} +1 -1
- package/dist/chunks/{HybridTransport-BgV5_7Az.js → HybridTransport-8qA64lCx.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-DCGwXW_p.js → InvalidConfigDialog-CAZ1z5WG.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-jTwsdXWr.js → InvalidSettingsDialog-D82Qk_MR.js} +1 -1
- package/dist/chunks/{MCPConnectionManager-BX0LMz9J.js → MCPConnectionManager-BLfKm4H2.js} +1 -1
- package/dist/chunks/{McpParsingWarnings-WQrWJeWP.js → McpParsingWarnings-8ZueNqAd.js} +1 -1
- package/dist/chunks/{MessageSelector-_UZB8cGb.js → MessageSelector-DmKtBYX9.js} +1 -1
- package/dist/chunks/Messages-CaFdI1kk.js +11 -0
- package/dist/chunks/{Onboarding-BoIVNCgc.js → Onboarding-CUztnbbv.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-1FCN8bH3.js → OverageCreditUpsell-DSgrZvMv.js} +1 -1
- package/dist/chunks/{PluginSettings-BD9JLV9-.js → PluginSettings-0FSNch8O.js} +1 -1
- package/dist/chunks/{PromptInputFooterSuggestions-CrGST0Cq.js → PromptInputFooterSuggestions-IaihWay3.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-B2TDpbpw.js → PromptInputHelpMenu-okS2rQ4k.js} +1 -1
- package/dist/chunks/{QueryEngine-D2HUnwmU.js → QueryEngine-WYDWzQuY.js} +1 -1
- package/dist/chunks/{REPL-BV4WyYMg.js → REPL-Dto012J0.js} +7 -7
- package/dist/chunks/REPL-vV_jzAVx.js +1 -0
- package/dist/chunks/{RemoteCallout-DS_EV6Fh.js → RemoteCallout-C_UIYnuT.js} +1 -1
- package/dist/chunks/RemoteSessionManager-CuSSHAXN.js +2 -0
- package/dist/chunks/{ResumeConversation-Cw3vP4G8.js → ResumeConversation-g_JyOWbl.js} +1 -1
- package/dist/chunks/{SSETransport-BXiEBMpb.js → SSETransport-Chj_yfPv.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-Daedym7_.js +1 -0
- package/dist/chunks/{Settings-ns6mRsDc.js → Settings-DUXA-qac.js} +2 -2
- package/dist/chunks/{TeleportProgress-CcDzMC5L.js → TeleportProgress-DP1a8jit.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-DZbxl4sD.js → TeleportRepoMismatchDialog-B6sTwXuZ.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-EowJO5nm.js → TeleportResumeWrapper-CKUuRQSG.js} +1 -1
- package/dist/chunks/{ThemePicker-BYbChJpu.js → ThemePicker-Dyq1YVhb.js} +1 -1
- package/dist/chunks/{TrustDialog-DA3YTk_k.js → TrustDialog-CdZS9t-T.js} +1 -1
- package/dist/chunks/{ValidationErrorsList-Cx-hoRwG.js → ValidationErrorsList-DUNh4BNa.js} +1 -1
- package/dist/chunks/WelcomeV2-TPbOXGrO.js +1 -0
- package/dist/chunks/{add-dir-CWt69NAZ.js → add-dir-Bf_5tCeR.js} +1 -1
- package/dist/chunks/{agentDisplay-CQ4mZWFH.js → agentDisplay-CCeYiAta.js} +1 -1
- package/dist/chunks/{agents-D4clhuCl.js → agents-Bt72Gz1v.js} +1 -1
- package/dist/chunks/{agents-C6jzKOit.js → agents-T8xHY5Wk.js} +1 -1
- package/dist/chunks/{allErrors-HMPqE0jK.js → allErrors-CDWTJcMw.js} +1 -1
- package/dist/chunks/{ant-9Z5bppVC.js → ant-DRF-v5bA.js} +1 -1
- package/dist/chunks/api-CLLIHLpn.js +1 -0
- package/dist/chunks/api-DMpNA1s8.js +1 -0
- package/dist/chunks/asciicast-BIr75_x9.js +1 -0
- package/dist/chunks/{asciicast-n-BBfgDq.js → asciicast-CQJlNTae.js} +1 -1
- package/dist/chunks/{assistant-BA9_Mo9U.js → assistant-C83quuNj.js} +1 -1
- package/dist/chunks/{assistant-BiNOSla3.js → assistant-z1ojxEET.js} +1 -1
- package/dist/chunks/assistant-z2o4-UJe.js +1 -0
- package/dist/chunks/auth-Ce0jllLf.js +1 -0
- package/dist/chunks/auth-DV3P8Qup.js +1 -0
- package/dist/chunks/{auth-DHyCIxCk.js → auth-DpFfHy1W.js} +1 -1
- package/dist/chunks/{autoMode-Db4QrgFr.js → autoMode-DW_H3i37.js} +3 -3
- package/dist/chunks/{autonomy-BkAMA7du.js → autonomy-46hnmyAi.js} +1 -1
- package/dist/chunks/{autonomy-D4Vy-RPQ.js → autonomy-OxhciwYa.js} +1 -1
- package/dist/chunks/{autonomyPanel-EjfO8jvg.js → autonomyPanel-CTEjq0Bd.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-BycL9lOe.js +1 -0
- package/dist/chunks/{backgroundHousekeeping-hDDE8mJC.js → backgroundHousekeeping-Cpxq4krt.js} +2 -2
- package/dist/chunks/{banner-hD6wZygx.js → banner-BVkLvJiB.js} +1 -1
- package/dist/chunks/bg-H849G7Sc.js +1 -0
- package/dist/chunks/{bg-DQ0Q3Qv-.js → bg-zWGqkcST.js} +2 -2
- package/dist/chunks/{branch-CeQ9IyZk.js → branch-DJzijRGm.js} +1 -1
- package/dist/chunks/{break-cache-Bd0clV2N.js → break-cache-BQfgkNAo.js} +2 -2
- package/dist/chunks/{bridge-yerAiaK2.js → bridge-Dpr2AWpc.js} +2 -2
- package/dist/chunks/bridgeConfig-CcANVX0P.js +1 -0
- package/dist/chunks/{bridgeConfig-CCtXe8ak.js → bridgeConfig-DDF3teRE.js} +1 -1
- package/dist/chunks/bridgeEnabled-Cn-u7P4_.js +1 -0
- package/dist/chunks/{bridgeEnabled--F-6TUi4.js → bridgeEnabled-D4JDZd0y.js} +1 -1
- package/dist/chunks/{bridgeMain--R1HFbOv.js → bridgeMain-CtgVyLjI.js} +7 -7
- package/dist/chunks/bridgeMain-Dh0gWRVo.js +1 -0
- package/dist/chunks/{bridgeMessaging-CqbLTDcx.js → bridgeMessaging-CRG6HqUb.js} +1 -1
- package/dist/chunks/{bridgePointer-W_jdQ8zf.js → bridgePointer-Cug5fQ3e.js} +1 -1
- package/dist/chunks/{browser-Bd7GeBH1.js → browser-BKiu1max.js} +1 -1
- package/dist/chunks/{btw-CVGRmL9a.js → btw-DG9CCeq4.js} +1 -1
- package/dist/chunks/{caches-BtmAri4e.js → caches-BB5_91gU.js} +2 -2
- package/dist/chunks/caches-C3NINY3K.js +1 -0
- package/dist/chunks/{ccrClient-HqMi5Kfu.js → ccrClient-CRXGlUCe.js} +1 -1
- package/dist/chunks/{claudeDesktop-aUMx06RK.js → claudeDesktop-9xfIgkzE.js} +1 -1
- package/dist/chunks/{clear-C6nRzIQE.js → clear-ueMvDelv.js} +1 -1
- package/dist/chunks/{cliLaunch-2AUoMnqx.js → cliLaunch-BJ9o-rIV.js} +1 -1
- package/dist/chunks/client-AnWHs0gW.js +1 -0
- package/dist/chunks/{color-DXI_4ibU.js → color-B0-MIfsq.js} +1 -1
- package/dist/chunks/commands-DsKH3ogN.js +1 -0
- package/dist/chunks/commitAttribution-D7NrwLhc.js +1 -0
- package/dist/chunks/{commitAttribution-Cm40fdNU.js → commitAttribution-DKun9CeU.js} +1 -1
- package/dist/chunks/{compact-DPTVpJ4D.js → compact-BhWCO-oD.js} +1 -1
- package/dist/chunks/completionCache-C9zlWBRz.js +1 -0
- package/dist/chunks/{completionCache-BQaLkB4d.js → completionCache-CdHCuiqq.js} +2 -2
- package/dist/chunks/{config-C7YHKCPV.js → config-662VDD70.js} +1 -1
- package/dist/chunks/config-CUN8YbOa.js +1 -0
- package/dist/chunks/{config-CLmFk-5V.js → config-DklnhNx1.js} +1 -1
- package/dist/chunks/config-Wk3svGdH.js +1 -0
- package/dist/chunks/{context-C_cKrBUn.js → context-DBswG0EY.js} +1 -1
- package/dist/chunks/context-noninteractive-C3dICmA9.js +1 -0
- package/dist/chunks/{context-noninteractive-DnH6Q9Lu.js → context-noninteractive-CTvyNimw.js} +1 -1
- package/dist/chunks/{conversation-GJxfkr6M.js → conversation-CooSju3g.js} +1 -1
- package/dist/chunks/conversation-DLLIOKYV.js +1 -0
- package/dist/chunks/{createSSHSession--bWmmIk9.js → createSSHSession-BdO35H6o.js} +1 -1
- package/dist/chunks/{createSession-DIr4sUp6.js → createSession-Br1g8qSD.js} +1 -1
- package/dist/chunks/createSession-CVG8SiEm.js +1 -0
- package/dist/chunks/{crossProjectResume-DKrtjTpm.js → crossProjectResume-DiKJb83I.js} +1 -1
- package/dist/chunks/cwd--nvsx73T.js +1 -0
- package/dist/chunks/{cwd-BuJhkTrc.js → cwd-CYmmnQVS.js} +1 -1
- package/dist/chunks/{daemon-B9lBPdBJ.js → daemon-BQiSFjc-.js} +1 -1
- package/dist/chunks/{datadog-DNCsyfSO.js → datadog-BE6D_6m0.js} +1 -1
- package/dist/chunks/datadog-C69i7cfI.js +1 -0
- package/dist/chunks/debug-8kgDrUfj.js +1 -0
- package/dist/chunks/{debug-IKW-jE7K.js → debug-DiuXEmUq.js} +1 -1
- package/dist/chunks/{debugUtils-D2981c0Z.js → debugUtils-3YYWvb3H.js} +1 -1
- package/dist/chunks/{desktop-B5cvrcOQ.js → desktop-W7SA8BFk.js} +1 -1
- package/dist/chunks/{detached-rfIUyc-B.js → detached-Cv9gAylK.js} +1 -1
- package/dist/chunks/{detectRepository-ReZ0Fz8Z.js → detectRepository-B1PMTLAU.js} +1 -1
- package/dist/chunks/detectRepository-_Kj817Vi.js +1 -0
- package/dist/chunks/{diff-cXAp9cNN.js → diff-CMtRjFUb.js} +1 -1
- package/dist/chunks/{directoryCompletion-DBM2o5kx.js → directoryCompletion-CeV63gvu.js} +1 -1
- package/dist/chunks/doctor-DEz8BHAz.js +1 -0
- package/dist/chunks/{effort-Br8KKHdx.js → effort-BAlVDBHq.js} +1 -1
- package/dist/chunks/{entry-4lIRMrLI.js → entry-DLqeVq5C.js} +2 -2
- package/dist/chunks/envLessBridgeConfig-3kCrKZl7.js +1 -0
- package/dist/chunks/envLessBridgeConfig-BfgXw47_.js +1 -0
- package/dist/chunks/{execFileNoThrow-COKYqVQj.js → execFileNoThrow-DResQRvR.js} +1 -1
- package/dist/chunks/{execSyncWrapper-DZJ3tNWF.js → execSyncWrapper-CWxMek26.js} +1 -1
- package/dist/chunks/{exit-Z9oWrqE4.js → exit-cyepwuyy.js} +1 -1
- package/dist/chunks/extra-usage-DlFeNGQD.js +1 -0
- package/dist/chunks/{extra-usage-core-CdL1ltqq.js → extra-usage-core-Dh4rVUI-.js} +1 -1
- package/dist/chunks/{extra-usage-DtAIhW74.js → extra-usage-nRFfBiXh.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-DxxRI0Yx.js → extra-usage-noninteractive-D4Ya5KPm.js} +1 -1
- package/dist/chunks/{extraUsage-BYZdi44Y.js → extraUsage-DtWi8E78.js} +1 -1
- package/dist/chunks/extractMemories-BqN8fWZ5.js +1 -0
- package/dist/chunks/{fast-DKqiojzf.js → fast-DkUxqWhE.js} +1 -1
- package/dist/chunks/fast-NvqW2-t1.js +1 -0
- package/dist/chunks/{feedback-yB19xph5.js → feedback-Cn7Sbqxa.js} +1 -1
- package/dist/chunks/{file-D1cN3LMK.js → file-BZriE-XU.js} +1 -1
- package/dist/chunks/{files-DAzGtmzz.js → files-Cz1-PK3r.js} +1 -1
- package/dist/chunks/firstPartyEventLogger-AhXYSrkP.js +1 -0
- package/dist/chunks/{firstPartyEventLogger-hU-LPkje.js → firstPartyEventLogger-BQYrBdvD.js} +2 -2
- package/dist/chunks/{flushGate-ZFr8yv7F.js → flushGate-ebqQZF1t.js} +1 -1
- package/dist/chunks/{gemini-DqAv8_GY.js → gemini-Sr_00TsL.js} +1 -1
- package/dist/chunks/{generateRecap-lO2PDlx8.js → generateRecap-5d4l_ODy.js} +1 -1
- package/dist/chunks/{generateSessionName-48veu5dv.js → generateSessionName-DEAw5x_h.js} +1 -1
- package/dist/chunks/{genericProcessUtils-F1Qcb1sO.js → genericProcessUtils-DO7Fy0RJ.js} +1 -1
- package/dist/chunks/git-Cc1jAz6r.js +1 -0
- package/dist/chunks/{git-tyaWOgRL.js → git-Cgc8X5l2.js} +2 -2
- package/dist/chunks/{githubRepoPathMapping-BlR0BphY.js → githubRepoPathMapping-Tt-LdYFZ.js} +1 -1
- package/dist/chunks/{goal-Bn8Kz2Dp.js → goal-DCaI1NPN.js} +1 -1
- package/dist/chunks/{grok-DhnO_KDC.js → grok-CKlngG3b.js} +1 -1
- package/dist/chunks/{grove-DotW04-v.js → grove-DSWe6psK.js} +1 -1
- package/dist/chunks/{heapdump-DkZSKNbp.js → heapdump-OVbV05On.js} +1 -1
- package/dist/chunks/{help-DU_BcZtU.js → help-CRtX5VX9.js} +1 -1
- package/dist/chunks/hooks-DvtnNoYE.js +1 -0
- package/dist/chunks/{hooks-BTMWE5Qx.js → hooks-tpf90xd5.js} +1 -1
- package/dist/chunks/{hostGuard-Dh296c6q.js → hostGuard-t7QfbijF.js} +1 -1
- package/dist/chunks/{inboundAttachments-DVs3_m48.js → inboundAttachments-BZ6MKpxd.js} +1 -1
- package/dist/chunks/inboundAttachments-D5Ux2kCl.js +1 -0
- package/dist/chunks/{initReplBridge-D0Xec8S-.js → initReplBridge-CjuO6in6.js} +1 -1
- package/dist/chunks/{install-BkfXeXpv.js → install-DqpM2brU.js} +1 -1
- package/dist/chunks/{instrumentation-H0XRS1yG.js → instrumentation--Sx0y1Gk.js} +3 -3
- package/dist/chunks/{job-DKtLkF8V.js → job-D7B35Usp.js} +1 -1
- package/dist/chunks/{jwtUtils-C-ojmb8W.js → jwtUtils-CqXPjf-a.js} +1 -1
- package/dist/chunks/{keybindings-ez51eHHp.js → keybindings-JvAmBpLt.js} +1 -1
- package/dist/chunks/{language-BuRSO2sR.js → language-8Rnu_qxl.js} +1 -1
- package/dist/chunks/language-DaxZe0Xw.js +1 -0
- package/dist/chunks/{launchAgentsPlatform-BQyPdrHp.js → launchAgentsPlatform-CNPkOVzu.js} +1 -1
- package/dist/chunks/{launchLocalMemory-CWHAj7CX.js → launchLocalMemory-BxmDhENs.js} +1 -1
- package/dist/chunks/{launchLocalVault-D8iJdtsP.js → launchLocalVault-DQlTGA-g.js} +1 -1
- package/dist/chunks/{launchMemoryStores-W7jWG2uH.js → launchMemoryStores-EYAwxI8i.js} +1 -1
- package/dist/chunks/{launchOnboarding-q__LaLy1.js → launchOnboarding-CTu5Zf4E.js} +1 -1
- package/dist/chunks/{launchSchedule-BWi9F5vh.js → launchSchedule-CeHHSvO7.js} +1 -1
- package/dist/chunks/{launchSkillStore-4wd4MQBc.js → launchSkillStore-Bqh2Fru2.js} +1 -1
- package/dist/chunks/{launchTeleport-BlCf2QM_.js → launchTeleport-Crc3XVZX.js} +1 -1
- package/dist/chunks/{launchVault-C7u7LZV7.js → launchVault-BHLgpth_.js} +1 -1
- package/dist/chunks/loadAgentsDir-D7npVvsj.js +1 -0
- package/dist/chunks/{loadAgentsDir-nzr38hai.js → loadAgentsDir-ZQwvbURI.js} +66 -66
- package/dist/chunks/{loadPluginHooks-z1-zvBLw.js → loadPluginHooks-CaKvZVZI.js} +1 -1
- package/dist/chunks/localSearch-BU5oulbF.js +1 -0
- package/dist/chunks/{localSearch-B-L_ldos.js → localSearch-H0LchlTi.js} +1 -1
- package/dist/chunks/{log-B3eB4EFv.js → log-Duzb4o6h.js} +1 -1
- package/dist/chunks/{logoV2Utils-RQ160dI2.js → logoV2Utils-5lcUu53m.js} +1 -1
- package/dist/chunks/{magicDocs-BqZ0GewA.js → magicDocs-D1FIPmYg.js} +1 -1
- package/dist/chunks/main-B8XtFN2P.js +859 -0
- package/dist/chunks/{main-DeFMhaFE.js → main-CR7cXdgy.js} +3 -3
- package/dist/chunks/{mappers-CWykjGfP.js → mappers-DKU4RgE3.js} +1 -1
- package/dist/chunks/{mcp-DBwT4pa9.js → mcp-B06Mqsur.js} +4 -4
- package/dist/chunks/{mcp-DvZTaHZE.js → mcp-C0AjA07u.js} +1 -1
- package/dist/chunks/{mcp-CSFPAfaW.js → mcp-ghioDl7W.js} +1 -1
- package/dist/chunks/{memoize-BO31Ws9Q.js → memoize-DgMjqLtn.js} +1 -1
- package/dist/chunks/{memory-DcpPpYN0.js → memory-D-Q62bJ7.js} +1 -1
- package/dist/chunks/{metadata-BRLJvh61.js → metadata-CIx5CsoY.js} +1 -1
- package/dist/chunks/{mode-BkViT_0o.js → mode-DFZgqKBd.js} +1 -1
- package/dist/chunks/{model-DfFA3qMO.js → model-BgrLt7P7.js} +1 -1
- package/dist/chunks/model-aVc5c3Lz.js +1 -0
- package/dist/chunks/{model-CZktWw6o.js → model-fDWtIRVr.js} +1 -1
- package/dist/chunks/{nativeInstaller-GcIk7G2Y.js → nativeInstaller-DKe1pWoL.js} +1 -1
- package/dist/chunks/{onChangeAppState-DwGVi-BC.js → onChangeAppState-DaQ0R9Tw.js} +1 -1
- package/dist/chunks/{openai-B2wxZDQx.js → openai-DNS0-ivj.js} +1 -1
- package/dist/chunks/{overageCreditGrant-CjK49axw.js → overageCreditGrant-qHN3tnp2.js} +1 -1
- package/dist/chunks/{panel-R4ue6pSW.js → panel-Be-OxtqL.js} +1 -1
- package/dist/chunks/{panel-B-nrcHpm.js → panel-CrTPqXCv.js} +1 -1
- package/dist/chunks/{panelCall-I_fbgub5.js → panelCall-BvKpHquo.js} +1 -1
- package/dist/chunks/parser-Bj3gOqFv.js +1 -0
- package/dist/chunks/{parser-CQrasoUB.js → parser-TYEkLFgh.js} +1 -1
- package/dist/chunks/{partition-CxRF7T-f.js → partition-Cv11dD5P.js} +1 -1
- package/dist/chunks/{passes-U_h-hNu-.js → passes-DQdM2Ssq.js} +1 -1
- package/dist/chunks/{path-BCSE0S-c.js → path-Cu_AKqg6.js} +1 -1
- package/dist/chunks/{permissions-B8epy16o.js → permissions-DB_2mmCl.js} +1 -1
- package/dist/chunks/{pidLock-CBJDnBG_.js → pidLock-DchmaAK6.js} +2 -2
- package/dist/chunks/{pipeTransport-D3Qx9v1V.js → pipeTransport-7GIO6GCA.js} +1 -1
- package/dist/chunks/{plan-BAhStVci.js → plan-D8dQDl8W.js} +1 -1
- package/dist/chunks/{platform-EtecGacO.js → platform-B5dCGT8t.js} +1 -1
- package/dist/chunks/{plugin-D9huNnv6.js → plugin-w8MqsKHn.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-BfmyxR5g.js → pluginAutoupdate-7FFHzSRz.js} +1 -1
- package/dist/chunks/{pluginBlocklist-03sZaZa6.js → pluginBlocklist-Cw_l-yal.js} +1 -1
- package/dist/chunks/{pluginCliCommands-P2Ndi1r1.js → pluginCliCommands-BtYWRxhS.js} +1 -1
- package/dist/chunks/{pluginFlagging-BVy7Xv_0.js → pluginFlagging-_WUQP3Lq.js} +1 -1
- package/dist/chunks/{pluginOperations-Cz37qcjF.js → pluginOperations-BOkST1qE.js} +1 -1
- package/dist/chunks/{pluginStartupCheck-w24D-wwk.js → pluginStartupCheck-BelpzwZI.js} +1 -1
- package/dist/chunks/pluginStartupCheck-XBLJZZys.js +1 -0
- package/dist/chunks/{plugins-B0hiIN4q.js → plugins-6px6K1fh.js} +1 -1
- package/dist/chunks/policyLimits-C07tQ0Wr.js +1 -0
- package/dist/chunks/{poor-CfbMKZNJ.js → poor-D3T_8wwf.js} +1 -1
- package/dist/chunks/poorMode-BdBDiOFD.js +1 -0
- package/dist/chunks/{poorMode-Bsw2V-V_.js → poorMode-BqyVuBu-.js} +1 -1
- package/dist/chunks/{print-ozjC0Mhg.js → print-DcQSuK0v.js} +4 -4
- package/dist/chunks/{privacy-settings-DeGoBRrZ.js → privacy-settings-D5zxu4Aa.js} +1 -1
- package/dist/chunks/{processBashCommand-loWZ8MSE.js → processBashCommand-CEqA4QZi.js} +1 -1
- package/dist/chunks/{processSlashCommand-BdouajZb.js → processSlashCommand-DMpFk59M.js} +1 -1
- package/dist/chunks/prompt-CKvoqUC3.js +1 -0
- package/dist/chunks/prompt-aXZPR3q8.js +1 -0
- package/dist/chunks/{prompt-Bef63FhB.js → prompt-wys9CwDo.js} +1 -1
- package/dist/chunks/{promptEditor-foiayhdY.js → promptEditor-D6HzjcMS.js} +1 -1
- package/dist/chunks/{protocolHandler-BsiB1oW_.js → protocolHandler-BXlx1N7v.js} +1 -1
- package/dist/chunks/{proxy-Cn2YwITp.js → proxy-CHnxhNZI.js} +1 -1
- package/dist/chunks/{rate-limit-options-DTJPDcTr.js → rate-limit-options-1hc-RyNR.js} +1 -1
- package/dist/chunks/{rcDebugLog-BUuD-X1D.js → rcDebugLog-CivJaJ3V.js} +1 -1
- package/dist/chunks/{reconciler-DqXTmV3J.js → reconciler-BKX4jh34.js} +1 -1
- package/dist/chunks/{referral-DP_GshTS.js → referral-Cu9bEOFE.js} +1 -1
- package/dist/chunks/{refresh-CNzXPAFw.js → refresh-vJbxW4a1.js} +1 -1
- package/dist/chunks/{registerProtocol-CjxlFsKw.js → registerProtocol-B_XbLDQO.js} +3 -3
- package/dist/chunks/{release-notes-BxgK8zWO.js → release-notes-CavWoMQR.js} +1 -1
- package/dist/chunks/{releaseNotes-CbSktIJW.js → releaseNotes-Di6OaHF7.js} +2 -2
- package/dist/chunks/{reload-plugins-CDu6yU5-.js → reload-plugins-ofeLn07p.js} +1 -1
- package/dist/chunks/{remote-env-B4HnhISc.js → remote-env-dXzHAuD6.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-D-wG5jau.js → remoteBridgeCore-CmwkjiTK.js} +1 -1
- package/dist/chunks/{remoteManagedSettings-B7gt0VAX.js → remoteManagedSettings-Co-CxR67.js} +1 -1
- package/dist/chunks/{rename-DlbMb24l.js → rename-CtjP0lop.js} +1 -1
- package/dist/chunks/{renderOptions-5kWQpVr2.js → renderOptions-DOXmueQV.js} +1 -1
- package/dist/chunks/{resume-BB5iBogS.js → resume-C5h5JvY1.js} +1 -1
- package/dist/chunks/{ripgrep-BvDwiKJ3.js → ripgrep-BN_g-F7X.js} +1 -1
- package/dist/chunks/ripgrep-hOjrgpMp.js +1 -0
- package/dist/chunks/{runtimeObserver-Ci-5gvYg.js → runtimeObserver-B93v1AxE.js} +2 -2
- package/dist/chunks/{runtimeObserver-BNH2WGE3.js → runtimeObserver-DOZFrqJu.js} +1 -1
- package/dist/chunks/sandbox-adapter-CO5GuywY.js +1 -0
- package/dist/chunks/{sandbox-toggle-B2Yk4y2V.js → sandbox-toggle-TiLGFwaZ.js} +1 -1
- package/dist/chunks/searchExtraTools-CXZJU2Kv.js +1 -0
- package/dist/chunks/{session-Bmx7L3Mt.js → session-v9tKHhU9.js} +1 -1
- package/dist/chunks/{sessionDiscovery-DcEAr5vJ.js → sessionDiscovery-4byQKOnc.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-BUyIQVzL.js +1 -0
- package/dist/chunks/sessionMemory-ZsxCLHYd.js +1 -0
- package/dist/chunks/{sessionMemory-Bsg2unYX.js → sessionMemory-e6YpTUhW.js} +1 -1
- package/dist/chunks/sessionMemoryUtils-BD_dqyYB.js +1 -0
- package/dist/chunks/sessionObserver-DNItJztR.js +1 -0
- package/dist/chunks/{sessionObserver-DQwHsDrM.js → sessionObserver-OgY9BUP4.js} +1 -1
- package/dist/chunks/sessionStorage-xvxpRETp.js +1 -0
- package/dist/chunks/{sessionTitle-B8jcexkQ.js → sessionTitle-Bph6GO4F.js} +1 -1
- package/dist/chunks/{sessionTracing-BuLsL6qA.js → sessionTracing-BBxhPccY.js} +1 -1
- package/dist/chunks/{settings-5PQdphqC.js → settings-BhvhCpVh.js} +2 -2
- package/dist/chunks/settingsSync-D2B5K4BT.js +1 -0
- package/dist/chunks/{setup-BKEnSLR9.js → setup-CEnNEK6Z.js} +2 -2
- package/dist/chunks/{shadowedRuleDetection-7Z8ezTKF.js → shadowedRuleDetection-DDSOFi1W.js} +1 -1
- package/dist/chunks/{shellQuote-fB02N16J.js → shellQuote-yXoC_y5m.js} +1 -1
- package/dist/chunks/{sideQuestion-CYdNATPW.js → sideQuestion-CAiA6jAf.js} +1 -1
- package/dist/chunks/sink-CyKOf5TT.js +1 -0
- package/dist/chunks/{sink-DjKoYMsA.js → sink-DxPJ4khU.js} +1 -1
- package/dist/chunks/{sinks-GryGVRT8.js → sinks-BNo3DvxO.js} +2 -2
- package/dist/chunks/sinks-CHgtwDha.js +1 -0
- package/dist/chunks/{skill-learning-E8tQed-Q.js → skill-learning-Dx1o4mMo.js} +1 -1
- package/dist/chunks/{skillChangeDetector-A8SAuyo9.js → skillChangeDetector-BRBCwQ2w.js} +1 -1
- package/dist/chunks/{skillGapStore-B5rl12bV.js → skillGapStore-BV_6qzxU.js} +1 -1
- package/dist/chunks/{skillGapStore-CjJrxxjk.js → skillGapStore-Zvqiyxds.js} +2 -2
- package/dist/chunks/{skillGenerator-BDR_z3-X.js → skillGenerator-jJQDphQ8.js} +2 -2
- package/dist/chunks/skillLearning-BH7EAU1m.js +1 -0
- package/dist/chunks/{skillLearning-BQtfFE0g.js → skillLearning-BTT3_yGc.js} +1 -1
- package/dist/chunks/{skillPanel-yR8Oi-mO.js → skillPanel-OW2M6SZr.js} +3 -3
- package/dist/chunks/{skillSearchPanel-DUQQUCUS.js → skillSearchPanel-C0Y56c5N.js} +4 -4
- package/dist/chunks/{skills-NAZQ3j-t.js → skills-BFsyLP33.js} +1 -1
- package/dist/chunks/{startupProfiler-DxRQteII.js → startupProfiler-BquH_Yqm.js} +1 -1
- package/dist/chunks/startupProfiler-CYCH-qos.js +1 -0
- package/dist/chunks/state-BOa-3Av3.js +1 -0
- package/dist/chunks/{state-4KQ3kaqz.js → state-ix0xIunV.js} +1 -1
- package/dist/chunks/{stats-h4yu84Q-.js → stats-CrPmPT8f.js} +1 -1
- package/dist/chunks/{status-BbdeubJG.js → status-BO5J2MAe.js} +1 -1
- package/dist/chunks/{status-is_Bg_IB.js → status-DHJbK4pV.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-CQ7CUugR.js → statusNoticeHelpers-CqeUBySi.js} +1 -1
- package/dist/chunks/{stickers-qJoNhPk4.js → stickers-BLFmyHZV.js} +1 -1
- package/dist/chunks/{stringUtils-CvXbHQRH.js → stringUtils-D_g2L6A4.js} +1 -1
- package/dist/chunks/systemPromptSections-CR_AoPIX.js +1 -0
- package/dist/chunks/{systemPromptSections-CgpggIYX.js → systemPromptSections-DN0HGVye.js} +1 -1
- package/dist/chunks/{tag-i3HZ4lhj.js → tag-M2AEtXjW.js} +1 -1
- package/dist/chunks/{tasks-HzsYNTZ1.js → tasks-CoOs_Qkj.js} +1 -1
- package/dist/chunks/{teleport-hN3cAbYC.js → teleport-DjIgQeBB.js} +1 -1
- package/dist/chunks/{templateJobs-CIv_ysje.js → templateJobs-Cl50Qw0s.js} +1 -1
- package/dist/chunks/{terminalSetup-CxniwSF-.js → terminalSetup-Bdh9K31U.js} +1 -1
- package/dist/chunks/{terminalSetup-C0PF87iu.js → terminalSetup-nvS3KCDG.js} +1 -1
- package/dist/chunks/{theme-BKIHX_Dx.js → theme-DgCIr0jU.js} +1 -1
- package/dist/chunks/thinkback-BSv_fvbV.js +1 -0
- package/dist/chunks/{thinkback-mT-8FIT-.js → thinkback-ERCQ86CR.js} +1 -1
- package/dist/chunks/{thinkback-play-Cfk49mvF.js → thinkback-play-DNB0IWYt.js} +1 -1
- package/dist/chunks/{tmux-CbsW-VDJ.js → tmux-ZZk68JBq.js} +1 -1
- package/dist/chunks/{toolEventObserver-8FQtxeVv.js → toolEventObserver-9-5Ne25Z.js} +1 -1
- package/dist/chunks/{toolEventObserver-B1xvyKdE.js → toolEventObserver-9XCQXiMx.js} +1 -1
- package/dist/chunks/{toolPool-CHVDZqh7.js → toolPool-uQKZRMKg.js} +1 -1
- package/dist/chunks/trustedDevice-0ej6e3nx.js +1 -0
- package/dist/chunks/{trustedDevice-BYCh1ff7.js → trustedDevice-nqhuw4tp.js} +1 -1
- package/dist/chunks/{tui-fTa_pzdA.js → tui-C2yuCuOU.js} +3 -3
- package/dist/chunks/{types-a7X-tJpJ.js → types-Cnorfsss.js} +1 -1
- package/dist/chunks/{udsClient-Cg9bBD0p.js → udsClient-CiFj4M_h.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-DCFRZsKp.js → ultrareviewCommand-BMBHepdu.js} +1 -1
- package/dist/chunks/undercover-6UUO38fQ.js +1 -0
- package/dist/chunks/{undercover-CsLPQb-a.js → undercover-DDgIKbO5.js} +3 -3
- package/dist/chunks/{up-dO5BcPaq.js → up-D6bNw_tT.js} +1 -1
- package/dist/chunks/{updateCCB-CfUnkOLT.js → updateCCB-B-OlpLjA.js} +1 -1
- package/dist/chunks/{upgrade-kpttjebY.js → upgrade-BN20nsCH.js} +1 -1
- package/dist/chunks/upgrade-DYqlCH80.js +1 -0
- package/dist/chunks/{upload-DDhQqV8n.js → upload-BQGByiXE.js} +1 -1
- package/dist/chunks/{upstreamproxy-CvcjNY7J.js → upstreamproxy-os5rw0Vg.js} +1 -1
- package/dist/chunks/{usage-CJ5w0907.js → usage-D_sqm8us.js} +1 -1
- package/dist/chunks/usage-DolSCKGi.js +1 -0
- package/dist/chunks/{useExitOnCtrlCDWithKeybindings-yAroCqu4.js → useExitOnCtrlCDWithKeybindings-vzUoPY51.js} +1 -1
- package/dist/chunks/useMainLoopModel-cZd8EKo5.js +1 -0
- package/dist/chunks/{useManagePlugins-CTtPaQRP.js → useManagePlugins-DgGZBvXV.js} +1 -1
- package/dist/chunks/{useMergedTools-CZJffsmf.js → useMergedTools-Bb4XbC9d.js} +1 -1
- package/dist/chunks/{useSearchInput-C-CqUK6w.js → useSearchInput-B1UOjxAI.js} +1 -1
- package/dist/chunks/{useSettingsErrors-BWlJCgYF.js → useSettingsErrors-BLbvu4--.js} +1 -1
- package/dist/chunks/{util-DJV0joAW.js → util-CxlfALM4.js} +1 -1
- package/dist/chunks/validatePlugin-n8a4W_jI.js +1 -0
- package/dist/chunks/{vim-n8-UT5w-.js → vim-DLWBHwVM.js} +1 -1
- package/dist/chunks/{which-BBCjXfI2.js → which-sEFQXpaX.js} +1 -1
- package/dist/chunks/windowsPaths-BLevJOlm.js +1 -0
- package/dist/chunks/{windowsPaths-D6T_3XaU.js → windowsPaths-N_YmYY6k.js} +1 -1
- package/dist/chunks/{workSecret-C_lv0dRh.js → workSecret-DvniZR71.js} +1 -1
- package/dist/chunks/{workerRegistry-BdHi7_sN.js → workerRegistry-CFnGtb3L.js} +1 -1
- package/dist/chunks/worktree-Dr_WzlXs.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-DfAPwDix.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BV7HHcgL.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-CU5fCPKq.js +0 -1
- package/dist/chunks/Doctor-B0CRtxi2.js +0 -1
- package/dist/chunks/Grove-CelgLWH4.js +0 -1
- package/dist/chunks/Messages-jCoW_1Rr.js +0 -11
- package/dist/chunks/REPL-DcpN3MRC.js +0 -1
- package/dist/chunks/RemoteSessionManager-Tx1N2uVL.js +0 -2
- package/dist/chunks/SearchExtraToolsTool-D3VOFq9R.js +0 -1
- package/dist/chunks/WelcomeV2-BTfttGcv.js +0 -1
- package/dist/chunks/api-L2IgleTV.js +0 -1
- package/dist/chunks/api-TgV7fl9V.js +0 -1
- package/dist/chunks/asciicast-DYbkzGCN.js +0 -1
- package/dist/chunks/assistant-YvbVKjVh.js +0 -1
- package/dist/chunks/auth-CEig4Gxp.js +0 -1
- package/dist/chunks/auth-CbGDlhyO.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BNEKWHhH.js +0 -1
- package/dist/chunks/bg-BzG63WOm.js +0 -1
- package/dist/chunks/bridgeConfig-D5dB38xD.js +0 -1
- package/dist/chunks/bridgeEnabled-DKX8-T_H.js +0 -1
- package/dist/chunks/bridgeMain-d06JByZn.js +0 -1
- package/dist/chunks/caches-BuTIAOtY.js +0 -1
- package/dist/chunks/client-BeET1hnC.js +0 -1
- package/dist/chunks/commands-VjcG4qFq.js +0 -1
- package/dist/chunks/commitAttribution-Lb3qUlAR.js +0 -1
- package/dist/chunks/completionCache-CW8lKIgy.js +0 -1
- package/dist/chunks/config-0cRberzR.js +0 -1
- package/dist/chunks/config-BrxKpHpR.js +0 -1
- package/dist/chunks/context-noninteractive-rUZ3ydmJ.js +0 -1
- package/dist/chunks/conversation-oK3aFzqO.js +0 -1
- package/dist/chunks/createSession-DM4acqaC.js +0 -1
- package/dist/chunks/cwd-D-tY2NKc.js +0 -1
- package/dist/chunks/datadog-ByS7LGGa.js +0 -1
- package/dist/chunks/debug-DzZUT2Wv.js +0 -1
- package/dist/chunks/detectRepository-6nw-Aw3v.js +0 -1
- package/dist/chunks/doctor-CTMHXZvQ.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CGuIxFzJ.js +0 -1
- package/dist/chunks/envLessBridgeConfig-D_Jg4fJy.js +0 -1
- package/dist/chunks/extra-usage-BS4aVOt5.js +0 -1
- package/dist/chunks/extractMemories-C4f9JWuI.js +0 -1
- package/dist/chunks/fast-B0OB4x7K.js +0 -1
- package/dist/chunks/firstPartyEventLogger-CdUpe6Lh.js +0 -1
- package/dist/chunks/git-BE_FiJZp.js +0 -1
- package/dist/chunks/hooks-DONAb_nq.js +0 -1
- package/dist/chunks/inboundAttachments-BcEgi49j.js +0 -1
- package/dist/chunks/language-Da4KNbjm.js +0 -1
- package/dist/chunks/loadAgentsDir-Dgd-fzNt.js +0 -1
- package/dist/chunks/localSearch-D-FprOMr.js +0 -1
- package/dist/chunks/main-y7LJ5qUc.js +0 -1243
- package/dist/chunks/model--z4Di9QO.js +0 -1
- package/dist/chunks/parser-BlM_Fk4J.js +0 -1
- package/dist/chunks/pluginStartupCheck-BqUwHcMD.js +0 -1
- package/dist/chunks/policyLimits-Dem-XJ_h.js +0 -1
- package/dist/chunks/poorMode-jvImnkty.js +0 -1
- package/dist/chunks/prompt-C7wd1H_i.js +0 -1
- package/dist/chunks/prompt-DIoNqZvO.js +0 -1
- package/dist/chunks/ripgrep-BQgJ02F9.js +0 -1
- package/dist/chunks/sandbox-adapter-Coe1GDAE.js +0 -1
- package/dist/chunks/searchExtraTools-BnWZ9roi.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-BhdOmW9o.js +0 -1
- package/dist/chunks/sessionMemory-CIbCojm-.js +0 -1
- package/dist/chunks/sessionMemoryUtils-Cjb57wtC.js +0 -1
- package/dist/chunks/sessionObserver-CRU1qWnP.js +0 -1
- package/dist/chunks/sessionStorage-BxDN8qRc.js +0 -1
- package/dist/chunks/settingsSync-BDeuErb5.js +0 -1
- package/dist/chunks/sink-iYxWapbU.js +0 -1
- package/dist/chunks/sinks-jfaIjsRJ.js +0 -1
- package/dist/chunks/skillLearning-C8ihdryM.js +0 -1
- package/dist/chunks/startupProfiler-B0m6crkd.js +0 -1
- package/dist/chunks/state-53JDbNQM.js +0 -1
- package/dist/chunks/systemPromptSections-IePG5K8r.js +0 -1
- package/dist/chunks/thinkback-BA4cMz4D.js +0 -1
- package/dist/chunks/trustedDevice-DnIWErCt.js +0 -1
- package/dist/chunks/undercover-B-kKUWtK.js +0 -1
- package/dist/chunks/upgrade-CngUwvY4.js +0 -1
- package/dist/chunks/usage-eZRwLa77.js +0 -1
- package/dist/chunks/useMainLoopModel-BNFW-g8E.js +0 -1
- package/dist/chunks/validatePlugin-CRmpIGLV.js +0 -1
- package/dist/chunks/windowsPaths-DUKTzBck.js +0 -1
- package/dist/chunks/worktree-YDeHMlHZ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{D as i,I as a,P as o,T as s,Wt as c,fi as l,t as u,vn as d,y as f,yn as p}from"./src-CDCSSo0U2.js";import{t as m}from"./jsx-runtime-Bb4Xn-E0.js";import{Hb as h,L as g,Nb as _,Pb as v,R as y,Vb as b,ex as x,tx as S,z as C}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{D as i,I as a,P as o,T as s,Wt as c,fi as l,t as u,vn as d,y as f,yn as p}from"./src-CDCSSo0U2.js";import{t as m}from"./jsx-runtime-Bb4Xn-E0.js";import{Hb as h,L as g,Nb as _,Pb as v,R as y,Vb as b,ex as x,tx as S,z as C}from"./loadAgentsDir-ZQwvbURI.js";import{u as w}from"./referral-Cu9bEOFE.js";import{r as T,t as E}from"./directoryCompletion-CeV63gvu.js";import{r as D,t as O}from"./PromptInputFooterSuggestions-IaihWay3.js";function k(){return(0,P.jsx)(o,{dimColor:!0,children:`Claude Code will be able to read files in this directory and make edits when auto-accept edits is on.`})}function A({path:e}){return(0,P.jsxs)(a,{flexDirection:`column`,paddingX:2,gap:1,children:[(0,P.jsx)(o,{color:`permission`,children:e}),(0,P.jsx)(k,{})]})}function j({value:e,onChange:t,onSubmit:n,error:i,suggestions:s,selectedSuggestion:c}){return(0,P.jsxs)(a,{flexDirection:`column`,children:[(0,P.jsx)(o,{children:`Enter the path to the directory:`}),(0,P.jsx)(a,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,P.jsx)(x,{showCursor:!0,placeholder:`Directory path${r.ellipsis}`,value:e,onChange:t,onSubmit:n,columns:80,cursorOffset:e.length,onChangeCursorOffset:()=>{}})}),s.length>0&&(0,P.jsx)(a,{marginBottom:1,children:(0,P.jsx)(O,{suggestions:s,selectedSuggestion:c})}),i&&(0,P.jsx)(o,{color:`error`,children:i})]})}function M({onAddDirectory:e,onCancel:t,permissionContext:n,directoryPath:r}){let[l,u]=(0,N.useState)(``),[d,m]=(0,N.useState)(null),[h,v]=(0,N.useState)([]),[y,x]=(0,N.useState)(0),S=(0,N.useMemo)(()=>F,[]),w=p((0,N.useCallback)(async e=>{if(!e){v([]),x(0);return}let t=await E(e);v(t),x(0)},[]),100);(0,N.useEffect)(()=>{w(l)},[l,w]);let T=(0,N.useCallback)(e=>{let t=e.id+`/`;u(t),m(null)},[]),D=(0,N.useCallback)(async t=>{let r=await C(t,n);r.resultType===`success`?e(r.absolutePath,!1):m(g(r))},[n,e]);c(`confirm:no`,t,{context:`Settings`});let O=(0,N.useCallback)(e=>{if(h.length>0){if(e.key===`tab`){e.preventDefault();let t=h[y];t&&T(t);return}if(e.key===`return`){e.preventDefault();let t=h[y];t&&D(t.id+`/`);return}if(e.key===`up`||e.ctrl&&e.key===`p`){e.preventDefault(),x(e=>e<=0?h.length-1:e-1);return}if(e.key===`down`||e.ctrl&&e.key===`n`){e.preventDefault(),x(e=>e>=h.length-1?0:e+1);return}}},[h,y,T,D]),M=(0,N.useCallback)(n=>{if(r)switch(n){case`yes-session`:e(r,!1);break;case`yes-remember`:e(r,!0);break;case`no`:t();break}},[r,e,t]);return(0,P.jsx)(a,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:O,children:(0,P.jsx)(f,{title:`Add directory to workspace`,onCancel:t,color:`permission`,isCancelActive:!1,inputGuide:r?void 0:e=>e.pending?(0,P.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):(0,P.jsxs)(s,{children:[(0,P.jsx)(i,{shortcut:`Tab`,action:`complete`}),(0,P.jsx)(i,{shortcut:`Enter`,action:`add`}),(0,P.jsx)(b,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]}),children:r?(0,P.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,P.jsx)(A,{path:r}),(0,P.jsx)(_,{options:S,onChange:M,onCancel:()=>M(`no`)})]}):(0,P.jsxs)(a,{flexDirection:`column`,gap:1,marginX:2,children:[(0,P.jsx)(k,{}),(0,P.jsx)(j,{value:l,onChange:u,onSubmit:D,error:d,suggestions:h,selectedSuggestion:y})]})})})}var N,P,F,I=e((()=>{n(),l(),N=t(l(),1),d(),y(),S(),u(),w(),T(),h(),v(),D(),P=m(),F=[{value:`yes-session`,label:`Yes, for this session`},{value:`yes-remember`,label:`Yes, and remember this directory`},{value:`no`,label:`No`}]}));export{I as n,M as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-DaDcL9Zw.js";import{R as e,fi as t,t as n}from"./src-CDCSSo0U2.js";import{t as r}from"./jsx-runtime-Bb4Xn-E0.js";import{cS as i,lS as a}from"./loadAgentsDir-
|
|
1
|
+
import"./rolldown-runtime-DaDcL9Zw.js";import{R as e,fi as t,t as n}from"./src-CDCSSo0U2.js";import{t as r}from"./jsx-runtime-Bb4Xn-E0.js";import{cS as i,lS as a}from"./loadAgentsDir-ZQwvbURI.js";import{b as o,c as s,g as c}from"./config-662VDD70.js";import{n as l}from"./onChangeAppState-DaQ0R9Tw.js";import{t as u}from"./fpsMetrics-Cf_hdtiJ.js";import{t as d}from"./stats-CrPmPT8f.js";t(),a(),n(),c();var f=r();function p({getFpsMetrics:t,stats:n,initialState:r,children:a}){return(0,f.jsx)(u,{getFpsMetrics:t,children:(0,f.jsx)(d,{store:n,children:(0,f.jsx)(i,{initialState:r,onChangeAppState:l,children:(0,f.jsx)(e,{initialState:s().theme,onThemeSave:e=>o(t=>({...t,theme:e})),children:a})})})})}export{p as App};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ApproveApiKey-CYpBbj0k.js";export{e as ApproveApiKey};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-DaDcL9Zw.js";import{P as e,fi as t,t as n,y as r}from"./src-CDCSSo0U2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as a,Nb as o}from"./loadAgentsDir-
|
|
1
|
+
import"./rolldown-runtime-DaDcL9Zw.js";import{P as e,fi as t,t as n,y as r}from"./src-CDCSSo0U2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as a,Nb as o}from"./loadAgentsDir-ZQwvbURI.js";import{b as s,g as c}from"./config-662VDD70.js";t(),n(),c(),a();var l=i();function u({customApiKeyTruncated:t,onDone:n}){function i(e){switch(e){case`yes`:s(e=>({...e,customApiKeyResponses:{...e.customApiKeyResponses,approved:[...e.customApiKeyResponses?.approved??[],t]}})),n(!0);break;case`no`:s(e=>({...e,customApiKeyResponses:{...e.customApiKeyResponses,rejected:[...e.customApiKeyResponses?.rejected??[],t]}})),n(!1);break}}return(0,l.jsxs)(r,{title:`Detected a custom API key in your environment`,color:`warning`,onCancel:()=>i(`no`),children:[(0,l.jsxs)(e,{children:[(0,l.jsx)(e,{bold:!0,children:`ANTHROPIC_API_KEY`}),(0,l.jsxs)(e,{children:[`: sk-ant-...`,t]})]}),(0,l.jsx)(e,{children:`Do you want to use this API key?`}),(0,l.jsx)(o,{defaultValue:`no`,defaultFocusValue:`no`,options:[{label:`Yes`,value:`yes`},{label:(0,l.jsxs)(e,{children:[`No (`,(0,l.jsx)(e,{bold:!0,children:`recommended`}),`)`]}),value:`no`}],onChange:e=>i(e),onCancel:()=>i(`no`)})]})}export{u as t};
|
package/dist/chunks/{AssistantSessionChooser-Ce3PraaD.js → AssistantSessionChooser-DxKsTdqj.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,I as n,P as r,_ as i,fi as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{Bb as l,Lb as u}from"./loadAgentsDir-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gt as t,I as n,P as r,_ as i,fi as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{Bb as l,Lb as u}from"./loadAgentsDir-ZQwvbURI.js";import{u as d}from"./referral-Cu9bEOFE.js";import{t as f}from"./Dialog-vfLXEPed.js";import{t as p}from"./ListItem-vfLXEPed.js";var m=e(a(),1);o(),f(),p(),u(),d();var h=c();function g({sessions:e,onSelect:a,onCancel:o}){l(`assistant-session-chooser`);let[c,u]=(0,m.useState)(0);return t({"select:next":()=>u(t=>(t+1)%e.length),"select:previous":()=>u(t=>(t-1+e.length)%e.length),"select:accept":()=>a(e[c].id)},{context:`Select`}),(0,h.jsx)(s,{title:`Select Assistant Session`,onCancel:o,hideInputGuide:!0,children:(0,h.jsxs)(n,{flexDirection:`column`,gap:1,children:[(0,h.jsx)(r,{children:`Multiple sessions found. Select one to attach:`}),(0,h.jsx)(n,{flexDirection:`column`,children:e.map((e,t)=>(0,h.jsx)(i,{isFocused:c===t,children:(0,h.jsxs)(n,{children:[(0,h.jsx)(r,{children:e.title||e.id.slice(0,20)}),(0,h.jsxs)(r,{dimColor:!0,children:[` [`,e.status,`]`]})]})},e.id))}),(0,h.jsx)(r,{dimColor:!0,children:`↑↓ navigate · Enter select · Esc cancel`})]})})}export{g as AssistantSessionChooser};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,r}from"./rolldown-runtime-DaDcL9Zw.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{D as o,Gt as s,H as c,I as l,Lt as u,P as d,T as f,fi as p,mt as m,ot as h,t as g,y as _}from"./src-CDCSSo0U2.js";import{t as v}from"./jsx-runtime-Bb4Xn-E0.js";import{An as y,Au as b,Bb as ee,Bx as x,Cu as te,Dh as S,Eh as C,Eu as ne,Hv as w,Km as T,Lb as re,Mn as ie,Mu as ae,Nb as E,Pb as oe,Qa as se,Rv as ce,TS as D,Ub as O,Vv as k,Vx as le,Wb as ue,Xu as de,Yu as fe,Zv as pe,aO as me,df as he,fS as ge,ff as _e,ia as ve,jm as ye,km as be,ku as xe,lS as Se,na as Ce,nb as we,oO as Te,pf as Ee,qm as De,qo as Oe,qv as ke,rb as A,uS as Ae,uf as je,wo as Me,zo as Ne}from"./loadAgentsDir-nzr38hai.js";import{S as Pe,U as Fe,_ as Ie,z as Le}from"./debug-IKW-jE7K.js";import{Kt as Re,_n as ze,gn as j,nt as Be,vn as Ve}from"./settings-5PQdphqC.js";import{S as M,T as He,b as N,d as Ue,p as We,u as Ge}from"./startupProfiler-DxRQteII.js";import{l as P,o as Ke}from"./stringUtils-CvXbHQRH.js";import{Cn as qe,It as Je,Sn as Ye,Vt as Xe,xn as Ze}from"./prompt-Bef63FhB.js";import{u as F}from"./referral-DP_GshTS.js";import{n as Qe,t as $e}from"./browser-Bd7GeBH1.js";import{t as et}from"./Dialog-vfLXEPed.js";import{i as tt,n as nt}from"./mappers-CWykjGfP.js";function I(e,t,n=1e3,r=0,i){let a=()=>Ge(Math.max(0,(i??Date.now())-e-r));return(0,rt.useSyncExternalStore)((0,rt.useCallback)(e=>{if(!t)return()=>{};let r=setInterval(e,n);return()=>clearInterval(r)},[t,n]),a,a)}var rt,L=t((()=>{rt=n(p(),1),N()}));function it(e,t,n){let r=Ze(t,e.toolName);if(!r)return e.toolName;try{let t=r.inputSchema.safeParse(e.input),i=t.success?t.data:{},a=r.userFacingName(i);if(!a)return e.toolName;let o=r.renderToolUseMessage(i,{theme:n,verbose:!1});return o?(0,at.jsxs)(d,{children:[a,`(`,o,`)`]}):a}catch{return e.toolName}}var at,ot=t((()=>{p(),g(),qe(),at=v()}));function st(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:o}=t??{};return i?a.cross:r?a.questionMarkPrefix:o?a.warning:e===`running`?n?a.ellipsis:a.play:e===`completed`?a.tick:e===`failed`||e===`killed`?a.cross:a.bullet}function ct(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:a}=t??{};return i?`error`:r||a?`warning`:n?`background`:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:`background`}function lt(e,t){if(!t)return!1;let n=!1;for(let t of Object.values(e))if(!(!A(t)||process.env.USER_TYPE===`ant`&&ae(t)))return n=!0,!1;return n}var ut=t((()=>{i(),b(),we()}));function dt({agent:e,onDone:t,onKillAgent:n,onBack:r}){let[i]=c(),a=(0,ft.useMemo)(()=>fe(Ye()),[]),u=I(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);s({"confirm:yes":t},{context:`Confirmation`});let p=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},m=Me(e.prompt,`plan`),h=e.prompt.length>300?e.prompt.substring(0,297)+`…`:e.prompt,g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount;return(0,R.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:p,children:(0,R.jsx)(_,{title:(0,R.jsxs)(d,{children:[e.selectedAgent?.agentType??`agent`,` › `,e.description||`Async agent`]}),subtitle:(0,R.jsxs)(d,{children:[e.status!==`running`&&(0,R.jsxs)(d,{color:ct(e.status),children:[st(e.status),` `,e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,R.jsxs)(d,{dimColor:!0,children:[u,g!==void 0&&g>0&&(0,R.jsxs)(R.Fragment,{children:[` · `,We(g),` tokens`]}),v!==void 0&&v>0&&(0,R.jsxs)(R.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,R.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,R.jsxs)(f,{children:[r&&(0,R.jsx)(o,{shortcut:`←`,action:`go back`}),(0,R.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,R.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:(0,R.jsxs)(l,{flexDirection:`column`,children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,R.jsxs)(l,{flexDirection:`column`,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,R.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,it(t,a,i)]},n))]}),m?(0,R.jsx)(l,{marginTop:1,children:(0,R.jsx)(T,{addMargin:!1,planContent:m})}):(0,R.jsxs)(l,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,R.jsx)(d,{wrap:`wrap`,children:h})]}),e.status===`failed`&&e.error&&(0,R.jsxs)(l,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,R.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})})}var ft,R,pt=t((()=>{ft=n(p(),1),L(),g(),F(),qe(),de(),N(),Ne(),De(),ot(),ut(),R=v()}));function mt(e,t,n,r){if(!e)return`${t} found · ${n} verified`;if(e===`synthesizing`){let e=[`${n} verified`];return r>0&&e.push(`${r} refuted`),e.push(`deduping`),e.join(` · `)}if(e===`verifying`){let e=[`${t} found`,`${n} verified`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return t>0?`${t} found`:`finding`}function ht({text:e,phase:t=0}){return(0,z.jsx)(z.Fragment,{children:[...e].map((e,n)=>(0,z.jsx)(d,{color:me(n+t),children:e},n))})}function gt(e,t,n){let r=(0,yt.useRef)(e),i=(0,yt.useRef)(t);return n||e<r.current?r.current=e:e>r.current&&t!==i.current&&(r.current+=1,i.current=t),r.current}function _t({session:e}){let t=le().prefersReducedMotion??!1,n=e.reviewProgress,r=e.status===`running`,[,i]=m(r&&!t?bt:null),a=n?.bugsFound??0,o=n?.bugsVerified??0,s=n?.bugsRefuted??0,c=t||!r,l=gt(a,i,c),u=gt(o,i,c),f=gt(s,i,c),p=Math.floor(i/(bt*3))%7;if(e.status===`completed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(ht,{text:`ultrareview`,phase:0}),(0,z.jsx)(d,{dimColor:!0,children:` ready · shift+↓ to view`})]});if(e.status===`failed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(ht,{text:`ultrareview`,phase:0}),(0,z.jsxs)(d,{color:`error`,dimColor:!0,children:[` · `,`error`]})]});let h=n?mt(n.stage,l,u,f):`setting up`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◇`,` `]}),(0,z.jsx)(ht,{text:`ultrareview`,phase:r?p:0}),(0,z.jsxs)(d,{dimColor:!0,children:[` · `,h]})]})}function vt({session:e}){if(e.isRemoteReview)return(0,z.jsx)(_t,{session:e});if(e.status===`completed`)return(0,z.jsx)(d,{bold:!0,color:`success`,dimColor:!0,children:`done`});if(e.status===`failed`)return(0,z.jsx)(d,{bold:!0,color:`error`,dimColor:!0,children:`error`});if(!e.todoList.length)return(0,z.jsxs)(d,{dimColor:!0,children:[e.status,`…`]});let t=j(e.todoList,e=>e.status===`completed`),n=e.todoList.length;return(0,z.jsxs)(d,{dimColor:!0,children:[t,`/`,n]})}var yt,z,bt,xt=t((()=>{yt=n(p(),1),Re(),x(),g(),ze(),Te(),z=v(),bt=80}));function B({status:e,label:t,suffix:n}){return(0,V.jsxs)(d,{color:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:void 0,dimColor:!0,children:[`(`,t??e,n,`)`]})}function St({shell:e}){switch(e.status){case`completed`:return(0,V.jsx)(B,{status:`completed`,label:`done`});case`failed`:return(0,V.jsx)(B,{status:`failed`,label:`error`});case`killed`:return(0,V.jsx)(B,{status:`killed`,label:`stopped`});case`running`:case`pending`:return(0,V.jsx)(B,{status:`running`})}}var V,Ct=t((()=>{g(),V=v()}));function wt({task:e,maxActivityWidth:t}){let n=t??40;switch(e.type){case`local_bash`:return(0,H.jsxs)(d,{children:[M(e.kind===`monitor`?e.description:e.command,n,!0),` `,(0,H.jsx)(St,{shell:e})]});case`remote_agent`:return e.isRemoteReview?(0,H.jsx)(d,{children:(0,H.jsx)(vt,{session:e})}):(0,H.jsxs)(d,{children:[(0,H.jsxs)(d,{dimColor:!0,children:[e.status===`running`||e.status===`pending`?`◇`:`◆`,` `]}),M(e.title,n,!0),(0,H.jsx)(d,{dimColor:!0,children:` · `}),(0,H.jsx)(vt,{session:e})]});case`local_agent`:return(0,H.jsxs)(d,{children:[M(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`local_workflow`:{let t=e;return(0,H.jsxs)(d,{children:[M(t.workflowName??e.summary??e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`running`?`${t.agentCount} ${P(t.agentCount,`agent`)}`:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}case`monitor_mcp`:return(0,H.jsxs)(d,{children:[M(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`dream`:{let t=e.filesTouched.length,n=e.phase===`updating`&&t>0?`${t} ${P(t,`file`)}`:`${e.sessionsReviewing} ${P(e.sessionsReviewing,`session`)}`;return(0,H.jsxs)(d,{children:[e.description,` `,(0,H.jsxs)(d,{dimColor:!0,children:[`· `,e.phase,` · `,n]}),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}}}var H,Tt=t((()=>{p(),g(),N(),Ke(),Re(),xt(),Ct(),H=v()}));function Et({task:e,onDone:t,onBack:n,onKill:r}){let i=I(e.startTime,e.status===`running`,1e3,0);s({"confirm:yes":t},{context:`Confirmation`});let a=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&n?(i.preventDefault(),n()):i.key===`x`&&e.status===`running`&&r&&(i.preventDefault(),r())},c=e.turns.filter(e=>e.text!==``),u=c.slice(-6),p=c.length-u.length;return(0,U.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:a,children:(0,U.jsx)(_,{title:`Memory consolidation`,subtitle:(0,U.jsxs)(d,{dimColor:!0,children:[i,` · reviewing `,e.sessionsReviewing,` `,P(e.sessionsReviewing,`session`),e.filesTouched.length>0&&(0,U.jsxs)(U.Fragment,{children:[` `,`· `,e.filesTouched.length,` `,P(e.filesTouched.length,`file`),` touched`]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,U.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,U.jsxs)(f,{children:[n&&(0,U.jsx)(o,{shortcut:`←`,action:`go back`}),(0,U.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&r&&(0,U.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:(0,U.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,U.jsxs)(d,{children:[(0,U.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,U.jsx)(d,{color:`background`,children:`running`}):e.status===`completed`?(0,U.jsx)(d,{color:`success`,children:e.status}):(0,U.jsx)(d,{color:`error`,children:e.status})]}),u.length===0?(0,U.jsx)(d,{dimColor:!0,children:e.status===`running`?`Starting…`:`(no text output)`}):(0,U.jsxs)(U.Fragment,{children:[p>0&&(0,U.jsxs)(d,{dimColor:!0,children:[`(`,p,` earlier `,P(p,`turn`),`)`]}),u.map((e,t)=>(0,U.jsxs)(l,{flexDirection:`column`,children:[(0,U.jsx)(d,{wrap:`wrap`,children:e.text}),e.toolUseCount>0&&(0,U.jsxs)(d,{dimColor:!0,children:[` `,`(`,e.toolUseCount,` `,P(e.toolUseCount,`tool`),`)`]})]},t))]})]})})})}var U,Dt=t((()=>{p(),L(),g(),F(),Ke(),U=v()}));function Ot(e,t){if(e===`ExitPlanMode`)return`Review the plan in Claude Code on the web`;if(!t||typeof t!=`object`)return e;if(e===`AskUserQuestion`&&`questions`in t){let e=t.questions;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`){let t=`question`in e[0]&&typeof e[0].question==`string`&&e[0].question?e[0].question:`header`in e[0]&&typeof e[0].header==`string`?e[0].header:null;if(t)return`Answer in browser: ${He(t.replace(/\s+/g,` `).trim(),50)}`}}for(let n of Object.values(t))if(typeof n==`string`&&n.trim())return`${e} ${He(n.replace(/\s+/g,` `).trim(),60)}`;return e}function kt({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`running`||e.status===`pending`,o=e.ultraplanPhase,s=i?o?Pt[o]:`running`:e.status,c=I(e.startTime,i,1e3,0,e.endTime),{agentsWorking:f,toolCalls:p,lastToolCall:m}=(0,W.useMemo)(()=>{let t=0,n=0,r=null;for(let i of e.log){if(i.type!==`assistant`)continue;let e=i.message?.content??[];for(let i of e)i.type===`tool_use`&&(n++,r=i,(i.name===`Agent`||i.name===`Task`)&&t++)}return{agentsWorking:1+t,toolCalls:n,lastToolCall:r?Ot(r.name,r.input):null}},[e.log]),h=k(e.sessionId),g=n??(()=>t(`Remote session details dismissed`,{display:`system`})),[v,y]=(0,W.useState)(!1);return v?(0,G.jsx)(_,{title:`Stop ultraplan?`,onCancel:()=>y(!1),color:`background`,children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsx)(d,{dimColor:!0,children:`This will terminate the Claude Code on the web session.`}),(0,G.jsx)(E,{options:[{label:`Terminate session`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),g()):y(!1)}})]})}):(0,G.jsx)(_,{title:(0,G.jsxs)(d,{children:[(0,G.jsxs)(d,{color:`background`,children:[o===`plan_ready`?`◆`:`◇`,` `]}),(0,G.jsx)(d,{bold:!0,children:`ultraplan`}),(0,G.jsxs)(d,{dimColor:!0,children:[` · `,c,` · `,s]})]}),onCancel:g,color:`background`,children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsxs)(d,{children:[o===`plan_ready`&&(0,G.jsxs)(d,{color:`success`,children:[a.tick,` `]}),f,` `,P(f,`agent`),` `,o?Ft[o]:`working`,` · `,p,` tool`,` `,P(p,`call`)]}),m&&(0,G.jsx)(d,{dimColor:!0,children:m}),(0,G.jsx)(u,{url:h,children:(0,G.jsx)(d,{dimColor:!0,children:h})}),(0,G.jsx)(E,{options:[{label:`Review in Claude Code on the web`,value:`open`},...r&&i?[{label:`Stop ultraplan`,value:`stop`}]:[],{label:`Back`,value:`back`}],onChange:e=>{switch(e){case`open`:Qe(h),t();return;case`stop`:y(!0);return;case`back`:g();return}}})]})})}function At({stage:e,completed:t,hasProgress:n}){let r=e?It.indexOf(e):-1,i=!t&&!n;return(0,G.jsxs)(d,{children:[i?(0,G.jsx)(d,{color:`background`,children:`Setup`}):(0,G.jsx)(d,{dimColor:!0,children:`Setup`}),(0,G.jsx)(d,{dimColor:!0,children:` → `}),It.map((e,n)=>{let a=!t&&!i&&n===r;return(0,G.jsxs)(W.Fragment,{children:[n>0&&(0,G.jsx)(d,{dimColor:!0,children:` → `}),a?(0,G.jsx)(d,{color:`background`,children:Lt[e]}):(0,G.jsx)(d,{dimColor:!0,children:Lt[e]})]},e)}),t&&(0,G.jsx)(d,{color:`success`,children:` ✓`})]})}function jt(e){let t=e.reviewProgress;if(!t)return e.status===`completed`?`done`:`setting up`;let n=t.bugsVerified,r=t.bugsRefuted??0;if(e.status===`completed`){let e=[`${n} ${P(n,`finding`)}`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return mt(t.stage,t.bugsFound,n,r)}function Mt({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`completed`,a=e.status===`running`||e.status===`pending`,[s,c]=(0,W.useState)(!1),p=I(e.startTime,a,1e3,0,e.endTime),m=()=>t(`Remote session details dismissed`,{display:`system`}),h=n??m,g=k(e.sessionId),v=i?`ready`:a?`running`:e.status;if(s)return(0,G.jsx)(_,{title:`Stop ultrareview?`,onCancel:()=>c(!1),color:`background`,children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsx)(d,{dimColor:!0,children:`This archives the remote session and stops local tracking. The review will not complete and any findings so far are discarded.`}),(0,G.jsx)(E,{options:[{label:`Stop ultrareview`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),h()):c(!1)}})]})});let y=i?[{label:`Open in Claude Code on the web`,value:`open`},{label:`Dismiss`,value:`dismiss`}]:[{label:`Open in Claude Code on the web`,value:`open`},...r&&a?[{label:`Stop ultrareview`,value:`stop`}]:[],{label:`Back`,value:`back`}];return(0,G.jsx)(_,{title:(0,G.jsxs)(d,{children:[(0,G.jsxs)(d,{color:`background`,children:[i?`◆`:`◇`,` `]}),(0,G.jsx)(d,{bold:!0,children:`ultrareview`}),(0,G.jsxs)(d,{dimColor:!0,children:[` · `,p,` · `,v]})]}),onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,G.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,G.jsxs)(f,{children:[(0,G.jsx)(o,{shortcut:`Enter`,action:`select`}),(0,G.jsx)(o,{shortcut:`Esc`,action:`go back`})]}),children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsx)(At,{stage:e.reviewProgress?.stage,completed:i,hasProgress:!!e.reviewProgress}),(0,G.jsxs)(l,{flexDirection:`column`,children:[(0,G.jsx)(d,{children:jt(e)}),(0,G.jsx)(u,{url:g,children:(0,G.jsx)(d,{dimColor:!0,children:g})})]}),(0,G.jsx)(E,{options:y,onChange:e=>{switch(e){case`open`:Qe(g),t();break;case`stop`:c(!0);break;case`back`:h();break;case`dismiss`:m();break}}})]})})}function Nt({session:e,toolUseContext:t,onDone:n,onBack:r,onKill:i}){let[a,s]=(0,W.useState)(!1),[c,p]=(0,W.useState)(null),m=(0,W.useMemo)(()=>e.isUltraplan||e.isRemoteReview?[]:Oe(tt(e.log)).filter(e=>e.type!==`progress`).slice(-3),[e]);if(e.isUltraplan)return(0,G.jsx)(kt,{session:e,onDone:n,onBack:r,onKill:i});if(e.isRemoteReview)return(0,G.jsx)(Mt,{session:e,onDone:n,onBack:r,onKill:i});let h=()=>n(`Remote session details dismissed`,{display:`system`}),g=e=>{e.key===` `?(e.preventDefault(),n(`Remote session details dismissed`,{display:`system`})):e.key===`left`&&r?(e.preventDefault(),r()):e.key===`t`&&!a?(e.preventDefault(),v()):e.key===`return`&&(e.preventDefault(),h())};async function v(){s(!0),p(null);try{await pe(e.sessionId)}catch(e){p(Le(e))}finally{s(!1)}}let y=He(e.title,50),b=e.status===`pending`?`starting`:e.status;return(0,G.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:g,children:(0,G.jsxs)(_,{title:`Remote session details`,onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,G.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,G.jsxs)(f,{children:[r&&(0,G.jsx)(o,{shortcut:`←`,action:`go back`}),(0,G.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),!a&&(0,G.jsx)(o,{shortcut:`t`,action:`teleport`})]}),children:[(0,G.jsxs)(l,{flexDirection:`column`,children:[(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Status`}),`:`,` `,b===`running`||b===`starting`?(0,G.jsx)(d,{color:`background`,children:b}):b===`completed`?(0,G.jsx)(d,{color:`success`,children:b}):(0,G.jsx)(d,{color:`error`,children:b})]}),(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Runtime`}),`: `,Ge((e.endTime??Date.now())-e.startTime)]}),(0,G.jsxs)(d,{wrap:`truncate-end`,children:[(0,G.jsx)(d,{bold:!0,children:`Title`}),`: `,y]}),(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Progress`}),`: `,(0,G.jsx)(vt,{session:e})]}),(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Session URL`}),`:`,` `,(0,G.jsx)(u,{url:k(e.sessionId),children:(0,G.jsx)(d,{dimColor:!0,children:k(e.sessionId)})})]})]}),e.log.length>0&&(0,G.jsxs)(l,{flexDirection:`column`,marginTop:1,children:[(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Recent messages`}),`:`]}),(0,G.jsx)(l,{flexDirection:`column`,height:10,overflowY:`hidden`,children:m.map((e,n)=>(0,G.jsx)(be,{message:e,lookups:se,addMargin:n>0,tools:t.options.tools,commands:t.options.commands,verbose:t.options.verbose,inProgressToolUseIDs:new Set,progressMessagesForMessage:[],shouldAnimate:!1,shouldShowDot:!1,style:`condensed`,isTranscriptMode:!1,isStatic:!0},n))}),(0,G.jsx)(l,{marginTop:1,children:(0,G.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing last `,m.length,` of `,e.log.length,` messages`]})})]}),c&&(0,G.jsx)(l,{marginTop:1,children:(0,G.jsxs)(d,{color:`error`,children:[`Teleport failed: `,c]})}),a&&(0,G.jsx)(d,{color:`background`,children:`Teleporting to session…`})]})})}var W,G,Pt,Ft,It,Lt,Rt=t((()=>{i(),W=n(p(),1),Re(),L(),g(),w(),Be(),Je(),Xe(),$e(),Fe(),N(),nt(),Ne(),Ke(),ke(),oe(),ye(),xt(),G=v(),Pt={needs_input:`input required`,plan_ready:`ready`},Ft={needs_input:`waiting`,plan_ready:`done`},It=[`finding`,`verifying`,`synthesizing`],Lt={finding:`Find`,verifying:`Verify`,synthesizing:`Dedupe`}}));async function zt(e){let t=y(e.id);try{let e=await Pe(t,Ht);return{content:e.content,bytesTotal:e.bytesTotal}}catch{return{content:``,bytesTotal:0}}}function Bt({shell:e,onDone:t,onKillShell:n,onBack:r}){let{columns:i}=h(),[a,c]=(0,K.useState)(()=>zt(e)),u=(0,K.useDeferredValue)(a);(0,K.useEffect)(()=>{if(e.status!==`running`)return;let t=setInterval((e,t)=>e(zt(t)),1e3,c,e);return()=>clearInterval(t)},[e.id,e.status]);let p=()=>t(`Shell details dismissed`,{display:`system`});s({"confirm:yes":p},{context:`Confirmation`});let m=i=>{i.key===` `?(i.preventDefault(),t(`Shell details dismissed`,{display:`system`})):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},g=e.kind===`monitor`,v=He(e.command,280);return(0,q.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:m,children:(0,q.jsxs)(_,{title:g?`Monitor details`:`Shell details`,onCancel:p,color:`background`,inputGuide:t=>t.pending?(0,q.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,q.jsxs)(f,{children:[r&&(0,q.jsx)(o,{shortcut:`←`,action:`go back`}),(0,q.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,q.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:[(0,q.jsxs)(l,{flexDirection:`column`,children:[(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,q.jsxs)(d,{color:`background`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):e.status===`completed`?(0,q.jsxs)(d,{color:`success`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):(0,q.jsxs)(d,{color:`error`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]})]}),(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Runtime:`}),` `,Ge((e.endTime??Date.now())-e.startTime)]}),(0,q.jsxs)(d,{wrap:`wrap`,children:[(0,q.jsx)(d,{bold:!0,children:g?`Script:`:`Command:`}),` `,v]})]}),(0,q.jsxs)(l,{flexDirection:`column`,children:[(0,q.jsx)(d,{bold:!0,children:`Output:`}),(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(d,{dimColor:!0,children:`Loading output…`}),children:(0,q.jsx)(Vt,{outputPromise:u,columns:i})})]})]})})}function Vt({outputPromise:e,columns:t}){let{content:n,bytesTotal:r}=(0,K.use)(e);if(!n)return(0,q.jsx)(d,{dimColor:!0,children:`No output available`});let i=[],a=n.length;for(let e=0;e<10&&a>0;e++){let e=n.lastIndexOf(`
|
|
1
|
+
import{a as e,n as t,o as n,r}from"./rolldown-runtime-DaDcL9Zw.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{D as o,Gt as s,H as c,I as l,Lt as u,P as d,T as f,fi as p,mt as m,ot as h,t as g,y as _}from"./src-CDCSSo0U2.js";import{t as v}from"./jsx-runtime-Bb4Xn-E0.js";import{An as y,Au as b,Bb as ee,Bx as x,Cu as te,Dh as S,Eh as C,Eu as ne,Hv as w,Km as T,Lb as re,Mn as ie,Mu as ae,Nb as E,Pb as oe,Qa as se,Rv as ce,TS as D,Ub as O,Vv as k,Vx as le,Wb as ue,Xu as de,Yu as fe,Zv as pe,aO as me,df as he,fS as ge,ff as _e,ia as ve,jm as ye,km as be,ku as xe,lS as Se,na as Ce,nb as we,oO as Te,pf as Ee,qm as De,qo as Oe,qv as ke,rb as A,uS as Ae,uf as je,wo as Me,zo as Ne}from"./loadAgentsDir-ZQwvbURI.js";import{S as Pe,U as Fe,_ as Ie,z as Le}from"./debug-DiuXEmUq.js";import{Kt as Re,_n as ze,gn as j,nt as Be,vn as Ve}from"./settings-BhvhCpVh.js";import{S as M,T as He,b as N,d as Ue,p as We,u as Ge}from"./startupProfiler-BquH_Yqm.js";import{l as P,o as Ke}from"./stringUtils-D_g2L6A4.js";import{Cn as qe,It as Je,Sn as Ye,Vt as Xe,xn as Ze}from"./prompt-wys9CwDo.js";import{u as F}from"./referral-Cu9bEOFE.js";import{n as Qe,t as $e}from"./browser-BKiu1max.js";import{t as et}from"./Dialog-vfLXEPed.js";import{i as tt,n as nt}from"./mappers-DKU4RgE3.js";function I(e,t,n=1e3,r=0,i){let a=()=>Ge(Math.max(0,(i??Date.now())-e-r));return(0,rt.useSyncExternalStore)((0,rt.useCallback)(e=>{if(!t)return()=>{};let r=setInterval(e,n);return()=>clearInterval(r)},[t,n]),a,a)}var rt,L=t((()=>{rt=n(p(),1),N()}));function it(e,t,n){let r=Ze(t,e.toolName);if(!r)return e.toolName;try{let t=r.inputSchema.safeParse(e.input),i=t.success?t.data:{},a=r.userFacingName(i);if(!a)return e.toolName;let o=r.renderToolUseMessage(i,{theme:n,verbose:!1});return o?(0,at.jsxs)(d,{children:[a,`(`,o,`)`]}):a}catch{return e.toolName}}var at,ot=t((()=>{p(),g(),qe(),at=v()}));function st(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:o}=t??{};return i?a.cross:r?a.questionMarkPrefix:o?a.warning:e===`running`?n?a.ellipsis:a.play:e===`completed`?a.tick:e===`failed`||e===`killed`?a.cross:a.bullet}function ct(e,t){let{isIdle:n,awaitingApproval:r,hasError:i,shutdownRequested:a}=t??{};return i?`error`:r||a?`warning`:n?`background`:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:`background`}function lt(e,t){if(!t)return!1;let n=!1;for(let t of Object.values(e))if(!(!A(t)||process.env.USER_TYPE===`ant`&&ae(t)))return n=!0,!1;return n}var ut=t((()=>{i(),b(),we()}));function dt({agent:e,onDone:t,onKillAgent:n,onBack:r}){let[i]=c(),a=(0,ft.useMemo)(()=>fe(Ye()),[]),u=I(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);s({"confirm:yes":t},{context:`Confirmation`});let p=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},m=Me(e.prompt,`plan`),h=e.prompt.length>300?e.prompt.substring(0,297)+`…`:e.prompt,g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount;return(0,R.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:p,children:(0,R.jsx)(_,{title:(0,R.jsxs)(d,{children:[e.selectedAgent?.agentType??`agent`,` › `,e.description||`Async agent`]}),subtitle:(0,R.jsxs)(d,{children:[e.status!==`running`&&(0,R.jsxs)(d,{color:ct(e.status),children:[st(e.status),` `,e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,R.jsxs)(d,{dimColor:!0,children:[u,g!==void 0&&g>0&&(0,R.jsxs)(R.Fragment,{children:[` · `,We(g),` tokens`]}),v!==void 0&&v>0&&(0,R.jsxs)(R.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,R.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,R.jsxs)(f,{children:[r&&(0,R.jsx)(o,{shortcut:`←`,action:`go back`}),(0,R.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,R.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:(0,R.jsxs)(l,{flexDirection:`column`,children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,R.jsxs)(l,{flexDirection:`column`,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,R.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,it(t,a,i)]},n))]}),m?(0,R.jsx)(l,{marginTop:1,children:(0,R.jsx)(T,{addMargin:!1,planContent:m})}):(0,R.jsxs)(l,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,R.jsx)(d,{wrap:`wrap`,children:h})]}),e.status===`failed`&&e.error&&(0,R.jsxs)(l,{flexDirection:`column`,marginTop:1,children:[(0,R.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,R.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})})}var ft,R,pt=t((()=>{ft=n(p(),1),L(),g(),F(),qe(),de(),N(),Ne(),De(),ot(),ut(),R=v()}));function mt(e,t,n,r){if(!e)return`${t} found · ${n} verified`;if(e===`synthesizing`){let e=[`${n} verified`];return r>0&&e.push(`${r} refuted`),e.push(`deduping`),e.join(` · `)}if(e===`verifying`){let e=[`${t} found`,`${n} verified`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return t>0?`${t} found`:`finding`}function ht({text:e,phase:t=0}){return(0,z.jsx)(z.Fragment,{children:[...e].map((e,n)=>(0,z.jsx)(d,{color:me(n+t),children:e},n))})}function gt(e,t,n){let r=(0,yt.useRef)(e),i=(0,yt.useRef)(t);return n||e<r.current?r.current=e:e>r.current&&t!==i.current&&(r.current+=1,i.current=t),r.current}function _t({session:e}){let t=le().prefersReducedMotion??!1,n=e.reviewProgress,r=e.status===`running`,[,i]=m(r&&!t?bt:null),a=n?.bugsFound??0,o=n?.bugsVerified??0,s=n?.bugsRefuted??0,c=t||!r,l=gt(a,i,c),u=gt(o,i,c),f=gt(s,i,c),p=Math.floor(i/(bt*3))%7;if(e.status===`completed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(ht,{text:`ultrareview`,phase:0}),(0,z.jsx)(d,{dimColor:!0,children:` ready · shift+↓ to view`})]});if(e.status===`failed`)return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,z.jsx)(ht,{text:`ultrareview`,phase:0}),(0,z.jsxs)(d,{color:`error`,dimColor:!0,children:[` · `,`error`]})]});let h=n?mt(n.stage,l,u,f):`setting up`;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(d,{color:`background`,children:[`◇`,` `]}),(0,z.jsx)(ht,{text:`ultrareview`,phase:r?p:0}),(0,z.jsxs)(d,{dimColor:!0,children:[` · `,h]})]})}function vt({session:e}){if(e.isRemoteReview)return(0,z.jsx)(_t,{session:e});if(e.status===`completed`)return(0,z.jsx)(d,{bold:!0,color:`success`,dimColor:!0,children:`done`});if(e.status===`failed`)return(0,z.jsx)(d,{bold:!0,color:`error`,dimColor:!0,children:`error`});if(!e.todoList.length)return(0,z.jsxs)(d,{dimColor:!0,children:[e.status,`…`]});let t=j(e.todoList,e=>e.status===`completed`),n=e.todoList.length;return(0,z.jsxs)(d,{dimColor:!0,children:[t,`/`,n]})}var yt,z,bt,xt=t((()=>{yt=n(p(),1),Re(),x(),g(),ze(),Te(),z=v(),bt=80}));function B({status:e,label:t,suffix:n}){return(0,V.jsxs)(d,{color:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:void 0,dimColor:!0,children:[`(`,t??e,n,`)`]})}function St({shell:e}){switch(e.status){case`completed`:return(0,V.jsx)(B,{status:`completed`,label:`done`});case`failed`:return(0,V.jsx)(B,{status:`failed`,label:`error`});case`killed`:return(0,V.jsx)(B,{status:`killed`,label:`stopped`});case`running`:case`pending`:return(0,V.jsx)(B,{status:`running`})}}var V,Ct=t((()=>{g(),V=v()}));function wt({task:e,maxActivityWidth:t}){let n=t??40;switch(e.type){case`local_bash`:return(0,H.jsxs)(d,{children:[M(e.kind===`monitor`?e.description:e.command,n,!0),` `,(0,H.jsx)(St,{shell:e})]});case`remote_agent`:return e.isRemoteReview?(0,H.jsx)(d,{children:(0,H.jsx)(vt,{session:e})}):(0,H.jsxs)(d,{children:[(0,H.jsxs)(d,{dimColor:!0,children:[e.status===`running`||e.status===`pending`?`◇`:`◆`,` `]}),M(e.title,n,!0),(0,H.jsx)(d,{dimColor:!0,children:` · `}),(0,H.jsx)(vt,{session:e})]});case`local_agent`:return(0,H.jsxs)(d,{children:[M(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`local_workflow`:{let t=e;return(0,H.jsxs)(d,{children:[M(t.workflowName??e.summary??e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`running`?`${t.agentCount} ${P(t.agentCount,`agent`)}`:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}case`monitor_mcp`:return(0,H.jsxs)(d,{children:[M(e.description,n,!0),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`dream`:{let t=e.filesTouched.length,n=e.phase===`updating`&&t>0?`${t} ${P(t,`file`)}`:`${e.sessionsReviewing} ${P(e.sessionsReviewing,`session`)}`;return(0,H.jsxs)(d,{children:[e.description,` `,(0,H.jsxs)(d,{dimColor:!0,children:[`· `,e.phase,` · `,n]}),` `,(0,H.jsx)(B,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}}}var H,Tt=t((()=>{p(),g(),N(),Ke(),Re(),xt(),Ct(),H=v()}));function Et({task:e,onDone:t,onBack:n,onKill:r}){let i=I(e.startTime,e.status===`running`,1e3,0);s({"confirm:yes":t},{context:`Confirmation`});let a=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&n?(i.preventDefault(),n()):i.key===`x`&&e.status===`running`&&r&&(i.preventDefault(),r())},c=e.turns.filter(e=>e.text!==``),u=c.slice(-6),p=c.length-u.length;return(0,U.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:a,children:(0,U.jsx)(_,{title:`Memory consolidation`,subtitle:(0,U.jsxs)(d,{dimColor:!0,children:[i,` · reviewing `,e.sessionsReviewing,` `,P(e.sessionsReviewing,`session`),e.filesTouched.length>0&&(0,U.jsxs)(U.Fragment,{children:[` `,`· `,e.filesTouched.length,` `,P(e.filesTouched.length,`file`),` touched`]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,U.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,U.jsxs)(f,{children:[n&&(0,U.jsx)(o,{shortcut:`←`,action:`go back`}),(0,U.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&r&&(0,U.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:(0,U.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,U.jsxs)(d,{children:[(0,U.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,U.jsx)(d,{color:`background`,children:`running`}):e.status===`completed`?(0,U.jsx)(d,{color:`success`,children:e.status}):(0,U.jsx)(d,{color:`error`,children:e.status})]}),u.length===0?(0,U.jsx)(d,{dimColor:!0,children:e.status===`running`?`Starting…`:`(no text output)`}):(0,U.jsxs)(U.Fragment,{children:[p>0&&(0,U.jsxs)(d,{dimColor:!0,children:[`(`,p,` earlier `,P(p,`turn`),`)`]}),u.map((e,t)=>(0,U.jsxs)(l,{flexDirection:`column`,children:[(0,U.jsx)(d,{wrap:`wrap`,children:e.text}),e.toolUseCount>0&&(0,U.jsxs)(d,{dimColor:!0,children:[` `,`(`,e.toolUseCount,` `,P(e.toolUseCount,`tool`),`)`]})]},t))]})]})})})}var U,Dt=t((()=>{p(),L(),g(),F(),Ke(),U=v()}));function Ot(e,t){if(e===`ExitPlanMode`)return`Review the plan in Claude Code on the web`;if(!t||typeof t!=`object`)return e;if(e===`AskUserQuestion`&&`questions`in t){let e=t.questions;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`){let t=`question`in e[0]&&typeof e[0].question==`string`&&e[0].question?e[0].question:`header`in e[0]&&typeof e[0].header==`string`?e[0].header:null;if(t)return`Answer in browser: ${He(t.replace(/\s+/g,` `).trim(),50)}`}}for(let n of Object.values(t))if(typeof n==`string`&&n.trim())return`${e} ${He(n.replace(/\s+/g,` `).trim(),60)}`;return e}function kt({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`running`||e.status===`pending`,o=e.ultraplanPhase,s=i?o?Pt[o]:`running`:e.status,c=I(e.startTime,i,1e3,0,e.endTime),{agentsWorking:f,toolCalls:p,lastToolCall:m}=(0,W.useMemo)(()=>{let t=0,n=0,r=null;for(let i of e.log){if(i.type!==`assistant`)continue;let e=i.message?.content??[];for(let i of e)i.type===`tool_use`&&(n++,r=i,(i.name===`Agent`||i.name===`Task`)&&t++)}return{agentsWorking:1+t,toolCalls:n,lastToolCall:r?Ot(r.name,r.input):null}},[e.log]),h=k(e.sessionId),g=n??(()=>t(`Remote session details dismissed`,{display:`system`})),[v,y]=(0,W.useState)(!1);return v?(0,G.jsx)(_,{title:`Stop ultraplan?`,onCancel:()=>y(!1),color:`background`,children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsx)(d,{dimColor:!0,children:`This will terminate the Claude Code on the web session.`}),(0,G.jsx)(E,{options:[{label:`Terminate session`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),g()):y(!1)}})]})}):(0,G.jsx)(_,{title:(0,G.jsxs)(d,{children:[(0,G.jsxs)(d,{color:`background`,children:[o===`plan_ready`?`◆`:`◇`,` `]}),(0,G.jsx)(d,{bold:!0,children:`ultraplan`}),(0,G.jsxs)(d,{dimColor:!0,children:[` · `,c,` · `,s]})]}),onCancel:g,color:`background`,children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsxs)(d,{children:[o===`plan_ready`&&(0,G.jsxs)(d,{color:`success`,children:[a.tick,` `]}),f,` `,P(f,`agent`),` `,o?Ft[o]:`working`,` · `,p,` tool`,` `,P(p,`call`)]}),m&&(0,G.jsx)(d,{dimColor:!0,children:m}),(0,G.jsx)(u,{url:h,children:(0,G.jsx)(d,{dimColor:!0,children:h})}),(0,G.jsx)(E,{options:[{label:`Review in Claude Code on the web`,value:`open`},...r&&i?[{label:`Stop ultraplan`,value:`stop`}]:[],{label:`Back`,value:`back`}],onChange:e=>{switch(e){case`open`:Qe(h),t();return;case`stop`:y(!0);return;case`back`:g();return}}})]})})}function At({stage:e,completed:t,hasProgress:n}){let r=e?It.indexOf(e):-1,i=!t&&!n;return(0,G.jsxs)(d,{children:[i?(0,G.jsx)(d,{color:`background`,children:`Setup`}):(0,G.jsx)(d,{dimColor:!0,children:`Setup`}),(0,G.jsx)(d,{dimColor:!0,children:` → `}),It.map((e,n)=>{let a=!t&&!i&&n===r;return(0,G.jsxs)(W.Fragment,{children:[n>0&&(0,G.jsx)(d,{dimColor:!0,children:` → `}),a?(0,G.jsx)(d,{color:`background`,children:Lt[e]}):(0,G.jsx)(d,{dimColor:!0,children:Lt[e]})]},e)}),t&&(0,G.jsx)(d,{color:`success`,children:` ✓`})]})}function jt(e){let t=e.reviewProgress;if(!t)return e.status===`completed`?`done`:`setting up`;let n=t.bugsVerified,r=t.bugsRefuted??0;if(e.status===`completed`){let e=[`${n} ${P(n,`finding`)}`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return mt(t.stage,t.bugsFound,n,r)}function Mt({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`completed`,a=e.status===`running`||e.status===`pending`,[s,c]=(0,W.useState)(!1),p=I(e.startTime,a,1e3,0,e.endTime),m=()=>t(`Remote session details dismissed`,{display:`system`}),h=n??m,g=k(e.sessionId),v=i?`ready`:a?`running`:e.status;if(s)return(0,G.jsx)(_,{title:`Stop ultrareview?`,onCancel:()=>c(!1),color:`background`,children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsx)(d,{dimColor:!0,children:`This archives the remote session and stops local tracking. The review will not complete and any findings so far are discarded.`}),(0,G.jsx)(E,{options:[{label:`Stop ultrareview`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),h()):c(!1)}})]})});let y=i?[{label:`Open in Claude Code on the web`,value:`open`},{label:`Dismiss`,value:`dismiss`}]:[{label:`Open in Claude Code on the web`,value:`open`},...r&&a?[{label:`Stop ultrareview`,value:`stop`}]:[],{label:`Back`,value:`back`}];return(0,G.jsx)(_,{title:(0,G.jsxs)(d,{children:[(0,G.jsxs)(d,{color:`background`,children:[i?`◆`:`◇`,` `]}),(0,G.jsx)(d,{bold:!0,children:`ultrareview`}),(0,G.jsxs)(d,{dimColor:!0,children:[` · `,p,` · `,v]})]}),onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,G.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,G.jsxs)(f,{children:[(0,G.jsx)(o,{shortcut:`Enter`,action:`select`}),(0,G.jsx)(o,{shortcut:`Esc`,action:`go back`})]}),children:(0,G.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,G.jsx)(At,{stage:e.reviewProgress?.stage,completed:i,hasProgress:!!e.reviewProgress}),(0,G.jsxs)(l,{flexDirection:`column`,children:[(0,G.jsx)(d,{children:jt(e)}),(0,G.jsx)(u,{url:g,children:(0,G.jsx)(d,{dimColor:!0,children:g})})]}),(0,G.jsx)(E,{options:y,onChange:e=>{switch(e){case`open`:Qe(g),t();break;case`stop`:c(!0);break;case`back`:h();break;case`dismiss`:m();break}}})]})})}function Nt({session:e,toolUseContext:t,onDone:n,onBack:r,onKill:i}){let[a,s]=(0,W.useState)(!1),[c,p]=(0,W.useState)(null),m=(0,W.useMemo)(()=>e.isUltraplan||e.isRemoteReview?[]:Oe(tt(e.log)).filter(e=>e.type!==`progress`).slice(-3),[e]);if(e.isUltraplan)return(0,G.jsx)(kt,{session:e,onDone:n,onBack:r,onKill:i});if(e.isRemoteReview)return(0,G.jsx)(Mt,{session:e,onDone:n,onBack:r,onKill:i});let h=()=>n(`Remote session details dismissed`,{display:`system`}),g=e=>{e.key===` `?(e.preventDefault(),n(`Remote session details dismissed`,{display:`system`})):e.key===`left`&&r?(e.preventDefault(),r()):e.key===`t`&&!a?(e.preventDefault(),v()):e.key===`return`&&(e.preventDefault(),h())};async function v(){s(!0),p(null);try{await pe(e.sessionId)}catch(e){p(Le(e))}finally{s(!1)}}let y=He(e.title,50),b=e.status===`pending`?`starting`:e.status;return(0,G.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:g,children:(0,G.jsxs)(_,{title:`Remote session details`,onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,G.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,G.jsxs)(f,{children:[r&&(0,G.jsx)(o,{shortcut:`←`,action:`go back`}),(0,G.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),!a&&(0,G.jsx)(o,{shortcut:`t`,action:`teleport`})]}),children:[(0,G.jsxs)(l,{flexDirection:`column`,children:[(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Status`}),`:`,` `,b===`running`||b===`starting`?(0,G.jsx)(d,{color:`background`,children:b}):b===`completed`?(0,G.jsx)(d,{color:`success`,children:b}):(0,G.jsx)(d,{color:`error`,children:b})]}),(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Runtime`}),`: `,Ge((e.endTime??Date.now())-e.startTime)]}),(0,G.jsxs)(d,{wrap:`truncate-end`,children:[(0,G.jsx)(d,{bold:!0,children:`Title`}),`: `,y]}),(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Progress`}),`: `,(0,G.jsx)(vt,{session:e})]}),(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Session URL`}),`:`,` `,(0,G.jsx)(u,{url:k(e.sessionId),children:(0,G.jsx)(d,{dimColor:!0,children:k(e.sessionId)})})]})]}),e.log.length>0&&(0,G.jsxs)(l,{flexDirection:`column`,marginTop:1,children:[(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Recent messages`}),`:`]}),(0,G.jsx)(l,{flexDirection:`column`,height:10,overflowY:`hidden`,children:m.map((e,n)=>(0,G.jsx)(be,{message:e,lookups:se,addMargin:n>0,tools:t.options.tools,commands:t.options.commands,verbose:t.options.verbose,inProgressToolUseIDs:new Set,progressMessagesForMessage:[],shouldAnimate:!1,shouldShowDot:!1,style:`condensed`,isTranscriptMode:!1,isStatic:!0},n))}),(0,G.jsx)(l,{marginTop:1,children:(0,G.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing last `,m.length,` of `,e.log.length,` messages`]})})]}),c&&(0,G.jsx)(l,{marginTop:1,children:(0,G.jsxs)(d,{color:`error`,children:[`Teleport failed: `,c]})}),a&&(0,G.jsx)(d,{color:`background`,children:`Teleporting to session…`})]})})}var W,G,Pt,Ft,It,Lt,Rt=t((()=>{i(),W=n(p(),1),Re(),L(),g(),w(),Be(),Je(),Xe(),$e(),Fe(),N(),nt(),Ne(),Ke(),ke(),oe(),ye(),xt(),G=v(),Pt={needs_input:`input required`,plan_ready:`ready`},Ft={needs_input:`waiting`,plan_ready:`done`},It=[`finding`,`verifying`,`synthesizing`],Lt={finding:`Find`,verifying:`Verify`,synthesizing:`Dedupe`}}));async function zt(e){let t=y(e.id);try{let e=await Pe(t,Ht);return{content:e.content,bytesTotal:e.bytesTotal}}catch{return{content:``,bytesTotal:0}}}function Bt({shell:e,onDone:t,onKillShell:n,onBack:r}){let{columns:i}=h(),[a,c]=(0,K.useState)(()=>zt(e)),u=(0,K.useDeferredValue)(a);(0,K.useEffect)(()=>{if(e.status!==`running`)return;let t=setInterval((e,t)=>e(zt(t)),1e3,c,e);return()=>clearInterval(t)},[e.id,e.status]);let p=()=>t(`Shell details dismissed`,{display:`system`});s({"confirm:yes":p},{context:`Confirmation`});let m=i=>{i.key===` `?(i.preventDefault(),t(`Shell details dismissed`,{display:`system`})):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},g=e.kind===`monitor`,v=He(e.command,280);return(0,q.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:m,children:(0,q.jsxs)(_,{title:g?`Monitor details`:`Shell details`,onCancel:p,color:`background`,inputGuide:t=>t.pending?(0,q.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,q.jsxs)(f,{children:[r&&(0,q.jsx)(o,{shortcut:`←`,action:`go back`}),(0,q.jsx)(o,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,q.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:[(0,q.jsxs)(l,{flexDirection:`column`,children:[(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,q.jsxs)(d,{color:`background`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):e.status===`completed`?(0,q.jsxs)(d,{color:`success`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]}):(0,q.jsxs)(d,{color:`error`,children:[e.status,e.result?.code!==void 0&&` (exit code: ${e.result.code})`]})]}),(0,q.jsxs)(d,{children:[(0,q.jsx)(d,{bold:!0,children:`Runtime:`}),` `,Ge((e.endTime??Date.now())-e.startTime)]}),(0,q.jsxs)(d,{wrap:`wrap`,children:[(0,q.jsx)(d,{bold:!0,children:g?`Script:`:`Command:`}),` `,v]})]}),(0,q.jsxs)(l,{flexDirection:`column`,children:[(0,q.jsx)(d,{bold:!0,children:`Output:`}),(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(d,{dimColor:!0,children:`Loading output…`}),children:(0,q.jsx)(Vt,{outputPromise:u,columns:i})})]})]})})}function Vt({outputPromise:e,columns:t}){let{content:n,bytesTotal:r}=(0,K.use)(e);if(!n)return(0,q.jsx)(d,{dimColor:!0,children:`No output available`});let i=[],a=n.length;for(let e=0;e<10&&a>0;e++){let e=n.lastIndexOf(`
|
|
2
2
|
`,a-1);i.push(e+1),a=e}i.reverse();let o=r>n.length,s=[];for(let e=0;e<i.length;e++){let t=i[e],r=e<i.length-1?i[e+1]-1:n.length,a=n.slice(t,r);a&&s.push(a)}return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(l,{borderStyle:`round`,paddingX:1,flexDirection:`column`,height:12,maxWidth:t-6,children:s.map((e,t)=>(0,q.jsx)(d,{wrap:`truncate-end`,children:e},t))}),(0,q.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing ${s.length} lines`,o?` of ${Ue(r)}`:``]})]})}var K,q,Ht,Ut=t((()=>{K=n(p(),1),D(),g(),F(),N(),Ie(),ie(),q=v(),Ht=8192})),Wt=t((()=>{g()})),Gt=t((()=>{g()})),Kt=r({MonitorMcpDetailDialog:()=>qt});function qt({task:e,onBack:t,onKill:n}){let r=I(e.startTime,e.status===`running`,1e3,0);return s({},{context:`MonitorMcpDetail`}),(0,J.jsx)(l,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:r=>{r.key===`left`&&t?(r.preventDefault(),t()):r.key===`x`&&e.status===`running`&&n&&(r.preventDefault(),n())},children:(0,J.jsx)(_,{title:`MCP Monitor`,subtitle:(0,J.jsxs)(d,{dimColor:!0,children:[r,` · `,e.serverName,`:`,e.resourceUri]}),onCancel:t??(()=>{}),inputGuide:()=>(0,J.jsxs)(f,{children:[t&&(0,J.jsx)(o,{shortcut:`←`,action:`go back`}),(0,J.jsx)(o,{shortcut:`Esc`,action:`close`}),e.status===`running`&&n&&(0,J.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:(0,J.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,J.jsx)(d,{color:`ansi:green`,children:`running`}):e.status===`completed`?(0,J.jsx)(d,{color:`ansi:green`,children:e.status}):(0,J.jsx)(d,{color:`ansi:red`,children:e.status})]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Description:`}),` `,e.description]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Server:`}),` `,e.serverName]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Resource:`}),` `,e.resourceUri]}),e.command&&(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Command:`}),` `,e.command]})]})})})}var J,Jt=t((()=>{p(),L(),g(),F(),Wt(),et(),Gt(),J=v()}));function Yt(e,t){return Object.values(e??{}).filter(A).filter(e=>!(e.type===`local_agent`&&e.id===t))}function Xt({onDone:e,toolUseContext:t,initialDetailTaskId:n}){let r=Ae(e=>e.tasks),i=Ae(e=>e.foregroundedTaskId),a=ge(),c=ue(`chat:killAgents`,`Chat`,`ctrl+x ctrl+k`),u=r,p=(0,X.useRef)(!1),[m,h]=(0,X.useState)(()=>{if(n)return p.current=!0,{mode:`detail`,itemId:n};let e=Yt(u,i);return e.length===1?(p.current=!0,{mode:`detail`,itemId:e[0].id}):{mode:`list`}}),[g,v]=(0,X.useState)(0);ee(`background-tasks-dialog`);let{bashTasks:y,remoteSessions:b,agentTasks:x,workflowTasks:S,mcpMonitors:C,dreamTasks:ne,allSelectableItems:w}=(0,X.useMemo)(()=>{let e=Object.values(u??{}).filter(A).map(Zt).sort((e,t)=>{let n=e.status,r=t.status;if(n===`running`&&r!==`running`)return-1;if(n!==`running`&&r===`running`)return 1;let i=`task`in e?e.task.startTime:0;return(`task`in t?t.task.startTime:0)-i}),t=e.filter(e=>e.type===`local_bash`),n=e.filter(e=>e.type===`remote_agent`),r=e.filter(e=>e.type===`local_agent`&&e.id!==i),a=e.filter(e=>e.type===`local_workflow`),o=e.filter(e=>e.type===`monitor_mcp`),s=e.filter(e=>e.type===`dream`);return{bashTasks:t,remoteSessions:n,agentTasks:r,workflowTasks:a,mcpMonitors:o,dreamTasks:s,allSelectableItems:[...t,...o,...n,...r,...a,...s]}},[u,i]),T=w[g]??null;s({"confirm:previous":()=>v(e=>Math.max(0,e-1)),"confirm:next":()=>v(e=>Math.min(w.length-1,e+1)),"confirm:yes":()=>{let e=w[g];e&&h({mode:`detail`,itemId:e.id})}},{context:`Confirmation`,isActive:m.mode===`list`});let re=t=>{if(m.mode!==`list`)return;if(t.key===`left`){t.preventDefault(),e(`Background tasks dialog dismissed`,{display:`system`});return}let n=w[g];n&&t.key===`x`&&(t.preventDefault(),n.type===`local_bash`&&n.status===`running`?ie(n.id):n.type===`local_agent`&&n.status===`running`?ae(n.id):n.type===`local_workflow`&&n.status===`running`&&Q?Q(n.id,a):n.type===`monitor_mcp`&&n.status===`running`&&$?$(n.id,a):n.type===`dream`&&n.status===`running`?E(n.id):n.type===`remote_agent`&&n.status===`running`&&(n.task.isUltraplan?ve(n.id,n.task.sessionId,a):oe(n.id)))};async function ie(e){await te.kill(e,a)}async function ae(e){await xe.kill(e,a)}async function E(e){await _e.kill(e,a)}async function oe(e){await ce.kill(e,a)}let se=(0,X.useEffectEvent)(e);(0,X.useEffect)(()=>{if(m.mode!==`list`){let e=(u??{})[m.itemId];(!e||e.type!==`local_workflow`&&!A(e))&&(p.current?se(`Background tasks dialog dismissed`,{display:`system`}):h({mode:`list`}))}let e=w.length;g>=e&&e>0&&v(e-1)},[m,u,g,w,se]);let D=()=>{p.current&&w.length<=1?e(`Background tasks dialog dismissed`,{display:`system`}):(p.current=!1,h({mode:`list`}))};if(m.mode!==`list`&&u){let n=u[m.itemId];if(!n)return null;switch(n.type){case`local_bash`:return(0,Z.jsx)(Bt,{shell:n,onDone:e,onKillShell:()=>void ie(n.id),onBack:D},`shell-${n.id}`);case`local_agent`:return(0,Z.jsx)(dt,{agent:n,onDone:e,onKillAgent:()=>void ae(n.id),onBack:D},`agent-${n.id}`);case`remote_agent`:return(0,Z.jsx)(Nt,{session:n,onDone:e,toolUseContext:t,onBack:D,onKill:n.status===`running`?n.isUltraplan?()=>void ve(n.id,n.sessionId,a):()=>void oe(n.id):void 0},`session-${n.id}`);case`local_workflow`:{let e=n.status===`running`&&Q?()=>Q(n.id,a):void 0;return(0,Z.jsx)(l,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:t=>{t.key===`left`?(t.preventDefault(),D()):t.key===`x`&&e&&(t.preventDefault(),e())},children:(0,Z.jsx)(_,{title:n.workflowName,subtitle:(0,Z.jsxs)(d,{dimColor:!0,children:[n.status,n.summary?` · ${n.summary}`:``]}),onCancel:D,inputGuide:()=>(0,Z.jsxs)(f,{children:[(0,Z.jsx)(o,{shortcut:`←`,action:`go back`}),(0,Z.jsx)(o,{shortcut:`Esc`,action:`close`}),e&&(0,Z.jsx)(o,{shortcut:`x`,action:`stop`})]}),children:n.status===`failed`&&n.error?(0,Z.jsxs)(l,{flexDirection:`column`,children:[(0,Z.jsxs)(d,{color:`error`,children:[`失败原因:`,n.error]}),(0,Z.jsx)(d,{color:`subtle`,children:`用 /workflows 查看阶段与 agent 实时进度`})]}):(0,Z.jsx)(d,{color:`subtle`,children:`用 /workflows 查看阶段与 agent 实时进度`})})},`workflow-${n.id}`)}case`monitor_mcp`:return Qt?(0,Z.jsx)(Qt,{task:n,onKill:n.status===`running`&&$?()=>$(n.id,a):void 0,onBack:D},`monitor-mcp-${n.id}`):null;case`dream`:return(0,Z.jsx)(Et,{task:n,onDone:()=>e(`Background tasks dialog dismissed`,{display:`system`}),onBack:D,onKill:n.status===`running`?()=>void E(n.id):void 0},`dream-${n.id}`)}}let O=j(y,e=>e.status===`running`),k=j(b,e=>e.status===`running`||e.status===`pending`)+j(x,e=>e.status===`running`),le=Ve([...O>0?[(0,Z.jsxs)(d,{children:[O,` `,O===1?`active shell`:`active shells`]},`shells`)]:[],...k>0?[(0,Z.jsxs)(d,{children:[k,` `,k===1?`active agent`:`active agents`]},`agents`)]:[]],e=>(0,Z.jsx)(d,{children:` · `},`separator-${e}`)),de=[(0,Z.jsx)(o,{shortcut:`↑/↓`,action:`select`},`upDown`),(0,Z.jsx)(o,{shortcut:`Enter`,action:`view`},`enter`),...(T?.type===`local_bash`||T?.type===`local_agent`||T?.type===`local_workflow`||T?.type===`monitor_mcp`||T?.type===`dream`||T?.type===`remote_agent`)&&T.status===`running`?[(0,Z.jsx)(o,{shortcut:`x`,action:`stop`},`kill`)]:[],...x.some(e=>e.status===`running`)?[(0,Z.jsx)(o,{shortcut:c,action:`stop all agents`},`kill-all`)]:[],(0,Z.jsx)(o,{shortcut:`←/Esc`,action:`close`},`esc`)],fe=()=>e(`Background tasks dialog dismissed`,{display:`system`});function pe(e){return e.pending?(0,Z.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,Z.jsx)(f,{children:de})}return(0,Z.jsx)(l,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:re,children:(0,Z.jsx)(_,{title:`Background tasks`,subtitle:(0,Z.jsx)(Z.Fragment,{children:le}),onCancel:fe,color:`background`,inputGuide:pe,children:w.length===0?(0,Z.jsx)(d,{dimColor:!0,children:`No tasks currently running`}):(0,Z.jsxs)(l,{flexDirection:`column`,children:[y.length>0&&(0,Z.jsxs)(l,{flexDirection:`column`,children:[(b.length>0||x.length>0)&&(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Shells`]}),` (`,y.length,`)`]}),(0,Z.jsx)(l,{flexDirection:`column`,children:y.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===T?.id},e.id))})]}),C.length>0&&(0,Z.jsxs)(l,{flexDirection:`column`,marginTop:+(y.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Monitors`]}),` (`,C.length,`)`]}),(0,Z.jsx)(l,{flexDirection:`column`,children:C.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===T?.id},e.id))})]}),b.length>0&&(0,Z.jsxs)(l,{flexDirection:`column`,marginTop:+(y.length>0||C.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Remote agents`]}),` (`,b.length,`)`]}),(0,Z.jsx)(l,{flexDirection:`column`,children:b.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===T?.id},e.id))})]}),x.length>0&&(0,Z.jsxs)(l,{flexDirection:`column`,marginTop:+(y.length>0||C.length>0||b.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Local agents`]}),` (`,x.length,`)`]}),(0,Z.jsx)(l,{flexDirection:`column`,children:x.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===T?.id},e.id))})]}),S.length>0&&(0,Z.jsxs)(l,{flexDirection:`column`,marginTop:+(y.length>0||C.length>0||b.length>0||x.length>0),children:[(0,Z.jsxs)(d,{dimColor:!0,children:[(0,Z.jsxs)(d,{bold:!0,children:[` `,`Workflows`]}),` (`,S.length,`)`]}),(0,Z.jsx)(l,{flexDirection:`column`,children:S.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===T?.id},e.id))})]}),ne.length>0&&(0,Z.jsx)(l,{flexDirection:`column`,marginTop:+(y.length>0||C.length>0||b.length>0||x.length>0||S.length>0),children:(0,Z.jsx)(l,{flexDirection:`column`,children:ne.map(e=>(0,Z.jsx)(Y,{item:e,isSelected:e.id===T?.id},e.id))})})]})})})}function Zt(e){switch(e.type){case`local_bash`:return{id:e.id,type:`local_bash`,label:e.kind===`monitor`?e.description:e.command,status:e.status,task:e};case`remote_agent`:return{id:e.id,type:`remote_agent`,label:e.title,status:e.status,task:e};case`local_agent`:return{id:e.id,type:`local_agent`,label:e.description,status:e.status,task:e};case`local_workflow`:return{id:e.id,type:`local_workflow`,label:e.summary??e.description,status:e.status,task:e};case`monitor_mcp`:return{id:e.id,type:`monitor_mcp`,label:e.description,status:e.status,task:e};case`dream`:return{id:e.id,type:`dream`,label:e.description,status:e.status,task:e}}}function Y({item:e,isSelected:t}){let{columns:n}=h(),r=Math.max(30,n-26);return(0,Z.jsxs)(l,{flexDirection:`row`,children:[(0,Z.jsx)(d,{children:t?a.pointer+` `:` `}),(0,Z.jsx)(d,{color:t?`suggestion`:void 0,children:(0,Z.jsx)(wt,{task:e.task,maxActivityWidth:r})})]})}var X,Z,Q,$,Qt,$t=t((()=>{i(),X=n(p(),1),D(),Se(),Ee(),b(),ne(),w(),we(),ze(),Ce(),re(),g(),F(),O(),pt(),Tt(),Dt(),Rt(),Ut(),Z=v(),Q=(he(),e(je))?.killWorkflowTask??null,$=(S(),e(C))?.killMonitorMcp??null,Qt=(Jt(),e(Kt)).MonitorMcpDetailDialog}));export{L as a,lt as i,$t as n,I as o,ut as r,Xt as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,Lt as n,P as r,fi as i,kt as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{DS as l,Mb as u,Nb as d,OS as f}from"./loadAgentsDir-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DaDcL9Zw.js";import{I as t,Lt as n,P as r,fi as i,kt as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{DS as l,Mb as u,Nb as d,OS as f}from"./loadAgentsDir-ZQwvbURI.js";import{g as p,y as m}from"./settings-BhvhCpVh.js";import{n as h,r as g}from"./analytics-BotDBGh0.js";var _=e(i(),1);h(),o(),f(),p(),u();var v=c();function y({onAccept:e}){let[i,o]=_.useState(null);_.useEffect(()=>{if(i!==null){let e=i,t=setTimeout(()=>l(e));return()=>clearTimeout(t)}},[i]),_.useEffect(()=>{g(`tengu_bypass_permissions_mode_dialog_shown`,{})},[]);function c(t){switch(t){case`accept`:g(`tengu_bypass_permissions_mode_dialog_accept`,{}),m(`userSettings`,{skipDangerousModePermissionPrompt:!0}),e();break;case`decline`:o(1);break}}let u=(0,_.useCallback)(()=>{o(0)},[]);return i===null?(0,v.jsxs)(s,{title:`WARNING: Claude Code running in Bypass Permissions mode`,color:`error`,onCancel:u,children:[(0,v.jsxs)(t,{flexDirection:`column`,gap:1,children:[(0,v.jsxs)(r,{children:[`In Bypass Permissions mode, Claude Code will not ask for your approval before running potentially dangerous commands.`,(0,v.jsx)(a,{}),`This mode should only be used in a sandboxed container/VM that has restricted internet access and can easily be restored if damaged.`]}),(0,v.jsx)(r,{children:`By proceeding, you accept all responsibility for actions taken while running in Bypass Permissions mode.`}),(0,v.jsx)(n,{url:`https://code.claude.com/docs/en/security`})]}),(0,v.jsx)(d,{options:[{label:`No, exit`,value:`decline`},{label:`Yes, I accept`,value:`accept`}],onChange:e=>c(e)})]}):null}export{y as BypassPermissionsModeDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,Lt as r,P as i,fi as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as l,Nb as u}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,Lt as r,P as i,fi as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as l,Nb as u}from"./loadAgentsDir-ZQwvbURI.js";import{g as d,y as f}from"./config-662VDD70.js";import{n as p,r as m}from"./analytics-BotDBGh0.js";function h({onDone:e,isStandaloneDialog:t,externalIncludes:a}){g.useEffect(()=>{m(`tengu_claude_md_includes_dialog_shown`,{})},[]);let o=(0,g.useCallback)(t=>{t===`no`?(m(`tengu_claude_md_external_includes_dialog_declined`,{}),f(e=>({...e,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!0}))):(m(`tengu_claude_md_external_includes_dialog_accepted`,{}),f(e=>({...e,hasClaudeMdExternalIncludesApproved:!0,hasClaudeMdExternalIncludesWarningShown:!0}))),e()},[e]);return(0,_.jsxs)(s,{title:`Allow external CLAUDE.md file imports?`,color:`warning`,onCancel:(0,g.useCallback)(()=>{o(`no`)},[o]),hideBorder:!t,hideInputGuide:!t,children:[(0,_.jsx)(i,{children:`This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories.`}),a&&a.length>0&&(0,_.jsxs)(n,{flexDirection:`column`,children:[(0,_.jsx)(i,{dimColor:!0,children:`External imports:`}),a.map((e,t)=>(0,_.jsxs)(i,{dimColor:!0,children:[` `,e.path]},t))]}),(0,_.jsxs)(i,{dimColor:!0,children:[`Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks`,` `,(0,_.jsx)(r,{url:`https://code.claude.com/docs/en/security`}),` `]}),(0,_.jsx)(u,{options:[{label:`Yes, allow external imports`,value:`yes`},{label:`No, disable external imports`,value:`no`}],onChange:e=>o(e)})]})}var g,_,v=e((()=>{g=t(a(),1),p(),o(),d(),l(),_=c()}));export{v as n,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./ClaudeMdExternalIncludesDialog-BAK9fxwg.js";e();export{t as ClaudeMdExternalIncludesDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$b as e,Qb as t}from"./loadAgentsDir-ZQwvbURI.js";e();export{t as ConsoleOAuthFlow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{t as n}from"./semver-DQo45qGo.js";import{I as r,P as i,fi as a,hn as o,p as s,t as c}from"./src-CDCSSo0U2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{en as u,ht as d}from"./state-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{t as n}from"./semver-DQo45qGo.js";import{I as r,P as i,fi as a,hn as o,p as s,t as c}from"./src-CDCSSo0U2.js";import{t as l}from"./jsx-runtime-Bb4Xn-E0.js";import{en as u,ht as d}from"./state-ix0xIunV.js";import{ES as f,OS as p,jr as m,lr as h}from"./loadAgentsDir-ZQwvbURI.js";import{n as g,t as _}from"./cwd-CYmmnQVS.js";import{U as v,l as y,p as b,z as x}from"./debug-DiuXEmUq.js";import{r as S,t as C}from"./execFileNoThrow-DResQRvR.js";import{_ as w,f as T}from"./file-BZriE-XU.js";import{n as E,r as D}from"./semver-BMRJYn3q.js";import{n as O,t as k}from"./browser-BKiu1max.js";import{join as A}from"path";import{readdir as j}from"fs/promises";function M(){let e=[process.argv[1]||``,process.execPath||``],t=[`/build-ant/`,`/build-ant-native/`,`/build-external/`,`/build-external-native/`];return e.some(e=>t.some(t=>e.includes(t)))}function N(e){let t=M()?`claude-dev`:`claude`,n=new URL(`${t}://resume`);return n.searchParams.set(`session`,e),n.searchParams.set(`cwd`,_()),n.toString()}async function P(){if(M())return!0;let e=process.platform;if(e===`darwin`)return w(`/Applications/Claude.app`);if(e===`linux`){let{code:e,stdout:t}=await C(`xdg-mime`,[`query`,`default`,`x-scheme-handler/claude`]);return e===0&&t.trim().length>0}else if(e===`win32`){let{code:e}=await C(`reg`,[`query`,`HKEY_CLASSES_ROOT\\claude`,`/ve`]);return e===0}return!1}async function F(){let e=process.platform;if(e===`darwin`){let{code:e,stdout:t}=await C(`defaults`,[`read`,`/Applications/Claude.app/Contents/Info.plist`,`CFBundleShortVersionString`]);if(e!==0)return null;let n=t.trim();return n.length>0?n:null}else if(e===`win32`){let e=process.env.LOCALAPPDATA;if(!e)return null;let t=A(e,`AnthropicClaude`);try{let e=(await j(t)).filter(e=>e.startsWith(`app-`)).map(e=>e.slice(4)).filter(e=>(0,z.coerce)(e)!==null).sort((e,t)=>{let n=(0,z.coerce)(e),r=(0,z.coerce)(t);return n.compare(r)});return e.length>0?e[e.length-1]:null}catch{return null}}return null}async function I(){if(!await P())return{status:`not-installed`};let e;try{e=await F()}catch{return{status:`ready`,version:`unknown`}}if(!e)return{status:`ready`,version:`unknown`};let t=(0,z.coerce)(e);return!t||!E(t.version,B)?{status:`version-too-old`,version:e}:{status:`ready`,version:e}}async function L(e){let t=process.platform;if(b(`Opening deep link: ${e}`),t===`darwin`){if(M()){let{code:t}=await C(`osascript`,[`-e`,`tell application "Electron" to open location "${e}"`]);return t===0}let{code:t}=await C(`open`,[e]);return t===0}else if(t===`linux`){let{code:t}=await C(`xdg-open`,[e]);return t===0}else if(t===`win32`){let{code:t}=await C(`cmd`,[`/c`,`start`,``,e]);return t===0}return!1}async function R(){let e=d();if(!await P())return{success:!1,error:`Claude Desktop is not installed. Install it from https://claude.ai/download`};let t=N(e);return await L(t)?{success:!0,deepLinkUrl:t}:{success:!1,error:`Failed to open Claude Desktop. Please try opening it manually.`,deepLinkUrl:t}}var z,B,V=e((()=>{z=n(),u(),g(),y(),S(),T(),D(),B=`1.1.2396`}));function H(){switch(process.platform){case`win32`:return`https://claude.ai/api/desktop/win32/x64/exe/latest/redirect`;default:return`https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect`}}function U({onDone:e}){let[t,n]=(0,W.useState)(`checking`),[a,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(``);return o(n=>{if(t===`error`){e(a??`Unknown error`,{display:`system`});return}t===`prompt-download`&&(n===`y`||n===`Y`?(O(H()).catch(()=>{}),e(`Starting download. Re-run /desktop once you\u2019ve installed the app.\nLearn more at ${K}`,{display:`system`})):(n===`n`||n===`N`)&&e(`The desktop app is required for /desktop. Learn more at ${K}`,{display:`system`}))}),(0,W.useEffect)(()=>{async function t(){n(`checking`);let t=await I();if(t.status===`not-installed`){u(`Claude Desktop is not installed.`),n(`prompt-download`);return}if(t.status===`version-too-old`){u(`Claude Desktop needs to be updated (found v${t.version}, need v1.1.2396+).`),n(`prompt-download`);return}n(`flushing`),await h(),n(`opening`);let r=await R();if(!r.success){c(r.error??`Failed to open Claude Desktop`),n(`error`);return}n(`success`),setTimeout(async e=>{e(`Session transferred to Claude Desktop`,{display:`system`}),await f(0,`other`)},500,e)}t().catch(e=>{c(x(e)),n(`error`)})},[e]),t===`error`?(0,G.jsxs)(r,{flexDirection:`column`,paddingX:2,children:[(0,G.jsxs)(i,{color:`error`,children:[`Error: `,a]}),(0,G.jsx)(i,{dimColor:!0,children:`Press any key to continue…`})]}):t===`prompt-download`?(0,G.jsxs)(r,{flexDirection:`column`,paddingX:2,children:[(0,G.jsx)(i,{children:l}),(0,G.jsx)(i,{children:`Download now? (y/n)`})]}):(0,G.jsx)(s,{message:{checking:`Checking for Claude Desktop…`,flushing:`Saving session…`,opening:`Opening Claude Desktop…`,success:`Opening in Claude Desktop…`}[t]})}var W,G,K,q=e((()=>{W=t(a(),1),c(),V(),k(),v(),p(),m(),G=l(),K=`https://clau.de/desktop`}));export{q as n,U as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{C as i,Gt as a,I as o,P as s,T as c,fi as l,ot as u,t as d,y as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{Bb as ee,Gf as m,Kf as h,Lb as g,TS as _,Ub as v,Wb as te}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./figures-5ThXQEtq.js";import{C as i,Gt as a,I as o,P as s,T as c,fi as l,ot as u,t as d,y as f}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{Bb as ee,Gf as m,Kf as h,Lb as g,TS as _,Ub as v,Wb as te}from"./loadAgentsDir-ZQwvbURI.js";import{n as y,t as b}from"./cwd-CYmmnQVS.js";import{_ as x,d as S,g as C,s as w}from"./git-Cgc8X5l2.js";import{r as T,t as E}from"./execFileNoThrow-DResQRvR.js";import{f as D,y as O}from"./file-BZriE-XU.js";import{b as k,w as ne}from"./startupProfiler-BquH_Yqm.js";import{l as A,o as j}from"./stringUtils-D_g2L6A4.js";import{i as re}from"./detectRepository-B1PMTLAU.js";import{u as ie}from"./referral-Cu9bEOFE.js";import{join as ae,resolve as oe}from"path";import{access as M}from"fs/promises";async function se(){if(!await S()||await P())return null;let{stdout:e,code:t}=await E(C(),[`--no-optional-locks`,`diff`,`HEAD`,`--shortstat`],{timeout:F,preserveOutputOnError:!1});if(t===0){let t=de(e);if(t&&t.filesCount>z)return{stats:t,perFileStats:new Map,hunks:new Map}}let{stdout:n,code:r}=await E(C(),[`--no-optional-locks`,`diff`,`HEAD`,`--numstat`],{timeout:F,preserveOutputOnError:!1});if(r!==0)return null;let{stats:i,perFileStats:a}=le(n),o=I-a.size;if(o>0){let e=await ue(o);if(e){i.filesCount+=e.size;for(let[t,n]of e)a.set(t,n)}}return{stats:i,perFileStats:a,hunks:new Map}}async function ce(){if(!await S()||await P())return new Map;let{stdout:e,code:t}=await E(C(),[`--no-optional-locks`,`diff`,`HEAD`],{timeout:F,preserveOutputOnError:!1});return t===0?N(e):new Map}function le(e){let t=e.trim().split(`
|
|
2
2
|
`).filter(Boolean),n=0,r=0,i=0,a=new Map;for(let e of t){let t=e.split(` `);if(t.length<3)continue;i++;let o=t[0],s=t[1],c=t.slice(2).join(` `),l=o===`-`||s===`-`,u=l?0:parseInt(o??`0`,10)||0,d=l?0:parseInt(s??`0`,10)||0;n+=u,r+=d,a.size<I&&a.set(c,{added:u,removed:d,isBinary:l})}return{stats:{filesCount:i,linesAdded:n,linesRemoved:r},perFileStats:a}}function N(e){let t=new Map;if(!e.trim())return t;let n=e.split(/^diff --git /m).filter(Boolean);for(let e of n){if(t.size>=I)break;if(e.length>L)continue;let n=e.split(`
|
|
3
3
|
`),r=n[0]?.match(/^a\/(.+?) b\/(.+)$/);if(!r)continue;let i=r[2]??r[1]??``,a=[],o=null,s=0;for(let e=1;e<n.length;e++){let t=n[e]??``,r=t.match(/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);if(r){o&&a.push(o),o={oldStart:parseInt(r[1]??`0`,10),oldLines:parseInt(r[2]??`1`,10),newStart:parseInt(r[3]??`0`,10),newLines:parseInt(r[4]??`1`,10),lines:[]};continue}if(!(t.startsWith(`index `)||t.startsWith(`---`)||t.startsWith(`+++`)||t.startsWith(`new file`)||t.startsWith(`deleted file`)||t.startsWith(`old mode`)||t.startsWith(`new mode`)||t.startsWith(`Binary files`))&&o&&(t.startsWith(`+`)||t.startsWith(`-`)||t.startsWith(` `)||t===``)){if(s>=R)continue;o.lines.push(``+t),s++}}o&&a.push(o),a.length>0&&t.set(i,a)}return t}async function P(){let e=await w(b());return e?(await Promise.all([`MERGE_HEAD`,`REBASE_HEAD`,`CHERRY_PICK_HEAD`,`REVERT_HEAD`].map(t=>M(ae(e,t)).then(()=>!0).catch(()=>!1)))).some(Boolean):!1}async function ue(e){let{stdout:t,code:n}=await E(C(),[`--no-optional-locks`,`ls-files`,`--others`,`--exclude-standard`],{timeout:F,preserveOutputOnError:!1});if(n!==0||!t.trim())return null;let r=t.trim().split(`
|
|
4
4
|
`).filter(Boolean);if(r.length===0)return null;let i=new Map;for(let t of r.slice(0,e))i.set(t,{added:0,removed:0,isBinary:!1,isUntracked:!0});return i}function de(e){let t=e.match(/(\d+)\s+files?\s+changed(?:,\s+(\d+)\s+insertions?\(\+\))?(?:,\s+(\d+)\s+deletions?\(-\))?/);return t?{filesCount:parseInt(t[1]??`0`,10),linesAdded:parseInt(t[2]??`0`,10),linesRemoved:parseInt(t[3]??`0`,10)}:null}var F,I,L,R,z,B=e((()=>{y(),re(),T(),D(),x(),F=5e3,I=50,L=1e6,R=400,z=500}));function V(){let[e,t]=(0,H.useState)(null),[n,r]=(0,H.useState)(new Map),[i,a]=(0,H.useState)(!0);return(0,H.useEffect)(()=>{let e=!1;async function n(){try{let[n,i]=await Promise.all([se(),ce()]);e||(t(n),r(i),a(!1))}catch{e||(t(null),r(new Map),a(!1))}}return n(),()=>{e=!0}},[]),(0,H.useMemo)(()=>{if(!e)return{stats:null,files:[],hunks:new Map,loading:i};let{stats:t,perFileStats:r}=e,a=[];for(let[e,t]of r){let r=n.get(e),i=t.isUntracked??!1,o=!t.isBinary&&!i&&!r,s=t.added+t.removed,c=!o&&!t.isBinary&&s>U;a.push({path:e,linesAdded:t.added,linesRemoved:t.removed,isBinary:t.isBinary,isLargeFile:o,isTruncated:c,isUntracked:i})}return a.sort((e,t)=>e.path.localeCompare(t.path)),{stats:t,files:a,hunks:n,loading:!1}},[e,n,i])}var H,U,fe=e((()=>{H=t(l(),1),B(),U=400}));function pe(e){if(!e||typeof e!=`object`)return!1;let t=e,n=typeof t.filePath==`string`,r=Array.isArray(t.structuredPatch)&&t.structuredPatch.length>0,i=t.type===`create`&&typeof t.content==`string`;return n&&(r||i)}function W(e){return`type`in e&&(e.type===`create`||e.type===`update`)}function me(e){let t=0,n=0;for(let r of e)for(let e of r.lines)e.startsWith(`+`)?t++:e.startsWith(`-`)&&n++;return{added:t,removed:n}}function he(e){if(e.type!==`user`)return``;let t=e.message.content,n=typeof t==`string`?t:``;return n.length<=30?n:n.slice(0,29)+`…`}function G(e){let t=0,n=0;for(let r of e.files.values())t+=r.linesAdded,n+=r.linesRemoved;e.stats={filesChanged:e.files.size,linesAdded:t,linesRemoved:n}}function ge(e){let t=(0,K.useRef)({completedTurns:[],currentTurn:null,lastProcessedIndex:0,lastTurnIndex:0});return(0,K.useMemo)(()=>{let n=t.current;e.length<n.lastProcessedIndex&&(n.completedTurns=[],n.currentTurn=null,n.lastProcessedIndex=0,n.lastTurnIndex=0);for(let t=n.lastProcessedIndex;t<e.length;t++){let r=e[t];if(!(!r||r.type!==`user`)){if(!(r.toolUseResult||Array.isArray(r.message.content)&&r.message.content[0]?.type===`tool_result`)&&!r.isMeta)n.currentTurn&&n.currentTurn.files.size>0&&(G(n.currentTurn),n.completedTurns.push(n.currentTurn)),n.lastTurnIndex++,n.currentTurn={turnIndex:n.lastTurnIndex,userPromptPreview:he(r),timestamp:r.timestamp,files:new Map,stats:{filesChanged:0,linesAdded:0,linesRemoved:0}};else if(n.currentTurn&&r.toolUseResult){let e=r.toolUseResult;if(pe(e)){let{filePath:t,structuredPatch:r}=e,i=`type`in e&&e.type===`create`,a=n.currentTurn.files.get(t);if(a||(a={filePath:t,hunks:[],isNewFile:i,linesAdded:0,linesRemoved:0},n.currentTurn.files.set(t,a)),i&&r.length===0&&W(e)){let t=e.content.split(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,o as r}from"./envUtils-DSxRz_kt.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{Gt as o,I as s,P as c,fi as l,t as u,x as d}from"./src-CDCSSo0U2.js";import{t as f}from"./jsx-runtime-Bb4Xn-E0.js";import{en as p,nt as m}from"./state-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,o as r}from"./envUtils-DSxRz_kt.js";import{n as i,t as a}from"./figures-5ThXQEtq.js";import{Gt as o,I as s,P as c,fi as l,t as u,x as d}from"./src-CDCSSo0U2.js";import{t as f}from"./jsx-runtime-Bb4Xn-E0.js";import{en as p,nt as m}from"./state-ix0xIunV.js";import{$T as h,AD as g,IE as _,Jp as v,Jx as y,NE as b,QT as x,Qp as ee,Uc as S,Wc as C,Xp as w,Xx as T,YT as E,Yp as te,Yx as D,Zp as ne,Zx as re,al as ie,il as ae,kD as oe,lS as se,nf as ce,rf as le,tE as O,tf as k,uS as A}from"./loadAgentsDir-ZQwvbURI.js";import{B as j,L as M,g as N,n as P}from"./settings-BhvhCpVh.js";import{_ as F,f as I}from"./file-BZriE-XU.js";import{l as L,o as R}from"./stringUtils-D_g2L6A4.js";import{Wn as z,_ as B,qn as V,u as H}from"./model-BgrLt7P7.js";import{n as U,t as W}from"./ValidationErrorsList-DUNh4BNa.js";import{u as ue}from"./referral-Cu9bEOFE.js";import{d as de,f as fe,h as pe,i as me,m as he,n as ge,o as _e,r as ve,u as G}from"./pidLock-DchmaAK6.js";import{a as ye,i as be}from"./xdg-DcF9ejUM.js";import{n as xe,t as Se}from"./useExitOnCtrlCDWithKeybindings-vzUoPY51.js";import{n as Ce,t as we}from"./McpParsingWarnings-8ZueNqAd.js";import{n as Te,t as Ee}from"./PressEnterToContinue-Dl9Hg9Mf.js";import{n as De,t as Oe}from"./useSettingsErrors-BLbvu4--.js";import{n as ke,t as Ae}from"./shadowedRuleDetection-DDSOFi1W.js";import{n as je,r as Me,t as K}from"./statusNoticeHelpers-CqeUBySi.js";import{join as q}from"path";function Ne(){if(!re())return null;let e=y();if(e.length===0)return null;let t=e.filter(e=>e.severity===`error`),n=e.filter(e=>e.severity===`warning`);return(0,J.jsxs)(s,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,J.jsx)(c,{bold:!0,color:t.length>0?`error`:`warning`,children:`Keybinding Configuration Issues`}),(0,J.jsxs)(s,{children:[(0,J.jsx)(c,{dimColor:!0,children:`Location: `}),(0,J.jsx)(c,{dimColor:!0,children:D()})]}),(0,J.jsxs)(s,{marginLeft:1,flexDirection:`column`,marginTop:1,children:[t.map((e,t)=>(0,J.jsxs)(s,{flexDirection:`column`,children:[(0,J.jsxs)(s,{children:[(0,J.jsx)(c,{dimColor:!0,children:`└ `}),(0,J.jsx)(c,{color:`error`,children:`[Error]`}),(0,J.jsxs)(c,{dimColor:!0,children:[` `,e.message]})]}),e.suggestion&&(0,J.jsx)(s,{marginLeft:3,children:(0,J.jsxs)(c,{dimColor:!0,children:[`→ `,e.suggestion]})})]},`error-${t}`)),n.map((e,t)=>(0,J.jsxs)(s,{flexDirection:`column`,children:[(0,J.jsxs)(s,{children:[(0,J.jsx)(c,{dimColor:!0,children:`└ `}),(0,J.jsx)(c,{color:`warning`,children:`[Warning]`}),(0,J.jsxs)(c,{dimColor:!0,children:[` `,e.message]})]}),e.suggestion&&(0,J.jsx)(s,{marginLeft:3,children:(0,J.jsxs)(c,{dimColor:!0,children:[`→ `,e.suggestion]})})]},`warning-${t}`))]})]})}var J,Pe=e((()=>{l(),u(),T(),J=f()}));function Fe(){if(!b.isSupportedPlatform()||!b.isSandboxEnabledInSettings())return null;let e=b.checkDependencies(),t=e.errors.length>0,n=e.warnings.length>0;return!t&&!n?null:(0,Y.jsxs)(s,{flexDirection:`column`,children:[(0,Y.jsx)(c,{bold:!0,children:`Sandbox`}),(0,Y.jsxs)(c,{children:[`└ Status: `,(0,Y.jsx)(c,{color:t?`error`:`warning`,children:t?`Missing dependencies`:`Available (with warnings)`})]}),e.errors.map((e,t)=>(0,Y.jsxs)(c,{color:`error`,children:[`└ `,e]},t)),e.warnings.map((e,t)=>(0,Y.jsxs)(c,{color:`warning`,children:[`└ `,e]},t)),t&&(0,Y.jsx)(c,{dimColor:!0,children:`└ Run /sandbox for install instructions`})]})}var Y,Ie=e((()=>{l(),u(),_(),Y=f()}));async function Le(){let e=x(await h());if(e.length===0)return null;let t=e.sort((e,t)=>t.content.length-e.content.length).map(e=>`${e.path}: ${e.content.length.toLocaleString()} chars`);return{type:`claudemd_files`,severity:`warning`,message:e.length===1?`Large CLAUDE.md file detected (${e[0].content.length.toLocaleString()} chars > ${E.toLocaleString()})`:`${e.length} large CLAUDE.md files detected (each > ${E.toLocaleString()} chars)`,details:t,currentValue:e.length,threshold:E}}async function X(e){if(!e)return null;let t=je(e);if(t<=15e3)return null;let n=e.activeAgents.filter(e=>e.source!==`built-in`).map(e=>{let t=`${e.agentType}: ${e.whenToUse}`;return{name:e.agentType,tokens:C(t)}}).sort((e,t)=>t.tokens-e.tokens),r=n.slice(0,5).map(e=>`${e.name}: ~${e.tokens.toLocaleString()} tokens`);return n.length>5&&r.push(`(${n.length-5} more custom agents)`),{type:`agent_descriptions`,severity:`warning`,message:`Large agent descriptions (~${t.toLocaleString()} tokens > ${K.toLocaleString()})`,details:r,currentValue:t,threshold:K}}async function Re(e,t,n){let r=e.filter(e=>e.isMcp);if(r.length===0)return null;try{let{mcpToolTokens:r,mcpToolDetails:i}=await ae(e,t,n,H());if(r<=Z)return null;let a=new Map;for(let e of i){let t=e.name.split(`__`)[1]||`unknown`,n=a.get(t)||{count:0,tokens:0};a.set(t,{count:n.count+1,tokens:n.tokens+e.tokens})}let o=Array.from(a.entries()).sort((e,t)=>t[1].tokens-e[1].tokens),s=o.slice(0,5).map(([e,t])=>`${e}: ${t.count} tools (~${t.tokens.toLocaleString()} tokens)`);return o.length>5&&s.push(`(${o.length-5} more servers)`),{type:`mcp_tools`,severity:`warning`,message:`Large MCP tools context (~${r.toLocaleString()} tokens > ${Z.toLocaleString()})`,details:s,currentValue:r,threshold:Z}}catch{let e=r.reduce((e,t)=>e+C(((t.name?.length||0)+t.description.length).toString()),0);return e<=Z?null:{type:`mcp_tools`,severity:`warning`,message:`Large MCP tools context (~${e.toLocaleString()} tokens estimated > ${Z.toLocaleString()})`,details:[`${r.length} MCP tools detected (token count estimated)`],currentValue:e,threshold:Z}}}async function ze(e){let t=Ae(await e(),{sandboxAutoAllowEnabled:b.isSandboxingEnabled()&&b.isAutoAllowBashIfSandboxedEnabled()});if(t.length===0)return null;let n=t.flatMap(e=>[`${j(e.rule.ruleValue)}: ${e.reason}`,` Fix: ${e.fix}`]);return{type:`unreachable_rules`,severity:`warning`,message:`${t.length} ${L(t.length,`unreachable permission rule`)} detected`,details:n,currentValue:t.length,threshold:0}}async function Be(e,t,n){let[r,i,a,o]=await Promise.all([Le(),X(t),Re(e,n,t),ze(n)]);return{claudeMdWarning:r,agentWarning:i,mcpWarning:a,unreachableRulesWarning:o}}var Z,Ve=e((()=>{S(),ie(),O(),B(),M(),ke(),_(),Me(),R(),Z=25e3}));function He({promise:e}){let t=(0,Q.use)(e);return t.latest?(0,$.jsxs)($.Fragment,{children:[t.stable&&(0,$.jsxs)(c,{children:[`└ Stable version: `,t.stable]}),(0,$.jsxs)(c,{children:[`└ Latest version: `,t.latest]})]}):(0,$.jsx)(c,{dimColor:!0,children:`└ Failed to fetch versions`})}function Ue({onDone:e}){let t=A(e=>e.agentDefinitions),r=A(e=>e.mcp.tools),i=A(e=>e.toolPermissionContext),l=A(e=>e.plugins.errors);xe();let u=(0,Q.useMemo)(()=>r||[],[r]),[f,p]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(null),[_,y]=(0,Q.useState)(null),[b,x]=(0,Q.useState)(null),S=De(),C=(0,Q.useMemo)(()=>G().then(e=>(e.installationType===`native`?fe:he)().catch(()=>({latest:null,stable:null}))),[]),w=P()?.autoUpdatesChannel??`latest`,T=S.filter(e=>e.mcpErrorMetadata===void 0),E=(0,Q.useMemo)(()=>[{name:`BASH_MAX_OUTPUT_LENGTH`,default:v,upperLimit:te},{name:`TASK_MAX_OUTPUT_LENGTH`,default:k,upperLimit:ce},{name:`CLAUDE_CODE_MAX_OUTPUT_TOKENS`,...z(`claude-opus-4-7`)}].map(e=>{let t=process.env[e.name],n=ee(e.name,t,e.default,e.upperLimit);return{name:e.name,...n}}).filter(e=>e.status!==`valid`),[]);(0,Q.useEffect)(()=>{G().then(p),(async()=>{let e=q(n(),`agents`),r=q(m(),`.claude`,`agents`),{activeAgents:a,allAgents:o,failedFiles:s}=t,[c,l]=await Promise.all([F(e),F(r)]),d={activeAgents:a.map(e=>({agentType:e.agentType,source:e.source})),userAgentsDir:e,projectAgentsDir:r,userDirExists:c,projectDirExists:l,failedFiles:s};g(d);let f=await Be(u,{activeAgents:a,allAgents:o,failedFiles:s},async()=>i);if(y(f),_e()){let e=q(be(),`claude`,`locks`),t=ge(e),n=ve(e);x({enabled:!0,locks:n,locksDir:e,staleLocksCleaned:t})}else x({enabled:!1,locks:[],locksDir:``,staleLocksCleaned:0})})()},[i,u,t]);let D=(0,Q.useCallback)(()=>{e(`Claude Code diagnostics dismissed`,{display:`system`})},[e]);return o({"confirm:yes":D,"confirm:no":D},{context:`Confirmation`}),f?(0,$.jsxs)(d,{children:[(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,children:`Diagnostics`}),(0,$.jsxs)(c,{children:[`└ Currently running: `,f.installationType,` (`,f.version,`)`]}),f.packageManager&&(0,$.jsxs)(c,{children:[`└ Package manager: `,f.packageManager]}),(0,$.jsxs)(c,{children:[`└ Path: `,f.installationPath]}),(0,$.jsxs)(c,{children:[`└ Invoked: `,f.invokedBinary]}),(0,$.jsxs)(c,{children:[`└ Config install method: `,f.configInstallMethod]}),(0,$.jsxs)(c,{children:[`└ Search: `,f.ripgrepStatus.working?`OK`:`Not working`,` (`,f.ripgrepStatus.mode===`embedded`?`bundled`:f.ripgrepStatus.mode===`builtin`?`vendor`:f.ripgrepStatus.systemPath||`system`,`)`]}),f.ripgrepStatus.note&&(0,$.jsxs)(c,{color:`warning`,children:[`└ Note: `,f.ripgrepStatus.note]}),f.recommendation&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(c,{}),(0,$.jsxs)(c,{color:`warning`,children:[`Recommendation: `,f.recommendation.split(`
|
|
2
2
|
`)[0]]}),(0,$.jsx)(c,{dimColor:!0,children:f.recommendation.split(`
|
|
3
3
|
`)[1]})]}),f.multipleInstallations.length>1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(c,{}),(0,$.jsx)(c,{color:`warning`,children:`Warning: Multiple installations found`}),f.multipleInstallations.map((e,t)=>(0,$.jsxs)(c,{children:[`└ `,e.type,` at `,e.path]},t))]}),f.warnings.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(c,{}),f.warnings.map((e,t)=>(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsxs)(c,{color:`warning`,children:[`Warning: `,e.issue]}),(0,$.jsxs)(c,{children:[`Fix: `,e.fix]})]},t))]}),T.length>0&&(0,$.jsxs)(s,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,$.jsx)(c,{bold:!0,children:`Invalid Settings`}),(0,$.jsx)(W,{errors:T})]})]}),(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,children:`Updates`}),(0,$.jsxs)(c,{children:[`└ Auto-updates: `,f.packageManager?`Managed by package manager`:f.autoUpdates]}),f.hasUpdatePermissions!==null&&(0,$.jsxs)(c,{children:[`└ Update permissions: `,f.hasUpdatePermissions?`Yes`:`No (requires sudo)`]}),(0,$.jsxs)(c,{children:[`└ Auto-update channel: `,w]}),(0,$.jsx)(Q.Suspense,{fallback:null,children:(0,$.jsx)(He,{promise:C})})]}),(0,$.jsx)(Fe,{}),(0,$.jsx)(we,{}),(0,$.jsx)(Ne,{}),E.length>0&&(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,children:`Environment Variables`}),E.map((e,t)=>(0,$.jsxs)(c,{children:[`└ `,e.name,`:`,` `,(0,$.jsx)(c,{color:e.status===`capped`?`warning`:`error`,children:e.message})]},t))]}),b?.enabled&&(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,children:`Version Locks`}),b.staleLocksCleaned>0&&(0,$.jsxs)(c,{dimColor:!0,children:[`└ Cleaned `,b.staleLocksCleaned,` stale lock(s)`]}),b.locks.length===0?(0,$.jsx)(c,{dimColor:!0,children:`└ No active version locks`}):b.locks.map((e,t)=>(0,$.jsxs)(c,{children:[`└ `,e.version,`: PID `,e.pid,` `,e.isProcessRunning?(0,$.jsx)(c,{children:`(running)`}):(0,$.jsx)(c,{color:`warning`,children:`(stale)`})]},t))]}),h?.failedFiles&&h.failedFiles.length>0&&(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,color:`error`,children:`Agent Parse Errors`}),(0,$.jsxs)(c,{color:`error`,children:[`└ Failed to parse `,h.failedFiles.length,` agent file(s):`]}),h.failedFiles.map((e,t)=>(0,$.jsxs)(c,{dimColor:!0,children:[` `,`└ `,e.path,`: `,e.error]},t))]}),l.length>0&&(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,color:`error`,children:`Plugin Errors`}),(0,$.jsxs)(c,{color:`error`,children:[`└ `,l.length,` plugin error(s) detected:`]}),l.map((e,t)=>(0,$.jsxs)(c,{dimColor:!0,children:[` `,`└ `,e.source||`unknown`,`plugin`in e&&e.plugin?` [${e.plugin}]`:``,`: `,oe(e)]},t))]}),_?.unreachableRulesWarning&&(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,color:`warning`,children:`Unreachable Permission Rules`}),(0,$.jsxs)(c,{children:[`└`,` `,(0,$.jsxs)(c,{color:`warning`,children:[a.warning,` `,_.unreachableRulesWarning.message]})]}),_.unreachableRulesWarning.details.map((e,t)=>(0,$.jsxs)(c,{dimColor:!0,children:[` `,`└ `,e]},t))]}),_&&(_.claudeMdWarning||_.agentWarning||_.mcpWarning)&&(0,$.jsxs)(s,{flexDirection:`column`,children:[(0,$.jsx)(c,{bold:!0,children:`Context Usage Warnings`}),_.claudeMdWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(c,{children:[`└`,` `,(0,$.jsxs)(c,{color:`warning`,children:[a.warning,` `,_.claudeMdWarning.message]})]}),(0,$.jsxs)(c,{children:[` `,`└ Files:`]}),_.claudeMdWarning.details.map((e,t)=>(0,$.jsxs)(c,{dimColor:!0,children:[` `,`└ `,e]},t))]}),_.agentWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(c,{children:[`└`,` `,(0,$.jsxs)(c,{color:`warning`,children:[a.warning,` `,_.agentWarning.message]})]}),(0,$.jsxs)(c,{children:[` `,`└ Top contributors:`]}),_.agentWarning.details.map((e,t)=>(0,$.jsxs)(c,{dimColor:!0,children:[` `,`└ `,e]},t))]}),_.mcpWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(c,{children:[`└`,` `,(0,$.jsxs)(c,{color:`warning`,children:[a.warning,` `,_.mcpWarning.message]})]}),(0,$.jsxs)(c,{children:[` `,`└ MCP servers:`]}),_.mcpWarning.details.map((e,t)=>(0,$.jsxs)(c,{dimColor:!0,children:[` `,`└ `,e]},t))]})]}),(0,$.jsx)(s,{children:(0,$.jsx)(Ee,{})})]}):(0,$.jsx)(d,{children:(0,$.jsx)(c,{dimColor:!0,children:`Checking installation status…`})})}var Q,$,We=e((()=>{i(),Q=t(l(),1),Pe(),Ce(),V(),r(),p(),u(),Te(),Ie(),U(),Oe(),Se(),ue(),se(),g(),pe(),Ve(),de(),ne(),I(),me(),N(),w(),le(),ye(),$=f()}));export{We as n,Ue as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./Doctor-BXhz8eUa.js";e();export{t as Doctor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{I as r,P as i,fi as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{$y as l,Ct as u,ES as d,Ei as f,Et as p,Gp as m,My as h,Nb as g,OS as _,Ot as v,Pb as y,Wp as b,XE as x,YE as S,gt as C,jr as w,jy as T,kt as E,tb as D}from"./loadAgentsDir-
|
|
1
|
+
import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{I as r,P as i,fi as a,t as o,y as s}from"./src-CDCSSo0U2.js";import{t as c}from"./jsx-runtime-Bb4Xn-E0.js";import{$y as l,Ct as u,ES as d,Ei as f,Et as p,Gp as m,My as h,Nb as g,OS as _,Ot as v,Pb as y,Wp as b,XE as x,YE as S,gt as C,jr as w,jy as T,kt as E,tb as D}from"./loadAgentsDir-ZQwvbURI.js";import{l as O,p as k}from"./debug-DiuXEmUq.js";import{r as A,t as j}from"./execFileNoThrow-DResQRvR.js";import{n as M,r as N}from"./analytics-BotDBGh0.js";function P(){(w(),e(f)).saveWorktreeState(null)}function F({onDone:e,onCancel:t}){let[n,a]=(0,I.useState)(`loading`),[o,c]=(0,I.useState)([]),[d,f]=(0,I.useState)(0),[p,h]=(0,I.useState)(),_=u();if((0,I.useEffect)(()=>{async function e(){let e=[],t=await j(`git`,[`status`,`--porcelain`]);if(t.stdout&&(e=t.stdout.split(`
|
|
2
2
|
`).filter(e=>e.trim()!==``),c(e)),_){let{stdout:t}=await j(`git`,[`rev-list`,`--count`,`${_.originalHeadCommit}..HEAD`]),n=parseInt(t.trim(),10)||0;if(f(n),e.length===0&&n===0){a(`removing`),C().then(()=>{process.chdir(_.originalCwd),m(_.originalCwd),P(),T.cache.clear?.(),h(`Worktree removed (no changes)`)}).catch(e=>{k(`Failed to clean up worktree: ${e}`,{level:`error`}),h(`Worktree cleanup failed, exiting anyway`)}).then(()=>{a(`done`)});return}else a(`asking`)}}e()},[_]),(0,I.useEffect)(()=>{n===`done`&&e(p)},[n,e,p]),!_)return e(`No active worktree session found`,{display:`system`}),null;if(n===`loading`||n===`done`)return null;async function y(e){if(!_)return;let t=!!_.tmuxSessionName;if(e===`keep`||e===`keep-with-tmux`)a(`keeping`),N(`tengu_worktree_kept`,{commits:d,changed_files:o.length}),await v(),process.chdir(_.originalCwd),m(_.originalCwd),P(),T.cache.clear?.(),h(t?`Worktree kept. Your work is saved at ${_.worktreePath} on branch ${_.worktreeBranch}. Reattach to tmux session with: tmux attach -t ${_.tmuxSessionName}`:`Worktree kept. Your work is saved at ${_.worktreePath} on branch ${_.worktreeBranch}`),a(`done`);else if(e===`keep-kill-tmux`)a(`keeping`),N(`tengu_worktree_kept`,{commits:d,changed_files:o.length}),_.tmuxSessionName&&await E(_.tmuxSessionName),await v(),process.chdir(_.originalCwd),m(_.originalCwd),P(),T.cache.clear?.(),h(`Worktree kept at ${_.worktreePath} on branch ${_.worktreeBranch}. Tmux session terminated.`),a(`done`);else if(e===`remove`||e===`remove-with-tmux`){a(`removing`),N(`tengu_worktree_removed`,{commits:d,changed_files:o.length}),_.tmuxSessionName&&await E(_.tmuxSessionName);try{await C(),process.chdir(_.originalCwd),m(_.originalCwd),P(),T.cache.clear?.()}catch(e){k(`Failed to clean up worktree: ${e}`,{level:`error`}),h(`Worktree cleanup failed, exiting anyway`),a(`done`);return}let e=t?` Tmux session terminated.`:``;d>0&&o.length>0?h(`Worktree removed. ${d} ${d===1?`commit`:`commits`} and uncommitted changes were discarded.${e}`):d>0?h(`Worktree removed. ${d} ${d===1?`commit`:`commits`} on ${_.worktreeBranch} ${d===1?`was`:`were`} discarded.${e}`):o.length>0?h(`Worktree removed. Uncommitted changes were discarded.${e}`):h(`Worktree removed.${e}`),a(`done`)}}if(n===`keeping`)return(0,L.jsxs)(r,{flexDirection:`row`,marginY:1,children:[(0,L.jsx)(l,{}),(0,L.jsx)(i,{children:`Keeping worktree…`})]});if(n===`removing`)return(0,L.jsxs)(r,{flexDirection:`row`,marginY:1,children:[(0,L.jsx)(l,{}),(0,L.jsx)(i,{children:`Removing worktree…`})]});let b=_.worktreeBranch,x=o.length>0,S=d>0,w=``;w=x&&S?`You have ${o.length} uncommitted ${o.length===1?`file`:`files`} and ${d} ${d===1?`commit`:`commits`} on ${b}. All will be lost if you remove.`:x?`You have ${o.length} uncommitted ${o.length===1?`file`:`files`}. These will be lost if you remove the worktree.`:S?`You have ${d} ${d===1?`commit`:`commits`} on ${b}. The branch will be deleted if you remove the worktree.`:`You are working in a worktree. Keep it to continue working there, or remove it to clean up.`;function D(){if(t){t();return}y(`keep`)}let O=x||S?`All changes and commits will be lost.`:`Clean up the worktree directory.`,A=!!_.tmuxSessionName,M=A?[{label:`Keep worktree and tmux session`,value:`keep-with-tmux`,description:`Stays at ${_.worktreePath}. Reattach with: tmux attach -t ${_.tmuxSessionName}`},{label:`Keep worktree, kill tmux session`,value:`keep-kill-tmux`,description:`Keeps worktree at ${_.worktreePath}, terminates tmux session.`},{label:`Remove worktree and tmux session`,value:`remove-with-tmux`,description:O}]:[{label:`Keep worktree`,value:`keep`,description:`Stays at ${_.worktreePath}`},{label:`Remove worktree`,value:`remove`,description:O}];return(0,L.jsx)(s,{title:`Exiting worktree session`,subtitle:w,onCancel:D,children:(0,L.jsx)(g,{defaultFocusValue:A?`keep-with-tmux`:`keep`,options:M,onChange:y})})}var I,L,R=t((()=>{I=n(a(),1),M(),O(),o(),A(),h(),b(),p(),y(),D(),L=c()}));function z(){return x(H)??`Goodbye!`}function B({showWorktree:e,onDone:t,onCancel:n}){async function r(e){t(e??z()),await d(0,`prompt_input_exit`)}return e?(0,V.jsx)(F,{onDone:r,onCancel:n}):null}var V,H,U=t((()=>{S(),a(),_(),R(),V=c(),H=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}));export{U as n,B as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./axios-DaWTGg7G.js";import{D as i,I as a,P as o,T as s,Wt as c,fi as l,hn as u,ot as d,t as f,y as ee}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{U as te,en as m}from"./state-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./axios-DaWTGg7G.js";import{D as i,I as a,P as o,T as s,Wt as c,fi as l,hn as u,ot as d,t as f,y as ee}from"./src-CDCSSo0U2.js";import{t as p}from"./jsx-runtime-Bb4Xn-E0.js";import{U as te,en as m}from"./state-ix0xIunV.js";import{Er as h,Hb as g,Jo as ne,TS as _,Ur as re,Vb as v,dT as y,et as b,ex as x,jr as S,ko as ie,nT as C,rT as w,tt as T,tx as E,zo as D}from"./loadAgentsDir-ZQwvbURI.js";import{E as O,O as k,l as A,p as ae}from"./debug-DiuXEmUq.js";import{Jt as j,Zt as oe}from"./settings-BhvhCpVh.js";import{_ as se,c as ce,d as le}from"./git-Cgc8X5l2.js";import{d as M,f as N,i as P,o as F,s as I}from"./log-Duzb4o6h.js";import{n as L,r as R}from"./analytics-BotDBGh0.js";import{Vt as z,er as B,ht as V,ir as H,nr as U}from"./model-BgrLt7P7.js";import{st as W}from"./rcDebugLog-CivJaJ3V.js";import{a as ue,n as de}from"./firstPartyEventLogger-BQYrBdvD.js";import{u as fe}from"./referral-Cu9bEOFE.js";import{n as pe,t as me}from"./browser-BKiu1max.js";import{readFile as he,stat as ge}from"fs/promises";function G(e){let t=e;return t=t.replace(/"(sk-ant[^\s"']{24,})"/g,`"[REDACTED_API_KEY]"`),t=t.replace(/(?<![A-Za-z0-9"'])(sk-ant-?[A-Za-z0-9_-]{10,})(?![A-Za-z0-9"'])/g,`[REDACTED_API_KEY]`),t=t.replace(/AWS key: "(AWS[A-Z0-9]{20,})"/g,`AWS key: "[REDACTED_AWS_KEY]"`),t=t.replace(/(AKIA[A-Z0-9]{16})/g,`[REDACTED_AWS_KEY]`),t=t.replace(/(?<![A-Za-z0-9])(AIza[A-Za-z0-9_-]{35})(?![A-Za-z0-9])/g,`[REDACTED_GCP_KEY]`),t=t.replace(/(?<![A-Za-z0-9])([a-z0-9-]+@[a-z0-9-]+\.iam\.gserviceaccount\.com)(?![A-Za-z0-9])/g,`[REDACTED_GCP_SERVICE_ACCOUNT]`),t=t.replace(/(["']?x-api-key["']?\s*[:=]\s*["']?)[^"',\s)}\]]+/gi,`$1[REDACTED_API_KEY]`),t=t.replace(/(["']?authorization["']?\s*[:=]\s*["']?(bearer\s+)?)[^"',\s)}\]]+/gi,`$1[REDACTED_TOKEN]`),t=t.replace(/(AWS[_-][A-Za-z0-9_]+\s*[=:]\s*)["']?[^"',\s)}\]]+["']?/gi,`$1[REDACTED_AWS_VALUE]`),t=t.replace(/(GOOGLE[_-][A-Za-z0-9_]+\s*[=:]\s*)["']?[^"',\s)}\]]+["']?/gi,`$1[REDACTED_GCP_VALUE]`),t=t.replace(/((API[-_]?KEY|TOKEN|SECRET|PASSWORD)\s*[=:]\s*)["']?[^"',\s)}\]]+["']?/gi,`$1[REDACTED]`),t}function K(){return P().map(e=>{let t={...e};return t&&typeof t.error==`string`&&(t.error=G(t.error)),t})}async function _e(){try{let e=h(),{size:t}=await ge(e);return t>52428800?(ae(`Skipping raw transcript read: file too large (${t} bytes)`,{level:`warn`}),null):await he(e,`utf-8`)}catch{return null}}function ve({abortSignal:e,messages:t,initialDescription:n,onDone:r,backgroundTasks:l={}}){let[f,p]=(0,X.useState)(`userInput`),[m,h]=(0,X.useState)(0),[g,_]=(0,X.useState)(n??``),[y,b]=(0,X.useState)(null),[S,C]=(0,X.useState)(null),[w,T]=(0,X.useState)({isGit:!1,gitState:null}),[E,D]=(0,X.useState)(null),O=d().columns-4;(0,X.useEffect)(()=>{async function e(){let e=await le(),t=null;e&&(t=await ce()),T({isGit:e,gitState:t})}e()},[]);let k=(0,X.useCallback)(async()=>{p(`submitting`),C(null),b(null);let n=K(),r=ie(t)?.requestId??null,[i,a]=await Promise.all([re(),_e()]),o={...i},s={latestAssistantMessageId:r,message_count:t.length,datetime:new Date().toISOString(),description:g,platform:j.platform,gitRepo:w.isGit,terminal:j.terminal,version:`0.0.2`,transcript:ne(t),errors:n,lastApiRequest:te(),...Object.keys(o).length>0&&{subagentTranscripts:o},...a&&{rawTranscriptJsonl:a}},[c,l]=await Promise.all([Y(s,e),be(g,e)]);D(l),c.success?(c.feedbackId&&(b(c.feedbackId),R(`tengu_bug_report_submitted`,{feedback_id:c.feedbackId,last_assistant_message_id:r}),ue(`tengu_bug_report_description`,{feedback_id:c.feedbackId,description:G(g)})),p(`done`)):(c.isZdrOrg?C(`Feedback collection is not available for organizations with custom data retention policies.`):C(`Could not submit feedback. Please try again later.`),p(`userInput`))},[g,w.isGit,t]),A=(0,X.useCallback)(()=>{if(f===`done`){r(S?`Error submitting feedback / bug report`:`Feedback / bug report submitted`,{display:`system`});return}r(`Feedback / bug report cancelled`,{display:`system`})},[f,S,r]);return c(`confirm:no`,A,{context:`Settings`,isActive:f===`userInput`}),u((e,t)=>{if(f===`done`){t.return&&E&&pe(ye(y??``,E,g,K())),r(S?`Error submitting feedback / bug report`:`Feedback / bug report submitted`,{display:`system`});return}if(S&&f!==`userInput`){r(`Error submitting feedback / bug report`,{display:`system`});return}f===`consent`&&(t.return||e===` `)&&k()}),(0,Z.jsxs)(ee,{title:`Submit Feedback / Bug Report`,onCancel:A,isCancelActive:f!==`userInput`,inputGuide:e=>e.pending?(0,Z.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):f===`userInput`?(0,Z.jsxs)(s,{children:[(0,Z.jsx)(i,{shortcut:`Enter`,action:`continue`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}):f===`consent`?(0,Z.jsxs)(s,{children:[(0,Z.jsx)(i,{shortcut:`Enter`,action:`submit`}),(0,Z.jsx)(v,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}):null,children:[f===`userInput`&&(0,Z.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,Z.jsx)(o,{children:`Describe the issue below:`}),(0,Z.jsx)(x,{value:g,onChange:e=>{_(e),S&&C(null)},columns:O,onSubmit:()=>p(`consent`),onExitMessage:()=>r(`Feedback cancelled`,{display:`system`}),cursorOffset:m,onChangeCursorOffset:h,showCursor:!0}),S&&(0,Z.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,Z.jsx)(o,{color:`error`,children:S}),(0,Z.jsx)(o,{dimColor:!0,children:`Edit and press Enter to retry, or Esc to cancel`})]})]}),f===`consent`&&(0,Z.jsxs)(a,{flexDirection:`column`,children:[(0,Z.jsx)(o,{children:`This report will include:`}),(0,Z.jsxs)(a,{marginLeft:2,flexDirection:`column`,children:[(0,Z.jsxs)(o,{children:[`- Your feedback / bug description: `,(0,Z.jsx)(o,{dimColor:!0,children:g})]}),(0,Z.jsxs)(o,{children:[`- Environment info:`,` `,(0,Z.jsxs)(o,{dimColor:!0,children:[j.platform,`, `,j.terminal,`, v`,`0.0.2`]})]}),w.gitState&&(0,Z.jsxs)(o,{children:[`- Git repo metadata:`,` `,(0,Z.jsxs)(o,{dimColor:!0,children:[w.gitState.branchName,w.gitState.commitHash?`, ${w.gitState.commitHash.slice(0,7)}`:``,w.gitState.remoteUrl?` @ ${w.gitState.remoteUrl}`:``,!w.gitState.isHeadOnRemote&&`, not synced`,!w.gitState.isClean&&`, has local changes`]})]}),(0,Z.jsx)(o,{children:`- Current session transcript`})]}),(0,Z.jsx)(a,{marginTop:1,children:(0,Z.jsx)(o,{wrap:`wrap`,dimColor:!0,children:`We will use your feedback to debug related issues or to improve Claude Code's functionality (eg. to reduce the risk of bugs occurring in the future).`})}),(0,Z.jsx)(a,{marginTop:1,children:(0,Z.jsxs)(o,{children:[`Press `,(0,Z.jsx)(o,{bold:!0,children:`Enter`}),` to confirm and submit.`]})})]}),f===`submitting`&&(0,Z.jsx)(a,{flexDirection:`row`,gap:1,children:(0,Z.jsx)(o,{children:`Submitting report…`})}),f===`done`&&(0,Z.jsxs)(a,{flexDirection:`column`,children:[S?(0,Z.jsx)(o,{color:`error`,children:S}):(0,Z.jsx)(o,{color:`success`,children:`Thank you for your report!`}),y&&(0,Z.jsxs)(o,{dimColor:!0,children:[`Feedback ID: `,y]}),(0,Z.jsxs)(a,{marginTop:1,children:[(0,Z.jsx)(o,{children:`Press `}),(0,Z.jsx)(o,{bold:!0,children:`Enter `}),(0,Z.jsx)(o,{children:`to open your browser and draft a GitHub issue, or any other key to close.`})]})]})]})}function ye(e,t,n,r){let i=G(t),a=`**Bug Description**\n${G(n)}\n\n**Environment Info**\n- Platform: ${j.platform}\n- Terminal: ${j.terminal}\n- Version: 0.0.2\n- Feedback ID: ${e}\n\n**Errors**\n\`\`\`json\n`,o=k(r),s=`${$}/new?title=${encodeURIComponent(i)}&labels=user-reported,bug&body=`,c=encodeURIComponent(a),l=encodeURIComponent(o),u=Q-s.length-c.length-15-46;if(u<=0){let e=Q-s.length-9-46-50,t=a+o+"\n```\n",n=encodeURIComponent(t);if(n.length>e){n=n.slice(0,e);let t=n.lastIndexOf(`%`);t>=n.length-2&&(n=n.slice(0,t))}return s+n+`%E2%80%A6%0A**Note%3A**%20Content%20was%20truncated.%0A`}if(l.length<=u)return s+c+l+`%0A%60%60%60%0A`;let d=l.slice(0,u-9-50),f=d.lastIndexOf(`%`);return f>=d.length-2&&(d=d.slice(0,f)),s+c+d+`%E2%80%A6%0A%60%60%60%0A%0A**Note%3A**%20Content%20was%20truncated.%0A`}async function be(e,t){try{let n=(await T({systemPrompt:W([`Generate a concise, technical issue title (max 80 chars) for a public GitHub issue based on this bug report for Claude Code.`,`Claude Code is an agentic coding CLI based on the Anthropic API.`,`The title should:`,`- Include the type of issue [Bug] or [Feature Request] as the first thing in the title`,`- Be concise, specific and descriptive of the actual problem`,`- Use technical terminology appropriate for a software issue`,`- For error messages, extract the key error (e.g., "Missing Tool Result Block" rather than the full message)`,`- Be direct and clear for developers to understand the problem`,`- If you cannot determine a clear issue, use "Bug Report: [brief description]"`,`- Any LLM API errors are from the Anthropic API, not from any other model provider`,`Your response will be directly used as the title of the Github issue, and as such should not contain any other commentary or explaination`,`Examples of good titles include: "[Bug] Auto-Compact triggers to soon", "[Bug] Anthropic API Error: Missing Tool Result Block", "[Bug] Error: Invalid Model Name for Opus"`]),userPrompt:e,signal:t,options:{hasAppendSystemPrompt:!1,toolChoice:void 0,isNonInteractiveSession:!1,agents:[],querySource:`feedback`,mcpTools:[]}}))?.message?.content?.[0],r=n?.type===`text`?n.text:`Bug Report`;return w(r)?q(e):r}catch(t){return I(t),q(e)}}function q(e){let t=e.split(`
|
|
2
2
|
`)[0]||``;if(t.length<=60&&t.length>5)return t;let n=t.slice(0,60);if(t.length>60){let e=n.lastIndexOf(` `);e>30&&(n=n.slice(0,e)),n+=`...`}return n.length<10?`Bug Report`:n}function J(e){if(e instanceof Error){let t=Error(G(e.message));e.stack&&(t.stack=G(e.stack)),I(t)}else{let t=G(String(e));I(Error(t))}}async function Y(e,t){if(N())return{success:!1};try{await V();let r=B();if(r.error)return{success:!1};let i={"Content-Type":`application/json`,"User-Agent":U(),...r.headers},a=await n.post(`https://api.anthropic.com/api/claude_cli_feedback`,{content:k(e)},{headers:i,timeout:3e4,signal:t});if(a.status===200){let e=a.data;return e?.feedback_id?{success:!0,feedbackId:e.feedback_id}:(J(Error(`Failed to submit feedback: request did not return feedback_id`)),{success:!1})}return J(Error(`Failed to submit feedback:`+a.status)),{success:!1}}catch(e){if(n.isCancel(e))return{success:!1};if(n.isAxiosError(e)&&e.response?.status===403){let t=e.response.data;if(t?.error?.type===`permission_error`&&t?.error?.message?.includes(`Custom data retention settings`))return J(Error(`Cannot submit feedback because custom data retention settings are enabled`)),{success:!1,isZdrOrg:!0}}return J(e),{success:!1}}}var X,Z,Q,$,xe=e((()=>{r(),l(),X=t(l(),1),m(),de(),L(),D(),_(),f(),fe(),b(),C(),z(),me(),A(),oe(),se(),H(),F(),M(),S(),O(),y(),g(),E(),Z=p(),Q=7250,$=process.env.USER_TYPE===`ant`?`https://github.com/anthropics/claude-cli-internal/issues`:`https://github.com/anthropics/claude-code/issues`}));export{xe as n,G as r,ve as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./Grove-Dsi4yU08.js";e();export{t as GroveDialog};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{D as n,I as r,Lt as i,P as a,T as o,fi as s,hn as c,t as l,y as u}from"./src-CDCSSo0U2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as f,Nb as p}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{D as n,I as r,Lt as i,P as a,T as o,fi as s,hn as c,t as l,y as u}from"./src-CDCSSo0U2.js";import{t as d}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as f,Nb as p}from"./loadAgentsDir-ZQwvbURI.js";import{n as m,r as h}from"./analytics-BotDBGh0.js";import{a as g,c as _,i as v,r as y,s as b,t as x}from"./grove-DSWe6psK.js";function S(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(a,{children:[`An update to our Consumer Terms and Privacy Policy will take effect on `,(0,D.jsx)(a,{bold:!0,children:`October 8, 2025`}),`. You can accept the updated terms today.`]}),(0,D.jsxs)(r,{flexDirection:`column`,children:[(0,D.jsx)(a,{children:`What's changing?`}),(0,D.jsx)(r,{paddingLeft:1,children:(0,D.jsxs)(a,{children:[(0,D.jsx)(a,{children:`· `}),(0,D.jsx)(a,{bold:!0,children:`You can help improve Claude `}),(0,D.jsxs)(a,{children:[`— Allow the use of your chats and coding sessions to train and improve Anthropic AI models. Change anytime in your Privacy Settings (`,(0,D.jsx)(i,{url:`https://claude.ai/settings/data-privacy-controls`}),`).`]})]})}),(0,D.jsx)(r,{paddingLeft:1,children:(0,D.jsxs)(a,{children:[(0,D.jsx)(a,{children:`· `}),(0,D.jsx)(a,{bold:!0,children:`Updates to data retention `}),(0,D.jsx)(a,{children:`— To help us improve our AI models and safety protections, we're extending data retention to 5 years.`})]})})]}),(0,D.jsxs)(a,{children:[`Learn more (`,(0,D.jsx)(i,{url:`https://www.anthropic.com/news/updates-to-our-consumer-terms`}),`) or read the updated Consumer Terms (`,(0,D.jsx)(i,{url:`https://anthropic.com/legal/terms`}),`) and Privacy Policy (`,(0,D.jsx)(i,{url:`https://anthropic.com/legal/privacy`}),`)`]})]})}function C(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(a,{children:`We've updated our Consumer Terms and Privacy Policy.`}),(0,D.jsxs)(r,{flexDirection:`column`,gap:1,children:[(0,D.jsx)(a,{children:`What's changing?`}),(0,D.jsxs)(r,{flexDirection:`column`,children:[(0,D.jsx)(a,{bold:!0,children:`Help improve Claude`}),(0,D.jsx)(a,{children:`Allow the use of your chats and coding sessions to train and improve Anthropic AI models. You can change this anytime in Privacy Settings`}),(0,D.jsx)(i,{url:`https://claude.ai/settings/data-privacy-controls`})]}),(0,D.jsxs)(r,{flexDirection:`column`,children:[(0,D.jsx)(a,{bold:!0,children:`How this affects data retention`}),(0,D.jsx)(a,{children:`Turning ON the improve Claude setting extends data retention from 30 days to 5 years. Turning it OFF keeps the default 30-day data retention. Delete data anytime.`})]})]}),(0,D.jsxs)(a,{children:[`Learn more (`,(0,D.jsx)(i,{url:`https://www.anthropic.com/news/updates-to-our-consumer-terms`}),`) or read the updated Consumer Terms (`,(0,D.jsx)(i,{url:`https://anthropic.com/legal/terms`}),`) and Privacy Policy (`,(0,D.jsx)(i,{url:`https://anthropic.com/legal/privacy`}),`)`]})]})}function w({showIfAlreadyViewed:e,location:t,onDone:i}){let[s,c]=(0,E.useState)(null),[l,d]=(0,E.useState)(null);if((0,E.useEffect)(()=>{async function n(){let[n,r]=await Promise.all([v(),y()]),a=r.success?r.data:null;d(a);let o=x(n,r,e);if(c(o),!o){i(`skip_rendering`);return}b(),h(`tengu_grove_policy_viewed`,{location:t,dismissable:a?.notice_is_grace_period})}n()},[e,t,i]),s===null||!s)return null;async function f(e){switch(e){case`accept_opt_in`:await _(!0),h(`tengu_grove_policy_submitted`,{state:!0,dismissable:l?.notice_is_grace_period});break;case`accept_opt_out`:await _(!1),h(`tengu_grove_policy_submitted`,{state:!1,dismissable:l?.notice_is_grace_period});break;case`defer`:h(`tengu_grove_policy_dismissed`,{state:!0});break;case`escape`:h(`tengu_grove_policy_escaped`,{});break}i(e)}let m=l?.domain_excluded?[{label:`Accept terms · Help improve Claude: OFF (for emails with your domain)`,value:`accept_opt_out`}]:[{label:`Accept terms · Help improve Claude: ON`,value:`accept_opt_in`},{label:`Accept terms · Help improve Claude: OFF`,value:`accept_opt_out`}];function g(){if(l?.notice_is_grace_period){f(`defer`);return}f(`escape`)}return(0,D.jsxs)(u,{title:`Updates to Consumer Terms and Policies`,color:`professionalBlue`,onCancel:g,inputGuide:e=>e.pending?(0,D.jsxs)(a,{children:[`Press `,e.keyName,` again to exit`]}):(0,D.jsxs)(o,{children:[(0,D.jsx)(n,{shortcut:`Enter`,action:`confirm`}),(0,D.jsx)(n,{shortcut:`Esc`,action:`cancel`})]}),children:[(0,D.jsxs)(r,{flexDirection:`row`,children:[(0,D.jsx)(r,{flexDirection:`column`,gap:1,flexGrow:1,children:l?.notice_is_grace_period?(0,D.jsx)(S,{}):(0,D.jsx)(C,{})}),(0,D.jsx)(r,{flexShrink:0,children:(0,D.jsx)(a,{color:`professionalBlue`,children:O})})]}),(0,D.jsxs)(r,{flexDirection:`column`,gap:1,children:[(0,D.jsxs)(r,{flexDirection:`column`,children:[(0,D.jsx)(a,{bold:!0,children:`Please select how you'd like to continue`}),(0,D.jsx)(a,{children:`Your choice takes effect immediately upon confirmation.`})]}),(0,D.jsx)(p,{options:[...m,...l?.notice_is_grace_period?[{label:`Not now`,value:`defer`}]:[]],onChange:e=>f(e),onCancel:g})]})]})}function T({settings:e,domainExcluded:t,onDone:s}){let[l,d]=(0,E.useState)(e.grove_enabled);E.useEffect(()=>{h(`tengu_grove_privacy_settings_viewed`,{})},[]),c(async(e,n)=>{if(!t&&(n.tab||n.return||e===` `)){let e=!l;d(e),await _(e)}});let f=(0,D.jsx)(a,{color:`error`,children:`false`});return t?f=(0,D.jsx)(a,{color:`error`,children:`false (for emails with your domain)`}):l&&(f=(0,D.jsx)(a,{color:`success`,children:`true`})),(0,D.jsxs)(u,{title:`Data Privacy`,color:`professionalBlue`,onCancel:s,inputGuide:e=>e.pending?(0,D.jsxs)(a,{children:[`Press `,e.keyName,` again to exit`]}):t?(0,D.jsx)(n,{shortcut:`Esc`,action:`cancel`}):(0,D.jsxs)(o,{children:[(0,D.jsx)(n,{shortcut:`Enter/Tab/Space`,action:`toggle`}),(0,D.jsx)(n,{shortcut:`Esc`,action:`cancel`})]}),children:[(0,D.jsxs)(a,{children:[`Review and manage your privacy settings at`,` `,(0,D.jsx)(i,{url:`https://claude.ai/settings/data-privacy-controls`})]}),(0,D.jsxs)(r,{children:[(0,D.jsx)(r,{width:44,children:(0,D.jsx)(a,{bold:!0,children:`Help improve Claude`})}),(0,D.jsx)(r,{children:f})]})]})}var E,D,O,k=e((()=>{E=t(s(),1),m(),l(),g(),f(),D=d(),O=` _____________
|
|
2
2
|
| \\ \\
|
|
3
3
|
| NEW TERMS \\__\\
|
|
4
4
|
| |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as e,o as t}from"./envUtils-DSxRz_kt.js";import{n,t as r}from"./defineProperty-C-QyHrDq.js";import{n as i,t as a}from"./axios-DaWTGg7G.js";import{$p as o,em as s}from"./loadAgentsDir-
|
|
1
|
+
import{l as e,o as t}from"./envUtils-DSxRz_kt.js";import{n,t as r}from"./defineProperty-C-QyHrDq.js";import{n as i,t as a}from"./axios-DaWTGg7G.js";import{$p as o,em as s}from"./loadAgentsDir-ZQwvbURI.js";import{E as c,O as l,l as u,p as d}from"./debug-DiuXEmUq.js";import{M as f,j as p}from"./git-Cgc8X5l2.js";import{n as m,r as h}from"./analytics-BotDBGh0.js";import{c as g,h as _,l as v,m as y,s as b}from"./proxy-CHnxhNZI.js";import{D as x,O as S,a as C,l as w,n as T,r as E,t as D}from"./rcDebugLog-CivJaJ3V.js";import{r as O}from"./ccrClient-CRXGlUCe.js";a(),S(),m(),s(),u(),D(),p(),t(),_(),v(),E(),c(),n();var k=`{"type":"keep_alive"}
|
|
2
2
|
`,A=1e3,j=1e3,M=3e4,N=6e5,P=1e4,F=12e4,I=M*2,L=new Set([1002,4001,4003]),R=class{constructor(e,t={},n,i,a){r(this,`ws`,null),r(this,`lastSentId`,null),r(this,`url`,void 0),r(this,`state`,`idle`),r(this,`onData`,void 0),r(this,`onCloseCallback`,void 0),r(this,`onConnectCallback`,void 0),r(this,`headers`,void 0),r(this,`sessionId`,void 0),r(this,`autoReconnect`,void 0),r(this,`isBridge`,void 0),r(this,`reconnectAttempts`,0),r(this,`reconnectStartTime`,null),r(this,`reconnectTimer`,null),r(this,`lastReconnectAttemptTime`,null),r(this,`lastActivityTime`,0),r(this,`pingInterval`,null),r(this,`pongReceived`,!0),r(this,`keepAliveInterval`,null),r(this,`messageBuffer`,void 0),r(this,`isBunWs`,!1),r(this,`connectStartTime`,0),r(this,`refreshHeaders`,void 0),r(this,`onBunOpen`,()=>{this.handleOpenEvent(),this.lastSentId&&this.replayBufferedMessages(``)}),r(this,`onBunMessage`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.lastActivityTime=Date.now(),f(`info`,`cli_websocket_message_received`,{length:t.length}),this.onData&&this.onData(t)}),r(this,`onBunError`,()=>{d(`WebSocketTransport: Error`,{level:`error`}),f(`error`,`cli_websocket_connect_error`)}),r(this,`onBunClose`,e=>{let t=e.code===1e3||e.code===1001;d(`WebSocketTransport: Closed: ${e.code}`,t?void 0:{level:`error`}),f(`error`,`cli_websocket_connect_closed`),this.handleConnectionError(e.code)}),r(this,`onNodeOpen`,()=>{let e=this.ws;if(this.handleOpenEvent(),!e)return;let t=e.upgradeReq;if(t?.headers?.[`x-last-request-id`]){let e=t.headers[`x-last-request-id`];this.replayBufferedMessages(e)}}),r(this,`onNodeMessage`,e=>{let t=e.toString();this.lastActivityTime=Date.now(),f(`info`,`cli_websocket_message_received`,{length:t.length}),this.onData&&this.onData(t)}),r(this,`onNodeError`,e=>{d(`WebSocketTransport: Error: ${e.message}`,{level:`error`}),f(`error`,`cli_websocket_connect_error`)}),r(this,`onNodeClose`,(e,t)=>{let n=e===1e3||e===1001;d(`WebSocketTransport: Closed: ${e}`,n?void 0:{level:`error`}),f(`error`,`cli_websocket_connect_closed`),this.handleConnectionError(e)}),r(this,`onPong`,()=>{this.pongReceived=!0}),this.url=e,this.headers=t,this.sessionId=n,this.refreshHeaders=i,this.autoReconnect=a?.autoReconnect??!0,this.isBridge=a?.isBridge??!1,this.messageBuffer=new o(A)}async connect(){if(this.state!==`idle`&&this.state!==`reconnecting`){d(`WebSocketTransport: Cannot connect, current state is ${this.state}`,{level:`error`}),f(`error`,`cli_websocket_connect_failed`);return}this.state=`reconnecting`,this.connectStartTime=Date.now(),d(`WebSocketTransport: Opening ${this.url.href}`),f(`info`,`cli_websocket_connect_opening`);let e={...this.headers};if(this.lastSentId&&(e[`X-Last-Request-Id`]=this.lastSentId,d(`WebSocketTransport: Adding X-Last-Request-Id header: ${this.lastSentId}`)),typeof Bun<`u`){let t=new globalThis.WebSocket(this.url.href,{headers:e,proxy:g(this.url.href),tls:y()||void 0});this.ws=t,this.isBunWs=!0,t.addEventListener(`open`,this.onBunOpen),t.addEventListener(`message`,this.onBunMessage),t.addEventListener(`error`,this.onBunError),t.addEventListener(`close`,this.onBunClose),t.addEventListener(`pong`,this.onPong)}else{let{default:t}=await import(`./wrapper-K8ZapJVu.js`),n=new t(this.url.href,{headers:e,agent:b(this.url.href),...y()});this.ws=n,this.isBunWs=!1,n.on(`open`,this.onNodeOpen),n.on(`message`,this.onNodeMessage),n.on(`error`,this.onNodeError),n.on(`close`,this.onNodeClose),n.on(`pong`,this.onPong)}}handleOpenEvent(){let e=Date.now()-this.connectStartTime;d(`WebSocketTransport: Connected`),f(`info`,`cli_websocket_connect_connected`,{duration_ms:e}),this.isBridge&&this.reconnectStartTime!==null&&h(`tengu_ws_transport_reconnected`,{attempts:this.reconnectAttempts,downtimeMs:Date.now()-this.reconnectStartTime}),this.reconnectAttempts=0,this.reconnectStartTime=null,this.lastReconnectAttemptTime=null,this.lastActivityTime=Date.now(),this.state=`connected`,this.onConnectCallback?.(),this.startPingInterval(),this.startKeepaliveInterval(),C(()=>{this.write({type:`keep_alive`})})}sendLine(e){if(!this.ws||this.state!==`connected`)return d(`WebSocketTransport: Not connected`),f(`info`,`cli_websocket_send_not_connected`),!1;try{return this.ws.send(e),this.lastActivityTime=Date.now(),!0}catch(e){return d(`WebSocketTransport: Failed to send: ${e}`,{level:`error`}),f(`error`,`cli_websocket_send_error`),this.handleConnectionError(),!1}}removeWsListeners(e){if(this.isBunWs){let t=e;t.removeEventListener(`open`,this.onBunOpen),t.removeEventListener(`message`,this.onBunMessage),t.removeEventListener(`error`,this.onBunError),t.removeEventListener(`close`,this.onBunClose),t.removeEventListener(`pong`,this.onPong)}else{let t=e;t.off(`open`,this.onNodeOpen),t.off(`message`,this.onNodeMessage),t.off(`error`,this.onNodeError),t.off(`close`,this.onNodeClose),t.off(`pong`,this.onPong)}}doDisconnect(){this.stopPingInterval(),this.stopKeepaliveInterval(),w(),this.ws&&(this.removeWsListeners(this.ws),this.ws.close(),this.ws=null)}handleConnectionError(e){if(T(`WS handleConnectionError: code=${e} state=${this.state} url=${this.url.href.replace(/token=[^&]+/,`token=***`)} msSinceLastActivity=${this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1} reconnectAttempts=${this.reconnectAttempts}`),d(`WebSocketTransport: Disconnected from ${this.url.href}`+(e==null?``:` (code ${e})`)),f(`info`,`cli_websocket_disconnected`),this.isBridge&&h(`tengu_ws_transport_closed`,{closeCode:e,msSinceLastActivity:this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1,wasConnected:this.state===`connected`,reconnectAttempts:this.reconnectAttempts}),this.doDisconnect(),this.state===`closing`||this.state===`closed`)return;let t=!1;if(e===4003&&this.refreshHeaders){let e=this.refreshHeaders();e.Authorization!==this.headers.Authorization&&(Object.assign(this.headers,e),t=!0,d(`WebSocketTransport: 4003 received but headers refreshed, scheduling reconnect`),f(`info`,`cli_websocket_4003_token_refreshed`))}if(e!=null&&L.has(e)&&!t){d(`WebSocketTransport: Permanent close code ${e}, not reconnecting`,{level:`error`}),f(`error`,`cli_websocket_permanent_close`,{closeCode:e}),this.state=`closed`,this.onCloseCallback?.(e);return}if(!this.autoReconnect){this.state=`closed`,this.onCloseCallback?.(e);return}let n=Date.now();this.reconnectStartTime||(this.reconnectStartTime=n),this.lastReconnectAttemptTime!==null&&n-this.lastReconnectAttemptTime>I&&(d(`WebSocketTransport: Detected system sleep (${Math.round((n-this.lastReconnectAttemptTime)/1e3)}s gap), resetting reconnection budget`),f(`info`,`cli_websocket_sleep_detected`,{gapMs:n-this.lastReconnectAttemptTime}),this.reconnectStartTime=n,this.reconnectAttempts=0),this.lastReconnectAttemptTime=n;let r=n-this.reconnectStartTime;if(r<N){if(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!t&&this.refreshHeaders){let e=this.refreshHeaders();Object.assign(this.headers,e),d(`WebSocketTransport: Refreshed headers for reconnect`)}this.state=`reconnecting`,this.reconnectAttempts++;let e=Math.min(j*2**(this.reconnectAttempts-1),M),n=Math.max(0,e+e*.25*(2*Math.random()-1));d(`WebSocketTransport: Reconnecting in ${Math.round(n)}ms (attempt ${this.reconnectAttempts}, ${Math.round(r/1e3)}s elapsed)`),f(`error`,`cli_websocket_reconnect_attempt`,{reconnectAttempts:this.reconnectAttempts}),this.isBridge&&h(`tengu_ws_transport_reconnecting`,{attempt:this.reconnectAttempts,elapsedMs:r,delayMs:Math.round(n)}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}else d(`WebSocketTransport: Reconnection time budget exhausted after ${Math.round(r/1e3)}s for ${this.url.href}`,{level:`error`}),f(`error`,`cli_websocket_reconnect_exhausted`,{reconnectAttempts:this.reconnectAttempts,elapsedMs:r}),this.state=`closed`,this.onCloseCallback&&this.onCloseCallback(e)}close(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopPingInterval(),this.stopKeepaliveInterval(),w(),this.state=`closing`,this.doDisconnect()}replayBufferedMessages(e){let t=this.messageBuffer.toArray();if(t.length===0)return;let n=0;if(e){let r=t.findIndex(t=>`uuid`in t&&t.uuid===e);if(r>=0){n=r+1;let e=t.slice(n);this.messageBuffer.clear(),this.messageBuffer.addAll(e),e.length===0&&(this.lastSentId=null),d(`WebSocketTransport: Evicted ${n} confirmed messages, ${e.length} remaining`),f(`info`,`cli_websocket_evicted_confirmed_messages`,{evicted:n,remaining:e.length})}}let r=t.slice(n);if(r.length===0){d(`WebSocketTransport: No new messages to replay`),f(`info`,`cli_websocket_no_messages_to_replay`);return}d(`WebSocketTransport: Replaying ${r.length} buffered messages`),f(`info`,`cli_websocket_messages_to_replay`,{count:r.length});for(let e of r){let t=l(e)+`
|
|
3
3
|
`;if(!this.sendLine(t)){this.handleConnectionError();break}}}isConnectedStatus(){return this.state===`connected`}isClosedStatus(){return this.state===`closed`}setOnData(e){this.onData=e}setOnConnect(e){this.onConnectCallback=e}setOnClose(e){this.onCloseCallback=e}getStateLabel(){return this.state}async write(e){`uuid`in e&&typeof e.uuid==`string`&&(this.messageBuffer.add(e),this.lastSentId=e.uuid);let t=l(e)+`
|
|
4
4
|
`;if(this.state!==`connected`)return;let n=this.sessionId?` session=${this.sessionId}`:``,r=this.getControlMessageDetailLabel(e);d(`WebSocketTransport: Sending message type=${e.type}${n}${r}`),this.sendLine(t)}getControlMessageDetailLabel(e){if(e.type===`control_request`){let{request_id:t,request:n}=e,r=n.subtype===`can_use_tool`?n.tool_name:``;return` subtype=${n.subtype} request_id=${t}${r?` tool=${r}`:``}`}if(e.type===`control_response`){let{subtype:t,request_id:n}=e.response;return` subtype=${t} request_id=${n}`}return``}startPingInterval(){this.stopPingInterval(),this.pongReceived=!0;let e=Date.now();this.pingInterval=setInterval(()=>{if(this.state===`connected`&&this.ws){let t=Date.now(),n=t-e;if(e=t,n>I){d(`WebSocketTransport: ${Math.round(n/1e3)}s tick gap detected — process was suspended, forcing reconnect`),f(`info`,`cli_websocket_sleep_detected_on_ping`,{gapMs:n}),this.handleConnectionError();return}if(!this.pongReceived){d(`WebSocketTransport: No pong received, connection appears dead`,{level:`error`}),f(`error`,`cli_websocket_pong_timeout`),this.handleConnectionError();return}this.pongReceived=!1;try{this.ws.ping?.()}catch(e){d(`WebSocketTransport: Ping failed: ${e}`,{level:`error`}),f(`error`,`cli_websocket_ping_failed`)}}},P)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}startKeepaliveInterval(){this.stopKeepaliveInterval(),!e(process.env.CLAUDE_CODE_REMOTE)&&(this.keepAliveInterval=setInterval(()=>{if(this.state===`connected`&&this.ws)try{this.ws.send(k),this.lastActivityTime=Date.now(),d(`WebSocketTransport: Sent periodic keep_alive data frame`)}catch(e){d(`WebSocketTransport: Periodic keep_alive failed: ${e}`,{level:`error`}),f(`error`,`cli_websocket_keepalive_failed`)}},F))}stopKeepaliveInterval(){this.keepAliveInterval&&(clearInterval(this.keepAliveInterval),this.keepAliveInterval=null)}};u(),D(),p(),n();var z=100,B=15e3,V=3e3,H=class extends R{constructor(e,t={},n,i,a){super(e,t,n,i,a),r(this,`postUrl`,void 0),r(this,`uploader`,void 0),r(this,`streamEventBuffer`,[]),r(this,`streamEventTimer`,null);let{maxConsecutiveFailures:o,onBatchDropped:s}=a??{};this.postUrl=U(e),this.uploader=new O({maxBatchSize:500,maxQueueSize:1e4,baseDelayMs:500,maxDelayMs:8e3,jitterMs:1e3,maxConsecutiveFailures:o,onBatchDropped:(e,t)=>{f(`error`,`cli_hybrid_batch_dropped_max_failures`,{batchSize:e,failures:t}),s?.(e,t)},send:e=>this.postOnce(e)}),d(`HybridTransport: POST URL = ${this.postUrl}`),f(`info`,`cli_hybrid_transport_initialized`)}async write(e){if(e.type===`stream_event`){this.streamEventBuffer.push(e),this.streamEventTimer||(this.streamEventTimer=setTimeout(()=>this.flushStreamEvents(),z));return}return await this.uploader.enqueue([...this.takeStreamEvents(),e]),this.uploader.flush()}async writeBatch(e){return await this.uploader.enqueue([...this.takeStreamEvents(),...e]),this.uploader.flush()}get droppedBatchCount(){return this.uploader.droppedBatchCount}flush(){return this.uploader.enqueue(this.takeStreamEvents()),this.uploader.flush()}takeStreamEvents(){this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null);let e=this.streamEventBuffer;return this.streamEventBuffer=[],e}flushStreamEvents(){this.streamEventTimer=null,this.uploader.enqueue(this.takeStreamEvents())}close(){this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null),this.streamEventBuffer=[];let e=this.uploader,t;Promise.race([e.flush(),new Promise(e=>{t=setTimeout(e,V)})]).finally(()=>{clearTimeout(t),e.close()}),super.close()}async postOnce(e){let t=x();if(!t){d(`HybridTransport: No session token available for POST`),f(`warn`,`cli_hybrid_post_no_token`);return}let n={Authorization:`Bearer ${t}`,"Content-Type":`application/json`},r;try{r=await i.post(this.postUrl,{events:e},{headers:n,validateStatus:()=>!0,timeout:B})}catch(e){throw d(`HybridTransport: POST error: ${e.message}`),f(`warn`,`cli_hybrid_post_network_error`),e}if(r.status>=200&&r.status<300){d(`HybridTransport: POST success count=${e.length}`);return}if(r.status>=400&&r.status<500&&r.status!==429){T(`Hybrid POST ${r.status}: url=${this.postUrl.replace(/token=[^&]+/,`token=***`)} events=${e.length} body=${JSON.stringify(r.data).slice(0,200)}`),d(`HybridTransport: POST returned ${r.status} (permanent), dropping`),f(`warn`,`cli_hybrid_post_client_error`,{status:r.status});return}throw d(`HybridTransport: POST returned ${r.status} (retryable)`),f(`warn`,`cli_hybrid_post_retryable_error`,{status:r.status}),Error(`POST failed with ${r.status}`)}};function U(e){let t=e.protocol===`wss:`?`https:`:`http:`,n=e.pathname;return n=n.replace(`/ws/`,`/session/`),n.endsWith(`/events`)||(n=n.endsWith(`/`)?n+`events`:n+`/events`),`${t}//${e.host}${n}${e.search}`}export{R as n,H as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-DaDcL9Zw.js";import{I as e,P as t,fi as n,kn as r,t as i,y as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{Jy as s,Mb as c,Nb as l,Yy as u,cS as d,lS as f}from"./loadAgentsDir-
|
|
1
|
+
import"./rolldown-runtime-DaDcL9Zw.js";import{I as e,P as t,fi as n,kn as r,t as i,y as a}from"./src-CDCSSo0U2.js";import{t as o}from"./jsx-runtime-Bb4Xn-E0.js";import{Jy as s,Mb as c,Nb as l,Yy as u,cS as d,lS as f}from"./loadAgentsDir-ZQwvbURI.js";import{A as p,E as m,O as h}from"./debug-DiuXEmUq.js";import{t as g}from"./renderOptions-DOXmueQV.js";n(),i(),u(),f(),m(),c();var _=o();function v({filePath:n,errorDescription:r,onExit:i,onReset:o}){return(0,_.jsxs)(a,{title:`Configuration Error`,color:`error`,onCancel:i,children:[(0,_.jsxs)(e,{flexDirection:`column`,gap:1,children:[(0,_.jsxs)(t,{children:[`The configuration file at `,(0,_.jsx)(t,{bold:!0,children:n}),` contains invalid JSON.`]}),(0,_.jsx)(t,{children:r})]}),(0,_.jsxs)(e,{flexDirection:`column`,children:[(0,_.jsx)(t,{bold:!0,children:`Choose an option:`}),(0,_.jsx)(l,{options:[{label:`Exit and fix manually`,value:`exit`},{label:`Reset with default configuration`,value:`reset`}],onChange:e=>{e===`exit`?i():o()},onCancel:i})]})]})}var y=`dark`;async function b({error:e}){let t={...g(!1),theme:y};await new Promise(async n=>{let{unmount:i}=await r((0,_.jsx)(d,{children:(0,_.jsx)(s,{children:(0,_.jsx)(v,{filePath:e.filePath,errorDescription:e.message,onExit:()=>{i(),n(),process.exit(1)},onReset:()=>{p(e.filePath,h(e.defaultConfig,null,2),{flush:!1,encoding:`utf8`}),i(),n(),process.exit(0)}})})}),t)})}export{b as showInvalidConfigDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./rolldown-runtime-DaDcL9Zw.js";import{P as e,fi as t,t as n,y as r}from"./src-CDCSSo0U2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as a,Nb as o}from"./loadAgentsDir-
|
|
1
|
+
import"./rolldown-runtime-DaDcL9Zw.js";import{P as e,fi as t,t as n,y as r}from"./src-CDCSSo0U2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{Mb as a,Nb as o}from"./loadAgentsDir-ZQwvbURI.js";import{n as s,t as c}from"./ValidationErrorsList-DUNh4BNa.js";t(),n(),a(),s();var l=i();function u({settingsErrors:t,onContinue:n,onExit:i}){function a(e){e===`exit`?i():n()}return(0,l.jsxs)(r,{title:`Settings Error`,onCancel:i,color:`warning`,children:[(0,l.jsx)(c,{errors:t}),(0,l.jsx)(e,{dimColor:!0,children:`Files with errors are skipped entirely, not just the invalid settings.`}),(0,l.jsx)(o,{options:[{label:`Exit and fix manually`,value:`exit`},{label:`Continue without these settings`,value:`continue`}],onChange:a})]})}export{u as InvalidSettingsDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as r}from"./src-CDCSSo0U2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{en as a,ht as o}from"./state-
|
|
1
|
+
import{a as e,n as t,o as n}from"./rolldown-runtime-DaDcL9Zw.js";import{fi as r}from"./src-CDCSSo0U2.js";import{t as i}from"./jsx-runtime-Bb4Xn-E0.js";import{en as a,ht as o}from"./state-ix0xIunV.js";import{G_ as s,K_ as c,L_ as l,M_ as u,QE as d,Q_ as f,R_ as p,T_ as m,V_ as h,X_ as g,ZE as _,Z_ as ee,cg as v,dS as y,dg as b,ev as x,fS as S,gg as te,hg as C,ig as w,lS as T,oS as E,og as D,pg as O,sS as ne,sg as k,uS as A,ug as j,y_ as re,z_ as ie}from"./loadAgentsDir-ZQwvbURI.js";import{U as ae,l as oe,p as se,z as M}from"./debug-DiuXEmUq.js";import{ct as ce,ot as le}from"./settings-BhvhCpVh.js";import{c as N,l as P,o as F}from"./log-Duzb4o6h.js";import{n as I,r as L}from"./analytics-BotDBGh0.js";import{c as R,s as z}from"./pluginFlagging-_WUQP3Lq.js";import{o as B,s as V}from"./localSearch-H0LchlTi.js";import{B as H,G as U,H as ue,K as de}from"./stdio-W_Kokrkh.js";import{basename as fe}from"path";function W(e){let t=`plugin`in e?e.plugin:`no-plugin`;return`${e.type}:${e.source}:${t}`}function G(e,t){t.length!==0&&e(e=>{let n=new Set(e.plugins.errors.map(e=>W(e))),r=t.filter(e=>!n.has(W(e)));return r.length===0?e:{...e,plugins:{...e.plugins,errors:[...e.plugins.errors,...r]}}})}function pe(e,t=!1){let n=y(),r=A(e=>e.authVersion),i=A(e=>e.mcp.pluginReconnectKey),a=S(),s=(0,K.useRef)(new Map),{addNotification:u}=ne(),_=(0,K.useRef)([]),b=(0,K.useRef)(null),x=(0,K.useCallback)(()=>{b.current=null;let e=_.current;e.length!==0&&(_.current=[],a(t=>{let n=t.mcp;for(let t of e){let{tools:e,commands:r,resources:i,...a}=t,o=a.type===`disabled`||a.type===`failed`?e??[]:e,s=a.type===`disabled`||a.type===`failed`?r??[]:r,c=a.type===`disabled`||a.type===`failed`?i??[]:i,l=le(a.name),u=n.clients.findIndex(e=>e.name===a.name)===-1?[...n.clients,a]:n.clients.map(e=>e.name===a.name?a:e),f=o===void 0?n.tools:[...d(n.tools,e=>e.name?.startsWith(l)),...o],p=s===void 0?n.commands:[...d(n.commands,e=>re(e,a.name)),...s],m=c===void 0?n.resources:{...n.resources,...c.length>0?{[a.name]:c}:R(n.resources,a.name)};n={...n,clients:u,tools:f,commands:p,resources:m}}return{...t,mcp:n}}))},[a]),C=(0,K.useCallback)(e=>{_.current.push(e),b.current===null&&(b.current=setTimeout(x,16))},[x]),T=(0,K.useCallback)(({client:e,tools:t,commands:n,resources:r})=>{switch(C({...e,tools:t,commands:n,resources:r}),e.type){case`connected`:te(e.client,e.name,a),e.client.onclose=()=>{let t=e.config.type??`stdio`;if(w(e.name,e.config).catch(()=>{se(`Failed to invalidate the server cache: ${e.name}`)}),c(e.name)){N(e.name,`Server is disabled, skipping automatic reconnection`);return}if(t!==`stdio`&&t!==`sdk`){let n=me(t);N(e.name,`${n} transport closed/disconnected, attempting automatic reconnection`);let r=s.current.get(e.name);r&&(clearTimeout(r),s.current.delete(e.name)),(async()=>{for(let t=1;t<=J;t++){if(c(e.name)){N(e.name,`Server disabled during reconnection, stopping retry`),s.current.delete(e.name);return}C({...e,type:`pending`,reconnectAttempt:t,maxReconnectAttempts:J});let r=Date.now();try{let i=await O(e.name,e.config),a=Date.now()-r;if(i.client.type===`connected`){N(e.name,`${n} reconnection successful after ${a}ms (attempt ${t})`),s.current.delete(e.name),T(i);return}if(N(e.name,`${n} reconnection attempt ${t} completed with status: ${i.client.type}`),t===J){N(e.name,`Max reconnection attempts (${J}) reached, giving up`),s.current.delete(e.name),T(i);return}}catch(i){let a=Date.now()-r;if(P(e.name,`${n} reconnection attempt ${t} failed after ${a}ms: ${i}`),t===J){N(e.name,`Max reconnection attempts (${J}) reached, giving up`),s.current.delete(e.name),C({...e,type:`failed`});return}}let i=Math.min(Y*2**(t-1),X);N(e.name,`Scheduling reconnection attempt ${t+1} in ${i}ms`),await new Promise(t=>{let n=setTimeout(t,i);s.current.set(e.name,n)})}})()}else C({...e,type:`failed`})},e.capabilities?.tools?.listChanged&&e.client.setNotificationHandler(U,async()=>{N(e.name,`Received tools/list_changed notification, refreshing tools`);try{let t=v.cache.get(e.name);v.cache.delete(e.name);let n=await v(e),r=n.length;t?t.then(e=>{L(`tengu_mcp_list_changed`,{type:`tools`,previousCount:e.length,newCount:r})},()=>{L(`tengu_mcp_list_changed`,{type:`tools`,newCount:r})}):L(`tengu_mcp_list_changed`,{type:`tools`,newCount:r}),C({...e,tools:n})}catch(t){P(e.name,`Failed to refresh tools after list_changed notification: ${M(t)}`)}}),e.capabilities?.prompts?.listChanged&&e.client.setNotificationHandler(H,async()=>{N(e.name,`Received prompts/list_changed notification, refreshing prompts`),L(`tengu_mcp_list_changed`,{type:`prompts`});try{D.cache.delete(e.name);let[t,n]=await Promise.all([D(e),Promise.resolve([])]);C({...e,commands:[...t,...n]}),q?.()}catch(t){P(e.name,`Failed to refresh prompts after list_changed notification: ${M(t)}`)}}),e.capabilities?.resources?.listChanged&&e.client.setNotificationHandler(ue,async()=>{N(e.name,`Received resources/list_changed notification, refreshing resources`),L(`tengu_mcp_list_changed`,{type:`resources`});try{k.cache.delete(e.name);{let t=await k(e);C({...e,resources:t})}}catch(t){P(e.name,`Failed to refresh resources after list_changed notification: ${M(t)}`)}});break;case`needs-auth`:case`failed`:case`pending`:case`disabled`:break}},[C]),E=o();return(0,K.useEffect)(()=>{async function n(){let{servers:n,errors:r}=t?{servers:{},errors:[]}:await h(e),i={...n,...e};G(a,r),a(e=>{let{stale:t,...n}=m(e.mcp,i);for(let e of t){let t=s.current.get(e.name);t&&(clearTimeout(t),s.current.delete(e.name)),e.type===`connected`&&(e.client.onclose=void 0,w(e.name,e.config).catch(()=>{}))}let r=new Set(n.clients.map(e=>e.name)),a=Object.entries(i).filter(([e])=>!r.has(e)).map(([e,t])=>({name:e,type:c(e)?`disabled`:`pending`,config:t}));return a.length===0&&t.length===0?e:{...e,mcp:{...e.mcp,...n,clients:[...n.clients,...a]}}})}n().catch(e=>{P(`useManageMCPConnections`,`Failed to initialize servers as pending: ${M(e)}`)})},[t,e,a,E,i]),(0,K.useEffect)(()=>{let n=!1;async function r(){let r;t||p()?r=Promise.resolve({}):(ee(),r=f());let{servers:i,errors:o}=t?{servers:{},errors:[]}:await h(e,r);if(n)return;G(a,o);let s={...i,...e},u=Object.fromEntries(Object.entries(s).filter(([e])=>!c(e)));j(T,u).catch(e=>{P(`useManageMcpConnections`,`Failed to get MCP resources: ${M(e)}`)});let d={};if(!t){if(d=ie(await r).allowed,n)return;if(Object.keys(d).length>0){let{servers:e}=l(d,s);d=e}if(Object.keys(d).length>0){a(e=>{let t=new Set(e.mcp.clients.map(e=>e.name)),n=Object.entries(d).filter(([e])=>!t.has(e)).map(([e,t])=>({name:e,type:c(e)?`disabled`:`pending`,config:t}));return n.length===0?e:{...e,mcp:{...e.mcp,clients:[...e.mcp.clients,...n]}}});let e=Object.fromEntries(Object.entries(d).filter(([e])=>!c(e)));j(T,e).catch(e=>{P(`useManageMcpConnections`,`Failed to get claude.ai MCP resources: ${M(e)}`)})}}let m={...s,...d},g={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0},_=[];for(let[e,t]of Object.entries(m))t.scope===`enterprise`?g.enterprise++:t.scope===`user`?g.global++:t.scope===`project`?g.project++:t.scope===`local`?g.user++:t.scope===`dynamic`?g.plugin++:t.scope===`claudeai`&&g.claudeai++,process.env.USER_TYPE===`ant`&&!c(e)&&(t.type===void 0||t.type===`stdio`)&&`command`in t&&_.push(fe(t.command));L(`tengu_mcp_servers`,{...g,...process.env.USER_TYPE===`ant`&&_.length>0?{stdio_commands:_.sort().join(`,`)}:{}})}return r(),()=>{n=!0}},[t,e,T,a,r,E,i]),(0,K.useEffect)(()=>{let e=s.current;return()=>{for(let t of e.values())clearTimeout(t);e.clear(),b.current!==null&&(clearTimeout(b.current),b.current=null,x())}},[x]),{reconnectMcpServer:(0,K.useCallback)(async e=>{let t=n.getState().mcp.clients.find(t=>t.name===e);if(!t)throw Error(`MCP server ${e} not found`);let r=s.current.get(e);r&&(clearTimeout(r),s.current.delete(e));let i=await O(e,t.config);return T(i),i},[n,T]),toggleMcpServer:(0,K.useCallback)(async e=>{let t=n.getState().mcp.clients.find(t=>t.name===e);if(!t)throw Error(`MCP server ${e} not found`);if(t.type!==`disabled`){let n=s.current.get(e);n&&(clearTimeout(n),s.current.delete(e)),g(e,!1),t.type===`connected`&&await w(e,t.config),C({name:e,type:`disabled`,config:t.config})}else{g(e,!0),C({name:e,type:`pending`,config:t.config});let n=await O(e,t.config);T(n)}},[n,C,T])}}function me(e){switch(e){case`http`:return`HTTP`;case`ws`:case`ws-ide`:return`WebSocket`;default:return`SSE`}}var K,q,J,Y,X,he=t((()=>{K=n(r(),1),a(),b(),de(),z(),_(),I(),s(),oe(),E(),T(),ae(),F(),C(),x(),ce(),u(),q=(B(),e(V)).clearSkillIndexCache,J=5,Y=1e3,X=3e4}));function ge(){let e=(0,Z.useContext)($);if(!e)throw Error(`useMcpReconnect must be used within MCPConnectionManager`);return e.reconnectMcpServer}function _e(){let e=(0,Z.useContext)($);if(!e)throw Error(`useMcpToggleEnabled must be used within MCPConnectionManager`);return e.toggleMcpServer}function ve({children:e,dynamicMcpConfig:t,isStrictMcpConfig:n}){let{reconnectMcpServer:r,toggleMcpServer:i}=pe(t,n),a=(0,Z.useMemo)(()=>({reconnectMcpServer:r,toggleMcpServer:i}),[r,i]);return(0,Q.jsx)($.Provider,{value:a,children:e})}var Z,Q,$,ye=t((()=>{Z=n(r(),1),he(),Q=i(),$=(0,Z.createContext)(null)}));export{_e as i,ye as n,ge as r,ve as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,Lt as r,P as i,fi as a,t as o}from"./src-CDCSSo0U2.js";import{t as s}from"./jsx-runtime-Bb4Xn-E0.js";import{G_ as c,M_ as l,U_ as u,b_ as d,j_ as f}from"./loadAgentsDir-
|
|
1
|
+
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{I as n,Lt as r,P as i,fi as a,t as o}from"./src-CDCSSo0U2.js";import{t as s}from"./jsx-runtime-Bb4Xn-E0.js";import{G_ as c,M_ as l,U_ as u,b_ as d,j_ as f}from"./loadAgentsDir-ZQwvbURI.js";function p({scope:e,parsingErrors:t,warnings:r}){let a=t.length>0,o=r.length>0;return!a&&!o?null:(0,_.jsxs)(n,{flexDirection:`column`,marginTop:1,children:[(0,_.jsxs)(n,{children:[(a||o)&&(0,_.jsxs)(i,{color:a?`error`:`warning`,children:[`[`,a?`Failed to parse`:`Contains warnings`,`] `]}),(0,_.jsx)(i,{children:f(e)})]}),(0,_.jsxs)(n,{children:[(0,_.jsx)(i,{dimColor:!0,children:`Location: `}),(0,_.jsx)(i,{dimColor:!0,children:d(e)})]}),(0,_.jsxs)(n,{marginLeft:1,flexDirection:`column`,children:[t.map((e,t)=>{let r=e.mcpErrorMetadata?.serverName;return(0,_.jsx)(n,{children:(0,_.jsxs)(i,{children:[(0,_.jsx)(i,{dimColor:!0,children:`└ `}),(0,_.jsx)(i,{color:`error`,children:`[Error]`}),(0,_.jsxs)(i,{dimColor:!0,children:[` `,r&&`[${r}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`error-${t}`)}),r.map((e,t)=>{let r=e.mcpErrorMetadata?.serverName;return(0,_.jsx)(n,{children:(0,_.jsxs)(i,{children:[(0,_.jsx)(i,{dimColor:!0,children:`└ `}),(0,_.jsx)(i,{color:`warning`,children:`[Warning]`}),(0,_.jsxs)(i,{dimColor:!0,children:[` `,r&&`[${r}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`warning-${t}`)})]})]})}function m(){let e=(0,g.useMemo)(()=>[{scope:`user`,config:u(`user`)},{scope:`project`,config:u(`project`)},{scope:`local`,config:u(`local`)},{scope:`enterprise`,config:u(`enterprise`)}],[]),t=e.some(({config:e})=>h(e.errors,`fatal`).length>0),a=e.some(({config:e})=>h(e.errors,`warning`).length>0);return!t&&!a?null:(0,_.jsxs)(n,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,_.jsx)(i,{bold:!0,children:`MCP Config Diagnostics`}),(0,_.jsx)(n,{marginTop:1,children:(0,_.jsxs)(i,{dimColor:!0,children:[`For help configuring MCP servers, see:`,` `,(0,_.jsx)(r,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`})]})}),e.map(({scope:e,config:t})=>(0,_.jsx)(p,{scope:e,parsingErrors:h(t.errors,`fatal`),warnings:h(t.errors,`warning`)},e))]})}function h(e,t){return e.filter(e=>e.mcpErrorMetadata?.severity===t)}var g,_,v=e((()=>{g=t(a(),1),c(),l(),o(),_=s()}));export{v as n,m as t};
|