claude-code-zanii 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -0
- package/dist/chunks/AddWorkspaceDirectory-y_rd6sRl.js +1 -0
- package/dist/chunks/App-DgWSavG1.js +1 -0
- package/dist/chunks/ApproveApiKey-CJKWha-a.js +1 -0
- package/dist/chunks/ApproveApiKey-DTs2ExZH.js +1 -0
- package/dist/chunks/AssistantSessionChooser-BAhVk4id.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-XU_JPh7R.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-DV0Pi7ys.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-6erm_8Fn.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CjBvzB5s.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-ts0XnWwl.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DySPdSqQ.js +1 -0
- package/dist/chunks/CustomSelect-DqZxzBZP.js +1 -0
- package/dist/chunks/DesktopHandoff-5c90JK88.js +1 -0
- package/dist/chunks/DevChannelsDialog-DCMderzu.js +1 -0
- package/dist/chunks/Dialog-Dgg8bqcG.js +1 -0
- package/dist/chunks/DiffDialog-BU765aqh.js +6 -0
- package/dist/chunks/Doctor-B73iDB-d.js +3 -0
- package/dist/chunks/Doctor-CLZDdNRo.js +1 -0
- package/dist/chunks/ExitFlow-DBqn2mUf.js +2 -0
- package/dist/chunks/Feedback-D-JHabwi.js +2 -0
- package/dist/chunks/Grove-D-uQNMMo.js +11 -0
- package/dist/chunks/HybridTransport-B-G4QJcy.js +4 -0
- package/dist/chunks/ITermBackend-KP1vKsRN.js +1 -0
- package/dist/chunks/InProcessTransport-ByBEKxrQ.js +1 -0
- package/dist/chunks/InvalidConfigDialog-CMqiZ5nG.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-CjPCKzVZ.js +1 -0
- package/dist/chunks/ListItem-B6MyhHvM.js +1 -0
- package/dist/chunks/MCPConnectionManager-BJ8PcYPe.js +1 -0
- package/dist/chunks/Message-DNxJ_tMS.js +1 -0
- package/dist/chunks/MessageSelector-D79Ug71B.js +3 -0
- package/dist/chunks/Messages-CtIbkB2M.js +11 -0
- package/dist/chunks/Onboarding-DVrgKrI9.js +1 -0
- package/dist/chunks/OverageCreditUpsell-D_td1ss4.js +1 -0
- package/dist/chunks/PermissionDialog-BCS22yEO.js +1 -0
- package/dist/chunks/PermissionDialog-C5O1fL53.js +1 -0
- package/dist/chunks/PermissionRequestTitle-CtlbBU9t.js +1 -0
- package/dist/chunks/PluginSettings-OPrg-_3N.js +17 -0
- package/dist/chunks/PressEnterToContinue-DmzxIgbZ.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-CcsKj5DK.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-JedFdsxU.js +1 -0
- package/dist/chunks/REPL-ByhyIRnf.js +1 -0
- package/dist/chunks/REPL-Clve-8zC.js +157 -0
- package/dist/chunks/RemoteCallout-BZcabEKb.js +1 -0
- package/dist/chunks/RemoteSessionManager-C2PIFDHt.js +1 -0
- package/dist/chunks/ResumeConversation-D3ZRTFcF.js +1 -0
- package/dist/chunks/SSETransport-DmZWnH0k.js +4 -0
- package/dist/chunks/SearchBox-DQg2Ph0V.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-CLO4nt6N.js +1 -0
- package/dist/chunks/SentryErrorBoundary-BVfBaOOU.js +2 -0
- package/dist/chunks/SentryErrorBoundary-DIaVFad-.js +1 -0
- package/dist/chunks/Settings-rOCxQdS8.js +2 -0
- package/dist/chunks/TeleportProgress-CP8IY6bz.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DMmHgBqo.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-D5wEAW1-.js +1 -0
- package/dist/chunks/ThemePicker-Bgr7yOQB.js +1 -0
- package/dist/chunks/TmuxBackend-BzbtUtP1.js +9 -0
- package/dist/chunks/TrustDialog-BI5U3BQ0.js +1 -0
- package/dist/chunks/TungstenTool-CiQclNwj.js +1 -0
- package/dist/chunks/TungstenTool-kMqy-ifa.js +1 -0
- package/dist/chunks/ValidationErrorsList-DprGtB2w.js +2 -0
- package/dist/chunks/WelcomeV2-C4vfBnIy.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-BSoezOCE.js +2 -0
- package/dist/chunks/add-dir-DpOmv6kv.js +1 -0
- package/dist/chunks/agentDisplay-DuYEwOwO.js +1 -0
- package/dist/chunks/agents-BlurXZrF.js +2 -0
- package/dist/chunks/agents-DhZf7ftU.js +103 -0
- package/dist/chunks/ajv-CDrSAj3O.js +8 -0
- package/dist/chunks/analytics-i6X1et4O.js +1 -0
- package/dist/chunks/ant-D9hd_iYy.js +1 -0
- package/dist/chunks/api-CoaOHwDQ.js +4 -0
- package/dist/chunks/api-DvyGR-L7.js +1 -0
- package/dist/chunks/api-YHYC4Zdk.js +1 -0
- package/dist/chunks/artifacts-BMAYdaqh.js +1 -0
- package/dist/chunks/asciicast-DpHRoebc.js +1 -0
- package/dist/chunks/asciicast-HG1EoAQe.js +4 -0
- package/dist/chunks/assistant-D4-qcNT1.js +1 -0
- package/dist/chunks/assistant-DO2ZmZn1.js +1 -0
- package/dist/chunks/assistant-Dd86NmJM.js +1 -0
- package/dist/chunks/attributionHooks-BUmHrLhB.js +1 -0
- package/dist/chunks/attributionTrailer-r2Pbpu2N.js +1 -0
- package/dist/chunks/auth-CF3BGNYT.js +1 -0
- package/dist/chunks/auth-DwWwG43F.js +1 -0
- package/dist/chunks/auth-V_Xk2iea.js +1 -0
- package/dist/chunks/autoMode-DUksX5_i.js +45 -0
- package/dist/chunks/autoModeDenials-0CPO-Jbu.js +1 -0
- package/dist/chunks/autonomy-C5mNhAdz.js +21 -0
- package/dist/chunks/autonomy-CLt1dWaC.js +1 -0
- package/dist/chunks/autonomyPanel-rioFnrQO.js +1 -0
- package/dist/chunks/axios-DPuSPBlH.js +1 -0
- package/dist/chunks/axios-Zh7qGPze.js +12 -0
- package/dist/chunks/backgroundHousekeeping-BGtfqu-J.js +1 -0
- package/dist/chunks/backgroundHousekeeping-BqKZEvy0.js +17 -0
- package/dist/chunks/banner-BGLr3KYQ.js +2 -0
- package/dist/chunks/base64-js-B1tFNiG0.js +1 -0
- package/dist/chunks/bedrockClient-BFzWuhQK.js +15 -0
- package/dist/chunks/bg-B-YgGwLj.js +9 -0
- package/dist/chunks/bg-IU4gG3jc.js +1 -0
- package/dist/chunks/branch-BWY5W7hf.js +3 -0
- package/dist/chunks/break-cache-CY-O23fJ.js +8 -0
- package/dist/chunks/bridge-CqWd70vK.js +2 -0
- package/dist/chunks/bridgeConfig-CWO8AmCY.js +1 -0
- package/dist/chunks/bridgeConfig-D38y9eXn.js +1 -0
- package/dist/chunks/bridgeConfig-EwUq__ct.js +1 -0
- package/dist/chunks/bridgeConfig-GYR-LUiu.js +1 -0
- package/dist/chunks/bridgeEnabled-DKqmLnKO.js +1 -0
- package/dist/chunks/bridgeEnabled-DZIGDtfY.js +1 -0
- package/dist/chunks/bridgeMain-CXVks2ND.js +1 -0
- package/dist/chunks/bridgeMain-D4nsECwJ.js +68 -0
- package/dist/chunks/bridgeMessaging-BUOZU_ba.js +1 -0
- package/dist/chunks/bridgePointer-BpzIEsD_.js +1 -0
- package/dist/chunks/browser-D1vC3BNd.js +1 -0
- package/dist/chunks/btw-CVXJwoXo.js +1 -0
- package/dist/chunks/buddy-BLcvL8lP.js +3 -0
- package/dist/chunks/bundledMode-DQNSSQbt.js +1 -0
- package/dist/chunks/caches-BrfvzKn5.js +1 -0
- package/dist/chunks/caches-CkSv3MfC.js +3 -0
- package/dist/chunks/capacityWake-BWCSatN6.js +1 -0
- package/dist/chunks/changeDetector-DEZU6tum.js +1 -0
- package/dist/chunks/changeDetector-Df7c6U3d.js +1 -0
- package/dist/chunks/channelAllowlist-BApjAS0V.js +1 -0
- package/dist/chunks/channelNotification-BjWwF85R.js +1 -0
- package/dist/chunks/channelNotification-D01YVwNj.js +1 -0
- package/dist/chunks/chokidar-DPwMBcWI.js +1 -0
- package/dist/chunks/chokidar-DkDXNCTz.js +1 -0
- package/dist/chunks/chrome-D7coxEOI.js +1 -0
- package/dist/chunks/chromeNativeHost-CPj9M_4-.js +1 -0
- package/dist/chunks/chunk-DR8-3Aex.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-DZkxcFPS.js +1 -0
- package/dist/chunks/claudeAiLimitsHook-ATshVrOH.js +1 -0
- package/dist/chunks/claudeDesktop-PVa9tWsM.js +1 -0
- package/dist/chunks/cleanup-C-PGmKpV.js +1 -0
- package/dist/chunks/clear-CxGE9Ntr.js +1 -0
- package/dist/chunks/cliLaunch-CMXoY_LO.js +1 -0
- package/dist/chunks/client-BWED8Tbu.js +35 -0
- package/dist/chunks/client-CinDjeSq.js +7 -0
- package/dist/chunks/client-CpXGg9e0.js +1 -0
- package/dist/chunks/color-B3w_VQTn.js +1 -0
- package/dist/chunks/color-convert-BQZnVz_5.js +1 -0
- package/dist/chunks/commands-DFp48zwy.js +1 -0
- package/dist/chunks/commitAttribution-B0cXmbvv.js +2 -0
- package/dist/chunks/commitAttribution-DRSKRoH6.js +1 -0
- package/dist/chunks/common-BX7bn3hg.js +1 -0
- package/dist/chunks/common-Ce3LanTX.js +1 -0
- package/dist/chunks/common-DdLQuE2_.js +1 -0
- package/dist/chunks/common-HfKcqOYK.js +1 -0
- package/dist/chunks/compact-C8ljGMdo.js +3 -0
- package/dist/chunks/companion-mD1jw6xX.js +1 -0
- package/dist/chunks/completionCache-BqQXVTa9.js +1 -0
- package/dist/chunks/completionCache-BtP4vfAi.js +4 -0
- package/dist/chunks/computerUseLock-ADE_PhIK.js +1 -0
- package/dist/chunks/config-CmyaIIOY.js +1 -0
- package/dist/chunks/config-Rl1Y_Dtq.js +1 -0
- package/dist/chunks/connectHeadless-MFABhXpz.js +1 -0
- package/dist/chunks/constants-BM62Vf_X.js +1 -0
- package/dist/chunks/constants-BfXy-5cI.js +1 -0
- package/dist/chunks/context-BeiZkUNq.js +1 -0
- package/dist/chunks/context-noninteractive-CRdF3iv8.js +54 -0
- package/dist/chunks/controlMessageCompat-591iGHUK.js +1 -0
- package/dist/chunks/conversation-BoguXZEI.js +1 -0
- package/dist/chunks/conversation-yhs7tT-g.js +1 -0
- package/dist/chunks/copy-BpeUcqku.js +7 -0
- package/dist/chunks/createSSHSession-B3JOB4TE.js +6 -0
- package/dist/chunks/createSession-BJSnFBGt.js +1 -0
- package/dist/chunks/createSession-CnRHI3RU.js +1 -0
- package/dist/chunks/cron-iqTFGIos.js +1 -0
- package/dist/chunks/cronScheduler-zRXhgEEU.js +6 -0
- package/dist/chunks/cronTasks-CMJldfoP.js +2 -0
- package/dist/chunks/crossProjectResume-DxO6TX30.js +40 -0
- package/dist/chunks/cwd-B2guYBbl.js +1 -0
- package/dist/chunks/cwd-B5bbyUwz.js +1 -0
- package/dist/chunks/cwd-BXiaJzLh.js +1 -0
- package/dist/chunks/daemon-B3v4OoOu.js +2 -0
- package/dist/chunks/dangerousBackend-OmCzoW35.js +1 -0
- package/dist/chunks/datadog-3-Vvz0yz.js +1 -0
- package/dist/chunks/datadog-BQlp3bTs.js +1 -0
- package/dist/chunks/debug-BDBIipC1.js +2 -0
- package/dist/chunks/debug-C7tW7DFW.js +1 -0
- package/dist/chunks/debug-CjIaNjpK.js +5 -0
- package/dist/chunks/debugUtils-Dsg-UHeg.js +1 -0
- package/dist/chunks/defineProperty-CaCI0a5T.js +1 -0
- package/dist/chunks/desktop-C_SS0068.js +1 -0
- package/dist/chunks/detached-B7RNZeyl.js +5 -0
- package/dist/chunks/detect-libc-DFFGDzPC.js +1 -0
- package/dist/chunks/detectRepository-BnTCJAXR.js +1 -0
- package/dist/chunks/detectRepository-Gobn9eFt.js +1 -0
- package/dist/chunks/detection-CN_uLGU2.js +1 -0
- package/dist/chunks/detection-DW6grIlc.js +1 -0
- package/dist/chunks/diff-B8YmRG5T.js +1 -0
- package/dist/chunks/directoryCompletion-J560aATd.js +1 -0
- package/dist/chunks/dist-B1wOprSs.js +29 -0
- package/dist/chunks/dist-DZQOarNX.js +5 -0
- package/dist/chunks/dist-HZfkKiUF.js +20 -0
- package/dist/chunks/dist-es-4xyrZoNc2.js +1 -0
- package/dist/chunks/dist-es-6kjvVbJd.js +1 -0
- package/dist/chunks/dist-es-BJldFHbt.js +3 -0
- package/dist/chunks/dist-es-BM013UFT.js +1 -0
- package/dist/chunks/dist-es-BPPewn1A.js +1 -0
- package/dist/chunks/dist-es-BZGG3Hnm.js +1 -0
- package/dist/chunks/dist-es-BZjJL64k2.js +1 -0
- package/dist/chunks/dist-es-BctcPxLN.js +1 -0
- package/dist/chunks/dist-es-Bf2jR30y.js +1 -0
- package/dist/chunks/dist-es-BgLoR-hQ.js +1 -0
- package/dist/chunks/dist-es-BismPcTW.js +1 -0
- package/dist/chunks/dist-es-BrPzXmSP.js +1 -0
- package/dist/chunks/dist-es-Bu21Wvhs.js +1 -0
- package/dist/chunks/dist-es-BuWNNAXW.js +1 -0
- package/dist/chunks/dist-es-Bz11sFiK2.js +1 -0
- package/dist/chunks/dist-es-C5VplyPL2.js +5 -0
- package/dist/chunks/dist-es-C66BuLgn.js +1 -0
- package/dist/chunks/dist-es-CCIzgNln2.js +1 -0
- package/dist/chunks/dist-es-CLyx7Kge2.js +1 -0
- package/dist/chunks/dist-es-CUbatGdn.js +1 -0
- package/dist/chunks/dist-es-CYe_-TbD.js +1 -0
- package/dist/chunks/dist-es-C_IHUdzL.js +1 -0
- package/dist/chunks/dist-es-Ci_rKlMr.js +1 -0
- package/dist/chunks/dist-es-ClDZBAj7.js +1 -0
- package/dist/chunks/dist-es-Cp--qjOi.js +1 -0
- package/dist/chunks/dist-es-CzE4kW1L.js +9 -0
- package/dist/chunks/dist-es-DUg5w7-v.js +1 -0
- package/dist/chunks/dist-es-Dl0ZRczY.js +1 -0
- package/dist/chunks/dist-es-Do_155z5.js +1 -0
- package/dist/chunks/dist-es-DxIM0jd82.js +1 -0
- package/dist/chunks/dist-es-Fav2oBDs.js +1 -0
- package/dist/chunks/dist-es-TZjwPaGn.js +1 -0
- package/dist/chunks/dist-es-W22ud2el2.js +1 -0
- package/dist/chunks/dist-es-aU8-02YH.js +1 -0
- package/dist/chunks/dist-es-b3yZSGx82.js +1 -0
- package/dist/chunks/dist-es-dIP5JtXz.js +5 -0
- package/dist/chunks/dist-es-mQ4HvnYs2.js +1 -0
- package/dist/chunks/distRoot-CJaacAHy.js +1 -0
- package/dist/chunks/doctor-DLZPF4iY.js +1 -0
- package/dist/chunks/earlyInput-BTI1CSNt.js +2 -0
- package/dist/chunks/earlyInput-BwGtzhhP.js +1 -0
- package/dist/chunks/effort-BaHvpBWr.js +9 -0
- package/dist/chunks/entry-_e-lyRwv.js +14 -0
- package/dist/chunks/env-CesrOJJq.js +1 -0
- package/dist/chunks/envLessBridgeConfig-4oys0_9A.js +1 -0
- package/dist/chunks/envLessBridgeConfig-DJ1Sts3F.js +1 -0
- package/dist/chunks/envUtils-CFG7IQID.js +1 -0
- package/dist/chunks/errorLogSink-Ti4Suoz6.js +2 -0
- package/dist/chunks/escHotkey-CVn_80xM.js +259 -0
- package/dist/chunks/esm-BFnjHW38.js +1 -0
- package/dist/chunks/esm-BQg_LX3V.js +1 -0
- package/dist/chunks/esm-BtC6CMmM.js +1 -0
- package/dist/chunks/esm-BwzC0MQp.js +1 -0
- package/dist/chunks/esm-CFybeQ_Q.js +1 -0
- package/dist/chunks/esm-CK-5CT5X.js +1 -0
- package/dist/chunks/esm-CL1OwlZB.js +1 -0
- package/dist/chunks/esm-CMzgSTAl.js +1 -0
- package/dist/chunks/esm-CPE_H2Lx.js +1 -0
- package/dist/chunks/esm-CcWquv5a.js +10 -0
- package/dist/chunks/esm-CeNEpRZt.js +1 -0
- package/dist/chunks/esm-D7hykoRB.js +1 -0
- package/dist/chunks/esm-DUtcefEV.js +1 -0
- package/dist/chunks/esm-DhrUwJBp.js +1 -0
- package/dist/chunks/esm-Duu1fRQ8.js +1 -0
- package/dist/chunks/esm-Ght2BaU2.js +1 -0
- package/dist/chunks/esm-Q6Yz2GMx.js +56 -0
- package/dist/chunks/esm-WONEiurY.js +13 -0
- package/dist/chunks/event-streams-BumpU1aB.js +1 -0
- package/dist/chunks/eventLoopStallDetector-DxyFdg1h.js +1 -0
- package/dist/chunks/execAsync-ChKxDZ8C.js +1 -0
- package/dist/chunks/execFileNoThrow-DdmR1mBS.js +1 -0
- package/dist/chunks/execSyncWrapper-Ch4TNj8u.js +1 -0
- package/dist/chunks/execa-BMaINL7N.js +34 -0
- package/dist/chunks/executor-C7INr19-.js +1 -0
- package/dist/chunks/executor-Dnf3YYma.js +1604 -0
- package/dist/chunks/exit-BakzsOD0.js +1 -0
- package/dist/chunks/exit-CiDn2tN9.js +2 -0
- package/dist/chunks/export-b-6pqMqz.js +2 -0
- package/dist/chunks/exportRenderer-RxtEIyTm.js +1 -0
- package/dist/chunks/extra-usage-7EPJNjNW.js +1 -0
- package/dist/chunks/extra-usage-ChvuewCq.js +1 -0
- package/dist/chunks/extra-usage-core-BVhLtoDF.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-_Njh6q-q.js +1 -0
- package/dist/chunks/extraUsage-qOBMQB6g.js +1 -0
- package/dist/chunks/extractMemories-CRBVNiG1.js +1 -0
- package/dist/chunks/fast-C4uw_g7o.js +1 -0
- package/dist/chunks/fast-CEaIzaPl.js +1 -0
- package/dist/chunks/featureCheck-B1GSTyhh.js +1 -0
- package/dist/chunks/featureCheck-DKigAPal.js +1 -0
- package/dist/chunks/feedback-Bf3TjjuD.js +1 -0
- package/dist/chunks/figures-fES5sASd.js +1 -0
- package/dist/chunks/fileStateCache-DAsLEZau.js +1 -0
- package/dist/chunks/files-B-m_4X8b.js +2 -0
- package/dist/chunks/findExecutable-D8vJrFnO.js +1 -0
- package/dist/chunks/firstPartyEventLogger-BtrGagNa.js +1 -0
- package/dist/chunks/flushGate-2zqab-Pp.js +1 -0
- package/dist/chunks/foundry-sdk-CtX8C0x3.js +1 -0
- package/dist/chunks/fpsMetrics-ts_jaF3g.js +1 -0
- package/dist/chunks/fuse-ivQ_eRwF.js +1 -0
- package/dist/chunks/gates-CmKoQ0O-.js +1 -0
- package/dist/chunks/gates-_wbPDQ3M.js +1 -0
- package/dist/chunks/gemini-DRx495gn.js +3 -0
- package/dist/chunks/generateRecap-Cv8gd_QF.js +1 -0
- package/dist/chunks/generateSessionName-Dpjg-u_x.js +1 -0
- package/dist/chunks/genericProcessUtils-BFJMxLqn.js +23 -0
- package/dist/chunks/getMachineId-bsd-C9pL9Ajr.js +1 -0
- package/dist/chunks/getMachineId-darwin-Ma4F9rJg.js +2 -0
- package/dist/chunks/getMachineId-linux-C0lXMqsj.js +1 -0
- package/dist/chunks/getMachineId-unsupported-ByHQTXat.js +1 -0
- package/dist/chunks/getMachineId-win-DZsXZmTz.js +1 -0
- package/dist/chunks/git-Bj8Ow4pJ.js +6 -0
- package/dist/chunks/git-Q_b4oZ17.js +1 -0
- package/dist/chunks/githubRepoPathMapping-DGivBX9h.js +1 -0
- package/dist/chunks/goal-BrHEJv8o.js +3 -0
- package/dist/chunks/goalStorage-CsuPOQbk.js +1 -0
- package/dist/chunks/graceful-fs-BuPWC-vB.js +2 -0
- package/dist/chunks/grok-CDkDDaY_.js +1 -0
- package/dist/chunks/growthbook-D3_Cr9n-.js +1 -0
- package/dist/chunks/growthbook-p4aJ_UMv.js +32 -0
- package/dist/chunks/hash-KW-tVnPp.js +1 -0
- package/dist/chunks/heapdump-CloylIZ9.js +5 -0
- package/dist/chunks/help-DpSJlHIc.js +1 -0
- package/dist/chunks/hooks-2pogt8nv.js +79 -0
- package/dist/chunks/hooks-BBODdwnE.js +1 -0
- package/dist/chunks/hostAdapter-B5KTUqhv.js +1 -0
- package/dist/chunks/hostGuard-DyWr2TwE.js +1 -0
- package/dist/chunks/httpAuthSchemes-CgPbtGos.js +13 -0
- package/dist/chunks/ide-CJEcfBZq.js +2 -0
- package/dist/chunks/inboundAttachments-RNpYpRTO.js +1 -0
- package/dist/chunks/index.min-DCDiLq-j.js +1 -0
- package/dist/chunks/initReplBridge-D2E6IM2B.js +1 -0
- package/dist/chunks/initReplBridge-p2uwDBPx.js +1 -0
- package/dist/chunks/insights-DnpZScKs.js +822 -0
- package/dist/chunks/install-D_vTxUlG.js +1 -0
- package/dist/chunks/install-github-app-BK8A7g3i.js +147 -0
- package/dist/chunks/install-slack-app-C47R9VoI.js +1 -0
- package/dist/chunks/instinctParser-DxKdI3JC.js +1 -0
- package/dist/chunks/instrumentation-DkdAJFrZ.js +12 -0
- package/dist/chunks/intl-Pse97ORk.js +1 -0
- package/dist/chunks/isObject-DaxDnPKm.js +1 -0
- package/dist/chunks/isSymbol-D7QeUnS5.js +1 -0
- package/dist/chunks/job-opl00C4l.js +2 -0
- package/dist/chunks/json-bigint-BRRVs1dv.js +8 -0
- package/dist/chunks/jsx-runtime-BTgGEFjL.js +1 -0
- package/dist/chunks/jws-B_ieuaZg.js +3 -0
- package/dist/chunks/jwtUtils-D-tJzoJY.js +1 -0
- package/dist/chunks/keybindings-mRf9VSe8.js +2 -0
- package/dist/chunks/lang-eH4EJErj.js +1 -0
- package/dist/chunks/language-DD9ar6RA.js +1 -0
- package/dist/chunks/language-EZLNdETg.js +1 -0
- package/dist/chunks/launchAgentsPlatform-Cq0_7-IM.js +1 -0
- package/dist/chunks/launchAutofixPr-Bw7aUHUs.js +18 -0
- package/dist/chunks/launchCommand-Bk1Fn-qZ.js +1 -0
- package/dist/chunks/launchLocalMemory-CLBCUgwd.js +3 -0
- package/dist/chunks/launchLocalVault-BfWJWrBg.js +3 -0
- package/dist/chunks/launchMemoryStores-DdnSVSDZ.js +1 -0
- package/dist/chunks/launchOnboarding-ziCEX3GI.js +8 -0
- package/dist/chunks/launchSchedule-G_c7sgmy.js +1 -0
- package/dist/chunks/launchSkillStore-Z1Kd7nCg.js +1 -0
- package/dist/chunks/launchTeleport-Dp9AFbPx.js +3 -0
- package/dist/chunks/launchVault-hwK-Ljek.js +1 -0
- package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
- package/dist/chunks/lib-BHRYgENJ.js +8 -0
- package/dist/chunks/lib-DRyNc7xD.js +2 -0
- package/dist/chunks/lib-Ddq71jM5.js +14 -0
- package/dist/chunks/loadAgentsDir-Bz0FfcVt.js +5620 -0
- package/dist/chunks/loadAgentsDir-CLM0ws7u.js +1 -0
- package/dist/chunks/loadPluginHooks-B5SIS2uo.js +1 -0
- package/dist/chunks/loadSso-RY87rrJO.js +1 -0
- package/dist/chunks/localSearch-BLF6PSv2.js +1 -0
- package/dist/chunks/localSearch-CTycGe3E.js +1 -0
- package/dist/chunks/localSearch-inDahM8I.js +1 -0
- package/dist/chunks/lockfile--gk1HDM6.js +1 -0
- package/dist/chunks/log-B-Nj3Yed.js +1 -0
- package/dist/chunks/log-DVv8YiNo.js +1 -0
- package/dist/chunks/login-BeLvLowc.js +1 -0
- package/dist/chunks/login-DUUOeNoz.js +1 -0
- package/dist/chunks/logoV2Utils-D5SpeZ3C.js +1 -0
- package/dist/chunks/logout-C2QuTBdS.js +1 -0
- package/dist/chunks/magicDocs-CUXKi-Wv.js +57 -0
- package/dist/chunks/main-CFhpWtpC.js +1420 -0
- package/dist/chunks/main-sboa5RKc.js +31 -0
- package/dist/chunks/mappers-DLkk0PZz.js +1 -0
- package/dist/chunks/mcp-C2f6IgAp.js +2 -0
- package/dist/chunks/mcp-Djui9m3_.js +6 -0
- package/dist/chunks/mcp-DvTSxrJ4.js +1 -0
- package/dist/chunks/mcpServer-DMA0bdFC.js +1 -0
- package/dist/chunks/mcpServer-DxEHfW2v.js +1 -0
- package/dist/chunks/memoize-Bg2dXTzV.js +1 -0
- package/dist/chunks/memoize-DNnuA2aU.js +1 -0
- package/dist/chunks/memory-B9io9Zcv.js +1 -0
- package/dist/chunks/mobile-CPnnvkQV.js +2 -0
- package/dist/chunks/modalContext-B1b0Gsro.js +1 -0
- package/dist/chunks/mode-BDgwh_Xb.js +2 -0
- package/dist/chunks/model-B6cpEh-s.js +1 -0
- package/dist/chunks/model-BcunOCC9.js +1 -0
- package/dist/chunks/modelOptions-CHUHQ9WG.js +1 -0
- package/dist/chunks/normalization-cjPqid31.js +1 -0
- package/dist/chunks/oauth-CnBLewrU.js +1 -0
- package/dist/chunks/oauth-DMPGYAoZ.js +1 -0
- package/dist/chunks/observationStore-DVBxrSdI.js +4 -0
- package/dist/chunks/onChangeAppState-M61XDN6V.js +1 -0
- package/dist/chunks/open-CsUNPSNx.js +1 -0
- package/dist/chunks/openai-BHvlYW3m.js +2 -0
- package/dist/chunks/output-style-BtKuBrs4.js +1 -0
- package/dist/chunks/outputStyles-hHuIBkRB.js +84 -0
- package/dist/chunks/overageCreditGrant-BLFT-rF3.js +1 -0
- package/dist/chunks/p-map-C-WNcN6g.js +1 -0
- package/dist/chunks/p-map-CQ2NythB.js +1 -0
- package/dist/chunks/package-9IAs5Qf0.js +1 -0
- package/dist/chunks/panel-27xLZI7c.js +1 -0
- package/dist/chunks/panel-NoDfShEZ.js +1 -0
- package/dist/chunks/panelCall-CEOWVNCM.js +1 -0
- package/dist/chunks/parseConnectUrl-CxU4IX9o.js +1 -0
- package/dist/chunks/parser-DGlAnaNj.js +1 -0
- package/dist/chunks/parser-DGoLe2RS.js +1 -0
- package/dist/chunks/passes-CExcqu66.js +1 -0
- package/dist/chunks/path-uaxlnhva.js +1 -0
- package/dist/chunks/permissions-B3PceQul.js +1 -0
- package/dist/chunks/permissions-DezIL2xF.js +3 -0
- package/dist/chunks/permissions-DnpI8Whh.js +1 -0
- package/dist/chunks/pipeTransport-CB_Wq_Kx.js +1 -0
- package/dist/chunks/plan-cfZBclh9.js +1 -0
- package/dist/chunks/platform-BXz_rgpy.js +2 -0
- package/dist/chunks/plist-DLGDWBD6.js +6 -0
- package/dist/chunks/plugin-CuhENLRs.js +1 -0
- package/dist/chunks/pluginAutoupdate-wTeOXfQe.js +1 -0
- package/dist/chunks/pluginBlocklist-D6pkKfXr.js +1 -0
- package/dist/chunks/pluginCliCommands-DqxdCwsq.js +1 -0
- package/dist/chunks/pluginFlagging-CjH48f-K.js +1 -0
- package/dist/chunks/pluginOperations-DMFYB3pK.js +2 -0
- package/dist/chunks/pluginStartupCheck-BW3_KfZz.js +1 -0
- package/dist/chunks/pluginStartupCheck-Cj2BMjVw.js +1 -0
- package/dist/chunks/plugins-CarsG2v8.js +4 -0
- package/dist/chunks/policyLimits-DFn1vHkN.js +1 -0
- package/dist/chunks/pollConfig-C8nODJY1.js +1 -0
- package/dist/chunks/poller-DXZJ-dUP.js +1 -0
- package/dist/chunks/poor-C7GQ4a5X.js +1 -0
- package/dist/chunks/poorMode-CBe0rfxB.js +1 -0
- package/dist/chunks/poorMode-CbZTudtw.js +1 -0
- package/dist/chunks/postCommitAttribution--vvAWIqD.js +1 -0
- package/dist/chunks/print-CwwtGSbK.js +114 -0
- package/dist/chunks/privacy-settings-Bz8cAVp5.js +11 -0
- package/dist/chunks/privacyLevel-CRCHhztk.js +1 -0
- package/dist/chunks/process-CnhUplBr.js +1 -0
- package/dist/chunks/process-X4vCP9x0.js +1 -0
- package/dist/chunks/processBashCommand-NL0YEUqW.js +3 -0
- package/dist/chunks/processSlashCommand-FPMWElsI.js +6 -0
- package/dist/chunks/processSlashCommand-_oJs6_w8.js +6 -0
- package/dist/chunks/processUserInput-QAJK0XSn.js +1 -0
- package/dist/chunks/projectContext-B21hXj9q.js +1 -0
- package/dist/chunks/projectContext-DbTQHQS3.js +1 -0
- package/dist/chunks/prompt-C6eleu4x.js +1 -0
- package/dist/chunks/prompt-CUdoQXyN.js +1 -0
- package/dist/chunks/prompt-CsBCtw4l.js +228 -0
- package/dist/chunks/prompt-hnIDYhP4.js +54 -0
- package/dist/chunks/promptEditor-CrlVcc17.js +4 -0
- package/dist/chunks/protectedNamespace-Cn4901XG.js +1 -0
- package/dist/chunks/protocolHandler-DM_w7sJ5.js +13 -0
- package/dist/chunks/protocols-CpoQzjyI.js +7 -0
- package/dist/chunks/proxy-9WvtUy8E.js +99 -0
- package/dist/chunks/rate-limit-options-BehQ3MoX.js +1 -0
- package/dist/chunks/rcDebugLog-BbHlIxCm.js +11 -0
- package/dist/chunks/referral-BfAZEIZL.js +1 -0
- package/dist/chunks/refresh-Bl3Miver.js +1 -0
- package/dist/chunks/registerProtocol-BHZ3vZED.js +36 -0
- package/dist/chunks/registerSkillHooks-BR7v5qDA.js +1 -0
- package/dist/chunks/registry-C2igpRd-.js +1 -0
- package/dist/chunks/release-notes-C_Cou6ye.js +4 -0
- package/dist/chunks/releaseNotes-DveQShyB.js +2 -0
- package/dist/chunks/reload-plugins-D-pAUoB5.js +1 -0
- package/dist/chunks/remote-env-C_dBgbgo.js +1 -0
- package/dist/chunks/remoteBridgeCore-BxWhTy1u.js +1 -0
- package/dist/chunks/remoteControlServer-D3OjUlB-.js +3 -0
- package/dist/chunks/rename-f3m0ETSt.js +1 -0
- package/dist/chunks/renderOptions-QZLxGnh_.js +1 -0
- package/dist/chunks/replBridge-qeVmCJOb.js +1 -0
- package/dist/chunks/resume-CM_8p9Iu.js +2 -0
- package/dist/chunks/rewind-0cB7o6fx.js +1 -0
- package/dist/chunks/ripgrep-BEWqxrpl.js +5 -0
- package/dist/chunks/ripgrep-G82m12Ng.js +1 -0
- package/dist/chunks/rollback-CVo2gqgR.js +11 -0
- package/dist/chunks/runtimeObserver-1EdvvoYw.js +1 -0
- package/dist/chunks/runtimeObserver-CX6vepq9.js +10 -0
- package/dist/chunks/sandbox-adapter-DzHfW2tH.js +1 -0
- package/dist/chunks/sandbox-toggle-N6KgmH2T.js +1 -0
- package/dist/chunks/sanitization-CIBpY9KT.js +1 -0
- package/dist/chunks/satisfies-B7ZvBUQP.js +1 -0
- package/dist/chunks/schemas-Bwt-7U5W.js +40 -0
- package/dist/chunks/sdk-Drp69kIx.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor-B9GVkISU.js +1 -0
- package/dist/chunks/searchExtraTools-BphNJsl8.js +1 -0
- package/dist/chunks/semver-BsItM2Z4.js +1 -0
- package/dist/chunks/semver-D3lOjiBN.js +1 -0
- package/dist/chunks/sentry-ySzRCXGd.js +1 -0
- package/dist/chunks/server-C8nMDji6.js +1 -0
- package/dist/chunks/server-XZG51Slr.js +1 -0
- package/dist/chunks/serverBanner-D68EBGzH.js +1 -0
- package/dist/chunks/serverLog-hv2hc5US.js +1 -0
- package/dist/chunks/session-CVoGFb8a.js +2 -0
- package/dist/chunks/sessionDataUploader-BaD1Q7v3.js +1 -0
- package/dist/chunks/sessionDiscovery-D7g66TX6.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-9lPjspRX.js +1 -0
- package/dist/chunks/sessionManager-BhOjMNAP.js +1 -0
- package/dist/chunks/sessionMemory-BA6cdxqP.js +1 -0
- package/dist/chunks/sessionMemory-CtEhIRGF.js +1 -0
- package/dist/chunks/sessionMemoryUtils-D_B92ypa.js +1 -0
- package/dist/chunks/sessionObserver-CESI-uVZ.js +1 -0
- package/dist/chunks/sessionObserver-SpE_eglb.js +20 -0
- package/dist/chunks/sessionRestore-DqsqYK4K.js +1 -0
- package/dist/chunks/sessionState-Dgky34M4.js +1 -0
- package/dist/chunks/sessionStorage-DJb5HKhQ.js +1 -0
- package/dist/chunks/sessionStorage-DSMfHTcg.js +1 -0
- package/dist/chunks/sessionStoragePortable-DyM_hZnp.js +3 -0
- package/dist/chunks/sessionTitle-Bzxk_EW9.js +14 -0
- package/dist/chunks/sessionTracing-DR8O0686.js +12 -0
- package/dist/chunks/setup-BHNS9sBS.js +9 -0
- package/dist/chunks/setup-BafJxZ0F.js +4 -0
- package/dist/chunks/setup-MLNNYLi6.js +1 -0
- package/dist/chunks/shadowedRuleDetection-Ch9gTxfD.js +1 -0
- package/dist/chunks/shellQuote-3s6tV-hK.js +1 -0
- package/dist/chunks/sideQuestion-BBn6XIOD.js +20 -0
- package/dist/chunks/signal-BTxmab6r.js +1 -0
- package/dist/chunks/signin-ChbUAEGq.js +1 -0
- package/dist/chunks/sink-B1qICbRh.js +1 -0
- package/dist/chunks/sink-yBIcxQf1.js +1 -0
- package/dist/chunks/sinks-C7weduDR.js +1 -0
- package/dist/chunks/skill-learning-08nEdOJ2.js +5 -0
- package/dist/chunks/skillGapStore-CuvWGqFb.js +5 -0
- package/dist/chunks/skillGapStore-DmMuDXKO.js +1 -0
- package/dist/chunks/skillGenerator-mEMjcmmm.js +8 -0
- package/dist/chunks/skillLearning-B3a-8Ys3.js +1 -0
- package/dist/chunks/skillLearning-q5T6o0mH.js +1 -0
- package/dist/chunks/skillPanel-BuUMhONI.js +28 -0
- package/dist/chunks/skillSearchPanel-BUEv7Sm9.js +21 -0
- package/dist/chunks/skillUsageTracking-BBTiWOKB.js +1 -0
- package/dist/chunks/skills-DvQuQfDW.js +1 -0
- package/dist/chunks/slashCommandParsing-BkTC3GRb.js +1 -0
- package/dist/chunks/sleep-CC8jykQd.js +1 -0
- package/dist/chunks/slowOperations-niPqC54V.js +1 -0
- package/dist/chunks/sprites-C5X62Vyh.js +1 -0
- package/dist/chunks/src-58uAJYF_.js +6 -0
- package/dist/chunks/src-7Y8fx6gl.js +2 -0
- package/dist/chunks/src-BuserDTl.js +1 -0
- package/dist/chunks/src-CMY4XoRy.js +1 -0
- package/dist/chunks/src-CfeAM1FB.js +1 -0
- package/dist/chunks/src-CxT2FDXy.js +1 -0
- package/dist/chunks/src-CyQf7rVu.js +26 -0
- package/dist/chunks/src-DJLbU8sT.js +1 -0
- package/dist/chunks/src-DJQlyVK6.js +5 -0
- package/dist/chunks/src-DNHWYkls.js +53 -0
- package/dist/chunks/src-DU_g0n_Q.js +1 -0
- package/dist/chunks/src-DhqzQjMg.js +19 -0
- package/dist/chunks/src-Duzv1Znh.js +1 -0
- package/dist/chunks/src-OBx6GAig.js +1 -0
- package/dist/chunks/src-WjnK2Dbo.js +1 -0
- package/dist/chunks/src-hjAMxWFj.js +7 -0
- package/dist/chunks/src-lLwoqdC0.js +9 -0
- package/dist/chunks/src-yRsWbJp_.js +2 -0
- package/dist/chunks/sso-oidc-yfC-A2A2.js +1 -0
- package/dist/chunks/startupProfiler-4P7GdVw6.js +3 -0
- package/dist/chunks/startupProfiler-CipS0otN.js +1 -0
- package/dist/chunks/state-9wSimHaL.js +1 -0
- package/dist/chunks/state-BQkyHx88.js +1 -0
- package/dist/chunks/state-CEAUTY3A.js +1 -0
- package/dist/chunks/state-CUZTq6r0.js +1 -0
- package/dist/chunks/state-U0HNbTx8.js +1 -0
- package/dist/chunks/staticRender-BB3CisKd.js +1 -0
- package/dist/chunks/stats-Dyi2U_mq.js +1 -0
- package/dist/chunks/status-CSL-GMou.js +1 -0
- package/dist/chunks/statusNoticeHelpers-BaXE951d.js +1 -0
- package/dist/chunks/stdio-BuUJYJFs.js +3 -0
- package/dist/chunks/stdio-iX0TTmbp.js +1 -0
- package/dist/chunks/stickers-2CRSckfH.js +1 -0
- package/dist/chunks/store-DdfsZvtr.js +1 -0
- package/dist/chunks/stringUtils-U7kMYMJq.js +4 -0
- package/dist/chunks/sts-CJmdeT7s.js +1 -0
- package/dist/chunks/subprocessEnv-DKTILev5.js +1 -0
- package/dist/chunks/subprocessEnv-WjRguKWf.js +1 -0
- package/dist/chunks/supports-color-DaytqqjM.js +1 -0
- package/dist/chunks/systemPromptSections-BnrxBWdc.js +1 -0
- package/dist/chunks/systemPromptSections-Dk6azdAb.js +1 -0
- package/dist/chunks/systemTheme-C1GNqIfy.js +1 -0
- package/dist/chunks/tag-C4cH016L.js +11 -0
- package/dist/chunks/tasks-CEdUW3RQ.js +1 -0
- package/dist/chunks/teamHelpers-CTA_CtTT.js +1 -0
- package/dist/chunks/teamHelpers-D65qZInv.js +1 -0
- package/dist/chunks/teammate-C-FiRloZ.js +1 -0
- package/dist/chunks/teammateModeSnapshot-DWRG5-Us.js +1 -0
- package/dist/chunks/teammateModeSnapshot-DtgsNj1G.js +1 -0
- package/dist/chunks/teleport-C_UgMy0V.js +1 -0
- package/dist/chunks/templateJobs-CMbS0tuk.js +12 -0
- package/dist/chunks/terminalSetup--jwGVap8.js +33 -0
- package/dist/chunks/terminalSetup-zID-wokH.js +1 -0
- package/dist/chunks/theme-C6XwTpVy.js +1 -0
- package/dist/chunks/thinkback-CVLnmLAT.js +1 -0
- package/dist/chunks/thinkback-MeOOO7gf.js +1 -0
- package/dist/chunks/thinkback-play-D7G260F4.js +1 -0
- package/dist/chunks/tmux-DtYJuTWh.js +1 -0
- package/dist/chunks/toolEventObserver-BtC9xDYY.js +1 -0
- package/dist/chunks/toolEventObserver-MfsHAt8h.js +1 -0
- package/dist/chunks/toolPool-CEi_2xIH.js +1 -0
- package/dist/chunks/toolPool-CdYJcCnc.js +1 -0
- package/dist/chunks/trustedDevice-CjQTGAa4.js +1 -0
- package/dist/chunks/trustedDevice-DADcxAAs.js +1 -0
- package/dist/chunks/tui-B8Ijq4Pk.js +6 -0
- package/dist/chunks/turndown.es-T-Xe93nc.js +69 -0
- package/dist/chunks/types-BVelRhgb.js +17 -0
- package/dist/chunks/types-Bqp3meR4.js +1 -0
- package/dist/chunks/types-CNmINIu3.js +1 -0
- package/dist/chunks/types-DgzOOCDl.js +3 -0
- package/dist/chunks/udsClient-ClY_0CKr.js +1 -0
- package/dist/chunks/ultrareviewCommand-CqvHj9Io.js +3 -0
- package/dist/chunks/undercover-CVCVOSrs.js +1 -0
- package/dist/chunks/undercover-CbxiJO2b.js +31 -0
- package/dist/chunks/up-CBJhVVbd.js +12 -0
- package/dist/chunks/updateCCB-DPPpquAw.js +11 -0
- package/dist/chunks/upgrade-DaaHOvft.js +1 -0
- package/dist/chunks/upgrade-k7ZvAWZ0.js +1 -0
- package/dist/chunks/upload-CEDxwMa1.js +1 -0
- package/dist/chunks/upstreamproxy-BtGJ2LRi.js +11 -0
- package/dist/chunks/usage-CsUSu4fb.js +1 -0
- package/dist/chunks/usage-oABvixCs.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CBce_-hb.js +1 -0
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-CLYjTZXb.js +1 -0
- package/dist/chunks/useKeybinding-DAQL_dB_.js +1 -0
- package/dist/chunks/useMainLoopModel-QC_H3esG.js +1 -0
- package/dist/chunks/useManageMCPConnections-bf-VfJGD.js +1 -0
- package/dist/chunks/useManagePlugins-CXdYUpit.js +1 -0
- package/dist/chunks/useMergedTools-DERzhQOJ.js +1 -0
- package/dist/chunks/useSearchInput-nqhdILI2.js +1 -0
- package/dist/chunks/useTerminalSize-DzV4aaTi.js +1 -0
- package/dist/chunks/useVoice-CO69xtWC.js +1 -0
- package/dist/chunks/util-C8wqPqv0.js +1 -0
- package/dist/chunks/utils-CDFsSXHr.js +1 -0
- package/dist/chunks/utils-ZO5TryVH.js +1 -0
- package/dist/chunks/v4-DLhvDPkt.js +1 -0
- package/dist/chunks/validatePlugin-C4cd71Yz.js +1 -0
- package/dist/chunks/vertex-sdk-CC3U26o7.js +9 -0
- package/dist/chunks/vim-BNiQx5Vf.js +1 -0
- package/dist/chunks/voice-BCbnJzYL.js +8 -0
- package/dist/chunks/voice-BJyz9KZO.js +8 -0
- package/dist/chunks/voice-CP2ULpju.js +2 -0
- package/dist/chunks/voiceModeEnabled-C-pa8B3Q.js +1 -0
- package/dist/chunks/voiceModeEnabled-CMtRN2pa.js +1 -0
- package/dist/chunks/voiceStreamSTT-31b2u0rj.js +1 -0
- package/dist/chunks/voiceStreamSTT-Fkhm6Ftg.js +1 -0
- package/dist/chunks/voiceStreamSTT-sI-hg-aP.js +1 -0
- package/dist/chunks/web-tools-CLmlPgLk.js +1 -0
- package/dist/chunks/which-C0ex-06E.js +1 -0
- package/dist/chunks/windowsPaths-C5TNvKYu.js +1 -0
- package/dist/chunks/windowsPaths-Kue_7s52.js +1 -0
- package/dist/chunks/workSecret-Dh5Ayceu.js +1 -0
- package/dist/chunks/workerRegistry-B5iWYqpK.js +1 -0
- package/dist/chunks/worktree-BypJA0GB.js +1 -0
- package/dist/chunks/worktreeModeEnabled-DPTdK3JV.js +1 -0
- package/dist/chunks/worktreeModeEnabled-Dtrcn7eD.js +1 -0
- package/dist/chunks/wrapper-BDPb4PTV.js +6 -0
- package/dist/chunks/wrapper-DRTs77RK.js +1 -0
- package/dist/chunks/xdg-BaVL-FHd.js +1 -0
- package/dist/chunks/xml-E8VMPwdJ.js +1 -0
- package/dist/chunks/zod-B_P2Eo_D.js +1 -0
- package/dist/cli-bun.js +2 -0
- package/dist/cli-node.js +2 -0
- package/dist/cli.js +2 -0
- package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
- package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
- package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/package.json +233 -0
- package/scripts/postinstall.cjs +389 -0
- package/scripts/run-parallel.mjs +10 -0
- package/scripts/setup-chrome-mcp.mjs +70 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-DNHWYkls.js";import{t as o}from"./jsx-runtime-BTgGEFjL.js";import{W as s,_s as c,ls as l,nt as u,xs as d}from"./growthbook-p4aJ_UMv.js";import{RT as f,zT as p}from"./loadAgentsDir-Bz0FfcVt.js";import{i as m,r as h}from"./bridgeEnabled-DKqmLnKO.js";import{n as g,t as _}from"./PermissionDialog-BCS22yEO.js";function v({onDone:e}){let t=(0,b.useRef)(e);t.current=e;let n=(0,b.useCallback)(()=>{t.current(`dismiss`)},[]);(0,b.useEffect)(()=>{d(e=>e.remoteDialogSeen?e:{...e,remoteDialogSeen:!0})},[]);let i=(0,b.useCallback)(e=>{t.current(e)},[]);return(0,x.jsx)(_,{title:`Remote Control`,children:(0,x.jsxs)(a,{flexDirection:`column`,paddingX:2,paddingY:1,children:[(0,x.jsxs)(a,{marginBottom:1,flexDirection:`column`,children:[(0,x.jsx)(r,{children:`Remote Control lets you access this CLI session from the web (claude.ai/code) or the Claude app, so you can pick up where you left off on any device.`}),(0,x.jsx)(r,{children:` `}),(0,x.jsx)(r,{children:`You can disconnect remote access anytime by running /remote-control again.`})]}),(0,x.jsx)(a,{children:(0,x.jsx)(f,{options:[{label:`Enable Remote Control for this session`,description:`Opens a secure connection to claude.ai.`,value:`enable`},{label:`Never mind`,description:`You can always enable it later with /remote-control.`,value:`dismiss`}],onChange:i,onCancel:n})})]})})}function y(){return!(l().remoteDialogSeen||!m()||!s()?.accessToken)}var b,x,S=e((()=>{b=t(n(),1),h(),i(),u(),c(),p(),g(),x=o()}));export{S as n,y as r,v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DR8-3Aex.js";import{n as e,t}from"./defineProperty-CaCI0a5T.js";import{Rn as n,t as r}from"./src-DNHWYkls.js";import{t as i}from"./jsx-runtime-BTgGEFjL.js";import{_s as a,c as o,ls as s,m as c,xs as l}from"./growthbook-p4aJ_UMv.js";import{D as u,E as d,O as f,U as p,l as m,p as h,z as g}from"./debug-CjIaNjpK.js";import{o as _,s as v}from"./log-DVv8YiNo.js";import{l as y,r as b}from"./teammate-C-FiRloZ.js";import{l as x,u as S}from"./oauth-DMPGYAoZ.js";import{_ as C,c as w,g as T,l as E,u as D}from"./proxy-9WvtUy8E.js";import{zT as O}from"./loadAgentsDir-Bz0FfcVt.js";import{a as k,i as A,o as j}from"./teamHelpers-CTA_CtTT.js";import{d as M,o as N}from"./api-YHYC4Zdk.js";import{n as P}from"./PermissionDialog-BCS22yEO.js";import{n as F}from"./DesktopHandoff-5c90JK88.js";import{randomUUID as I}from"crypto";m(),_(),y(),k();function L(){let e=b();if(!e?.teamName||!e?.agentName){h(`[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)`);return}let{teamName:t,agentId:n,agentName:r}=e,i=j(t);if(!i){v(Error(`[computeInitialTeamContext] Could not read team file for ${t}`));return}let a=A(t),o=!n;return h(`[Reconnection] Computed initial team context for ${o?`leader`:`teammate ${r}`} in team ${t}`),{teamName:t,teamFilePath:a,leadAgentId:i.leadAgentId,selfAgentId:n,selfAgentName:r,isLeader:o,teammates:{}}}function R(e,t,n){let r=j(t);if(!r){v(Error(`[initializeTeammateContextFromSession] Could not read team file for ${t} (agent: ${n})`));return}let i=r.members.find(e=>e.name===n);i||h(`[Reconnection] Member ${n} not found in team ${t} - may have been removed`);let a=i?.agentId,o=A(t);e(e=>({...e,teamContext:{teamName:t,teamFilePath:o,leadAgentId:r.leadAgentId,selfAgentId:a,selfAgentName:n,isLeader:!1,teammates:{}}})),h(`[Reconnection] Initialized agent context from session for ${n} in team ${t}`)}n(),r(),c(),a(),O(),F(),P(),i();var z={enable_shortcut_tip:!1,enable_startup_dialog:!1};function B(){return o(`tengu_desktop_upsell`,z)}a();function V(e){let t=s().numStartups;l(n=>{let r=n.tipsHistory??{};return r[e]===t?n:{...n,tipsHistory:{...r,[e]:t}}})}function H(e){let t=s(),n=t.tipsHistory?.[e];return n?t.numStartups-n:1/0}N(),S(),m(),p(),_(),C(),D(),d(),e();var U=2e3,W=5,G=3e4,K=3,q=new Set([4003]);function J(e){return typeof e!=`object`||!e||!(`type`in e)?!1:typeof e.type==`string`}var Y=class{constructor(e,n,r,i){t(this,`ws`,null),t(this,`state`,`closed`),t(this,`reconnectAttempts`,0),t(this,`sessionNotFoundRetries`,0),t(this,`pingInterval`,null),t(this,`reconnectTimer`,null),this.sessionId=e,this.orgUuid=n,this.getAccessToken=r,this.callbacks=i}async connect(){if(this.state===`connecting`){h(`[SessionsWebSocket] Already connecting`);return}this.state=`connecting`;let e=`${x().BASE_API_URL.replace(`http`,`ws`)}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;h(`[SessionsWebSocket] Connecting to ${e}`);let t={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":`2023-06-01`};if(typeof Bun<`u`){let n=new globalThis.WebSocket(e,{headers:t,proxy:E(e),tls:T()||void 0});this.ws=n,n.addEventListener(`open`,()=>{h(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),n.addEventListener(`message`,e=>{let t=typeof e.data==`string`?e.data:String(e.data);this.handleMessage(t)}),n.addEventListener(`error`,()=>{let e=Error(`[SessionsWebSocket] WebSocket error`);v(e),this.callbacks.onError?.(e)}),n.addEventListener(`close`,e=>{h(`[SessionsWebSocket] Closed: code=${e.code} reason=${e.reason}`),this.handleClose(e.code)}),n.addEventListener(`pong`,()=>{h(`[SessionsWebSocket] Pong received`)})}else{let{default:n}=await import(`./wrapper-DRTs77RK.js`),r=new n(e,{headers:t,agent:w(e),...T()});this.ws=r,r.on(`open`,()=>{h(`[SessionsWebSocket] Connection opened, authenticated via headers`),this.state=`connected`,this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),r.on(`message`,e=>{this.handleMessage(e.toString())}),r.on(`error`,e=>{v(Error(`[SessionsWebSocket] Error: ${e.message}`)),this.callbacks.onError?.(e)}),r.on(`close`,(e,t)=>{h(`[SessionsWebSocket] Closed: code=${e} reason=${t.toString()}`),this.handleClose(e)}),r.on(`pong`,()=>{h(`[SessionsWebSocket] Pong received`)})}}handleMessage(e){try{let t=u(e);J(t)?this.callbacks.onMessage(t):h(`[SessionsWebSocket] Ignoring message type: ${typeof t==`object`&&t&&`type`in t?String(t.type):`unknown`}`)}catch(e){v(Error(`[SessionsWebSocket] Failed to parse message: ${g(e)}`))}}handleClose(e){if(this.stopPingInterval(),this.state===`closed`)return;this.ws=null;let t=this.state;if(this.state=`closed`,q.has(e)){h(`[SessionsWebSocket] Permanent close code ${e}, not reconnecting`),this.callbacks.onClose?.();return}if(e===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>K){h(`[SessionsWebSocket] 4001 retry budget exhausted (${K}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(U*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${K}`);return}t===`connected`&&this.reconnectAttempts<W?(this.reconnectAttempts++,this.scheduleReconnect(U,`attempt ${this.reconnectAttempts}/${W}`)):(h(`[SessionsWebSocket] Not reconnecting`),this.callbacks.onClose?.())}scheduleReconnect(e,t){this.callbacks.onReconnecting?.(),h(`[SessionsWebSocket] Scheduling reconnect (${t}) in ${e}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state===`connected`)try{this.ws.ping?.()}catch{}},G)}stopPingInterval(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null)}sendControlResponse(e){if(!this.ws||this.state!==`connected`){v(Error(`[SessionsWebSocket] Cannot send: not connected`));return}h(`[SessionsWebSocket] Sending control response`),this.ws.send(f(e))}sendControlRequest(e){if(!this.ws||this.state!==`connected`){v(Error(`[SessionsWebSocket] Cannot send: not connected`));return}let t={type:`control_request`,request_id:I(),request:e};h(`[SessionsWebSocket] Sending control request: ${e.subtype}`),this.ws.send(f(t))}isConnected(){return this.state===`connected`}close(){h(`[SessionsWebSocket] Closing connection`),this.state=`closed`,this.stopPingInterval(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null)}reconnect(){h(`[SessionsWebSocket] Force reconnecting`),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}};m(),_(),e();function X(e){return e.type!==`control_request`&&e.type!==`control_response`&&e.type!==`control_cancel_request`}var Z=class{constructor(e,n){t(this,`websocket`,null),t(this,`pendingPermissionRequests`,new Map),this.config=e,this.callbacks=n}connect(){h(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`),this.websocket=new Y(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,{onMessage:e=>this.handleMessage(e),onConnected:()=>{h(`[RemoteSessionManager] Connected`),this.callbacks.onConnected?.()},onClose:()=>{h(`[RemoteSessionManager] Disconnected`),this.callbacks.onDisconnected?.()},onReconnecting:()=>{h(`[RemoteSessionManager] Reconnecting`),this.callbacks.onReconnecting?.()},onError:e=>{v(e),this.callbacks.onError?.(e)}}),this.websocket.connect()}handleMessage(e){if(e.type===`control_request`){this.handleControlRequest(e);return}if(e.type===`control_cancel_request`){let{request_id:t}=e,n=this.pendingPermissionRequests.get(t);h(`[RemoteSessionManager] Permission request cancelled: ${t}`),this.pendingPermissionRequests.delete(t),this.callbacks.onPermissionCancelled?.(t,n?.tool_use_id);return}if(e.type===`control_response`){h(`[RemoteSessionManager] Received control response`);return}X(e)&&this.callbacks.onMessage(e)}handleControlRequest(e){let t=e.request_id,n=e.request;if(n.subtype===`can_use_tool`)h(`[RemoteSessionManager] Permission request for tool: ${n.tool_name}`),this.pendingPermissionRequests.set(t,n),this.callbacks.onPermissionRequest(n,t);else{h(`[RemoteSessionManager] Unsupported control request subtype: ${n.subtype}`);let e={type:`control_response`,response:{subtype:`error`,request_id:t,error:`Unsupported control request subtype: ${n.subtype}`}};this.websocket?.sendControlResponse(e)}}async sendMessage(e,t){h(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let n=await M(this.config.sessionId,e,t);return n||v(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`)),n}respondToPermissionRequest(e,t){if(!this.pendingPermissionRequests.get(e)){v(Error(`[RemoteSessionManager] No pending permission request with ID: ${e}`));return}this.pendingPermissionRequests.delete(e);let n={type:`control_response`,response:{subtype:`success`,request_id:e,response:{behavior:t.behavior,...t.behavior===`allow`?{updatedInput:t.updatedInput}:{message:t.message}}}};h(`[RemoteSessionManager] Sending permission response: ${t.behavior}`),this.websocket?.sendControlResponse(n)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){h(`[RemoteSessionManager] Sending interrupt signal`),this.websocket?.sendControlRequest({subtype:`interrupt`})}getSessionId(){return this.config.sessionId}disconnect(){h(`[RemoteSessionManager] Disconnecting`),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){h(`[RemoteSessionManager] Reconnecting WebSocket`),this.websocket?.reconnect()}};function Q(e,t,n,r=!1,i=!1){return{sessionId:e,getAccessToken:t,orgUuid:n,hasInitialPrompt:r,viewerOnly:i}}export{B as a,V as i,Q as n,L as o,H as r,R as s,Z as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,t as a,tn as ee,tt as o,x as s}from"./src-DNHWYkls.js";import{t as c}from"./jsx-runtime-BTgGEFjL.js";import{Ht as l,K as te,Yn as ne}from"./state-CUZTq6r0.js";import{o as u,s as d}from"./log-DVv8YiNo.js";import{n as f,r as p}from"./analytics-i6X1et4O.js";import{BE as re,Ew as m,Gf as ie,HC as ae,HE as oe,In as se,Ir as h,NS as g,Oc as _,Sr as ce,VC as v,Wf as y,Wr as b,Zc as x,br as S,dA as C,dp as w,fp as T,hi as E,jr as D,jy as O,kS as k,nS as A,ni as le,o as ue,qn as de,rS as fe,ti as pe,u as me,uA as he,ww as j,zE as M}from"./loadAgentsDir-Bz0FfcVt.js";import{t as N}from"./useKeybinding-DAQL_dB_.js";import{a as P,i as F,n as I,o as L,r as R,t as ge}from"./crossProjectResume-DxO6TX30.js";import{r as _e}from"./asciicast-HG1EoAQe.js";import{i as ve,n as ye,r as be,t as z}from"./REPL-Clve-8zC.js";import{dirname as xe}from"path";var B=t(r(),1);O(),l(),L(),m(),A(),a(),N(),f(),M(),C(),F(),k(),v(),I(),u(),x(),S();var V=c();function Se(e){let t=parseInt(e,10);if(!isNaN(t)&&t>0)return t;let n=e.match(/github\.com\/[^/]+\/[^/]+\/pull\/(\d+)/);return n?.[1]?parseInt(n[1],10):null}function H({commands:t,worktreePaths:r,initialTools:a,mcpClients:o,dynamicMcpConfig:c,debug:l,mainThreadAgentDefinition:u,autoConnectIdeFlag:f,strictMcpConfig:m=!1,systemPrompt:v,appendSystemPrompt:x,initialSearchQuery:C,disableSlashCommands:O=!1,forkSession:k,taskListId:A,filterByPr:M,thinkingConfig:N,onTurnComplete:F}){let{rows:I}=n(),L=re(e=>e.agentDefinitions),H=oe(),[U,W]=B.useState([]),[Te,G]=B.useState(!0),[Ee,De]=B.useState(!1),[K,Oe]=B.useState(!1),[q,ke]=B.useState(null),[J,Ae]=B.useState(null),Y=B.useRef(null),X=B.useRef(0),Z=B.useMemo(()=>{let e=U.filter(e=>!e.isSidechain);if(M!==void 0){if(M===!0)e=e.filter(e=>e.prNumber!==void 0);else if(typeof M==`number`)e=e.filter(e=>e.prNumber===M);else if(typeof M==`string`){let t=Se(M);t!==null&&(e=e.filter(e=>e.prNumber===t))}}return e},[U,M]),je=ce();B.useEffect(()=>{h(r).then(e=>{Y.current=e,X.current=e.logs.length,W(e.logs),G(!1)}).catch(e=>{d(e),G(!1)})},[r]);let Q=B.useCallback(e=>{let t=Y.current;!t||t.nextIndex>=t.allStatLogs.length||de(t.allStatLogs,t.nextIndex,e).then(n=>{if(t.nextIndex=n.nextIndex,n.logs.length>0){let e=X.current;n.logs.forEach((t,n)=>{t.value=e+n}),W(e=>e.concat(n.logs)),X.current+=n.logs.length}else t.nextIndex<t.allStatLogs.length&&Q(e)})},[]),$=B.useCallback(e=>{G(!0),(e?D():h(r)).then(e=>{Y.current=e,X.current=e.logs.length,W(e.logs)}).catch(e=>{d(e)}).finally(()=>{G(!1)})},[r]),Me=B.useCallback(()=>{let e=!K;Oe(e),$(e)},[K,$]);function Ne(){process.exit(1)}async function Pe(t){De(!0);let n=performance.now(),i=ge(t,K,r);if(i.isCrossProject&&!i.isSameRepoWorktree){let e=i.command,t=await ee(e);t&&process.stdout.write(t),Ae(e);return}try{let r=await ae(t,void 0);if(!r)throw Error(`Failed to load conversation`);{let t=(T(),e(w)).matchSessionMode(r.mode);if(t){let{getAgentDefinitionsWithOverrides:n,getActiveAgentsFromList:i}=(ue(),e(me));n.cache.clear?.();let a=await n(te());H(e=>({...e,agentDefinitions:{...a,allAgents:a.allAgents,activeAgents:i(a.allAgents)}})),r.messages.push(_(t,`warning`))}}r.sessionId&&!k?(ne(he(r.sessionId),t.fullPath?xe(t.fullPath):null),await _e(),await pe(),fe(r.sessionId)):k&&r.contentReplacements?.length&&await b(r.contentReplacements);let{agentDefinition:i}=be(r.agentSetting,u,L);H(e=>({...e,agent:i?.agentType}));{let{saveMode:t}=(S(),e(E)),{isCoordinatorMode:n}=(T(),e(w));t(n()?`coordinator`:`normal`)}let a=ye(r.agentName,r.agentColor);if(a&&H(e=>({...e,standaloneAgentContext:a})),g(r.agentName),le(k?{...r,worktreeSession:void 0}:r),k||(ve(r.worktreeSession),r.sessionId&&se()),r.goal&&r.sessionId){let{hydrateGoalFromTranscript:t}=(ie(),e(y)),n=new Map;n.set(r.sessionId,r.goal),t(n,r.sessionId)}p(`tengu_session_resumed`,{entrypoint:`picker`,success:!0,resume_duration_ms:Math.round(performance.now()-n)}),W([]),ke({messages:r.messages,fileHistorySnapshots:r.fileHistorySnapshots,contentReplacements:r.contentReplacements,agentName:r.agentName,agentColor:r.agentColor===`default`?void 0:r.agentColor,mainThreadAgentDefinition:i})}catch(e){throw p(`tengu_session_resumed`,{entrypoint:`picker`,success:!1}),d(e),e}}return J?(0,V.jsx)(we,{command:J}):q?(0,V.jsx)(z,{debug:l,commands:t,initialTools:a,initialMessages:q.messages,initialFileHistorySnapshots:q.fileHistorySnapshots,initialContentReplacements:q.contentReplacements,initialAgentName:q.agentName,initialAgentColor:q.agentColor,mcpClients:o,dynamicMcpConfig:c,strictMcpConfig:m,systemPrompt:v,appendSystemPrompt:x,mainThreadAgentDefinition:q.mainThreadAgentDefinition,autoConnectIdeFlag:f,disableSlashCommands:O,taskListId:A,thinkingConfig:N,onTurnComplete:F}):Te?(0,V.jsxs)(s,{children:[(0,V.jsx)(j,{}),(0,V.jsx)(i,{children:` Loading conversations…`})]}):Ee?(0,V.jsxs)(s,{children:[(0,V.jsx)(j,{}),(0,V.jsx)(i,{children:` Resuming conversation…`})]}):Z.length===0?(0,V.jsx)(Ce,{}):(0,V.jsx)(P,{logs:Z,maxHeight:I,onCancel:Ne,onSelect:Pe,onLogsChanged:je?()=>$(K):void 0,onLoadMore:Q,initialSearchQuery:C,showAllProjects:K,onToggleAllProjects:Me,onAgenticSearch:R})}function Ce(){return o(`app:interrupt`,()=>{process.exit(1)},{context:`Global`}),(0,V.jsxs)(s,{flexDirection:`column`,children:[(0,V.jsx)(i,{children:`No conversations found to resume.`}),(0,V.jsx)(i,{dimColor:!0,children:`Press Ctrl+C to exit and start a new conversation.`})]})}function we({command:e}){return B.useEffect(()=>{let e=setTimeout(()=>{process.exit(0)},100);return()=>clearTimeout(e)},[]),(0,V.jsxs)(s,{flexDirection:`column`,gap:1,children:[(0,V.jsx)(i,{children:`This conversation is from a different directory.`}),(0,V.jsxs)(s,{flexDirection:`column`,children:[(0,V.jsx)(i,{children:`To resume, run:`}),(0,V.jsxs)(i,{children:[` `,e]})]}),(0,V.jsx)(i,{dimColor:!0,children:`(Command copied to clipboard)`})]})}export{H as ResumeConversation};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{n as e,t}from"./defineProperty-CaCI0a5T.js";import{n,t as r}from"./axios-Zh7qGPze.js";import{Ga as i,Ka as a}from"./growthbook-p4aJ_UMv.js";import{B as o,D as s,E as c,O as l,U as u,l as d,p as f,z as p}from"./debug-CjIaNjpK.js";import{M as m,j as h}from"./git-Bj8Ow4pJ.js";import{r as g,u as _}from"./proxy-9WvtUy8E.js";import{n as v,t as y}from"./sleep-CC8jykQd.js";import{_ as b,f as x,g as S,n as C,t as w,u as T,v as E,y as D}from"./rcDebugLog-BbHlIxCm.js";import{n as O}from"./jwtUtils-D-tJzoJY.js";import{randomUUID as k}from"crypto";r(),u(),d(),h(),_(),y(),a(),D(),T(),c(),e();var A=class extends Error{constructor(e,t){super(e),this.retryAfterMs=t}},j=class{constructor(e){t(this,`pending`,[]),t(this,`pendingAtClose`,0),t(this,`draining`,!1),t(this,`closed`,!1),t(this,`backpressureResolvers`,[]),t(this,`sleepResolve`,null),t(this,`flushResolvers`,[]),t(this,`droppedBatches`,0),t(this,`config`,void 0),this.config=e}get droppedBatchCount(){return this.droppedBatches}get pendingCount(){return this.closed?this.pendingAtClose:this.pending.length}async enqueue(e){if(this.closed)return;let t=Array.isArray(e)?e:[e];if(t.length!==0){for(;this.pending.length+t.length>this.config.maxQueueSize&&!this.closed;)await new Promise(e=>{this.backpressureResolvers.push(e)});this.closed||(this.pending.push(...t),this.drain())}}flush(){return this.pending.length===0&&!this.draining?Promise.resolve():(this.drain(),new Promise(e=>{this.flushResolvers.push(e)}))}close(){if(!this.closed){this.closed=!0,this.pendingAtClose=this.pending.length,this.pending=[],this.sleepResolve?.(),this.sleepResolve=null;for(let e of this.backpressureResolvers)e();this.backpressureResolvers=[];for(let e of this.flushResolvers)e();this.flushResolvers=[]}}async drain(){if(this.draining||this.closed)return;this.draining=!0;let e=0;try{for(;this.pending.length>0&&!this.closed;){let t=this.takeBatch();if(t.length!==0){try{await this.config.send(t),e=0}catch(n){if(e++,this.config.maxConsecutiveFailures!==void 0&&e>=this.config.maxConsecutiveFailures){this.droppedBatches++,this.config.onBatchDropped?.(t.length,e),e=0,this.releaseBackpressure();continue}this.pending=t.concat(this.pending);let r=n instanceof A?n.retryAfterMs:void 0;await this.sleep(this.retryDelay(e,r));continue}this.releaseBackpressure()}}}finally{if(this.draining=!1,this.pending.length===0){for(let e of this.flushResolvers)e();this.flushResolvers=[]}}}takeBatch(){let{maxBatchSize:e,maxBatchBytes:t}=this.config;if(t===void 0)return this.pending.splice(0,e);let n=0,r=0;for(;r<this.pending.length&&r<e;){let e;try{e=Buffer.byteLength(l(this.pending[r]))}catch{this.pending.splice(r,1);continue}if(r>0&&n+e>t)break;n+=e,r++}return this.pending.splice(0,r)}retryDelay(e,t){let n=Math.random()*this.config.jitterMs;return t===void 0?Math.min(this.config.baseDelayMs*2**(e-1),this.config.maxDelayMs)+n:Math.max(this.config.baseDelayMs,Math.min(t,this.config.maxDelayMs))+n}releaseBackpressure(){let e=this.backpressureResolvers;this.backpressureResolvers=[];for(let t of e)t()}sleep(e){return new Promise(t=>{this.sleepResolve=t,setTimeout((e,t)=>{e.sleepResolve=null,t()},e,this,t)})}};e();var M=class{constructor(e){t(this,`inflight`,null),t(this,`pending`,null),t(this,`closed`,!1),t(this,`config`,void 0),this.config=e}enqueue(e){this.closed||(this.pending=this.pending?N(this.pending,e):e,this.drain())}close(){this.closed=!0,this.pending=null}async drain(){if(this.inflight||this.closed||!this.pending)return;let e=this.pending;this.pending=null,this.inflight=this.sendWithRetry(e).then(()=>{this.inflight=null,this.pending&&!this.closed&&this.drain()})}async sendWithRetry(e){let t=e,n=0;for(;!this.closed;){if(await this.config.send(t))return;n++,await v(this.retryDelay(n)),this.pending&&!this.closed&&(t=N(t,this.pending),this.pending=null)}}retryDelay(e){return Math.min(this.config.baseDelayMs*2**(e-1),this.config.maxDelayMs)+Math.random()*this.config.jitterMs}};function N(e,t){let n={...e};for(let[e,r]of Object.entries(t))(e===`external_metadata`||e===`internal_metadata`)&&n[e]&&typeof n[e]==`object`&&typeof r==`object`&&r?n[e]={...n[e],...r}:n[e]=r;return n}y(),e();var P=2e4,F=100;function I(){return!0}var L=class extends Error{constructor(e){super(`CCRClient init failed: ${e}`),this.reason=e}},R=10;function z(){return{byMessage:new Map,scopeToMessage:new Map}}function B(e){return`${e.session_id}:${e.parent_tool_use_id??``}`}function V(e,t){let n=[],r=new Map;for(let i of e){let e=i.event;switch(e.type){case`message_start`:{let r=e.message.id,a=t.scopeToMessage.get(B(i));a&&t.byMessage.delete(a),t.scopeToMessage.set(B(i),r),t.byMessage.set(r,[]),n.push(i);break}case`content_block_delta`:{let a=e.delta;if(a.type!==`text_delta`){n.push(i);break}let o=t.scopeToMessage.get(B(i)),s=o?t.byMessage.get(o):void 0;if(!s){n.push(i);break}let c=e.index,l=s[c]??(s[c]=[]);l.push(a.text);let u=r.get(l);if(u){u.event.delta={type:`text_delta`,text:l.join(``)};break}let d={type:`stream_event`,uuid:i.uuid,session_id:i.session_id,parent_tool_use_id:i.parent_tool_use_id,event:{type:`content_block_delta`,index:c,delta:{type:`text_delta`,text:l.join(``)}}};r.set(l,d),n.push(d);break}default:n.push(i)}}return n}function H(e,t){e.byMessage.delete(t.message.id);let n=B(t);e.scopeToMessage.get(n)===t.message.id&&e.scopeToMessage.delete(n)}var U=class{constructor(e,n,r){if(t(this,`workerEpoch`,0),t(this,`heartbeatIntervalMs`,void 0),t(this,`heartbeatJitterFraction`,void 0),t(this,`heartbeatTimer`,null),t(this,`heartbeatInFlight`,!1),t(this,`closed`,!1),t(this,`consecutiveAuthFailures`,0),t(this,`currentState`,null),t(this,`sessionBaseUrl`,void 0),t(this,`sessionId`,void 0),t(this,`http`,g({keepAlive:!0})),t(this,`streamEventBuffer`,[]),t(this,`streamEventTimer`,null),t(this,`streamTextAccumulator`,z()),t(this,`workerState`,void 0),t(this,`eventUploader`,void 0),t(this,`internalEventUploader`,void 0),t(this,`deliveryUploader`,void 0),t(this,`onEpochMismatch`,void 0),t(this,`getAuthHeaders`,void 0),this.onEpochMismatch=r?.onEpochMismatch??(()=>{process.exit(1)}),this.heartbeatIntervalMs=r?.heartbeatIntervalMs??P,this.heartbeatJitterFraction=r?.heartbeatJitterFraction??0,this.getAuthHeaders=r?.getAuthHeaders??b,n.protocol!==`http:`&&n.protocol!==`https:`)throw Error(`CCRClient: Expected http(s) URL, got ${n.protocol}`);let i=n.pathname.replace(/\/$/,``);this.sessionBaseUrl=`${n.protocol}//${n.host}${i}`,this.sessionId=i.split(`/`).pop()||``,this.workerState=new M({send:e=>this.request(`put`,`/worker`,{worker_epoch:this.workerEpoch,...e},`PUT worker`).then(e=>e.ok),baseDelayMs:500,maxDelayMs:3e4,jitterMs:500}),this.eventUploader=new j({maxBatchSize:100,maxBatchBytes:10*1024*1024,maxQueueSize:1e5,send:async e=>{let t=await this.request(`post`,`/worker/events`,{worker_epoch:this.workerEpoch,events:e},`client events`);if(!t.ok)throw new A(`client event POST failed`,t.retryAfterMs)},baseDelayMs:500,maxDelayMs:3e4,jitterMs:500}),this.internalEventUploader=new j({maxBatchSize:100,maxBatchBytes:10*1024*1024,maxQueueSize:200,send:async e=>{let t=await this.request(`post`,`/worker/internal-events`,{worker_epoch:this.workerEpoch,events:e},`internal events`);if(!t.ok)throw new A(`internal event POST failed`,t.retryAfterMs)},baseDelayMs:500,maxDelayMs:3e4,jitterMs:500}),this.deliveryUploader=new j({maxBatchSize:64,maxQueueSize:64,send:async e=>{let t=await this.request(`post`,`/worker/events/delivery`,{worker_epoch:this.workerEpoch,updates:e.map(e=>({event_id:e.eventId,status:e.status}))},`delivery batch`);if(!t.ok)throw new A(`delivery POST failed`,t.retryAfterMs)},baseDelayMs:500,maxDelayMs:3e4,jitterMs:500}),e.setOnEvent(e=>{this.reportDelivery(e.event_id,`received`)})}async initialize(e){let t=Date.now();if(Object.keys(this.getAuthHeaders()).length===0)throw new L(`no_auth_headers`);if(e===void 0){let t=process.env.CLAUDE_CODE_WORKER_EPOCH;e=t?parseInt(t,10):NaN}if(isNaN(e))throw new L(`missing_epoch`);this.workerEpoch=e;let n=this.getWorkerState();if(!(await this.request(`put`,`/worker`,{worker_status:`idle`,worker_epoch:this.workerEpoch,external_metadata:{pending_action:null,task_summary:null,automation_state:null}},`PUT worker (init)`)).ok)throw new L(`worker_register_failed`);this.currentState=`idle`,this.startHeartbeat(),x(()=>{this.writeEvent({type:`keep_alive`})}),f(`CCRClient: initialized, epoch=${this.workerEpoch}`),m(`info`,`cli_worker_lifecycle_initialized`,{epoch:this.workerEpoch,duration_ms:Date.now()-t});let{metadata:r,durationMs:i}=await n;return this.closed||m(`info`,`cli_worker_state_restored`,{duration_ms:i,had_state:r!==null}),r}async getWorkerState(){let e=Date.now(),t=this.getAuthHeaders();return Object.keys(t).length===0?{metadata:null,durationMs:0}:{metadata:(await this.getWithRetry(`${this.sessionBaseUrl}/worker`,t,`worker_state`))?.worker?.external_metadata??null,durationMs:Date.now()-e}}async request(e,t,n,r,{timeout:a=1e4}={}){let s=this.getAuthHeaders();if(Object.keys(s).length===0)return{ok:!1};try{let o=await this.http[e](`${this.sessionBaseUrl}${t}`,n,{headers:{...s,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`,"User-Agent":i()},validateStatus:I,timeout:a});if(o.status>=200&&o.status<300)return this.consecutiveAuthFailures=0,{ok:!0};if(o.status===409&&this.handleEpochMismatch(),o.status===401||o.status===403){let e=E(),t=e?O(e):null;t!==null&&t*1e3<Date.now()&&(f(`CCRClient: session_token expired (exp=${new Date(t*1e3).toISOString()}) — no refresh was delivered, exiting`,{level:`error`}),m(`error`,`cli_worker_token_expired_no_refresh`),this.onEpochMismatch()),this.consecutiveAuthFailures++,this.consecutiveAuthFailures>=R&&(f(`CCRClient: ${this.consecutiveAuthFailures} consecutive auth failures with a valid-looking token — server-side auth unrecoverable, exiting`,{level:`error`}),m(`error`,`cli_worker_auth_failures_exhausted`),this.onEpochMismatch())}if(f(`CCRClient: ${r} returned ${o.status}`,{level:`warn`}),m(`warn`,`cli_worker_request_failed`,{method:e,path:t,status:o.status}),o.status===429){let e=o.headers?.[`retry-after`],t=typeof e==`string`?parseInt(e,10):NaN;if(!isNaN(t)&&t>=0)return{ok:!1,retryAfterMs:t*1e3}}return{ok:!1}}catch(n){return f(`CCRClient: ${r} failed: ${p(n)}`,{level:`warn`}),m(`warn`,`cli_worker_request_error`,{method:e,path:t,error_code:o(n)}),{ok:!1}}}reportState(e,t){e===this.currentState&&!t||(this.currentState=e,this.workerState.enqueue({worker_status:e,requires_action_details:t?{tool_name:t.tool_name,action_description:t.action_description,request_id:t.request_id}:null}))}reportMetadata(e){this.workerState.enqueue({external_metadata:e})}handleEpochMismatch(){f(`CCRClient: Epoch mismatch (409), shutting down`,{level:`error`}),m(`error`,`cli_worker_epoch_mismatch`),this.onEpochMismatch()}startHeartbeat(){this.stopHeartbeat();let e=()=>{let e=this.heartbeatIntervalMs*this.heartbeatJitterFraction*(2*Math.random()-1);this.heartbeatTimer=setTimeout(t,this.heartbeatIntervalMs+e)},t=()=>{this.sendHeartbeat(),this.heartbeatTimer!==null&&e()};e()}stopHeartbeat(){this.heartbeatTimer&&(clearTimeout(this.heartbeatTimer),this.heartbeatTimer=null)}async sendHeartbeat(){if(!this.heartbeatInFlight){this.heartbeatInFlight=!0;try{(await this.request(`post`,`/worker/heartbeat`,{session_id:this.sessionId,worker_epoch:this.workerEpoch},`Heartbeat`,{timeout:5e3})).ok&&f(`CCRClient: Heartbeat sent`)}finally{this.heartbeatInFlight=!1}}}async writeEvent(e){if(e.type===`stream_event`){this.streamEventBuffer.push(e),this.streamEventTimer||(this.streamEventTimer=setTimeout(()=>void this.flushStreamEventBuffer(),F));return}await this.flushStreamEventBuffer(),e.type===`assistant`&&H(this.streamTextAccumulator,e),await this.eventUploader.enqueue(this.toClientEvent(e))}toClientEvent(e){let t=e;return{payload:{...t,uuid:typeof t.uuid==`string`?t.uuid:k()}}}async flushStreamEventBuffer(){if(this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null),this.streamEventBuffer.length===0)return;let e=this.streamEventBuffer;this.streamEventBuffer=[];let t=V(e,this.streamTextAccumulator);await this.eventUploader.enqueue(t.map(e=>({payload:e,ephemeral:!0})))}async writeInternalEvent(e,t,{isCompaction:n=!1,agentId:r}={}){let i={payload:{type:e,...t,uuid:typeof t.uuid==`string`?t.uuid:k()},...n&&{is_compaction:!0},...r&&{agent_id:r}};await this.internalEventUploader.enqueue(i)}flushInternalEvents(){return this.internalEventUploader.flush()}async flush(){return await this.flushStreamEventBuffer(),this.eventUploader.flush()}async readInternalEvents(){return this.paginatedGet(`/worker/internal-events`,{},`internal_events`)}async readSubagentInternalEvents(){return this.paginatedGet(`/worker/internal-events`,{subagents:`true`},`subagent_events`)}async paginatedGet(e,t,n){let r=this.getAuthHeaders();if(Object.keys(r).length===0)return null;let i=[],a;do{let o=new URL(`${this.sessionBaseUrl}${e}`);for(let[e,n]of Object.entries(t))o.searchParams.set(e,n);a&&o.searchParams.set(`cursor`,a);let s=await this.getWithRetry(o.toString(),r,n);if(!s)return null;i.push(...s.data??[]),a=s.next_cursor}while(a);return f(`CCRClient: Read ${i.length} internal events from ${e}${t.subagents?` (subagents)`:``}`),i}async getWithRetry(e,t,n){for(let n=1;n<=10;n++){let r;try{r=await this.http.get(e,{headers:{...t,"anthropic-version":`2023-06-01`,"User-Agent":i()},validateStatus:I,timeout:3e4})}catch(t){f(`CCRClient: GET ${e} failed (attempt ${n}/10): ${p(t)}`,{level:`warn`}),n<10&&await v(Math.min(500*2**(n-1),3e4)+Math.random()*500);continue}if(r.status>=200&&r.status<300)return r.data;r.status===409&&this.handleEpochMismatch(),f(`CCRClient: GET ${e} returned ${r.status} (attempt ${n}/10)`,{level:`warn`}),n<10&&await v(Math.min(500*2**(n-1),3e4)+Math.random()*500)}return f(`CCRClient: GET retries exhausted`,{level:`error`}),m(`error`,`cli_worker_get_retries_exhausted`,{context:n}),null}reportDelivery(e,t){this.deliveryUploader.enqueue({eventId:e,status:t})}getWorkerEpoch(){return this.workerEpoch}get internalEventsPending(){return this.internalEventUploader.pendingCount}close(){this.closed=!0,this.stopHeartbeat(),S(),this.streamEventTimer&&(clearTimeout(this.streamEventTimer),this.streamEventTimer=null),this.streamEventBuffer=[],this.streamTextAccumulator.byMessage.clear(),this.streamTextAccumulator.scopeToMessage.clear(),this.workerState.close(),this.eventUploader.close(),this.internalEventUploader.close(),this.deliveryUploader.close()}};d(),w(),h(),u(),D(),y(),c(),a(),e();var W=1e3,G=3e4,K=6e5,q=45e3,J=new Set([401,403,404]),Y=10,X=500,Z=8e3,Q={stream:!0};function $(){return!0}function ee(e){let t=[],n=0,r=/\r?\n\r?\n/g;r.lastIndex=n;let i;for(;(i=r.exec(e))!==null;){let r=i.index,a=e.slice(n,r);if(n=r+i[0].length,!a.trim())continue;let o={},s=!1;for(let e of a.split(`
|
|
2
|
+
`)){let t=e[e.length-1]===`\r`?e.slice(0,-1):e;if(t.startsWith(`:`)){s=!0;continue}let n=t.indexOf(`:`);if(n===-1)continue;let r=t.slice(0,n),i=t[n+1]===` `?t.slice(n+2):t.slice(n+1);switch(r){case`event`:o.event=i;break;case`id`:o.id=i;break;case`data`:o.data=o.data?o.data+`
|
|
3
|
+
`+i:i;break}}(o.data||s)&&t.push(o)}return{frames:t,remaining:e.slice(n)}}var te=class{constructor(e,n={},r,i,a,o){t(this,`state`,`idle`),t(this,`onData`,void 0),t(this,`onCloseCallback`,void 0),t(this,`onEventCallback`,void 0),t(this,`headers`,void 0),t(this,`sessionId`,void 0),t(this,`refreshHeaders`,void 0),t(this,`getAuthHeaders`,void 0),t(this,`abortController`,null),t(this,`lastSequenceNum`,0),t(this,`seenSequenceNums`,new Set),t(this,`reconnectAttempts`,0),t(this,`reconnectStartTime`,null),t(this,`reconnectTimer`,null),t(this,`livenessTimer`,null),t(this,`lastActivityTime`,0),t(this,`postUrl`,void 0),t(this,`onLivenessTimeout`,()=>{this.livenessTimer=null,C(`SSE liveness timeout (${q}ms) lastSeqNum=${this.getLastSequenceNum()} state=${this.state}`),f(`SSETransport: Liveness timeout, reconnecting`,{level:`error`}),m(`error`,`cli_sse_liveness_timeout`),this.abortController?.abort(),this.handleConnectionError()}),this.url=e,this.headers=n,this.sessionId=r,this.refreshHeaders=i,this.getAuthHeaders=o??b,this.postUrl=ne(e),a!==void 0&&a>0&&(this.lastSequenceNum=a),f(`SSETransport: SSE URL = ${e.href}`),f(`SSETransport: POST URL = ${this.postUrl}`),m(`info`,`cli_sse_transport_initialized`)}getLastSequenceNum(){return this.lastSequenceNum}async connect(){if(this.state!==`idle`&&this.state!==`reconnecting`){f(`SSETransport: Cannot connect, current state is ${this.state}`,{level:`error`}),m(`error`,`cli_sse_connect_failed`);return}this.state=`reconnecting`;let e=Date.now(),t=new URL(this.url.href);this.lastSequenceNum>0&&t.searchParams.set(`from_sequence_num`,String(this.lastSequenceNum));let n=this.getAuthHeaders(),r={...this.headers,...n,Accept:`text/event-stream`,"anthropic-version":`2023-06-01`,"User-Agent":i()};n.Cookie&&delete r.Authorization,this.lastSequenceNum>0&&(r[`Last-Event-ID`]=String(this.lastSequenceNum)),f(`SSETransport: Opening ${t.href}`),m(`info`,`cli_sse_connect_opening`),this.abortController=new AbortController;try{let n=await fetch(t.href,{headers:r,signal:this.abortController.signal});if(!n.ok){let e=J.has(n.status);if(f(`SSETransport: HTTP ${n.status}${e?` (permanent)`:``}`,{level:`error`}),m(`error`,`cli_sse_connect_http_error`,{status:n.status}),e){this.state=`closed`,this.onCloseCallback?.(n.status);return}this.handleConnectionError();return}if(!n.body){f(`SSETransport: No response body`),this.handleConnectionError();return}let i=Date.now()-e;f(`SSETransport: Connected`),m(`info`,`cli_sse_connect_connected`,{duration_ms:i}),this.state=`connected`,this.reconnectAttempts=0,this.reconnectStartTime=null,this.resetLivenessTimer(),await this.readStream(n.body)}catch(e){if(this.abortController?.signal.aborted)return;f(`SSETransport: Connection error: ${p(e)}`,{level:`error`}),m(`error`,`cli_sse_connect_error`),this.handleConnectionError()}}async readStream(e){let t=e.getReader(),n=new TextDecoder,r=``,i=1024*1024;try{for(;;){let{done:e,value:a}=await t.read();if(e)break;if(r+=n.decode(a,Q),r.length>i){f(`SSETransport: Buffer exceeded ${i} bytes — dropping connection`,{level:`error`}),m(`error`,`cli_sse_buffer_overflow`);break}let{frames:o,remaining:s}=ee(r);r=s;for(let e of o){if(this.resetLivenessTimer(),e.id){let t=parseInt(e.id,10);if(!isNaN(t)){if(this.seenSequenceNums.has(t))f(`SSETransport: DUPLICATE frame seq=${t} (lastSequenceNum=${this.lastSequenceNum}, seenCount=${this.seenSequenceNums.size})`,{level:`warn`}),m(`warn`,`cli_sse_duplicate_sequence`);else if(this.seenSequenceNums.add(t),this.seenSequenceNums.size>1e3){let e=this.lastSequenceNum-200;for(let t of this.seenSequenceNums)t<e&&this.seenSequenceNums.delete(t)}t>this.lastSequenceNum&&(this.lastSequenceNum=t)}}e.event&&e.data?this.handleSSEFrame(e.event,e.data):e.data&&(f(`SSETransport: Frame has data: but no event: field — dropped`,{level:`warn`}),m(`warn`,`cli_sse_frame_missing_event_field`))}}}catch(e){if(this.abortController?.signal.aborted)return;f(`SSETransport: Stream read error: ${p(e)}`,{level:`error`}),m(`error`,`cli_sse_stream_read_error`)}finally{t.releaseLock()}this.state!==`closing`&&this.state!==`closed`&&(f(`SSETransport: Stream ended, reconnecting`),this.handleConnectionError())}handleSSEFrame(e,t){if(e!==`client_event`){f(`SSETransport: Unexpected SSE event type '${e}' on worker stream`,{level:`warn`}),m(`warn`,`cli_sse_unexpected_event_type`,{event_type:e});return}let n;try{n=s(t)}catch(e){f(`SSETransport: Failed to parse client_event data: ${p(e)}`,{level:`error`});return}let r=n.payload;if(r&&typeof r==`object`&&`type`in r){let e=this.sessionId?` session=${this.sessionId}`:``;f(`SSETransport: Event seq=${n.sequence_num} event_id=${n.event_id} event_type=${n.event_type} payload_type=${String(r.type)}${e}`),m(`info`,`cli_sse_message_received`),this.onData?.(l(r)+`
|
|
4
|
+
`)}else f(`SSETransport: Ignoring client_event with no type in payload: event_id=${n.event_id}`);this.onEventCallback?.(n)}handleConnectionError(){if(C(`SSE handleConnectionError: state=${this.state} lastSeqNum=${this.getLastSequenceNum()} reconnectAttempts=${this.reconnectAttempts} msSinceLastActivity=${this.lastActivityTime>0?Date.now()-this.lastActivityTime:-1}`),this.clearLivenessTimer(),this.state===`closing`||this.state===`closed`)return;this.abortController?.abort(),this.abortController=null;let e=Date.now();this.reconnectStartTime||(this.reconnectStartTime=e);let t=e-this.reconnectStartTime;if(t<K){if(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.refreshHeaders){let e=this.refreshHeaders();Object.assign(this.headers,e),f(`SSETransport: Refreshed headers for reconnect`)}this.state=`reconnecting`,this.reconnectAttempts++;let e=Math.min(W*2**(this.reconnectAttempts-1),G),n=Math.max(0,e+e*.25*(2*Math.random()-1));f(`SSETransport: Reconnecting in ${Math.round(n)}ms (attempt ${this.reconnectAttempts}, ${Math.round(t/1e3)}s elapsed)`),m(`error`,`cli_sse_reconnect_attempt`,{reconnectAttempts:this.reconnectAttempts}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}else f(`SSETransport: Reconnection time budget exhausted after ${Math.round(t/1e3)}s`,{level:`error`}),m(`error`,`cli_sse_reconnect_exhausted`,{reconnectAttempts:this.reconnectAttempts,elapsedMs:t}),this.state=`closed`,this.onCloseCallback?.()}resetLivenessTimer(){this.clearLivenessTimer(),this.livenessTimer=setTimeout(this.onLivenessTimeout,q)}clearLivenessTimer(){this.livenessTimer&&(clearTimeout(this.livenessTimer),this.livenessTimer=null)}async write(e){let t=this.getAuthHeaders();if(Object.keys(t).length===0){f(`SSETransport: No session token available for POST`),m(`warn`,`cli_sse_post_no_token`);return}let r={...t,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`,"User-Agent":i()};f(`SSETransport: POST body keys=${Object.keys(e).join(`,`)}`);for(let t=1;t<=Y;t++){try{let i=await n.post(this.postUrl,e,{headers:r,validateStatus:$});if(i.status===200||i.status===201){f(`SSETransport: POST success type=${e.type}`);return}if(f(`SSETransport: POST ${i.status} body=${l(i.data).slice(0,200)}`),i.status>=400&&i.status<500&&i.status!==429){f(`SSETransport: POST returned ${i.status} (client error), not retrying`),m(`warn`,`cli_sse_post_client_error`,{status:i.status});return}f(`SSETransport: POST returned ${i.status}, attempt ${t}/${Y}`),m(`warn`,`cli_sse_post_retryable_error`,{status:i.status,attempt:t})}catch(e){f(`SSETransport: POST error: ${e.message}, attempt ${t}/${Y}`),m(`warn`,`cli_sse_post_network_error`,{attempt:t})}if(t===Y){f(`SSETransport: POST failed after ${Y} attempts, continuing`),m(`warn`,`cli_sse_post_retries_exhausted`);return}await v(Math.min(X*2**(t-1),Z))}}isConnectedStatus(){return this.state===`connected`}isClosedStatus(){return this.state===`closed`}setOnData(e){this.onData=e}setOnClose(e){this.onCloseCallback=e}setOnEvent(e){this.onEventCallback=e}close(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.clearLivenessTimer(),this.state=`closing`,this.abortController?.abort(),this.abortController=null}};function ne(e){let t=e.pathname;return t.endsWith(`/stream`)&&(t=t.slice(0,-7)),`${e.protocol}//${e.host}${t}`}export{j as i,U as n,L as r,te as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{t}from"./src-DNHWYkls.js";var n=e((()=>{t()}));export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mN as e,pN as t}from"./loadAgentsDir-Bz0FfcVt.js";e();export{t as clearSearchExtraToolsDescriptionCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{Rn as n,b as r,t as i,x as a}from"./src-DNHWYkls.js";import{t as o}from"./jsx-runtime-BTgGEFjL.js";import{l as s}from"./debug-CjIaNjpK.js";import{n as c,r as l}from"./log-B-Nj3Yed.js";import{a as u,r as d,t as f}from"./esm-WONEiurY.js";function p(e,t){if(m)try{u(n=>{t&&n.setExtras(t),d(e)})}catch{}}var m,h=e((()=>{f(),s(),m=!1})),g,_,v,y=e((()=>{g=t(n(),1),i(),h(),c(),_=o(),v=class extends g.Component{constructor(e){super(e),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({errorInfo:t});let n=this.props.name||`SentryErrorBoundary`,r=[``,`[ErrorBoundary:${n}] React rendering error caught`,` Message: ${e.message}`];t.componentStack&&r.push(` Component stack:\n${t.componentStack}`),console.error(r.join(`
|
|
2
|
+
`)),l(e),p(e,{componentBoundary:n,componentStack:t.componentStack})}render(){return this.state.hasError?(0,_.jsxs)(a,{flexDirection:`column`,paddingX:1,paddingY:1,children:[(0,_.jsx)(r,{color:`error`,bold:!0,children:`React Rendering Error`}),(0,_.jsx)(r,{color:`error`,children:this.state.error?.message}),this.props.name&&(0,_.jsxs)(r,{dimColor:!0,children:[`Boundary: `,this.props.name]})]}):this.props.children}}}));export{h as i,y as n,p as r,v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./SentryErrorBoundary-BVfBaOOU.js";e();export{t as SentryErrorBoundary};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,n as t,o as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./figures-fES5sASd.js";import{E as a,F as o,In as s,Ln as c,Rn as l,T as u,Ut as d,_ as ee,b as f,c as p,f as te,g as m,h,i as ne,n as re,nt as ie,p as ae,r as oe,t as g,tt as se,x as _}from"./src-DNHWYkls.js";import{t as v}from"./jsx-runtime-BTgGEFjL.js";import{Ft as ce,Ht as y,at as b,qn as le}from"./state-CUZTq6r0.js";import{Ao as x,Gi as ue,Gs as S,Jr as de,Js as C,Ki as fe,Ms as pe,Or as w,Qr as me,Rs as he,Wo as ge,Zr as _e,_l as ve,_s as ye,as as be,bl as xe,ea as T,gl as Se,hl as Ce,hn as we,hs as Te,ia as Ee,ko as De,kr as Oe,l as ke,ls as E,m as D,oo as Ae,os as je,pl as O,pn as k,qi as Me,ra as Ne,so as Pe,ss as Fe,ta as Ie,xs as A,zo as j}from"./growthbook-p4aJ_UMv.js";import{E as M,O as Le}from"./debug-CjIaNjpK.js";import{n as Re,t as ze}from"./cwd-B2guYBbl.js";import{o as N,s as Be}from"./log-DVv8YiNo.js";import{i as Ve,o as P}from"./platform-BXz_rgpy.js";import{d as He,f as F}from"./stringUtils-U7kMYMJq.js";import{h as Ue,y as We}from"./startupProfiler-4P7GdVw6.js";import{f as Ge,g as Ke,m as qe}from"./oauth-DMPGYAoZ.js";import{r as Je}from"./permissions-DnpI8Whh.js";import{AD as Ye,Ah as Xe,BE as I,C as Ze,DD as Qe,D_ as $e,ED as et,E_ as tt,FD as L,GT as nt,HE as rt,I as it,ID as R,MD as at,Mh as ot,ND as st,Nl as ct,OD as lt,PD as ut,Pl as dt,Qv as ft,RT as pt,VE as mt,WT as z,Zv as ht,br as gt,c_ as B,ca as V,iE as _t,jD as H,jh as vt,kD as yt,kh as bt,lD as U,l_ as xt,nE as St,oa as Ct,rr as wt,sa as Tt,uD as Et,vw as W,w as Dt,y as Ot,zE as kt,zT as At,zl as jt}from"./loadAgentsDir-Bz0FfcVt.js";import{t as G}from"./useKeybinding-DAQL_dB_.js";import{t as Mt}from"./useTerminalSize-DzV4aaTi.js";import{r as Nt,t as Pt}from"./poorMode-CBe0rfxB.js";import{n as Ft,t as It}from"./useExitOnCtrlCDWithKeybindings-CBce_-hb.js";import{a as Lt,n as Rt,r as zt}from"./teammateModeSnapshot-DWRG5-Us.js";import{i as Bt,r as Vt}from"./bridgeEnabled-DKqmLnKO.js";import{i as Ht,n as Ut,r as Wt}from"./modalContext-B1b0Gsro.js";import{n as Gt,t as Kt}from"./ThemePicker-Bgr7yOQB.js";import{i as qt,n as Jt,r as Yt,t as Xt}from"./extraUsage-qOBMQB6g.js";import{n as Zt,t as Qt}from"./ClaudeMdExternalIncludesDialog-ts0XnWwl.js";import{t as $t}from"./SearchBox-DQg2Ph0V.js";import{r as en}from"./outputStyles-hHuIBkRB.js";import{n as tn,t as nn}from"./useSearchInput-nqhdILI2.js";import{n as rn,t as an}from"./usage-oABvixCs.js";import{a as on,i as sn,t as cn}from"./OverageCreditUpsell-D_td1ss4.js";function ln(){let e=b();return[{label:`Version`,value:`2.8.4`},{label:`Session name`,value:wt(e)??(0,K.jsx)(f,{dimColor:!0,children:`/rename to add a name`})},{label:`Session ID`,value:e},{label:`cwd`,value:ze()},...Qe(),...et()]}function un({mainLoopModel:e,mcp:t,theme:n,context:r}){return[{label:`Model`,value:L(e)},...lt(t.clients,r.options.ideInstallationStatus,n),...H(t.clients,n),...st(),...ut()]}async function dn(){return[...await yt(),...await Ye(),...await at()]}function fn({value:e}){return Array.isArray(e)?(0,K.jsx)(_,{flexWrap:`wrap`,columnGap:1,flexShrink:99,children:e.map((t,n)=>(0,K.jsxs)(f,{children:[t,n<e.length-1?`,`:``]},n))}):typeof e==`string`?(0,K.jsx)(f,{children:e}):e}function pn({context:e,diagnosticsPromise:t}){let n=I(e=>e.mainLoopModel),r=I(e=>e.mcp),[i]=u(),a=hn.useMemo(()=>[ln(),un({mainLoopModel:n,mcp:r,theme:i,context:e})],[n,r,i,e]),o=Wt()?1:void 0;return(0,K.jsxs)(_,{flexDirection:`column`,flexGrow:o,children:[(0,K.jsxs)(_,{flexDirection:`column`,gap:1,flexGrow:o,children:[a.map((e,t)=>e.length>0&&(0,K.jsx)(_,{flexDirection:`column`,children:e.map(({label:e,value:t},n)=>(0,K.jsxs)(_,{flexDirection:`row`,gap:1,flexShrink:0,children:[e!==void 0&&(0,K.jsxs)(f,{bold:!0,children:[e,`:`]}),(0,K.jsx)(fn,{value:t})]},n))},t)),(0,K.jsx)(gn.Suspense,{fallback:null,children:(0,K.jsx)(mn,{promise:t})})]}),(0,K.jsx)(f,{dimColor:!0,children:(0,K.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function mn({promise:e}){let t=(0,gn.use)(e);return t.length===0?null:(0,K.jsxs)(_,{flexDirection:`column`,paddingBottom:1,children:[(0,K.jsx)(f,{bold:!0,children:`System Diagnostics`}),t.map((e,t)=>(0,K.jsxs)(_,{flexDirection:`row`,gap:1,paddingX:1,children:[(0,K.jsx)(f,{color:`error`,children:i.warning}),typeof e==`string`?(0,K.jsx)(f,{wrap:`wrap`,children:e}):e]},t))]})}var hn,gn,K,_n=t((()=>{r(),hn=n(l(),1),gn=n(l(),1),y(),Ut(),g(),kt(),Re(),gt(),R(),Et(),K=v()}));function vn({currentVersion:e,onChoice:t}){function n(e){t(e)}function r(){t(`cancel`)}return(0,yn.jsxs)(te,{title:`Switch to Stable Channel`,onCancel:r,color:`permission`,hideBorder:!0,hideInputGuide:!0,children:[(0,yn.jsxs)(f,{children:[`The stable channel may have an older version than what you're currently running (`,e,`).`]}),(0,yn.jsx)(f,{dimColor:!0,children:`How would you like to handle this?`}),(0,yn.jsx)(pt,{options:[{label:`Allow possible downgrade to stable version`,value:`downgrade`},{label:`Stay on current version (${e}) until stable catches up`,value:`stay`}],onChange:n})]})}var yn,bn=t((()=>{l(),g(),W(),yn=v()}));function xn(e){return Object.entries(e).map(([e,t])=>({label:t?.name??wn,value:e,description:t?.description??Tn}))}function Sn({initialStyle:e,onComplete:t,onCancel:n,isStandaloneCommand:r}){let[i,a]=(0,Cn.useState)([]),[o,s]=(0,Cn.useState)(!0);(0,Cn.useEffect)(()=>{Tt(ze()).then(e=>{a(xn(e)),s(!1)}).catch(()=>{a(xn(Ct)),s(!1)})},[]);let c=(0,Cn.useCallback)(e=>{t(e)},[t]);return(0,q.jsx)(te,{title:`Preferred output style`,onCancel:n,hideInputGuide:!r,hideBorder:!r,children:(0,q.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,q.jsx)(_,{marginTop:1,children:(0,q.jsx)(f,{dimColor:!0,children:`This changes how Claude Code communicates with you`})}),o?(0,q.jsx)(f,{dimColor:!0,children:`Loading output styles…`}):(0,q.jsx)(pt,{options:i,onChange:c,visibleOptionCount:10,defaultValue:e})]})})}var Cn,q,wn,Tn,En=t((()=>{l(),Cn=n(l(),1),V(),g(),Re(),At(),q=v(),wn=`Default`,Tn=`Claude completes coding tasks efficiently and provides concise responses`}));function Dn({initialLanguage:e,onComplete:t,onCancel:n}){let[r,a]=(0,On.useState)(e),[o,s]=(0,On.useState)((e??``).length);se(`confirm:no`,n,{context:`Settings`});function c(){let e=r?.trim();t(e||void 0)}return(0,J.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,J.jsx)(f,{children:`Enter your preferred response and voice language:`}),(0,J.jsxs)(_,{flexDirection:`row`,gap:1,children:[(0,J.jsx)(f,{children:i.pointer}),(0,J.jsx)(z,{value:r??``,onChange:a,onSubmit:c,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${i.ellipsis}`,columns:60,cursorOffset:o,onChangeCursorOffset:s})]}),(0,J.jsx)(f,{dimColor:!0,children:`Leave empty for default (English)`})]})}var On,J,kn=t((()=>{r(),On=n(l(),1),g(),G(),nt(),J=v()}));function An(){return j[De()]}var jn=t((()=>{ge(),x()}));function Mn({onClose:t,context:n,setTabsHidden:r,onIsSearchModeChange:c,contentHeight:l}){let{headerFocused:p,focusHeader:re}=ne(),ae=Wt(),[,oe]=u(),g=a(),[v,y]=(0,X.useState)(E()),b=Y.useRef(E()),[x,S]=(0,X.useState)(pe()),de=Y.useRef(pe()),[w,ge]=(0,X.useState)(x?.outputStyle||`default`),ye=Y.useRef(w),[T,we]=(0,X.useState)(x?.language),De=Y.useRef(T),[D,Ae]=(0,X.useState)(0),[O,k]=(0,X.useState)(0),[j,M]=(0,X.useState)(!1),Le=d(),{rows:Re}=o(),ze=l??Math.min(Math.floor(Re*.8),30),N=Math.max(5,ze-10),P=I(e=>e.mainLoopModel),He=I(e=>e.verbose),Ue=I(e=>e.thinkingEnabled),We=I(e=>Ne()?e.fastMode:!1),Ge=I(e=>e.promptSuggestionEnabled),Ye=Se(x?.permissions?.defaultMode??`default`),Qe=Ze()||Ot()===`enabled`,et=($e(),e(tt)).isBriefEntitled(),L=rt(),[nt,R]=(0,X.useState)({}),at=Y.useRef(Ue),[ot]=(0,X.useState)(()=>he(`localSettings`)),[st]=(0,X.useState)(()=>he(`userSettings`)),lt=Y.useRef(g),ut=mt(),[dt]=(0,X.useState)(()=>{let e=ut.getState();return{mainLoopModel:e.mainLoopModel,mainLoopModelForSession:e.mainLoopModelForSession,verbose:e.verbose,thinkingEnabled:e.thinkingEnabled,fastMode:e.fastMode,promptSuggestionEnabled:e.promptSuggestionEnabled,isBriefOnly:e.isBriefOnly,replBridgeEnabled:e.replBridgeEnabled,replBridgeOutboundOnly:e.replBridgeOutboundOnly,settings:e.settings}}),[ft]=(0,X.useState)(()=>ce()),z=Y.useRef(!1),[ht,gt]=(0,X.useState)(!1),[B,V]=(0,X.useState)(null),{query:H,setQuery:yt,cursorOffset:xt}=tn({isActive:j&&B===null&&!p,onExit:()=>M(!1),onExitUp:re,passthroughCtrlKeys:[`c`,`d`]}),St=j&&!p;Y.useEffect(()=>{c?.(St)},[St,c]);let Ct=ct(n.options.mcpClients),wt=!qe(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),Tt=Y.use(Xe(!0)),Et=vt(Tt),W=je();function Dt(e){F(`tengu_config_model_changed`,{from_model:P,to_model:e}),L(t=>({...t,mainLoopModel:e,mainLoopModelForSession:null})),R(t=>{let n=me(e)+(Jt(e,!1,_e())?` · Billed as extra usage`:``);if(`model`in t){let{model:e,...r}=t;return{...r,model:n}}return{...t,model:n}})}function kt(e){A(t=>({...t,verbose:e})),y({...E(),verbose:e}),L(t=>({...t,verbose:e})),R(t=>{if(`verbose`in t){let{verbose:e,...n}=t;return n}return{...t,verbose:e}})}let At=[{id:`autoCompactEnabled`,label:`Auto-compact`,value:v.autoCompactEnabled,type:`boolean`,onChange(e){A(t=>({...t,autoCompactEnabled:e})),y({...E(),autoCompactEnabled:e}),F(`tengu_auto_compact_setting_changed`,{enabled:e})}},{id:`spinnerTipsEnabled`,label:`Show tips`,value:x?.spinnerTipsEnabled??!0,type:`boolean`,onChange(e){C(`localSettings`,{spinnerTipsEnabled:e}),S(t=>({...t,spinnerTipsEnabled:e})),F(`tengu_tips_setting_changed`,{enabled:e})}},{id:`cacheWarningEnabled`,label:`Cache warnings`,value:x?.cacheWarningEnabled??!0,type:`boolean`,onChange(e){C(`localSettings`,{cacheWarningEnabled:e}),S(t=>({...t,cacheWarningEnabled:e})),F(`tengu_cache_warning_setting_changed`,{enabled:e})}},{id:`prefersReducedMotion`,label:`Reduce motion`,value:x?.prefersReducedMotion??!1,type:`boolean`,onChange(e){C(`localSettings`,{prefersReducedMotion:e}),S(t=>({...t,prefersReducedMotion:e})),L(t=>({...t,settings:{...t.settings,prefersReducedMotion:e}})),F(`tengu_reduce_motion_setting_changed`,{enabled:e})}},{id:`thinkingEnabled`,label:`Thinking mode`,value:Ue??!0,type:`boolean`,onChange(e){L(t=>({...t,thinkingEnabled:e})),C(`userSettings`,{alwaysThinkingEnabled:e?void 0:!1}),F(`tengu_thinking_toggled`,{enabled:e})}},...Ne()&&Ie()?[{id:`fastMode`,label:`Fast mode (${ue} only)`,value:!!We,type:`boolean`,onChange(e){fe(),C(`userSettings`,{fastMode:e?!0:void 0}),e?(L(e=>({...e,mainLoopModel:Me(),mainLoopModelForSession:null,fastMode:!0})),R(e=>({...e,model:Me(),"Fast mode":`ON`}))):(L(e=>({...e,fastMode:!1})),R(e=>({...e,"Fast mode":`OFF`})))}}]:[],...ke(`tengu_chomp_inflection`,!1)?[{id:`promptSuggestionEnabled`,label:`Prompt suggestions`,value:Ge,type:`boolean`,onChange(e){L(t=>({...t,promptSuggestionEnabled:e})),C(`userSettings`,{promptSuggestionEnabled:e?void 0:!1})}}]:[],...[{id:`poorMode`,label:`Poor mode (save tokens)`,value:(Pt(),e(Nt)).isPoorModeActive(),type:`boolean`,onChange(t){(Pt(),e(Nt)).setPoorMode(t),L(e=>({...e,promptSuggestionEnabled:!t}))}}],...process.env.USER_TYPE===`ant`?[{id:`speculationEnabled`,label:`Speculative execution`,value:v.speculationEnabled??!0,type:`boolean`,onChange(e){A(t=>t.speculationEnabled===e?t:{...t,speculationEnabled:e}),y({...E(),speculationEnabled:e}),F(`tengu_speculation_setting_changed`,{enabled:e})}}]:[],...wt?[{id:`fileCheckpointingEnabled`,label:`Rewind code (checkpoints)`,value:v.fileCheckpointingEnabled,type:`boolean`,onChange(e){A(t=>({...t,fileCheckpointingEnabled:e})),y({...E(),fileCheckpointingEnabled:e}),F(`tengu_file_history_snapshots_setting_changed`,{enabled:e})}}]:[],{id:`verbose`,label:`Verbose output`,value:He,type:`boolean`,onChange:kt},{id:`terminalProgressBarEnabled`,label:`Terminal progress bar`,value:v.terminalProgressBarEnabled,type:`boolean`,onChange(e){A(t=>({...t,terminalProgressBarEnabled:e})),y({...E(),terminalProgressBarEnabled:e}),F(`tengu_terminal_progress_bar_setting_changed`,{enabled:e})}},...ke(`tengu_terminal_sidebar`,!1)?[{id:`showStatusInTerminalTab`,label:`Show status in terminal tab`,value:v.showStatusInTerminalTab??!1,type:`boolean`,onChange(e){A(t=>({...t,showStatusInTerminalTab:e})),y({...E(),showStatusInTerminalTab:e}),F(`tengu_terminal_tab_status_setting_changed`,{enabled:e})}}]:[],{id:`showTurnDuration`,label:`Show turn duration`,value:v.showTurnDuration,type:`boolean`,onChange(e){A(t=>({...t,showTurnDuration:e})),y({...E(),showTurnDuration:e}),F(`tengu_show_turn_duration_setting_changed`,{enabled:e})}},{id:`defaultPermissionMode`,label:`Default permission mode`,value:Ye,options:(()=>{let e=[`default`,`plan`];return[...e,...Je.filter(t=>!e.includes(t))]})(),type:`enum`,onChange(e){let t=Se(e),n=t===`auto`?t:Ce(t)?xe(t):t,r=C(`userSettings`,{permissions:{...x?.permissions,defaultMode:n}});if(r.error){Be(r.error);return}S(e=>({...e,permissions:{...e?.permissions,defaultMode:n}})),R(t=>({...t,defaultPermissionMode:e})),F(`tengu_config_changed`,{setting:`defaultPermissionMode`,value:e})}},...Qe?[{id:`useAutoModeDuringPlan`,label:`Use auto mode during plan`,value:x?.useAutoModeDuringPlan??!0,type:`boolean`,onChange(e){C(`userSettings`,{useAutoModeDuringPlan:e}),S(t=>({...t,useAutoModeDuringPlan:e})),L(e=>{let t=it(e.toolPermissionContext);return t===e.toolPermissionContext?e:{...e,toolPermissionContext:t}}),R(t=>({...t,"Use auto mode during plan":e}))}}]:[],{id:`respectGitignore`,label:`Respect .gitignore in file picker`,value:v.respectGitignore,type:`boolean`,onChange(e){A(t=>({...t,respectGitignore:e})),y({...E(),respectGitignore:e}),F(`tengu_respect_gitignore_setting_changed`,{enabled:e})}},{id:`copyFullResponse`,label:`Always copy full response (skip /copy picker)`,value:v.copyFullResponse,type:`boolean`,onChange(e){A(t=>({...t,copyFullResponse:e})),y({...E(),copyFullResponse:e}),F(`tengu_config_changed`,{setting:`copyFullResponse`,value:String(e)})}},..._t()?[{id:`copyOnSelect`,label:`Copy on select`,value:v.copyOnSelect??!0,type:`boolean`,onChange(e){A(t=>({...t,copyOnSelect:e})),y({...E(),copyOnSelect:e}),F(`tengu_config_changed`,{setting:`copyOnSelect`,value:String(e)})}}]:[],W?{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:`disabled`,type:`managedEnum`,onChange(){}}:{id:`autoUpdatesChannel`,label:`Auto-update channel`,value:x?.autoUpdatesChannel??`latest`,type:`managedEnum`,onChange(){}},{id:`theme`,label:`Theme`,value:g,type:`managedEnum`,onChange:oe},{id:`notifChannel`,label:`Local notifications`,value:v.preferredNotifChannel,options:[`auto`,`iterm2`,`terminal_bell`,`iterm2_with_bell`,`kitty`,`ghostty`,`notifications_disabled`],type:`enum`,onChange(e){A(t=>({...t,preferredNotifChannel:e})),y({...E(),preferredNotifChannel:e})}},...[{id:`taskCompleteNotifEnabled`,label:`Push when idle`,value:v.taskCompleteNotifEnabled??!1,type:`boolean`,onChange(e){A(t=>({...t,taskCompleteNotifEnabled:e})),y({...E(),taskCompleteNotifEnabled:e})}},{id:`inputNeededNotifEnabled`,label:`Push when input needed`,value:v.inputNeededNotifEnabled??!1,type:`boolean`,onChange(e){A(t=>({...t,inputNeededNotifEnabled:e})),y({...E(),inputNeededNotifEnabled:e})}},{id:`agentPushNotifEnabled`,label:`Push when Claude decides`,value:v.agentPushNotifEnabled??!1,type:`boolean`,onChange(e){A(t=>({...t,agentPushNotifEnabled:e})),y({...E(),agentPushNotifEnabled:e})}}],{id:`outputStyle`,label:`Output style`,value:w,type:`managedEnum`,onChange:()=>{}},...et?[{id:`defaultView`,label:`What you see by default`,value:x?.defaultView===void 0?`default`:String(x.defaultView),options:[`transcript`,`chat`,`default`],type:`enum`,onChange(e){let t=e===`default`?void 0:e;C(`localSettings`,{defaultView:t}),S(e=>({...e,defaultView:t}));let n=t===`chat`;L(e=>e.isBriefOnly===n?e:{...e,isBriefOnly:n}),le(n),R(t=>({...t,"Default view":e})),F(`tengu_default_view_setting_changed`,{value:t??`unset`})}}]:[],{id:`language`,label:`Language`,value:T??`Default (English)`,type:`managedEnum`,onChange:()=>{}},{id:`editorMode`,label:`Editor mode`,value:v.editorMode===`emacs`?`normal`:v.editorMode||`normal`,options:[`normal`,`vim`],type:`enum`,onChange(e){A(t=>({...t,editorMode:e})),y({...E(),editorMode:e}),F(`tengu_editor_mode_changed`,{mode:e,source:`config_panel`})}},{id:`prStatusFooterEnabled`,label:`Show PR status footer`,value:v.prStatusFooterEnabled??!0,type:`boolean`,onChange(e){A(t=>t.prStatusFooterEnabled===e?t:{...t,prStatusFooterEnabled:e}),y({...E(),prStatusFooterEnabled:e}),F(`tengu_pr_status_footer_setting_changed`,{enabled:e})}},{id:`model`,label:`Model`,value:P===null?`Default (recommended)`:P,type:`managedEnum`,onChange:Dt},...Ct?[{id:`diffTool`,label:`Diff tool`,value:v.diffTool??`auto`,options:[`terminal`,`auto`],type:`enum`,onChange(e){A(t=>({...t,diffTool:e})),y({...E(),diffTool:e}),F(`tengu_diff_tool_changed`,{tool:e,source:`config_panel`})}}]:[],...jt()?[]:[{id:`autoConnectIde`,label:`Auto-connect to IDE (external terminal)`,value:v.autoConnectIde??!1,type:`boolean`,onChange(e){A(t=>({...t,autoConnectIde:e})),y({...E(),autoConnectIde:e}),F(`tengu_auto_connect_ide_changed`,{enabled:e,source:`config_panel`})}}],...jt()?[{id:`autoInstallIdeExtension`,label:`Auto-install IDE extension`,value:v.autoInstallIdeExtension??!0,type:`boolean`,onChange(e){A(t=>({...t,autoInstallIdeExtension:e})),y({...E(),autoInstallIdeExtension:e}),F(`tengu_auto_install_ide_extension_changed`,{enabled:e,source:`config_panel`})}}]:[],{id:`claudeInChromeDefaultEnabled`,label:`Claude in Chrome enabled by default`,value:v.claudeInChromeDefaultEnabled??!0,type:`boolean`,onChange(e){A(t=>({...t,claudeInChromeDefaultEnabled:e})),y({...E(),claudeInChromeDefaultEnabled:e}),F(`tengu_claude_in_chrome_setting_changed`,{enabled:e})}},...Oe()?(()=>{let e=zt(),t=e?`Teammate mode [overridden: ${e}]`:`Teammate mode`,n=Ve()===`windows`,r=n?[`auto`,`tmux`,`windows-terminal`,`in-process`]:[`auto`,`tmux`,`in-process`];return[{id:`teammateMode`,label:t,value:v.teammateMode??`auto`,options:r,type:`enum`,onChange(e){e!==`auto`&&e!==`tmux`&&e!==`windows-terminal`&&e!==`in-process`||e===`windows-terminal`&&!n||(Rt(e),A(t=>({...t,teammateMode:e})),y({...E(),teammateMode:e}),F(`tengu_teammate_mode_changed`,{mode:e}))}},{id:`teammateDefaultModel`,label:`Default teammate model`,value:Nn(v.teammateDefaultModel),type:`managedEnum`,onChange(){}}]})():[],...Bt()?[{id:`remoteControlAtStartup`,label:`Enable Remote Control for all sessions`,value:v.remoteControlAtStartup===void 0?`default`:String(v.remoteControlAtStartup),options:[`true`,`false`,`default`],type:`enum`,onChange(e){if(e===`default`)A(e=>{if(e.remoteControlAtStartup===void 0)return e;let t={...e};return delete t.remoteControlAtStartup,t}),y({...E(),remoteControlAtStartup:void 0});else{let t=e===`true`;A(e=>e.remoteControlAtStartup===t?e:{...e,remoteControlAtStartup:t}),y({...E(),remoteControlAtStartup:t})}let t=Te();L(e=>e.replBridgeEnabled===t&&!e.replBridgeOutboundOnly?e:{...e,replBridgeEnabled:t,replBridgeOutboundOnly:!1})}}]:[],...Et?[{id:`showExternalIncludesDialog`,label:`External CLAUDE.md includes`,value:Fe().hasClaudeMdExternalIncludesApproved?`true`:`false`,type:`managedEnum`,onChange(){}}]:[],...process.env.ANTHROPIC_API_KEY&&!Ke()?[{id:`apiKey`,label:(0,Z.jsxs)(f,{children:[`Use custom API key: `,(0,Z.jsx)(f,{bold:!0,children:Pe(process.env.ANTHROPIC_API_KEY)})]}),searchText:`Use custom API key`,value:!!(process.env.ANTHROPIC_API_KEY&&v.customApiKeyResponses?.approved?.includes(Pe(process.env.ANTHROPIC_API_KEY))),type:`boolean`,onChange(e){A(t=>{let n={...t};if(n.customApiKeyResponses||(n.customApiKeyResponses={approved:[],rejected:[]}),n.customApiKeyResponses.approved||(n.customApiKeyResponses={...n.customApiKeyResponses,approved:[]}),n.customApiKeyResponses.rejected||(n.customApiKeyResponses={...n.customApiKeyResponses,rejected:[]}),process.env.ANTHROPIC_API_KEY){let t=Pe(process.env.ANTHROPIC_API_KEY);e?n.customApiKeyResponses={...n.customApiKeyResponses,approved:[...(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),t],rejected:(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t)}:n.customApiKeyResponses={...n.customApiKeyResponses,approved:(n.customApiKeyResponses.approved??[]).filter(e=>e!==t),rejected:[...(n.customApiKeyResponses.rejected??[]).filter(e=>e!==t),t]}}return n}),y(E())}}]:[]],G=Y.useMemo(()=>{if(!H)return At;let e=H.toLowerCase();return At.filter(t=>t.id.toLowerCase().includes(e)?!0:(`searchText`in t?t.searchText:t.label).toLowerCase().includes(e))},[At,H]);Y.useEffect(()=>{if(D>=G.length){let e=Math.max(0,G.length-1);Ae(e),k(Math.max(0,e-N+1));return}k(e=>D<e?D:D>=e+N?D-N+1:e)},[G.length,D,N]);let Mt=(0,X.useCallback)(e=>{k(t=>e<t?e:e>=t+N?e-N+1:t)},[N]),Ft=(0,X.useCallback)(()=>{if(B!==null)return;let e=Object.entries(nt).map(([e,t])=>(F(`tengu_config_changed`,{key:e,value:t}),`Set ${e} to ${s.bold(t)}`)),n=Ke()?void 0:process.env.ANTHROPIC_API_KEY,r=!!(n&&b.current.customApiKeyResponses?.approved?.includes(Pe(n))),i=!!(n&&v.customApiKeyResponses?.approved?.includes(Pe(n)));if(r!==i&&(e.push(`${i?`Enabled`:`Disabled`} custom API key`),F(`tengu_config_changed`,{key:`env.ANTHROPIC_API_KEY`,value:i})),v.theme!==b.current.theme&&e.push(`Set theme to ${s.bold(v.theme)}`),v.preferredNotifChannel!==b.current.preferredNotifChannel&&e.push(`Set notifications to ${s.bold(v.preferredNotifChannel)}`),w!==ye.current&&e.push(`Set output style to ${s.bold(w)}`),T!==De.current&&e.push(`Set response language to ${s.bold(T??`Default (English)`)}`),v.editorMode!==b.current.editorMode&&e.push(`Set editor mode to ${s.bold(v.editorMode||`emacs`)}`),v.diffTool!==b.current.diffTool&&e.push(`Set diff tool to ${s.bold(v.diffTool)}`),v.autoConnectIde!==b.current.autoConnectIde&&e.push(`${v.autoConnectIde?`Enabled`:`Disabled`} auto-connect to IDE`),v.autoInstallIdeExtension!==b.current.autoInstallIdeExtension&&e.push(`${v.autoInstallIdeExtension?`Enabled`:`Disabled`} auto-install IDE extension`),v.autoCompactEnabled!==b.current.autoCompactEnabled&&e.push(`${v.autoCompactEnabled?`Enabled`:`Disabled`} auto-compact`),v.respectGitignore!==b.current.respectGitignore&&e.push(`${v.respectGitignore?`Enabled`:`Disabled`} respect .gitignore in file picker`),v.copyFullResponse!==b.current.copyFullResponse&&e.push(`${v.copyFullResponse?`Enabled`:`Disabled`} always copy full response`),v.copyOnSelect!==b.current.copyOnSelect&&e.push(`${v.copyOnSelect?`Enabled`:`Disabled`} copy on select`),v.terminalProgressBarEnabled!==b.current.terminalProgressBarEnabled&&e.push(`${v.terminalProgressBarEnabled?`Enabled`:`Disabled`} terminal progress bar`),v.showStatusInTerminalTab!==b.current.showStatusInTerminalTab&&e.push(`${v.showStatusInTerminalTab?`Enabled`:`Disabled`} terminal tab status`),v.showTurnDuration!==b.current.showTurnDuration&&e.push(`${v.showTurnDuration?`Enabled`:`Disabled`} turn duration`),v.remoteControlAtStartup!==b.current.remoteControlAtStartup){let t=v.remoteControlAtStartup===void 0?`Reset Remote Control to default`:`${v.remoteControlAtStartup?`Enabled`:`Disabled`} Remote Control for all sessions`;e.push(t)}x?.autoUpdatesChannel!==de.current?.autoUpdatesChannel&&e.push(`Set auto-update channel to ${s.bold(x?.autoUpdatesChannel??`latest`)}`),e.length>0?t(e.join(`
|
|
2
|
+
`)):t(`Config dialog dismissed`,{display:`system`})},[B,nt,v,P,w,T,x?.autoUpdatesChannel,Ne()?x?.fastMode:void 0,t]),It=(0,X.useCallback)(()=>{g!==lt.current&&oe(lt.current),A(()=>b.current);let e=ot;C(`localSettings`,{spinnerTipsEnabled:e?.spinnerTipsEnabled,prefersReducedMotion:e?.prefersReducedMotion,defaultView:e?.defaultView,outputStyle:e?.outputStyle});let t=st;C(`userSettings`,{alwaysThinkingEnabled:t?.alwaysThinkingEnabled,fastMode:t?.fastMode,promptSuggestionEnabled:t?.promptSuggestionEnabled,autoUpdatesChannel:t?.autoUpdatesChannel,minimumVersion:t?.minimumVersion,language:t?.language,useAutoModeDuringPlan:t?.useAutoModeDuringPlan,syntaxHighlightingDisabled:t?.syntaxHighlightingDisabled,permissions:t?.permissions===void 0?void 0:{...t.permissions,defaultMode:t.permissions.defaultMode}});let n=dt;L(e=>({...e,mainLoopModel:n.mainLoopModel,mainLoopModelForSession:n.mainLoopModelForSession,verbose:n.verbose,thinkingEnabled:n.thinkingEnabled,fastMode:n.fastMode,promptSuggestionEnabled:n.promptSuggestionEnabled,isBriefOnly:n.isBriefOnly,replBridgeEnabled:n.replBridgeEnabled,replBridgeOutboundOnly:n.replBridgeOutboundOnly,settings:n.settings,toolPermissionContext:it(e.toolPermissionContext)})),ce()!==ft&&le(ft)},[g,oe,ot,st,dt,ft,L]);se(`confirm:no`,(0,X.useCallback)(()=>{B===null&&(z.current&&It(),t(`Config dialog dismissed`,{display:`system`}))},[B,It,t]),{context:`Settings`,isActive:B===null&&!j&&!p}),se(`settings:close`,Ft,{context:`Settings`,isActive:B===null&&!j&&!p});let Lt=(0,X.useCallback)(()=>{let e=G[D];if(!(!e||!e.onChange)){if(e.type===`boolean`){z.current=!0,e.onChange(!e.value),e.id===`thinkingEnabled`&&(!e.value===at.current?gt(!1):n.messages.some(e=>e.type===`assistant`)&>(!0));return}if(e.id===`theme`||e.id===`model`||e.id===`teammateDefaultModel`||e.id===`showExternalIncludesDialog`||e.id===`outputStyle`||e.id===`language`)switch(e.id){case`theme`:V(`Theme`),r(!0);return;case`model`:V(`Model`),r(!0);return;case`teammateDefaultModel`:V(`TeammateModel`),r(!0);return;case`showExternalIncludesDialog`:V(`ExternalIncludes`),r(!0);return;case`outputStyle`:V(`OutputStyle`),r(!0);return;case`language`:V(`Language`),r(!0);return}if(e.id===`autoUpdatesChannel`){if(W){V(`EnableAutoUpdates`),r(!0);return}(x?.autoUpdatesChannel??`latest`)===`latest`?(V(`ChannelDowngrade`),r(!0)):(z.current=!0,C(`userSettings`,{autoUpdatesChannel:`latest`,minimumVersion:void 0}),S(e=>({...e,autoUpdatesChannel:`latest`,minimumVersion:void 0})),F(`tengu_autoupdate_channel_changed`,{channel:`latest`}));return}if(e.type===`enum`){z.current=!0;let t=(e.options.indexOf(e.value)+1)%e.options.length;e.onChange(e.options[t]);return}}},[W,G,D,x?.autoUpdatesChannel,r]),Vt=e=>{gt(!1);let t=Math.max(0,Math.min(G.length-1,D+e));Ae(t),Mt(t)};return ie({"select:previous":()=>{D===0?(gt(!1),M(!0),k(0)):Vt(-1)},"select:next":()=>Vt(1),"scroll:lineUp":()=>Vt(-1),"scroll:lineDown":()=>Vt(1),"select:accept":Lt,"select:previousValue":()=>Lt(),"select:nextValue":()=>Lt(),"settings:search":()=>{M(!0),yt(``)}},{context:`Settings`,isActive:B===null&&!j&&!p}),(0,Z.jsx)(_,{flexDirection:`column`,width:`100%`,tabIndex:0,autoFocus:!0,onKeyDown:(0,X.useCallback)(e=>{if(B===null&&!p){if(j){if(e.key===`escape`){e.preventDefault(),H.length>0?yt(``):M(!1);return}(e.key===`return`||e.key===`down`||e.key===`wheeldown`)&&(e.preventDefault(),M(!1),Ae(0),k(0));return}if(e.key===`left`||e.key===`right`||e.key===`tab`){e.preventDefault(),Lt();return}e.ctrl||e.meta||e.key===`j`||e.key===`k`||e.key===`/`||e.key.length===1&&e.key!==` `&&(e.preventDefault(),M(!0),yt(e.key))}},[B,p,j,H,yt,Lt]),children:B===`Theme`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Kt,{onThemeSelect:e=>{z.current=!0,oe(e),V(null),r(!1)},onCancel:()=>{V(null),r(!1)},hideEscToCancel:!0,skipExitHandling:!0}),(0,Z.jsx)(_,{children:(0,Z.jsx)(f,{dimColor:!0,italic:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(m,{shortcut:`Enter`,action:`select`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]}):B===`Model`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Yt,{initial:P,onSelect:(e,t)=>{z.current=!0,Dt(e),V(null),r(!1)},onCancel:()=>{V(null),r(!1)},showFastModeNotice:Ne()?We&&Ee(P)&&Ie():!1}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(m,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):B===`TeammateModel`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Yt,{initial:v.teammateDefaultModel??null,skipSettingsWrite:!0,headerText:`Default model for newly spawned teammates. The leader can override via the tool call's model parameter.`,onSelect:(e,t)=>{V(null),r(!1),!(v.teammateDefaultModel===void 0&&e===null)&&(z.current=!0,A(t=>t.teammateDefaultModel===e?t:{...t,teammateDefaultModel:e}),y({...E(),teammateDefaultModel:e}),R(t=>({...t,teammateDefaultModel:Nn(e)})),F(`tengu_teammate_default_model_changed`,{model:e}))},onCancel:()=>{V(null),r(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(m,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):B===`ExternalIncludes`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Qt,{onDone:()=>{V(null),r(!1)},externalIncludes:bt(Tt)}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(m,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`disable external includes`})]})})]}):B===`OutputStyle`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Sn,{initialStyle:w,onComplete:e=>{z.current=!0,ge(e??`default`),V(null),r(!1),C(`localSettings`,{outputStyle:e}),F(`tengu_output_style_changed`,{style:e??`default`,source:`config_panel`,settings_source:`localSettings`})},onCancel:()=>{V(null),r(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(m,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})]}):B===`Language`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Dn,{initialLanguage:T,onComplete:e=>{z.current=!0,we(e),V(null),r(!1),C(`userSettings`,{language:e}),F(`tengu_language_changed`,{language:e??`default`,source:`config_panel`})},onCancel:()=>{V(null),r(!1)}}),(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(m,{shortcut:`Enter`,action:`confirm`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]}):B===`EnableAutoUpdates`?(0,Z.jsx)(te,{title:`Enable Auto-Updates`,onCancel:()=>{V(null),r(!1)},hideBorder:!0,hideInputGuide:!0,children:W?.type===`config`?(0,Z.jsx)(pt,{options:[{label:`Enable with latest channel`,value:`latest`},{label:`Enable with stable channel`,value:`stable`}],onChange:e=>{z.current=!0,V(null),r(!1),A(e=>({...e,autoUpdates:!0})),y({...E(),autoUpdates:!0}),C(`userSettings`,{autoUpdatesChannel:e,minimumVersion:void 0}),S(t=>({...t,autoUpdatesChannel:e,minimumVersion:void 0})),F(`tengu_autoupdate_enabled`,{channel:e})}}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{children:W?.type===`env`?`Auto-updates are controlled by an environment variable and cannot be changed here.`:`Auto-updates are disabled in development builds.`}),W?.type===`env`&&(0,Z.jsxs)(f,{dimColor:!0,children:[`Unset `,W.envVar,` to re-enable auto-updates.`]})]})}):B===`ChannelDowngrade`?(0,Z.jsx)(vn,{currentVersion:`2.8.4`,onChoice:e=>{if(V(null),r(!1),e===`cancel`)return;z.current=!0;let t={autoUpdatesChannel:`stable`};e===`stay`&&(t.minimumVersion=`2.8.4`),C(`userSettings`,t),S(e=>({...e,...t})),F(`tengu_autoupdate_channel_changed`,{channel:`stable`,minimum_version_set:e===`stay`})}}):(0,Z.jsxs)(_,{flexDirection:`column`,gap:1,marginY:ae?void 0:1,children:[(0,Z.jsx)(ee,{query:H,isFocused:j&&!p,isTerminalFocused:Le,cursorOffset:xt,placeholder:`Search settings…`}),(0,Z.jsx)(_,{flexDirection:`column`,children:G.length===0?(0,Z.jsxs)(f,{dimColor:!0,italic:!0,children:[`No settings match "`,H,`"`]}):(0,Z.jsxs)(Z.Fragment,{children:[O>0&&(0,Z.jsxs)(f,{dimColor:!0,children:[i.arrowUp,` `,O,` more above`]}),G.slice(O,O+N).map((e,t)=>{let n=O+t===D&&!p&&!j;return(0,Z.jsx)(Y.Fragment,{children:(0,Z.jsxs)(_,{width:`100%`,children:[(0,Z.jsx)(_,{width:44,children:(0,Z.jsxs)(f,{color:n?`suggestion`:void 0,children:[n?i.pointer:` `,` `,e.label]})}),(0,Z.jsx)(_,{flexGrow:1,children:e.type===`boolean`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()}),ht&&e.id===`thinkingEnabled`&&(0,Z.jsxs)(f,{color:`warning`,children:[` `,`Changing thinking mode mid-conversation will increase latency and may reduce quality.`]})]}):e.id===`theme`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:Fn[e.value.toString()]??e.value.toString()}):e.id===`notifChannel`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:(0,Z.jsx)(Pn,{value:e.value.toString()})}):e.id===`defaultPermissionMode`?(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:ve(e.value)}):e.id===`autoUpdatesChannel`&&W?(0,Z.jsxs)(_,{flexDirection:`column`,children:[(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:`disabled`}),(0,Z.jsxs)(f,{dimColor:!0,children:[`(`,be(W),`)`]})]}):(0,Z.jsx)(f,{color:n?`suggestion`:void 0,children:e.value.toString()})})]})},e.id)}),O+N<G.length&&(0,Z.jsxs)(f,{dimColor:!0,children:[i.arrowDown,` `,G.length-O-N,` more below`]})]})}),p?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(m,{shortcut:`←/→ tab`,action:`switch`}),(0,Z.jsx)(m,{shortcut:`↓`,action:`return`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`close`})]})}):j?(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(f,{children:`Type to filter`}),(0,Z.jsx)(m,{shortcut:`Enter/↓`,action:`select`}),(0,Z.jsx)(m,{shortcut:`↑`,action:`tabs`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`clear`})]})}):(0,Z.jsx)(f,{dimColor:!0,children:(0,Z.jsxs)(h,{children:[(0,Z.jsx)(U,{action:`select:accept`,context:`Settings`,fallback:`Space`,description:`change`}),(0,Z.jsx)(U,{action:`settings:close`,context:`Settings`,fallback:`Enter`,description:`save`}),(0,Z.jsx)(U,{action:`settings:search`,context:`Settings`,fallback:`/`,description:`search`}),(0,Z.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]})})}function Nn(e){return e===void 0?me(An()):e===null?`Default (leader's model)`:me(e)}function Pn({value:e}){switch(e){case`auto`:return`Auto`;case`iterm2`:return(0,Z.jsxs)(f,{children:[`iTerm2 `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 9)`})]});case`terminal_bell`:return(0,Z.jsxs)(f,{children:[`Terminal Bell `,(0,Z.jsx)(f,{dimColor:!0,children:`(\\a)`})]});case`kitty`:return(0,Z.jsxs)(f,{children:[`Kitty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 99)`})]});case`ghostty`:return(0,Z.jsxs)(f,{children:[`Ghostty `,(0,Z.jsx)(f,{dimColor:!0,children:`(OSC 777)`})]});case`iterm2_with_bell`:return`iTerm2 w/ Bell`;case`notifications_disabled`:return`Disabled`;default:return e}}var Y,X,Z,Fn,In=t((()=>{g(),Y=n(l(),1),X=n(l(),1),G(),r(),ye(),Ae(),c(),O(),Dt(),N(),He(),Vt(),Gt(),kt(),qt(),de(),Xt(),Zt(),bn(),W(),En(),kn(),ot(),Et(),Ut(),$t(),dt(),S(),y(),en(),Ge(),D(),w(),Lt(),jn(),nn(),Mt(),T(),St(),P(),Z=v(),Fn={auto:`Auto (match terminal)`,dark:`Dark mode`,light:`Light mode`,"dark-daltonized":`Dark mode (colorblind-friendly)`,"light-daltonized":`Light mode (colorblind-friendly)`,"dark-ansi":`Dark mode (ANSI colors only)`,"light-ansi":`Light mode (ANSI colors only)`}}));function Ln({title:e,limit:t,maxWidth:n,showTimeInReset:r=!0,extraSubtext:i}){let{utilization:a,resets_at:o}=t;if(a===null)return null;let s=`${Math.floor(a)}% used`,c;return o&&(c=`Resets ${Ue(o,!0,r)}`),i&&(c=c?`${i} · ${c}`:i),n>=62?(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:e}),(0,Q.jsxs)(_,{flexDirection:`row`,gap:1,children:[(0,Q.jsx)(p,{ratio:a/100,width:50,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]}),c&&(0,Q.jsx)(f,{dimColor:!0,children:c})]}):(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsxs)(f,{children:[(0,Q.jsx)(f,{bold:!0,children:e}),c&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(f,{children:` `}),(0,Q.jsxs)(f,{dimColor:!0,children:[`· `,c]})]})]}),(0,Q.jsx)(p,{ratio:a/100,width:n,fillColor:`rate_limit_fill`,emptyColor:`rate_limit_empty`}),(0,Q.jsx)(f,{children:s})]})}function Rn(){let[e,t]=(0,Vn.useState)(null),[n,r]=(0,Vn.useState)(null),[i,a]=(0,Vn.useState)(!0),{columns:s}=o(),c=s-2,l=Math.min(c,80),u=Bn.useCallback(async()=>{a(!0),r(null);try{t(await an())}catch(e){Be(e);let t=e,n=t.response?.data?Le(t.response.data):void 0;r(n?`Failed to load usage data: ${n}`:`Failed to load usage data`)}finally{a(!1)}},[]);if((0,Vn.useEffect)(()=>{u()},[u]),se(`settings:retry`,()=>{u()},{context:`Settings`,isActive:!!n&&!i}),n)return(0,Q.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,Q.jsxs)(f,{color:`error`,children:[`Error: `,n]}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsxs)(h,{children:[(0,Q.jsx)(U,{action:`settings:retry`,context:`Settings`,fallback:`r`,description:`retry`}),(0,Q.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})]})})]});if(!e)return(0,Q.jsxs)(_,{flexDirection:`column`,gap:1,children:[(0,Q.jsx)(f,{dimColor:!0,children:`Loading usage data…`}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]});let d=k(),ee=d===`max`||d===`team`||d===null,p=[{title:`Current session`,limit:e.five_hour},{title:`Current week (all models)`,limit:e.seven_day},...ee?[{title:`Current week (Sonnet only)`,limit:e.seven_day_sonnet}]:[]];return(0,Q.jsxs)(_,{flexDirection:`column`,gap:1,width:`100%`,children:[p.some(({limit:e})=>e)||(0,Q.jsx)(f,{dimColor:!0,children:`/usage is only available for subscription plans.`}),p.map(({title:e,limit:t})=>t&&(0,Q.jsx)(Ln,{title:e,limit:t,maxWidth:l},e)),e.extra_usage&&(0,Q.jsx)(zn,{extraUsage:e.extra_usage,maxWidth:l}),on()&&(0,Q.jsx)(cn,{maxWidth:l}),(0,Q.jsx)(f,{dimColor:!0,children:(0,Q.jsx)(U,{action:`confirm:no`,context:`Settings`,fallback:`Esc`,description:`cancel`})})]})}function zn({extraUsage:e,maxWidth:t}){let n=k();if(!(n===`pro`||n===`max`))return!1;if(!e.is_enabled)return B.isEnabled()?(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Hn}),(0,Q.jsx)(f,{dimColor:!0,children:`Extra usage not enabled · /extra-usage to enable`})]}):null;if(e.monthly_limit===null)return(0,Q.jsxs)(_,{flexDirection:`column`,children:[(0,Q.jsx)(f,{bold:!0,children:Hn}),(0,Q.jsx)(f,{dimColor:!0,children:`Unlimited`})]});if(typeof e.used_credits!=`number`||typeof e.utilization!=`number`)return null;let r=ht(e.used_credits/100,2),i=ht(e.monthly_limit/100,2),a=new Date,o=new Date(a.getFullYear(),a.getMonth()+1,1);return(0,Q.jsx)(Ln,{title:Hn,limit:{utilization:e.utilization,resets_at:o.toISOString()},showTimeInReset:!1,extraSubtext:`${r} / ${i} spent`,maxWidth:t})}var Bn,Vn,Q,Hn,Un=t((()=>{Bn=n(l(),1),Vn=n(l(),1),xt(),ft(),we(),Mt(),g(),G(),rn(),We(),N(),M(),Et(),sn(),Q=v(),Hn=`Extra usage`}));function Wn({onClose:e,context:t,defaultTab:n}){let[r,i]=(0,Gn.useState)(n),[a,s]=(0,Gn.useState)(!1),[c,l]=(0,Gn.useState)(!1),u=Wt(),{rows:d}=Ht(o()),ee=u?d+1:Math.max(15,Math.min(Math.floor(d*.8),30)),[f]=(0,Gn.useState)(()=>dn().catch(()=>[]));return Ft(),se(`confirm:no`,()=>{a||e(`Status dialog dismissed`,{display:`system`})},{context:`Settings`,isActive:!a&&!(r===`Config`&&c)}),(0,$.jsx)(ae,{color:`permission`,children:(0,$.jsx)(oe,{color:`permission`,selectedTab:r,onTabChange:i,hidden:a,initialHeaderFocused:n!==`Config`,contentHeight:a||u?void 0:ee,children:[(0,$.jsx)(re,{title:`Status`,children:(0,$.jsx)(pn,{context:t,diagnosticsPromise:f})},`status`),(0,$.jsx)(re,{title:`Config`,children:(0,$.jsx)(Gn.Suspense,{fallback:null,children:(0,$.jsx)(Mn,{context:t,onClose:e,setTabsHidden:s,onIsSearchModeChange:l,contentHeight:ee})})},`config`),(0,$.jsx)(re,{title:`Usage`,children:(0,$.jsx)(Rn,{})},`usage`)]})})}var Gn,$,Kn=t((()=>{l(),Gn=n(l(),1),G(),It(),Mt(),Ut(),g(),_n(),In(),Un(),$=v()}));export{Kn as n,Wn as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-fES5sASd.js";import{B as r,Rn as i,b as a,t as o,x as s}from"./src-DNHWYkls.js";import{t as c}from"./jsx-runtime-BTgGEFjL.js";import{AC as l,DC as u,LE as d,OC as f,kC as p,zE as m}from"./loadAgentsDir-Bz0FfcVt.js";t();var h=e(i(),1);o(),m(),f();var g=c(),_=[`◐`,`◓`,`◑`,`◒`],v=[{key:`validating`,label:`Validating session`},{key:`fetching_logs`,label:`Fetching session logs`},{key:`fetching_branch`,label:`Getting branch info`},{key:`checking_out`,label:`Checking out branch`}];function y({currentStep:e,sessionId:t}){let[i,o]=r(100),c=Math.floor(o/100)%_.length,l=v.findIndex(t=>t.key===e);return(0,g.jsxs)(s,{ref:i,flexDirection:`column`,paddingX:1,paddingY:1,children:[(0,g.jsx)(s,{marginBottom:1,children:(0,g.jsxs)(a,{bold:!0,color:`claude`,children:[_[c],` Teleporting session…`]})}),t&&(0,g.jsx)(s,{marginBottom:1,children:(0,g.jsx)(a,{dimColor:!0,children:t})}),(0,g.jsx)(s,{flexDirection:`column`,marginLeft:2,children:v.map((e,t)=>{let r=t<l,i=t===l,o=t>l,u,d;return r?(u=n.tick,d=`green`):i?(u=_[c],d=`claude`):(u=n.circle,d=void 0),(0,g.jsxs)(s,{flexDirection:`row`,children:[(0,g.jsx)(s,{width:2,children:(0,g.jsx)(a,{color:d,dimColor:o,children:u})}),(0,g.jsx)(a,{dimColor:o,bold:i,children:e.label})]},e.key)})})]})}async function b(e,t){let n=()=>{};function r(){let[e,r]=(0,h.useState)(`validating`);return n=r,(0,g.jsx)(y,{currentStep:e,sessionId:t})}e.render((0,g.jsx)(d,{children:(0,g.jsx)(r,{})}));let i=await l(t,n);n(`checking_out`);let{branchName:a,branchError:o}=await u(i.branch);return{messages:p(i.log,o),branchName:a}}export{b as teleportWithProgress};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t,b as n,f as r,t as i,x as a}from"./src-DNHWYkls.js";import{t as o}from"./jsx-runtime-BTgGEFjL.js";import{Ql as s,Yl as c}from"./growthbook-p4aJ_UMv.js";import{Ew as l,RT as u,vw as d,ww as f}from"./loadAgentsDir-Bz0FfcVt.js";import{a as p,r as m}from"./githubRepoPathMapping-DGivBX9h.js";var h=e(t(),1);i(),s(),d(),l();var g=o();function _({targetRepo:e,initialPaths:t,onSelectPath:i,onCancel:o}){let[s,l]=(0,h.useState)(t),[d,_]=(0,h.useState)(null),[v,y]=(0,h.useState)(!1),b=(0,h.useCallback)(async t=>{if(t===`cancel`){o();return}if(y(!0),_(null),await p(t,e)){i(t);return}m(e,t),l(s.filter(e=>e!==t)),y(!1),_(`${c(t)} no longer contains the correct repository. Select another path.`)},[e,s,i,o]),x=[...s.map(e=>({label:(0,g.jsxs)(n,{children:[`Use `,(0,g.jsx)(n,{bold:!0,children:c(e)})]}),value:e})),{label:`Cancel`,value:`cancel`}];return(0,g.jsx)(r,{title:`Teleport to Repo`,onCancel:o,color:`background`,children:s.length>0?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(a,{flexDirection:`column`,gap:1,children:[d&&(0,g.jsx)(n,{color:`error`,children:d}),(0,g.jsxs)(n,{children:[`Open Claude Code in `,(0,g.jsx)(n,{bold:!0,children:e}),`:`]})]}),v?(0,g.jsxs)(a,{children:[(0,g.jsx)(f,{}),(0,g.jsx)(n,{children:` Validating repository…`})]}):(0,g.jsx)(u,{options:x,onChange:e=>void b(e)})]}):(0,g.jsxs)(a,{flexDirection:`column`,gap:1,children:[d&&(0,g.jsx)(n,{color:`error`,children:d}),(0,g.jsxs)(n,{dimColor:!0,children:[`Run claude --teleport from a checkout of `,e]})]})})}export{_ as TeleportRepoMismatchDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./axios-Zh7qGPze.js";import{n as r,t as i}from"./v4-DLhvDPkt.js";import{F as a,Rn as o,b as s,g as c,h as l,t as u,tt as d,x as f,xt as p}from"./src-DNHWYkls.js";import{t as m}from"./jsx-runtime-BTgGEFjL.js";import{W as h,_s as g,es as _,nt as v,ts as y}from"./growthbook-p4aJ_UMv.js";import{E as b,J as x,L as S,U as C,l as w,p as T,z as E}from"./debug-CjIaNjpK.js";import{L as D,dt as O}from"./state-BQkyHx88.js";import{o as k,s as A}from"./log-DVv8YiNo.js";import{d as j,f as M}from"./stringUtils-U7kMYMJq.js";import{p as ee,y as N}from"./startupProfiler-4P7GdVw6.js";import{n as P,t as F}from"./lazySchema-2sOku3cX.js";import{n as I,t as te}from"./sleep-CC8jykQd.js";import{AC as ne,Ew as L,OC as re,RT as ie,_w as R,eF as z,gw as B,jy as V,lD as H,tF as U,uD as W,vw as G,ww as K}from"./loadAgentsDir-Bz0FfcVt.js";import{t as q}from"./useKeybinding-DAQL_dB_.js";import{a as J,n as ae,o as oe}from"./detectRepository-Gobn9eFt.js";import{m as se,p as ce}from"./api-YHYC4Zdk.js";import"crypto";var Y=e(o(),1);D(),j(),C(),re();function le(e){let[t,n]=(0,Y.useState)(!1),[r,i]=(0,Y.useState)(null),[a,o]=(0,Y.useState)(null);return{resumeSession:(0,Y.useCallback)(async t=>{n(!0),i(null),o(t),M(`tengu_teleport_resume_session`,{source:e,session_id:t.id});try{let e=await ne(t.id);return O({sessionId:t.id}),n(!1),e}catch(e){return i({message:e instanceof S?e.message:E(e),formattedMessage:e instanceof S?e.formattedMessage:void 0,isOperationError:e instanceof S}),n(!1),null}},[e]),isResuming:t,error:r,selectedSession:a,clearError:(0,Y.useCallback)(()=>{i(null)},[])}}var X=m();u(),N(),q(),G(),R(),V(),n(),y(),se(),i(),v(),g(),w(),J(),C(),F(),k(),te(),b();var Z=[2e3,4e3,8e3,16e3],Q=Z.length;function ue(e){return t.isAxiosError(e)?!e.response||e.response.status>=500:!1}async function de(e,n){let r;for(let i=0;i<=Q;i++)try{return await t.get(e,n)}catch(e){if(r=e,!ue(e))throw e;if(i>=Q)throw T(`Teleport request failed after ${i+1} attempts: ${E(e)}`),e;let t=Z[i]??2e3;T(`Teleport request failed (attempt ${i+1}/${Q+1}), retrying in ${t}ms: ${E(e)}`),await I(t)}throw r}P(()=>r.object({id:r.string(),title:r.string(),description:r.string(),status:r.enum([`idle`,`working`,`waiting`,`completed`,`archived`,`cancelled`,`rejected`]),repo:r.object({name:r.string(),owner:r.object({login:r.string()}),default_branch:r.string().optional()}).nullable(),turns:r.array(r.string()),created_at:r.string(),updated_at:r.string()}));async function fe(){let e=h()?.accessToken;if(e===void 0)throw Error(`Claude Code web sessions require authentication with a Claude.ai account. API key authentication is not sufficient. Please run /login to authenticate, or check your authentication status with /status.`);let t=await ce();if(!t)throw Error(`Unable to get organization UUID`);return{accessToken:e,orgUUID:t}}async function pe(){let{accessToken:e,orgUUID:t}=await fe(),n=`${_().BASE_API_URL}/v1/sessions`;try{let r=await de(n,{headers:{...$(e),"anthropic-beta":`ccr-byoc-2025-07-29`,"x-organization-uuid":t}});if(r.status!==200)throw Error(`Failed to fetch code sessions: ${r.statusText}`);return r.data.data.map(e=>{let t=e.session_context.sources.find(e=>e.type===`git_repository`),n=null;if(t?.url){let e=oe(t.url);if(e){let[r,i]=e.split(`/`);r&&i&&(n={name:i,owner:{login:r},default_branch:t.revision||void 0})}}return{id:e.id,title:e.title||`Untitled`,description:``,status:e.session_status,repo:n,turns:[],created_at:e.created_at,updated_at:e.updated_at}})}catch(e){throw A(x(e)),e}}function $(e){return{Authorization:`Bearer ${e}`,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`}}z(),w(),J(),W(),L();var me=`Updated`,he=` `;function ge({onSelect:e,onCancel:t,isEmbedded:n=!1}){let{rows:r}=a(),[i,o]=(0,Y.useState)([]),[u,m]=(0,Y.useState)(null),[h,g]=(0,Y.useState)(!0),[_,v]=(0,Y.useState)(null),[y,b]=(0,Y.useState)(!1),[x,S]=(0,Y.useState)(!1),[C,w]=(0,Y.useState)(1),E=U(`confirm:no`,`Confirmation`,`Esc`),D=(0,Y.useCallback)(async()=>{try{g(!0),v(null);let e=await ae();m(e),T(`Current repository: ${e||`not detected`}`);let t=await pe(),n=t;e&&(n=t.filter(t=>t.repo?`${t.repo.owner.login}/${t.repo.name}`===e:!1),T(`Filtered ${n.length} sessions for repo ${e} from ${t.length} total`)),o([...n].sort((e,t)=>{let n=new Date(e.updated_at);return new Date(t.updated_at).getTime()-n.getTime()}))}catch(e){let t=e instanceof Error?e.message:String(e);T(`Error loading code sessions: ${t}`),v(_e(t))}finally{g(!1),b(!1)}},[]),O=()=>{b(!0),D()};d(`confirm:no`,t,{context:`Confirmation`}),p((e,n)=>{if(n.ctrl&&e===`c`){t();return}if(n.ctrl&&e===`r`&&_){O();return}if(_!==null&&n.return){t();return}});let k=(0,Y.useCallback)(()=>{S(!0),D()},[S,D]);if(!x)return(0,X.jsx)(B,{onComplete:k});if(h)return(0,X.jsxs)(f,{flexDirection:`column`,padding:1,children:[(0,X.jsxs)(f,{flexDirection:`row`,children:[(0,X.jsx)(K,{}),(0,X.jsx)(s,{bold:!0,children:`Loading Claude Code sessions…`})]}),(0,X.jsx)(s,{dimColor:!0,children:y?`Retrying…`:`Fetching your Claude Code sessions…`})]});if(_)return(0,X.jsxs)(f,{flexDirection:`column`,padding:1,children:[(0,X.jsx)(s,{bold:!0,color:`error`,children:`Error loading Claude Code sessions`}),ve(_),(0,X.jsxs)(s,{dimColor:!0,children:[`Press `,(0,X.jsx)(s,{bold:!0,children:`Ctrl+R`}),` to retry · Press `,(0,X.jsx)(s,{bold:!0,children:E}),` to cancel`]})]});if(i.length===0)return(0,X.jsxs)(f,{flexDirection:`column`,padding:1,children:[(0,X.jsxs)(s,{bold:!0,children:[`No Claude Code sessions found`,u&&(0,X.jsxs)(s,{children:[` for `,u]})]}),(0,X.jsx)(f,{marginTop:1,children:(0,X.jsxs)(s,{dimColor:!0,children:[`Press `,(0,X.jsx)(s,{bold:!0,children:E}),` to cancel`]})})]});let A=i.map(e=>({...e,timeString:ee(new Date(e.updated_at))})),j=Math.max(7,...A.map(e=>e.timeString.length)),M=A.map(({timeString:e,title:t,id:n})=>({label:`${e.padEnd(j,` `)} ${t}`,value:n})),N=Math.max(1,n?Math.min(i.length,5,r-6-7):Math.min(i.length,r-1-7));return(0,X.jsxs)(f,{flexDirection:`column`,padding:1,height:N+7,children:[(0,X.jsxs)(s,{bold:!0,children:[`Select a session to resume`,i.length>N&&(0,X.jsxs)(s,{dimColor:!0,children:[` `,`(`,C,` of `,i.length,`)`]}),u&&(0,X.jsxs)(s,{dimColor:!0,children:[` (`,u,`)`]}),`:`]}),(0,X.jsxs)(f,{flexDirection:`column`,marginTop:1,flexGrow:1,children:[(0,X.jsx)(f,{marginLeft:2,children:(0,X.jsxs)(s,{bold:!0,children:[me.padEnd(j,` `),he,`Session Title`]})}),(0,X.jsx)(ie,{visibleOptionCount:N,options:M,onChange:t=>{let n=i.find(e=>e.id===t);n&&e(n)},onFocus:e=>{let t=M.findIndex(t=>t.value===e);t>=0&&w(t+1)}})]}),(0,X.jsx)(f,{flexDirection:`row`,children:(0,X.jsx)(s,{dimColor:!0,children:(0,X.jsxs)(l,{children:[(0,X.jsx)(c,{shortcut:`↑/↓`,action:`select`}),(0,X.jsx)(c,{shortcut:`Enter`,action:`confirm`}),(0,X.jsx)(H,{action:`confirm:no`,context:`Confirmation`,fallback:`Esc`,description:`cancel`})]})})})]})}function _e(e){let t=e.toLowerCase();return t.includes(`fetch`)||t.includes(`network`)||t.includes(`timeout`)?`network`:t.includes(`auth`)||t.includes(`token`)||t.includes(`permission`)||t.includes(`oauth`)||t.includes(`not authenticated`)||t.includes(`/login`)||t.includes(`console account`)||t.includes(`403`)?`auth`:t.includes(`api`)||t.includes(`rate limit`)||t.includes(`500`)||t.includes(`529`)?`api`:`other`}function ve(e){switch(e){case`network`:return(0,X.jsx)(f,{marginY:1,flexDirection:`column`,children:(0,X.jsx)(s,{dimColor:!0,children:`Check your internet connection`})});case`auth`:return(0,X.jsxs)(f,{marginY:1,flexDirection:`column`,children:[(0,X.jsx)(s,{dimColor:!0,children:`Teleport requires a Claude account`}),(0,X.jsxs)(s,{dimColor:!0,children:[`Run `,(0,X.jsx)(s,{bold:!0,children:`/login`}),` and select "Claude account with subscription"`]})]});case`api`:return(0,X.jsx)(f,{marginY:1,flexDirection:`column`,children:(0,X.jsx)(s,{dimColor:!0,children:`Sorry, Claude encountered an error`})});case`other`:return(0,X.jsx)(f,{marginY:1,flexDirection:`row`,children:(0,X.jsx)(s,{dimColor:!0,children:`Sorry, Claude Code encountered an error`})})}}j(),u(),q(),L();function ye({onComplete:e,onCancel:t,onError:n,isEmbedded:r=!1,source:i}){let{resumeSession:a,isResuming:o,error:c,selectedSession:l}=le(i);(0,Y.useEffect)(()=>{M(`tengu_teleport_started`,{source:i})},[i]);let u=async t=>{let r=await a(t);r?e(r):c&&n&&n(c.message,c.formattedMessage)},p=()=>{M(`tengu_teleport_cancelled`,{}),t()};return d(`app:interrupt`,p,{context:`Global`,isActive:!!c&&!n}),o&&l?(0,X.jsxs)(f,{flexDirection:`column`,padding:1,children:[(0,X.jsxs)(f,{flexDirection:`row`,children:[(0,X.jsx)(K,{}),(0,X.jsx)(s,{bold:!0,children:`Resuming session…`})]}),(0,X.jsxs)(s,{dimColor:!0,children:[`Loading "`,l.title,`"…`]})]}):c&&!n?(0,X.jsxs)(f,{flexDirection:`column`,padding:1,children:[(0,X.jsx)(s,{bold:!0,color:`error`,children:`Failed to resume session`}),(0,X.jsx)(s,{dimColor:!0,children:c.message}),(0,X.jsx)(f,{marginTop:1,children:(0,X.jsxs)(s,{dimColor:!0,children:[`Press `,(0,X.jsx)(s,{bold:!0,children:`Esc`}),` to cancel`]})})]}):(0,X.jsx)(ge,{onSelect:u,onCancel:p,isEmbedded:r})}export{ye as TeleportResumeWrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{E as t,F as n,Rn as r,T as i,b as a,g as o,h as s,ot as c,t as l,tt as u,w as d,x as f}from"./src-DNHWYkls.js";import{t as p}from"./jsx-runtime-BTgGEFjL.js";import{Gs as m,Js as h}from"./growthbook-p4aJ_UMv.js";import{Ay as g,BE as _,HE as v,Oy as y,RT as b,Ty as x,_k as S,eF as C,hk as w,ky as T,nF as E,tF as D,vw as O,wy as k,zE as A}from"./loadAgentsDir-Bz0FfcVt.js";import{t as j}from"./useKeybinding-DAQL_dB_.js";import{t as M}from"./useTerminalSize-DzV4aaTi.js";import{n as N,t as P}from"./useExitOnCtrlCDWithKeybindings-CBce_-hb.js";function F({onThemeSelect:e,showIntroText:r=!1,helpText:l=``,showHelpTextBelow:p=!1,hideEscToCancel:m=!1,skipExitHandling:g=!1,onCancel:x}){let[S]=i(),C=t(),{columns:E}=n(),O=y(),A=O===null?T(S):null,{setPreviewTheme:j,savePreview:M,cancelPreview:P}=d(),F=_(e=>e.settings.syntaxHighlightingDisabled)??!1,L=v();c(`ThemePicker`);let R=D(`theme:toggleSyntaxHighlighting`,`ThemePicker`,`ctrl+t`);u(`theme:toggleSyntaxHighlighting`,()=>{if(O===null){let e=!F;h(`userSettings`,{syntaxHighlightingDisabled:e}),L(t=>({...t,settings:{...t.settings,syntaxHighlightingDisabled:e}}))}},{context:`ThemePicker`});let z=N(g?()=>{}:void 0),B=[...[],{label:`Dark mode`,value:`dark`},{label:`Light mode`,value:`light`},{label:`Dark mode (colorblind-friendly)`,value:`dark-daltonized`},{label:`Light mode (colorblind-friendly)`,value:`light-daltonized`},{label:`Dark mode (ANSI colors only)`,value:`dark-ansi`},{label:`Light mode (ANSI colors only)`,value:`light-ansi`}],V=(0,I.jsxs)(f,{flexDirection:`column`,gap:1,children:[(0,I.jsxs)(f,{flexDirection:`column`,gap:1,children:[r?(0,I.jsx)(a,{children:`Let's get started.`}):(0,I.jsx)(a,{bold:!0,color:`permission`,children:`Theme`}),(0,I.jsxs)(f,{flexDirection:`column`,children:[(0,I.jsx)(a,{bold:!0,children:`Choose the text style that looks best with your terminal`}),l&&!p&&(0,I.jsx)(a,{dimColor:!0,children:l})]}),(0,I.jsx)(b,{options:B,onFocus:e=>{j(e)},onChange:t=>{M(),e(t)},onCancel:g?()=>{P(),x?.()}:async()=>{P(),await w(0)},visibleOptionCount:B.length,defaultValue:C,defaultFocusValue:C})]}),(0,I.jsxs)(f,{flexDirection:`column`,width:`100%`,children:[(0,I.jsx)(f,{flexDirection:`column`,borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:`dashed`,borderColor:`subtle`,children:(0,I.jsx)(k,{patch:{oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[` function greet() {`,`- console.log("Hello, World!");`,`+ console.log("Hello, Claude!");`,` }`]},dim:!1,filePath:`demo.js`,firstLine:null,width:E})}),(0,I.jsxs)(a,{dimColor:!0,children:[` `,O===`env`?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:F?`Syntax highlighting disabled (${R} to enable)`:A?`Syntax theme: ${A.theme}${A.source?` (from ${A.source})`:``} (${R} to disable)`:`Syntax highlighting enabled (${R} to disable)`]})]})]});return r?V:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{flexDirection:`column`,children:V}),(0,I.jsxs)(f,{marginTop:1,children:[p&&l&&(0,I.jsx)(f,{marginLeft:3,children:(0,I.jsx)(a,{dimColor:!0,children:l})}),!m&&(0,I.jsx)(f,{children:(0,I.jsx)(a,{dimColor:!0,italic:!0,children:z.pending?(0,I.jsxs)(I.Fragment,{children:[`Press `,z.keyName,` again to exit`]}):(0,I.jsxs)(s,{children:[(0,I.jsx)(o,{shortcut:`Enter`,action:`select`}),(0,I.jsx)(o,{shortcut:`Esc`,action:`cancel`})]})})})]})]})}var I,L=e((()=>{r(),P(),M(),l(),E(),j(),C(),A(),S(),m(),O(),g(),x(),I=p()}));export{L as n,F as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-CaCI0a5T.js";import{l as r,p as i}from"./debug-CjIaNjpK.js";import{o as a,s as o}from"./log-DVv8YiNo.js";import{r as s,t as c}from"./execFileNoThrow-DdmR1mBS.js";import{D as l,O as u}from"./teammate-C-FiRloZ.js";import{n as d,t as f}from"./sleep-CC8jykQd.js";import{Fp as p,jp as m}from"./loadAgentsDir-Bz0FfcVt.js";import{c as h,n as g,o as _,r as v,s as y,t as b}from"./constants-BfXy-5cI.js";import{l as x,n as S,o as C,r as w}from"./detection-DW6grIlc.js";function T(){return d(N)}function E(){let e,t=new Promise(t=>{e=t}),n=M;return M=t,n.then(()=>e)}function D(e){return{red:`red`,blue:`blue`,green:`green`,yellow:`yellow`,purple:`magenta`,orange:`colour208`,pink:`colour205`,cyan:`cyan`}[e]}function O(e){return c(_,e)}function k(e){return c(_,[`-L`,y(),...e])}var A,j,M,N,P;e((()=>{r(),s(),a(),u(),f(),h(),w(),m(),t(),A=!1,j=null,M=Promise.resolve(),N=200,P=class{constructor(){n(this,`type`,`tmux`),n(this,`displayName`,`tmux`),n(this,`supportsHideShow`,!0)}async isAvailable(){return x()}async isRunningInside(){return C()}async createTeammatePaneInSwarmView(e,t){let n=await E();try{return await this.isRunningInside()?await this.createTeammatePaneWithLeader(e,t):await this.createTeammatePaneExternal(e,t)}finally{n()}}async createTeammateWindowInSwarmView(e,t){let n=`teammate-${e.replace(/[^a-zA-Z0-9]/g,`-`).toLowerCase()}`,{windowTarget:r}=await this.createExternalSwarmSession(),i=await k([`new-window`,`-t`,g,`-n`,n,`-P`,`-F`,`#{pane_id}`]);if(i.code!==0)throw Error(`Failed to create tmux window: ${i.stderr||`Unknown error`}`);let a=i.stdout.trim();return await this.setPaneTitle(a,e,t,!0),await this.setPaneBorderColor(a,t,!0),{paneId:a,isFirstTeammate:!1,windowName:n}}async sendCommandToPane(e,t,n=!1){let r=await(n?k:O)([`send-keys`,`-t`,e,t,`Enter`]);if(r.code!==0)throw Error(`Failed to send command to pane ${e}: ${r.stderr}`)}async setPaneBorderColor(e,t,n=!1){let r=D(t),i=n?k:O;await i([`select-pane`,`-t`,e,`-P`,`bg=default,fg=${r}`]),await i([`set-option`,`-p`,`-t`,e,`pane-border-style`,`fg=${r}`]),await i([`set-option`,`-p`,`-t`,e,`pane-active-border-style`,`fg=${r}`])}async setPaneTitle(e,t,n,r=!1){let i=D(n),a=r?k:O;await a([`select-pane`,`-t`,e,`-T`,t]),await a([`set-option`,`-p`,`-t`,e,`pane-border-format`,`#[fg=${i},bold] #{pane_title} #[default]`])}async enablePaneBorderStatus(e,t=!1){let n=e||await this.getCurrentWindowTarget();n&&await(t?k:O)([`set-option`,`-w`,`-t`,n,`pane-border-status`,`top`])}async rebalancePanes(e,t){t?await this.rebalancePanesWithLeader(e):await this.rebalancePanesTiled(e)}async killPane(e,t=!1){return(await(t?k:O)([`kill-pane`,`-t`,e])).code===0}async hidePane(e,t=!1){let n=t?k:O;await n([`new-session`,`-d`,`-s`,b]);let r=await n([`break-pane`,`-d`,`-s`,e,`-t`,`${b}:`]);return r.code===0?i(`[TmuxBackend] Hidden pane ${e}`):i(`[TmuxBackend] Failed to hide pane ${e}: ${r.stderr}`),r.code===0}async showPane(e,t,n=!1){let r=n?k:O,a=await r([`join-pane`,`-h`,`-s`,e,`-t`,t]);if(a.code!==0)return i(`[TmuxBackend] Failed to show pane ${e}: ${a.stderr}`),!1;i(`[TmuxBackend] Showed pane ${e} in ${t}`),await r([`select-layout`,`-t`,t,`main-vertical`]);let o=(await r([`list-panes`,`-t`,t,`-F`,`#{pane_id}`])).stdout.trim().split(`
|
|
2
|
+
`).filter(Boolean);return o[0]&&await r([`resize-pane`,`-t`,o[0],`-x`,`30%`]),!0}async getCurrentPaneId(){let e=S();if(e)return e;let t=await c(_,[`display-message`,`-p`,`#{pane_id}`]);return t.code===0?t.stdout.trim():(i(`[TmuxBackend] Failed to get current pane ID (exit ${t.code}): ${t.stderr}`),null)}async getCurrentWindowTarget(){if(j)return j;let e=S(),t=[`display-message`];e&&t.push(`-t`,e),t.push(`-p`,`#{session_name}:#{window_index}`);let n=await c(_,t);return n.code===0?(j=n.stdout.trim(),j):(i(`[TmuxBackend] Failed to get current window target (exit ${n.code}): ${n.stderr}`),null)}async getCurrentWindowPaneCount(e,t=!1){let n=e||await this.getCurrentWindowTarget();if(!n)return null;let r=[`list-panes`,`-t`,n,`-F`,`#{pane_id}`],i=t?await k(r):await O(r);return i.code===0?l(i.stdout.trim().split(`
|
|
3
|
+
`),Boolean):(o(Error(`[TmuxBackend] Failed to get pane count for ${n} (exit ${i.code}): ${i.stderr}`)),null)}async hasSessionInSwarm(e){return(await k([`has-session`,`-t`,e])).code===0}async createExternalSwarmSession(){if(!await this.hasSessionInSwarm(`claude-swarm`)){let e=await k([`new-session`,`-d`,`-s`,g,`-n`,v,`-P`,`-F`,`#{pane_id}`]);if(e.code!==0)throw Error(`Failed to create swarm session: ${e.stderr||`Unknown error`}`);let t=e.stdout.trim(),n=`${g}:${v}`;return i(`[TmuxBackend] Created external swarm session with window ${n}, pane ${t}`),{windowTarget:n,paneId:t}}let e=(await k([`list-windows`,`-t`,g,`-F`,`#{window_name}`])).stdout.trim().split(`
|
|
4
|
+
`).filter(Boolean),t=`${g}:${v}`;if(e.includes(`swarm-view`))return{windowTarget:t,paneId:(await k([`list-panes`,`-t`,t,`-F`,`#{pane_id}`])).stdout.trim().split(`
|
|
5
|
+
`).filter(Boolean)[0]||``};let n=await k([`new-window`,`-t`,g,`-n`,v,`-P`,`-F`,`#{pane_id}`]);if(n.code!==0)throw Error(`Failed to create swarm-view window: ${n.stderr||`Unknown error`}`);return{windowTarget:t,paneId:n.stdout.trim()}}async createTeammatePaneWithLeader(e,t){let n=await this.getCurrentPaneId(),r=await this.getCurrentWindowTarget();if(!n||!r)throw Error(`Could not determine current tmux pane/window`);let a=await this.getCurrentWindowPaneCount(r);if(a===null)throw Error(`Could not determine pane count for current window`);let o=a===1,s;if(o)s=await c(_,[`split-window`,`-t`,n,`-h`,`-l`,`70%`,`-P`,`-F`,`#{pane_id}`]);else{let e=(await c(_,[`list-panes`,`-t`,r,`-F`,`#{pane_id}`])).stdout.trim().split(`
|
|
6
|
+
`).filter(Boolean).slice(1),t=e.length,n=t%2==1;s=await c(_,[`split-window`,`-t`,e[Math.floor((t-1)/2)]||e[e.length-1],n?`-v`:`-h`,`-P`,`-F`,`#{pane_id}`])}if(s.code!==0)throw Error(`Failed to create teammate pane: ${s.stderr}`);let l=s.stdout.trim();return i(`[TmuxBackend] Created teammate pane for ${e}: ${l}`),await this.setPaneBorderColor(l,t),await this.setPaneTitle(l,e,t),await this.rebalancePanesWithLeader(r),await T(),{paneId:l,isFirstTeammate:o}}async createTeammatePaneExternal(e,t){let{windowTarget:n,paneId:r}=await this.createExternalSwarmSession(),a=await this.getCurrentWindowPaneCount(n,!0);if(a===null)throw Error(`Could not determine pane count for swarm window`);let o=!A&&a===1,s;if(o)s=r,A=!0,i(`[TmuxBackend] Using initial pane for first teammate ${e}: ${s}`),await this.enablePaneBorderStatus(n,!0);else{let t=(await k([`list-panes`,`-t`,n,`-F`,`#{pane_id}`])).stdout.trim().split(`
|
|
7
|
+
`).filter(Boolean),r=t.length,a=r%2==1,o=await k([`split-window`,`-t`,t[Math.floor((r-1)/2)]||t[t.length-1],a?`-v`:`-h`,`-P`,`-F`,`#{pane_id}`]);if(o.code!==0)throw Error(`Failed to create teammate pane: ${o.stderr}`);s=o.stdout.trim(),i(`[TmuxBackend] Created teammate pane for ${e}: ${s}`)}return await this.setPaneBorderColor(s,t,!0),await this.setPaneTitle(s,e,t,!0),await this.rebalancePanesTiled(n),await T(),{paneId:s,isFirstTeammate:o}}async rebalancePanesWithLeader(e){let t=(await O([`list-panes`,`-t`,e,`-F`,`#{pane_id}`])).stdout.trim().split(`
|
|
8
|
+
`).filter(Boolean);if(t.length<=2)return;await O([`select-layout`,`-t`,e,`main-vertical`]);let n=t[0];await O([`resize-pane`,`-t`,n,`-x`,`30%`]),i(`[TmuxBackend] Rebalanced ${t.length-1} teammate panes with leader`)}async rebalancePanesTiled(e){let t=(await k([`list-panes`,`-t`,e,`-F`,`#{pane_id}`])).stdout.trim().split(`
|
|
9
|
+
`).filter(Boolean);t.length<=1||(await k([`select-layout`,`-t`,e,`tiled`]),i(`[TmuxBackend] Rebalanced ${t.length} teammate panes with tiled layout`))}},p(P)}))();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-DR8-3Aex.js";import{Q as t,Rn as n,b as r,t as i,tt as a,x as o}from"./src-DNHWYkls.js";import{t as s}from"./jsx-runtime-BTgGEFjL.js";import{Hn as c,Ht as l}from"./state-CUZTq6r0.js";import{_s as u,bs as d,rs as f}from"./growthbook-p4aJ_UMv.js";import{_ as p,h as m}from"./debug-CjIaNjpK.js";import{n as h,t as g}from"./cwd-B2guYBbl.js";import{d as _,f as v}from"./stringUtils-U7kMYMJq.js";import{Fs as y,Ps as b,RT as x,TP as S,UD as C,WD as w,_k as T,gk as E,oy as D,ry as O,vw as k,wP as A}from"./loadAgentsDir-Bz0FfcVt.js";import{or as j}from"./prompt-CsBCtw4l.js";import{t as M}from"./useKeybinding-DAQL_dB_.js";import{n as N,t as P}from"./useExitOnCtrlCDWithKeybindings-CBce_-hb.js";import{n as F,t as I}from"./PermissionDialog-BCS22yEO.js";import{homedir as L}from"os";var R=e(n(),1),z=s();i(),l(),h(),p(),_(),u(),M(),T(),w(),k(),P(),F(),D(),j(),y(),S();function B(e){if(e===null||e.disableAllHooks)return!1;if(e.statusLine||e.fileSuggestion)return!0;if(!e.hooks)return!1;for(let t of Object.values(e.hooks))if(t.length>0)return!0;return!1}function V(){let e=[];return B(O(`projectSettings`))&&e.push(`.claude/settings.json`),B(O(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function H(e){return e.some(e=>e.ruleBehavior===`allow`&&(e.ruleValue.toolName===`Bash`||e.ruleValue.toolName.startsWith(`Bash(`)))}function U(){let e=[];return H(A(`projectSettings`))&&e.push(`.claude/settings.json`),H(A(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function W(e){return!!e?.otelHeadersHelper}function G(){let e=[];return W(O(`projectSettings`))&&e.push(`.claude/settings.json`),W(O(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function K(e){return!!e?.apiKeyHelper}function q(){let e=[];return K(O(`projectSettings`))&&e.push(`.claude/settings.json`),K(O(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function J(e){return!!(e?.awsAuthRefresh||e?.awsCredentialExport)}function Y(){let e=[];return J(O(`projectSettings`))&&e.push(`.claude/settings.json`),J(O(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function X(e){return!!e?.gcpAuthRefresh}function Z(){let e=[];return X(O(`projectSettings`))&&e.push(`.claude/settings.json`),X(O(`localSettings`))&&e.push(`.claude/settings.local.json`),e}function Q(e){return e?.env?Object.keys(e.env).some(e=>!b.has(e.toUpperCase())):!1}function $(){let e=[];return Q(O(`projectSettings`))&&e.push(`.claude/settings.json`),Q(O(`localSettings`))&&e.push(`.claude/settings.local.json`),e}j();function ee({onDone:e,commands:n}){let{servers:i}=C(`project`),s=Object.keys(i).length>0,l=V().length>0,u=U(),p=q().length>0,h=Y().length>0,_=Z().length>0,y=G().length>0,b=$().length>0,S=n?.some(e=>e.type===`prompt`&&e.loadedFrom===`commands_DEPRECATED`&&(e.source===`projectSettings`||e.source===`localSettings`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,w=n?.some(e=>e.type===`prompt`&&(e.loadedFrom===`skills`||e.loadedFrom===`plugin`)&&(e.source===`projectSettings`||e.source===`localSettings`||e.source===`plugin`)&&e.allowedTools?.some(e=>e===`Bash`||e.startsWith(`Bash(`)))??!1,T=u.length>0||S||w,D=f(),[O,k]=R.useState(null);R.useEffect(()=>{if(O!==null){let e=O,t=setTimeout(()=>E(e));return()=>clearTimeout(t)}},[O]),R.useEffect(()=>{v(`tengu_trust_dialog_shown`,{isHomeDir:L()===g(),hasMcpServers:s,hasHooks:l,hasBashExecution:T,hasApiKeyHelper:p,hasAwsCommands:h,hasGcpCommands:_,hasOtelHeadersHelper:y,hasDangerousEnvVars:b})},[s,l,T,p,h,_,y,b]);function A(t){if(t===`exit`){k(1);return}let n=L()===g();v(`tengu_trust_dialog_accept`,{isHomeDir:n,hasMcpServers:s,hasHooks:l,hasBashExecution:T,hasApiKeyHelper:p,hasAwsCommands:h,hasGcpCommands:_,hasOtelHeadersHelper:y,hasDangerousEnvVars:b}),n?c(!0):d(e=>({...e,hasTrustDialogAccepted:!0})),e()}let j=N(()=>k(1));return a(`confirm:no`,()=>{k(0)},{context:`Confirmation`}),O===null?D?(setTimeout(e),null):(0,z.jsx)(I,{color:`warning`,titleColor:`warning`,title:`Accessing workspace:`,children:(0,z.jsxs)(o,{flexDirection:`column`,gap:1,paddingTop:1,children:[(0,z.jsx)(r,{bold:!0,children:m().cwd()}),(0,z.jsx)(r,{children:`Is this a project you trust? (Your own code, a well-known open source project, or work from your team).`}),(0,z.jsx)(r,{children:`Once trusted, Claude Code can read, edit, and run commands in this folder.`}),(0,z.jsx)(r,{dimColor:!0,children:(0,z.jsx)(t,{url:`https://code.claude.com/docs/en/security`,children:`Security guide`})}),(0,z.jsx)(x,{options:[{label:`Yes, I trust this folder`,value:`enable_all`},{label:`No, exit`,value:`exit`}],onChange:e=>A(e),onCancel:()=>A(`exit`)}),(0,z.jsx)(r,{dimColor:!0,children:j.pending?(0,z.jsxs)(z.Fragment,{children:[`Press `,j.keyName,` again to exit`]}):(0,z.jsx)(z.Fragment,{children:`Enter to confirm · Esc to cancel`})})]})}):null}export{ee as TrustDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,r as n}from"./TungstenTool-kMqy-ifa.js";n();export{t as clearSessionsWithTungstenUsage,e as resetInitializationState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";var t,n,r,i=e((()=>{t={name:`TungstenTool`,isEnabled:()=>!1},n=()=>{},r=()=>{}}));export{r as i,n,i as r,t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./figures-fES5sASd.js";import{Rn as r,T as i,b as a,t as o,v as s,x as c}from"./src-DNHWYkls.js";import{t as l}from"./jsx-runtime-BTgGEFjL.js";import{Iu as u,Lu as d}from"./growthbook-p4aJ_UMv.js";function f(e,t={}){let{showValues:n=!0,hideFunctions:r=!1,themeName:i=`dark`,treeCharColors:a={}}=t,o=[],c=new WeakSet;function l(e,t){return t?s(t,i)(e):e}function u(e,t,i,s=0){if(typeof e==`string`){o.push(t+l(e,a.value));return}if(typeof e!=`object`||!e){if(n){let n=String(e);o.push(t+l(n,a.value))}return}if(c.has(e)){o.push(t+l(`[Circular]`,a.value));return}c.add(e);let d=Object.keys(e).filter(t=>{let n=e[t];return!(r&&typeof n==`function`)});d.forEach((r,i)=>{let f=e[r],m=i===d.length-1,h=s===0&&i===0?``:t,g=l(m?p.lastBranch:p.branch,a.treeChar),_=r.trim()===``?``:l(r,a.key),v=h+g+(_?` `+_:``),y=r.trim()!==``;if(f&&typeof f==`object`&&c.has(f)){let e=l(`[Circular]`,a.value);o.push(v+(y?`: `:v?` `:``)+e)}else if(f&&typeof f==`object`&&!Array.isArray(f))o.push(v),u(f,h+l(m?p.empty:p.line,a.treeChar)+` `,m,s+1);else if(Array.isArray(f))o.push(v+(y?`: `:v?` `:``)+`[Array(`+f.length+`)]`);else if(n){let e=l(typeof f==`function`?`[Function]`:String(f),a.value);v+=(y?`: `:v?` `:``)+e,o.push(v)}else o.push(v)})}let d=Object.keys(e);if(d.length===0)return l(`(empty)`,a.value);if(d.length===1&&d[0]!==void 0&&d[0].trim()===``&&typeof e[d[0]]==`string`){let t=d[0],n=l(p.lastBranch,a.treeChar),r=l(e[t],a.value);return n+` `+r}return u(e,``,!0),o.join(`
|
|
2
|
+
`)}var p,m=e((()=>{t(),o(),p={branch:n.lineUpDownRight,lastBranch:n.lineUpRight,line:n.lineVertical,empty:` `}}));function h(e){let t={};return e.forEach(e=>{if(!e.path){t[``]=e.message;return}let n=e.path.split(`.`),r=e.path;if(e.invalidValue!==null&&e.invalidValue!==void 0&&n.length>0){let t=[];for(let r=0;r<n.length;r++){let i=n[r];if(i)if(!isNaN(parseInt(i,10))&&r===n.length-1){let n;n=typeof e.invalidValue==`string`?`"${e.invalidValue}"`:e.invalidValue===null?`null`:e.invalidValue===void 0?`undefined`:String(e.invalidValue),t.push(n)}else t.push(i)}r=t.join(`.`)}d(t,r,e.message,Object)}),t}function g({errors:e}){let[t]=i();if(e.length===0)return null;let n=e.reduce((e,t)=>{let n=t.file||`(file not specified)`;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,_.jsx)(c,{flexDirection:`column`,children:Object.keys(n).sort().map(e=>{let r=n[e]||[];r.sort((e,t)=>!e.path&&t.path?-1:e.path&&!t.path?1:(e.path||``).localeCompare(t.path||``));let i=h(r),o=new Map;r.forEach(e=>{if(e.suggestion||e.docLink){let t=`${e.suggestion||``}|${e.docLink||``}`;o.has(t)||o.set(t,{suggestion:e.suggestion,docLink:e.docLink})}});let s=f(i,{showValues:!0,themeName:t,treeCharColors:{treeChar:`inactive`,key:`text`,value:`inactive`}});return(0,_.jsxs)(c,{flexDirection:`column`,children:[(0,_.jsx)(a,{children:e}),(0,_.jsx)(c,{marginLeft:1,children:(0,_.jsx)(a,{dimColor:!0,children:s})}),o.size>0&&(0,_.jsx)(c,{flexDirection:`column`,marginTop:1,children:Array.from(o.values()).map((e,t)=>(0,_.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[e.suggestion&&(0,_.jsx)(a,{dimColor:!0,wrap:`wrap`,children:e.suggestion}),e.docLink&&(0,_.jsxs)(a,{dimColor:!0,wrap:`wrap`,children:[`Learn more: `,e.docLink]})]},`suggestion-pair-${t}`))})]},e)})})}var _,v=e((()=>{u(),r(),o(),m(),_=l()}));export{v as n,g as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DR8-3Aex.js";import{Rn as e,T as t,b as n,t as r,x as i}from"./src-DNHWYkls.js";import{t as a}from"./jsx-runtime-BTgGEFjL.js";import{a as o,n as s}from"./env-CesrOJJq.js";e(),r(),o();var c=a(),l=58;function u(){let[e]=t(),r=`Welcome to Claude Code Zanii`;return s.terminal===`Apple_Terminal`?(0,c.jsx)(d,{theme:e,welcomeMessage:r}):[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.8.4`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` ░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░`}),(0,c.jsx)(n,{children:` ██ `})]}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░`}),(0,c.jsx)(n,{children:` ██▒▒██ `})]}),(0,c.jsx)(n,{children:` ▒▒ ██ ▒`}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` ▒▒░░▒▒ ▒ ▒▒`]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,backgroundColor:`clawd_background`,children:`██▄█████▄██`}),` ▒▒ ▒▒ `]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` ░ ▒ `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{color:`clawd_body`,children:`█ █ █ █`}),`……………………………………………………………………░…………………………▒…………`]})]})}):(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[r,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.8.4`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` * █████▓▓░ `}),(0,c.jsx)(n,{children:` * ███▓░ ░░ `}),(0,c.jsx)(n,{children:` ░░░░░░ ███▓░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` ██▓░░ ▓ `})]}),(0,c.jsx)(n,{children:` ░▓▓███▓▓░ `}),(0,c.jsx)(n,{dimColor:!0,children:` * ░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` `,(0,c.jsx)(n,{dimColor:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`██▄█████▄██`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:` █████████ `}),` * `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{color:`clawd_body`,children:`█ █ █ █`}),`………………………………………………………………………………………………………………`]})]})})}function d({theme:e,welcomeMessage:t}){return[`light`,`light-daltonized`,`light-ansi`].includes(e)?(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[t,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.8.4`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` ░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{children:` `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░`}),(0,c.jsx)(n,{children:` ██ `})]}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░`}),(0,c.jsx)(n,{children:` ██▒▒██ `})]}),(0,c.jsx)(n,{children:` ▒▒ ██ ▒`}),(0,c.jsx)(n,{children:` ▒▒░░▒▒ ▒ ▒▒`}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`▗`}),(0,c.jsxs)(n,{color:`clawd_background`,backgroundColor:`clawd_body`,children:[` `,`▗`,` `,`▖`,` `]}),(0,c.jsx)(n,{color:`clawd_body`,children:`▖`}),` ▒▒ ▒▒ `]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `.repeat(9)}),` ░ ▒ `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),`……………………………………………………………………░…………………………▒…………`]})]})}):(0,c.jsx)(i,{width:l,children:(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{children:[(0,c.jsxs)(n,{color:`claude`,children:[t,` `]}),(0,c.jsxs)(n,{dimColor:!0,children:[`v`,`2.8.4`,` `]})]}),(0,c.jsx)(n,{children:`…………………………………………………………………………………………………………………………………………………………`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{children:` * █████▓▓░ `}),(0,c.jsx)(n,{children:` * ███▓░ ░░ `}),(0,c.jsx)(n,{children:` ░░░░░░ ███▓░ `}),(0,c.jsx)(n,{children:` ░░░ ░░░░░░░░░░ ███▓░ `}),(0,c.jsxs)(n,{children:[(0,c.jsx)(n,{children:` ░░░░░░░░░░░░░░░░░░░ `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` ██▓░░ ▓ `})]}),(0,c.jsx)(n,{children:` ░▓▓███▓▓░ `}),(0,c.jsx)(n,{dimColor:!0,children:` * ░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░ `}),(0,c.jsx)(n,{dimColor:!0,children:` ░░░░░░░░░░░░░░░░ `}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{dimColor:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{color:`clawd_body`,children:`▗`}),(0,c.jsxs)(n,{color:`clawd_background`,backgroundColor:`clawd_body`,children:[` `,`▗`,` `,`▖`,` `]}),(0,c.jsx)(n,{color:`clawd_body`,children:`▖`}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{bold:!0,children:`*`}),(0,c.jsx)(n,{children:` `})]}),(0,c.jsxs)(n,{children:[` `,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `.repeat(9)}),` * `]}),(0,c.jsxs)(n,{children:[`…………………`,(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),(0,c.jsx)(n,{children:` `}),(0,c.jsx)(n,{backgroundColor:`clawd_body`,children:` `}),`………………………………………………………………………………………………………………`]})]})})}export{u as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-CaCI0a5T.js";import{l as r,p as i}from"./debug-CjIaNjpK.js";import{r as a,t as o}from"./execFileNoThrow-DdmR1mBS.js";import{i as s,o as c}from"./platform-BXz_rgpy.js";import{Ip as l,jp as u}from"./loadAgentsDir-Bz0FfcVt.js";import{a as d,r as f}from"./detection-DW6grIlc.js";import{tmpdir as p}from"os";import{join as m}from"path";import{randomUUID as h}from"crypto";import{readFile as g,unlink as _}from"fs/promises";function v(e){return`'${e.replace(/'/g,`''`)}'`}function y(e,t){let n=v(t);return[`$ErrorActionPreference = 'Stop'`,`Set-Content -LiteralPath ${n} -Value $PID`,[`try { ${e}; if ($LASTEXITCODE -is [int]) { exit $LASTEXITCODE } }`,`catch { Write-Error $_; exit 1 }`,`finally { Remove-Item -LiteralPath ${n} -Force -ErrorAction SilentlyContinue }`].join(`
|
|
2
|
+
`)].join(`; `)}function b(){let e=process.env.CLAUDE_WT_PANE_TIMEOUT_MS;if(!e)return S;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:S}async function x(e,t){let n=Date.now()+t,r;for(;Date.now()<n;){try{let t=(await g(e,`utf-8`)).trim();if(!/^\d+$/.test(t))r=Error(`pidFile content not a valid pid: ${JSON.stringify(t)}`);else{let e=Number.parseInt(t,10);if(Number.isFinite(e)&&e>0)return e;r=Error(`pidFile content parsed to invalid pid: ${e}`)}}catch(e){r=e}await new Promise(e=>setTimeout(e,C))}throw r??Error(`pidFile never appeared`)}var S,C,w;e((()=>{r(),a(),c(),f(),u(),t(),S=8e3,C=200,w=class{constructor(e,t){n(this,`type`,`windows-terminal`),n(this,`displayName`,`Windows Terminal`),n(this,`supportsHideShow`,!1),n(this,`panes`,new Map),n(this,`runCommand`,void 0),n(this,`getPlatformValue`,void 0),n(this,`pidFileDir`,void 0),typeof e==`function`||e===void 0?(this.runCommand=e??o,this.getPlatformValue=t??s,this.pidFileDir=p()):(this.runCommand=e.runCommand??o,this.getPlatformValue=e.getPlatform??s,this.pidFileDir=e.pidFileDir??p())}makePidFile(e){return m(this.pidFileDir,`${e.replace(/[^a-zA-Z0-9_-]/g,`-`)}.pid`)}async isAvailable(){return this.getPlatformValue()===`windows`?process.env.WT_SESSION?!0:(await this.runCommand(`where.exe`,[`wt.exe`])).code===0:!1}async isRunningInside(){return this.getPlatformValue()===`windows`&&d()}async createTeammatePaneInSwarmView(e,t){let n=`wt-${h()}`,r=this.panes.size===0;return this.panes.set(n,{title:e,mode:`pane`,pidFile:this.makePidFile(n),status:`registered`}),{paneId:n,isFirstTeammate:r}}async createTeammateWindowInSwarmView(e,t){let n=`wt-${h()}`,r=`teammate-${e.replace(/[^a-zA-Z0-9]/g,`-`).toLowerCase()}`;return this.panes.set(n,{title:e,mode:`window`,pidFile:this.makePidFile(n),status:`registered`}),{paneId:n,isFirstTeammate:!1,windowName:r}}async sendCommandToPane(e,t,n){let r=this.panes.get(e);if(!r)throw Error(`Unknown Windows Terminal pane id: ${e}`);if(r.status===`ready`||r.status===`killing`)throw Error(`Pane ${e} already spawned (status=${r.status}); create a new pane to re-launch`);if(r.status===`spawning`)throw Error(`Pane ${e} is currently spawning; wait for the in-flight launch to complete`);if(r.status===`dead`)throw Error(`Pane ${e} is dead; create a new pane`);let i,a,o=new Promise((e,t)=>{i=e,a=t});o.catch(()=>{}),r.status=`spawning`,r.spawnPromise=o;try{let n=y(t,r.pidFile),a=Buffer.from(n,`utf16le`).toString(`base64`),o=r.mode===`window`?[`-w`,`-1`,`new-tab`,`--title`,r.title]:[`-w`,`0`,`split-pane`,`--vertical`,`--title`,r.title];await _(r.pidFile).catch(()=>{});let s=await this.runCommand(`wt.exe`,[...o,`powershell.exe`,`-NoLogo`,`-NoProfile`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`,a]);if(s.code!==0)throw Error(`Failed to launch Windows Terminal teammate ${e}: ${s.stderr}`);let c=b(),l;try{l=await x(r.pidFile,c)}catch(t){throw Error(`Windows Terminal pane failed to launch within ${c}ms\n paneId: ${e}\n pidFile: ${r.pidFile}\n wt.exe stdout: ${s.stdout||`(empty)`}\n wt.exe stderr: ${s.stderr||`(empty)`}\n underlying: ${t instanceof Error?t.message:String(t)}\n override timeout via env CLAUDE_WT_PANE_TIMEOUT_MS`)}r.pid=l,r.status=`ready`,i()}catch(e){throw r.status=`dead`,r.pid=void 0,a(e),e}finally{r.spawnPromise=void 0}}async setPaneBorderColor(e,t,n){}async setPaneTitle(e,t,n,r){}async enablePaneBorderStatus(e,t){}async rebalancePanes(e,t){}async killPane(e,t){let n=this.panes.get(e);if(!n)return!1;if(n.status===`spawning`&&n.spawnPromise&&await n.spawnPromise.catch(()=>{}),n.status===`dead`)return this.panes.delete(e),!1;if(n.status!==`ready`)return!1;n.status=`killing`;let r=n.pid;if(r===void 0){let t=null;for(let r=0;r<3;r++)try{t=(await g(n.pidFile,`utf-8`)).trim();break}catch{if(r===2)return n.status=`dead`,this.panes.delete(e),!1;await new Promise(e=>setTimeout(e,500))}if(!t||!/^\d+$/.test(t))return n.status=`dead`,this.panes.delete(e),!1;let i=Number.parseInt(t,10);if(!Number.isFinite(i)||i<=0)return n.status=`dead`,this.panes.delete(e),!1;r=i}let a=await this.runCommand(`powershell.exe`,[`-NoLogo`,`-NoProfile`,`-Command`,`Stop-Process -Id ${r} -Force -ErrorAction Stop`]);return n.pid=void 0,n.status=`dead`,this.panes.delete(e),i(`[WindowsTerminalBackend] killPane ${e} pid=${r} code=${a.code}`),a.code===0}async hidePane(e,t){return!1}async showPane(e,t,n){return!1}},l(w)}))();export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{n,t as r}from"./figures-fES5sASd.js";import{In as i,Ln as a,Rn as o,b as s,t as c,x as l}from"./src-DNHWYkls.js";import{t as u}from"./jsx-runtime-BTgGEFjL.js";import{Ht as d,p as f,tn as p}from"./state-CUZTq6r0.js";import{HP as m,Jh as h,UP as g,Yh as _,_P as v,bP as y,gI as b,pI as x,qh as S,xP as C}from"./loadAgentsDir-Bz0FfcVt.js";import{n as w,t as T}from"./AddWorkspaceDirectory-y_rd6sRl.js";function E({message:e,args:t,onDone:n}){return(0,O.useEffect)(()=>{let e=setTimeout(n,0);return()=>clearTimeout(e)},[n]),(0,k.jsxs)(l,{flexDirection:`column`,children:[(0,k.jsxs)(s,{dimColor:!0,children:[r.pointer,` /add-dir `,t]}),(0,k.jsx)(m,{children:(0,k.jsx)(s,{children:e})})]})}async function D(e,t,n){let r=(n??``).trim(),a=t.getAppState(),o=async(n,r=!1)=>{let a={type:`addDirectories`,directories:[n],destination:r?`localSettings`:`session`},o=v(t.getAppState().toolPermissionContext,a);t.setAppState(e=>({...e,toolPermissionContext:o}));let s=f();s.includes(n)||p([...s,n]),x.refreshConfig();let c;if(r)try{C(a),c=`Added ${i.bold(n)} as a working directory and saved to local settings`}catch(e){c=`Added ${i.bold(n)} as a working directory. Failed to save to local settings: ${e instanceof Error?e.message:`Unknown error`}`}else c=`Added ${i.bold(n)} as a working directory for this session`;e(`${c} ${i.dim(`· /permissions to manage`)}`)};if(!r)return(0,k.jsx)(T,{permissionContext:a.toolPermissionContext,onAddDirectory:o,onCancel:()=>{e(`Did not add a working directory.`)}});let s=await _(r,a.toolPermissionContext);if(s.resultType!==`success`){let t=S(s);return(0,k.jsx)(E,{message:t,args:n??``,onDone:()=>e(t)})}return(0,k.jsx)(T,{directoryPath:s.absolutePath,permissionContext:a.toolPermissionContext,onAddDirectory:o,onCancel:()=>{e(`Did not add ${i.bold(s.absolutePath)} as a working directory.`)}})}var O,k;e((()=>{a(),n(),O=t(o(),1),d(),g(),w(),c(),y(),b(),h(),k=u()}))();export{D as call};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{mp as t,pp as n}from"./loadAgentsDir-Bz0FfcVt.js";import{n as r,r as i}from"./constants-BM62Vf_X.js";function a(e,t){let n=new Map;for(let e of t)n.set(e.agentType,e);let r=new Set,i=[];for(let t of e){let e=`${t.agentType}:${t.source}`;if(r.has(e))continue;r.add(e);let a=n.get(t.agentType),o=a&&a.source!==t.source?a.source:void 0;i.push({...t,overriddenBy:o})}return i}function o(e){let t=e.model||n();if(t)return t===`inherit`?`inherit`:t}function s(e){return r(e).toLowerCase()}function c(e,t){return e.agentType.localeCompare(t.agentType,void 0,{sensitivity:`base`})}var l,u=e((()=>{t(),i(),l=[{label:`User agents`,source:`userSettings`},{label:`Project agents`,source:`projectSettings`},{label:`Local agents`,source:`localSettings`},{label:`Managed agents`,source:`policySettings`},{label:`Plugin agents`,source:`plugin`},{label:`CLI arg agents`,source:`flagSettings`},{label:`Built-in agents`,source:`built-in`}]}));export{o as a,u as i,c as n,a as o,s as r,l as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,t}from"./cwd-B2guYBbl.js";import{i as n,o as r,r as i}from"./loadAgentsDir-Bz0FfcVt.js";import{a,i as o,n as s,o as c,r as l,t as u}from"./agentDisplay-DuYEwOwO.js";o(),r(),e();function d(e){let t=a(e),n=[e.agentType];return t&&n.push(t),e.memory&&n.push(`${e.memory} memory`),n.join(` · `)}async function f(){let{allAgents:e}=await n(t()),r=c(e,i(e)),a=[],o=0;for(let{label:e,source:t}of u){let n=r.filter(e=>e.source===t).sort(s);if(n.length!==0){a.push(`${e}:`);for(let e of n)if(e.overriddenBy){let t=l(e.overriddenBy);a.push(` (shadowed by ${t}) ${d(e)}`)}else a.push(` ${d(e)}`),o++;a.push(``)}}a.length===0?console.log(`No agents found.`):(console.log(`${o} active agents\n`),console.log(a.join(`
|
|
2
|
+
`).trimEnd()))}export{f as agentsHandler};
|