claude-code-best 2.4.4 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-Cj5bvJgD.js +1 -0
- package/dist/chunks/App-2tgSv9lb.js +1 -0
- package/dist/chunks/ApproveApiKey-DWa-XTLb.js +1 -0
- package/dist/chunks/ApproveApiKey-SIUwkD8j.js +1 -0
- package/dist/chunks/AssistantSessionChooser-DF9eeJZS.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-DXJdube9.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-BOSW4Zdy.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-BW4XHmkw.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-B8oAAHSI.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-Bz0JyaOG.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DYhmGSkx.js +1 -0
- package/dist/chunks/DesktopHandoff-CcsM_OAS.js +1 -0
- package/dist/chunks/DevChannelsDialog-DXRgY00D.js +1 -0
- package/dist/chunks/Dialog-DYFGqyDs.js +1 -0
- package/dist/chunks/DiffDialog-PvNZfZby.js +3 -0
- package/dist/chunks/Doctor--B1HUENo.js +1 -0
- package/dist/chunks/Doctor-CE_jL9jC.js +3 -0
- package/dist/chunks/ExitFlow-C4ybxKPn.js +2 -0
- package/dist/chunks/Feedback-B5rPGl_C.js +2 -0
- package/dist/chunks/Grove-C2YjB3zL.js +1 -0
- package/dist/chunks/Grove-CKVpREDU.js +11 -0
- package/dist/chunks/HybridTransport-Byjvz-DL.js +4 -0
- package/dist/chunks/ITermBackend-Co9XpeS4.js +1 -0
- package/dist/chunks/InProcessTransport-DB52dh4f.js +1 -0
- package/dist/chunks/InvalidConfigDialog-CNsqbNU3.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-ClnZaN6b.js +1 -0
- package/dist/chunks/ListItem-OFARanN7.js +1 -0
- package/dist/chunks/MCPConnectionManager-CDsa79pu.js +1 -0
- package/dist/chunks/McpParsingWarnings-DZkzoeZf.js +1 -0
- package/dist/chunks/MessageSelector-CkeGQPNM.js +3 -0
- package/dist/chunks/Messages-PfbzLYOU.js +11 -0
- package/dist/chunks/Onboarding-BwoGQB4g.js +1 -0
- package/dist/chunks/OverageCreditUpsell-Q5g2YjQw.js +1 -0
- package/dist/chunks/PermissionDialog-5MlJf7ew.js +1 -0
- package/dist/chunks/PluginSettings-B2ASJ0Rx.js +17 -0
- package/dist/chunks/PressEnterToContinue-BdA9zDGs.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-D4lMVCqj.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-BvLtS6an.js +1 -0
- package/dist/chunks/QueryEngine-Av0G5fze.js +1 -0
- package/dist/chunks/REPL-DCwqua0C.js +1 -0
- package/dist/chunks/REPL-Dh8vzGmF.js +97 -0
- package/dist/chunks/RemoteCallout-BV_hoz98.js +1 -0
- package/dist/chunks/RemoteSessionManager-Cxoy1ud2.js +2 -0
- package/dist/chunks/ResumeConversation-B3WuB8rs.js +1 -0
- package/dist/chunks/SSETransport-pIm26VJq.js +4 -0
- package/dist/chunks/SearchBox-DfOmUoaI.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-D70C-cmA.js +1 -0
- package/dist/chunks/SentryErrorBoundary-B6EWoJml.js +2 -0
- package/dist/chunks/SentryErrorBoundary-oJUBarGg.js +1 -0
- package/dist/chunks/Settings-CreAhCsb.js +2 -0
- package/dist/chunks/TeleportProgress-DPzGpyyM.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DqWQX6j8.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-DPSO0S49.js +1 -0
- package/dist/chunks/ThemePicker-DueihHcy.js +1 -0
- package/dist/chunks/TmuxBackend-BNaZNAeP.js +9 -0
- package/dist/chunks/TrustDialog-CIzAlGn9.js +1 -0
- package/dist/chunks/TungstenTool-C5IqKVr0.js +1 -0
- package/dist/chunks/TungstenTool-V-Bwqlx3.js +1 -0
- package/dist/chunks/ValidationErrorsList-1k1qbsRo.js +2 -0
- package/dist/chunks/WelcomeV2-CR6TtXXM.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-C5SeTXqC.js +2 -0
- package/dist/chunks/add-dir-DAMizKzF.js +1 -0
- package/dist/chunks/agentDisplay-B9z7i8b_.js +1 -0
- package/dist/chunks/agents-D5u0p1UC.js +103 -0
- package/dist/chunks/agents-DCh_gEvJ.js +2 -0
- package/dist/chunks/ajv-B_OpU_Uh.js +8 -0
- package/dist/chunks/analytics-DqMQntaB.js +1 -0
- package/dist/chunks/ant-DRJq-cEg.js +1 -0
- package/dist/chunks/api-B6URs6nc.js +1 -0
- package/dist/chunks/api-Dz_3z1kl.js +1 -0
- package/dist/chunks/asciicast-aoKFhc7C.js +1 -0
- package/dist/chunks/asciicast-o5Zg4dJt.js +4 -0
- package/dist/chunks/assistant-BRGDWkKB.js +1 -0
- package/dist/chunks/assistant-tPxOUa-Z.js +1 -0
- package/dist/chunks/assistant-zVegFdAO.js +1 -0
- package/dist/chunks/attributionHooks-PygdohOh.js +1 -0
- package/dist/chunks/attributionTrailer-BpvhXgRP.js +1 -0
- package/dist/chunks/auth-CqURlg4d.js +1 -0
- package/dist/chunks/auth-D4isgfuK.js +1 -0
- package/dist/chunks/autoMode-DVt4K4I2.js +45 -0
- package/dist/chunks/autoModeDenials-Cp6VFdsm.js +1 -0
- package/dist/chunks/autonomy-BZzW8QJZ.js +1 -0
- package/dist/chunks/autonomy-Ffv0QIyl.js +19 -0
- package/dist/chunks/autonomyPanel-MwuzDvv_.js +1 -0
- package/dist/chunks/axios-DLnc2dVy.js +1 -0
- package/dist/chunks/axios-DhfaybwJ.js +12 -0
- package/dist/chunks/backgroundHousekeeping-CYnAG60-.js +17 -0
- package/dist/chunks/backgroundHousekeeping-DUmxC6h0.js +1 -0
- package/dist/chunks/banner-CVXH2xts.js +2 -0
- package/dist/chunks/base64-js-DIVSFswY.js +1 -0
- package/dist/chunks/bedrockClient-qi1-JCOK.js +15 -0
- package/dist/chunks/bg-DK0E4ZtW.js +9 -0
- package/dist/chunks/bg-Dbh5z3Y8.js +1 -0
- package/dist/chunks/branch-DXefFdDE.js +3 -0
- package/dist/chunks/break-cache-ByJ7U2Ts.js +8 -0
- package/dist/chunks/bridge-qr4GQW_c.js +2 -0
- package/dist/chunks/bridgeConfig-CJ-KznTS.js +1 -0
- package/dist/chunks/bridgeConfig-CNbOKpAg.js +1 -0
- package/dist/chunks/bridgeEnabled-5vsPrjuq.js +1 -0
- package/dist/chunks/bridgeEnabled-BUJTCUHY.js +1 -0
- package/dist/chunks/bridgeMain-BimZwc2P.js +68 -0
- package/dist/chunks/bridgeMain-DYL4fl6A.js +1 -0
- package/dist/chunks/bridgeMessaging-BiE0CTqq.js +1 -0
- package/dist/chunks/bridgePointer-FvAMj3re.js +1 -0
- package/dist/chunks/browser-fLRXxIsQ.js +1 -0
- package/dist/chunks/btw-FpimqEqk.js +1 -0
- package/dist/chunks/buddy-BA3Cr067.js +3 -0
- package/dist/chunks/bundledMode-kSQejuY4.js +1 -0
- package/dist/chunks/bypassPermissionsKillswitch-CSC9p8mO.js +1 -0
- package/dist/chunks/caches-BUBkfP2Q.js +3 -0
- package/dist/chunks/caches-CTfNpKhW.js +1 -0
- package/dist/chunks/capacityWake-BXlUpptF.js +1 -0
- package/dist/chunks/ccrClient-BOxUn9EJ.js +1 -0
- package/dist/chunks/ccshareResume-DWLjTF22.js +1 -0
- package/dist/chunks/changeDetector-Y9KV5LgG.js +1 -0
- package/dist/chunks/channelNotification-CC7Xb06W.js +1 -0
- package/dist/chunks/channelNotification-l3EXKDNB.js +1 -0
- package/dist/chunks/chokidar-BcI3rIKm.js +1 -0
- package/dist/chunks/chokidar-SzksMqYp.js +1 -0
- package/dist/chunks/chrome-BnKyWWQL.js +1 -0
- package/dist/chunks/chromeNativeHost-4U39yLtd.js +1 -0
- package/dist/chunks/chunk-DR8-3Aex.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-EAQNhHs8.js +1 -0
- package/dist/chunks/claudeDesktop-D0S1eq1F.js +1 -0
- package/dist/chunks/cleanup-Bg_gFgcj.js +1 -0
- package/dist/chunks/clear-OUVFUt8Z.js +1 -0
- package/dist/chunks/cliLaunch-BQa48gsr.js +1 -0
- package/dist/chunks/client-B47ZvTMo.js +1 -0
- package/dist/chunks/client-CPn1wQyc.js +7 -0
- package/dist/chunks/client-_sjL0I7A.js +35 -0
- package/dist/chunks/color-D5MCzz9h.js +1 -0
- package/dist/chunks/color-convert-ULbeSgNC.js +1 -0
- package/dist/chunks/commands-FJGWgQsa.js +1 -0
- package/dist/chunks/commitAttribution-BFshsh2H.js +2 -0
- package/dist/chunks/commitAttribution-DSv9FggK.js +1 -0
- package/dist/chunks/common-B379wT22.js +1 -0
- package/dist/chunks/common-B_BC3eMY.js +1 -0
- package/dist/chunks/common-CMCv4N_v.js +1 -0
- package/dist/chunks/compact-DWNaf1wR.js +3 -0
- package/dist/chunks/companion-CyK_Dr1U.js +1 -0
- package/dist/chunks/completionCache-DHfUBBMH.js +1 -0
- package/dist/chunks/completionCache-DORrtxkS.js +4 -0
- package/dist/chunks/computerUseLock-BjoDJH2h.js +1 -0
- package/dist/chunks/config-BdCuh6eA.js +1 -0
- package/dist/chunks/config-DNz6Eitr.js +1 -0
- package/dist/chunks/connectHeadless-CwsFt-Mh.js +1 -0
- package/dist/chunks/constants-41VpZw2G.js +1 -0
- package/dist/chunks/context-BOjdTj0i.js +1 -0
- package/dist/chunks/context-noninteractive-Bd2HO-vU.js +1 -0
- package/dist/chunks/context-noninteractive-k2ibficU.js +54 -0
- package/dist/chunks/controlMessageCompat-BJhFiS7u.js +1 -0
- package/dist/chunks/conversation-BP0phkOY.js +1 -0
- package/dist/chunks/conversation-Ci8O_eZ-.js +1 -0
- package/dist/chunks/copy-B0VUJ2rH.js +7 -0
- package/dist/chunks/createSSHSession-DqmkCS_k.js +6 -0
- package/dist/chunks/createSession-B9MhWusY.js +1 -0
- package/dist/chunks/createSession-CJEsHz58.js +1 -0
- package/dist/chunks/cron-DiW7eIPP.js +1 -0
- package/dist/chunks/cronJitterConfig-BzPaa52I.js +6 -0
- package/dist/chunks/crossProjectResume-tWsqBUHc.js +40 -0
- package/dist/chunks/cwd--iizewsn.js +1 -0
- package/dist/chunks/cwd-BgpSJxd7.js +1 -0
- package/dist/chunks/daemon-VYRit6Aq.js +2 -0
- package/dist/chunks/dangerousBackend-BU_PHGR2.js +1 -0
- package/dist/chunks/datadog-Bd1s_VFj.js +1 -0
- package/dist/chunks/datadog-DJowkWhh.js +1 -0
- package/dist/chunks/debug-DM5ezCBS.js +1 -0
- package/dist/chunks/debug-UI3T040K.js +5 -0
- package/dist/chunks/debugUtils-BBMFODKH.js +1 -0
- package/dist/chunks/defineProperty-80gRi2ZW.js +1 -0
- package/dist/chunks/desktop-BDowrzvG.js +1 -0
- package/dist/chunks/detached-D300jlhj.js +5 -0
- package/dist/chunks/detect-libc-DNuQfUvI.js +1 -0
- package/dist/chunks/detectRepository-CBk3S2zv.js +1 -0
- package/dist/chunks/detectRepository-DCTvg4p0.js +1 -0
- package/dist/chunks/detection-CQsNad64.js +1 -0
- package/dist/chunks/detection-DJ-vTbBf.js +1 -0
- package/dist/chunks/diff-auU5sUOw.js +1 -0
- package/dist/chunks/directoryCompletion-DP_4B1GL.js +1 -0
- package/dist/chunks/dist-CanSxOZ1.js +5 -0
- package/dist/chunks/dist-Cg1a1Exw.js +29 -0
- package/dist/chunks/dist-Q7YNoZ0H.js +20 -0
- package/dist/chunks/dist-es-4z5T3Jzm.js +1 -0
- package/dist/chunks/dist-es-B2jg52tM2.js +1 -0
- package/dist/chunks/dist-es-B6OXHQ1S.js +1 -0
- package/dist/chunks/dist-es-B8NEy5hc.js +1 -0
- package/dist/chunks/dist-es-BVGppqE4.js +1 -0
- package/dist/chunks/dist-es-Bcw5GZko.js +1 -0
- package/dist/chunks/dist-es-BoIJpncb.js +9 -0
- package/dist/chunks/dist-es-Bu_Fshi1.js +1 -0
- package/dist/chunks/dist-es-C-1vn4OP2.js +1 -0
- package/dist/chunks/dist-es-C41b_0B5.js +1 -0
- package/dist/chunks/dist-es-CCZYybbG2.js +1 -0
- package/dist/chunks/dist-es-CLK1mey-.js +1 -0
- package/dist/chunks/dist-es-CQz2aNf72.js +1 -0
- package/dist/chunks/dist-es-CSfI8B8l.js +1 -0
- package/dist/chunks/dist-es-CUZBYppo.js +1 -0
- package/dist/chunks/dist-es-CZkzHpjF.js +1 -0
- package/dist/chunks/dist-es-Cbf0_D8d.js +5 -0
- package/dist/chunks/dist-es-ChHe-SVL.js +1 -0
- package/dist/chunks/dist-es-ClYOf0My.js +1 -0
- package/dist/chunks/dist-es-D-kJbj4A2.js +1 -0
- package/dist/chunks/dist-es-D1LN6CJd.js +1 -0
- package/dist/chunks/dist-es-DC1sC3ph.js +1 -0
- package/dist/chunks/dist-es-DGn8uOwQ2.js +1 -0
- package/dist/chunks/dist-es-DK5fTeKM2.js +1 -0
- package/dist/chunks/dist-es-DN7otr6F.js +1 -0
- package/dist/chunks/dist-es-DPM0mPK5.js +1 -0
- package/dist/chunks/dist-es-DqZAh3nG.js +1 -0
- package/dist/chunks/dist-es-DuAZyxJ02.js +5 -0
- package/dist/chunks/dist-es-HVQrM0oE.js +1 -0
- package/dist/chunks/dist-es-OVleIB54.js +1 -0
- package/dist/chunks/dist-es-UAs0rdXg.js +1 -0
- package/dist/chunks/dist-es-WvMMuHmx2.js +1 -0
- package/dist/chunks/dist-es-fjXft-jH.js +1 -0
- package/dist/chunks/dist-es-hdN_ShpZ.js +3 -0
- package/dist/chunks/dist-es-neiUvMJb.js +1 -0
- package/dist/chunks/dist-es-yMYpDtui2.js +1 -0
- package/dist/chunks/dist-es-zjcbuB72.js +1 -0
- package/dist/chunks/distRoot-CcxmnzqQ.js +1 -0
- package/dist/chunks/doctor-bKPp6AeL.js +1 -0
- package/dist/chunks/earlyInput-JGJo1zcC.js +1 -0
- package/dist/chunks/earlyInput-tRkbxFv2.js +2 -0
- package/dist/chunks/effort-BQj2QnnA.js +9 -0
- package/dist/chunks/entry-CUu6-QhT.js +14 -0
- package/dist/chunks/env-chR0gV31.js +1 -0
- package/dist/chunks/envLessBridgeConfig-CixkwbRF.js +1 -0
- package/dist/chunks/envLessBridgeConfig-Ju4W58xf.js +1 -0
- package/dist/chunks/envUtils-BWeoiL4Y.js +1 -0
- package/dist/chunks/escHotkey-Cyz0yyh1.js +259 -0
- package/dist/chunks/esm--xjzB1hI.js +1 -0
- package/dist/chunks/esm-B2HIF0XY.js +1 -0
- package/dist/chunks/esm-BGQPWnJy.js +1 -0
- package/dist/chunks/esm-C-1qL9Mn.js +1 -0
- package/dist/chunks/esm-C3jcs1DH.js +1 -0
- package/dist/chunks/esm-C97WL9nC.js +1 -0
- package/dist/chunks/esm-CIL-SKM8.js +1 -0
- package/dist/chunks/esm-CJlBxjtx.js +1 -0
- package/dist/chunks/esm-CsGLyWmS.js +56 -0
- package/dist/chunks/esm-DQHmDm-H.js +1 -0
- package/dist/chunks/esm-DcdOXSzi.js +1 -0
- package/dist/chunks/esm-DhNYgGTV.js +1 -0
- package/dist/chunks/esm-DxPW7qPs.js +1 -0
- package/dist/chunks/esm-FBUWr3vI.js +1 -0
- package/dist/chunks/esm-QgL6y---.js +10 -0
- package/dist/chunks/esm-v0kPjgVS.js +1 -0
- package/dist/chunks/esm-vIn-YV_h.js +1 -0
- package/dist/chunks/event-streams-BV7ngMXu.js +1 -0
- package/dist/chunks/eventLoopStallDetector-Dnh1fc31.js +1 -0
- package/dist/chunks/execAsync-BkA6ogic.js +1 -0
- package/dist/chunks/execFileNoThrow-CuQN1sz8.js +1 -0
- package/dist/chunks/execSyncWrapper-C2XQnFVo.js +1 -0
- package/dist/chunks/execa-CGue6Z3n.js +34 -0
- package/dist/chunks/executor-4EeD8GNm.js +1561 -0
- package/dist/chunks/executor-BHEuNh5F.js +1 -0
- package/dist/chunks/exit-DijkO8eo.js +1 -0
- package/dist/chunks/exit-_obETqBv.js +2 -0
- package/dist/chunks/export-DA-bBZkX.js +2 -0
- package/dist/chunks/exportRenderer-3y4tGdSB.js +1 -0
- package/dist/chunks/extra-usage-CS6VwKJt.js +1 -0
- package/dist/chunks/extra-usage-DGHEQOrY.js +1 -0
- package/dist/chunks/extra-usage-core-DOgT4u4i.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DYnfiRlV.js +1 -0
- package/dist/chunks/extraUsage-CfxgfpX_.js +1 -0
- package/dist/chunks/extractMemories-jvjCvtpC.js +1 -0
- package/dist/chunks/fast-Bbtx_Bs1.js +1 -0
- package/dist/chunks/fast-CzRUJBTK.js +1 -0
- package/dist/chunks/featureCheck-Cm0YNDXO.js +1 -0
- package/dist/chunks/featureCheck-p7OeCYzj.js +1 -0
- package/dist/chunks/feedback-FoXtdHAV.js +1 -0
- package/dist/chunks/figures-gfT9mM8P.js +1 -0
- package/dist/chunks/fileStateCache-C7-TxF8G.js +1 -0
- package/dist/chunks/files-DYvAZGxp.js +2 -0
- package/dist/chunks/firstPartyEventLogger-KIwaBY-E.js +1 -0
- package/dist/chunks/flushGate-C2Icy43G.js +1 -0
- package/dist/chunks/foundry-sdk-BFN5VDFQ.js +1 -0
- package/dist/chunks/fpsMetrics-DeezdcwV.js +1 -0
- package/dist/chunks/fuse-Ch_OAlm3.js +1 -0
- package/dist/chunks/gates-CbQLZHtm.js +1 -0
- package/dist/chunks/gates-DSI3vpwO.js +1 -0
- package/dist/chunks/gemini-BrNJGX4k.js +1 -0
- package/dist/chunks/generateRecap-B0fvSCjo.js +1 -0
- package/dist/chunks/generateSessionName-DvRYa39O.js +1 -0
- package/dist/chunks/genericProcessUtils-BGvcwuPt.js +23 -0
- package/dist/chunks/getMachineId-bsd-BMtYGBUL.js +1 -0
- package/dist/chunks/getMachineId-darwin-CiLdFH7z.js +2 -0
- package/dist/chunks/getMachineId-linux-Cr27rIeY.js +1 -0
- package/dist/chunks/getMachineId-unsupported-ceiBLwAN.js +1 -0
- package/dist/chunks/getMachineId-win-DFTmsQHq.js +1 -0
- package/dist/chunks/git-CN3qtTb_.js +6 -0
- package/dist/chunks/git-D23Mzu_K.js +1 -0
- package/dist/chunks/githubRepoPathMapping-Dut3d6nn.js +1 -0
- package/dist/chunks/graceful-fs-Cgc0rjGF.js +2 -0
- package/dist/chunks/grok-Ftoheab3.js +1 -0
- package/dist/chunks/growthbook-BynnuVTn.js +1 -0
- package/dist/chunks/hash-BRmOQc3c.js +1 -0
- package/dist/chunks/heapdump-hQ_w0LPC.js +5 -0
- package/dist/chunks/help-DQsHHv6r.js +1 -0
- package/dist/chunks/hooks-BLLL4iPv.js +1 -0
- package/dist/chunks/hooks-BhVDc8yb.js +79 -0
- package/dist/chunks/hostAdapter-D1eWmmhu.js +1 -0
- package/dist/chunks/hostGuard-zim_4F9V.js +1 -0
- package/dist/chunks/httpAuthSchemes-Wq4XWeLL.js +13 -0
- package/dist/chunks/ide-CPmMXLL-.js +2 -0
- package/dist/chunks/inboundAttachments-Bmf6vYsE.js +1 -0
- package/dist/chunks/inboundAttachments-D-p91z3w.js +1 -0
- package/dist/chunks/index.min-BJnb9GQI.js +1 -0
- package/dist/chunks/initReplBridge-BiHXpDEY.js +1 -0
- package/dist/chunks/insights-CTlTyvjj.js +822 -0
- package/dist/chunks/install-IPuD3Lq8.js +1 -0
- package/dist/chunks/install-github-app-Bmu_sA9e.js +147 -0
- package/dist/chunks/install-slack-app-Rfl81Jqo.js +1 -0
- package/dist/chunks/instinctParser-DHMa8xa0.js +1 -0
- package/dist/chunks/instrumentation-DWwmOmr0.js +12 -0
- package/dist/chunks/intl-Pse97ORk.js +1 -0
- package/dist/chunks/isObject-DaxDnPKm.js +1 -0
- package/dist/chunks/isSymbol-Dp3irZaY.js +1 -0
- package/dist/chunks/job-BXEt0izn.js +2 -0
- package/dist/chunks/json-bigint-OxRwRvup.js +8 -0
- package/dist/chunks/jsx-runtime-D-D469L8.js +1 -0
- package/dist/chunks/jws-2vqRyZtR.js +3 -0
- package/dist/chunks/jwtUtils-CpXwh_du.js +1 -0
- package/dist/chunks/keybindings-DRDgVvqz.js +2 -0
- package/dist/chunks/lang-D3ZHlfT6.js +1 -0
- package/dist/chunks/language-B_-BfBT4.js +1 -0
- package/dist/chunks/language-DcSjogBx.js +1 -0
- package/dist/chunks/launchAgentsPlatform-BPm_VMln.js +1 -0
- package/dist/chunks/launchAutofixPr-D2qac07g.js +2 -0
- package/dist/chunks/launchCommand-Du91jxMC.js +1 -0
- package/dist/chunks/launchLocalMemory-D_hBbXKE.js +3 -0
- package/dist/chunks/launchLocalVault-CPzNWvQ9.js +3 -0
- package/dist/chunks/launchMemoryStores-Djq2KhKb.js +1 -0
- package/dist/chunks/launchOnboarding-Bh6E7vdc.js +8 -0
- package/dist/chunks/launchSchedule-C988bQ-5.js +1 -0
- package/dist/chunks/launchSkillStore-DqrP6Gme.js +1 -0
- package/dist/chunks/launchTeleport-DFhybaq_.js +3 -0
- package/dist/chunks/launchVault-p_CSK4ZQ.js +1 -0
- package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
- package/dist/chunks/lib-B4Q0Nrpb.js +14 -0
- package/dist/chunks/lib-Ca3QWJjN.js +2 -0
- package/dist/chunks/lib-inCisXen.js +8 -0
- package/dist/chunks/loadAgentsDir-Ci5mr0vm.js +4601 -0
- package/dist/chunks/loadAgentsDir-vB1QEZ7H.js +1 -0
- package/dist/chunks/loadPluginHooks-xYCEZ6t5.js +1 -0
- package/dist/chunks/loadSso-sDs471GC.js +1 -0
- package/dist/chunks/localSearch-DtVqtfvk.js +1 -0
- package/dist/chunks/localSearch-Vpn6W5aY.js +1 -0
- package/dist/chunks/lockfile-DBwdlC3K.js +1 -0
- package/dist/chunks/log-CzsijfHZ.js +1 -0
- package/dist/chunks/login-D-N78G6r.js +1 -0
- package/dist/chunks/login-D9IWjvza.js +1 -0
- package/dist/chunks/logoV2Utils-SAulcC5x.js +1 -0
- package/dist/chunks/logout-CFggVS-9.js +1 -0
- package/dist/chunks/magicDocs-BfoeYhin.js +57 -0
- package/dist/chunks/main-C6be1KFk.js +31 -0
- package/dist/chunks/main-DhMlhVj3.js +1108 -0
- package/dist/chunks/mappers-uIrAj-Wd.js +1 -0
- package/dist/chunks/mcp-CAYGNxCb.js +1 -0
- package/dist/chunks/mcp-COQap0SM.js +6 -0
- package/dist/chunks/mcp-DlM0OC6R.js +2 -0
- package/dist/chunks/mcpServer-1SnOWb8_.js +1 -0
- package/dist/chunks/mcpServer-DXvS3v4x.js +1 -0
- package/dist/chunks/memoize-DNnuA2aU.js +1 -0
- package/dist/chunks/memoize-DxwLawI2.js +1 -0
- package/dist/chunks/memory-XccPLQLt.js +1 -0
- package/dist/chunks/mobile-umu5P0cM.js +2 -0
- package/dist/chunks/modalContext-CmSKRyea.js +1 -0
- package/dist/chunks/model-CbiDGGJU.js +1 -0
- package/dist/chunks/model-DdbcxKub.js +1 -0
- package/dist/chunks/normalization-Cox8C0dP.js +1 -0
- package/dist/chunks/oauth-CdZEzMww.js +1 -0
- package/dist/chunks/oauth-CmensepG.js +1 -0
- package/dist/chunks/observationStore-tvkldXUo.js +4 -0
- package/dist/chunks/onChangeAppState-Dp0JIXd8.js +1 -0
- package/dist/chunks/open-CDditBQ-.js +1 -0
- package/dist/chunks/openai-6KcHd4Hw.js +10 -0
- package/dist/chunks/openaiShared-D5lOejS1.js +16 -0
- package/dist/chunks/output-style-XDb9-2Kk.js +1 -0
- package/dist/chunks/overageCreditGrant-DYiB4sr-.js +1 -0
- package/dist/chunks/p-map-9Ud1LOrJ.js +1 -0
- package/dist/chunks/p-map-D7WEmnBE.js +1 -0
- package/dist/chunks/package-BhL7chzt.js +1 -0
- package/dist/chunks/panel-ByW1omJn.js +1 -0
- package/dist/chunks/panel-Bz_8td5D.js +1 -0
- package/dist/chunks/parseConnectUrl-BS6i9JPo.js +1 -0
- package/dist/chunks/parser-CmngCwjB.js +1 -0
- package/dist/chunks/parser-SWIZo39J.js +1 -0
- package/dist/chunks/passes-Cbc6T_Tj.js +1 -0
- package/dist/chunks/path-C4kbwvSH.js +1 -0
- package/dist/chunks/paths-Q2255dD7.js +39 -0
- package/dist/chunks/permissions-BLzPHh_3.js +3 -0
- package/dist/chunks/permissions-DXLfdE7b.js +1 -0
- package/dist/chunks/permissions-Ps_D01ZB.js +1 -0
- package/dist/chunks/pipeTransport-D7NIp3aA.js +1 -0
- package/dist/chunks/plan-DloFVJK7.js +1 -0
- package/dist/chunks/platform-CuyedWpe.js +2 -0
- package/dist/chunks/plist-BO4ZqMZc.js +6 -0
- package/dist/chunks/plugin-XR9IBPMM.js +1 -0
- package/dist/chunks/pluginAutoupdate-Cr9hP0zG.js +1 -0
- package/dist/chunks/pluginBlocklist-CM9uP8CY.js +1 -0
- package/dist/chunks/pluginCliCommands-BQkrvES5.js +1 -0
- package/dist/chunks/pluginFlagging-CJ1--2Kw.js +1 -0
- package/dist/chunks/pluginOperations-B0rLuSvo.js +2 -0
- package/dist/chunks/pluginStartupCheck-Bjdc8zhz.js +1 -0
- package/dist/chunks/pluginStartupCheck-Cu2ezD51.js +1 -0
- package/dist/chunks/plugins-BgOP_8TX.js +4 -0
- package/dist/chunks/policyLimits-CKy_gTEt.js +1 -0
- package/dist/chunks/pollConfig-DhptuhFw.js +1 -0
- package/dist/chunks/poller-Ds0Y6Cir.js +1 -0
- package/dist/chunks/poor-DF0aqXDx.js +1 -0
- package/dist/chunks/poorMode-C5Frra4j.js +1 -0
- package/dist/chunks/poorMode-DJvjO2nW.js +1 -0
- package/dist/chunks/postCommitAttribution-Ehmwzzuq.js +1 -0
- package/dist/chunks/print-CPtR0KTa.js +39 -0
- package/dist/chunks/privacy-settings-e-7lc7Un.js +1 -0
- package/dist/chunks/process-CWupreF6.js +1 -0
- package/dist/chunks/process-DMKLUQIO.js +1 -0
- package/dist/chunks/processBashCommand-D5dC6Mya.js +1 -0
- package/dist/chunks/processSlashCommand-DHRUtZ-C.js +6 -0
- package/dist/chunks/projectContext-0fpRKUeH.js +1 -0
- package/dist/chunks/projectContext-eXMSfgdZ.js +1 -0
- package/dist/chunks/prompt-4tea6NJQ.js +54 -0
- package/dist/chunks/prompt-CQC-mh6u.js +1 -0
- package/dist/chunks/prompt-DEPUnJdB.js +222 -0
- package/dist/chunks/prompt-DawxLANl.js +1 -0
- package/dist/chunks/promptEditor-Ci-h04-5.js +4 -0
- package/dist/chunks/protocolHandler-DhqM32qE.js +13 -0
- package/dist/chunks/protocols-CAyQOlkr.js +7 -0
- package/dist/chunks/proxy-CfZp-wce.js +99 -0
- package/dist/chunks/rate-limit-options-B0l29Zx8.js +1 -0
- package/dist/chunks/rcDebugLog-BbPkkigY.js +11 -0
- package/dist/chunks/referral-ByevBJrE.js +1 -0
- package/dist/chunks/refresh-B_CwwIRX.js +1 -0
- package/dist/chunks/registerProtocol-DzhaQH02.js +36 -0
- package/dist/chunks/registry-DkHA4cRu.js +1 -0
- package/dist/chunks/release-notes-CZthYkei.js +4 -0
- package/dist/chunks/releaseNotes-CwKpIsyd.js +2 -0
- package/dist/chunks/reload-plugins-DxWfXvrN.js +1 -0
- package/dist/chunks/remote-env-BiRLWIrh.js +1 -0
- package/dist/chunks/remoteBridgeCore-nz1fPY1U.js +1 -0
- package/dist/chunks/remoteControlServer-FzLUxh2B.js +3 -0
- package/dist/chunks/rename-DmGuyncE.js +1 -0
- package/dist/chunks/renderOptions-BiyC2rj1.js +1 -0
- package/dist/chunks/resume-7GeU7RMS.js +2 -0
- package/dist/chunks/rewind-CXplHgh_.js +1 -0
- package/dist/chunks/rollback-DbSpxmJE.js +11 -0
- package/dist/chunks/runtimeObserver-Duod-ign.js +10 -0
- package/dist/chunks/runtimeObserver-OgM9ZYxZ.js +1 -0
- package/dist/chunks/sandbox-adapter-CxkhKgaa.js +1 -0
- package/dist/chunks/sandbox-toggle-Cc96R6Ox.js +1 -0
- package/dist/chunks/sanitization-CYp-9DbE.js +1 -0
- package/dist/chunks/satisfies-BaHgd_ie.js +1 -0
- package/dist/chunks/schemas-BGAvj1T4.js +40 -0
- package/dist/chunks/sdk-DEtgRZvI.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor--fevrC5z.js +1 -0
- package/dist/chunks/searchExtraTools-DQ6e601b.js +1 -0
- package/dist/chunks/semver-Cq33BYay.js +1 -0
- package/dist/chunks/semver-Tw0AFar5.js +1 -0
- package/dist/chunks/sentry-BUHYuYGj.js +13 -0
- package/dist/chunks/server-C5XZSlto.js +1 -0
- package/dist/chunks/server-DzOdtq8A.js +1 -0
- package/dist/chunks/serverBanner-WlSYP-f8.js +1 -0
- package/dist/chunks/serverLog-DtsUvDiY.js +1 -0
- package/dist/chunks/session-DgLqm7ZI.js +2 -0
- package/dist/chunks/sessionDataUploader-Ctjo1bgR.js +1 -0
- package/dist/chunks/sessionDiscovery-DgNea6qa.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-7Svz-7S-.js +1 -0
- package/dist/chunks/sessionManager-Dw72ZUTg.js +1 -0
- package/dist/chunks/sessionMemory-DIrR3zvb.js +1 -0
- package/dist/chunks/sessionMemory-_dmj8lcH.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BdQtSkRx.js +1 -0
- package/dist/chunks/sessionObserver-CuWMVPlT.js +20 -0
- package/dist/chunks/sessionObserver-_adufOGQ.js +1 -0
- package/dist/chunks/sessionStorage-W7okgAlQ.js +1 -0
- package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +3 -0
- package/dist/chunks/sessionTitle-DzkMzHer.js +14 -0
- package/dist/chunks/sessionTracing-DTjmc0EF.js +11 -0
- package/dist/chunks/settingsSync-CfYDkakY.js +1 -0
- package/dist/chunks/setup-BKUG46jQ.js +9 -0
- package/dist/chunks/setup-CmLngvpJ.js +1 -0
- package/dist/chunks/setup-TqJ7-Nxh.js +2 -0
- package/dist/chunks/shadowedRuleDetection-DesT0yKM.js +1 -0
- package/dist/chunks/shellQuote-DgjT8KBA.js +1 -0
- package/dist/chunks/sideQuestion-BAq0YyKY.js +20 -0
- package/dist/chunks/signin-QEeYpJZw.js +1 -0
- package/dist/chunks/sink-B3uP8Cf8.js +1 -0
- package/dist/chunks/sink-CaWMZBw_.js +1 -0
- package/dist/chunks/sinks-COcy5GnB.js +2 -0
- package/dist/chunks/sinks-oFfsKySL.js +1 -0
- package/dist/chunks/skill-learning-DOIMPtWE.js +5 -0
- package/dist/chunks/skillChangeDetector-CA_Tdx8N.js +1 -0
- package/dist/chunks/skillGapStore-CWuw1dYh.js +1 -0
- package/dist/chunks/skillGapStore-DpEoKhn-.js +5 -0
- package/dist/chunks/skillGenerator-9y3Q4YoO.js +8 -0
- package/dist/chunks/skillLearning-BhM09bQD.js +1 -0
- package/dist/chunks/skillLearning-_o2D06yM.js +1 -0
- package/dist/chunks/skillPanel-Dt24mZTZ.js +28 -0
- package/dist/chunks/skillSearchPanel-gaXN64Fu.js +21 -0
- package/dist/chunks/skills-Dx3dMHYk.js +1 -0
- package/dist/chunks/slashCommandParsing-Cari0pNg.js +1 -0
- package/dist/chunks/sleep-8Eb9j_Ly.js +1 -0
- package/dist/chunks/sprites-5OAB-Ui2.js +1 -0
- package/dist/chunks/src-BIPP3_mo.js +26 -0
- package/dist/chunks/src-BJz1KAd_.js +6 -0
- package/dist/chunks/src-BRAdBA8A.js +1 -0
- package/dist/chunks/src-BRC_BuUP.js +1 -0
- package/dist/chunks/src-BaB-bpCj.js +5 -0
- package/dist/chunks/src-BlLavFUS.js +7 -0
- package/dist/chunks/src-C5yhFG0C.js +19 -0
- package/dist/chunks/src-CI_jaaBj.js +2 -0
- package/dist/chunks/src-CRsA-Z4y.js +1 -0
- package/dist/chunks/src-CYLfL70h.js +1 -0
- package/dist/chunks/src-DJXCzwyJ.js +1 -0
- package/dist/chunks/src-DJXKJavk.js +1 -0
- package/dist/chunks/src-Di342QoJ.js +53 -0
- package/dist/chunks/src-DsMd9Q9e.js +2 -0
- package/dist/chunks/src-DzH9IdOo.js +1 -0
- package/dist/chunks/src-hdbPEvzO.js +9 -0
- package/dist/chunks/src-poaoYkuc.js +1 -0
- package/dist/chunks/src-x7u_sB6m.js +1 -0
- package/dist/chunks/sso-oidc-BX1MlBX0.js +1 -0
- package/dist/chunks/startupProfiler-DnXZaX4A.js +3 -0
- package/dist/chunks/startupProfiler-SOE--nM9.js +1 -0
- package/dist/chunks/state-B2GIOsTB.js +1 -0
- package/dist/chunks/state-Ce1HlR-H.js +1 -0
- package/dist/chunks/state-sIHsFpDu.js +1 -0
- package/dist/chunks/staticRender-Br64h1E1.js +1 -0
- package/dist/chunks/stats-TUExo9iU.js +1 -0
- package/dist/chunks/status-Dghaz1my.js +1 -0
- package/dist/chunks/statusNoticeHelpers-DVZSSXeK.js +1 -0
- package/dist/chunks/stdio-BEEzuxaZ.js +1 -0
- package/dist/chunks/stdio-D4cT86R0.js +3 -0
- package/dist/chunks/stickers-2K05wjSp.js +1 -0
- package/dist/chunks/store-DhI7Lcan.js +1 -0
- package/dist/chunks/sts-BDFJ-6QE.js +1 -0
- package/dist/chunks/subprocessEnv-CggQWZCx.js +1 -0
- package/dist/chunks/subprocessEnv-DV6q6o6w.js +1 -0
- package/dist/chunks/supports-color-lkzOMQ6u.js +1 -0
- package/dist/chunks/systemPromptSections-BcN_XBTx.js +1 -0
- package/dist/chunks/systemPromptSections-DB93ZNWP.js +1 -0
- package/dist/chunks/systemTheme-dDbitcxB.js +1 -0
- package/dist/chunks/tag-ZcVkzFjz.js +11 -0
- package/dist/chunks/tasks-DbB33ekt.js +1 -0
- package/dist/chunks/teamHelpers-BmN9nKz-.js +1 -0
- package/dist/chunks/teamHelpers-yeTNtZbb.js +1 -0
- package/dist/chunks/teammate-DMYOtLTK.js +1 -0
- package/dist/chunks/teammateModeSnapshot-CPjJJDL1.js +1 -0
- package/dist/chunks/teammateModeSnapshot-CsNIJTKi.js +1 -0
- package/dist/chunks/teleport-JHgpwZIh.js +1 -0
- package/dist/chunks/templateJobs-Db630FZD.js +12 -0
- package/dist/chunks/terminalSetup-DJqWE8fc.js +33 -0
- package/dist/chunks/terminalSetup-ygKHrVKR.js +1 -0
- package/dist/chunks/theme-MmfFhdTD.js +1 -0
- package/dist/chunks/thinkback-CrNirB0V.js +1 -0
- package/dist/chunks/thinkback-Quc7KPmi.js +1 -0
- package/dist/chunks/thinkback-play-CQ1s7oqg.js +1 -0
- package/dist/chunks/tmux-CvbhsfwG.js +1 -0
- package/dist/chunks/toolEventObserver-BqMplcIk.js +1 -0
- package/dist/chunks/toolEventObserver-DBq2XBYY.js +1 -0
- package/dist/chunks/toolPool-BkCtTKXz.js +1 -0
- package/dist/chunks/toolPool-C7bOwJfR.js +1 -0
- package/dist/chunks/trustedDevice-C9Zevohz.js +1 -0
- package/dist/chunks/trustedDevice-DEuQUTbz.js +1 -0
- package/dist/chunks/tui-BVc2q4Xv.js +6 -0
- package/dist/chunks/turndown.es-Bv06VjMb.js +69 -0
- package/dist/chunks/types-CQ1wrnQ0.js +1 -0
- package/dist/chunks/types-Csi32ZXh.js +17 -0
- package/dist/chunks/types-RJTEOuIt.js +3 -0
- package/dist/chunks/udsClient-BvG_Jip0.js +1 -0
- package/dist/chunks/ultrareviewCommand-DrlfRrXq.js +3 -0
- package/dist/chunks/undercover-CBeHiWUd.js +1 -0
- package/dist/chunks/undercover-DKn95mh9.js +31 -0
- package/dist/chunks/up-D-U4wUCe.js +12 -0
- package/dist/chunks/updateCCB-CJ7dCUan.js +11 -0
- package/dist/chunks/upgrade-Degqbu8S.js +1 -0
- package/dist/chunks/upgrade-ucJ-lnlY.js +1 -0
- package/dist/chunks/upload-pTZQCPLt.js +1 -0
- package/dist/chunks/upstreamproxy-DcLeL2XX.js +11 -0
- package/dist/chunks/usage-D96a7Cke.js +1 -0
- package/dist/chunks/usage-DVQMUMcC.js +1 -0
- package/dist/chunks/useKeybinding-FsOnjW6T.js +1 -0
- package/dist/chunks/useMainLoopModel-B7ch2o9K.js +1 -0
- package/dist/chunks/useManagePlugins-BfGzHMvO.js +1 -0
- package/dist/chunks/useMergedTools-TemEvCrX.js +1 -0
- package/dist/chunks/useSearchInput-B-V4kIa-.js +1 -0
- package/dist/chunks/useSettingsErrors-B2JGz1s8.js +1 -0
- package/dist/chunks/useVoice-BuwYDm2U.js +1 -0
- package/dist/chunks/util-CeIKZmj9.js +1 -0
- package/dist/chunks/utils-CwhszpkT.js +1 -0
- package/dist/chunks/v4-f1i_CNUT.js +1 -0
- package/dist/chunks/validatePlugin-BlVho93x.js +1 -0
- package/dist/chunks/vertex-sdk-CSGw3fvU.js +9 -0
- package/dist/chunks/vim-DUZQCWUP.js +1 -0
- package/dist/chunks/voice-BkRIHZiM.js +2 -0
- package/dist/chunks/voice-DXiiy8HX.js +8 -0
- package/dist/chunks/voiceModeEnabled-CPQUE3PU.js +1 -0
- package/dist/chunks/voiceModeEnabled-DB8GCzAF.js +1 -0
- package/dist/chunks/voiceStreamSTT-DgoDscHn.js +1 -0
- package/dist/chunks/voiceStreamSTT-Dr_wH1Kh.js +1 -0
- package/dist/chunks/which-DqSAIvp2.js +1 -0
- package/dist/chunks/windowsPaths-C9CigqoF.js +1 -0
- package/dist/chunks/windowsPaths-swxCp7bX.js +2 -0
- package/dist/chunks/workSecret-mS2OrpxF.js +1 -0
- package/dist/chunks/workerRegistry-CT7_kjvY.js +1 -0
- package/dist/chunks/worktree-DU3xtwKW.js +1 -0
- package/dist/chunks/worktreeModeEnabled-Db6b_Iy_.js +1 -0
- package/dist/chunks/worktreeModeEnabled-THQb19xR.js +1 -0
- package/dist/chunks/wrapper-BSK0MCQH.js +1 -0
- package/dist/chunks/wrapper-D5qL1aQL.js +6 -0
- package/dist/chunks/xdg-CBxMmQux.js +1 -0
- package/dist/chunks/xml-DD_ldd3X.js +1 -0
- package/dist/chunks/zod-DT6hytkp.js +1 -0
- package/dist/cli.js +1 -10934
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-gfT9mM8P.js";import{Ct as i,Rn as a,b as o,f as s,g as c,h as l,t as u,tt as d,wt as f,x as p}from"./src-Di342QoJ.js";import{t as m}from"./jsx-runtime-D-D469L8.js";import{B as h,Dx as g,JS as _,Nx as v,Ox as y,Px as b,R as x,YS as S,z as C}from"./loadAgentsDir-Ci5mr0vm.js";import{t as w}from"./useKeybinding-FsOnjW6T.js";import{r as T,t as E}from"./directoryCompletion-DP_4B1GL.js";import{r as D,t as O}from"./PromptInputFooterSuggestions-D4lMVCqj.js";function k(){return(0,P.jsx)(o,{dimColor:!0,children:`Claude Code will be able to read files in this directory and make edits when auto-accept edits is on.`})}function A({path:e}){return(0,P.jsxs)(p,{flexDirection:`column`,paddingX:2,gap:1,children:[(0,P.jsx)(o,{color:`permission`,children:e}),(0,P.jsx)(k,{})]})}function j({value:e,onChange:t,onSubmit:n,error:i,suggestions:a,selectedSuggestion:s}){return(0,P.jsxs)(p,{flexDirection:`column`,children:[(0,P.jsx)(o,{children:`Enter the path to the directory:`}),(0,P.jsx)(p,{borderDimColor:!0,borderStyle:`round`,marginY:1,paddingLeft:1,children:(0,P.jsx)(v,{showCursor:!0,placeholder:`Directory path${r.ellipsis}`,value:e,onChange:t,onSubmit:n,columns:80,cursorOffset:e.length,onChangeCursorOffset:()=>{}})}),a.length>0&&(0,P.jsx)(p,{marginBottom:1,children:(0,P.jsx)(O,{suggestions:a,selectedSuggestion:s})}),i&&(0,P.jsx)(o,{color:`error`,children:i})]})}function M({onAddDirectory:e,onCancel:t,permissionContext:n,directoryPath:r}){let[i,a]=(0,N.useState)(``),[u,m]=(0,N.useState)(null),[v,y]=(0,N.useState)([]),[b,S]=(0,N.useState)(0),C=(0,N.useMemo)(()=>F,[]),w=f((0,N.useCallback)(async e=>{if(!e){y([]),S(0);return}y(await E(e)),S(0)},[]),100);(0,N.useEffect)(()=>{w(i)},[i,w]);let T=(0,N.useCallback)(e=>{a(e.id+`/`),m(null)},[]),D=(0,N.useCallback)(async t=>{let r=await h(t,n);r.resultType===`success`?e(r.absolutePath,!1):m(x(r))},[n,e]);d(`confirm:no`,t,{context:`Settings`});let O=(0,N.useCallback)(e=>{if(v.length>0){if(e.key===`tab`){e.preventDefault();let t=v[b];t&&T(t);return}if(e.key===`return`){e.preventDefault();let t=v[b];t&&D(t.id+`/`);return}if(e.key===`up`||e.ctrl&&e.key===`p`){e.preventDefault(),S(e=>e<=0?v.length-1:e-1);return}if(e.key===`down`||e.ctrl&&e.key===`n`){e.preventDefault(),S(e=>e>=v.length-1?0:e+1);return}}},[v,b,T,D]),M=(0,N.useCallback)(n=>{if(r)switch(n){case`yes-session`:e(r,!1);break;case`yes-remember`:e(r,!0);break;case`no`:t();break}},[r,e,t]);return(0,P.jsx)(p,{flexDirection:`column`,tabIndex:0,autoFocus:!0,onKeyDown:O,children:(0,P.jsx)(s,{title:`Add directory to workspace`,onCancel:t,color:`permission`,isCancelActive:!1,inputGuide:r?void 0:e=>e.pending?(0,P.jsxs)(o,{children:[`Press `,e.keyName,` again to exit`]}):(0,P.jsxs)(l,{children:[(0,P.jsx)(c,{shortcut:`Tab`,action:`complete`}),(0,P.jsx)(c,{shortcut:`Enter`,action:`add`}),(0,P.jsx)(_,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]}),children:r?(0,P.jsxs)(p,{flexDirection:`column`,gap:1,children:[(0,P.jsx)(A,{path:r}),(0,P.jsx)(g,{options:C,onChange:M,onCancel:()=>M(`no`)})]}):(0,P.jsxs)(p,{flexDirection:`column`,gap:1,marginX:2,children:[(0,P.jsx)(k,{}),(0,P.jsx)(j,{value:i,onChange:a,onSubmit:D,error:u,suggestions:v,selectedSuggestion:b})]})})})}var N,P,F,I=e((()=>{n(),a(),N=t(a(),1),i(),C(),b(),u(),w(),T(),S(),y(),D(),P=m(),F=[{value:`yes-session`,label:`Yes, for this session`},{value:`yes-remember`,label:`Yes, and remember this directory`},{value:`no`,label:`No`}]}));export{I as n,M as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DR8-3Aex.js";import{Rn as e,S as t,t as n}from"./src-Di342QoJ.js";import{t as r}from"./jsx-runtime-D-D469L8.js";import{Ac as i,Pc as a,Sc as o}from"./paths-Q2255dD7.js";import{AS as s,jS as c}from"./loadAgentsDir-Ci5mr0vm.js";import{n as l}from"./onChangeAppState-Dp0JIXd8.js";import{t as u}from"./fpsMetrics-DeezdcwV.js";import{t as d}from"./stats-TUExo9iU.js";e(),c(),n(),i();var f=r();function p({getFpsMetrics:e,stats:n,initialState:r,children:i}){return(0,f.jsx)(u,{getFpsMetrics:e,children:(0,f.jsx)(d,{store:n,children:(0,f.jsx)(s,{initialState:r,onChangeAppState:l,children:(0,f.jsx)(t,{initialState:o().theme,onThemeSave:e=>a(t=>({...t,theme:e})),children:i})})})})}export{p as App};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DR8-3Aex.js";import{Rn as e,b as t,f as n,t as r}from"./src-Di342QoJ.js";import{t as i}from"./jsx-runtime-D-D469L8.js";import{Ac as a,Pc as o}from"./paths-Q2255dD7.js";import{Dx as s,cy as c}from"./loadAgentsDir-Ci5mr0vm.js";e(),r(),a(),c();var l=i();function u({customApiKeyTruncated:e,onDone:r}){function i(t){switch(t){case`yes`:o(t=>({...t,customApiKeyResponses:{...t.customApiKeyResponses,approved:[...t.customApiKeyResponses?.approved??[],e]}})),r(!0);break;case`no`:o(t=>({...t,customApiKeyResponses:{...t.customApiKeyResponses,rejected:[...t.customApiKeyResponses?.rejected??[],e]}})),r(!1);break}}return(0,l.jsxs)(n,{title:`Detected a custom API key in your environment`,color:`warning`,onCancel:()=>i(`no`),children:[(0,l.jsxs)(t,{children:[(0,l.jsx)(t,{bold:!0,children:`ANTHROPIC_API_KEY`}),(0,l.jsxs)(t,{children:[`: sk-ant-...`,e]})]}),(0,l.jsx)(t,{children:`Do you want to use this API key?`}),(0,l.jsx)(s,{defaultValue:`no`,defaultFocusValue:`no`,options:[{label:`Yes`,value:`yes`},{label:(0,l.jsxs)(t,{children:[`No (`,(0,l.jsx)(t,{bold:!0,children:`recommended`}),`)`]}),value:`no`}],onChange:e=>i(e),onCancel:()=>i(`no`)})]})}export{u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ApproveApiKey-DWa-XTLb.js";export{e as ApproveApiKey};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,d as r,f as i,nt as a,t as o,x as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{Mx as l,kx as u}from"./loadAgentsDir-Ci5mr0vm.js";import{t as d}from"./useKeybinding-FsOnjW6T.js";import{t as f}from"./Dialog-DYFGqyDs.js";import{t as p}from"./ListItem-OFARanN7.js";var m=e(t(),1);o(),f(),p(),u(),d();var h=c();function g({sessions:e,onSelect:t,onCancel:o}){l(`assistant-session-chooser`);let[c,u]=(0,m.useState)(0);return a({"select:next":()=>u(t=>(t+1)%e.length),"select:previous":()=>u(t=>(t-1+e.length)%e.length),"select:accept":()=>t(e[c].id)},{context:`Select`}),(0,h.jsx)(i,{title:`Select Assistant Session`,onCancel:o,hideInputGuide:!0,children:(0,h.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,h.jsx)(n,{children:`Multiple sessions found. Select one to attach:`}),(0,h.jsx)(s,{flexDirection:`column`,children:e.map((e,t)=>(0,h.jsx)(r,{isFocused:c===t,children:(0,h.jsxs)(s,{children:[(0,h.jsx)(n,{children:e.title||e.id.slice(0,20)}),(0,h.jsxs)(n,{dimColor:!0,children:[` [`,e.status,`]`]})]})},e.id))}),(0,h.jsx)(n,{dimColor:!0,children:`↑↓ navigate · Enter select · Esc cancel`})]})})}export{g as AssistantSessionChooser};
|
|
@@ -0,0 +1,2 @@
|
|
|
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-Q2255dD7.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-Ci5mr0vm.js";import{Bn as ot,Vn as st,Xt as ct,tn as lt,zn as ut}from"./prompt-DEPUnJdB.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-uIrAj-Wd.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};
|
|
@@ -0,0 +1 @@
|
|
|
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-Q2255dD7.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-Ci5mr0vm.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};
|
|
@@ -0,0 +1 @@
|
|
|
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,xt as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ac as u,Pc as d}from"./paths-Q2255dD7.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{n as m,t as h}from"./setup-BKUG46jQ.js";var g=e(r(),1);f(),o(),h(),u();var _=l(),v=`https://claude.ai/chrome`,y=`https://clau.de/chrome/permissions`;function b({onDone:e}){let[r,o]=g.useState(!1);return g.useEffect(()=>{p(`tengu_claude_in_chrome_onboarding_shown`,{}),m().then(o),d(e=>({...e,hasCompletedClaudeInChromeOnboarding:!0}))},[]),c((t,n)=>{n.return&&e()}),(0,_.jsx)(a,{title:`Claude in Chrome (Beta)`,onCancel:e,color:`chromeYellow`,children:(0,_.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,_.jsxs)(i,{children:[`Claude in Chrome works with the Chrome extension to let you control your browser directly from Claude Code. You can navigate websites, fill forms, capture screenshots, record GIFs, and debug with console logs and network requests.`,!r&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(t,{}),(0,_.jsx)(t,{}),`Requires the Chrome extension. Get started at `,(0,_.jsx)(n,{url:v})]})]}),(0,_.jsxs)(i,{dimColor:!0,children:[`Site-level permissions are inherited from the Chrome extension. Manage permissions in the Chrome extension settings to control which sites Claude can browse, click, and type on`,r&&(0,_.jsxs)(_.Fragment,{children:[` `,`(`,(0,_.jsx)(n,{url:y}),`)`]}),`.`]}),(0,_.jsxs)(i,{dimColor:!0,children:[`For more info, use`,` `,(0,_.jsx)(i,{bold:!0,color:`chromeYellow`,children:`/chrome`}),` `,`or visit `,(0,_.jsx)(n,{url:`https://code.claude.com/docs/en/chrome`})]})]})})}export{b as ClaudeInChromeOnboarding};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./ClaudeMdExternalIncludesDialog-Bz0JyaOG.js";e();export{t as ClaudeMdExternalIncludesDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{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{Ac as l,Nc as u}from"./paths-Q2255dD7.js";import{n as d,r as f}from"./analytics-DqMQntaB.js";import{Dx as p,cy as m}from"./loadAgentsDir-Ci5mr0vm.js";function h({onDone:e,isStandaloneDialog:t,externalIncludes:r}){g.useEffect(()=>{f(`tengu_claude_md_includes_dialog_shown`,{})},[]);let o=(0,g.useCallback)(t=>{t===`no`?(f(`tengu_claude_md_external_includes_dialog_declined`,{}),u(e=>({...e,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!0}))):(f(`tengu_claude_md_external_includes_dialog_accepted`,{}),u(e=>({...e,hasClaudeMdExternalIncludesApproved:!0,hasClaudeMdExternalIncludesWarningShown:!0}))),e()},[e]);return(0,_.jsxs)(a,{title:`Allow external CLAUDE.md file imports?`,color:`warning`,onCancel:(0,g.useCallback)(()=>{o(`no`)},[o]),hideBorder:!t,hideInputGuide:!t,children:[(0,_.jsx)(i,{children:`This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party repositories.`}),r&&r.length>0&&(0,_.jsxs)(s,{flexDirection:`column`,children:[(0,_.jsx)(i,{dimColor:!0,children:`External imports:`}),r.map((e,t)=>(0,_.jsxs)(i,{dimColor:!0,children:[` `,e.path]},t))]}),(0,_.jsxs)(i,{dimColor:!0,children:[`Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks`,` `,(0,_.jsx)(n,{url:`https://code.claude.com/docs/en/security`}),` `]}),(0,_.jsx)(p,{options:[{label:`Yes, allow external imports`,value:`yes`},{label:`No, disable external imports`,value:`no`}],onChange:e=>o(e)})]})}var g,_,v=e((()=>{g=t(r(),1),d(),o(),l(),m(),_=c()}));export{v as n,h as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dy as e,fy as t}from"./loadAgentsDir-Ci5mr0vm.js";t();export{e as ConsoleOAuthFlow};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{t as n}from"./semver-Cq33BYay.js";import{Rn as r,b as i,l as a,t as o,x as s,xt as c}from"./src-Di342QoJ.js";import{t as l}from"./jsx-runtime-D-D469L8.js";import{Ct as u,cn as d}from"./state-sIHsFpDu.js";import{al as f,el as p}from"./paths-Q2255dD7.js";import{L as m,V as h,d as g,s as _}from"./debug-UI3T040K.js";import{n as v,t as y}from"./cwd--iizewsn.js";import{r as b,t as x}from"./execFileNoThrow-CuQN1sz8.js";import{Ar as S,GT as C,qT as w,ur as T}from"./loadAgentsDir-Ci5mr0vm.js";import{n as E,t as D}from"./browser-fLRXxIsQ.js";import{n as O,r as k}from"./semver-Tw0AFar5.js";import{join as A}from"path";import{readdir as j}from"fs/promises";function M(){let e=[process.argv[1]||``,process.execPath||``],t=[`/build-ant/`,`/build-ant-native/`,`/build-external/`,`/build-external-native/`];return e.some(e=>t.some(t=>e.includes(t)))}function N(e){let t=M()?`claude-dev`:`claude`,n=new URL(`${t}://resume`);return n.searchParams.set(`session`,e),n.searchParams.set(`cwd`,y()),n.toString()}async function P(){if(M())return!0;let e=process.platform;if(e===`darwin`)return f(`/Applications/Claude.app`);if(e===`linux`){let{code:e,stdout:t}=await x(`xdg-mime`,[`query`,`default`,`x-scheme-handler/claude`]);return e===0&&t.trim().length>0}else if(e===`win32`){let{code:e}=await x(`reg`,[`query`,`HKEY_CLASSES_ROOT\\claude`,`/ve`]);return e===0}return!1}async function F(){let e=process.platform;if(e===`darwin`){let{code:e,stdout:t}=await x(`defaults`,[`read`,`/Applications/Claude.app/Contents/Info.plist`,`CFBundleShortVersionString`]);if(e!==0)return null;let n=t.trim();return n.length>0?n:null}else if(e===`win32`){let e=process.env.LOCALAPPDATA;if(!e)return null;let t=A(e,`AnthropicClaude`);try{let e=(await j(t)).filter(e=>e.startsWith(`app-`)).map(e=>e.slice(4)).filter(e=>(0,z.coerce)(e)!==null).sort((e,t)=>{let n=(0,z.coerce)(e),r=(0,z.coerce)(t);return n.compare(r)});return e.length>0?e[e.length-1]:null}catch{return null}}return null}async function I(){if(!await P())return{status:`not-installed`};let e;try{e=await F()}catch{return{status:`ready`,version:`unknown`}}if(!e)return{status:`ready`,version:`unknown`};let t=(0,z.coerce)(e);return!t||!O(t.version,B)?{status:`version-too-old`,version:e}:{status:`ready`,version:e}}async function L(e){let t=process.platform;if(g(`Opening deep link: ${e}`),t===`darwin`){if(M()){let{code:t}=await x(`osascript`,[`-e`,`tell application "Electron" to open location "${e}"`]);return t===0}let{code:t}=await x(`open`,[e]);return t===0}else if(t===`linux`){let{code:t}=await x(`xdg-open`,[e]);return t===0}else if(t===`win32`){let{code:t}=await x(`cmd`,[`/c`,`start`,``,e]);return t===0}return!1}async function R(){let e=u();if(!await P())return{success:!1,error:`Claude Desktop is not installed. Install it from https://claude.ai/download`};let t=N(e);return await L(t)?{success:!0,deepLinkUrl:t}:{success:!1,error:`Failed to open Claude Desktop. Please try opening it manually.`,deepLinkUrl:t}}var z,B,V=e((()=>{z=n(),d(),v(),_(),b(),p(),k(),B=`1.1.2396`}));function H(){switch(process.platform){case`win32`:return`https://claude.ai/api/desktop/win32/x64/exe/latest/redirect`;default:return`https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect`}}function U({onDone:e}){let[t,n]=(0,W.useState)(`checking`),[r,o]=(0,W.useState)(null),[l,u]=(0,W.useState)(``);return c(n=>{if(t===`error`){e(r??`Unknown error`,{display:`system`});return}t===`prompt-download`&&(n===`y`||n===`Y`?(E(H()).catch(()=>{}),e(`Starting download. Re-run /desktop once you\u2019ve installed the app.\nLearn more at ${K}`,{display:`system`})):(n===`n`||n===`N`)&&e(`The desktop app is required for /desktop. Learn more at ${K}`,{display:`system`}))}),(0,W.useEffect)(()=>{async function t(){n(`checking`);let t=await I();if(t.status===`not-installed`){u(`Claude Desktop is not installed.`),n(`prompt-download`);return}if(t.status===`version-too-old`){u(`Claude Desktop needs to be updated (found v${t.version}, need v1.1.2396+).`),n(`prompt-download`);return}n(`flushing`),await T(),n(`opening`);let r=await R();if(!r.success){o(r.error??`Failed to open Claude Desktop`),n(`error`);return}n(`success`),setTimeout(async e=>{e(`Session transferred to Claude Desktop`,{display:`system`}),await C(0,`other`)},500,e)}t().catch(e=>{o(m(e)),n(`error`)})},[e]),t===`error`?(0,G.jsxs)(s,{flexDirection:`column`,paddingX:2,children:[(0,G.jsxs)(i,{color:`error`,children:[`Error: `,r]}),(0,G.jsx)(i,{dimColor:!0,children:`Press any key to continue…`})]}):t===`prompt-download`?(0,G.jsxs)(s,{flexDirection:`column`,paddingX:2,children:[(0,G.jsx)(i,{children:l}),(0,G.jsx)(i,{children:`Download now? (y/n)`})]}):(0,G.jsx)(a,{message:{checking:`Checking for Claude Desktop…`,flushing:`Saving session…`,opening:`Opening Claude Desktop…`,success:`Opening in Claude Desktop…`}[t]})}var W,G,K,q=e((()=>{W=t(r(),1),o(),V(),D(),h(),w(),S(),G=l(),K=`https://clau.de/desktop`}));export{q as n,U as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,f as r,t as i,x as a}from"./src-Di342QoJ.js";import{t as o}from"./jsx-runtime-D-D469L8.js";import{Dx as s,KT as c,cy as l,qT as u}from"./loadAgentsDir-Ci5mr0vm.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./src-Di342QoJ.js";var n=e((()=>{t()}));export{n as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
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-Q2255dD7.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-Ci5mr0vm.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./Doctor-CE_jL9jC.js";e();export{t as Doctor};
|
|
@@ -0,0 +1,3 @@
|
|
|
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-Q2255dD7.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-Ci5mr0vm.js";import{t as ge}from"./useKeybinding-FsOnjW6T.js";import{l as _e,u as ve}from"./referral-ByevBJrE.js";import{a as K,i as ye}from"./xdg-CBxMmQux.js";import{n as be,t as xe}from"./McpParsingWarnings-DZkzoeZf.js";import{n as Se,t as Ce}from"./PressEnterToContinue-BdA9zDGs.js";import{n as we,t as Te}from"./ValidationErrorsList-1k1qbsRo.js";import{n as Ee,t as De}from"./useSettingsErrors-B2JGz1s8.js";import{n as Oe,t as ke}from"./shadowedRuleDetection-DesT0yKM.js";import{n as Ae,r as je,t as q}from"./statusNoticeHelpers-DVZSSXeK.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{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{Cl as l,wl as u}from"./paths-Q2255dD7.js";import{d,s as f}from"./debug-UI3T040K.js";import{n as p,r as m}from"./analytics-DqMQntaB.js";import{r as h,t as g}from"./execFileNoThrow-CuQN1sz8.js";import{Ar as _,Dt as v,Dx as y,Et as b,GT as x,Hm as S,Hv as C,Ox as w,Um as T,Vv as E,gy as D,mt as O,my as k,qT as A,wi as j,wt as M,xt as N}from"./loadAgentsDir-Ci5mr0vm.js";function P(){(_(),e(j)).saveWorktreeState(null)}function F({onDone:e,onCancel:t}){let[n,r]=(0,I.useState)(`loading`),[o,c]=(0,I.useState)([]),[l,u]=(0,I.useState)(0),[f,p]=(0,I.useState)(),h=N();if((0,I.useEffect)(()=>{async function e(){let e=[],t=await g(`git`,[`status`,`--porcelain`]);if(t.stdout&&(e=t.stdout.split(`
|
|
2
|
+
`).filter(e=>e.trim()!==``),c(e)),h){let{stdout:t}=await g(`git`,[`rev-list`,`--count`,`${h.originalHeadCommit}..HEAD`]),n=parseInt(t.trim(),10)||0;if(u(n),e.length===0&&n===0){r(`removing`),O().then(()=>{process.chdir(h.originalCwd),T(h.originalCwd),P(),E.cache.clear?.(),p(`Worktree removed (no changes)`)}).catch(e=>{d(`Failed to clean up worktree: ${e}`,{level:`error`}),p(`Worktree cleanup failed, exiting anyway`)}).then(()=>{r(`done`)});return}else r(`asking`)}}e()},[h]),(0,I.useEffect)(()=>{n===`done`&&e(f)},[n,e,f]),!h)return e(`No active worktree session found`,{display:`system`}),null;if(n===`loading`||n===`done`)return null;async function _(e){if(!h)return;let t=!!h.tmuxSessionName;if(e===`keep`||e===`keep-with-tmux`)r(`keeping`),m(`tengu_worktree_kept`,{commits:l,changed_files:o.length}),await b(),process.chdir(h.originalCwd),T(h.originalCwd),P(),E.cache.clear?.(),p(t?`Worktree kept. Your work is saved at ${h.worktreePath} on branch ${h.worktreeBranch}. Reattach to tmux session with: tmux attach -t ${h.tmuxSessionName}`:`Worktree kept. Your work is saved at ${h.worktreePath} on branch ${h.worktreeBranch}`),r(`done`);else if(e===`keep-kill-tmux`)r(`keeping`),m(`tengu_worktree_kept`,{commits:l,changed_files:o.length}),h.tmuxSessionName&&await v(h.tmuxSessionName),await b(),process.chdir(h.originalCwd),T(h.originalCwd),P(),E.cache.clear?.(),p(`Worktree kept at ${h.worktreePath} on branch ${h.worktreeBranch}. Tmux session terminated.`),r(`done`);else if(e===`remove`||e===`remove-with-tmux`){r(`removing`),m(`tengu_worktree_removed`,{commits:l,changed_files:o.length}),h.tmuxSessionName&&await v(h.tmuxSessionName);try{await O(),process.chdir(h.originalCwd),T(h.originalCwd),P(),E.cache.clear?.()}catch(e){d(`Failed to clean up worktree: ${e}`,{level:`error`}),p(`Worktree cleanup failed, exiting anyway`),r(`done`);return}let e=t?` Tmux session terminated.`:``;l>0&&o.length>0?p(`Worktree removed. ${l} ${l===1?`commit`:`commits`} and uncommitted changes were discarded.${e}`):l>0?p(`Worktree removed. ${l} ${l===1?`commit`:`commits`} on ${h.worktreeBranch} ${l===1?`was`:`were`} discarded.${e}`):o.length>0?p(`Worktree removed. Uncommitted changes were discarded.${e}`):p(`Worktree removed.${e}`),r(`done`)}}if(n===`keeping`)return(0,L.jsxs)(s,{flexDirection:`row`,marginY:1,children:[(0,L.jsx)(k,{}),(0,L.jsx)(i,{children:`Keeping worktree…`})]});if(n===`removing`)return(0,L.jsxs)(s,{flexDirection:`row`,marginY:1,children:[(0,L.jsx)(k,{}),(0,L.jsx)(i,{children:`Removing worktree…`})]});let x=h.worktreeBranch,S=o.length>0,C=l>0,w=``;w=S&&C?`You have ${o.length} uncommitted ${o.length===1?`file`:`files`} and ${l} ${l===1?`commit`:`commits`} on ${x}. All will be lost if you remove.`:S?`You have ${o.length} uncommitted ${o.length===1?`file`:`files`}. These will be lost if you remove the worktree.`:C?`You have ${l} ${l===1?`commit`:`commits`} on ${x}. The branch will be deleted if you remove the worktree.`:`You are working in a worktree. Keep it to continue working there, or remove it to clean up.`;function D(){if(t){t();return}_(`keep`)}let A=S||C?`All changes and commits will be lost.`:`Clean up the worktree directory.`,j=!!h.tmuxSessionName,M=j?[{label:`Keep worktree and tmux session`,value:`keep-with-tmux`,description:`Stays at ${h.worktreePath}. Reattach with: tmux attach -t ${h.tmuxSessionName}`},{label:`Keep worktree, kill tmux session`,value:`keep-kill-tmux`,description:`Keeps worktree at ${h.worktreePath}, terminates tmux session.`},{label:`Remove worktree and tmux session`,value:`remove-with-tmux`,description:A}]:[{label:`Keep worktree`,value:`keep`,description:`Stays at ${h.worktreePath}`},{label:`Remove worktree`,value:`remove`,description:A}];return(0,L.jsx)(a,{title:`Exiting worktree session`,subtitle:w,onCancel:D,children:(0,L.jsx)(y,{defaultFocusValue:j?`keep-with-tmux`:`keep`,options:M,onChange:_})})}var I,L,R=t((()=>{I=n(r(),1),p(),f(),o(),h(),C(),S(),M(),w(),D(),L=c()}));function z(){return u(H)??`Goodbye!`}function B({showWorktree:e,onDone:t,onCancel:n}){async function r(e){t(e??z()),await x(0,`prompt_input_exit`)}return e?(0,V.jsx)(F,{onDone:r,onCancel:n}):null}var V,H,U=t((()=>{l(),r(),A(),R(),V=c(),H=[`Goodbye!`,`See ya!`,`Bye!`,`Catch you later!`]}));export{U as n,B as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
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-Q2255dD7.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-Ci5mr0vm.js";import{X as de}from"./rcDebugLog-BbPkkigY.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.0`,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.0`]})]}),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.0\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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./Grove-CKVpREDU.js";e();export{t as GroveDialog};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,f as a,g as o,h as s,t as c,x as l,xt as u}from"./src-Di342QoJ.js";import{t as d}from"./jsx-runtime-D-D469L8.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{BT as m,Dx as h,LT as g,UT as _,VT as v,WT as y,cy as b,zT as x}from"./loadAgentsDir-Ci5mr0vm.js";function S(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(i,{children:[`An update to our Consumer Terms and Privacy Policy will take effect on `,(0,D.jsx)(i,{bold:!0,children:`October 8, 2025`}),`. You can accept the updated terms today.`]}),(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{children:`What's changing?`}),(0,D.jsx)(l,{paddingLeft:1,children:(0,D.jsxs)(i,{children:[(0,D.jsx)(i,{children:`· `}),(0,D.jsx)(i,{bold:!0,children:`You can help improve Claude `}),(0,D.jsxs)(i,{children:[`— Allow the use of your chats and coding sessions to train and improve Anthropic AI models. Change anytime in your Privacy Settings (`,(0,D.jsx)(n,{url:`https://claude.ai/settings/data-privacy-controls`}),`).`]})]})}),(0,D.jsx)(l,{paddingLeft:1,children:(0,D.jsxs)(i,{children:[(0,D.jsx)(i,{children:`· `}),(0,D.jsx)(i,{bold:!0,children:`Updates to data retention `}),(0,D.jsx)(i,{children:`— To help us improve our AI models and safety protections, we're extending data retention to 5 years.`})]})})]}),(0,D.jsxs)(i,{children:[`Learn more (`,(0,D.jsx)(n,{url:`https://www.anthropic.com/news/updates-to-our-consumer-terms`}),`) or read the updated Consumer Terms (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/terms`}),`) and Privacy Policy (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/privacy`}),`)`]})]})}function C(){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(i,{children:`We've updated our Consumer Terms and Privacy Policy.`}),(0,D.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,D.jsx)(i,{children:`What's changing?`}),(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{bold:!0,children:`Help improve Claude`}),(0,D.jsx)(i,{children:`Allow the use of your chats and coding sessions to train and improve Anthropic AI models. You can change this anytime in Privacy Settings`}),(0,D.jsx)(n,{url:`https://claude.ai/settings/data-privacy-controls`})]}),(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{bold:!0,children:`How this affects data retention`}),(0,D.jsx)(i,{children:`Turning ON the improve Claude setting extends data retention from 30 days to 5 years. Turning it OFF keeps the default 30-day data retention. Delete data anytime.`})]})]}),(0,D.jsxs)(i,{children:[`Learn more (`,(0,D.jsx)(n,{url:`https://www.anthropic.com/news/updates-to-our-consumer-terms`}),`) or read the updated Consumer Terms (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/terms`}),`) and Privacy Policy (`,(0,D.jsx)(n,{url:`https://anthropic.com/legal/privacy`}),`)`]})]})}function w({showIfAlreadyViewed:e,location:t,onDone:n}){let[r,c]=(0,E.useState)(null),[u,d]=(0,E.useState)(null);if((0,E.useEffect)(()=>{async function r(){let[r,i]=await Promise.all([m(),x()]),a=i.success?i.data:null;d(a);let o=g(r,i,e);if(c(o),!o){n(`skip_rendering`);return}_(),p(`tengu_grove_policy_viewed`,{location:t,dismissable:a?.notice_is_grace_period})}r()},[e,t,n]),r===null||!r)return null;async function f(e){switch(e){case`accept_opt_in`:await y(!0),p(`tengu_grove_policy_submitted`,{state:!0,dismissable:u?.notice_is_grace_period});break;case`accept_opt_out`:await y(!1),p(`tengu_grove_policy_submitted`,{state:!1,dismissable:u?.notice_is_grace_period});break;case`defer`:p(`tengu_grove_policy_dismissed`,{state:!0});break;case`escape`:p(`tengu_grove_policy_escaped`,{});break}n(e)}let v=u?.domain_excluded?[{label:`Accept terms · Help improve Claude: OFF (for emails with your domain)`,value:`accept_opt_out`}]:[{label:`Accept terms · Help improve Claude: ON`,value:`accept_opt_in`},{label:`Accept terms · Help improve Claude: OFF`,value:`accept_opt_out`}];function b(){if(u?.notice_is_grace_period){f(`defer`);return}f(`escape`)}return(0,D.jsxs)(a,{title:`Updates to Consumer Terms and Policies`,color:`professionalBlue`,onCancel:b,inputGuide:e=>e.pending?(0,D.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):(0,D.jsxs)(s,{children:[(0,D.jsx)(o,{shortcut:`Enter`,action:`confirm`}),(0,D.jsx)(o,{shortcut:`Esc`,action:`cancel`})]}),children:[(0,D.jsxs)(l,{flexDirection:`row`,children:[(0,D.jsx)(l,{flexDirection:`column`,gap:1,flexGrow:1,children:u?.notice_is_grace_period?(0,D.jsx)(S,{}):(0,D.jsx)(C,{})}),(0,D.jsx)(l,{flexShrink:0,children:(0,D.jsx)(i,{color:`professionalBlue`,children:O})})]}),(0,D.jsxs)(l,{flexDirection:`column`,gap:1,children:[(0,D.jsxs)(l,{flexDirection:`column`,children:[(0,D.jsx)(i,{bold:!0,children:`Please select how you'd like to continue`}),(0,D.jsx)(i,{children:`Your choice takes effect immediately upon confirmation.`})]}),(0,D.jsx)(h,{options:[...v,...u?.notice_is_grace_period?[{label:`Not now`,value:`defer`}]:[]],onChange:e=>f(e),onCancel:b})]})]})}function T({settings:e,domainExcluded:t,onDone:r}){let[c,d]=(0,E.useState)(e.grove_enabled);E.useEffect(()=>{p(`tengu_grove_privacy_settings_viewed`,{})},[]),u(async(e,n)=>{if(!t&&(n.tab||n.return||e===` `)){let e=!c;d(e),await y(e)}});let f=(0,D.jsx)(i,{color:`error`,children:`false`});return t?f=(0,D.jsx)(i,{color:`error`,children:`false (for emails with your domain)`}):c&&(f=(0,D.jsx)(i,{color:`success`,children:`true`})),(0,D.jsxs)(a,{title:`Data Privacy`,color:`professionalBlue`,onCancel:r,inputGuide:e=>e.pending?(0,D.jsxs)(i,{children:[`Press `,e.keyName,` again to exit`]}):t?(0,D.jsx)(o,{shortcut:`Esc`,action:`cancel`}):(0,D.jsxs)(s,{children:[(0,D.jsx)(o,{shortcut:`Enter/Tab/Space`,action:`toggle`}),(0,D.jsx)(o,{shortcut:`Esc`,action:`cancel`})]}),children:[(0,D.jsxs)(i,{children:[`Review and manage your privacy settings at`,` `,(0,D.jsx)(n,{url:`https://claude.ai/settings/data-privacy-controls`})]}),(0,D.jsxs)(l,{children:[(0,D.jsx)(l,{width:44,children:(0,D.jsx)(i,{bold:!0,children:`Help improve Claude`})}),(0,D.jsx)(l,{children:f})]})]})}var E,D,O,k=e((()=>{E=t(r()),f(),c(),v(),b(),D=d(),O=` _____________
|
|
2
|
+
| \\ \\
|
|
3
|
+
| NEW TERMS \\__\\
|
|
4
|
+
| |
|
|
5
|
+
| ---------- |
|
|
6
|
+
| ---------- |
|
|
7
|
+
| ---------- |
|
|
8
|
+
| ---------- |
|
|
9
|
+
| ---------- |
|
|
10
|
+
| |
|
|
11
|
+
|______________|`}));export{T as n,k as r,w as t};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{s as e,u as t}from"./envUtils-BWeoiL4Y.js";import{n,t as r}from"./defineProperty-80gRi2ZW.js";import{n as i,t as a}from"./axios-DhfaybwJ.js";import{E as o,d as s,s as c,w as l}from"./debug-UI3T040K.js";import{n as u,r as d}from"./analytics-DqMQntaB.js";import{F as f,P as p}from"./git-CN3qtTb_.js";import{c as m,g as h,h as g,l as _,u as v}from"./proxy-CfZp-wce.js";import{Qm as y,Zm as b}from"./loadAgentsDir-Ci5mr0vm.js";import{D as x,O as S,a as C,l as w,n as T,r as E,t as D}from"./rcDebugLog-BbPkkigY.js";import{r as O}from"./ccrClient-BOxUn9EJ.js";a(),S(),u(),y(),c(),D(),p(),e(),h(),v(),E(),l(),n();var k=`{"type":"keep_alive"}
|
|
2
|
+
`,A=1e3,j=1e3,M=3e4,N=6e5,P=1e4,F=12e4,I=M*2,L=new Set([1002,4001,4003]),R=class{constructor(e,t={},n,i,a){r(this,`ws`,null),r(this,`lastSentId`,null),r(this,`url`,void 0),r(this,`state`,`idle`),r(this,`onData`,void 0),r(this,`onCloseCallback`,void 0),r(this,`onConnectCallback`,void 0),r(this,`headers`,void 0),r(this,`sessionId`,void 0),r(this,`autoReconnect`,void 0),r(this,`isBridge`,void 0),r(this,`reconnectAttempts`,0),r(this,`reconnectStartTime`,null),r(this,`reconnectTimer`,null),r(this,`lastReconnectAttemptTime`,null),r(this,`lastActivityTime`,0),r(this,`pingInterval`,null),r(this,`pongReceived`,!0),r(this,`keepAliveInterval`,null),r(this,`messageBuffer`,void 0),r(this,`isBunWs`,!1),r(this,`connectStartTime`,0),r(this,`refreshHeaders`,void 0),r(this,`onBunOpen`,()=>{this.handleOpenEvent(),this.lastSentId&&this.replayBufferedMessages(``)}),r(this,`onBunMessage`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.lastActivityTime=Date.now(),f(`info`,`cli_websocket_message_received`,{length:t.length}),this.onData&&this.onData(t)}),r(this,`onBunError`,()=>{s(`WebSocketTransport: Error`,{level:`error`}),f(`error`,`cli_websocket_connect_error`)}),r(this,`onBunClose`,e=>{let t=e.code===1e3||e.code===1001;s(`WebSocketTransport: Closed: ${e.code}`,t?void 0:{level:`error`}),f(`error`,`cli_websocket_connect_closed`),this.handleConnectionError(e.code)}),r(this,`onNodeOpen`,()=>{let e=this.ws;if(this.handleOpenEvent(),!e)return;let t=e.upgradeReq;if(t?.headers?.[`x-last-request-id`]){let e=t.headers[`x-last-request-id`];this.replayBufferedMessages(e)}}),r(this,`onNodeMessage`,e=>{let t=e.toString();this.lastActivityTime=Date.now(),f(`info`,`cli_websocket_message_received`,{length:t.length}),this.onData&&this.onData(t)}),r(this,`onNodeError`,e=>{s(`WebSocketTransport: Error: ${e.message}`,{level:`error`}),f(`error`,`cli_websocket_connect_error`)}),r(this,`onNodeClose`,(e,t)=>{let n=e===1e3||e===1001;s(`WebSocketTransport: Closed: ${e}`,n?void 0:{level:`error`}),f(`error`,`cli_websocket_connect_closed`),this.handleConnectionError(e)}),r(this,`onPong`,()=>{this.pongReceived=!0}),this.url=e,this.headers=t,this.sessionId=n,this.refreshHeaders=i,this.autoReconnect=a?.autoReconnect??!0,this.isBridge=a?.isBridge??!1,this.messageBuffer=new b(A)}async connect(){if(this.state!==`idle`&&this.state!==`reconnecting`){s(`WebSocketTransport: Cannot connect, current state is ${this.state}`,{level:`error`}),f(`error`,`cli_websocket_connect_failed`);return}this.state=`reconnecting`,this.connectStartTime=Date.now(),s(`WebSocketTransport: Opening ${this.url.href}`),f(`info`,`cli_websocket_connect_opening`);let e={...this.headers};if(this.lastSentId&&(e[`X-Last-Request-Id`]=this.lastSentId,s(`WebSocketTransport: Adding X-Last-Request-Id header: ${this.lastSentId}`)),typeof Bun<`u`){let t=new globalThis.WebSocket(this.url.href,{headers:e,proxy:_(this.url.href),tls:g()||void 0});this.ws=t,this.isBunWs=!0,t.addEventListener(`open`,this.onBunOpen),t.addEventListener(`message`,this.onBunMessage),t.addEventListener(`error`,this.onBunError),t.addEventListener(`close`,this.onBunClose),t.addEventListener(`pong`,this.onPong)}else{let{default:t}=await import(`./wrapper-BSK0MCQH.js`),n=new t(this.url.href,{headers:e,agent:m(this.url.href),...g()});this.ws=n,this.isBunWs=!1,n.on(`open`,this.onNodeOpen),n.on(`message`,this.onNodeMessage),n.on(`error`,this.onNodeError),n.on(`close`,this.onNodeClose),n.on(`pong`,this.onPong)}}handleOpenEvent(){let e=Date.now()-this.connectStartTime;s(`WebSocketTransport: Connected`),f(`info`,`cli_websocket_connect_connected`,{duration_ms:e}),this.isBridge&&this.reconnectStartTime!==null&&d(`tengu_ws_transport_reconnected`,{attempts:this.reconnectAttempts,downtimeMs:Date.now()-this.reconnectStartTime}),this.reconnectAttempts=0,this.reconnectStartTime=null,this.lastReconnectAttemptTime=null,this.lastActivityTime=Date.now(),this.state=`connected`,this.onConnectCallback?.(),this.startPingInterval(),this.startKeepaliveInterval(),C(()=>{this.write({type:`keep_alive`})})}sendLine(e){if(!this.ws||this.state!==`connected`)return s(`WebSocketTransport: Not connected`),f(`info`,`cli_websocket_send_not_connected`),!1;try{return this.ws.send(e),this.lastActivityTime=Date.now(),!0}catch(e){return s(`WebSocketTransport: Failed to send: ${e}`,{level:`error`}),f(`error`,`cli_websocket_send_error`),this.handleConnectionError(),!1}}removeWsListeners(e){if(this.isBunWs){let t=e;t.removeEventListener(`open`,this.onBunOpen),t.removeEventListener(`message`,this.onBunMessage),t.removeEventListener(`error`,this.onBunError),t.removeEventListener(`close`,this.onBunClose),t.removeEventListener(`pong`,this.onPong)}else{let t=e;t.off(`open`,this.onNodeOpen),t.off(`message`,this.onNodeMessage),t.off(`error`,this.onNodeError),t.off(`close`,this.onNodeClose),t.off(`pong`,this.onPong)}}doDisconnect(){this.stopPingInterval(),this.stopKeepaliveInterval(),w(),this.ws&&(this.removeWsListeners(this.ws),this.ws.close(),this.ws=null)}handleConnectionError(e){if(T(`WS handleConnectionError: code=${e} state=${this.state} url=${this.url.href.replace(/token=[^&]+/,`token=***`)} msSinceLastActivity=${this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1} reconnectAttempts=${this.reconnectAttempts}`),s(`WebSocketTransport: Disconnected from ${this.url.href}`+(e==null?``:` (code ${e})`)),f(`info`,`cli_websocket_disconnected`),this.isBridge&&d(`tengu_ws_transport_closed`,{closeCode:e,msSinceLastActivity:this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1,wasConnected:this.state===`connected`,reconnectAttempts:this.reconnectAttempts}),this.doDisconnect(),this.state===`closing`||this.state===`closed`)return;let t=!1;if(e===4003&&this.refreshHeaders){let e=this.refreshHeaders();e.Authorization!==this.headers.Authorization&&(Object.assign(this.headers,e),t=!0,s(`WebSocketTransport: 4003 received but headers refreshed, scheduling reconnect`),f(`info`,`cli_websocket_4003_token_refreshed`))}if(e!=null&&L.has(e)&&!t){s(`WebSocketTransport: Permanent close code ${e}, not reconnecting`,{level:`error`}),f(`error`,`cli_websocket_permanent_close`,{closeCode:e}),this.state=`closed`,this.onCloseCallback?.(e);return}if(!this.autoReconnect){this.state=`closed`,this.onCloseCallback?.(e);return}let n=Date.now();this.reconnectStartTime||(this.reconnectStartTime=n),this.lastReconnectAttemptTime!==null&&n-this.lastReconnectAttemptTime>I&&(s(`WebSocketTransport: Detected system sleep (${Math.round((n-this.lastReconnectAttemptTime)/1e3)}s gap), resetting reconnection budget`),f(`info`,`cli_websocket_sleep_detected`,{gapMs:n-this.lastReconnectAttemptTime}),this.reconnectStartTime=n,this.reconnectAttempts=0),this.lastReconnectAttemptTime=n;let r=n-this.reconnectStartTime;if(r<N){if(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!t&&this.refreshHeaders){let e=this.refreshHeaders();Object.assign(this.headers,e),s(`WebSocketTransport: Refreshed headers for reconnect`)}this.state=`reconnecting`,this.reconnectAttempts++;let e=Math.min(j*2**(this.reconnectAttempts-1),M),n=Math.max(0,e+e*.25*(2*Math.random()-1));s(`WebSocketTransport: Reconnecting in ${Math.round(n)}ms (attempt ${this.reconnectAttempts}, ${Math.round(r/1e3)}s elapsed)`),f(`error`,`cli_websocket_reconnect_attempt`,{reconnectAttempts:this.reconnectAttempts}),this.isBridge&&d(`tengu_ws_transport_reconnecting`,{attempt:this.reconnectAttempts,elapsedMs:r,delayMs:Math.round(n)}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}else s(`WebSocketTransport: Reconnection time budget exhausted after ${Math.round(r/1e3)}s for ${this.url.href}`,{level:`error`}),f(`error`,`cli_websocket_reconnect_exhausted`,{reconnectAttempts:this.reconnectAttempts,elapsedMs:r}),this.state=`closed`,this.onCloseCallback&&this.onCloseCallback(e)}close(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopPingInterval(),this.stopKeepaliveInterval(),w(),this.state=`closing`,this.doDisconnect()}replayBufferedMessages(e){let t=this.messageBuffer.toArray();if(t.length===0)return;let n=0;if(e){let r=t.findIndex(t=>`uuid`in t&&t.uuid===e);if(r>=0){n=r+1;let e=t.slice(n);this.messageBuffer.clear(),this.messageBuffer.addAll(e),e.length===0&&(this.lastSentId=null),s(`WebSocketTransport: Evicted ${n} confirmed messages, ${e.length} remaining`),f(`info`,`cli_websocket_evicted_confirmed_messages`,{evicted:n,remaining:e.length})}}let r=t.slice(n);if(r.length===0){s(`WebSocketTransport: No new messages to replay`),f(`info`,`cli_websocket_no_messages_to_replay`);return}s(`WebSocketTransport: Replaying ${r.length} buffered messages`),f(`info`,`cli_websocket_messages_to_replay`,{count:r.length});for(let e of r){let t=o(e)+`
|
|
3
|
+
`;if(!this.sendLine(t)){this.handleConnectionError();break}}}isConnectedStatus(){return this.state===`connected`}isClosedStatus(){return this.state===`closed`}setOnData(e){this.onData=e}setOnConnect(e){this.onConnectCallback=e}setOnClose(e){this.onCloseCallback=e}getStateLabel(){return this.state}async write(e){`uuid`in e&&typeof e.uuid==`string`&&(this.messageBuffer.add(e),this.lastSentId=e.uuid);let t=o(e)+`
|
|
4
|
+
`;if(this.state!==`connected`)return;let n=this.sessionId?` session=${this.sessionId}`:``,r=this.getControlMessageDetailLabel(e);s(`WebSocketTransport: Sending message type=${e.type}${n}${r}`),this.sendLine(t)}getControlMessageDetailLabel(e){if(e.type===`control_request`){let{request_id:t,request:n}=e,r=n.subtype===`can_use_tool`?n.tool_name:``;return` subtype=${n.subtype} request_id=${t}${r?` tool=${r}`:``}`}if(e.type===`control_response`){let{subtype:t,request_id:n}=e.response;return` subtype=${t} request_id=${n}`}return``}startPingInterval(){this.stopPingInterval(),this.pongReceived=!0;let e=Date.now();this.pingInterval=setInterval(()=>{if(this.state===`connected`&&this.ws){let t=Date.now(),n=t-e;if(e=t,n>I){s(`WebSocketTransport: ${Math.round(n/1e3)}s tick gap detected — process was suspended, forcing reconnect`),f(`info`,`cli_websocket_sleep_detected_on_ping`,{gapMs:n}),this.handleConnectionError();return}if(!this.pongReceived){s(`WebSocketTransport: No pong received, connection appears dead`,{level:`error`}),f(`error`,`cli_websocket_pong_timeout`),this.handleConnectionError();return}this.pongReceived=!1;try{this.ws.ping?.()}catch(e){s(`WebSocketTransport: Ping failed: ${e}`,{level:`error`}),f(`error`,`cli_websocket_ping_failed`)}}},P)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}startKeepaliveInterval(){this.stopKeepaliveInterval(),!t(process.env.CLAUDE_CODE_REMOTE)&&(this.keepAliveInterval=setInterval(()=>{if(this.state===`connected`&&this.ws)try{this.ws.send(k),this.lastActivityTime=Date.now(),s(`WebSocketTransport: Sent periodic keep_alive data frame`)}catch(e){s(`WebSocketTransport: Periodic keep_alive failed: ${e}`,{level:`error`}),f(`error`,`cli_websocket_keepalive_failed`)}},F))}stopKeepaliveInterval(){this.keepAliveInterval&&(clearInterval(this.keepAliveInterval),this.keepAliveInterval=null)}};c(),D(),p(),n();var z=100,B=15e3,V=3e3,H=class extends R{constructor(e,t={},n,i,a){super(e,t,n,i,a),r(this,`postUrl`,void 0),r(this,`uploader`,void 0),r(this,`streamEventBuffer`,[]),r(this,`streamEventTimer`,null);let{maxConsecutiveFailures:o,onBatchDropped:c}=a??{};this.postUrl=U(e),this.uploader=new O({maxBatchSize:500,maxQueueSize:1e4,baseDelayMs:500,maxDelayMs:8e3,jitterMs:1e3,maxConsecutiveFailures:o,onBatchDropped:(e,t)=>{f(`error`,`cli_hybrid_batch_dropped_max_failures`,{batchSize:e,failures:t}),c?.(e,t)},send:e=>this.postOnce(e)}),s(`HybridTransport: POST URL = ${this.postUrl}`),f(`info`,`cli_hybrid_transport_initialized`)}async write(e){if(e.type===`stream_event`){this.streamEventBuffer.push(e),this.streamEventTimer||(this.streamEventTimer=setTimeout(()=>this.flushStreamEvents(),z));return}return await this.uploader.enqueue([...this.takeStreamEvents(),e]),this.uploader.flush()}async writeBatch(e){return await this.uploader.enqueue([...this.takeStreamEvents(),...e]),this.uploader.flush()}get droppedBatchCount(){return this.uploader.droppedBatchCount}flush(){return this.uploader.enqueue(this.takeStreamEvents()),this.uploader.flush()}takeStreamEvents(){this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null);let e=this.streamEventBuffer;return this.streamEventBuffer=[],e}flushStreamEvents(){this.streamEventTimer=null,this.uploader.enqueue(this.takeStreamEvents())}close(){this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null),this.streamEventBuffer=[];let e=this.uploader,t;Promise.race([e.flush(),new Promise(e=>{t=setTimeout(e,V)})]).finally(()=>{clearTimeout(t),e.close()}),super.close()}async postOnce(e){let t=x();if(!t){s(`HybridTransport: No session token available for POST`),f(`warn`,`cli_hybrid_post_no_token`);return}let n={Authorization:`Bearer ${t}`,"Content-Type":`application/json`},r;try{r=await i.post(this.postUrl,{events:e},{headers:n,validateStatus:()=>!0,timeout:B})}catch(e){throw s(`HybridTransport: POST error: ${e.message}`),f(`warn`,`cli_hybrid_post_network_error`),e}if(r.status>=200&&r.status<300){s(`HybridTransport: POST success count=${e.length}`);return}if(r.status>=400&&r.status<500&&r.status!==429){T(`Hybrid POST ${r.status}: url=${this.postUrl.replace(/token=[^&]+/,`token=***`)} events=${e.length} body=${JSON.stringify(r.data).slice(0,200)}`),s(`HybridTransport: POST returned ${r.status} (permanent), dropping`),f(`warn`,`cli_hybrid_post_client_error`,{status:r.status});return}throw s(`HybridTransport: POST returned ${r.status} (retryable)`),f(`warn`,`cli_hybrid_post_retryable_error`,{status:r.status}),Error(`POST failed with ${r.status}`)}};function U(e){let t=e.protocol===`wss:`?`https:`:`http:`,n=e.pathname;return n=n.replace(`/ws/`,`/session/`),n.endsWith(`/events`)||(n=n.endsWith(`/`)?n+`events`:n+`/events`),`${t}//${e.host}${n}${e.search}`}export{R as n,H as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{d as r,s as i}from"./debug-UI3T040K.js";import{r as a,t as o}from"./execFileNoThrow-CuQN1sz8.js";import{Sd as s,Td as c}from"./loadAgentsDir-Ci5mr0vm.js";import{c as l,i as u,r as d}from"./detection-CQsNad64.js";function f(){let e,t=new Promise(t=>{e=t}),n=v;return v=t,n.then(()=>e)}function p(e){return o(`it2`,e)}function m(e){let t=e.match(/Created new pane:\s*(.+)/);return t&&t[1]?t[1].trim():``}function h(){let e=process.env.ITERM_SESSION_ID;if(!e)return null;let t=e.indexOf(`:`);return t===-1?null:e.slice(t+1)}var g,_,v,y;e((()=>{i(),a(),d(),s(),t(),g=[],_=!1,v=Promise.resolve(),y=class{constructor(){n(this,`type`,`iterm2`),n(this,`displayName`,`iTerm2`),n(this,`supportsHideShow`,!1)}async isAvailable(){let e=u();if(r(`[ITermBackend] isAvailable check: inITerm2=${e}`),!e)return r(`[ITermBackend] isAvailable: false (not in iTerm2)`),!1;let t=await l();return r(`[ITermBackend] isAvailable: ${t} (it2 CLI ${t?`found`:`not found`})`),t}async isRunningInside(){let e=u();return r(`[ITermBackend] isRunningInside: ${e}`),e}async createTeammatePaneInSwarmView(e,t){r(`[ITermBackend] createTeammatePaneInSwarmView called for ${e} with color ${t}`);let n=await f();try{for(;;){let t=!_;r(`[ITermBackend] Creating pane: isFirstTeammate=${t}, existingPanes=${g.length}`);let n,i;if(t){let e=h();e?(n=[`session`,`split`,`-v`,`-s`,e],r(`[ITermBackend] First split from leader session: ${e}`)):(n=[`session`,`split`,`-v`],r(`[ITermBackend] First split from active session (no leader ID)`))}else i=g[g.length-1],i?(n=[`session`,`split`,`-s`,i],r(`[ITermBackend] Subsequent split from teammate session: ${i}`)):(n=[`session`,`split`],r(`[ITermBackend] Subsequent split from active session (no teammate ID)`));let a=await p(n);if(a.code!==0){if(i){let e=await p([`session`,`list`]);if(e.code===0&&!e.stdout.includes(i)){r(`[ITermBackend] Split failed targeting dead session ${i}, pruning and retrying: ${a.stderr}`);let e=g.indexOf(i);e!==-1&&g.splice(e,1),g.length===0&&(_=!1);continue}}throw Error(`Failed to create iTerm2 split pane: ${a.stderr}`)}t&&(_=!0);let o=m(a.stdout);if(!o)throw Error(`Failed to parse session ID from split output: ${a.stdout}`);return r(`[ITermBackend] Created teammate pane for ${e}: ${o}`),g.push(o),{paneId:o,isFirstTeammate:t}}}finally{n()}}async sendCommandToPane(e,t,n){let r=await p(e?[`session`,`run`,`-s`,e,t]:[`session`,`run`,t]);if(r.code!==0)throw Error(`Failed to send command to iTerm2 pane ${e}: ${r.stderr}`)}async setPaneBorderColor(e,t,n){}async setPaneTitle(e,t,n,r){}async enablePaneBorderStatus(e,t){}async rebalancePanes(e,t){r(`[ITermBackend] Pane rebalancing not implemented for iTerm2`)}async killPane(e,t){let n=await p([`session`,`close`,`-f`,`-s`,e]),r=g.indexOf(e);return r!==-1&&g.splice(r,1),g.length===0&&(_=!1),n.code===0}async hidePane(e,t){return r(`[ITermBackend] hidePane not supported in iTerm2`),!1}async showPane(e,t,n){return r(`[ITermBackend] showPane not supported in iTerm2`),!1}},c(y)}))();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";function r(){let e=new i,t=new i;return e._setPeer(t),t._setPeer(e),[e,t]}var i;e((()=>{t(),i=class{constructor(){n(this,`peer`,void 0),n(this,`closed`,!1),n(this,`onclose`,void 0),n(this,`onerror`,void 0),n(this,`onmessage`,void 0)}_setPeer(e){this.peer=e}async start(){}async send(e){if(this.closed)throw Error(`Transport is closed`);queueMicrotask(()=>{this.peer?.onmessage?.(e)})}async close(){this.closed||(this.closed=!0,this.onclose?.(),this.peer&&!this.peer.closed&&(this.peer.closed=!0,this.peer.onclose?.()))}}}))();export{r as createLinkedTransportPair};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DR8-3Aex.js";import{Mt as e,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{E as s,O as c,w as l}from"./debug-UI3T040K.js";import{AS as u,Dx as d,ay as f,cy as p,iy as m,jS as h}from"./loadAgentsDir-Ci5mr0vm.js";import{t as g}from"./renderOptions-BiyC2rj1.js";t(),i(),f(),h(),l(),p();var _=o();function v({filePath:e,errorDescription:t,onExit:i,onReset:o}){return(0,_.jsxs)(r,{title:`Configuration Error`,color:`error`,onCancel:i,children:[(0,_.jsxs)(a,{flexDirection:`column`,gap:1,children:[(0,_.jsxs)(n,{children:[`The configuration file at `,(0,_.jsx)(n,{bold:!0,children:e}),` contains invalid JSON.`]}),(0,_.jsx)(n,{children:t})]}),(0,_.jsxs)(a,{flexDirection:`column`,children:[(0,_.jsx)(n,{bold:!0,children:`Choose an option:`}),(0,_.jsx)(d,{options:[{label:`Exit and fix manually`,value:`exit`},{label:`Reset with default configuration`,value:`reset`}],onChange:e=>{e===`exit`?i():o()},onCancel:i})]})]})}var y=`dark`;async function b({error:t}){let n={...g(!1),theme:y};await new Promise(async r=>{let{unmount:i}=await e((0,_.jsx)(u,{children:(0,_.jsx)(m,{children:(0,_.jsx)(v,{filePath:t.filePath,errorDescription:t.message,onExit:()=>{i(),r(),process.exit(1)},onReset:()=>{c(t.filePath,s(t.defaultConfig,null,2),{flush:!1,encoding:`utf8`}),i(),r(),process.exit(0)}})})}),n)})}export{b as showInvalidConfigDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DR8-3Aex.js";import{Rn as e,b as t,f as n,t as r}from"./src-Di342QoJ.js";import{t as i}from"./jsx-runtime-D-D469L8.js";import{Dx as a,cy as o}from"./loadAgentsDir-Ci5mr0vm.js";import{n as s,t as c}from"./ValidationErrorsList-1k1qbsRo.js";e(),r(),o(),s();var l=i();function u({settingsErrors:e,onContinue:r,onExit:i}){function o(e){e===`exit`?i():r()}return(0,l.jsxs)(n,{title:`Settings Error`,onCancel:i,color:`warning`,children:[(0,l.jsx)(c,{errors:e}),(0,l.jsx)(t,{dimColor:!0,children:`Files with errors are skipped entirely, not just the invalid settings.`}),(0,l.jsx)(a,{options:[{label:`Exit and fix manually`,value:`exit`},{label:`Continue without these settings`,value:`continue`}],onChange:o})]})}export{u as InvalidSettingsDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./src-Di342QoJ.js";var n=e((()=>{t()}));export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
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-Q2255dD7.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-Ci5mr0vm.js";import{o as xe,s as Se}from"./localSearch-Vpn6W5aY.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-l3EXKDNB.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Q as n,Rn as r,b as i,t as a,x as o}from"./src-Di342QoJ.js";import{t as s}from"./jsx-runtime-D-D469L8.js";import{RC as c,XC as l,YC as u,lw as d,sw as f}from"./loadAgentsDir-Ci5mr0vm.js";function p({scope:e,parsingErrors:t,warnings:n}){let r=t.length>0,a=n.length>0;return!r&&!a?null:(0,_.jsxs)(o,{flexDirection:`column`,marginTop:1,children:[(0,_.jsxs)(o,{children:[(r||a)&&(0,_.jsxs)(i,{color:r?`error`:`warning`,children:[`[`,r?`Failed to parse`:`Contains warnings`,`] `]}),(0,_.jsx)(i,{children:u(e)})]}),(0,_.jsxs)(o,{children:[(0,_.jsx)(i,{dimColor:!0,children:`Location: `}),(0,_.jsx)(i,{dimColor:!0,children:c(e)})]}),(0,_.jsxs)(o,{marginLeft:1,flexDirection:`column`,children:[t.map((e,t)=>{let n=e.mcpErrorMetadata?.serverName;return(0,_.jsx)(o,{children:(0,_.jsxs)(i,{children:[(0,_.jsx)(i,{dimColor:!0,children:`└ `}),(0,_.jsx)(i,{color:`error`,children:`[Error]`}),(0,_.jsxs)(i,{dimColor:!0,children:[` `,n&&`[${n}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`error-${t}`)}),n.map((e,t)=>{let n=e.mcpErrorMetadata?.serverName;return(0,_.jsx)(o,{children:(0,_.jsxs)(i,{children:[(0,_.jsx)(i,{dimColor:!0,children:`└ `}),(0,_.jsx)(i,{color:`warning`,children:`[Warning]`}),(0,_.jsxs)(i,{dimColor:!0,children:[` `,n&&`[${n}] `,e.path&&e.path!==``?`${e.path}: `:``,e.message]})]})},`warning-${t}`)})]})]})}function m(){let e=(0,g.useMemo)(()=>[{scope:`user`,config:f(`user`)},{scope:`project`,config:f(`project`)},{scope:`local`,config:f(`local`)},{scope:`enterprise`,config:f(`enterprise`)}],[]),t=e.some(({config:e})=>h(e.errors,`fatal`).length>0),r=e.some(({config:e})=>h(e.errors,`warning`).length>0);return!t&&!r?null:(0,_.jsxs)(o,{flexDirection:`column`,marginTop:1,marginBottom:1,children:[(0,_.jsx)(i,{bold:!0,children:`MCP Config Diagnostics`}),(0,_.jsx)(o,{marginTop:1,children:(0,_.jsxs)(i,{dimColor:!0,children:[`For help configuring MCP servers, see:`,` `,(0,_.jsx)(n,{url:`https://code.claude.com/docs/en/mcp`,children:`https://code.claude.com/docs/en/mcp`})]})}),e.map(({scope:e,config:t})=>(0,_.jsx)(p,{scope:e,parsingErrors:h(t.errors,`fatal`),warnings:h(t.errors,`warning`)},e))]})}function h(e,t){return e.filter(e=>e.mcpErrorMetadata?.severity===t)}var g,_,v=e((()=>{g=t(r()),d(),l(),a(),_=s()}));export{v as n,m as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
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-Q2255dD7.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-Ci5mr0vm.js";import{E as Be,T as Ve,c as He,d as Ue,w as We}from"./sessionTracing-DTjmc0EF.js";import{t as Ge}from"./useKeybinding-FsOnjW6T.js";import{l as Ke,u as qe}from"./referral-ByevBJrE.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-DHRUtZ-C.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-D5dC6Mya.js`);return J(await e(v,y,A,r,n),b)}if(v!==null&&!O&&v.startsWith(`/`)){let{processSlashCommand:e}=await import(`./processSlashCommand-DHRUtZ-C.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.0`,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};
|