claude-code-best 2.6.5 → 2.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/chunks/{AddWorkspaceDirectory-BYyM_V0q.js → AddWorkspaceDirectory-YmrkKVv2.js} +1 -1
- package/dist/chunks/{App-BboadKdn.js → App-IAjCdPUn.js} +1 -1
- package/dist/chunks/ApproveApiKey-CAvlRKLr.js +1 -0
- package/dist/chunks/{ApproveApiKey-BLp4742y.js → ApproveApiKey-DhsT69v7.js} +1 -1
- package/dist/chunks/{AssistantSessionChooser-B88DM0Oq.js → AssistantSessionChooser-DCUVNGfn.js} +1 -1
- package/dist/chunks/BackgroundTasksDialog-Di_gH2TW.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-BeZqE75e.js +1 -0
- package/dist/chunks/{ClaudeInChromeOnboarding-B6XNhFqq.js → ClaudeInChromeOnboarding-CZHktpPE.js} +1 -1
- package/dist/chunks/{ClaudeMdExternalIncludesDialog-BNhlq7_K.js → ClaudeMdExternalIncludesDialog-Dofr1TYr.js} +1 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DrkzPawC.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-CtqOQRDT.js +1 -0
- package/dist/chunks/{DesktopHandoff-S-w4bs5T.js → DesktopHandoff-C8_CDNft.js} +1 -1
- package/dist/chunks/DevChannelsDialog-DkGWCFpL.js +1 -0
- package/dist/chunks/DiffDialog-93P95op8.js +3 -0
- package/dist/chunks/Doctor-CheDaF3O.js +1 -0
- package/dist/chunks/Doctor-Zd0UaR5d.js +3 -0
- package/dist/chunks/{ExitFlow-CSBDxw9H.js → ExitFlow-4edARxmd.js} +2 -2
- package/dist/chunks/Feedback-CZY-BikO.js +2 -0
- package/dist/chunks/Grove-CbcR0CsI.js +1 -0
- package/dist/chunks/{Grove-DSXRnXKv.js → Grove-TYf1glGP.js} +1 -1
- package/dist/chunks/{HybridTransport-CuT3KI5e.js → HybridTransport-BNexuwcN.js} +2 -2
- package/dist/chunks/{ITermBackend-mokGZVH_.js → ITermBackend-DuomVpsD.js} +1 -1
- package/dist/chunks/{InvalidConfigDialog-Bi4RKYlk.js → InvalidConfigDialog-Byury3Zx.js} +1 -1
- package/dist/chunks/{InvalidSettingsDialog-0zKo4-so.js → InvalidSettingsDialog-B8_0AvWo.js} +1 -1
- package/dist/chunks/MCPConnectionManager-xL_wQCda.js +1 -0
- package/dist/chunks/{McpParsingWarnings-EzgsOoHw.js → McpParsingWarnings-C6u4RM2a.js} +1 -1
- package/dist/chunks/MessageSelector-DAyH1noQ.js +3 -0
- package/dist/chunks/Messages-QH8_sB13.js +11 -0
- package/dist/chunks/{Onboarding-odmthwzz.js → Onboarding-XWhelEBr.js} +1 -1
- package/dist/chunks/{OverageCreditUpsell-Cpk_5Lv0.js → OverageCreditUpsell-BvPz1jLU.js} +1 -1
- package/dist/chunks/PluginSettings-D1YHfrE1.js +17 -0
- package/dist/chunks/{PromptInputFooterSuggestions-DrrkNOuS.js → PromptInputFooterSuggestions-rqUoa9Ch.js} +1 -1
- package/dist/chunks/{PromptInputHelpMenu-DMsF4D6d.js → PromptInputHelpMenu-OTViHSR0.js} +1 -1
- package/dist/chunks/QueryEngine-DigBggXq.js +1 -0
- package/dist/chunks/REPL-Cxh0Qnnt.js +1 -0
- package/dist/chunks/REPL-D2p-vgct.js +97 -0
- package/dist/chunks/{RemoteCallout-CnpCWRPk.js → RemoteCallout-CCIWIrd-.js} +1 -1
- package/dist/chunks/{RemoteSessionManager-OWg_Yccq.js → RemoteSessionManager-Dx81p5dH.js} +2 -2
- package/dist/chunks/ResumeConversation-73r3Zh5P.js +1 -0
- package/dist/chunks/{SSETransport-BpnapvlK.js → SSETransport-C9hd2v-w.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-BNpA8JzR.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BFwcMSIK.js +1 -0
- package/dist/chunks/{SentryErrorBoundary-C-NlfQZw.js → SentryErrorBoundary-z8tMb-zO.js} +1 -1
- package/dist/chunks/Settings-D9qdaMe5.js +2 -0
- package/dist/chunks/{TeleportProgress-CYXay2ZL.js → TeleportProgress-CPXN7u3Z.js} +1 -1
- package/dist/chunks/{TeleportRepoMismatchDialog-_zbZTvcJ.js → TeleportRepoMismatchDialog-CiyXjTxq.js} +1 -1
- package/dist/chunks/{TeleportResumeWrapper-DiHQeZIM.js → TeleportResumeWrapper-Dao8ktHk.js} +1 -1
- package/dist/chunks/{ThemePicker-BRh027fA.js → ThemePicker-CFYFNnPp.js} +1 -1
- package/dist/chunks/{TmuxBackend-BaX2U7iZ.js → TmuxBackend-B5DBBugq.js} +1 -1
- package/dist/chunks/TrustDialog-DtIXHMR_.js +1 -0
- package/dist/chunks/{ValidationErrorsList-CdCUgfIl.js → ValidationErrorsList-BK0wOS55.js} +1 -1
- package/dist/chunks/{WelcomeV2-DCXcYd2x.js → WelcomeV2-BjUbi9vp.js} +1 -1
- package/dist/chunks/WindowsTerminalBackend-DFLLlAOp.js +2 -0
- package/dist/chunks/{add-dir-ldGd3Ppz.js → add-dir-JoVgNFOk.js} +1 -1
- package/dist/chunks/{agentDisplay-CVnAeURF.js → agentDisplay-B3RjWR-3.js} +1 -1
- package/dist/chunks/{agents-DH5fmbVw.js → agents-BUyLUAIu.js} +7 -7
- package/dist/chunks/{agents-C08NzRZx.js → agents-UqS5PhD2.js} +1 -1
- package/dist/chunks/{ant-DJren1Aa.js → ant-Bq1wIvnP.js} +1 -1
- package/dist/chunks/{api-CGOR_Xfl.js → api-O4eHGLTY.js} +1 -1
- package/dist/chunks/api-kAjsowcb.js +1 -0
- package/dist/chunks/{assistant-aWkDcurV.js → assistant-CMIbt3Ir.js} +1 -1
- package/dist/chunks/{assistant-BlzrMSkM.js → assistant-D5Tg_1ry.js} +1 -1
- package/dist/chunks/assistant-nOCkNa3_.js +1 -0
- package/dist/chunks/auth-CDOk9J9A.js +1 -0
- package/dist/chunks/{auth-CSB2RDKF.js → auth-D3SKo0wT.js} +1 -1
- package/dist/chunks/{autoMode-CWvZs1jO.js → autoMode-BIVJlkBM.js} +6 -6
- package/dist/chunks/{autonomy-DK42aJYt.js → autonomy-BYi6z9LD.js} +1 -1
- package/dist/chunks/{autonomy-BkVcSMCZ.js → autonomy-Mi7Fkq1J.js} +7 -7
- package/dist/chunks/{autonomyPanel-Cn4IhXgE.js → autonomyPanel-D_GsUMOf.js} +1 -1
- package/dist/chunks/backgroundHousekeeping-BG_UYxFF.js +17 -0
- package/dist/chunks/backgroundHousekeeping-wHy1eAso.js +1 -0
- package/dist/chunks/{branch-juox_fko.js → branch-BC-K45fw.js} +1 -1
- package/dist/chunks/{bridge-DudsCZkh.js → bridge-DBteRzgS.js} +2 -2
- package/dist/chunks/{bridgeConfig-lRZfQqmA.js → bridgeConfig-C_GoD1k5.js} +1 -1
- package/dist/chunks/bridgeConfig-V_pmBzSH.js +1 -0
- package/dist/chunks/bridgeEnabled-BxtxHb8R.js +1 -0
- package/dist/chunks/{bridgeEnabled-D2IykaHE.js → bridgeEnabled-cSK8a7tN.js} +1 -1
- package/dist/chunks/bridgeMain-CMNptMs4.js +1 -0
- package/dist/chunks/bridgeMain-QbfEOTqV.js +68 -0
- package/dist/chunks/{bridgeMessaging-CqNURC4-.js → bridgeMessaging-CqXQzew4.js} +1 -1
- package/dist/chunks/{btw-DKlE3Dea.js → btw-DBtPlEWc.js} +1 -1
- package/dist/chunks/{buddy-DQYgHR63.js → buddy-BYwTgNnf.js} +1 -1
- package/dist/chunks/{bypassPermissionsKillswitch-Bof-UtM-.js → bypassPermissionsKillswitch-DkYLp9m0.js} +1 -1
- package/dist/chunks/caches-B-GiT9hm.js +1 -0
- package/dist/chunks/{caches-B5QZDncQ.js → caches-DGW9ovtw.js} +2 -2
- package/dist/chunks/{ccrClient-BaWg4E9-.js → ccrClient-B9pi3b8Y.js} +1 -1
- package/dist/chunks/changeDetector-S1Jti1bW.js +1 -0
- package/dist/chunks/channelNotification-Bx6dpA7I.js +1 -0
- package/dist/chunks/{channelNotification-B7A-9DIl.js → channelNotification-n7Avue-9.js} +1 -1
- package/dist/chunks/{chrome-jMAks7-w.js → chrome-BwZPfW9Z.js} +1 -1
- package/dist/chunks/clear-BXv0Sq3m.js +1 -0
- package/dist/chunks/client-DNQukPEE.js +1 -0
- package/dist/chunks/color-BsBrog6H.js +1 -0
- package/dist/chunks/commands-BK3ugb0u.js +1 -0
- package/dist/chunks/commitAttribution-CtQYmnw-.js +1 -0
- package/dist/chunks/{commitAttribution-C22a3OCi.js → commitAttribution-q7SEukgl.js} +1 -1
- package/dist/chunks/{compact-BWvnb4or.js → compact-DiY1w7pT.js} +3 -3
- package/dist/chunks/{companion-Bkn2lSLj.js → companion-D18UNnC7.js} +1 -1
- package/dist/chunks/{config-BvpTbJ5p.js → config-CSHnElBp.js} +1 -1
- package/dist/chunks/{config-D-dzD6n-.js → config-D3QKcEKz.js} +1 -1
- package/dist/chunks/{context-DzNahdyP.js → context-DnyYrN2X.js} +1 -1
- package/dist/chunks/context-noninteractive-0YpW67KZ.js +1 -0
- package/dist/chunks/{context-noninteractive-yiyJriiw.js → context-noninteractive-CFlod2Eg.js} +2 -2
- package/dist/chunks/conversation-CRoOMglD.js +1 -0
- package/dist/chunks/conversation-DCG0fiGV.js +1 -0
- package/dist/chunks/{copy-9k9JPRqW.js → copy-CHGX-YpC.js} +2 -2
- package/dist/chunks/{createSSHSession-BZf-Loo5.js → createSSHSession-Bf-8h3Sw.js} +1 -1
- package/dist/chunks/createSession-BYf27ahD.js +1 -0
- package/dist/chunks/{createSession-kiTHYXSL.js → createSession-rRZIkjl3.js} +1 -1
- package/dist/chunks/{cronJitterConfig-CYP7yrQu.js → cronJitterConfig-DmBBJDTf.js} +3 -3
- package/dist/chunks/crossProjectResume-BQxLBpDD.js +40 -0
- package/dist/chunks/{datadog-Bg-zL-i7.js → datadog-Bb65d6yd.js} +1 -1
- package/dist/chunks/datadog-NnzM1Mu3.js +1 -0
- package/dist/chunks/{desktop-DpaStjc-.js → desktop-DiCA6RUU.js} +1 -1
- package/dist/chunks/{diff-N_VSBo3Z.js → diff-BvLQ-t8P.js} +1 -1
- package/dist/chunks/{doctor-CUWjbh1X.js → doctor-bmTXLycZ.js} +1 -1
- package/dist/chunks/{effort-loH1TUvE.js → effort-CSTwkB2B.js} +2 -2
- package/dist/chunks/{entry-D58E-E6Y.js → entry-BUwwv2dM.js} +4 -4
- package/dist/chunks/{envLessBridgeConfig-SPEr9oqO.js → envLessBridgeConfig-DJJKeDBT.js} +1 -1
- package/dist/chunks/envLessBridgeConfig-Dq02Vvx1.js +1 -0
- package/dist/chunks/{exit-D-tuPpbx.js → exit-eirVuF-n.js} +1 -1
- package/dist/chunks/{export-BIZ_SPXJ.js → export-CcJD8r8U.js} +1 -1
- package/dist/chunks/{exportRenderer-CWPSMaqM.js → exportRenderer-DtezFcml.js} +1 -1
- package/dist/chunks/{extra-usage-CCMwIa85.js → extra-usage-CBcgeIcJ.js} +1 -1
- package/dist/chunks/extra-usage-DhB0NElh.js +1 -0
- package/dist/chunks/{extra-usage-core-BNW4VT7o.js → extra-usage-core-DWM0Q56J.js} +1 -1
- package/dist/chunks/{extra-usage-noninteractive-B_WjXO1E.js → extra-usage-noninteractive-BvJEi4WX.js} +1 -1
- package/dist/chunks/{extraUsage-CNMMTNJi.js → extraUsage-CWde-Mi0.js} +1 -1
- package/dist/chunks/extractMemories-wcRNh_jz.js +1 -0
- package/dist/chunks/{fast-CG1v3fRr.js → fast-DQyJ7c7s.js} +1 -1
- package/dist/chunks/fast-ukzN3wl2.js +1 -0
- package/dist/chunks/{feedback-CG4mS_-B.js → feedback-BzBBKT2y.js} +1 -1
- package/dist/chunks/{firstPartyEventLogger-Y_jAnHoR.js → firstPartyEventLogger-BOHIpp-w.js} +1 -1
- package/dist/chunks/{flushGate-COPcye5f.js → flushGate-DeCDhkKp.js} +1 -1
- package/dist/chunks/{gates-CSKxLmMJ.js → gates-CAVdjC23.js} +1 -1
- package/dist/chunks/gates-CB_pFChT.js +1 -0
- package/dist/chunks/{gemini-B3uSLiNp.js → gemini-CFrOUVS4.js} +1 -1
- package/dist/chunks/{generateRecap-D7rG3jIm.js → generateRecap-Bcp5DiiO.js} +1 -1
- package/dist/chunks/{generateSessionName-zbqanivg.js → generateSessionName-DeFGkHct.js} +1 -1
- package/dist/chunks/{githubRepoPathMapping-B04nEUDG.js → githubRepoPathMapping-B07Wb07_.js} +1 -1
- package/dist/chunks/grok-DtidcVWD.js +1 -0
- package/dist/chunks/{growthbook-C_EY78Sn.js → growthbook-gLwBDK-r.js} +1 -1
- package/dist/chunks/{heapdump-CpmhJ55b.js → heapdump-BxQYlnPR.js} +1 -1
- package/dist/chunks/{help-EHn2neTv.js → help-Bi0sABuv.js} +1 -1
- package/dist/chunks/hooks-BTBhK9sh.js +1 -0
- package/dist/chunks/{hooks-BV6HqbU4.js → hooks-Cc_DxF9N.js} +2 -2
- package/dist/chunks/{hostAdapter-_SmFAVNf.js → hostAdapter-D9_d4gU0.js} +1 -1
- package/dist/chunks/{ide-DkN0KdTR.js → ide-3wDIOoZF.js} +2 -2
- package/dist/chunks/inboundAttachments-DBaPmCTv.js +1 -0
- package/dist/chunks/{inboundAttachments-DnGQw7Pf.js → inboundAttachments-DPMETKd6.js} +1 -1
- package/dist/chunks/initReplBridge-BWP41EGm.js +1 -0
- package/dist/chunks/{insights-Bs9kJDG6.js → insights-w7qM4YyA.js} +24 -24
- package/dist/chunks/{install-CFX_ph9z.js → install-N2FgArWv.js} +1 -1
- package/dist/chunks/{install-github-app-CvRjY1Wi.js → install-github-app-By39Zi78.js} +2 -2
- package/dist/chunks/{install-slack-app-DjhnVSe0.js → install-slack-app-CVwZphU-.js} +1 -1
- package/dist/chunks/{instrumentation-c5zlOWom.js → instrumentation-BkLEupDC.js} +3 -3
- package/dist/chunks/{job-3QwLq609.js → job-CgBE27O7.js} +1 -1
- package/dist/chunks/{keybindings-7mDm3UKD.js → keybindings-DHXJzU3E.js} +2 -2
- package/dist/chunks/{lang-DyyjY20G.js → lang-DLneRt1b.js} +1 -1
- package/dist/chunks/{language-CPRGmY8Q.js → language-BVAzlrRz.js} +1 -1
- package/dist/chunks/language-ZBygqv6V.js +1 -0
- package/dist/chunks/{launchAgentsPlatform-CpsMsTqQ.js → launchAgentsPlatform-CtfK0qPa.js} +1 -1
- package/dist/chunks/launchAutofixPr-CQBv0rQ0.js +18 -0
- package/dist/chunks/{launchLocalMemory-DlYQcEQJ.js → launchLocalMemory-BNE09TKr.js} +2 -2
- package/dist/chunks/{launchLocalVault-CP0AyPjj.js → launchLocalVault-Dw_NJUnd.js} +3 -3
- package/dist/chunks/{launchMemoryStores-BHoDFkJ5.js → launchMemoryStores-CRRB6Z5A.js} +1 -1
- package/dist/chunks/{launchOnboarding-CFTNXcnc.js → launchOnboarding-nMAF5iv7.js} +1 -1
- package/dist/chunks/{launchSchedule-5KQr6x_A.js → launchSchedule-Akq1AmK8.js} +1 -1
- package/dist/chunks/{launchSkillStore-D0yGuE68.js → launchSkillStore-Zwtasj13.js} +1 -1
- package/dist/chunks/{launchTeleport-DRKnXOwY.js → launchTeleport-BzlIYyll.js} +3 -3
- package/dist/chunks/{launchVault-XA-zAswX.js → launchVault-BevXlxJB.js} +1 -1
- package/dist/chunks/{loadAgentsDir-DI1a76pd.js → loadAgentsDir-DF6FgRn-.js} +812 -785
- package/dist/chunks/loadAgentsDir-OIIKHPq9.js +1 -0
- package/dist/chunks/loadPluginHooks-DBHkyJaj.js +1 -0
- package/dist/chunks/localSearch-DslXIfeC.js +1 -0
- package/dist/chunks/{localSearch-CDOJNc_E.js → localSearch-v4itMlCM.js} +1 -1
- package/dist/chunks/{login-nwTOoyxv.js → login-CKodBzyZ.js} +1 -1
- package/dist/chunks/login-CTIVwgFU.js +1 -0
- package/dist/chunks/{logoV2Utils-DDUoPClc.js → logoV2Utils-VebeEs7Y.js} +1 -1
- package/dist/chunks/logout-B3MyP8fk.js +1 -0
- package/dist/chunks/{magicDocs-CmUlOWjI.js → magicDocs-uX5n3NKh.js} +2 -2
- package/dist/chunks/{main-CeG_nUsC.js → main-Cd_i0ZPo.js} +40 -40
- package/dist/chunks/{mappers-CJ8IO1o1.js → mappers-CPL2ni36.js} +1 -1
- package/dist/chunks/{mcp-CanCqnch.js → mcp-Ci_TbB5m.js} +2 -2
- package/dist/chunks/mcp-DeWOD4B4.js +1 -0
- package/dist/chunks/mcp-Dhp1SaId.js +6 -0
- package/dist/chunks/{mcpServer-lIneUZ5p.js → mcpServer-CPJo2eKm.js} +1 -1
- package/dist/chunks/{mcpServer-DPHQVYdC.js → mcpServer-CTuPkyD6.js} +1 -1
- package/dist/chunks/{memory-BcWBkKV8.js → memory-enMuKEnU.js} +1 -1
- package/dist/chunks/{model-DJLzVvcF.js → model-4f3U2YMu.js} +1 -1
- package/dist/chunks/model-BsHyPvD0.js +1 -0
- package/dist/chunks/{onChangeAppState-Dxbl8fvk.js → onChangeAppState-DxTGoS7j.js} +1 -1
- package/dist/chunks/openai-CwG_KpH1.js +10 -0
- package/dist/chunks/openaiShared-Bjrci9n8.js +1 -0
- package/dist/chunks/{overageCreditGrant-DLKadMYU.js → overageCreditGrant-CCkJVN9k.js} +1 -1
- package/dist/chunks/{passes-BIfuerjL.js → passes-O0VEQz1a.js} +1 -1
- package/dist/chunks/{paths-BBvuDQl9.js → paths-o5iA-EnQ.js} +6 -6
- package/dist/chunks/permissions-BtYQvivG.js +3 -0
- package/dist/chunks/{pipeTransport-DVoIA1uN.js → pipeTransport-BEfqa7Uh.js} +1 -1
- package/dist/chunks/{plan--lnWxB3Q.js → plan-Jw4GjVL0.js} +1 -1
- package/dist/chunks/{plugin-DWLyrLw4.js → plugin-DZq0voFR.js} +1 -1
- package/dist/chunks/{pluginAutoupdate-CGXIWBrb.js → pluginAutoupdate-D19vNoOp.js} +1 -1
- package/dist/chunks/{pluginBlocklist-DJrMdzT0.js → pluginBlocklist-DeX8I4dK.js} +1 -1
- package/dist/chunks/{pluginCliCommands-C08q9dHk.js → pluginCliCommands-CMgqxOaT.js} +1 -1
- package/dist/chunks/{pluginFlagging-Dggxke70.js → pluginFlagging-DFLE5fkh.js} +1 -1
- package/dist/chunks/{pluginOperations-CNCImIe8.js → pluginOperations-BTz69m3_.js} +2 -2
- package/dist/chunks/{pluginStartupCheck-BW2fjg2P.js → pluginStartupCheck-CWWKwD5F.js} +1 -1
- package/dist/chunks/pluginStartupCheck-Non969kz.js +1 -0
- package/dist/chunks/{plugins-DQ3CRWWO.js → plugins-BPUnAc0r.js} +4 -4
- package/dist/chunks/policyLimits-D6dpS-CU.js +1 -0
- package/dist/chunks/{pollConfig-DAQ-ives.js → pollConfig-DyHumJli.js} +1 -1
- package/dist/chunks/{poor-DqfrQT61.js → poor-CHHZIPDW.js} +1 -1
- package/dist/chunks/{poorMode-DzYT47KW.js → poorMode-7N6J6YN2.js} +1 -1
- package/dist/chunks/poorMode-DX4EXe0o.js +1 -0
- package/dist/chunks/print-QCXJDmz0.js +39 -0
- package/dist/chunks/{privacy-settings-agwqjYJo.js → privacy-settings-DR0_P3JF.js} +1 -1
- package/dist/chunks/processBashCommand-CkqKsBSD.js +1 -0
- package/dist/chunks/processSlashCommand-DIk_hLHW.js +6 -0
- package/dist/chunks/prompt-2ia5b-QO.js +1 -0
- package/dist/chunks/prompt-CNtVpGdl.js +1 -0
- package/dist/chunks/{prompt-CjFAtm3w.js → prompt-DiHksuOs.js} +1 -1
- package/dist/chunks/{promptEditor-EgosPsy-.js → promptEditor-B3S5E5Q7.js} +2 -2
- package/dist/chunks/{protocolHandler-mtPUT9U0.js → protocolHandler-D1XT2l3j.js} +1 -1
- package/dist/chunks/rate-limit-options-DHh1ksB5.js +1 -0
- package/dist/chunks/rcDebugLog-BNojB_eB.js +11 -0
- package/dist/chunks/{referral-DeDr9zAE.js → referral-BADm5sBf.js} +1 -1
- package/dist/chunks/refresh-D48fjYJ4.js +1 -0
- package/dist/chunks/{registerProtocol-BZBH8Zgl.js → registerProtocol-Dzmi6VC4.js} +1 -1
- package/dist/chunks/{registry-Dz6AbiYP.js → registry-CEu_N3dS.js} +1 -1
- package/dist/chunks/{release-notes-DiUNOrg9.js → release-notes-Dr61jYDO.js} +1 -1
- package/dist/chunks/{releaseNotes-CnhQit0y.js → releaseNotes-5SV7C5aV.js} +2 -2
- package/dist/chunks/{reload-plugins-Dx52GcaG.js → reload-plugins-BxuE-21F.js} +1 -1
- package/dist/chunks/{remote-env-B67Oo3sI.js → remote-env-BaQjT5em.js} +1 -1
- package/dist/chunks/{remoteBridgeCore-BzSUgPbt.js → remoteBridgeCore-B8MjcW6f.js} +1 -1
- package/dist/chunks/{remoteControlServer-L8smP7Zu.js → remoteControlServer-BvoNcg9D.js} +2 -2
- package/dist/chunks/{rename-C4PauyTZ.js → rename-B3q0tgmd.js} +1 -1
- package/dist/chunks/{resume-CrSn26xq.js → resume-BSGOqus7.js} +2 -2
- package/dist/chunks/{runtimeObserver-YNy3mIb7.js → runtimeObserver-Bb6wSUMJ.js} +1 -1
- package/dist/chunks/{runtimeObserver-nAhH4Wca.js → runtimeObserver-BbwUiToa.js} +2 -2
- package/dist/chunks/sandbox-adapter-Cr6f6gjf.js +1 -0
- package/dist/chunks/{sandbox-toggle-BYqbcI5d.js → sandbox-toggle-L7YPKXba.js} +1 -1
- package/dist/chunks/searchExtraTools-DRVIhwVJ.js +1 -0
- package/dist/chunks/{sentry-BNVxoVLS.js → sentry-DG3ru8XE.js} +1 -1
- package/dist/chunks/{session-BuEmHrqM.js → session-B5wA2K9M.js} +2 -2
- package/dist/chunks/{sessionDiscovery-Mcsfa0g-.js → sessionDiscovery-DijWFNjj.js} +1 -1
- package/dist/chunks/sessionFileAccessHooks-DnbPctQc.js +1 -0
- package/dist/chunks/sessionMemory-BOT9f5f0.js +1 -0
- package/dist/chunks/sessionMemory-CeWjRuFL.js +1 -0
- package/dist/chunks/sessionMemoryUtils-B47JMJa2.js +1 -0
- package/dist/chunks/sessionObserver-BNZflr2e.js +1 -0
- package/dist/chunks/{sessionObserver-DG2zQgfi.js → sessionObserver-CsDT2GnB.js} +1 -1
- package/dist/chunks/sessionStorage-BUuPrnU0.js +1 -0
- package/dist/chunks/{sessionTitle-zUVSAHO7.js → sessionTitle-CxmvZO71.js} +2 -2
- package/dist/chunks/{sessionTracing-DoRJ4nSa.js → sessionTracing-Cy5dAplG.js} +1 -1
- package/dist/chunks/{settingsSync-B9bz77E1.js → settingsSync-54E8xV8N.js} +1 -1
- package/dist/chunks/setup-B5CMpp0c.js +2 -0
- package/dist/chunks/{setup-CCOLlRtP.js → setup-GJtdESQj.js} +1 -1
- package/dist/chunks/{setup-B1JbPepL.js → setup-KWELOokh.js} +1 -1
- package/dist/chunks/{shadowedRuleDetection-BBR3uEgx.js → shadowedRuleDetection-C4NGjljb.js} +1 -1
- package/dist/chunks/{sideQuestion-DHW5rgKz.js → sideQuestion-DBrzdgkl.js} +1 -1
- package/dist/chunks/{sink-DxDOsLa2.js → sink-BKc24wdw.js} +1 -1
- package/dist/chunks/sink-DG0SNHP7.js +1 -0
- package/dist/chunks/{sinks-BrrTUxkC.js → sinks-BTS1DWM4.js} +2 -2
- package/dist/chunks/sinks-Cbp-8X1S.js +1 -0
- package/dist/chunks/{skill-learning-C0nOKZfg.js → skill-learning-C5NrosiL.js} +1 -1
- package/dist/chunks/skillChangeDetector-NJrEtU47.js +1 -0
- package/dist/chunks/{skillGapStore-_YuJP5KI.js → skillGapStore-D1rkePoo.js} +2 -2
- package/dist/chunks/{skillGapStore-Czi5jKjJ.js → skillGapStore-uXpRqLGG.js} +1 -1
- package/dist/chunks/{skillGenerator-kbaRbpqJ.js → skillGenerator-Deog7yBO.js} +2 -2
- package/dist/chunks/skillLearning-BHjRTDJw.js +1 -0
- package/dist/chunks/skillLearning-By7jxHSI.js +1 -0
- package/dist/chunks/{skillPanel-BxDvlPzd.js → skillPanel-Bx63GX9w.js} +3 -3
- package/dist/chunks/{skillSearchPanel-D-MX6Qgt.js → skillSearchPanel-CM5EZGkH.js} +4 -4
- package/dist/chunks/{skills-NpEgFkFZ.js → skills-JvC7Ms0P.js} +1 -1
- package/dist/chunks/{sprites-DD4eIkN7.js → sprites-YBiqlYch.js} +1 -1
- package/dist/chunks/{stats-xL3NHwhp.js → stats-BJMKNvVK.js} +1 -1
- package/dist/chunks/{status-B5E70xRv.js → status-DAJ28yxZ.js} +1 -1
- package/dist/chunks/{statusNoticeHelpers-DcssRhLw.js → statusNoticeHelpers-B7nbsqLz.js} +1 -1
- package/dist/chunks/{tag-BELr-qIa.js → tag-B4y7cBqH.js} +1 -1
- package/dist/chunks/{tasks-CrdWcSt-.js → tasks-CSye58Ap.js} +1 -1
- package/dist/chunks/{teamHelpers--3ZyNDlv.js → teamHelpers-BFZ4eVwW.js} +1 -1
- package/dist/chunks/teamHelpers-CKBoDEPj.js +1 -0
- package/dist/chunks/teammateModeSnapshot-BfOLEMKn.js +1 -0
- package/dist/chunks/{teammateModeSnapshot-DOQMTKbQ.js → teammateModeSnapshot-DXc2vyo2.js} +1 -1
- package/dist/chunks/teleport-NN6zSxxe.js +1 -0
- package/dist/chunks/{templateJobs-8IY2Cgig.js → templateJobs-DAVqqU0g.js} +1 -1
- package/dist/chunks/{terminalSetup-Lyg4NbGA.js → terminalSetup-DqL65XR2.js} +1 -1
- package/dist/chunks/{terminalSetup-C4psrmpb.js → terminalSetup-jZKBoPTc.js} +1 -1
- package/dist/chunks/{theme-B8GNnJ_q.js → theme-DPv2L3ut.js} +1 -1
- package/dist/chunks/thinkback-B0OSwcPG.js +1 -0
- package/dist/chunks/thinkback-play-D_uOESmO.js +1 -0
- package/dist/chunks/thinkback-tcfR5Uod.js +1 -0
- package/dist/chunks/{toolEventObserver-DzLd0MSn.js → toolEventObserver-CtApZXry.js} +1 -1
- package/dist/chunks/{toolEventObserver-D0TSHm01.js → toolEventObserver-D6ZTtdh_.js} +1 -1
- package/dist/chunks/toolPool-DFpa-yul.js +1 -0
- package/dist/chunks/toolPool-DqemSx_r.js +1 -0
- package/dist/chunks/{trustedDevice-BvYYXfd8.js → trustedDevice-Bxn7WW5C.js} +1 -1
- package/dist/chunks/{trustedDevice-1iTu4LEm.js → trustedDevice-DsgCQRsJ.js} +1 -1
- package/dist/chunks/{ultrareviewCommand-BTXAN2wP.js → ultrareviewCommand-BfuSrdXz.js} +2 -2
- package/dist/chunks/undercover-B-R6dhHB.js +1 -0
- package/dist/chunks/{undercover-DvvnEmsX.js → undercover-CM8zTx5g.js} +1 -1
- package/dist/chunks/{updateCCB-C-qfLi0j.js → updateCCB-DTArxdyR.js} +4 -4
- package/dist/chunks/upgrade-CCrHxXrm.js +1 -0
- package/dist/chunks/{upgrade-DTBZSxwv.js → upgrade-CEd1Jxw_.js} +1 -1
- package/dist/chunks/{upload-BF8tf_Eo.js → upload-DNo3bZLc.js} +1 -1
- package/dist/chunks/{usage-DvSTXEYY.js → usage-DEwRsc7E.js} +1 -1
- package/dist/chunks/{usage-BRYRRgNt.js → usage-X4-qec8g.js} +1 -1
- package/dist/chunks/useMainLoopModel-2A9HV1H3.js +1 -0
- package/dist/chunks/{useManagePlugins-GmnI9K53.js → useManagePlugins-D9MBag8O.js} +1 -1
- package/dist/chunks/{useMergedTools-Dah5KDMi.js → useMergedTools-DCYrP_YE.js} +1 -1
- package/dist/chunks/{useSearchInput-BV_azHiA.js → useSearchInput-CepwLBvi.js} +1 -1
- package/dist/chunks/useSettingsErrors-C8ffWXbY.js +1 -0
- package/dist/chunks/{useVoice-DR69NLxp.js → useVoice-vHZVaTAN.js} +1 -1
- package/dist/chunks/{util-BpyJ4Bom.js → util-B13MVSse.js} +1 -1
- package/dist/chunks/utils-C-vk0zpl.js +1 -0
- package/dist/chunks/{validatePlugin-vptAYuYu.js → validatePlugin-Cf_toBOJ.js} +1 -1
- package/dist/chunks/{vim-DvOw8dfR.js → vim-6p7eiRPG.js} +1 -1
- package/dist/chunks/{voice-B3BZs53f.js → voice-Bvc_BxoI.js} +2 -2
- package/dist/chunks/{voiceModeEnabled-DA76xN1Q.js → voiceModeEnabled-BPbOh6jd.js} +1 -1
- package/dist/chunks/voiceModeEnabled-JSBux8GA.js +1 -0
- package/dist/chunks/{voiceStreamSTT-_w1VjIOs.js → voiceStreamSTT-CzCUhap3.js} +1 -1
- package/dist/chunks/voiceStreamSTT-D9ER6Ml3.js +1 -0
- package/dist/chunks/{workerRegistry-2_MZVih1.js → workerRegistry-DCtC-WN3.js} +1 -1
- package/dist/chunks/worktree-Dv0mPuy_.js +1 -0
- package/dist/chunks/{xml-Dx--sNE1.js → xml-CqxiCY4v.js} +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ApproveApiKey-DiEe4eui.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-ByraVuXh.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-BDvmz12S.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-B4ocUjev.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-BvaB9b0y.js +0 -1
- package/dist/chunks/DevChannelsDialog-BljR0X9X.js +0 -1
- package/dist/chunks/DiffDialog-BhQ2QaLW.js +0 -3
- package/dist/chunks/Doctor-BXb0qv6n.js +0 -3
- package/dist/chunks/Doctor-C5DYPEGl.js +0 -1
- package/dist/chunks/Feedback-DwHzc4UT.js +0 -2
- package/dist/chunks/Grove-DnTo982-.js +0 -1
- package/dist/chunks/MCPConnectionManager-DYGoS1Ht.js +0 -1
- package/dist/chunks/MessageSelector-DTmUuEKJ.js +0 -3
- package/dist/chunks/Messages-DWiKTx5o.js +0 -11
- package/dist/chunks/PluginSettings-eYcWehI8.js +0 -17
- package/dist/chunks/QueryEngine-C_KZts4y.js +0 -1
- package/dist/chunks/REPL-C6YR0VKU.js +0 -1
- package/dist/chunks/REPL-DzHz-LOY.js +0 -97
- package/dist/chunks/ResumeConversation-BktSnsCm.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-CqFD8vVS.js +0 -1
- package/dist/chunks/SentryErrorBoundary-BUirJRWU.js +0 -1
- package/dist/chunks/Settings-vfFvcweR.js +0 -2
- package/dist/chunks/TrustDialog-CVbzrv6g.js +0 -1
- package/dist/chunks/WindowsTerminalBackend-BE9NX5IH.js +0 -2
- package/dist/chunks/api-6tcwJlf_.js +0 -1
- package/dist/chunks/assistant-CwbhlCM-.js +0 -1
- package/dist/chunks/auth-GxZhOvQ1.js +0 -1
- package/dist/chunks/backgroundHousekeeping-BIZTAYho.js +0 -17
- package/dist/chunks/backgroundHousekeeping-Csh58CxV.js +0 -1
- package/dist/chunks/bridgeConfig-D4tpc568.js +0 -1
- package/dist/chunks/bridgeEnabled-B8_c_Ppq.js +0 -1
- package/dist/chunks/bridgeMain-C5RDihlX.js +0 -68
- package/dist/chunks/bridgeMain-D7_lg2iJ.js +0 -1
- package/dist/chunks/caches-dGk7xsDu.js +0 -1
- package/dist/chunks/changeDetector-DoLfg8a6.js +0 -1
- package/dist/chunks/channelNotification-DDErroWn.js +0 -1
- package/dist/chunks/clear-OudnCGa7.js +0 -1
- package/dist/chunks/client-DxDmXXTh.js +0 -1
- package/dist/chunks/color-DG_R5-hl.js +0 -1
- package/dist/chunks/commands-BWIOEBPs.js +0 -1
- package/dist/chunks/commitAttribution-BA4fcbHf.js +0 -1
- package/dist/chunks/context-noninteractive-CM1-lUSe.js +0 -1
- package/dist/chunks/conversation-DKlz47xf.js +0 -1
- package/dist/chunks/conversation-cUxdb8MN.js +0 -1
- package/dist/chunks/createSession-BuJcoBAj.js +0 -1
- package/dist/chunks/crossProjectResume-BJisir9Z.js +0 -40
- package/dist/chunks/datadog-CVeFkaQu.js +0 -1
- package/dist/chunks/envLessBridgeConfig-CT8sdmFu.js +0 -1
- package/dist/chunks/extra-usage-rdJ7ecEb.js +0 -1
- package/dist/chunks/extractMemories-BrvZVsmM.js +0 -1
- package/dist/chunks/fast-CLKKsx2H.js +0 -1
- package/dist/chunks/gates-CSHuXnUx.js +0 -1
- package/dist/chunks/grok-CDOpos8E.js +0 -1
- package/dist/chunks/hooks-BFdX17Za.js +0 -1
- package/dist/chunks/inboundAttachments-BVUunfAX.js +0 -1
- package/dist/chunks/initReplBridge-tPRGPBq7.js +0 -1
- package/dist/chunks/language-Cf6bMI4N.js +0 -1
- package/dist/chunks/launchAutofixPr-D9h6YAZY.js +0 -2
- package/dist/chunks/loadAgentsDir-DCyiY0MN.js +0 -1
- package/dist/chunks/loadPluginHooks-C0Ei-0E2.js +0 -1
- package/dist/chunks/localSearch-MBx7KzC2.js +0 -1
- package/dist/chunks/login-D8UKKaud.js +0 -1
- package/dist/chunks/logout-B0BjqlGi.js +0 -1
- package/dist/chunks/mcp-Dq0kxZFx.js +0 -6
- package/dist/chunks/mcp-zbxZM9BP.js +0 -1
- package/dist/chunks/model-H3rtl6eR.js +0 -1
- package/dist/chunks/openai-DkYK4THc.js +0 -10
- package/dist/chunks/openaiShared-D5lOejS1.js +0 -16
- package/dist/chunks/permissions-S2EvIRKj.js +0 -3
- package/dist/chunks/pluginStartupCheck-DpxQPXJE.js +0 -1
- package/dist/chunks/policyLimits-BotYrS-v.js +0 -1
- package/dist/chunks/poorMode-DEAe3hiK.js +0 -1
- package/dist/chunks/print-GGVp62vj.js +0 -39
- package/dist/chunks/processBashCommand-DHHN8Ca4.js +0 -1
- package/dist/chunks/processSlashCommand-COtIO6Jy.js +0 -6
- package/dist/chunks/prompt-CO160cIr.js +0 -1
- package/dist/chunks/prompt-GY9hlRvI.js +0 -1
- package/dist/chunks/rate-limit-options-C6SFOHue.js +0 -1
- package/dist/chunks/rcDebugLog-CPKZCtR8.js +0 -11
- package/dist/chunks/refresh-D7pdoY_X.js +0 -1
- package/dist/chunks/sandbox-adapter-CzwHes1i.js +0 -1
- package/dist/chunks/searchExtraTools-CcpdCO6l.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-qnNiGMnE.js +0 -1
- package/dist/chunks/sessionMemory-CMahwDdW.js +0 -1
- package/dist/chunks/sessionMemory-pFSn4HSN.js +0 -1
- package/dist/chunks/sessionMemoryUtils-Du5jUl7M.js +0 -1
- package/dist/chunks/sessionObserver-Je868MC9.js +0 -1
- package/dist/chunks/sessionStorage-D3FhAADV.js +0 -1
- package/dist/chunks/setup-DWkSjA49.js +0 -2
- package/dist/chunks/sink-cQOgsnw3.js +0 -1
- package/dist/chunks/sinks-Djiz_5-Z.js +0 -1
- package/dist/chunks/skillChangeDetector-D8C-uQSQ.js +0 -1
- package/dist/chunks/skillLearning-3KWrBczS.js +0 -1
- package/dist/chunks/skillLearning-DBbdGbk-.js +0 -1
- package/dist/chunks/teamHelpers-CUAiXng3.js +0 -1
- package/dist/chunks/teammateModeSnapshot-C6EWhR0X.js +0 -1
- package/dist/chunks/teleport-LXFOan9C.js +0 -1
- package/dist/chunks/thinkback-DPXwEK3B.js +0 -1
- package/dist/chunks/thinkback-DZW3Mcx_.js +0 -1
- package/dist/chunks/thinkback-play-BMOE-ceh.js +0 -1
- package/dist/chunks/toolPool-DVOfpjDz.js +0 -1
- package/dist/chunks/toolPool-Dq-Vtvrj.js +0 -1
- package/dist/chunks/undercover-C_44e3oN.js +0 -1
- package/dist/chunks/upgrade-CGXa5Dwy.js +0 -1
- package/dist/chunks/useMainLoopModel-CwvuTRXn.js +0 -1
- package/dist/chunks/useSettingsErrors-C-j_Zt7g.js +0 -1
- package/dist/chunks/utils-CrZcpypC.js +0 -1
- package/dist/chunks/voiceModeEnabled-DIveLYGb.js +0 -1
- package/dist/chunks/voiceStreamSTT-hpzWd_zl.js +0 -1
- package/dist/chunks/worktree-CCuDwRmS.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Ka as n,Pc as r,Sc as i,lo as a,oo as o}from"./paths-
|
|
2
|
-
Install SoX manually for audio recording.`}`};if(!await y()){let e;return e=process.platform===`win32`?`Settings → Privacy → Microphone`:process.platform===`linux`?`your system's audio settings`:`System Settings → Privacy & Security → Microphone`,{type:`text`,value:`Microphone access is denied. To enable it, go to ${e}, then run /voice again.`}}if(a(`userSettings`,{voiceEnabled:!0,...
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Ka as n,Pc as r,Sc as i,lo as a,oo as o}from"./paths-o5iA-EnQ.js";import{n as s,r as c}from"./analytics-DqMQntaB.js";import{SA as l,aT as u,oT as d,vA as f}from"./loadAgentsDir-DF6FgRn-.js";import{n as p,r as m}from"./voiceModeEnabled-BPbOh6jd.js";import{n as h,t as g}from"./useVoice-vHZVaTAN.js";var _,v;e((()=>{g(),d(),s(),t(),f(),o(),p(),_=2,v=async e=>{if(!m())return{type:`text`,value:`Voice mode is not available.`};let t=n(),o=t.voiceEnabled===!0,s=e?.trim().toLowerCase();if(o&&s===`doubao`)return a(`userSettings`,{voiceProvider:`doubao`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(l.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Doubao ASR. Hold ${u(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o&&s===`anthropic`)return a(`userSettings`,{voiceProvider:`anthropic`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(l.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Anthropic STT. Hold ${u(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o)return a(`userSettings`,{voiceEnabled:!1}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(l.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!1}),{type:`text`,value:`Voice mode disabled.`});let d=s===`doubao`?`doubao`:`anthropic`,{isVoiceStreamAvailable:f}=await import(`./voiceStreamSTT-D9ER6Ml3.js`),{checkRecordingAvailability:p}=await import(`./voice-DXiiy8HX.js`),g=await p();if(!g.available)return{type:`text`,value:g.reason??`Voice mode is not available in this environment.`};if(d!==`doubao`&&!f())return{type:`text`,value:`Voice mode requires a Claude.ai account. Please run /login to sign in.`};let{checkVoiceDependencies:v,requestMicrophonePermission:y}=await import(`./voice-DXiiy8HX.js`),b=await v();if(!b.available)return{type:`text`,value:`No audio recording tool found.${b.installCommand?`\nInstall audio recording tools? Run: ${b.installCommand}`:`
|
|
2
|
+
Install SoX manually for audio recording.`}`};if(!await y()){let e;return e=process.platform===`win32`?`Settings → Privacy → Microphone`:process.platform===`linux`?`your system's audio settings`:`System Settings → Privacy & Security → Microphone`,{type:`text`,value:`Microphone access is denied. To enable it, go to ${e}, then run /voice again.`}}if(a(`userSettings`,{voiceEnabled:!0,...d===`doubao`?{voiceProvider:`doubao`}:{}}).error)return{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`};l.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!0});let x=u(`voice:pushToTalk`,`Chat`,`Space`),S=``,C=d===`doubao`?`Doubao ASR`:`Anthropic`;if(d!==`doubao`){let e=h(t.language),n=i(),a=n.voiceLangHintLastLanguage!==e.code,o=a?0:n.voiceLangHintShownCount??0,s=!e.fellBackFrom&&o<_;e.fellBackFrom?S=` Note: "${e.fellBackFrom}" is not a supported dictation language; using English. Change it via /config.`:s&&(S=` Dictation language: ${e.code} (/config to change).`),(a||s)&&r(t=>({...t,voiceLangHintShownCount:o+ +!!s,voiceLangHintLastLanguage:e.code}))}return{type:`text`,value:`Voice mode enabled (${C}). Hold ${x} to record.${S}`}}}))();export{v as call};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-o5iA-EnQ.js";function o(){return!r(`tengu_amber_quartz_disabled`,!1)}function s(){return i()?!!t()?.accessToken:!1}function c(){return s()&&o()}function l(){return o()}var u=e((()=>{n(),a()}));export{c as a,o as i,u as n,l as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n}from"./voiceModeEnabled-BPbOh6jd.js";n();export{t as isVoiceGrowthBookEnabled,e as isVoiceModeEnabled};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-o5iA-EnQ.js";import{E as d,T as f,d as p,s as m,w as h}from"./debug-UI3T040K.js";import{l as g,u as _}from"./oauth-CdZEzMww.js";import{o as v,s as y}from"./log-CzsijfHZ.js";import{c as b,g as x,h as S,l as C,u as w}from"./proxy-CfZp-wce.js";function T(){if(!c())return!1;let e=r();return e!==null&&e.accessToken!==null}async function E(e,t){await i();let a=r();if(!a?.accessToken)return p(`[voice_stream] No OAuth token available`),null;let c=process.env.VOICE_STREAM_BASE_URL||g().BASE_API_URL.replace(`https://`,`wss://`).replace(`http://`,`ws://`);process.env.VOICE_STREAM_BASE_URL&&p(`[voice_stream] Using VOICE_STREAM_BASE_URL override: ${process.env.VOICE_STREAM_BASE_URL}`);let l=new URLSearchParams({encoding:`linear16`,sample_rate:`16000`,channels:`1`,endpointing_ms:`300`,utterance_end_ms:`1000`,language:t?.language??`en`}),u=s(`tengu_cobalt_frost`,!1);if(u&&(l.set(`use_conversation_engine`,`true`),l.set(`stt_provider`,`deepgram-nova3`),p(`[voice_stream] Nova 3 gate enabled (tengu_cobalt_frost)`)),t?.keyterms?.length)for(let e of t.keyterms)l.append(`keyterms`,e);let m=`${c}${k}?${l.toString()}`;p(`[voice_stream] Connecting to ${m}`);let h={Authorization:`Bearer ${a.accessToken}`,"User-Agent":o(),"x-app":`cli`},_=S(),v=new n(m,typeof Bun<`u`?{headers:h,proxy:C(m),tls:_||void 0}:{headers:h,agent:b(m),..._}),x=null,w=!1,T=!1,E=!1,M=!1,N=null,P=null,F={send(e){if(v.readyState===n.OPEN){if(T){p(`[voice_stream] Dropping audio chunk after CloseStream: ${String(e.length)} bytes`);return}p(`[voice_stream] Sending audio chunk: ${String(e.length)} bytes`),v.send(Buffer.from(e))}},finalize(){return E||T?Promise.resolve(`ws_already_closed`):(E=!0,new Promise(t=>{let r=setTimeout(()=>N?.(`safety_timeout`),j.safety),i=setTimeout(()=>N?.(`no_data_timeout`),j.noData);if(P=()=>{clearTimeout(i),P=null},N=n=>{if(clearTimeout(r),clearTimeout(i),N=null,P=null,I){p(`[voice_stream] Promoting unreported interim before ${n} resolve`);let t=I;I=``,e.onTranscript(t,!0)}p(`[voice_stream] Finalize resolved via ${n}`),t(n)},v.readyState===n.CLOSED||v.readyState===n.CLOSING){N(`ws_already_closed`);return}setTimeout(()=>{T=!0,v.readyState===n.OPEN&&(p(`[voice_stream] Sending CloseStream (finalize)`),v.send(O))},0)}))},close(){T=!0,x&&(clearInterval(x),x=null),w=!1,v.readyState===n.OPEN&&v.close()},isConnected(){return w&&v.readyState===n.OPEN}};v.on(`open`,()=>{p(`[voice_stream] WebSocket connected`),w=!0,p(`[voice_stream] Sending initial KeepAlive`),v.send(D),x=setInterval(e=>{e.readyState===n.OPEN&&(p(`[voice_stream] Sending periodic KeepAlive`),e.send(D))},A,v),e.onReady(F)});let I=``;return v.on(`message`,t=>{let n=t.toString();p(`[voice_stream] Message received (${String(n.length)} chars): ${n.slice(0,200)}`);let r;try{r=f(n)}catch{return}switch(r.type){case`TranscriptText`:{let t=r.data;if(p(`[voice_stream] TranscriptText: "${t??``}"`),T&&P?.(),t){if(!u&&I){let n=I.trimStart(),r=t.trimStart();n&&r&&!r.startsWith(n)&&!n.startsWith(r)&&(p(`[voice_stream] Auto-finalizing previous segment (new segment detected): "${I}"`),e.onTranscript(I,!0))}I=t,e.onTranscript(t,!1)}break}case`TranscriptEndpoint`:{p(`[voice_stream] TranscriptEndpoint received, lastTranscriptText="${I}"`);let t=I;I=``,t&&e.onTranscript(t,!0),T&&N?.(`post_closestream_endpoint`);break}case`TranscriptError`:{let t=r.description??r.error_code??`unknown transcription error`;p(`[voice_stream] TranscriptError: ${t}`),E||e.onError(t);break}case`error`:{let t=r.message??d(r);p(`[voice_stream] Server error: ${t}`),E||e.onError(t);break}default:break}}),v.on(`close`,(t,n)=>{let r=n?.toString()??``;if(p(`[voice_stream] WebSocket closed: code=${String(t)} reason="${r}"`),w=!1,x&&(clearInterval(x),x=null),I){p(`[voice_stream] Promoting unreported interim transcript to final on close`);let t=I;I=``,e.onTranscript(t,!0)}N?.(`ws_close`),!E&&!M&&t!==1e3&&t!==1005&&e.onError(`Connection closed: code ${String(t)}${r?` — ${r}`:``}`),e.onClose()}),v.on(`unexpected-response`,(t,n)=>{let r=n.statusCode??0;if(r===101){p(`[voice_stream] unexpected-response fired with 101; ignoring`);return}p(`[voice_stream] Upgrade rejected: status=${String(r)} cf-mitigated=${String(n.headers[`cf-mitigated`])} cf-ray=${String(n.headers[`cf-ray`])}`),M=!0,n.resume(),t.destroy(),!E&&e.onError(`WebSocket upgrade rejected with HTTP ${String(r)}`,{fatal:r>=400&&r<500})}),v.on(`error`,t=>{y(t),p(`[voice_stream] WebSocket error: ${t.message}`),E||e.onError(`Voice stream connection error: ${t.message}`)}),F}var D,O,k,A,j,M=e((()=>{t(),_(),l(),m(),u(),v(),x(),w(),h(),a(),D=`{"type":"KeepAlive"}`,O=`{"type":"CloseStream"}`,k=`/api/ws/speech_to_text/voice_stream`,A=8e3,j={safety:5e3,noData:1500}}));export{T as i,E as n,M as r,j as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./voiceStreamSTT-CzCUhap3.js";t();export{e as isVoiceStreamAvailable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Jt as e,on as t}from"./paths-
|
|
1
|
+
import{Jt as e,on as t}from"./paths-o5iA-EnQ.js";import{L as n,V as r}from"./debug-UI3T040K.js";import{o as i,t as a}from"./bridgeMain-QbfEOTqV.js";import{resolve as o}from"path";t(),r();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),r=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:r,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${n(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wt as e,yt as t}from"./loadAgentsDir-DF6FgRn-.js";e();export{t as execIntoTmuxWorktree};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DR8-3Aex.js";import{ds as t,no as n,oo as r,xs as i}from"./paths-
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{ds as t,no as n,oo as r,xs as i}from"./paths-o5iA-EnQ.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=n(),t=[],r=[];for(let[n,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${n}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:n,manifest:{name:n,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):r.push(c)}return{enabled:t,disabled:r}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{r(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&t.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function S(e){return x(e).replace(/"/g,`"`).replace(/'/g,`'`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.6.
|
|
2
|
+
import{s as e,u as t}from"./chunks/envUtils-BWeoiL4Y.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.6.8 (Claude Code)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-SOE--nM9.js`);if(t(`cli_entry`),process.argv[2]===`--claude-in-chrome-mcp`){t(`cli_claude_in_chrome_mcp_path`);let{runClaudeInChromeMcpServer:e}=await import(`./chunks/mcpServer-CTuPkyD6.js`);await e();return}else if(process.argv[2]===`--chrome-native-host`){t(`cli_chrome_native_host_path`);let{runChromeNativeHost:e}=await import(`./chunks/chromeNativeHost-4U39yLtd.js`);await e();return}else if(process.argv[2]===`--computer-use-mcp`){t(`cli_computer_use_mcp_path`);let{runComputerUseMcpServer:e}=await import(`./chunks/mcpServer-CPJo2eKm.js`);await e();return}if(process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-BUwwv2dM.js`);await e();return}if(e[0]===`weixin`){t(`cli_weixin_path`);let{handleWeixinCli:n}=await import(`./chunks/src-BIPP3_mo.js`),{enableConfigs:r}=await import(`./chunks/config-D3QKcEKz.js`),{initializeAnalyticsSink:i}=await import(`./chunks/sink-DG0SNHP7.js`),{shutdownDatadog:a}=await import(`./chunks/datadog-NnzM1Mu3.js`),{shutdown1PEventLogging:o}=await import(`./chunks/firstPartyEventLogger-BOHIpp-w.js`),{logForDebugging:s}=await import(`./chunks/debug-DM5ezCBS.js`),{ChannelPermissionRequestNotificationSchema:c}=await import(`./chunks/channelNotification-Bx6dpA7I.js`);await n(e.slice(1),{enableConfigs:r,initializeAnalyticsSink:i,shutdownDatadog:a,shutdown1PEventLogging:o,logForDebugging:s,registerPermissionHandler(e,t){e.setNotificationHandler(c(),async e=>t(e.params))}},`2.6.8`);return}if(e[0]===`--daemon-worker`||e[0]?.startsWith(`--daemon-worker=`)){let t=e[0]===`--daemon-worker`?e[1]:e[0].split(`=`)[1],{runDaemonWorker:n}=await import(`./chunks/workerRegistry-DCtC-WN3.js`);await n(t);return}if(e[0]===`remote-control`||e[0]===`rc`||e[0]===`remote`||e[0]===`sync`||e[0]===`bridge`){t(`cli_bridge_path`);let{enableConfigs:n}=await import(`./chunks/config-D3QKcEKz.js`);n();let{getBridgeDisabledReason:r,checkBridgeMinVersion:i}=await import(`./chunks/bridgeEnabled-BxtxHb8R.js`),{BRIDGE_LOGIN_ERROR:a}=await import(`./chunks/types-CQ1wrnQ0.js`),{bridgeMain:o}=await import(`./chunks/bridgeMain-CMNptMs4.js`),{exitWithError:s}=await import(`./chunks/process-CWupreF6.js`),{getClaudeAIOAuthTokens:c}=await import(`./chunks/auth-D3SKo0wT.js`),{getBridgeAccessToken:l}=await import(`./chunks/bridgeConfig-V_pmBzSH.js`);!c()?.accessToken&&!l()&&s(a);let u=await r();u&&s(`Error: ${u}`);let d=i();d&&s(d);let{waitForPolicyLimitsToLoad:f,isPolicyAllowed:p}=await import(`./chunks/policyLimits-D6dpS-CU.js`);await f(),p(`allow_remote_control`)||s(`Error: Remote Control is disabled by your organization's policy.`),await o(e.slice(1));return}if(e[0]===`daemon`){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-D3QKcEKz.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-C9CigqoF.js`);r();let{initSinks:i}=await import(`./chunks/sinks-Cbp-8X1S.js`);i();let{daemonMain:a}=await import(`./chunks/main-C6be1KFk.js`);await a(e.slice(1));return}if(e[0]===`autonomy`){t(`cli_autonomy_path`);let{getAutonomyCommandText:n}=await import(`./chunks/autonomy-BYi6z9LD.js`),r=await n(e.slice(1).join(` `));await new Promise((e,t)=>{process.stdout.write(`${r}\n`,n=>{if(n){t(n);return}e()})}),process.exit(0)}if(e.includes(`--bg`)||e.includes(`--background`)){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-D3QKcEKz.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-C9CigqoF.js`);r(),await(await import(`./chunks/bg-Dbh5z3Y8.js`)).handleBgStart(e.filter(e=>e!==`--bg`&&e!==`--background`));return}if(e[0]===`ps`||e[0]===`logs`||e[0]===`attach`||e[0]===`kill`){let n=e[0]===`ps`?`status`:e[0];console.error(`[deprecated] Use: claude daemon ${n}${e[1]?` `+e[1]:``}`),t(`cli_daemon_path`);let{enableConfigs:r}=await import(`./chunks/config-D3QKcEKz.js`);r();let{setShellIfWindows:i}=await import(`./chunks/windowsPaths-C9CigqoF.js`);i();let{initSinks:a}=await import(`./chunks/sinks-Cbp-8X1S.js`);a();let{daemonMain:o}=await import(`./chunks/main-C6be1KFk.js`);await o([e[0]===`ps`?`status`:e[0],...e.slice(1)]);return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-DAVqqU0g.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: claude job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-DAVqqU0g.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-D3QKcEKz.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-THQb19xR.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-Dv0mPuy_.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-CWupreF6.js`);e(n.error)}}}e.length===1&&(e[0]===`--update`||e[0]===`--upgrade`)&&(process.argv=[process.argv[0],process.argv[1],`update`]),e.includes(`--bare`)&&(process.env.CLAUDE_CODE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-JGJo1zcC.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-Cd_i0ZPo.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-best",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.8",
|
|
4
4
|
"description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "claude-code-best <claude-code-best@proton.me>",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./ApproveApiKey-BLp4742y.js";export{e as ApproveApiKey};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,r}from"./chunk-DR8-3Aex.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{B as o,F as s,Q as c,Rn as l,T as u,b as d,f,g as p,h as m,nt as h,t as g,x as _}from"./src-Di342QoJ.js";import{t as v}from"./jsx-runtime-D-D469L8.js";import{Gs as y,Po as b,jo as x,rs as S}from"./paths-BBvuDQl9.js";import{L as C,V as w,b as T,h as ee}from"./debug-UI3T040K.js";import{n as E,r as D}from"./analytics-DqMQntaB.js";import{S as te,b as O,x as ne}from"./teammate-DMYOtLTK.js";import{C as k,E as A,d as re,f as ie,m as ae,x as j}from"./startupProfiler-DnXZaX4A.js";import{An as M,Cu as oe,Dh as se,Dn as ce,Dx as N,Dy as le,Eg as ue,Eu as de,Go as fe,J_ as pe,Ja as me,Ku as he,Lo as ge,Lu as _e,Lw as ve,MS as ye,Mn as be,Mx as xe,My as Se,Ny as Ce,On as we,Ou as Te,Ox as Ee,PS as De,Py as Oe,Q_ as ke,Ru as Ae,So as je,Sy as Me,TS as Ne,Tg as Pe,Xw as Fe,Z_ as Ie,Zw as Le,_y as P,a_ as Re,aa as ze,ap as Be,bu as Ve,cE as He,cj as Ue,cp as We,jS as Ge,jy as Ke,kh as qe,kx as Je,lE as Ye,o_ as Xe,op as Ze,qu as Qe,ra as $e,rv as et,sj as tt,sp as nt,sv as rt,vy as F,wS as it,wu as at}from"./loadAgentsDir-DI1a76pd.js";import{Bn as ot,Vn as st,Xt as ct,tn as lt,zn as ut}from"./prompt-CjFAtm3w.js";import{n as dt,t as ft}from"./browser-fLRXxIsQ.js";import{t as I}from"./useKeybinding-FsOnjW6T.js";import{a as pt,c as mt}from"./constants-41VpZw2G.js";import{t as ht}from"./Dialog-DYFGqyDs.js";import{i as gt,n as _t}from"./mappers-CJ8IO1o1.js";function vt(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`local_agent`}function yt(e){return{...e,retain:!1,messages:void 0,diskLoaded:!1,evictAfter:we(e.status)?Date.now()+Ct:void 0}}function bt(e,t){D(`tengu_transcript_view_enter`,{}),t(t=>{let n=t.tasks[e],r=t.viewingAgentTaskId,i=r===void 0?void 0:t.tasks[r],a=r!==void 0&&r!==e&&vt(i)&&i.retain,o=vt(n)&&(!n.retain||n.evictAfter!==void 0),s=t.viewingAgentTaskId!==e||t.viewSelectionMode!==`viewing-agent`;if(!o&&!s&&!a)return t;let c=t.tasks;return(a||o)&&(c={...t.tasks},a&&(c[r]=yt(i)),o&&(c[e]={...n,retain:!0,evictAfter:void 0})),{...t,viewingAgentTaskId:e,viewSelectionMode:`viewing-agent`,tasks:c}})}function xt(e){D(`tengu_transcript_view_exit`,{}),e(e=>{let t=e.viewingAgentTaskId,n={...e,viewingAgentTaskId:void 0,viewSelectionMode:`none`};if(t===void 0)return e.viewSelectionMode===`none`?e:n;let r=e.tasks[t];return!vt(r)||!r.retain?n:{...n,tasks:{...e.tasks,[t]:yt(r)}}})}function St(e,t){t(t=>{let n=t.tasks[e];if(!vt(n))return t;if(n.status===`running`)return n.abortController?.abort(),t;if(n.evictAfter===0)return t;let r=t.viewingAgentTaskId===e;return{...t,tasks:{...t.tasks,[e]:{...yt(n),evictAfter:0}},...r&&{viewingAgentTaskId:void 0,viewSelectionMode:`none`}}})}var Ct,wt=t((()=>{E(),ce(),Ct=3e4}));function Tt(e,t,n){let r=ut(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,Et.jsxs)(d,{children:[a,`(`,o,`)`]}):a}catch{return e.toolName}}var Et,Dt=t((()=>{l(),g(),st(),Et=v()}));function Ot(e){return e===`completed`||e===`failed`||e===`killed`}function kt(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 At(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 jt(e){return e.shutdownRequested?`stopping`:e.awaitingPlanApproval?`awaiting approval`:e.isIdle?`idle`:(e.progress?.recentActivities&&Ae(e.progress.recentActivities))??e.progress?.lastActivity?.activityDescription??`working`}function Mt(e,t){if(!t)return!1;let n=!1;for(let t of Object.values(e))if(!(!Se(t)||process.env.USER_TYPE===`ant`&&Te(t))&&(n=!0,t.type!==`in_process_teammate`))return!1;return n}var Nt=t((()=>{i(),de(),Ke(),_e()}));function Pt({agent:e,onDone:t,onKillAgent:n,onBack:r}){let[i]=u(),a=(0,Ft.useMemo)(()=>he(ot()),[]),o=F(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);h({"confirm:yes":t},{context:`Confirmation`});let s=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},c=je(e.prompt,`plan`),l=e.prompt.length>300?e.prompt.substring(0,297)+`…`:e.prompt,g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount;return(0,L.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:s,children:(0,L.jsx)(f,{title:(0,L.jsxs)(d,{children:[e.selectedAgent?.agentType??`agent`,` › `,e.description||`Async agent`]}),subtitle:(0,L.jsxs)(d,{children:[e.status!==`running`&&(0,L.jsxs)(d,{color:At(e.status),children:[kt(e.status),` `,e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,L.jsxs)(d,{dimColor:!0,children:[o,g!==void 0&&g>0&&(0,L.jsxs)(L.Fragment,{children:[` · `,ae(g),` tokens`]}),v!==void 0&&v>0&&(0,L.jsxs)(L.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,L.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,L.jsxs)(m,{children:[r&&(0,L.jsx)(p,{shortcut:`←`,action:`go back`}),(0,L.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,L.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,L.jsxs)(_,{flexDirection:`column`,children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,L.jsxs)(_,{flexDirection:`column`,children:[(0,L.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,L.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,Tt(t,a,i)]},n))]}),c?(0,L.jsx)(_,{marginTop:1,children:(0,L.jsx)(Pe,{addMargin:!1,planContent:c})}):(0,L.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,L.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,L.jsx)(d,{wrap:`wrap`,children:l})]}),e.status===`failed`&&e.error&&(0,L.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,L.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,L.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})})}var Ft,L,It=t((()=>{Ft=n(l(),1),P(),g(),I(),st(),Qe(),j(),ge(),ue(),Dt(),Nt(),L=v()}));function Lt(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 Rt({text:e,phase:t=0}){return(0,R.jsx)(R.Fragment,{children:[...e].map((e,n)=>(0,R.jsx)(d,{color:tt(n+t),children:e},n))})}function zt(e,t,n){let r=(0,Ht.useRef)(e),i=(0,Ht.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 Bt({session:e}){let t=Ne().prefersReducedMotion??!1,n=e.reviewProgress,r=e.status===`running`,[,i]=o(r&&!t?Ut:null),a=n?.bugsFound??0,s=n?.bugsVerified??0,c=n?.bugsRefuted??0,l=t||!r,u=zt(a,i,l),f=zt(s,i,l),p=zt(c,i,l),m=Math.floor(i/(Ut*3))%7;if(e.status===`completed`)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,R.jsx)(Rt,{text:`ultrareview`,phase:0}),(0,R.jsx)(d,{dimColor:!0,children:` ready · shift+↓ to view`})]});if(e.status===`failed`)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(d,{color:`background`,children:[`◆`,` `]}),(0,R.jsx)(Rt,{text:`ultrareview`,phase:0}),(0,R.jsxs)(d,{color:`error`,dimColor:!0,children:[` · `,`error`]})]});let h=n?Lt(n.stage,u,f,p):`setting up`;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(d,{color:`background`,children:[`◇`,` `]}),(0,R.jsx)(Rt,{text:`ultrareview`,phase:r?m:0}),(0,R.jsxs)(d,{dimColor:!0,children:[` · `,h]})]})}function Vt({session:e}){if(e.isRemoteReview)return(0,R.jsx)(Bt,{session:e});if(e.status===`completed`)return(0,R.jsx)(d,{bold:!0,color:`success`,dimColor:!0,children:`done`});if(e.status===`failed`)return(0,R.jsx)(d,{bold:!0,color:`error`,dimColor:!0,children:`error`});if(!e.todoList.length)return(0,R.jsxs)(d,{dimColor:!0,children:[e.status,`…`]});let t=O(e.todoList,e=>e.status===`completed`),n=e.todoList.length;return(0,R.jsxs)(d,{dimColor:!0,children:[t,`/`,n]})}var Ht,R,Ut,Wt=t((()=>{Ht=n(l(),1),y(),it(),g(),ne(),Ue(),R=v(),Ut=80}));function z({status:e,label:t,suffix:n}){return(0,B.jsxs)(d,{color:e===`completed`?`success`:e===`failed`?`error`:e===`killed`?`warning`:void 0,dimColor:!0,children:[`(`,t??e,n,`)`]})}function Gt({shell:e}){switch(e.status){case`completed`:return(0,B.jsx)(z,{status:`completed`,label:`done`});case`failed`:return(0,B.jsx)(z,{status:`failed`,label:`error`});case`killed`:return(0,B.jsx)(z,{status:`killed`,label:`stopped`});case`running`:case`pending`:return(0,B.jsx)(z,{status:`running`})}}var B,Kt=t((()=>{g(),B=v()}));function qt({task:e,maxActivityWidth:t}){let n=t??40;switch(e.type){case`local_bash`:return(0,V.jsxs)(d,{children:[k(e.kind===`monitor`?e.description:e.command,n,!0),` `,(0,V.jsx)(Gt,{shell:e})]});case`remote_agent`:return e.isRemoteReview?(0,V.jsx)(d,{children:(0,V.jsx)(Vt,{session:e})}):(0,V.jsxs)(d,{children:[(0,V.jsxs)(d,{dimColor:!0,children:[e.status===`running`||e.status===`pending`?`◇`:`◆`,` `]}),k(e.title,n,!0),(0,V.jsx)(d,{dimColor:!0,children:` · `}),(0,V.jsx)(Vt,{session:e})]});case`local_agent`:return(0,V.jsxs)(d,{children:[k(e.description,n,!0),` `,(0,V.jsx)(z,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]});case`in_process_teammate`:{let t=jt(e);return(0,V.jsxs)(d,{children:[(0,V.jsxs)(d,{color:Oe(e.identity.color),children:[`@`,e.identity.agentName]}),(0,V.jsxs)(d,{dimColor:!0,children:[`: `,k(t,n,!0)]})]})}case`local_workflow`:{let t=e;return(0,V.jsxs)(d,{children:[k(t.workflowName??e.summary??e.description,n,!0),` `,(0,V.jsx)(z,{status:e.status,label:e.status===`running`?`${t.agentCount} ${b(t.agentCount,`agent`)}`:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}case`monitor_mcp`:return(0,V.jsxs)(d,{children:[k(e.description,n,!0),` `,(0,V.jsx)(z,{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} ${b(t,`file`)}`:`${e.sessionsReviewing} ${b(e.sessionsReviewing,`session`)}`;return(0,V.jsxs)(d,{children:[e.description,` `,(0,V.jsxs)(d,{dimColor:!0,children:[`· `,e.phase,` · `,n]}),` `,(0,V.jsx)(z,{status:e.status,label:e.status===`completed`?`done`:void 0,suffix:e.status===`completed`&&!e.notified?`, unread`:void 0})]})}}}var V,Jt=t((()=>{l(),g(),Ce(),j(),x(),y(),Wt(),Kt(),Nt(),V=v()}));function Yt({task:e,onDone:t,onBack:n,onKill:r}){let i=F(e.startTime,e.status===`running`,1e3,0);h({"confirm:yes":t},{context:`Confirmation`});let a=i=>{i.key===` `?(i.preventDefault(),t()):i.key===`left`&&n?(i.preventDefault(),n()):i.key===`x`&&e.status===`running`&&r&&(i.preventDefault(),r())},o=e.turns.filter(e=>e.text!==``),s=o.slice(-Xt),c=o.length-s.length;return(0,H.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:a,children:(0,H.jsx)(f,{title:`Memory consolidation`,subtitle:(0,H.jsxs)(d,{dimColor:!0,children:[i,` · reviewing `,e.sessionsReviewing,` `,b(e.sessionsReviewing,`session`),e.filesTouched.length>0&&(0,H.jsxs)(H.Fragment,{children:[` `,`· `,e.filesTouched.length,` `,b(e.filesTouched.length,`file`),` touched`]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,H.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,H.jsxs)(m,{children:[n&&(0,H.jsx)(p,{shortcut:`←`,action:`go back`}),(0,H.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&r&&(0,H.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,H.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,H.jsxs)(d,{children:[(0,H.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,H.jsx)(d,{color:`background`,children:`running`}):e.status===`completed`?(0,H.jsx)(d,{color:`success`,children:e.status}):(0,H.jsx)(d,{color:`error`,children:e.status})]}),s.length===0?(0,H.jsx)(d,{dimColor:!0,children:e.status===`running`?`Starting…`:`(no text output)`}):(0,H.jsxs)(H.Fragment,{children:[c>0&&(0,H.jsxs)(d,{dimColor:!0,children:[`(`,c,` earlier `,b(c,`turn`),`)`]}),s.map((e,t)=>(0,H.jsxs)(_,{flexDirection:`column`,children:[(0,H.jsx)(d,{wrap:`wrap`,children:e.text}),e.toolUseCount>0&&(0,H.jsxs)(d,{dimColor:!0,children:[` `,`(`,e.toolUseCount,` `,b(e.toolUseCount,`tool`),`)`]})]},t))]})]})})})}var H,Xt,Zt=t((()=>{l(),P(),g(),I(),x(),H=v(),Xt=6}));function Qt({teammate:e,onDone:t,onKill:n,onBack:r,onForeground:i}){let[a]=u(),o=(0,$t.useMemo)(()=>he(ot()),[]),s=F(e.startTime,e.status===`running`,1e3,e.totalPausedMs??0);h({"confirm:yes":t},{context:`Confirmation`});let c=a=>{a.key===` `?(a.preventDefault(),t()):a.key===`left`&&r?(a.preventDefault(),r()):a.key===`x`&&e.status===`running`&&n?(a.preventDefault(),n()):a.key===`f`&&e.status===`running`&&i&&(a.preventDefault(),i())},l=jt(e),g=e.result?.totalTokens??e.progress?.tokenCount,v=e.result?.totalToolUseCount??e.progress?.toolUseCount,y=A(e.prompt,300);return(0,U.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:c,children:(0,U.jsxs)(f,{title:(0,U.jsxs)(d,{children:[(0,U.jsxs)(d,{color:Oe(e.identity.color),children:[`@`,e.identity.agentName]}),l&&(0,U.jsxs)(d,{dimColor:!0,children:[` (`,l,`)`]})]}),subtitle:(0,U.jsxs)(d,{children:[e.status!==`running`&&(0,U.jsxs)(d,{color:e.status===`completed`?`success`:e.status===`killed`?`warning`:`error`,children:[e.status===`completed`?`Completed`:e.status===`failed`?`Failed`:`Stopped`,` · `]}),(0,U.jsxs)(d,{dimColor:!0,children:[s,g!==void 0&&g>0&&(0,U.jsxs)(U.Fragment,{children:[` · `,ae(g),` tokens`]}),v!==void 0&&v>0&&(0,U.jsxs)(U.Fragment,{children:[` `,`· `,v,` `,v===1?`tool`:`tools`]})]})]}),onCancel:t,color:`background`,inputGuide:t=>t.pending?(0,U.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,U.jsxs)(m,{children:[r&&(0,U.jsx)(p,{shortcut:`←`,action:`go back`}),(0,U.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,U.jsx)(p,{shortcut:`x`,action:`stop`}),e.status===`running`&&i&&(0,U.jsx)(p,{shortcut:`f`,action:`foreground`})]}),children:[e.status===`running`&&e.progress?.recentActivities&&e.progress.recentActivities.length>0&&(0,U.jsxs)(_,{flexDirection:`column`,children:[(0,U.jsx)(d,{bold:!0,dimColor:!0,children:`Progress`}),e.progress.recentActivities.map((t,n)=>(0,U.jsxs)(d,{dimColor:n<e.progress.recentActivities.length-1,wrap:`truncate-end`,children:[n===e.progress.recentActivities.length-1?`› `:` `,Tt(t,o,a)]},n))]}),(0,U.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(d,{bold:!0,dimColor:!0,children:`Prompt`}),(0,U.jsx)(d,{wrap:`wrap`,children:y})]}),e.status===`failed`&&e.error&&(0,U.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,U.jsx)(d,{bold:!0,color:`error`,children:`Error`}),(0,U.jsx)(d,{color:`error`,wrap:`wrap`,children:e.error})]})]})})}var $t,U,en=t((()=>{$t=n(l(),1),P(),g(),I(),st(),Qe(),j(),Ce(),Dt(),Nt(),U=v()}));function tn(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: ${A(t.replace(/\s+/g,` `).trim(),50)}`}}for(let n of Object.values(t))if(typeof n==`string`&&n.trim())return`${e} ${A(n.replace(/\s+/g,` `).trim(),60)}`;return e}function nn({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`running`||e.status===`pending`,o=e.ultraplanPhase,s=i?o?cn[o]:`running`:e.status,l=F(e.startTime,i,1e3,0,e.endTime),{agentsWorking:u,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?tn(r.name,r.input):null}},[e.log]),h=Ie(e.sessionId),g=n??(()=>t(`Remote session details dismissed`,{display:`system`})),[v,y]=(0,W.useState)(!1);return v?(0,G.jsx)(f,{title:`Stop ultraplan?`,onCancel:()=>y(!1),color:`background`,children:(0,G.jsxs)(_,{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)(N,{options:[{label:`Terminate session`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),g()):y(!1)}})]})}):(0,G.jsx)(f,{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:[` · `,l,` · `,s]})]}),onCancel:g,color:`background`,children:(0,G.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,G.jsxs)(d,{children:[o===`plan_ready`&&(0,G.jsxs)(d,{color:`success`,children:[a.tick,` `]}),u,` `,b(u,`agent`),` `,o?ln[o]:`working`,` · `,p,` tool`,` `,b(p,`call`)]}),m&&(0,G.jsx)(d,{dimColor:!0,children:m}),(0,G.jsx)(c,{url:h,children:(0,G.jsx)(d,{dimColor:!0,children:h})}),(0,G.jsx)(N,{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`:dt(h),t();return;case`stop`:y(!0);return;case`back`:g();return}}})]})})}function rn({stage:e,completed:t,hasProgress:n}){let r=e?un.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:` → `}),un.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:dn[e]}):(0,G.jsx)(d,{dimColor:!0,children:dn[e]})]},e)}),t&&(0,G.jsx)(d,{color:`success`,children:` ✓`})]})}function an(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} ${b(n,`finding`)}`];return r>0&&e.push(`${r} refuted`),e.join(` · `)}return Lt(t.stage,t.bugsFound,n,r)}function on({session:e,onDone:t,onBack:n,onKill:r}){let i=e.status===`completed`,a=e.status===`running`||e.status===`pending`,[o,s]=(0,W.useState)(!1),l=F(e.startTime,a,1e3,0,e.endTime),u=()=>t(`Remote session details dismissed`,{display:`system`}),h=n??u,g=Ie(e.sessionId),v=i?`ready`:a?`running`:e.status;if(o)return(0,G.jsx)(f,{title:`Stop ultrareview?`,onCancel:()=>s(!1),color:`background`,children:(0,G.jsxs)(_,{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)(N,{options:[{label:`Stop ultrareview`,value:`stop`},{label:`Back`,value:`back`}],onChange:e=>{e===`stop`?(r?.(),h()):s(!1)}})]})});let y=i?[{label:`Open in Claude Code on the web`,value:`open`},{label:`Dismiss`,value:`dismiss`}]:[{label:`Open in Claude Code on the web`,value:`open`},...r&&a?[{label:`Stop ultrareview`,value:`stop`}]:[],{label:`Back`,value:`back`}];return(0,G.jsx)(f,{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:[` · `,l,` · `,v]})]}),onCancel:h,color:`background`,inputGuide:e=>e.pending?(0,G.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,G.jsxs)(m,{children:[(0,G.jsx)(p,{shortcut:`Enter`,action:`select`}),(0,G.jsx)(p,{shortcut:`Esc`,action:`go back`})]}),children:(0,G.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,G.jsx)(rn,{stage:e.reviewProgress?.stage,completed:i,hasProgress:!!e.reviewProgress}),(0,G.jsxs)(_,{flexDirection:`column`,children:[(0,G.jsx)(d,{children:an(e)}),(0,G.jsx)(c,{url:g,children:(0,G.jsx)(d,{dimColor:!0,children:g})})]}),(0,G.jsx)(N,{options:y,onChange:e=>{switch(e){case`open`:dt(g),t();break;case`stop`:s(!0);break;case`back`:h();break;case`dismiss`:u();break}}})]})})}function sn({session:e,toolUseContext:t,onDone:n,onBack:r,onKill:i}){let[a,o]=(0,W.useState)(!1),[s,l]=(0,W.useState)(null),u=(0,W.useMemo)(()=>e.isUltraplan||e.isRemoteReview?[]:fe(gt(e.log)).filter(e=>e.type!==`progress`).slice(-3),[e]);if(e.isUltraplan)return(0,G.jsx)(nn,{session:e,onDone:n,onBack:r,onKill:i});if(e.isRemoteReview)return(0,G.jsx)(on,{session:e,onDone:n,onBack:r,onKill:i});let h=()=>n(`Remote session details dismissed`,{display:`system`}),g=e=>{e.key===` `?(e.preventDefault(),n(`Remote session details dismissed`,{display:`system`})):e.key===`left`&&r?(e.preventDefault(),r()):e.key===`t`&&!a?(e.preventDefault(),v()):e.key===`return`&&(e.preventDefault(),h())};async function v(){o(!0),l(null);try{await rt(e.sessionId)}catch(e){l(C(e))}finally{o(!1)}}let y=A(e.title,50),b=e.status===`pending`?`starting`:e.status;return(0,G.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:g,children:(0,G.jsxs)(f,{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)(m,{children:[r&&(0,G.jsx)(p,{shortcut:`←`,action:`go back`}),(0,G.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),!a&&(0,G.jsx)(p,{shortcut:`t`,action:`teleport`})]}),children:[(0,G.jsxs)(_,{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`}),`: `,re((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)(c,{url:Ie(e.sessionId),children:(0,G.jsx)(d,{dimColor:!0,children:Ie(e.sessionId)})})]})]}),e.log.length>0&&(0,G.jsxs)(_,{flexDirection:`column`,marginTop:1,children:[(0,G.jsxs)(d,{children:[(0,G.jsx)(d,{bold:!0,children:`Recent messages`}),`:`]}),(0,G.jsx)(_,{flexDirection:`column`,height:10,overflowY:`hidden`,children:u.map((e,n)=>(0,G.jsx)(se,{message:e,lookups:me,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)(_,{marginTop:1,children:(0,G.jsxs)(d,{dimColor:!0,italic:!0,children:[`Showing last `,u.length,` of `,e.log.length,` messages`]})})]}),s&&(0,G.jsx)(_,{marginTop:1,children:(0,G.jsxs)(d,{color:`error`,children:[`Teleport failed: `,s]})}),a&&(0,G.jsx)(d,{color:`background`,children:`Teleporting to session…`})]})})}var W,G,cn,ln,un,dn,fn=t((()=>{i(),W=n(l(),1),y(),P(),g(),ke(),S(),ct(),lt(),ft(),w(),j(),_t(),ge(),x(),et(),Ee(),qe(),Wt(),G=v(),cn={needs_input:`input required`,plan_ready:`ready`},ln={needs_input:`waiting`,plan_ready:`done`},un=[`finding`,`verifying`,`synthesizing`],dn={finding:`Find`,verifying:`Verify`,synthesizing:`Dedupe`}}));async function pn(e){let t=M(e.id);try{let e=await T(t,gn);return{content:e.content,bytesTotal:e.bytesTotal}}catch{return{content:``,bytesTotal:0}}}function mn({shell:e,onDone:t,onKillShell:n,onBack:r}){let{columns:i}=s(),[a,o]=(0,K.useState)(()=>pn(e)),c=(0,K.useDeferredValue)(a);(0,K.useEffect)(()=>{if(e.status!==`running`)return;let t=setInterval((e,t)=>e(pn(t)),1e3,o,e);return()=>clearInterval(t)},[e.id,e.status]);let l=()=>t(`Shell details dismissed`,{display:`system`});h({"confirm:yes":l},{context:`Confirmation`});let u=i=>{i.key===` `?(i.preventDefault(),t(`Shell details dismissed`,{display:`system`})):i.key===`left`&&r?(i.preventDefault(),r()):i.key===`x`&&e.status===`running`&&n&&(i.preventDefault(),n())},g=e.kind===`monitor`,v=A(e.command,280);return(0,q.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:u,children:(0,q.jsxs)(f,{title:g?`Monitor details`:`Shell details`,onCancel:l,color:`background`,inputGuide:t=>t.pending?(0,q.jsxs)(d,{children:[`Press `,t.keyName,` again to exit`]}):(0,q.jsxs)(m,{children:[r&&(0,q.jsx)(p,{shortcut:`←`,action:`go back`}),(0,q.jsx)(p,{shortcut:`Esc/Enter/Space`,action:`close`}),e.status===`running`&&n&&(0,q.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:[(0,q.jsxs)(_,{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:`}),` `,re((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)(_,{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)(hn,{outputPromise:c,columns:i})})]})]})})}function hn({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
|
-
`,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)(_,{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 ${ie(r)}`:``]})]})}var K,q,gn,_n=t((()=>{K=n(l(),1),ve(),g(),I(),j(),ee(),be(),q=v(),gn=8192})),vn=t((()=>{g()})),yn=t((()=>{g()})),bn=r({WorkflowDetailDialog:()=>xn});function xn({workflow:e,onDone:t,onKill:n,onSkipAgent:r,onRetryAgent:i,onBack:a}){let o=F(e.startTime,e.status===`running`,1e3,0);return h({},{context:`WorkflowDetail`}),(0,J.jsx)(_,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:(0,Sn.useCallback)(t=>{t.key===`left`&&a?(t.preventDefault(),a()):t.key===`x`&&e.status===`running`&&n&&(t.preventDefault(),n())},[a,n,e.status]),children:(0,J.jsx)(f,{title:`Workflow`,subtitle:(0,J.jsxs)(d,{dimColor:!0,children:[o,` · `,e.workflowName]}),onCancel:a??(()=>{}),inputGuide:()=>(0,J.jsxs)(m,{children:[a&&(0,J.jsx)(p,{shortcut:`←`,action:`go back`}),(0,J.jsx)(p,{shortcut:`Esc`,action:`close`}),e.status===`running`&&n&&(0,J.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,J.jsxs)(_,{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:`Workflow:`}),` `,e.workflowName]}),(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`File:`}),` `,e.workflowFile]}),e.summary&&(0,J.jsxs)(d,{children:[(0,J.jsx)(d,{bold:!0,children:`Summary:`}),` `,e.summary]}),e.output&&(0,J.jsxs)(_,{flexDirection:`column`,children:[(0,J.jsx)(d,{bold:!0,children:`Output:`}),(0,J.jsx)(d,{dimColor:!0,children:e.output})]})]})})})}var Sn,J,Cn=t((()=>{Sn=n(l(),1),P(),g(),I(),vn(),ht(),yn(),J=v()})),wn=r({MonitorMcpDetailDialog:()=>Tn});function Tn({task:e,onBack:t,onKill:n}){let r=F(e.startTime,e.status===`running`,1e3,0);return h({},{context:`MonitorMcpDetail`}),(0,Y.jsx)(_,{flexDirection:`column`,tabIndex:0,borderStyle:`round`,onKeyDown:r=>{r.key===`left`&&t?(r.preventDefault(),t()):r.key===`x`&&e.status===`running`&&n&&(r.preventDefault(),n())},children:(0,Y.jsx)(f,{title:`MCP Monitor`,subtitle:(0,Y.jsxs)(d,{dimColor:!0,children:[r,` · `,e.serverName,`:`,e.resourceUri]}),onCancel:t??(()=>{}),inputGuide:()=>(0,Y.jsxs)(m,{children:[t&&(0,Y.jsx)(p,{shortcut:`←`,action:`go back`}),(0,Y.jsx)(p,{shortcut:`Esc`,action:`close`}),e.status===`running`&&n&&(0,Y.jsx)(p,{shortcut:`x`,action:`stop`})]}),children:(0,Y.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Status:`}),` `,e.status===`running`?(0,Y.jsx)(d,{color:`ansi:green`,children:`running`}):e.status===`completed`?(0,Y.jsx)(d,{color:`ansi:green`,children:e.status}):(0,Y.jsx)(d,{color:`ansi:red`,children:e.status})]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Description:`}),` `,e.description]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Server:`}),` `,e.serverName]}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Resource:`}),` `,e.resourceUri]}),e.command&&(0,Y.jsxs)(d,{children:[(0,Y.jsx)(d,{bold:!0,children:`Command:`}),` `,e.command]})]})})})}var Y,En=t((()=>{l(),P(),g(),I(),vn(),ht(),yn(),Y=v()}));function Dn(e,t){return Object.values(e??{}).filter(Se).filter(e=>!(e.type===`local_agent`&&e.id===t))}function On({onDone:e,toolUseContext:t,initialDetailTaskId:n}){let r=ye(e=>e.tasks),i=ye(e=>e.foregroundedTaskId),a=ye(e=>e.expandedView)===`teammates`,o=De(),s=Le(`chat:killAgents`,`Chat`,`ctrl+x ctrl+k`),c=r,l=(0,Z.useRef)(!1),[u,g]=(0,Z.useState)(()=>{if(n)return l.current=!0,{mode:`detail`,itemId:n};let e=Dn(c,i);return e.length===1?(l.current=!0,{mode:`detail`,itemId:e[0].id}):{mode:`list`}}),[v,y]=(0,Z.useState)(0);xe(`background-tasks-dialog`);let{bashTasks:b,remoteSessions:x,agentTasks:S,teammateTasks:C,workflowTasks:w,mcpMonitors:T,dreamTasks:ee,allSelectableItems:E}=(0,Z.useMemo)(()=>{let e=Object.values(c??{}).filter(Se).map(kn).sort((e,t)=>{let n=e.status,r=t.status;if(n===`running`&&r!==`running`)return-1;if(n!==`running`&&r===`running`)return 1;let i=`task`in e?e.task.startTime:0;return(`task`in t?t.task.startTime:0)-i}),t=e.filter(e=>e.type===`local_bash`),n=e.filter(e=>e.type===`remote_agent`),r=e.filter(e=>e.type===`local_agent`&&e.id!==i),o=e.filter(e=>e.type===`local_workflow`),s=e.filter(e=>e.type===`monitor_mcp`),l=e.filter(e=>e.type===`dream`),u=a?[]:e.filter(e=>e.type===`in_process_teammate`),d=u.length>0?[{id:`__leader__`,type:`leader`,label:`@${pt}`,status:`running`}]:[];return{bashTasks:t,remoteSessions:n,agentTasks:r,workflowTasks:o,mcpMonitors:s,dreamTasks:l,teammateTasks:[...d,...u],allSelectableItems:[...d,...u,...t,...s,...n,...r,...o,...l]}},[c,i,a]),D=E[v]??null;h({"confirm:previous":()=>y(e=>Math.max(0,e-1)),"confirm:next":()=>y(e=>Math.min(E.length-1,e+1)),"confirm:yes":()=>{let t=E[v];t&&(t.type===`leader`?(xt(o),e(`Viewing leader`,{display:`system`})):g({mode:`detail`,itemId:t.id}))}},{context:`Confirmation`,isActive:u.mode===`list`});let ne=t=>{if(u.mode!==`list`)return;if(t.key===`left`){t.preventDefault(),e(`Background tasks dialog dismissed`,{display:`system`});return}let n=E[v];n&&(t.key===`x`&&(t.preventDefault(),n.type===`local_bash`&&n.status===`running`?k(n.id):n.type===`local_agent`&&n.status===`running`?A(n.id):n.type===`in_process_teammate`&&n.status===`running`?re(n.id):n.type===`local_workflow`&&n.status===`running`&&Nn?Nn(n.id,o):n.type===`monitor_mcp`&&n.status===`running`&&$?$(n.id,o):n.type===`dream`&&n.status===`running`?ie(n.id):n.type===`remote_agent`&&n.status===`running`&&(n.task.isUltraplan?ze(n.id,n.task.sessionId,o):ae(n.id))),t.key===`f`&&(n.type===`in_process_teammate`&&n.status===`running`?(t.preventDefault(),bt(n.id,o),e(`Viewing teammate`,{display:`system`})):n.type===`leader`&&(t.preventDefault(),xt(o),e(`Viewing leader`,{display:`system`}))))};async function k(e){await Ve.kill(e,o)}async function A(e){await at.kill(e,o)}async function re(e){await Me.kill(e,o)}async function ie(e){await nt.kill(e,o)}async function ae(e){await pe.kill(e,o)}let j=(0,Z.useEffectEvent)(e);(0,Z.useEffect)(()=>{if(u.mode!==`list`){let e=(c??{})[u.itemId];(!e||e.type!==`local_workflow`&&!Se(e))&&(l.current?j(`Background tasks dialog dismissed`,{display:`system`}):g({mode:`list`}))}let e=E.length;v>=e&&e>0&&y(e-1)},[u,c,v,E,j]);let M=()=>{l.current&&E.length<=1?e(`Background tasks dialog dismissed`,{display:`system`}):(l.current=!1,g({mode:`list`}))};if(u.mode!==`list`&&c){let n=c[u.itemId];if(!n)return null;switch(n.type){case`local_bash`:return(0,Q.jsx)(mn,{shell:n,onDone:e,onKillShell:()=>void k(n.id),onBack:M},`shell-${n.id}`);case`local_agent`:return(0,Q.jsx)(Pt,{agent:n,onDone:e,onKillAgent:()=>void A(n.id),onBack:M},`agent-${n.id}`);case`remote_agent`:return(0,Q.jsx)(sn,{session:n,onDone:e,toolUseContext:t,onBack:M,onKill:n.status===`running`?n.isUltraplan?()=>void ze(n.id,n.sessionId,o):()=>void ae(n.id):void 0},`session-${n.id}`);case`in_process_teammate`:return(0,Q.jsx)(Qt,{teammate:n,onDone:e,onKill:n.status===`running`?()=>void re(n.id):void 0,onBack:M,onForeground:n.status===`running`?()=>{bt(n.id,o),e(`Viewing teammate`,{display:`system`})}:void 0},`teammate-${n.id}`);case`local_workflow`:return jn?(0,Q.jsx)(jn,{workflow:n,onDone:e,onKill:n.status===`running`&&Nn?()=>Nn(n.id,o):void 0,onSkipAgent:n.status===`running`&&Pn?e=>Pn(n.id,e,o):void 0,onRetryAgent:n.status===`running`&&Fn?e=>Fn(n.id,e,o):void 0,onBack:M},`workflow-${n.id}`):null;case`monitor_mcp`:return In?(0,Q.jsx)(In,{task:n,onKill:n.status===`running`&&$?()=>$(n.id,o):void 0,onBack:M},`monitor-mcp-${n.id}`):null;case`dream`:return(0,Q.jsx)(Yt,{task:n,onDone:()=>e(`Background tasks dialog dismissed`,{display:`system`}),onBack:M,onKill:n.status===`running`?()=>void ie(n.id):void 0},`dream-${n.id}`)}}let oe=O(b,e=>e.status===`running`),se=O(x,e=>e.status===`running`||e.status===`pending`)+O(S,e=>e.status===`running`),ce=O(C,e=>e.status===`running`),N=te([...ce>0?[(0,Q.jsxs)(d,{children:[ce,` `,ce===1?`agent`:`agents`]},`teammates`)]:[],...oe>0?[(0,Q.jsxs)(d,{children:[oe,` `,oe===1?`active shell`:`active shells`]},`shells`)]:[],...se>0?[(0,Q.jsxs)(d,{children:[se,` `,se===1?`active agent`:`active agents`]},`agents`)]:[]],e=>(0,Q.jsx)(d,{children:` · `},`separator-${e}`)),le=[(0,Q.jsx)(p,{shortcut:`↑/↓`,action:`select`},`upDown`),(0,Q.jsx)(p,{shortcut:`Enter`,action:`view`},`enter`),...D?.type===`in_process_teammate`&&D.status===`running`?[(0,Q.jsx)(p,{shortcut:`f`,action:`foreground`},`foreground`)]:[],...(D?.type===`local_bash`||D?.type===`local_agent`||D?.type===`in_process_teammate`||D?.type===`local_workflow`||D?.type===`monitor_mcp`||D?.type===`dream`||D?.type===`remote_agent`)&&D.status===`running`?[(0,Q.jsx)(p,{shortcut:`x`,action:`stop`},`kill`)]:[],...S.some(e=>e.status===`running`)?[(0,Q.jsx)(p,{shortcut:s,action:`stop all agents`},`kill-all`)]:[],(0,Q.jsx)(p,{shortcut:`←/Esc`,action:`close`},`esc`)],ue=()=>e(`Background tasks dialog dismissed`,{display:`system`});function de(e){return e.pending?(0,Q.jsxs)(d,{children:[`Press `,e.keyName,` again to exit`]}):(0,Q.jsx)(m,{children:le})}return(0,Q.jsx)(_,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:ne,children:(0,Q.jsx)(f,{title:`Background tasks`,subtitle:(0,Q.jsx)(Q.Fragment,{children:N}),onCancel:ue,color:`background`,inputGuide:de,children:E.length===0?(0,Q.jsx)(d,{dimColor:!0,children:`No tasks currently running`}):(0,Q.jsxs)(_,{flexDirection:`column`,children:[C.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,children:[(b.length>0||x.length>0||S.length>0)&&(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Agents`]}),` (`,O(C,e=>e.type!==`leader`),`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:(0,Q.jsx)(An,{teammateTasks:C,currentSelectionId:D?.id})})]}),b.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0),children:[(C.length>0||x.length>0||S.length>0)&&(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Shells`]}),` (`,b.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:b.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===D?.id},e.id))})]}),T.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Monitors`]}),` (`,T.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:T.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===D?.id},e.id))})]}),x.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Remote agents`]}),` (`,x.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:x.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===D?.id},e.id))})]}),S.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Local agents`]}),` (`,S.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:S.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===D?.id},e.id))})]}),w.length>0&&(0,Q.jsxs)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0),children:[(0,Q.jsxs)(d,{dimColor:!0,children:[(0,Q.jsxs)(d,{bold:!0,children:[` `,`Workflows`]}),` (`,w.length,`)`]}),(0,Q.jsx)(_,{flexDirection:`column`,children:w.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===D?.id},e.id))})]}),ee.length>0&&(0,Q.jsx)(_,{flexDirection:`column`,marginTop:+(C.length>0||b.length>0||T.length>0||x.length>0||S.length>0||w.length>0),children:(0,Q.jsx)(_,{flexDirection:`column`,children:ee.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===D?.id},e.id))})})]})})})}function kn(e){switch(e.type){case`local_bash`:return{id:e.id,type:`local_bash`,label:e.kind===`monitor`?e.description:e.command,status:e.status,task:e};case`remote_agent`:return{id:e.id,type:`remote_agent`,label:e.title,status:e.status,task:e};case`local_agent`:return{id:e.id,type:`local_agent`,label:e.description,status:e.status,task:e};case`in_process_teammate`:return{id:e.id,type:`in_process_teammate`,label:`@${e.identity.agentName}`,status:e.status,task:e};case`local_workflow`:return{id:e.id,type:`local_workflow`,label:e.summary??e.description,status:e.status,task:e};case`monitor_mcp`:return{id:e.id,type:`monitor_mcp`,label:e.description,status:e.status,task:e};case`dream`:return{id:e.id,type:`dream`,label:e.description,status:e.status,task:e}}}function X({item:e,isSelected:t}){let{columns:n}=s(),r=Math.max(30,n-26),i=Ye();return(0,Q.jsxs)(_,{flexDirection:`row`,children:[(0,Q.jsx)(d,{dimColor:i&&t,children:t?a.pointer+` `:` `}),(0,Q.jsx)(d,{color:t&&!i?`suggestion`:void 0,children:e.type===`leader`?(0,Q.jsxs)(d,{children:[`@`,pt]}):(0,Q.jsx)(qt,{task:e.task,maxActivityWidth:r})})]})}function An({teammateTasks:e,currentSelectionId:t}){let n=e.filter(e=>e.type===`leader`),r=e.filter(e=>e.type===`in_process_teammate`),i=new Map;for(let e of r){let t=e.task.identity.teamName,n=i.get(t);n?n.push(e):i.set(t,[e])}return(0,Q.jsx)(Q.Fragment,{children:[...i.entries()].map(([e,r])=>(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsxs)(d,{dimColor:!0,children:[` `,`Team: `,e,` (`,r.length+n.length,`)`]}),n.map(n=>(0,Q.jsx)(X,{item:n,isSelected:n.id===t},`${n.id}-${e}`)),r.map(e=>(0,Q.jsx)(X,{item:e,isSelected:e.id===t},e.id))]},e))})}var Z,Q,jn,Mn,Nn,Pn,Fn,$,In,Ln=t((()=>{i(),Z=n(l(),1),He(),ve(),Ge(),wt(),We(),le(),de(),oe(),ke(),Ke(),ne(),mt(),$e(),Je(),g(),I(),Fe(),It(),Jt(),Zt(),en(),fn(),_n(),Q=v(),jn=(Cn(),e(bn)).WorkflowDetailDialog,Mn=(Ze(),e(Be)),Nn=Mn?.killWorkflowTask??null,Pn=Mn?.skipWorkflowAgent??null,Fn=Mn?.retryWorkflowAgent??null,$=(Xe(),e(Re))?.killMonitorMcp??null,In=(En(),e(wn)).MonitorMcpDetailDialog}));export{Mt as a,wt as c,Ot as i,St as l,Ln as n,bt as o,Nt as r,xt as s,On as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DR8-3Aex.js";import{J as t,Q as n,Rn as r,b as i,f as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{lo as l,oo as u}from"./paths-BBvuDQl9.js";import{n as d,r as f}from"./analytics-DqMQntaB.js";import{Dx as p,KT as m,cy as h,qT as g}from"./loadAgentsDir-DI1a76pd.js";var _=e(r(),1);d(),o(),g(),u(),h();var v=c();function y({onAccept:e}){_.useEffect(()=>{f(`tengu_bypass_permissions_mode_dialog_shown`,{})},[]);function r(t){switch(t){case`accept`:f(`tengu_bypass_permissions_mode_dialog_accept`,{}),l(`userSettings`,{skipDangerousModePermissionPrompt:!0}),e();break;case`decline`:m(1);break}}return(0,v.jsxs)(a,{title:`WARNING: Claude Code running in Bypass Permissions mode`,color:`error`,onCancel:(0,_.useCallback)(()=>{m(0)},[]),children:[(0,v.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,v.jsxs)(i,{children:[`In Bypass Permissions mode, Claude Code will not ask for your approval before running potentially dangerous commands.`,(0,v.jsx)(t,{}),`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)(i,{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)(p,{options:[{label:`No, exit`,value:`decline`},{label:`Yes, I accept`,value:`accept`}],onChange:e=>r(e)})]})}export{y as BypassPermissionsModeDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./ClaudeMdExternalIncludesDialog-BNhlq7_K.js";e();export{t as ClaudeMdExternalIncludesDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dy as e,fy as t}from"./loadAgentsDir-DI1a76pd.js";t();export{e as ConsoleOAuthFlow};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,f as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Dx as s,KT as c,cy as l,qT as u}from"./loadAgentsDir-DI1a76pd.js";var d=e(t(),1);i(),u(),l();var f=o();function p({channels:e,onAccept:t}){function i(e){switch(e){case`accept`:t();break;case`exit`:c(1);break}}return(0,f.jsxs)(r,{title:`WARNING: Loading development channels`,color:`error`,onCancel:(0,d.useCallback)(()=>{c(0)},[]),children:[(0,f.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,f.jsx)(n,{children:`--dangerously-load-development-channels is for local channel development only. Do not use this option to run channels you have downloaded off the internet.`}),(0,f.jsx)(n,{children:`Please use --channels to run a list of approved channels.`}),(0,f.jsxs)(n,{dimColor:!0,children:[`Channels:`,` `,e.map(e=>e.kind===`plugin`?`plugin:${e.name}@${e.marketplace}`:`server:${e.name}`).join(`, `)]})]}),(0,f.jsx)(s,{options:[{label:`I am using this for local development`,value:`accept`},{label:`Exit`,value:`exit`}],onChange:e=>i(e)})]})}export{p as DevChannelsDialog};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{F as i,Rn as a,b as o,f as s,h as c,m as l,nt as u,t as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{Po as m,el as h,jo as g,sl as _}from"./paths-BBvuDQl9.js";import{n as v,t as y}from"./cwd--iizewsn.js";import{T as b,x}from"./startupProfiler-DnXZaX4A.js";import{$p as S,Lw as C,Mx as w,Xw as T,Zw as E,cm as D,em as O,kx as k,om as A,sm as j}from"./loadAgentsDir-DI1a76pd.js";import{t as M}from"./useKeybinding-FsOnjW6T.js";import{resolve as N}from"path";function P(){let[e,t]=(0,F.useState)(null),[n,r]=(0,F.useState)(new Map),[i,a]=(0,F.useState)(!0);return(0,F.useEffect)(()=>{let e=!1;async function n(){try{let[n,i]=await Promise.all([A(),j()]);e||(t(n),r(i),a(!1))}catch{e||(t(null),r(new Map),a(!1))}}return n(),()=>{e=!0}},[]),(0,F.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>I;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 F,I,L=e((()=>{F=t(a(),1),D(),I=400}));function R(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 z(e){return`type`in e&&(e.type===`create`||e.type===`update`)}function B(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 V(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 H(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 U(e){let t=(0,W.useRef)({completedTurns:[],currentTurn:null,lastProcessedIndex:0,lastTurnIndex:0});return(0,W.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&&(H(n.currentTurn),n.completedTurns.push(n.currentTurn)),n.lastTurnIndex++,n.currentTurn={turnIndex:n.lastTurnIndex,userPromptPreview:V(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(R(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&&z(e)){let t=e.content.split(`
|
|
2
|
-
`),n={oldStart:0,oldLines:0,newStart:1,newLines:t.length,lines:t.map(e=>`+`+e)};a.hunks.push(n),a.linesAdded+=t.length}else{a.hunks.push(...r);let{added:e,removed:t}=B(r);a.linesAdded+=e,a.linesRemoved+=t}i&&(a.isNewFile=!0)}}}}n.lastProcessedIndex=e.length;let r=[...n.completedTurns];return n.currentTurn&&n.currentTurn.files.size>0&&(H(n.currentTurn),r.push(n.currentTurn)),r.reverse()},[e])}var W,G=e((()=>{W=t(a(),1)}));function K({filePath:e,hunks:t,isLargeFile:n,isBinary:r,isTruncated:a,isUntracked:s}){let{columns:c}=i(),{firstLine:u,fileContent:d}=(0,q.useMemo)(()=>{if(!e)return{firstLine:null,fileContent:void 0};let t=_(N(y(),e));return{firstLine:t?.split(`
|
|
3
|
-
`)[0]??null,fileContent:t??void 0}},[e]);return s?(0,J.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,J.jsxs)(f,{children:[(0,J.jsx)(o,{bold:!0,children:e}),(0,J.jsx)(o,{dimColor:!0,children:` (untracked)`})]}),(0,J.jsx)(l,{padding:4}),(0,J.jsxs)(f,{flexDirection:`column`,children:[(0,J.jsx)(o,{dimColor:!0,italic:!0,children:`New file not yet staged.`}),(0,J.jsxs)(o,{dimColor:!0,italic:!0,children:["Run `git add ",e,"` to see line counts."]})]})]}):r?(0,J.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,J.jsx)(f,{children:(0,J.jsx)(o,{bold:!0,children:e})}),(0,J.jsx)(l,{padding:4}),(0,J.jsx)(f,{flexDirection:`column`,children:(0,J.jsx)(o,{dimColor:!0,italic:!0,children:`Binary file - cannot display diff`})})]}):n?(0,J.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,J.jsx)(f,{children:(0,J.jsx)(o,{bold:!0,children:e})}),(0,J.jsx)(l,{padding:4}),(0,J.jsx)(f,{flexDirection:`column`,children:(0,J.jsx)(o,{dimColor:!0,italic:!0,children:`Large file - diff exceeds 1 MB limit`})})]}):(0,J.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,J.jsxs)(f,{children:[(0,J.jsx)(o,{bold:!0,children:e}),a&&(0,J.jsx)(o,{dimColor:!0,children:` (truncated)`})]}),(0,J.jsx)(l,{padding:4}),(0,J.jsx)(f,{flexDirection:`column`,children:t.length===0?(0,J.jsx)(o,{dimColor:!0,children:`No diff content`}):t.map((t,n)=>(0,J.jsx)(S,{patch:t,filePath:e,firstLine:u,fileContent:d,dim:!1,width:c-2-2},n))}),a&&(0,J.jsx)(o,{dimColor:!0,italic:!0,children:`… diff truncated (exceeded 400 line limit)`})]})}var q,J,ee=e((()=>{q=t(a(),1),C(),d(),v(),h(),O(),J=p()}));function te({files:e,selectedIndex:t}){let{columns:n}=i(),{startIndex:r,endIndex:a}=(0,Y.useMemo)(()=>{if(e.length===0||e.length<=Z)return{startIndex:0,endIndex:e.length};let n=Math.max(0,t-Math.floor(Z/2)),r=n+Z;return r>e.length&&(r=e.length,n=Math.max(0,r-Z)),{startIndex:n,endIndex:r}},[e.length,t]);if(e.length===0)return(0,X.jsx)(o,{dimColor:!0,children:`No changed files`});let s=e.slice(r,a),c=r>0,l=a<e.length,u=e.length>Z,d=Math.max(20,n-16-3-4);return(0,X.jsxs)(f,{flexDirection:`column`,children:[u&&(0,X.jsx)(o,{dimColor:!0,children:c?` ↑ ${r} more ${m(r,`file`)}`:` `}),s.map((e,n)=>(0,X.jsx)(ne,{file:e,isSelected:r+n===t,maxPathWidth:d},e.path)),u&&(0,X.jsx)(o,{dimColor:!0,children:l?` ↓ ${e.length-a} more ${m(e.length-a,`file`)}`:` `})]})}function ne({file:e,isSelected:t,maxPathWidth:n}){let i=b(e.path,n),a=`${t?r.pointer+` `:` `}${i}`;return(0,X.jsxs)(f,{flexDirection:`row`,children:[(0,X.jsx)(o,{bold:t,color:t?`background`:void 0,inverse:t,children:a}),(0,X.jsx)(f,{flexGrow:1}),(0,X.jsx)(re,{file:e,isSelected:t})]})}function re({file:e,isSelected:t}){return e.isUntracked?(0,X.jsx)(o,{dimColor:!t,italic:!0,children:`untracked`}):e.isBinary?(0,X.jsx)(o,{dimColor:!t,italic:!0,children:`Binary file`}):e.isLargeFile?(0,X.jsx)(o,{dimColor:!t,italic:!0,children:`Large file modified`}):(0,X.jsxs)(o,{children:[e.linesAdded>0&&(0,X.jsxs)(o,{color:`diffAddedWord`,bold:t,children:[`+`,e.linesAdded]}),e.linesAdded>0&&e.linesRemoved>0&&` `,e.linesRemoved>0&&(0,X.jsxs)(o,{color:`diffRemovedWord`,bold:t,children:[`-`,e.linesRemoved]}),e.isTruncated&&(0,X.jsx)(o,{dimColor:!t,children:` (truncated)`})]})}var Y,X,Z,ie=e((()=>{n(),Y=t(a(),1),C(),d(),x(),g(),X=p(),Z=5}));function ae(e){let t=Array.from(e.files.values()).map(e=>({path:e.filePath,linesAdded:e.linesAdded,linesRemoved:e.linesRemoved,isBinary:!1,isLargeFile:!1,isTruncated:!1,isNewFile:e.isNewFile})).sort((e,t)=>e.path.localeCompare(t.path)),n=new Map;for(let t of e.files.values())n.set(t.filePath,t.hunks);return{stats:{filesCount:e.stats.filesChanged,linesAdded:e.stats.linesAdded,linesRemoved:e.stats.linesRemoved},files:t,hunks:n,loading:!1}}function oe({messages:e,onDone:t}){let n=P(),r=U(e),[i,a]=(0,Q.useState)(`list`),[l,d]=(0,Q.useState)(0),[p,h]=(0,Q.useState)(0),g=(0,Q.useMemo)(()=>[{type:`current`},...r.map(e=>({type:`turn`,turn:e}))],[r]),_=g[p],v=_?.type===`turn`?_.turn:null,y=(0,Q.useMemo)(()=>v?ae(v):n,[v,n]),b=y.files[l],x=(0,Q.useMemo)(()=>b&&y.hunks.get(b.path)||[],[b,y.hunks]);(0,Q.useEffect)(()=>{p>=g.length&&h(Math.max(0,g.length-1))},[g.length,p]);let S=(0,Q.useRef)(p);(0,Q.useEffect)(()=>{S.current!==p&&(d(0),S.current=p)},[p]),w(`diff-dialog`),u({"diff:previousSource":()=>{i===`detail`?a(`list`):i===`list`&&g.length>1&&h(e=>Math.max(0,e-1))},"diff:nextSource":()=>{i===`list`&&g.length>1&&h(e=>Math.min(g.length-1,e+1))},"diff:back":()=>{i===`detail`&&a(`list`)},"diff:viewDetails":()=>{i===`list`&&b&&a(`detail`)},"diff:previousFile":()=>{i===`list`&&d(e=>Math.max(0,e-1))},"diff:nextFile":()=>{i===`list`&&d(e=>Math.min(y.files.length-1,e+1))}},{context:`DiffDialog`});let C=y.stats?(0,$.jsxs)(o,{dimColor:!0,children:[y.stats.filesCount,` `,m(y.stats.filesCount,`file`),` changed`,y.stats.linesAdded>0&&(0,$.jsxs)(o,{color:`diffAddedWord`,children:[` +`,y.stats.linesAdded]}),y.stats.linesRemoved>0&&(0,$.jsxs)(o,{color:`diffRemovedWord`,children:[` -`,y.stats.linesRemoved]})]}):null,T=v?`Turn ${v.turnIndex}`:`Uncommitted changes`,D=v?v.userPromptPreview?`"${v.userPromptPreview}"`:``:`(git diff HEAD)`,O=g.length>1?(0,$.jsxs)(f,{children:[p>0&&(0,$.jsx)(o,{dimColor:!0,children:`◀ `}),g.map((e,t)=>{let n=t===p,r=e.type===`current`?`Current`:`T${e.turn.turnIndex}`;return(0,$.jsxs)(o,{dimColor:!n,bold:n,children:[t>0?` · `:``,r]},t)}),p<g.length-1&&(0,$.jsx)(o,{dimColor:!0,children:` ▶`})]}):null,k=E(`diff:dismiss`,`DiffDialog`,`esc`),A=y.loading?`Loading diff…`:v?`No file changes in this turn`:y.stats&&y.stats.filesCount>0&&y.files.length===0?`Too many files to display details`:`Working tree is clean`,j=(0,$.jsxs)(o,{children:[T,D&&(0,$.jsxs)(o,{dimColor:!0,children:[` `,D]})]});function M(){i===`detail`?a(`list`):t(`Diff dialog dismissed`,{display:`system`})}return(0,$.jsxs)(s,{title:j,onCancel:M,color:`background`,inputGuide:e=>e.pending?(0,$.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):i===`list`?(0,$.jsxs)(c,{children:[g.length>1&&(0,$.jsx)(o,{children:`←/→ source`}),(0,$.jsx)(o,{children:`↑/↓ select`}),(0,$.jsx)(o,{children:`Enter view`}),(0,$.jsxs)(o,{children:[k,` close`]})]}):(0,$.jsxs)(c,{children:[(0,$.jsx)(o,{children:`← back`}),(0,$.jsxs)(o,{children:[k,` close`]})]}),children:[O,C,y.files.length===0?(0,$.jsx)(f,{marginTop:1,children:(0,$.jsx)(o,{dimColor:!0,children:A})}):i===`list`?(0,$.jsx)(f,{flexDirection:`column`,marginTop:1,children:(0,$.jsx)(te,{files:y.files,selectedIndex:l})}):(0,$.jsx)(f,{flexDirection:`column`,marginTop:1,children:(0,$.jsx)(K,{filePath:b?.path||``,hunks:x,isLargeFile:b?.isLargeFile,isBinary:b?.isBinary,isTruncated:b?.isTruncated,isUntracked:b?.isUntracked})})]})}var Q,$;e((()=>{Q=t(a(),1),k(),L(),G(),d(),M(),T(),g(),ee(),ie(),$=p()}))();export{oe as DiffDialog};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,s as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./figures-gfT9mM8P.js";import{Rn as o,b as s,nt as c,p as l,t as u,x as d}from"./src-Di342QoJ.js";import{t as f}from"./jsx-runtime-D-D469L8.js";import{cn as p,ot as m}from"./state-sIHsFpDu.js";import{Dr as h,Ka as ee,Po as g,Pr as _,Ro as v,Vo as y,al as b,cr as te,dr as x,el as S,jo as C,oo as w}from"./paths-BBvuDQl9.js";import{Bb as ne,Hb as re,Jm as T,Km as ie,MS as E,NA as ae,PA as D,Qf as O,Uc as k,Vb as A,Wc as j,Xf as oe,Xm as se,Ym as ce,Zf as le,_T as M,aT as N,al as P,gT as F,hT as I,hk as L,iA as R,iT as z,il as B,jS as V,nT as H,qm as U,rT as W,tA as G,vT as ue,vk as de,xk as fe,yT as pe,yk as me,zb as he}from"./loadAgentsDir-DI1a76pd.js";import{t as ge}from"./useKeybinding-FsOnjW6T.js";import{l as _e,u as ve}from"./referral-DeDr9zAE.js";import{a as K,i as ye}from"./xdg-CBxMmQux.js";import{n as be,t as xe}from"./McpParsingWarnings-EzgsOoHw.js";import{n as Se,t as Ce}from"./PressEnterToContinue-BdA9zDGs.js";import{n as we,t as Te}from"./ValidationErrorsList-CdCUgfIl.js";import{n as Ee,t as De}from"./useSettingsErrors-C-j_Zt7g.js";import{n as Oe,t as ke}from"./shadowedRuleDetection-BBR3uEgx.js";import{n as Ae,r as je,t as q}from"./statusNoticeHelpers-DcssRhLw.js";import{join as J}from"path";function Me(){if(!N())return null;let e=H();if(e.length===0)return null;let t=e.filter(e=>e.severity===`error`),n=e.filter(e=>e.severity===`warning`);return(0,Y.jsxs)(d,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,Y.jsx)(s,{bold:!0,color:t.length>0?`error`:`warning`,children:`Keybinding Configuration Issues`}),(0,Y.jsxs)(d,{children:[(0,Y.jsx)(s,{dimColor:!0,children:`Location: `}),(0,Y.jsx)(s,{dimColor:!0,children:W()})]}),(0,Y.jsxs)(d,{marginLeft:1,flexDirection:`column`,marginTop:1,children:[t.map((e,t)=>(0,Y.jsxs)(d,{flexDirection:`column`,children:[(0,Y.jsxs)(d,{children:[(0,Y.jsx)(s,{dimColor:!0,children:`└ `}),(0,Y.jsx)(s,{color:`error`,children:`[Error]`}),(0,Y.jsxs)(s,{dimColor:!0,children:[` `,e.message]})]}),e.suggestion&&(0,Y.jsx)(d,{marginLeft:3,children:(0,Y.jsxs)(s,{dimColor:!0,children:[`→ `,e.suggestion]})})]},`error-${t}`)),n.map((e,t)=>(0,Y.jsxs)(d,{flexDirection:`column`,children:[(0,Y.jsxs)(d,{children:[(0,Y.jsx)(s,{dimColor:!0,children:`└ `}),(0,Y.jsx)(s,{color:`warning`,children:`[Warning]`}),(0,Y.jsxs)(s,{dimColor:!0,children:[` `,e.message]})]}),e.suggestion&&(0,Y.jsx)(d,{marginLeft:3,children:(0,Y.jsxs)(s,{dimColor:!0,children:[`→ `,e.suggestion]})})]},`warning-${t}`))]})]})}var Y,Ne=e((()=>{o(),u(),z(),Y=f()}));function Pe(){if(!G.isSupportedPlatform()||!G.isSandboxEnabledInSettings())return null;let e=G.checkDependencies(),t=e.errors.length>0,n=e.warnings.length>0;return!t&&!n?null:(0,X.jsxs)(d,{flexDirection:`column`,children:[(0,X.jsx)(s,{bold:!0,children:`Sandbox`}),(0,X.jsxs)(s,{children:[`└ Status: `,(0,X.jsx)(s,{color:t?`error`:`warning`,children:t?`Missing dependencies`:`Available (with warnings)`})]}),e.errors.map((e,t)=>(0,X.jsxs)(s,{color:`error`,children:[`└ `,e]},t)),e.warnings.map((e,t)=>(0,X.jsxs)(s,{color:`warning`,children:[`└ `,e]},t)),t&&(0,X.jsx)(s,{dimColor:!0,children:`└ Run /sandbox for install instructions`})]})}var X,Fe=e((()=>{o(),u(),R(),X=f()}));async function Ie(){let e=de(await me());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 > ${L.toLocaleString()})`:`${e.length} large CLAUDE.md files detected (each > ${L.toLocaleString()} chars)`,details:t,currentValue:e.length,threshold:L}}async function Le(e){if(!e)return null;let t=Ae(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:j(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 > ${q.toLocaleString()})`,details:r,currentValue:t,threshold:q}}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 B(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+j(((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=ke(await e(),{sandboxAutoAllowEnabled:G.isSandboxingEnabled()&&G.isAutoAllowBashIfSandboxedEnabled()});if(t.length===0)return null;let n=t.flatMap(e=>[`${y(e.rule.ruleValue)}: ${e.reason}`,` Fix: ${e.fix}`]);return{type:`unreachable_rules`,severity:`warning`,message:`${t.length} ${g(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([Ie(),Le(t),Re(e,n,t),ze(n)]);return{claudeMdWarning:r,agentWarning:i,mcpWarning:a,unreachableRulesWarning:o}}var Z,Ve=e((()=>{k(),P(),fe(),_(),v(),Oe(),R(),je(),C(),Z=25e3}));function He({promise:e}){let t=(0,Q.use)(e);return t.latest?(0,$.jsxs)($.Fragment,{children:[t.stable&&(0,$.jsxs)(s,{children:[`└ Stable version: `,t.stable]}),(0,$.jsxs)(s,{children:[`└ Latest version: `,t.latest]})]}):(0,$.jsx)(s,{dimColor:!0,children:`└ Failed to fetch versions`})}function Ue({onDone:e}){let t=E(e=>e.agentDefinitions),r=E(e=>e.mcp.tools),i=E(e=>e.toolPermissionContext),o=E(e=>e.plugins.errors);ve();let u=(0,Q.useMemo)(()=>r||[],[r]),[f,p]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(null),[y,x]=(0,Q.useState)(null),S=Ee(),C=(0,Q.useMemo)(()=>I().then(e=>(e.installationType===`native`?M:ue)().catch(()=>({latest:null,stable:null}))),[]),w=ee()?.autoUpdatesChannel??`latest`,T=S.filter(e=>e.mcpErrorMetadata===void 0),D=(0,Q.useMemo)(()=>[{name:`BASH_MAX_OUTPUT_LENGTH`,default:ie,upperLimit:U},{name:`TASK_MAX_OUTPUT_LENGTH`,default:oe,upperLimit:le},{name:`CLAUDE_CODE_MAX_OUTPUT_TOKENS`,...te(`claude-opus-4-7`)}].map(e=>{let t=process.env[e.name],n=se(e.name,t,e.default,e.upperLimit);return{name:e.name,...n}}).filter(e=>e.status!==`valid`),[]);(0,Q.useEffect)(()=>{I().then(p),(async()=>{let e=J(n(),`agents`),r=J(m(),`.claude`,`agents`),{activeAgents:a,allAgents:o,failedFiles:s}=t,[c,l]=await Promise.all([b(e),b(r)]);if(g({activeAgents:a.map(e=>({agentType:e.agentType,source:e.source})),userAgentsDir:e,projectAgentsDir:r,userDirExists:c,projectDirExists:l,failedFiles:s}),v(await Be(u,{activeAgents:a,allAgents:o,failedFiles:s},async()=>i)),re()){let e=J(ye(),`claude`,`locks`),t=he(e);x({enabled:!0,locks:ne(e),locksDir:e,staleLocksCleaned:t})}else x({enabled:!1,locks:[],locksDir:``,staleLocksCleaned:0})})()},[i,u,t]);let O=(0,Q.useCallback)(()=>{e(`Claude Code diagnostics dismissed`,{display:`system`})},[e]);return c({"confirm:yes":O,"confirm:no":O},{context:`Confirmation`}),f?(0,$.jsxs)(l,{children:[(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Diagnostics`}),(0,$.jsxs)(s,{children:[`└ Currently running: `,f.installationType,` (`,f.version,`)`]}),f.packageManager&&(0,$.jsxs)(s,{children:[`└ Package manager: `,f.packageManager]}),(0,$.jsxs)(s,{children:[`└ Path: `,f.installationPath]}),(0,$.jsxs)(s,{children:[`└ Invoked: `,f.invokedBinary]}),(0,$.jsxs)(s,{children:[`└ Config install method: `,f.configInstallMethod]}),(0,$.jsxs)(s,{children:[`└ Search: `,f.ripgrepStatus.working?`OK`:`Not working`,` (`,f.ripgrepStatus.mode===`embedded`?`bundled`:f.ripgrepStatus.mode===`builtin`?`vendor`:f.ripgrepStatus.systemPath||`system`,`)`]}),f.recommendation&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{}),(0,$.jsxs)(s,{color:`warning`,children:[`Recommendation: `,f.recommendation.split(`
|
|
2
|
-
`)[0]]}),(0,$.jsx)(s,{dimColor:!0,children:f.recommendation.split(`
|
|
3
|
-
`)[1]})]}),f.multipleInstallations.length>1&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{}),(0,$.jsx)(s,{color:`warning`,children:`Warning: Multiple installations found`}),f.multipleInstallations.map((e,t)=>(0,$.jsxs)(s,{children:[`└ `,e.type,` at `,e.path]},t))]}),f.warnings.length>0&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(s,{}),f.warnings.map((e,t)=>(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsxs)(s,{color:`warning`,children:[`Warning: `,e.issue]}),(0,$.jsxs)(s,{children:[`Fix: `,e.fix]})]},t))]}),T.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,$.jsx)(s,{bold:!0,children:`Invalid Settings`}),(0,$.jsx)(Te,{errors:T})]})]}),(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Updates`}),(0,$.jsxs)(s,{children:[`└ Auto-updates: `,f.packageManager?`Managed by package manager`:f.autoUpdates]}),f.hasUpdatePermissions!==null&&(0,$.jsxs)(s,{children:[`└ Update permissions: `,f.hasUpdatePermissions?`Yes`:`No (requires sudo)`]}),(0,$.jsxs)(s,{children:[`└ Auto-update channel: `,w]}),(0,$.jsx)(Q.Suspense,{fallback:null,children:(0,$.jsx)(He,{promise:C})})]}),(0,$.jsx)(Pe,{}),(0,$.jsx)(xe,{}),(0,$.jsx)(Me,{}),D.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Environment Variables`}),D.map((e,t)=>(0,$.jsxs)(s,{children:[`└ `,e.name,`:`,` `,(0,$.jsx)(s,{color:e.status===`capped`?`warning`:`error`,children:e.message})]},t))]}),y?.enabled&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Version Locks`}),y.staleLocksCleaned>0&&(0,$.jsxs)(s,{dimColor:!0,children:[`└ Cleaned `,y.staleLocksCleaned,` stale lock(s)`]}),y.locks.length===0?(0,$.jsx)(s,{dimColor:!0,children:`└ No active version locks`}):y.locks.map((e,t)=>(0,$.jsxs)(s,{children:[`└ `,e.version,`: PID `,e.pid,` `,e.isProcessRunning?(0,$.jsx)(s,{children:`(running)`}):(0,$.jsx)(s,{color:`warning`,children:`(stale)`})]},t))]}),h?.failedFiles&&h.failedFiles.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,color:`error`,children:`Agent Parse Errors`}),(0,$.jsxs)(s,{color:`error`,children:[`└ Failed to parse `,h.failedFiles.length,` agent file(s):`]}),h.failedFiles.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e.path,`: `,e.error]},t))]}),o.length>0&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,color:`error`,children:`Plugin Errors`}),(0,$.jsxs)(s,{color:`error`,children:[`└ `,o.length,` plugin error(s) detected:`]}),o.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e.source||`unknown`,`plugin`in e&&e.plugin?` [${e.plugin}]`:``,`: `,ae(e)]},t))]}),_?.unreachableRulesWarning&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,color:`warning`,children:`Unreachable Permission Rules`}),(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,_.unreachableRulesWarning.message]})]}),_.unreachableRulesWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]}),_&&(_.claudeMdWarning||_.agentWarning||_.mcpWarning)&&(0,$.jsxs)(d,{flexDirection:`column`,children:[(0,$.jsx)(s,{bold:!0,children:`Context Usage Warnings`}),_.claudeMdWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,_.claudeMdWarning.message]})]}),(0,$.jsxs)(s,{children:[` `,`└ Files:`]}),_.claudeMdWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]}),_.agentWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,_.agentWarning.message]})]}),(0,$.jsxs)(s,{children:[` `,`└ Top contributors:`]}),_.agentWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]}),_.mcpWarning&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(s,{children:[`└`,` `,(0,$.jsxs)(s,{color:`warning`,children:[a.warning,` `,_.mcpWarning.message]})]}),(0,$.jsxs)(s,{children:[` `,`└ MCP servers:`]}),_.mcpWarning.details.map((e,t)=>(0,$.jsxs)(s,{dimColor:!0,children:[` `,`└ `,e]},t))]})]}),(0,$.jsx)(d,{children:(0,$.jsx)(Ce,{})})]}):(0,$.jsx)(l,{children:(0,$.jsx)(s,{dimColor:!0,children:`Checking installation status…`})})}var Q,$,We=e((()=>{i(),Q=t(o(),1),Ne(),be(),x(),r(),p(),u(),Se(),Fe(),we(),De(),_e(),ge(),V(),D(),pe(),Ve(),F(),ce(),S(),A(),w(),T(),O(),K(),$=f()}));export{We as n,Ue as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./Doctor-BXb0qv6n.js";e();export{t as Doctor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./axios-DhfaybwJ.js";import{F as i,Rn as a,b as o,f as s,g as c,h as l,t as u,tt as d,x as f,xt as ee}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{cn as m,q as h}from"./state-sIHsFpDu.js";import{F as te,M as g,Pt as _,St as v,bt as y,on as b,wt as x}from"./paths-BBvuDQl9.js";import{E as S,d as C,s as w,w as T}from"./debug-UI3T040K.js";import{n as E,r as ne}from"./analytics-DqMQntaB.js";import{c as D,f as re,v as O}from"./git-CN3qtTb_.js";import{a as k,n as A}from"./env-chR0gV31.js";import{d as j,f as ie,i as ae,o as oe,s as M}from"./log-CzsijfHZ.js";import{Ar as se,CO as ce,Do as N,Hr as P,JS as F,Ko as I,Lo as L,Lw as R,Nx as z,Px as B,Tr as V,YS as H,jO as U,nt as W,sr as G,tt as le,wO as ue}from"./loadAgentsDir-DI1a76pd.js";import{X as de}from"./rcDebugLog-CPKZCtR8.js";import{n as fe,t as pe}from"./browser-fLRXxIsQ.js";import{t as me}from"./useKeybinding-FsOnjW6T.js";import{readFile as he,stat as ge}from"fs/promises";function K(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 q(){return ae().map(e=>{let t={...e};return t&&typeof t.error==`string`&&(t.error=K(t.error)),t})}async function _e(){try{let e=V(),{size:t}=await ge(e);return t>52428800?(C(`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:a={}}){let[u,p]=(0,X.useState)(`userInput`),[m,g]=(0,X.useState)(0),[_,v]=(0,X.useState)(n??``),[y,b]=(0,X.useState)(null),[x,S]=(0,X.useState)(null),[C,w]=(0,X.useState)({isGit:!1,gitState:null}),[T,E]=(0,X.useState)(null),O=i().columns-4;(0,X.useEffect)(()=>{async function e(){let e=await re(),t=null;e&&(t=await D()),w({isGit:e,gitState:t})}e()},[]);let k=(0,X.useCallback)(async()=>{p(`submitting`),S(null),b(null);let n=q(),r=N(t)?.requestId??null,[i,o]=await Promise.all([P(),_e()]),s=G(a),c={...i,...s},l={latestAssistantMessageId:r,message_count:t.length,datetime:new Date().toISOString(),description:_,platform:A.platform,gitRepo:C.isGit,terminal:A.terminal,version:`2.6.5`,transcript:I(t),errors:n,lastApiRequest:h(),...Object.keys(c).length>0&&{subagentTranscripts:c},...o&&{rawTranscriptJsonl:o}},[u,d]=await Promise.all([xe(l,e),be(_,e)]);E(d),u.success?(u.feedbackId&&(b(u.feedbackId),ne(`tengu_bug_report_submitted`,{feedback_id:u.feedbackId,last_assistant_message_id:r}),te(`tengu_bug_report_description`,{feedback_id:u.feedbackId,description:K(_)})),p(`done`)):(u.isZdrOrg?S(`Feedback collection is not available for organizations with custom data retention policies.`):S(`Could not submit feedback. Please try again later.`),p(`userInput`))},[_,C.isGit,t]),j=(0,X.useCallback)(()=>{if(u===`done`){r(x?`Error submitting feedback / bug report`:`Feedback / bug report submitted`,{display:`system`});return}r(`Feedback / bug report cancelled`,{display:`system`})},[u,x,r]);return d(`confirm:no`,j,{context:`Settings`,isActive:u===`userInput`}),ee((e,t)=>{if(u===`done`){t.return&&T&&fe(ye(y??``,T,_,q())),r(x?`Error submitting feedback / bug report`:`Feedback / bug report submitted`,{display:`system`});return}if(x&&u!==`userInput`){r(`Error submitting feedback / bug report`,{display:`system`});return}u===`consent`&&(t.return||e===` `)&&k()}),(0,Z.jsxs)(s,{title:`Submit Feedback / Bug Report`,onCancel:j,isCancelActive:u!==`userInput`,inputGuide:e=>e.pending?(0,Z.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):u===`userInput`?(0,Z.jsxs)(l,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`continue`}),(0,Z.jsx)(F,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}):u===`consent`?(0,Z.jsxs)(l,{children:[(0,Z.jsx)(c,{shortcut:`Enter`,action:`submit`}),(0,Z.jsx)(F,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]}):null,children:[u===`userInput`&&(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsx)(o,{children:`Describe the issue below:`}),(0,Z.jsx)(z,{value:_,onChange:e=>{v(e),x&&S(null)},columns:O,onSubmit:()=>p(`consent`),onExitMessage:()=>r(`Feedback cancelled`,{display:`system`}),cursorOffset:m,onChangeCursorOffset:g,showCursor:!0}),x&&(0,Z.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,Z.jsx)(o,{color:`error`,children:x}),(0,Z.jsx)(o,{dimColor:!0,children:`Edit and press Enter to retry, or Esc to cancel`})]})]}),u===`consent`&&(0,Z.jsxs)(f,{flexDirection:`column`,children:[(0,Z.jsx)(o,{children:`This report will include:`}),(0,Z.jsxs)(f,{marginLeft:2,flexDirection:`column`,children:[(0,Z.jsxs)(o,{children:[`- Your feedback / bug description: `,(0,Z.jsx)(o,{dimColor:!0,children:_})]}),(0,Z.jsxs)(o,{children:[`- Environment info:`,` `,(0,Z.jsxs)(o,{dimColor:!0,children:[A.platform,`, `,A.terminal,`, v`,`2.6.5`]})]}),C.gitState&&(0,Z.jsxs)(o,{children:[`- Git repo metadata:`,` `,(0,Z.jsxs)(o,{dimColor:!0,children:[C.gitState.branchName,C.gitState.commitHash?`, ${C.gitState.commitHash.slice(0,7)}`:``,C.gitState.remoteUrl?` @ ${C.gitState.remoteUrl}`:``,!C.gitState.isHeadOnRemote&&`, not synced`,!C.gitState.isClean&&`, has local changes`]})]}),(0,Z.jsx)(o,{children:`- Current session transcript`})]}),(0,Z.jsx)(f,{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)(f,{marginTop:1,children:(0,Z.jsxs)(o,{children:[`Press `,(0,Z.jsx)(o,{bold:!0,children:`Enter`}),` to confirm and submit.`]})})]}),u===`submitting`&&(0,Z.jsx)(f,{flexDirection:`row`,gap:1,children:(0,Z.jsx)(o,{children:`Submitting report…`})}),u===`done`&&(0,Z.jsxs)(f,{flexDirection:`column`,children:[x?(0,Z.jsx)(o,{color:`error`,children:x}):(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)(f,{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=K(t),a=`**Bug Description**\n${K(n)}\n\n**Environment Info**\n- Platform: ${A.platform}\n- Terminal: ${A.terminal}\n- Version: 2.6.5\n- Feedback ID: ${e}\n\n**Errors**\n\`\`\`json\n`,o=S(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 W({systemPrompt:de([`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 ue(r)?J(e):r}catch(t){return M(t),J(e)}}function J(e){let t=e.split(`
|
|
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 Y(e){if(e instanceof Error){let t=Error(K(e.message));e.stack&&(t.stack=K(e.stack)),M(t)}else{let t=K(String(e));M(Error(t))}}async function xe(e,t){if(ie())return{success:!1};try{await _();let r=y();if(r.error)return{success:!1};let i={"Content-Type":`application/json`,"User-Agent":v(),...r.headers},a=await n.post(`https://api.anthropic.com/api/claude_cli_feedback`,{content:S(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}:(Y(Error(`Failed to submit feedback: request did not return feedback_id`)),{success:!1})}return Y(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 Y(Error(`Cannot submit feedback because custom data retention settings are enabled`)),{success:!1,isZdrOrg:!0}}return Y(e),{success:!1}}}var X,Z,Q,$,Se=e((()=>{r(),a(),X=t(a(),1),m(),g(),E(),L(),R(),u(),me(),le(),ce(),b(),pe(),w(),k(),O(),x(),oe(),j(),se(),T(),U(),H(),B(),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{Se as n,K as r,ve as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,t}from"./Grove-DSXRnXKv.js";e();export{t as GroveDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{B as r,F as i,L as a,z as o}from"./server-DzOdtq8A.js";import{Rn as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Ct as l,cn as u,y as d}from"./state-sIHsFpDu.js";import{El as f,Ml as ee,S as p,Tl as m,_ as h,jl as g,ls as _,ss as v}from"./paths-BBvuDQl9.js";import{E as y,L as b,V as x,d as te,s as S,w as C}from"./debug-UI3T040K.js";import{n as ne,r as w}from"./analytics-DqMQntaB.js";import{c as T,l as E,o as re}from"./log-CzsijfHZ.js";import{Cx as D,LC as ie,MS as O,NS as ae,OS as oe,PS as se,Sx as k,Tx as A,UC as ce,XC as le,aC as ue,aw as j,bx as M,cO as de,gw as fe,gx as N,hO as pe,hw as me,iC as he,jS as ge,kS as _e,lw as P,mw as F,nw as I,rw as ve,tw as ye,uw as L,vw as be,vx as R,yx as z}from"./loadAgentsDir-DI1a76pd.js";import{o as xe,s as Se}from"./localSearch-CDOJNc_E.js";import{c as Ce,i as we,l as Te,o as Ee,r as De,s as Oe,t as ke}from"./channelNotification-B7A-9DIl.js";import{basename as Ae}from"path";function je(){return h(`tengu_harbor_permissions`,!0)}function B(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);t>>>=0;let n=``;for(let e=0;e<5;e++)n+=V[t%25],t=Math.floor(t/25);return n}function Me(e){let t=B(e);for(let n=0;n<10;n++){if(!H.some(e=>t.includes(e)))return t;t=B(`${e}:${n}`)}return t}function Ne(e){try{let t=y(e);return t.length>200?t.slice(0,200)+`…`:t}catch{return`(unserializable)`}}function Pe(e,t){return e.filter(e=>e.type===`connected`&&t(e.name)&&!!e.capabilities?.experimental?.[`claude/channel`]&&!!e.capabilities?.experimental?.[`claude/channel/permission`])}function Fe(){let e=new Map;return{onResponse(t,n){let r=t.toLowerCase();return e.set(r,n),()=>{e.delete(r)}},resolve(t,n,r){let i=t.toLowerCase(),a=e.get(i);return a?(e.delete(i),a({behavior:n,fromServer:r}),!0):!1}}}var V,H,U=t((()=>{C(),p(),V=`abcdefghijkmnopqrstuvwxyz`,H=[`fuck`,`shit`,`cunt`,`cock`,`dick`,`twat`,`piss`,`crap`,`bitch`,`whore`,`ass`,`tit`,`cum`,`fag`,`dyke`,`nig`,`kike`,`rape`,`nazi`,`damn`,`poo`,`pee`,`wank`,`anus`]}));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 Ie(e,t=!1){let n=ae(),r=O(e=>e.authVersion),s=O(e=>e.mcp.pluginReconnectKey),c=se(),u=(0,K.useRef)(new Map),p=(0,K.useRef)(new Set),m=(0,K.useRef)(null);m.current===null&&(m.current=Fe()),(0,K.useEffect)(()=>{{let e=m.current;return!e||!je()?void 0:(c(t=>t.channelPermissionCallbacks===e?t:{...t,channelPermissionCallbacks:e}),()=>{c(e=>e.channelPermissionCallbacks===void 0?e:{...e,channelPermissionCallbacks:void 0})})}},[c]);let{addNotification:h}=_e(),g=(0,K.useRef)([]),_=(0,K.useRef)(null),y=(0,K.useCallback)(()=>{_.current=null;let e=g.current;e.length!==0&&(g.current=[],c(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=v(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),d=o===void 0?n.tools:[...f(n.tools,e=>e.name?.startsWith(l)),...o],p=s===void 0?n.commands:[...f(n.commands,e=>ie(e,a.name)),...s],m=c===void 0?n.resources:{...n.resources,...c.length>0?{[a.name]:c}:ee(n.resources,a.name)};n={...n,clients:u,tools:d,commands:p,resources:m}}return{...t,mcp:n}}))},[c]),x=(0,K.useCallback)(e=>{g.current.push(e),_.current===null&&(_.current=setTimeout(y,16))},[y]),S=(0,K.useCallback)(({client:e,tools:t,commands:n,resources:r})=>{switch(x({...e,tools:t,commands:n,resources:r}),e.type){case`connected`:{ue(e.client,e.name,c),e.client.onclose=()=>{let t=e.config.type??`stdio`;if(N(e.name,e.config).catch(()=>{te(`Failed to invalidate the server cache: ${e.name}`)}),L(e.name)){T(e.name,`Server is disabled, skipping automatic reconnection`);return}if(t!==`stdio`&&t!==`sdk`){let n=Le(t);T(e.name,`${n} transport closed/disconnected, attempting automatic reconnection`);let r=u.current.get(e.name);r&&(clearTimeout(r),u.current.delete(e.name)),(async()=>{for(let t=1;t<=J;t++){if(L(e.name)){T(e.name,`Server disabled during reconnection, stopping retry`),u.current.delete(e.name);return}x({...e,type:`pending`,reconnectAttempt:t,maxReconnectAttempts:J});let r=Date.now();try{let i=await A(e.name,e.config),a=Date.now()-r;if(i.client.type===`connected`){T(e.name,`${n} reconnection successful after ${a}ms (attempt ${t})`),u.current.delete(e.name),S(i);return}if(T(e.name,`${n} reconnection attempt ${t} completed with status: ${i.client.type}`),t===J){T(e.name,`Max reconnection attempts (${J}) reached, giving up`),u.current.delete(e.name),S(i);return}}catch(i){let a=Date.now()-r;if(E(e.name,`${n} reconnection attempt ${t} failed after ${a}ms: ${i}`),t===J){T(e.name,`Max reconnection attempts (${J}) reached, giving up`),u.current.delete(e.name),x({...e,type:`failed`});return}}let i=Math.min(Y*2**(t-1),X);T(e.name,`Scheduling reconnection attempt ${t+1} in ${i}ms`),await new Promise(t=>{let n=setTimeout(t,i);u.current.set(e.name,n)})}})()}else x({...e,type:`failed`})};let t=Oe(e.name,e.capabilities,e.config.pluginSource),n=Ee(e.name,d()),r=n?.kind===`plugin`?`${n.name}@${n.marketplace}`:void 0;switch((t.action===`register`||t.kind!==`capability`)&&w(`tengu_mcp_channel_gate`,{registered:t.action===`register`,skip_kind:t.action===`skip`?t.kind:void 0,entry_kind:n?.kind,is_dev:n?.dev??!1,plugin:r}),t.action){case`register`:T(e.name,`Channel notifications registered`),e.client.setNotificationHandler(De(),async t=>{let{content:i,meta:a}=t.params;T(e.name,`notifications/claude/channel: ${i.slice(0,80)}`),w(`tengu_mcp_channel_message`,{content_length:i.length,meta_key_count:Object.keys(a??{}).length,entry_kind:n?.kind,is_dev:n?.dev??!1,plugin:r}),de({mode:`prompt`,value:Te(e.name,i,a),priority:`next`,isMeta:!0,origin:{kind:`channel`,server:e.name},skipSlashCommands:!0})}),e.capabilities?.experimental?.[`claude/channel/permission`]&&e.client.setNotificationHandler(we(),async t=>{let{request_id:n,behavior:r}=t.params,i=m.current?.resolve(n,r,e.name)??!1;T(e.name,`notifications/claude/channel/permission: ${n} → ${r} (${i?`matched pending`:`no pending entry — stale or unknown ID`})`)});break;case`skip`:if(e.client.removeNotificationHandler(`notifications/claude/channel`),e.client.removeNotificationHandler(ke),T(e.name,`Channel notifications skipped: ${t.reason}`),t.kind!==`capability`&&t.kind!==`session`&&!p.current.has(t.kind)&&(t.kind===`marketplace`||t.kind===`allowlist`||n!==void 0)){p.current.add(t.kind);let e=t.kind===`disabled`?`Channels are not currently available`:t.kind===`auth`?`Channels require claude.ai authentication · run /login`:t.kind===`policy`?`Channels are not enabled for your org · have an administrator set channelsEnabled: true in managed settings`:t.reason;h({key:`channels-blocked-${t.kind}`,priority:`high`,text:e,color:`warning`,timeoutMs:12e3})}break}e.capabilities?.tools?.listChanged&&e.client.setNotificationHandler(o,async()=>{T(e.name,`Received tools/list_changed notification, refreshing tools`);try{let t=M.cache.get(e.name);M.cache.delete(e.name);let n=await M(e),r=n.length;t?t.then(e=>{w(`tengu_mcp_list_changed`,{type:`tools`,previousCount:e.length,newCount:r})},()=>{w(`tengu_mcp_list_changed`,{type:`tools`,newCount:r})}):w(`tengu_mcp_list_changed`,{type:`tools`,newCount:r}),x({...e,tools:n})}catch(t){E(e.name,`Failed to refresh tools after list_changed notification: ${b(t)}`)}}),e.capabilities?.prompts?.listChanged&&e.client.setNotificationHandler(i,async()=>{T(e.name,`Received prompts/list_changed notification, refreshing prompts`),w(`tengu_mcp_list_changed`,{type:`prompts`});try{R.cache.delete(e.name);let[t,n]=await Promise.all([R(e),Promise.resolve([])]);x({...e,commands:[...t,...n]}),q?.()}catch(t){E(e.name,`Failed to refresh prompts after list_changed notification: ${b(t)}`)}}),e.capabilities?.resources?.listChanged&&e.client.setNotificationHandler(a,async()=>{T(e.name,`Received resources/list_changed notification, refreshing resources`),w(`tengu_mcp_list_changed`,{type:`resources`});try{z.cache.delete(e.name);{let t=await z(e);x({...e,resources:t})}}catch(t){E(e.name,`Failed to refresh resources after list_changed notification: ${b(t)}`)}});break}case`needs-auth`:case`failed`:case`pending`:case`disabled`:break}},[x]),C=l();return(0,K.useEffect)(()=>{async function n(){let{servers:n,errors:r}=t?{servers:{},errors:[]}:await j(e),i={...n,...e};G(c,r),c(e=>{let{stale:t,...n}=ce(e.mcp,i);for(let e of t){let t=u.current.get(e.name);t&&(clearTimeout(t),u.current.delete(e.name)),e.type===`connected`&&(e.client.onclose=void 0,N(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:L(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=>{E(`useManageMCPConnections`,`Failed to initialize servers as pending: ${b(e)}`)})},[t,e,c,C,s]),(0,K.useEffect)(()=>{let n=!1;async function r(){let r;t||I()?r=Promise.resolve({}):(me(),r=fe());let{servers:i,errors:a}=t?{servers:{},errors:[]}:await j(e,r);if(n)return;G(c,a);let o={...i,...e};k(S,Object.fromEntries(Object.entries(o).filter(([e])=>!L(e)))).catch(e=>{E(`useManageMcpConnections`,`Failed to get MCP resources: ${b(e)}`)});let s={};if(!t){if(s=ve(await r).allowed,n)return;if(Object.keys(s).length>0){let{servers:e}=ye(s,o);s=e}Object.keys(s).length>0&&(c(e=>{let t=new Set(e.mcp.clients.map(e=>e.name)),n=Object.entries(s).filter(([e])=>!t.has(e)).map(([e,t])=>({name:e,type:L(e)?`disabled`:`pending`,config:t}));return n.length===0?e:{...e,mcp:{...e.mcp,clients:[...e.mcp.clients,...n]}}}),k(S,Object.fromEntries(Object.entries(s).filter(([e])=>!L(e)))).catch(e=>{E(`useManageMcpConnections`,`Failed to get claude.ai MCP resources: ${b(e)}`)}))}let l={...o,...s},u={enterprise:0,global:0,project:0,user:0,plugin:0,claudeai:0},d=[];for(let[e,t]of Object.entries(l))t.scope===`enterprise`?u.enterprise++:t.scope===`user`?u.global++:t.scope===`project`?u.project++:t.scope===`local`?u.user++:t.scope===`dynamic`?u.plugin++:t.scope===`claudeai`&&u.claudeai++,process.env.USER_TYPE===`ant`&&!L(e)&&(t.type===void 0||t.type===`stdio`)&&`command`in t&&d.push(Ae(t.command));w(`tengu_mcp_servers`,{...u,...process.env.USER_TYPE===`ant`&&d.length>0?{stdio_commands:d.sort().join(`,`)}:{}})}return r(),()=>{n=!0}},[t,e,S,c,r,C,s]),(0,K.useEffect)(()=>{let e=u.current;return()=>{for(let t of e.values())clearTimeout(t);e.clear(),_.current!==null&&(clearTimeout(_.current),_.current=null,y())}},[y]),{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=u.current.get(e);r&&(clearTimeout(r),u.current.delete(e));let i=await A(e,t.config);return S(i),i},[n,S]),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=u.current.get(e);n&&(clearTimeout(n),u.current.delete(e)),F(e,!1),t.type===`connected`&&await N(e,t.config),x({name:e,type:`disabled`,config:t.config})}else F(e,!0),x({name:e,type:`pending`,config:t.config}),S(await A(e,t.config))},[n,x,S])}}function Le(e){switch(e){case`http`:return`HTTP`;case`ws`:case`ws-ide`:return`WebSocket`;default:return`SSE`}}var K,q,J,Y,X,Re=t((()=>{K=n(s(),1),u(),D(),r(),g(),m(),ne(),P(),S(),oe(),ge(),x(),re(),pe(),Ce(),U(),be(),he(),_(),le(),q=(xe(),e(Se)).clearSkillIndexCache,J=5,Y=1e3,X=3e4}));function ze(){let e=(0,Z.useContext)($);if(!e)throw Error(`useMcpReconnect must be used within MCPConnectionManager`);return e.reconnectMcpServer}function Be(){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}=Ie(t,n),a=(0,Z.useMemo)(()=>({reconnectMcpServer:r,toggleMcpServer:i}),[r,i]);return(0,Q.jsx)($.Provider,{value:a,children:e})}var Z,Q,$,He=t((()=>{Z=n(s(),1),Re(),Q=c(),$=(0,Z.createContext)(null)}));export{Pe as a,Ne as c,Be as i,He as n,U as o,ze as r,Me as s,Ve as t};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,r as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./figures-gfT9mM8P.js";import{F as a,Rn as o,b as s,m as c,nt as l,t as u,tt as d,x as f}from"./src-Di342QoJ.js";import{t as p}from"./jsx-runtime-D-D469L8.js";import{Ct as m,cn as h,mr as g,vt as _}from"./state-sIHsFpDu.js";import{Ht as v,es as y,no as b,on as x,oo as S,pi as C,rs as w,vi as T}from"./paths-BBvuDQl9.js";import{n as E,r as D}from"./analytics-DqMQntaB.js";import{n as O,t as k}from"./cwd--iizewsn.js";import{O as A,et as j,h as ee,m as te,o as ne,s as M}from"./log-CzsijfHZ.js";import{b as N,x as re}from"./teammate-DMYOtLTK.js";import{C as ie,g as ae,x as oe}from"./startupProfiler-DnXZaX4A.js";import{$S as se,BE as P,Dc as ce,Dx as le,Ec as F,Eo as ue,FO as I,Jv as de,Lo as L,Lw as fe,MO as R,MS as pe,Ox as me,PO as z,Rc as he,So as B,Ui as ge,Uo as _e,Vi as ve,Vo as ye,Xi as be,Xv as xe,Yv as Se,_o as Ce,an as we,bo as V,fo as Te,gy as Ee,hn as De,iu as H,jS as Oe,kc as ke,la as Ae,my as je,nu as Me,os as Ne,tC as Pe,ty as Fe,yn as Ie,zE as Le,zc as Re,zo as ze}from"./loadAgentsDir-DI1a76pd.js";import{E as Be,T as Ve,c as He,d as Ue,w as We}from"./sessionTracing-DoRJ4nSa.js";import{t as Ge}from"./useKeybinding-FsOnjW6T.js";import{l as Ke,u as qe}from"./referral-DeDr9zAE.js";import{n as Je,t as Ye}from"./slashCommandParsing-Cari0pNg.js";import*as U from"path";import{randomUUID as W}from"crypto";o();var G=p();r(),u(),h(),E(),O(),j(),te(),ne(),re(),oe(),w(),S(),x(),z(),We(),Le(),se(),He(),Me(),he(),ke(),Ne(),L(),be(),Ie(),Ye();var Xe={"`":"`",'"':`"`,"<":`>`,"{":`}`,"[":`]`,"(":`)`,"'":`'`};function Ze(e,t){if(!new RegExp(t,`i`).test(e)||e.startsWith(`/`))return[];let n=[],r=null,i=0,a=e=>!!e&&/[\p{L}\p{N}_]/u.test(e);for(let t=0;t<e.length;t++){let o=e[t];if(r){if(r===`[`&&o===`[`){i=t;continue}if(o!==Xe[r]||r===`'`&&a(e[t+1]))continue;n.push({start:i,end:t+1}),r=null}else (o===`<`&&t+1<e.length&&/[a-zA-Z/]/.test(e[t+1])||o===`'`&&!a(e[t-1])||o!==`<`&&o!==`'`&&o in Xe)&&(r=o,i=t)}let o=[],s=RegExp(`\\b${t}\\b`,`gi`),c=e.matchAll(s);for(let t of c){if(t.index===void 0)continue;let r=t.index,i=r+t[0].length;if(n.some(e=>r>=e.start&&r<e.end))continue;let s=e[r-1],c=e[i];s===`/`||s===`\\`||s===`-`||c===`/`||c===`\\`||c===`-`||c===`?`||c===`.`&&a(e[i+1])||o.push({word:t[0],start:r,end:i})}return o}function K(e){return Ze(e,`ultraplan`)}function Qe(e){return Ze(e,`ultrareview`)}function $e(e){return K(e).length>0}function et(e){let[t]=K(e);if(!t)return e;let n=e.slice(0,t.start),r=e.slice(t.end);return(n+r).trim()?n+t.word.slice(5)+r:``}function tt(e){let t=e.toLowerCase();return/\b(wtf|wth|ffs|omfg|shit(ty|tiest)?|dumbass|horrible|awful|piss(ed|ing)? off|piece of (shit|crap|junk)|what the (fuck|hell)|fucking? (broken|useless|terrible|awful|horrible)|fuck you|screw (this|you)|so frustrating|this sucks|damn it)\b/.test(t)}function nt(e){let t=e.toLowerCase().trim();return t===`continue`?!0:/\b(keep going|go on)\b/.test(t)}function rt(e,t,n,r,i,a,o){let s=W();g(s);let c=typeof e==`string`?e:e.find(e=>e.type===`text`)?.text||``;Ue(c);let l=typeof e==`string`?e:e.findLast(e=>e.type===`text`)?.text||``;return l&&Ve(`user_prompt`,{prompt_length:String(l.length),prompt:Be(l),"prompt.id":s}),D(`tengu_input_prompt`,{is_negative:tt(c),is_keep_going:nt(c)}),t.length>0?{messages:[V({content:[...typeof e==`string`?e.trim()?[{type:`text`,text:e}]:[]:e,...t],uuid:i,imagePasteIds:n.length>0?n:void 0,permissionMode:a,isMeta:o||void 0}),...r],shouldQuery:!0}:{messages:[V({content:e,uuid:i,permissionMode:a,isMeta:o||void 0}),...r],shouldQuery:!0}}E(),L();async function it({input:e,preExpansionInput:t,mode:n,setToolJSX:r,context:i,pastedContents:a,ideSelection:o,messages:s,setUserInputOnProcessing:c,uuid:l,isAlreadyProcessing:u,querySource:d,canUseTool:f,skipSlashCommands:p,bridgeOrigin:m,isMeta:h,skipAttachments:g,autonomy:_}){let v=typeof e==`string`?e:null;n===`prompt`&&v!==null&&!h&&c?.(v),H(`query_process_user_input_base_start`);let y=i.getAppState(),b=await ot(e,n,r,i,a,o,s,l,u,d,f,y.toolPermissionContext.mode,p,m,h,g,t,_);if(H(`query_process_user_input_base_end`),!b.shouldQuery)return b;H(`query_hooks_start`);let x=ue(e)||``;for await(let t of we(x,y.toolPermissionContext.mode,i,i.requestPrompt))if(t.message?.type!==`progress`){if(t.blockingError)return{messages:[Ce(`${De(t.blockingError)}\n\nOriginal prompt: ${e}`,`warning`)],shouldQuery:!1,allowedTools:b.allowedTools};if(t.preventContinuation){let e=t.stopReason?`Operation stopped by hook: ${t.stopReason}`:`Operation stopped by hook`;return b.messages.push(V({content:e})),b.shouldQuery=!1,b}if(t.additionalContexts&&t.additionalContexts.length>0&&b.messages.push(F({type:`hook_additional_context`,content:t.additionalContexts.map(at),hookName:`UserPromptSubmit`,toolUseID:`hook-${W()}`,hookEvent:`UserPromptSubmit`})),t.message)switch(t.message.attachment.type){case`hook_success`:if(!t.message.attachment.content)break;b.messages.push({...t.message,attachment:{...t.message.attachment,content:at(t.message.attachment.content)}});break;default:b.messages.push(t.message);break}}return H(`query_hooks_end`),b}var q=1e4;function at(e){return e.length>q?`${e.substring(0,q)}… [output truncated - exceeded ${q} characters]`:e}async function ot(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_){let v=null,y=[],b=[],x=e;if(typeof e==`string`)v=e;else if(e.length>0){H(`query_image_processing_start`);let t=[];for(let n of e)if(n.type===`image`){let e=await I(n);if(e.dimensions){let t=R(e.dimensions);t&&b.push(t)}t.push(e.block)}else t.push(n);x=t,H(`query_image_processing_end`);let n=t[t.length-1];n?.type===`text`?(v=n.text,y=t.slice(0,-1)):y=t}if(v===null&&t!==`prompt`)throw Error(`Mode: ${t} requires a string input.`);let S=i?Object.values(i).filter(Re):[],C=S.map(e=>e.id),w=i?await Pe(i):new Map;H(`query_pasted_image_processing_start`);let T=await Promise.all(S.map(async e=>{let t={type:`image`,source:{type:`base64`,media_type:e.mediaType||`image/png`,data:e.content}};return D(`tengu_pasted_image_resize_attempt`,{original_size_bytes:e.content.length}),{resized:await I(t),originalDimensions:e.dimensions,sourcePath:e.sourcePath??w.get(e.id)}})),E=[];for(let{resized:e,originalDimensions:t,sourcePath:n}of T){if(e.dimensions){let t=R(e.dimensions,n);t&&b.push(t)}else if(t){let e=R(t,n);e&&b.push(e)}else n&&b.push(`[Image source: ${n}]`);E.push(e.block)}H(`query_pasted_image_processing_end`);let O=f;if(p&&v!==null&&v.startsWith(`/`)){let e=Je(v),t=e?ve(e.commandName,r.options.commands):void 0;if(t){let n=ge(t,e?.args??``);if(n.ok)O=!1;else{let e=n.reason??`/${Ae(t)} isn't available over Remote Control.`;return{messages:[V({content:v,uuid:s}),Te(`<local-command-stdout>${e}</local-command-stdout>`)],shouldQuery:!1,resultText:e}}}}if(t===`prompt`&&!r.options.isNonInteractiveSession&&v!==null&&!O&&!v.startsWith(`/`)&&!r.getAppState().ultraplanSessionUrl&&!r.getAppState().ultraplanLaunching&&$e(g??v)){D(`tengu_ultraplan_keyword`,{});let e=et(v).trim(),{processSlashCommand:t}=await import(`./processSlashCommand-COtIO6Jy.js`);return J(await t(`/ultraplan ${e}`,y,E,[],r,n,s,c,u,_),b)}let k=!h&&v!==null&&(t!==`prompt`||O||!v.startsWith(`/`));H(`query_attachment_loading_start`);let A=k?await P(ce(v,r,a??null,[],o,l)):[];if(H(`query_attachment_loading_end`),v!==null&&t===`bash`){let{processBashCommand:e}=await import(`./processBashCommand-DHHN8Ca4.js`);return J(await e(v,y,A,r,n),b)}if(v!==null&&!O&&v.startsWith(`/`)){let{processSlashCommand:e}=await import(`./processSlashCommand-COtIO6Jy.js`);return J(await e(v,y,E,A,r,n,s,c,u,_),b)}if(v!==null&&t===`prompt`){let e=v.trim(),t=A.find(e=>e.attachment.type===`agent_mention`);if(t){let n=`@agent-${t.attachment.agentType}`,r=e===n;D(`tengu_subagent_at_mention`,{is_subagent_only:r,is_prefix:e.startsWith(n)&&!r})}}return J(rt(x,E,C,A,s,d,m),b)}function J(e,t){return t.length>0&&e.messages.push(V({content:t.map(e=>({type:`text`,text:e})),isMeta:!0})),e}h(),T();function st(e){return e===`Agent`?y:e}function ct(e){let t=b()?.outputStyle??`default`,n={type:`system`,subtype:`init`,cwd:k(),session_id:m(),tools:e.tools.map(e=>st(e.name)),mcp_servers:e.mcpClients.map(e=>({name:e.name,status:e.type})),model:e.model,permissionMode:e.permissionMode,slash_commands:e.commands.filter(e=>e.userInvocable!==!1).map(e=>e.name),apiKeySource:v().source,betas:_(),claude_code_version:`2.6.5`,output_style:t,agents:e.agents.map(e=>e.agentType),skills:e.skills.filter(e=>e.userInvocable!==!1).map(e=>e.name),plugins:e.plugins.map(e=>({name:e.name,path:e.path,source:e.source})),uuid:W()};return n.fast_mode_state=C(e.model,e.fastMode),n}var lt=n({MessageSelector:()=>dt,messagesAfterAreOnlySynthetic:()=>_t,selectableUserMessagesFilter:()=>Z});function ut(e){return e.type===`text`}function Y(e){return e===`summarize`||e===`summarize_up_to`}function dt({messages:e,onPreRestore:t,onRestoreMessage:n,onRestoreCode:r,onSummarize:a,onClose:o,preselectedMessage:u}){let p=pe(e=>e.fileHistory),[m,h]=(0,Q.useState)(void 0),g=Se(),_=(0,Q.useMemo)(W,[]),v=(0,Q.useMemo)(()=>[...e.filter(Z),{...V({content:``}),uuid:_}],[e,_]),[y,b]=(0,Q.useState)(v.length-1),x=Math.max(0,Math.min(y-Math.floor($/2),v.length-$)),S=v.length>1,[C,w]=(0,Q.useState)(u),[T,E]=(0,Q.useState)(void 0);(0,Q.useEffect)(()=>{if(!u||!g)return;let e=!1;return xe(p,u.uuid).then(t=>{e||E(t)}),()=>{e=!0}},[u,g,p]);let[O,k]=(0,Q.useState)(!1),[A,j]=(0,Q.useState)(null),[ee,te]=(0,Q.useState)(`both`),[ne,N]=(0,Q.useState)(``),[re,ie]=(0,Q.useState)(``);function oe(e){let t=e?[{value:`both`,label:`Restore code and conversation`},{value:`conversation`,label:`Restore conversation`},{value:`code`,label:`Restore code`}]:[{value:`conversation`,label:`Restore conversation`}],n={type:`input`,placeholder:`add context (optional)`,initialValue:``,allowEmptySubmitToCancel:!0,showLabelWithValue:!0,labelValueSeparator:`: `};return t.push({value:`summarize`,label:`Summarize from here`,...n,onChange:N}),process.env.USER_TYPE===`ant`&&t.push({value:`summarize_up_to`,label:`Summarize up to here`,...n,onChange:ie}),t.push({value:`nevermind`,label:`Never mind`}),t}(0,Q.useEffect)(()=>{D(`tengu_message_selector_opened`,{})},[]);async function se(e){t(),k(!0);try{await n(e),k(!1),o()}catch(e){M(e),k(!1),h(`Failed to restore the conversation:\n${e}`)}}async function P(t){let n=e.indexOf(t);if(D(`tengu_message_selector_selected`,{index_from_end:e.length-1-n,message_type:t.type,is_current_prompt:!1}),!e.includes(t)){o();return}if(!g){await se(t);return}let r=await xe(p,t.uuid);w(t),E(r)}async function ce(e){if(D(`tengu_message_selector_restore_option_selected`,{option:e}),!C){h(`Message not found.`);return}if(e===`nevermind`){u?o():w(void 0);return}if(Y(e)){t(),k(!0),j(e),h(void 0);try{let t=e===`summarize_up_to`?`up_to`:`from`;await a(C,(t===`up_to`?re:ne).trim()||void 0,t),k(!1),j(null),w(void 0),o()}catch(e){M(e),k(!1),j(null),w(void 0),h(`Failed to summarize:\n${e}`)}return}t(),k(!0),h(void 0);let i=null,s=null;if(e===`code`||e===`both`)try{await r(C)}catch(e){i=e,M(i)}if(e===`conversation`||e===`both`)try{await n(C)}catch(e){s=e,M(s)}k(!1),w(void 0),s&&i?h(`Failed to restore the conversation and code:\n${s}\n${i}`):s?h(`Failed to restore the conversation:\n${s}`):i?h(`Failed to restore the code:\n${i}`):o()}let F=qe(),ue=(0,Q.useCallback)(()=>{if(C&&!u){w(void 0);return}D(`tengu_message_selector_cancelled`,{}),o()},[o,C,u]),I=(0,Q.useCallback)(()=>b(e=>Math.max(0,e-1)),[]),L=(0,Q.useCallback)(()=>b(e=>Math.min(v.length-1,e+1)),[v.length]),fe=(0,Q.useCallback)(()=>b(0),[]),R=(0,Q.useCallback)(()=>b(v.length-1),[v.length]),me=(0,Q.useCallback)(()=>{let e=v[y];e&&P(e)},[v,y,P]);d(`confirm:no`,ue,{context:`Confirmation`,isActive:!C}),l({"messageSelector:up":I,"messageSelector:down":L,"messageSelector:top":fe,"messageSelector:bottom":R,"messageSelector:select":me},{context:`MessageSelector`,isActive:!O&&!m&&!C&&S});let[z,he]=(0,Q.useState)({});(0,Q.useEffect)(()=>{async function t(){g&&Promise.all(v.map(async(t,n)=>{if(t.uuid!==_){let r=de(p,t.uuid),i=v.at(n+1),a=r?gt(e,t.uuid,i?.uuid===_?void 0:i?.uuid):void 0;he(a===void 0?e=>({...e,[n]:void 0}):e=>({...e,[n]:a}))}}))}t()},[v,e,_,p,g]);let B=g&&T?.filesChanged&&T.filesChanged.length>0,ge=!m&&!C&&!u&&S;return(0,G.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,G.jsx)(c,{color:`suggestion`}),(0,G.jsxs)(f,{flexDirection:`column`,marginX:1,gap:1,children:[(0,G.jsx)(s,{bold:!0,color:`suggestion`,children:`Rewind`}),m&&(0,G.jsx)(G.Fragment,{children:(0,G.jsxs)(s,{color:`error`,children:[`Error: `,m]})}),!S&&(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(s,{children:`Nothing to rewind to yet.`})}),!m&&C&&S&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(s,{children:[`Confirm you want to restore `,!T&&`the conversation `,`to the point before you sent this message:`]}),(0,G.jsxs)(f,{flexDirection:`column`,paddingLeft:1,borderStyle:`single`,borderRight:!1,borderTop:!1,borderBottom:!1,borderLeft:!0,borderLeftDimColor:!0,children:[(0,G.jsx)(ht,{userMessage:C,color:`text`,isCurrent:!1}),(0,G.jsxs)(s,{dimColor:!0,children:[`(`,ae(new Date(C.timestamp)),`)`]})]}),(0,G.jsx)(pt,{selectedRestoreOption:ee,canRestoreCode:!!B,diffStatsForRestore:T}),O&&Y(A)?(0,G.jsxs)(f,{flexDirection:`row`,gap:1,children:[(0,G.jsx)(je,{}),(0,G.jsx)(s,{children:`Summarizing…`})]}):(0,G.jsx)(le,{isDisabled:O,options:oe(!!B),defaultFocusValue:B?`both`:`conversation`,onFocus:e=>te(e),onChange:e=>ce(e),onCancel:()=>u?o():w(void 0)}),B&&(0,G.jsx)(f,{marginBottom:1,children:(0,G.jsxs)(s,{dimColor:!0,children:[i.warning,` Rewinding does not affect files edited manually or via bash.`]})})]}),ge&&(0,G.jsxs)(G.Fragment,{children:[g?(0,G.jsx)(s,{children:`Restore the code and/or conversation to the point before…`}):(0,G.jsx)(s,{children:`Restore and fork the conversation to the point before…`}),(0,G.jsx)(f,{width:`100%`,flexDirection:`column`,children:v.slice(x,x+$).map((e,t)=>{let n=x+t,r=n===y,a=e.uuid===_,o=n in z,c=z[n],l=c?.filesChanged&&c.filesChanged.length;return(0,G.jsxs)(f,{height:g?3:2,overflow:`hidden`,width:`100%`,flexDirection:`row`,children:[(0,G.jsx)(f,{width:2,minWidth:2,children:r?(0,G.jsxs)(s,{color:`permission`,bold:!0,children:[i.pointer,` `]}):(0,G.jsx)(s,{children:` `})}),(0,G.jsxs)(f,{flexDirection:`column`,children:[(0,G.jsx)(f,{flexShrink:1,height:1,overflow:`hidden`,children:(0,G.jsx)(ht,{userMessage:e,color:r?`suggestion`:void 0,isCurrent:a,paddingRight:10})}),g&&o&&(0,G.jsx)(f,{height:1,flexDirection:`row`,children:c?(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(s,{dimColor:!r,color:`inactive`,children:l?(0,G.jsxs)(G.Fragment,{children:[l===1&&c.filesChanged[0]?`${U.basename(c.filesChanged[0])} `:`${l} files changed `,(0,G.jsx)(X,{diffStats:c})]}):(0,G.jsx)(G.Fragment,{children:`No code changes`})})}):(0,G.jsxs)(s,{dimColor:!0,color:`warning`,children:[i.warning,` No code restore`]})})]})]},e.uuid)})})]}),!C&&(0,G.jsx)(s,{dimColor:!0,italic:!0,children:F.pending?(0,G.jsxs)(G.Fragment,{children:[`Press `,F.keyName,` again to exit`]}):(0,G.jsxs)(G.Fragment,{children:[!m&&S&&`Enter to continue · `,`Esc to exit`]})})]})]})}function ft(e){switch(e){case`summarize`:return`Messages after this point will be summarized.`;case`summarize_up_to`:return`Preceding messages will be summarized. This and subsequent messages will remain unchanged — you will stay at the end of the conversation.`;case`both`:case`conversation`:return`The conversation will be forked.`;case`code`:case`nevermind`:return`The conversation will be unchanged.`}}function pt({selectedRestoreOption:e,canRestoreCode:t,diffStatsForRestore:n}){let r=t&&(e===`both`||e===`code`);return(0,G.jsxs)(f,{flexDirection:`column`,children:[(0,G.jsx)(s,{dimColor:!0,children:ft(e)}),!Y(e)&&(r?(0,G.jsx)(mt,{diffStatsForRestore:n}):(0,G.jsx)(s,{dimColor:!0,children:`The code will be unchanged.`}))]})}function mt({diffStatsForRestore:e}){if(e===void 0)return;if(!e.filesChanged||!e.filesChanged[0])return(0,G.jsx)(s,{dimColor:!0,children:`The code has not changed (nothing will be restored).`});let t=e.filesChanged.length,n=``;return n=t===1?U.basename(e.filesChanged[0]||``):t===2?`${U.basename(e.filesChanged[0]||``)} and ${U.basename(e.filesChanged[1]||``)}`:`${U.basename(e.filesChanged[0]||``)} and ${e.filesChanged.length-1} other files`,(0,G.jsx)(G.Fragment,{children:(0,G.jsxs)(s,{dimColor:!0,children:[`The code will be restored `,(0,G.jsx)(X,{diffStats:e}),` in `,n,`.`]})})}function X({diffStats:e}){if(!(!e||!e.filesChanged))return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(s,{color:`diffAddedWord`,children:[`+`,e.insertions,` `]}),(0,G.jsxs)(s,{color:`diffRemovedWord`,children:[`-`,e.deletions]})]})}function ht({userMessage:e,color:t,dimColor:n,isCurrent:r,paddingRight:i}){let{columns:o}=a();if(r)return(0,G.jsx)(f,{width:`100%`,children:(0,G.jsx)(s,{italic:!0,color:t,dimColor:n,children:`(current)`})});let c=e.message.content,l=typeof c==`string`?null:c[c.length-1],u=ee(typeof c==`string`?c.trim():l&&ut(l)?l.text.trim():`(no prompt)`);if(ze(u))return(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsx)(s,{italic:!0,color:t,dimColor:n,children:`((empty message))`})});if(u.includes(`<bash-input>`)){let e=B(u,`bash-input`);if(e)return(0,G.jsxs)(f,{flexDirection:`row`,width:`100%`,children:[(0,G.jsx)(s,{color:`bashBorder`,children:`!`}),(0,G.jsxs)(s,{color:t,dimColor:n,children:[` `,e]})]})}if(u.includes(`<command-message>`)){let e=B(u,A),r=B(u,`command-args`),i=B(u,`skill-format`)===`true`;if(e)return i?(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsxs)(s,{color:t,dimColor:n,children:[`Skill(`,e,`)`]})}):(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsxs)(s,{color:t,dimColor:n,children:[`/`,e,` `,r]})})}return(0,G.jsx)(f,{flexDirection:`row`,width:`100%`,children:(0,G.jsx)(s,{color:t,dimColor:n,children:i?ie(u,o-i,!0):u.slice(0,500).split(`
|
|
2
|
-
`).slice(0,4).join(`
|
|
3
|
-
`)})})}function gt(e,t,n){let r=e.findIndex(e=>e.uuid===t);if(r===-1)return;let i=n?e.findIndex(e=>e.uuid===n):e.length;i===-1&&(i=e.length);let a=[],o=0,s=0;for(let t=r+1;t<i;t++){let n=e[t];if(!n||!_e(n))continue;let r=n.toolUseResult;if(!(!r||!r.filePath||!r.structuredPatch)){a.includes(r.filePath)||a.push(r.filePath);try{if(`type`in r&&r.type===`create`)o+=r.content.split(/\r?\n/).length;else for(let e of r.structuredPatch){let t=N(e.lines,e=>e.startsWith(`+`)),n=N(e.lines,e=>e.startsWith(`-`));o+=t,s+=n}}catch{}}}return{filesChanged:a,insertions:o,deletions:s}}function Z(e){if(e.type!==`user`||Array.isArray(e.message.content)&&e.message.content[0]?.type===`tool_result`||ye(e)||e.isMeta||e.isCompactSummary||e.isVisibleInTranscriptOnly)return!1;let t=e.message.content,n=typeof t==`string`?null:t[t.length-1],r=typeof t==`string`?t.trim():n&&ut(n)?n.text.trim():``;return!(r.indexOf(`<local-command-stdout>`)!==-1||r.indexOf(`<local-command-stderr>`)!==-1||r.indexOf(`<bash-stdout>`)!==-1||r.indexOf(`<bash-stderr>`)!==-1||r.indexOf(`<task-notification>`)!==-1||r.indexOf(`<tick>`)!==-1||r.indexOf(`<teammate-message`)!==-1)}function _t(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(t&&!ye(t)&&!_e(t)&&t.type!==`progress`&&t.type!==`system`&&t.type!==`attachment`&&!(t.type===`user`&&t.isMeta)){if(t.type===`assistant`){let e=t.message.content;if(Array.isArray(e)&&e.some(e=>e.type===`text`&&e.text.trim()||e.type===`tool_use`))return!1;continue}if(t.type===`user`)return!1}}return!0}var Q,$,vt=e((()=>{Q=t(o()),E(),Oe(),Fe(),Ke(),Ge(),L(),me(),Ee(),fe(),$=7}));export{Z as a,it as c,_t as i,K as l,lt as n,ct as o,vt as r,st as s,dt as t,Qe as u};
|